Create new ticket
{{server}}/api/v1/dispenser/ticketThis endpoint generates a new ticket based on the gived parameters in the body.
Request
-
dispenser(string, required) - The dispenser key. The "Get dispenser" response contains it. -
dispenserProfile(string, required) - The actual dispenser profile key. -
language(string, required) - The selected language key -
tasks(array, required) - The list of selected services. It should contains at leat one element.service(string, required) - The selected service key
-
crm(string, optional) - CRM identified in case of identified customer -
customerData(object, optional) - Identified customer data values. It can containsdata1..data10fields with custom values -
customerName(string, optional) - Customer name in case of "give-a-nick" feature -
bookingCode(string, optional) - Booking code in case of an appointment ticket.
Response
The response contains all information about the Ticket entity.
Request
Authorization
| Header | Value |
|---|---|
Authorization | Apikey {{dispenserApikey}} |
Headers
| Key | Value |
|---|---|
Accept | application/json |
X-WSID | {{dispenserWsID}} |
Body (json)
{
"dispenser": "00000000-0000-4000-0010-000000000002",
"dispenserProfile": "00000000-0000-4000-0008-000000000001",
"language": "00000000-0000-4000-0004-000000000001",
"clerk": null,
"tasks": [
{
"service": "00000000-0000-4000-0007-000000000001"
}
],
"crm": null,
"customerData": {
"data1": "John Doe"
},
"customerName": "John",
"bookingCode": "927723"
}
Code snippets
- cURL
- JavaScript
- Python
curl -X POST '{{server}}/api/v1/dispenser/ticket' \
-H 'Accept: application/json' \
-H 'X-WSID: {{dispenserWsID}}' \
-H 'Authorization: Apikey {{dispenserApikey}}' \
-H 'Content-Type: application/json' \
-d '{
"dispenser": "00000000-0000-4000-0010-000000000002",
"dispenserProfile": "00000000-0000-4000-0008-000000000001",
"language": "00000000-0000-4000-0004-000000000001",
"clerk": null,
"tasks": [
{
"service": "00000000-0000-4000-0007-000000000001"
}
],
"crm": null,
"customerData": {
"data1": "John Doe"
},
"customerName": "John",
"bookingCode": "927723"
}'
const response = await fetch("{{server}}/api/v1/dispenser/ticket", {
method: "POST",
headers: {
"Accept": "application/json",
"X-WSID": "{{dispenserWsID}}",
"Authorization": "Apikey {{dispenserApikey}}",
"Content-Type": "application/json"
},
body: JSON.stringify({
"dispenser": "00000000-0000-4000-0010-000000000002",
"dispenserProfile": "00000000-0000-4000-0008-000000000001",
"language": "00000000-0000-4000-0004-000000000001",
"clerk": null,
"tasks": [
{
"service": "00000000-0000-4000-0007-000000000001"
}
],
"crm": null,
"customerData": {
"data1": "John Doe"
},
"customerName": "John",
"bookingCode": "927723"
}),
});
const data = await response.json();
console.log(data);
import requests
url = "{{server}}/api/v1/dispenser/ticket"
headers = {
"Accept": "application/json",
"X-WSID": "{{dispenserWsID}}",
"Authorization": "Apikey {{dispenserApikey}}",
"Content-Type": "application/json"
}
payload = {
"dispenser": "00000000-0000-4000-0010-000000000002",
"dispenserProfile": "00000000-0000-4000-0008-000000000001",
"language": "00000000-0000-4000-0004-000000000001",
"clerk": None,
"tasks": [
{
"service": "00000000-0000-4000-0007-000000000001"
}
],
"crm": None,
"customerData": {
"data1": "John Doe"
},
"customerName": "John",
"bookingCode": "927723"
}
response = requests.post(url, headers=headers, json=payload)
print(response.status_code)
print(response.json())
Examples (2)
- Create new ticket
- Create appointment ticket
{{server}}/api/v1/dispenser/ticketHeaders (2)
| Key | Value |
|---|---|
Accept | application/json |
X-WSID | {{dispenserWsID}} |
{
"dispenser": "00000000-0000-4000-0010-000000000002",
"dispenserProfile": "00000000-0000-4000-0008-000000000001",
"language": "00000000-0000-4000-0004-000000000001",
"clerk": null,
"tasks": [
{
"service": "00000000-0000-4000-0007-000000000001"
}
],
"crm": null,
"customerData": {
"data1": "John Doe"
},
"customerName": "John",
"bookingCode": null
}
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 | 1663 |
Access-Control-Max-Age | 86400 |
Access-Control-Allow-Headers | Content-Type, Authorization, X-Requested-With |
Content-Type | application/json;charset=utf-8 |
{
"dispenser": "00000000-0000-4000-0010-000000000002",
"dispenserProfile": "00000000-0000-4000-0008-000000000001",
"language": "00000000-0000-4000-0004-000000000001",
"clerk": null,
"tasks": [
{
"type": 7,
"key": "196a9f89-fd93-48d0-4ffd-de7100504e2c",
"subType": 1,
"name": "Deposit or withdrawal",
"code": 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": "Deposit or withdrawal",
"explanation": null,
"comment": null
},
"00000000-0000-4000-0004-000000000017": {
"name": "Pénztári be- vagy kifizetés",
"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,
"normalDelay": 120,
"forcedDelay": 300,
"services": [],
"aspect": null,
"time": 1746607451889,
"service": "00000000-0000-4000-0007-000000000001",
"createType": 1,
"createdAt": 1746608365529,
"statusTime": 1746608365529,
"zero": false,
"user": null
}
],
"crm": null,
"customerData": {
"data1": "John Doe"
},
"customerName": "John",
"bookingCode": null,
"branch": "00000000-0000-4000-0003-000000000001",
"reserved": false,
"languageCode": "en-gb",
"key": "196a9f89-fdb2-4ebb-c592-5a7b7d2653f8",
"number": "001",
"createdAt": 1746608365531,
"statusTime": 1746608365531,
"status": 20,
"createType": 1,
"priority": 5,
"user": null,
"counter": null,
"calls": 0,
"missingCalls": 0,
"waitingTimeSum": 0,
"transactionTimeSum": 0,
"recording": 0,
"history": {},
"dropped": [],
"estimatedTime": 120000,
"estimatedQueueSize": 0
}
{{server}}/api/v1/dispenser/ticketHeaders (2)
| Key | Value |
|---|---|
Accept | application/json |
X-WSID | {{dispenserWsID}} |
{
"dispenser": "00000000-0000-4000-0010-000000000002",
"dispenserProfile": "00000000-0000-4000-0008-000000000001",
"language": "00000000-0000-4000-0004-000000000001",
"bookingCode": "927723"
}
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 | 1971 |
Access-Control-Max-Age | 86400 |
Access-Control-Allow-Headers | Content-Type, Authorization, X-Requested-With |
Content-Type | application/json;charset=utf-8 |
{
"dispenser": "00000000-0000-4000-0010-000000000002",
"dispenserProfile": "00000000-0000-4000-0008-000000000001",
"language": "00000000-0000-4000-0004-000000000001",
"bookingCode": "927723",
"tasks": [
{
"type": 7,
"key": "196aa049-27a5-4a86-e9b7-2cbc78e955ab",
"subType": 1,
"name": "Health insurance",
"code": 6,
"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": "Health insurance",
"explanation": null,
"comment": null
},
"00000000-0000-4000-0004-000000000017": {
"name": "Egészségbiztosítás"
}
},
"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,
"normalDelay": 120,
"forcedDelay": 300,
"services": [],
"aspect": null,
"time": 1746607452087,
"service": "00000000-0000-4000-0007-000000000006",
"createdAt": 1746609148538,
"statusTime": 1746609148538,
"zero": false,
"user": null
}
],
"branch": "00000000-0000-4000-0003-000000000001",
"reserved": false,
"appointment": {
"start": 1746609300000,
"language": "00000000-0000-4000-0004-000000000001",
"branch": "00000000-0000-4000-0003-000000000001",
"service": "00000000-0000-4000-0007-000000000006",
"client": {
"name": "John Doe",
"phone": "11223344",
},
"bookingCode": "927723",
"key": "196aa028-6f31-a7ff-81b4-3699ea177913",
"verification": "196aa028-6f31-a7ff-81b4-3699ea177913",
"verified": true,
"length": 15,
"time": 1746609014515
},
"languageCode": "en-gb",
"key": "196aa049-27f3-406b-351c-c9aa5cb4532d",
"number": "002",
"createdAt": 1746609148543,
"statusTime": 1746609148543,
"status": 20,
"createType": 1,
"priority": 5,
"user": null,
"counter": null,
"calls": 0,
"missingCalls": 0,
"waitingTimeSum": 0,
"transactionTimeSum": 0,
"recording": 0,
"history": {},
"customerData": {},
"dropped": [],
"estimatedTime": 120000,
"estimatedQueueSize": 0
}