List clerks & counters
GET
{{server}}/api/v1/counter/redirect?ticket={{ticketKey}}Before redirecting to counter, you should call this endpoint to get a list of all available counters which can manage the given ticket.
Request
ticket: Ticketkey
Response
-
key: Counterkey -
forced: Indicated that the redirection should be in forced mode.
Request
Authorization
| Header | Value |
|---|---|
Authorization | Bearer {{counterToken}} |
Headers
| Key | Value |
|---|---|
Accept | application/json |
X-WSID | {{counterWsID}} |
Query parameters
| Key | Value |
|---|---|
ticket | {{ticketKey}} |
Code snippets
- cURL
- JavaScript
- Python
curl -X GET '{{server}}/api/v1/counter/redirect?ticket={{ticketKey}}' \
-H 'Accept: application/json' \
-H 'X-WSID: {{counterWsID}}' \
-H 'Authorization: Bearer {{counterToken}}'
const response = await fetch("{{server}}/api/v1/counter/redirect?ticket={{ticketKey}}", {
method: "GET",
headers: {
"Accept": "application/json",
"X-WSID": "{{counterWsID}}",
"Authorization": "Bearer {{counterToken}}"
},
});
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}}"
}
response = requests.get(url, headers=headers)
print(response.status_code)
print(response.json())
Example
Example request
GET
{{server}}/api/v1/counter/redirect?ticket={{ticketKey}}Query parameters (1)
| Key | Value |
|---|---|
ticket | {{ticketKey}} |
Headers (2)
| Key | Value |
|---|---|
Accept | application/json |
X-WSID | {{counterWsID}} |
Example response 200 Ok
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 | 961 |
Access-Control-Max-Age | 86400 |
Access-Control-Allow-Headers | Content-Type, Authorization, X-Requested-With |
Content-Type | application/json;charset=utf-8 |
Body
[
{
"user": "00000000-0000-4000-0002-000000000008",
"counter": "18ed1ba5-89bb-441c-ba1e-a83fa2f774ad",
"withService": true,
"services": [
"00000000-0000-4000-0007-000000000001",
"00000000-0000-4000-0007-000000000002",
"00000000-0000-4000-0007-000000000006",
"00000000-0000-4000-0007-000000000005",
"18ed1ace-7774-441b-648f-98d54a257490",
"18ed1aa2-c5a3-4946-8ba7-f71bb5ce69c1",
"18ed1abe-b483-48ee-38e4-1029aafe62af",
"00000000-0000-4000-0007-000000000004",
"00000000-0000-4000-0007-000000000003",
"18ed1ac5-8602-44e0-0e48-05356a4733ea"
]
},
{
"user": "00000000-0000-4000-0002-000000000007",
"counter": "18ed1b9d-a441-4e0a-15bf-9c4e49393660",
"withService": true,
"services": [
"00000000-0000-4000-0007-000000000001",
"00000000-0000-4000-0007-000000000006",
"00000000-0000-4000-0007-000000000005",
"18ed1ace-7774-441b-648f-98d54a257490",
"18ed1aa2-c5a3-4946-8ba7-f71bb5ce69c1",
"00000000-0000-4000-0007-000000000004",
"00000000-0000-4000-0007-000000000003",
"18ed1ac5-8602-44e0-0e48-05356a4733ea"
]
}
]