Skip to main content

Create new ticket

POST{{server}}/api/v1/dispenser/ticket

This 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 contains data1 .. data10 fields 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​

HeaderValue
AuthorizationApikey {{dispenserApikey}}

Headers​

KeyValue
Acceptapplication/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 -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"
}'

Examples (2)​

Example request
POST{{server}}/api/v1/dispenser/ticket
Headers (2)
KeyValue
Acceptapplication/json
X-WSID{{dispenserWsID}}
Body
{
"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
}
Example response 200 Ok
Response headers (9)
KeyValue
Access-Control-Expose-Headers*
Cache-Controlno-store, no-cache, must-revalidate
Access-Control-Allow-Origin*
Access-Control-Allow-MethodsPOST, PUT, GET, OPTIONS, DELETE
Access-Control-Allow-Credentialstrue
Content-Length1663
Access-Control-Max-Age86400
Access-Control-Allow-HeadersContent-Type, Authorization, X-Requested-With
Content-Typeapplication/json;charset=utf-8
Body
{
"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
}