JSON to PPTX Builder
This page shows a simple example of how to get started with the endpoint JSON to PPTX Builder

JSON Example

1
{
2
"base_settings": {
3
"tracking_id": "0N1iCw5hdsBPrtxStETA123_-NzsWw2T0Bxao8oL3SI",
4
"project_name": "demo project"
5
},
6
"global_chart_settings": {
7
"bar": {
8
"show_legend": "bottom",
9
"show_legend_font_size": 11
10
}
11
},
12
"body": [{
13
"slide": {
14
"id": "zSTRw18JtjYl899TRxhUl1lGmKGtROWPv_c591sjh6E",
15
"table_text": "IceCream Question",
16
"question_text": "How likely is it that you eat ice cream in the morning?",
17
"base_text": "Weighted Base (All Answering) : ALL",
18
"layout": {
19
"slide_master_index": 0,
20
"slide_layout_index": 0
21
}
22
},
23
"charts": [{
24
"rows": [{
25
"id": "choice-1111",
26
"text": "Don't know",
27
"visible" : true
28
},
29
{
30
"id": "choice-2222",
31
"text": "Yes",
32
"visible" : true
33
},
34
{
35
"id": "choice-3333",
36
"text": "No",
37
"visible" : false
38
}
39
40
],
41
"columns": [{
42
"id": "total",
43
"text": "Total",
44
"items": [{
45
"id": "totality",
46
"text": "Total",
47
"base": 1949.0,
48
"data": [
49
106.0,
50
105.0,
51
26.0
52
]
53
}]
54
},
55
{
56
"id": "gender",
57
"text": "Gender",
58
"items": [{
59
"id": "male",
60
"text": "Male",
61
"base": 175.0,
62
"selected" : true,
63
"data": [
64
0,
65
105.0,
66
26.0
67
]
68
},
69
{
70
"id": "female",
71
"text": "Female",
72
"base": 175.0,
73
"data": [
74
123,
75
210.0,
76
260.0
77
]
78
}
79
]
80
}
81
],
82
"view_settings": {
83
"placeholder_index": 0,
84
"chart_type": "bar",
85
"hide_percentage": true
86
}
87
}],
88
"custom_obj": {
89
"total_max_bytes_size": 300
90
}
91
}],
92
"custom_obj": {
93
"total_max_bytes_size": 300
94
}
95
}
Copied!
This is a minimal example of a json data request.

Python example using requests library.

pptx_request.py
1
import requests
2
import json
3
4
token = "<YOUR_API_TOKEN>"
5
data_path = "example_data.json"
6
7
# preparing body for request
8
with open(data_path, 'rb') as f:
9
body = f.read()
10
11
url = 'https://api.pptxbuilder.com/api/v2/convert_data_to_pptx'
12
headers = {}
13
headers['Authorization'] = 'Bearer ' + token
14
15
data = {
16
'json_data' : (None, body)
17
}
18
19
response = requests.post(url, files=data, headers=headers)
20
21
print(response.json()['url'])
Copied!
After running this example you should expect a response:
1
{
2
"url": "https://pptxbuilder.com/builder/preview?token=<token>"
3
}
Copied!
Navigate to the link provided in the response to open the project on PPTX Builder platform.
Last modified 9mo ago
Copy link
Contents
JSON Example