Get settings
{{server}}/api/v1/smart/settingsThis request returns the Smart Ticket feature settings.
Response
-
publicUrl(string): Server Public URL. -
reservation(object): Reservation settings-
enabled(boolean): Reservation is enabled. -
timeLimit(number): Time limit for arriving (in minutes) -
maxTickets(number): Maximum reserved tickets in branch -
lastBeforeClose(number): Last time for reservation before branch closing. -
maxDistance(number): Maximum distance for GPS arriving (in meters).
-
-
dispenserProfiles(array): Ticket Dispenser profile schedule.-
profile(string): Profile key -
day(number): Day of week (0 - Sunday, 7 - Saturday) -
start(number): Start time inHHmm -
end(number): End time inHHmm
-
-
feedbackProfiles(array): Customer Feedback profile schedule. The structure is same asdispenserProfiles. -
notifications.vapidPublicKey(string): VAPID Public key for Push Notification registration. -
customCss(string): Custom CSS content. -
commonStyling(object): Smart Ticket styling properties.
Request
Authorization
| Header | Value |
|---|---|
Authorization | SmartToken {{smartToken}} |
Headers
| Key | Value |
|---|---|
Accept | application/json |
Code snippets
- cURL
- JavaScript
- Python
curl -X GET '{{server}}/api/v1/smart/settings' \
-H 'Accept: application/json' \
-H 'Authorization: SmartToken {{smartToken}}'
const response = await fetch("{{server}}/api/v1/smart/settings", {
method: "GET",
headers: {
"Accept": "application/json",
"Authorization": "SmartToken {{smartToken}}"
},
});
const data = await response.json();
console.log(data);
import requests
url = "{{server}}/api/v1/smart/settings"
headers = {
"Accept": "application/json",
"Authorization": "SmartToken {{smartToken}}"
}
response = requests.get(url, headers=headers)
print(response.status_code)
print(response.json())
Examples (2)
- Get Smart Ticket settings
- Missing SmartToken
{{server}}/api/v1/smart/settingsHeaders (1)
| Key | Value |
|---|---|
Accept | application/json |
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 | 2522 |
Access-Control-Max-Age | 86400 |
Access-Control-Allow-Headers | Content-Type, Authorization, X-Requested-With |
Content-Type | application/json;charset=utf-8 |
{
"publicUrl": "https://demo-v7.q-net.pro/smart.html",
"validityTime": 10,
"reservation": {
"enabled": true,
"timeLimit": 30,
"maxTickets": null,
"lastBeforeClose": 20
},
"dispenserProfiles": [
{
"profile": "00000000-0000-4000-0008-000000000001",
"day": 0,
"start": "0000",
"end": "2400"
},
{
"profile": "00000000-0000-4000-0008-000000000001",
"day": 1,
"start": "0000",
"end": "2400"
},
{
"profile": "00000000-0000-4000-0008-000000000001",
"day": 2,
"start": "0000",
"end": "2400"
},
{
"profile": "00000000-0000-4000-0008-000000000001",
"day": 3,
"start": "0000",
"end": "2400"
},
{
"profile": "00000000-0000-4000-0008-000000000001",
"day": 4,
"start": "0000",
"end": "2400"
},
{
"profile": "00000000-0000-4000-0008-000000000001",
"day": 5,
"start": "0000",
"end": "2400"
},
{
"profile": "00000000-0000-4000-0008-000000000001",
"day": 6,
"start": "0000",
"end": "2400"
}
],
"feedbackProfiles": [
{
"profile": "00000000-0000-4000-0016-000000000001",
"day": 0,
"start": "0000",
"end": "2400"
},
{
"profile": "00000000-0000-4000-0016-000000000001",
"day": 1,
"start": "0000",
"end": "2400"
},
{
"profile": "00000000-0000-4000-0016-000000000001",
"day": 2,
"start": "0000",
"end": "2400"
},
{
"profile": "00000000-0000-4000-0016-000000000001",
"day": 3,
"start": "0000",
"end": "2400"
},
{
"profile": "00000000-0000-4000-0016-000000000001",
"day": 4,
"start": "0000",
"end": "2400"
},
{
"profile": "00000000-0000-4000-0016-000000000001",
"day": 5,
"start": "0000",
"end": "2400"
},
{
"profile": "00000000-0000-4000-0016-000000000001",
"day": 6,
"start": "0000",
"end": "2400"
}
],
"notifications": {
"vapidPublicKey": "BEgIZRINGhfzPglciyNI0i0oTxncrYwFAhb6QKMXR266Xb6Ky4xoOYtEJJM6A0fJGI27bYPnsxkmWzEfULjGT8c"
},
"customCss": null,
"commonStyling": {
"colorScheme": "default",
"backgroundImage": null,
"backgroundSize": "auto",
"logoImage": null,
"logoSize": "auto",
"primaryColor": "#4e80a6",
"primaryColorGradient": true,
"pageColor": "#7e7e7e",
"pageColorGradient": true,
"headerColor": "#454141",
"headerColorGradient": true,
"buttonColor": "#2f2d2d",
"buttonColorGradient": true,
"buttonText": "#FFFFFF",
"textColor": "#FFFFFF",
"secondaryColor": "#fab000"
}
}
{{server}}/api/v1/smart/settingsHeaders (1)
| Key | Value |
|---|---|
Accept | application/json |
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 | 1935 |
Access-Control-Max-Age | 86400 |
Access-Control-Allow-Headers | Content-Type, Authorization, X-Requested-With |
Content-Type | application/json;charset=utf-8 |
{
"name": "Unauthenticated",
"message": "Unauthenticated",
"nodeID": "norbi-pc3-26884",
"code": 401,
"type": "UNAUTHENTICATED",
"retryable": false,
"stack": "services.moleculer.error.MoleculerClientError: Unauthenticated\r\n\tat com.qnet7.core.ErrorFactory.unauthenticated(ErrorFactory.java:183)\r\n\tat com.qnet7.core.ErrorFactory.unauthenticated(ErrorFactory.java:179)\r\n\tat com.qnet7.acl.ActionPermissionController.throwError(ActionPermissionController.java:378)\r\n\tat com.qnet7.acl.ActionPermissionController.hasPermissionInCentral(ActionPermissionController.java:338)\r\n\tat com.qnet7.acl.ActionPermissionController.lambda$3(ActionPermissionController.java:258)\r\n\tat io.datatree.Promise.lambda$0(Promise.java:403)\r\n\tat java.util.concurrent.CompletableFuture.uniHandle(CompletableFuture.java:836)\r\n\tat java.util.concurrent.CompletableFuture.uniHandleStage(CompletableFuture.java:848)\r\n\tat java.util.concurrent.CompletableFuture.handle(CompletableFuture.java:2168)\r\n\tat io.datatree.Promise.then(Promise.java:398)\r\n\tat com.qnet7.acl.ActionPermissionController.lambda$0(ActionPermissionController.java:246)\r\n\tat services.moleculer.metrics.MetricMiddleware$1.lambda$0(MetricMiddleware.java:74)\r\n\tat io.datatree.Promise.<init>(Promise.java:261)\r\n\tat services.moleculer.metrics.MetricMiddleware$1.handler(MetricMiddleware.java:59)\r\n\tat services.moleculer.service.ActionEndpoint.handler(ActionEndpoint.java:85)\r\n\tat services.moleculer.service.DefaultServiceInvoker.call(DefaultServiceInvoker.java:132)\r\n\tat services.moleculer.service.DefaultServiceInvoker.call(DefaultServiceInvoker.java:123)\r\n\tat services.moleculer.web.router.ActionInvoker.lambda$1(ActionInvoker.java:236)\r\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)\r\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)\r\n\tat java.lang.Thread.run(Thread.java:748)",
"data": {}
}