# JSON to PPTX Builder

## JSON Example

```javascript
{
	"base_settings": {
		"tracking_id": "0N1iCw5hdsBPrtxStETA123_-NzsWw2T0Bxao8oL3SI",
		"project_name": "demo project"
	},
	"global_chart_settings": {
		"bar": {
			"show_legend": "center",
			"show_legend_font_size": 11
		}
	},
	"body": [{
		"id": "zSTRw18JtjYl899TRxhUl1lGmKGtROWPv_c591sjh6E",
		"table_text": "IceCream Question",
		"question_text": "How likely is it that you eat ice cream in the morning?",
		"base_text": "Weighted Base (All Answering) : ALL",
		"deleted": false,
		"rows": [{
			"id": "choice-1111",
      "text": "Don't know",
      "visible" : true
		}, {
			"id": "choice-2222",
      "text": "Yes",
      "visible" : true
		}, {
			"id": "choice-3333",
			"text": "No"
		}],
		"columns": [{
			"id": "total",
			"text": "Total",
			"items": [{
				"id": "total",
				"text": "Total",
				"base": 1949.0,
				"data": [
					106.0,
					105.0,
					26.0
				]
			}]
		}, {
			"id": "gender",
			"text": "Gender",
			"items": [{
					"id": "male",
					"text": "Male",
          "base": 175.0,
          "selected" : true,
					"data": [
						0,
						105.0,
						26.0
					]
				},
				{
					"id": "female",
					"text": "Female",
					"base": 175.0,
					"data": [
						123,
						210.0,
						260.0
					]
				}
			]
		}],
		"view_settings": {
			"slide_master_index": 0,
			"slide_layout_index": 0,
			"placeholder_index": 0,
			"chart_type": "bar",
			"hide_percentage": true
		},
		"custom_obj": {
			"total_max_bytes_size": 300
		}
	}],
	"custom_obj": {
		"total_max_bytes_size": 300
	}

}
```

{% hint style="info" %}
This is a minimal example of a `json` data request.&#x20;
{% endhint %}

#### Python example using [requests](https://requests.readthedocs.io/en/v3.0.0/) library

{% code title="pptx\_request.py" %}

```python
import requests
import json

token = "<YOUR_API_TOKEN>"
data_path = "example_data.json"

# preparing body for request
with open(data_path, 'rb') as f:
    body = f.read()

url = 'https://api.pptxbuilder.com/api/v1/convert_data_to_pptx'
headers = {}
headers['Authorization'] = 'Bearer ' + token

data = {
    'json_data' : (None, body)
}

response = requests.post(url, files=data, headers=headers)

print(response.json()['url'])
```

{% endcode %}

After running this example you should expect a response:

```http
{
    "url": "https://pptxbuilder.com/builder/preview?token=<token>"
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.pptxbuilder.com/v1/examples/json-to-pptxbuilder.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
