Append slide
This page describes an example usage of the append_slide endpoint.

JSON Example

1
{
2
"slide": {
3
"id": null,
4
"base_text": "Weighted Base (All Answering):ALL",
5
"table_text": "Q1",
6
"index": 0,
7
"layout": {
8
"pptx_template": "Default",
9
"slide_layout_index": 5,
10
"slide_master_index": 0
11
},
12
"question_text": "Q1. Which of these have you done in the last week?"
13
},
14
"charts": [{
15
"rows": [{
16
"text": "Read a printed newspaper",
17
"visible": true
18
}, {
19
"text": "Visited a newspaper website",
20
"visible": true
21
}, {
22
"text": "Read a printed magazine",
23
"visible": true
24
}],
25
"columns": [{
26
"text": "Total",
27
"selected": true,
28
"items": [{
29
"base": 1949,
30
"data": [43, 41, 25],
31
"text": "Total",
32
"selected": true
33
}]
34
}, {
35
"text": "Gender",
36
"selected": true,
37
"items": [{
38
"base": 175,
39
"data": [44, 44, 24],
40
"text": "Male",
41
"selected": true
42
}, {
43
"base": 434,
44
"data": [42, 39, 27],
45
"text": "Female",
46
"selected": true
47
}]
48
}],
49
"view_settings": {
50
"chart_type": "bar",
51
"placeholder_index": 0
52
}
53
}]
54
}
Copied!
This is a minimal example of a json data request.
Python example using requests library
append_slide.py
1
import requests
2
3
url = "https://api.pptxbuilder.com/api/v2/append-slide?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoyFERder34DM4OTcyMzksImRhdGFfaWQiOjg5LCJhcGlfdmVyc2lvbiI6Mn0.2XGoQSYkYepCeypTfP323UDlxyR_3LCSzovoLYd5_co"
4
5
payload = YOUR_SLIDE_JSON_PAYLOAD
6
headers = {
7
'Authorization': YOUR_TOKEN,
8
'Content-Type': 'application/json'
9
}
10
11
response = requests.request("PUT", url, headers=headers, data=payload)
12
13
print(response.text)
14
Copied!
Last modified 10mo ago
Copy link