Delete ticket
DELETE
{{server}}/api/v1/smart/ticketThis request deletes the ticket. The customer can add a comment free-text as the reason of deletion in the comment field in the body. If the deletion was success, it returns status 204
Request
Authorization
| Header | Value |
|---|---|
Authorization | SmartToken {{smartToken}} |
Headers
| Key | Value |
|---|---|
Accept | application/json |
Body (json)
{
"comment": "Too long waiting"
}
Code snippets
- cURL
- JavaScript
- Python
curl -X DELETE '{{server}}/api/v1/smart/ticket' \
-H 'Accept: application/json' \
-H 'Authorization: SmartToken {{smartToken}}' \
-H 'Content-Type: application/json' \
-d '{
"comment": "Too long waiting"
}'
const response = await fetch("{{server}}/api/v1/smart/ticket", {
method: "DELETE",
headers: {
"Accept": "application/json",
"Authorization": "SmartToken {{smartToken}}",
"Content-Type": "application/json"
},
body: JSON.stringify({
"comment": "Too long waiting"
}),
});
const data = await response.json();
console.log(data);
import requests
url = "{{server}}/api/v1/smart/ticket"
headers = {
"Accept": "application/json",
"Authorization": "SmartToken {{smartToken}}",
"Content-Type": "application/json"
}
payload = {
"comment": "Too long waiting"
}
response = requests.delete(url, headers=headers, json=payload)
print(response.status_code)
print(response.json())
Example
Example request
DELETE
{{server}}/api/v1/smart/ticketHeaders (1)
| Key | Value |
|---|---|
Accept | application/json |
Body
{
"comment": "Too long waiting"
}
Example response 204 No Content
No response body