Skip to main content

Generate ticket

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

This request generates a ticket.

Request

  • branch (string, required): Branch key

  • service (string, required): Service key (it can be an array for multiple services)

  • language (string, required): Selected language key

  • crm (string optional): CRM identified if it's an identified customer

  • customerData (object optional): Customer data if it's an identified customer

  • clerk (string, optional): Clerk key in case of clerk selection.

  • bookingCode (string, optional): Booking code in case of appointment ticket.

Response

The response contains a Smart Ticket Token in the token property. Use it in the Authorization header in the further REST endpoints.

Request​

Authorization​

HeaderValue
AuthorizationSmartToken {{smartToken}}

Headers​

KeyValue
Acceptapplication/json

Body (json)​

{
"branch": "{{branch}}",
"service": "00000000-0000-4000-0007-000000000001",
"language": "00000000-0000-4000-0004-000000000001"
}

Code snippets​

curl -X POST '{{server}}/api/v1/smart/ticket' \
-H 'Accept: application/json' \
-H 'Authorization: SmartToken {{smartToken}}' \
-H 'Content-Type: application/json' \
-d '{
"branch": "{{branch}}",
"service": "00000000-0000-4000-0007-000000000001",
"language": "00000000-0000-4000-0004-000000000001"
}'

Examples (2)​

Example request
POST{{server}}/api/v1/smart/ticket
Headers (1)
KeyValue
Acceptapplication/json
Body
{
"branch": "{{branch}}",
"service": "00000000-0000-4000-0007-000000000001",
"language": "00000000-0000-4000-0004-000000000001"
}
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-Length120
Access-Control-Max-Age86400
Access-Control-Allow-HeadersContent-Type, Authorization, X-Requested-With
Content-Typeapplication/json;charset=utf-8
Body
{
"token": "Uc47DhfB2voMsxRNY2d__dUlDqTxNz74KWEUDO8L4iDi234LHORgU4rJILGab2b.eTHJ_.YC4srsNyieLjctJwFPdw667GfvfLz3FDY6eW8-"
}