Redirect to clerk
POST
{{server}}/api/v1/counter/redirect?ticket={{ticketKey}}This endpoint redirects the ticket to a selected clerk.
Request
-
ticket(string, required): The called ticketkey. -
task(string, required): Thekeyof the task under transaction. -
user(string, required): Target clerk's user key -
wasRealTransaction(boolean): Is it was a real transaction? -
forced(boolean): Forced mode, skip the service matrix validation. -
afterwork(boolean): If the afterwork is enabled for the current service, the clerk can decide whether want to afterwork on the ticket or not. -
closingCodes(string|string[]): Optional one or more closing code keys
There is no response if it was successful.
Request
Authorization
| Header | Value |
|---|---|
Authorization | Bearer {{counterToken}} |
Headers
| Key | Value |
|---|---|
Accept | application/json |
X-WSID | {{counterWsID}} |
Query parameters
| Key | Value |
|---|---|
ticket | {{ticketKey}} |
Body (json)
{
"ticket": "{{ticketKey}}",
"task": "{{ticketTaskKey}}",
"user": "00000000-0000-4000-0002-000000000007",
"wasRealTransaction": true,
"forced": true,
"afterwork": false,
"closingCodes": null
}
Code snippets
- cURL
- JavaScript
- Python
curl -X POST '{{server}}/api/v1/counter/redirect?ticket={{ticketKey}}' \
-H 'Accept: application/json' \
-H 'X-WSID: {{counterWsID}}' \
-H 'Authorization: Bearer {{counterToken}}' \
-H 'Content-Type: application/json' \
-d '{
"ticket": "{{ticketKey}}",
"task": "{{ticketTaskKey}}",
"user": "00000000-0000-4000-0002-000000000007",
"wasRealTransaction": true,
"forced": true,
"afterwork": false,
"closingCodes": null
}'
const response = await fetch("{{server}}/api/v1/counter/redirect?ticket={{ticketKey}}", {
method: "POST",
headers: {
"Accept": "application/json",
"X-WSID": "{{counterWsID}}",
"Authorization": "Bearer {{counterToken}}",
"Content-Type": "application/json"
},
body: JSON.stringify({
"ticket": "{{ticketKey}}",
"task": "{{ticketTaskKey}}",
"user": "00000000-0000-4000-0002-000000000007",
"wasRealTransaction": true,
"forced": true,
"afterwork": false,
"closingCodes": null
}),
});
const data = await response.json();
console.log(data);
import requests
url = "{{server}}/api/v1/counter/redirect?ticket={{ticketKey}}"
headers = {
"Accept": "application/json",
"X-WSID": "{{counterWsID}}",
"Authorization": "Bearer {{counterToken}}",
"Content-Type": "application/json"
}
payload = {
"ticket": "{{ticketKey}}",
"task": "{{ticketTaskKey}}",
"user": "00000000-0000-4000-0002-000000000007",
"wasRealTransaction": True,
"forced": True,
"afterwork": False,
"closingCodes": None
}
response = requests.post(url, headers=headers, json=payload)
print(response.status_code)
print(response.json())
Example
Example request
POST
{{server}}/api/v1/counter/redirect/clerkHeaders (2)
| Key | Value |
|---|---|
Accept | application/json |
X-WSID | {{counterWsID}} |
Body
{
"ticket": "1906d4ba-ccac-4a1f-d8f9-a63962d6879a",
"task": "1906d4ba-cc9b-454b-75ab-abc57971fc21",
"user": "00000000-0000-4000-0002-000000000007",
"wasRealTransaction": true,
"forced": true,
"afterwork": false,
"closingCodes": null
}
Example response 204 No Content
No response body