Call next ticket
POST
{{server}}/api/v1/counter/callNextTicketThis endpoint calls the next callable ticket. The response contains all information about the ticket. You should store it into the memory because the transaction endpoints don't return it again.
If there is no callable ticket, it returns 204 No content
Request
-
services(string|string[]): Filter for services -
autoCall(boolean): Flag for statistics whether the call managed by the auto-call functionality or not.
Request
Authorization
| Header | Value |
|---|---|
Authorization | Bearer {{counterToken}} |
Headers
| Key | Value |
|---|---|
Accept | application/json |
X-WSID | {{counterWsID}} |
Code snippets
- cURL
- JavaScript
- Python
curl -X POST '{{server}}/api/v1/counter/callNextTicket' \
-H 'Accept: application/json' \
-H 'X-WSID: {{counterWsID}}' \
-H 'Authorization: Bearer {{counterToken}}'
const response = await fetch("{{server}}/api/v1/counter/callNextTicket", {
method: "POST",
headers: {
"Accept": "application/json",
"X-WSID": "{{counterWsID}}",
"Authorization": "Bearer {{counterToken}}"
},
});
const data = await response.json();
console.log(data);
import requests
url = "{{server}}/api/v1/counter/callNextTicket"
headers = {
"Accept": "application/json",
"X-WSID": "{{counterWsID}}",
"Authorization": "Bearer {{counterToken}}"
}
response = requests.post(url, headers=headers)
print(response.status_code)
print(response.json())
Examples (3)
- Call next ticket
- Call next Service 1 ticket
- No callable ticket
Example request
POST
{{server}}/api/v1/counter/callNextTicketHeaders (2)
| Key | Value |
|---|---|
Accept | application/json |
X-WSID | {{counterWsID}} |
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 | 1327 |
Access-Control-Max-Age | 86400 |
Access-Control-Allow-Headers | Content-Type, Authorization, X-Requested-With |
Content-Type | application/json;charset=utf-8 |
Body
{
"key": "1905ea86-02d5-43ea-5f0a-8d42064766fb",
"status": 30,
"user": "00000000-0000-4000-0002-000000000006",
"counter": "00000000-0000-4000-0010-000000000003",
"calls": 1,
"statusTime": 1719575782045,
"reserved": false,
"history": {},
"language": "00000000-0000-4000-0004-000000000001",
"createdAt": 1719575011373,
"number": "004",
"bookingCode": null,
"crm": null,
"createType": 1,
"comments": null,
"customerData": {},
"priority": 5,
"transactionTimeSum": 0,
"waitingTimeSum": 0,
"recording": 0,
"customerName": null,
"tasks": [
{
"type": 7,
"key": "1905ea86-02a2-4c4e-240d-62d39f5173c5",
"subType": 1,
"name": "Service 3",
"statName": null,
"ticketLayout": null,
"numberInterval": "00000000-0000-4000-0019-000000000001",
"priority": 5,
"features": {
"afterwork": false,
"clerkSelection": false,
"customerIdentification": 0
},
"texts": {
"00000000-0000-4000-0004-000000000001": {
"name": "Service 3",
"explanation": null,
"comment": null
}
},
"codes": [
"00000000-0000-4000-0013-000000000006",
"00000000-0000-4000-0013-000000000007",
"00000000-0000-4000-0013-000000000008",
"00000000-0000-4000-0013-000000000009",
"00000000-0000-4000-0013-000000000010"
],
"status": 20,
"aspect": null,
"normalDelay": 120,
"forcedDelay": 180,
"services": [],
"code": 3,
"time": 1708594264876,
"": null,
"service": "00000000-0000-4000-0007-000000000003",
"createType": 1,
"createdAt": 1719575011370,
"statusTime": 1719575011370,
"zero": false,
"user": null
}
]
}
Example request
POST
{{server}}/api/v1/counter/callNextTicket?services=00000000-0000-4000-0007-000000000001&autoCall=trueQuery parameters (2)
| Key | Value |
|---|---|
services | 00000000-0000-4000-0007-000000000001 |
autoCall | true |
Headers (2)
| Key | Value |
|---|---|
Accept | application/json |
X-WSID | {{counterWsID}} |
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 | 1327 |
Access-Control-Max-Age | 86400 |
Access-Control-Allow-Headers | Content-Type, Authorization, X-Requested-With |
Content-Type | application/json;charset=utf-8 |
Body
{
"key": "1905ea86-02d5-43ea-5f0a-8d42064766fb",
"status": 30,
"user": "00000000-0000-4000-0002-000000000006",
"counter": "00000000-0000-4000-0010-000000000003",
"calls": 1,
"statusTime": 1719575782045,
"reserved": false,
"history": {},
"language": "00000000-0000-4000-0004-000000000001",
"createdAt": 1719575011373,
"number": "004",
"bookingCode": null,
"crm": null,
"createType": 1,
"comments": null,
"customerData": {},
"priority": 5,
"transactionTimeSum": 0,
"waitingTimeSum": 0,
"recording": 0,
"customerName": null,
"tasks": [
{
"type": 7,
"key": "1905ea86-02a2-4c4e-240d-62d39f5173c5",
"subType": 1,
"name": "Service 3",
"statName": null,
"ticketLayout": null,
"numberInterval": "00000000-0000-4000-0019-000000000001",
"priority": 5,
"features": {
"afterwork": false,
"clerkSelection": false,
"customerIdentification": 0
},
"texts": {
"00000000-0000-4000-0004-000000000001": {
"name": "Service 3",
"explanation": null,
"comment": null
}
},
"codes": [
"00000000-0000-4000-0013-000000000006",
"00000000-0000-4000-0013-000000000007",
"00000000-0000-4000-0013-000000000008",
"00000000-0000-4000-0013-000000000009",
"00000000-0000-4000-0013-000000000010"
],
"status": 20,
"aspect": null,
"normalDelay": 120,
"forcedDelay": 180,
"services": [],
"code": 3,
"time": 1708594264876,
"": null,
"service": "00000000-0000-4000-0007-000000000003",
"createType": 1,
"createdAt": 1719575011370,
"statusTime": 1719575011370,
"zero": false,
"user": null
}
]
}
Example request
POST
{{server}}/api/v1/counter/callNextTicketHeaders (2)
| Key | Value |
|---|---|
Accept | application/json |
X-WSID | {{counterWsID}} |
Example response 204 No Content
No response body