Get settings
GET
{{server}}/api/v1/dispenser/settingsThis endpoint returns the dispenser settings. It contains Smart Ticket & styling settings.
validityTime: The Smart Ticket QR code validity time in minutes.
Request
Authorization
| Header | Value |
|---|---|
Authorization | Apikey {{dispenserApikey}} |
Headers
| Key | Value |
|---|---|
Accept | application/json |
X-WSID | {{dispenserWsID}} |
Code snippets
- cURL
- JavaScript
- Python
curl -X GET '{{server}}/api/v1/dispenser/settings' \
-H 'Accept: application/json' \
-H 'X-WSID: {{dispenserWsID}}' \
-H 'Authorization: Apikey {{dispenserApikey}}'
const response = await fetch("{{server}}/api/v1/dispenser/settings", {
method: "GET",
headers: {
"Accept": "application/json",
"X-WSID": "{{dispenserWsID}}",
"Authorization": "Apikey {{dispenserApikey}}"
},
});
const data = await response.json();
console.log(data);
import requests
url = "{{server}}/api/v1/dispenser/settings"
headers = {
"Accept": "application/json",
"X-WSID": "{{dispenserWsID}}",
"Authorization": "Apikey {{dispenserApikey}}"
}
response = requests.get(url, headers=headers)
print(response.status_code)
print(response.json())
Example
Example request
GET
{{server}}/api/v1/dispenser/settingsHeaders (2)
| Key | Value |
|---|---|
Accept | application/json |
X-WSID | {{dispenserWsID}} |
Example response 200 Ok
Response headers (9)
| Key | Value |
|---|---|
Access-Control-Expose-Headers | * |
Cache-Control | no-store, no-cache, must-revalidate |
Access-Control-Allow-Origin | * |
Access-Control-Allow-Methods | POST, PUT, GET, OPTIONS, DELETE |
Access-Control-Allow-Credentials | true |
Content-Length | 430 |
Access-Control-Max-Age | 86400 |
Access-Control-Allow-Headers | Content-Type, Authorization, X-Requested-With |
Content-Type | application/json;charset=utf-8 |
Body
{
"smartTicket": {
"validityTime": 10
},
"styling": {
"colorScheme": "steel-blue",
"backgroundImage": null,
"backgroundSize": "auto",
"logoImage": null,
"logoSize": "auto",
"primaryColor": "#2c4a61",
"primaryColorGradient": true,
"pageColor": "#90a3ad",
"pageColorGradient": true,
"headerColor": "#363b45",
"headerColorGradient": true,
"buttonColor": "#253542",
"buttonColorGradient": true,
"buttonText": "#FFFFFF",
"textColor": "#FFFFFF",
"secondaryColor": "#fcc43f"
}
}