Abort ticket
POST
{{server}}/api/v1/counter/abortTicketThis endpoint aborts the ticket flow. It can be useful, if the ticket has multiple services but the clerk should abort the transaction flow and skip the further services.
Request
-
ticket(string, required): Ticketkey -
wasRealTransaction(boolean): Is it was a real transaction? -
abortCode(string): Abort codekey. To get abort keys, use theGet codesendpoint.
There is no response, if it was successful.
Request
Authorization
| Header | Value |
|---|---|
Authorization | Bearer {{counterToken}} |
Headers
| Key | Value |
|---|---|
Accept | application/json |
X-WSID | {{counterWsID}} |
Body (json)
{
"ticket": "{{ticketKey}}",
"wasRealTransaction": true,
"abortCode": null
}
Code snippets
- cURL
- JavaScript
- Python
curl -X POST '{{server}}/api/v1/counter/abortTicket' \
-H 'Accept: application/json' \
-H 'X-WSID: {{counterWsID}}' \
-H 'Authorization: Bearer {{counterToken}}' \
-H 'Content-Type: application/json' \
-d '{
"ticket": "{{ticketKey}}",
"wasRealTransaction": true,
"abortCode": null
}'
const response = await fetch("{{server}}/api/v1/counter/abortTicket", {
method: "POST",
headers: {
"Accept": "application/json",
"X-WSID": "{{counterWsID}}",
"Authorization": "Bearer {{counterToken}}",
"Content-Type": "application/json"
},
body: JSON.stringify({
"ticket": "{{ticketKey}}",
"wasRealTransaction": true,
"abortCode": null
}),
});
const data = await response.json();
console.log(data);
import requests
url = "{{server}}/api/v1/counter/abortTicket"
headers = {
"Accept": "application/json",
"X-WSID": "{{counterWsID}}",
"Authorization": "Bearer {{counterToken}}",
"Content-Type": "application/json"
}
payload = {
"ticket": "{{ticketKey}}",
"wasRealTransaction": True,
"abortCode": None
}
response = requests.post(url, headers=headers, json=payload)
print(response.status_code)
print(response.json())
Example
Example request
POST
{{server}}/api/v1/counter/abortTicketHeaders (2)
| Key | Value |
|---|---|
Accept | application/json |
X-WSID | {{counterWsID}} |
Body
{
"ticket": "{{ticketKey}}",
"wasRealTransaction": true,
"abortCode": null
}
Example response 204 No Content
No response body