Delete appointment
DELETE
{{server}}/api/v1/appointment/bookingThis request deletes the reservation by the booking code.
Request
-
branch(string, required): Branch key -
bookingCode(string, required): Booking code -
verification(string, required): Verification code
Response
If the deletion was successful, it returns status 204.
Request
Authorization
| Header | Value |
|---|---|
Authorization | SmartToken {{smartToken}} |
Headers
| Key | Value |
|---|---|
Accept | application/json |
Body (json)
{
"branch": "{{branch}}",
"bookingCode": "918369",
"verification": "1967c573-89d7-6f2e-bbcd-0fe2f7117e7b"
}
Code snippets
- cURL
- JavaScript
- Python
curl -X DELETE '{{server}}/api/v1/appointment/booking' \
-H 'Accept: application/json' \
-H 'Authorization: SmartToken {{smartToken}}' \
-H 'Content-Type: application/json' \
-d '{
"branch": "{{branch}}",
"bookingCode": "918369",
"verification": "1967c573-89d7-6f2e-bbcd-0fe2f7117e7b"
}'
const response = await fetch("{{server}}/api/v1/appointment/booking", {
method: "DELETE",
headers: {
"Accept": "application/json",
"Authorization": "SmartToken {{smartToken}}",
"Content-Type": "application/json"
},
body: JSON.stringify({
"branch": "{{branch}}",
"bookingCode": "918369",
"verification": "1967c573-89d7-6f2e-bbcd-0fe2f7117e7b"
}),
});
const data = await response.json();
console.log(data);
import requests
url = "{{server}}/api/v1/appointment/booking"
headers = {
"Accept": "application/json",
"Authorization": "SmartToken {{smartToken}}",
"Content-Type": "application/json"
}
payload = {
"branch": "{{branch}}",
"bookingCode": "918369",
"verification": "1967c573-89d7-6f2e-bbcd-0fe2f7117e7b"
}
response = requests.delete(url, headers=headers, json=payload)
print(response.status_code)
print(response.json())
Example
Example request
DELETE
{{server}}/api/v1/appointment/bookingHeaders (1)
| Key | Value |
|---|---|
Accept | application/json |
Body
{
"branch": "{{branch}}",
"bookingCode": "918369",
"verification": "1967c573-89d7-6f2e-bbcd-0fe2f7117e7b"
}
Example response 204 No Content
No response body