Delete ticket
POST
{{server}}/api/v1/counter/closeTicketThis endpoint deletes a waiting ticket. The ticket key values should be passed as ticket parameter. The comment optional parameter can contain any information of the reason of deletion.
Request
Authorization
| Header | Value |
|---|---|
Authorization | Bearer {{counterToken}} |
Headers
| Key | Value |
|---|---|
Accept | application/json |
X-WSID | {{counterWsID}} |
Body (json)
{
"ticket": "1905ed1d-557b-4df6-b15f-7e04f7287192",
"comment": "He's gone."
}
Code snippets
- cURL
- JavaScript
- Python
curl -X POST '{{server}}/api/v1/counter/closeTicket' \
-H 'Accept: application/json' \
-H 'X-WSID: {{counterWsID}}' \
-H 'Authorization: Bearer {{counterToken}}' \
-H 'Content-Type: application/json' \
-d '{
"ticket": "1905ed1d-557b-4df6-b15f-7e04f7287192",
"comment": "He'\''s gone."
}'
const response = await fetch("{{server}}/api/v1/counter/closeTicket", {
method: "POST",
headers: {
"Accept": "application/json",
"X-WSID": "{{counterWsID}}",
"Authorization": "Bearer {{counterToken}}",
"Content-Type": "application/json"
},
body: JSON.stringify({
"ticket": "1905ed1d-557b-4df6-b15f-7e04f7287192",
"comment": "He's gone."
}),
});
const data = await response.json();
console.log(data);
import requests
url = "{{server}}/api/v1/counter/closeTicket"
headers = {
"Accept": "application/json",
"X-WSID": "{{counterWsID}}",
"Authorization": "Bearer {{counterToken}}",
"Content-Type": "application/json"
}
payload = {
"ticket": "1905ed1d-557b-4df6-b15f-7e04f7287192",
"comment": "He's gone."
}
response = requests.post(url, headers=headers, json=payload)
print(response.status_code)
print(response.json())
Example
Example request
POST
{{server}}/api/v1/counter/closeTicketHeaders (2)
| Key | Value |
|---|---|
Accept | application/json |
X-WSID | {{counterWsID}} |
Body
{
"ticket": "1905ed1d-557b-4df6-b15f-7e04f7287192",
"comment": "He's gone."
}
Example response 204 No Content
No response body