Generate ticket
POST
{{server}}/api/v1/counter/newTicketThis endpoint generates a ticket on the counter. The generated ticket will be in calling status at this counter immediately. It won't appear on the waiting-area displays but only on counter displays.
Request
-
service(string): Service key -
language(string): Language key
Request
Authorization
| Header | Value |
|---|---|
Authorization | Bearer {{counterToken}} |
Headers
| Key | Value |
|---|---|
Accept | application/json |
X-WSID | {{counterWsID}} |
Body (json)
{
"service": "00000000-0000-4000-0007-000000000001",
"language": "00000000-0000-4000-0004-000000000001"
}
Code snippets
- cURL
- JavaScript
- Python
curl -X POST '{{server}}/api/v1/counter/newTicket' \
-H 'Accept: application/json' \
-H 'X-WSID: {{counterWsID}}' \
-H 'Authorization: Bearer {{counterToken}}' \
-H 'Content-Type: application/json' \
-d '{
"service": "00000000-0000-4000-0007-000000000001",
"language": "00000000-0000-4000-0004-000000000001"
}'
const response = await fetch("{{server}}/api/v1/counter/newTicket", {
method: "POST",
headers: {
"Accept": "application/json",
"X-WSID": "{{counterWsID}}",
"Authorization": "Bearer {{counterToken}}",
"Content-Type": "application/json"
},
body: JSON.stringify({
"service": "00000000-0000-4000-0007-000000000001",
"language": "00000000-0000-4000-0004-000000000001"
}),
});
const data = await response.json();
console.log(data);
import requests
url = "{{server}}/api/v1/counter/newTicket"
headers = {
"Accept": "application/json",
"X-WSID": "{{counterWsID}}",
"Authorization": "Bearer {{counterToken}}",
"Content-Type": "application/json"
}
payload = {
"service": "00000000-0000-4000-0007-000000000001",
"language": "00000000-0000-4000-0004-000000000001"
}
response = requests.post(url, headers=headers, json=payload)
print(response.status_code)
print(response.json())
Example
Example request
POST
{{server}}/api/v1/counter/newTicketHeaders (2)
| Key | Value |
|---|---|
Accept | application/json |
X-WSID | {{counterWsID}} |
Body
{
"service": "00000000-0000-4000-0007-000000000001",
"language": "00000000-0000-4000-0004-000000000001"
}
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 | 1497 |
Access-Control-Max-Age | 86400 |
Access-Control-Allow-Headers | Content-Type, Authorization, X-Requested-With |
Content-Type | application/json;charset=utf-8 |
Body
{
"tasks": [
{
"type": 7,
"key": "1905ec9c-4495-413e-5358-bdc761036748",
"subType": 1,
"name": "Service 1",
"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 1",
"explanation": null,
"comment": null
},
"00000000-0000-4000-0004-000000000017": {
"name": "Feladat 1",
"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": 300,
"services": [],
"time": 1702039295628,
"": null,
"service": "00000000-0000-4000-0007-000000000001",
"createType": 1,
"createdAt": 1719577199689,
"statusTime": 1719577199689,
"zero": false,
"user": null
}
],
"language": "00000000-0000-4000-0004-000000000001",
"createType": 2,
"branch": "00000000-0000-4000-0003-000000000001",
"reserved": false,
"languageCode": "en-gb",
"key": "1905ec9c-44a9-4eea-b15b-503fb0e21274",
"number": "008",
"createdAt": 1719577199690,
"statusTime": 1719577199690,
"status": 30,
"user": "00000000-0000-4000-0002-000000000006",
"counter": "00000000-0000-4000-0010-000000000003",
"calls": 1,
"priority": 5,
"missingCalls": 0,
"waitingTimeSum": 0,
"transactionTimeSum": 0,
"recording": 0,
"expoToken": null,
"history": {},
"customerData": {},
"estimatedTime": 120000,
"estimatedQueueSize": 0
}