The "Canceling a booking" API allows users to cancel an existing booking.
Usage
Base URL
https://<workspace>.neetocal.com/api/external/v1
Replace the <workspace>
with your workspace's subdomain.
Endpoint
POST /bookings/<booking_sid>/cancel
Replace the <booking_sid>
with the booking SID that you want to cancel.
Request header
This endpoint requires authentication. You must include a valid API key in the request header.
Header |
Type |
Required |
Description |
---|---|---|---|
X-Api-Key |
String |
Yes |
Bearer token for API access. |
Request body
Key |
Type |
Required |
Description |
---|---|---|---|
|
String |
No |
The reason for cancelling the booking. |
Example
For rescheduling a booking with sid uyn96hk
, of workspce "Spinkart" with subdomain spinkart
using curl
curl --request POST \
--url 'http://spinkart.lvh.me:9026/api/external/v1/bookings/a62mrvb/cancel' \
--header 'X-Api-Key: YOUR_API_KEY' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data 'cancel_reason=I have to go somewhere else'
Response Codes
Code |
Description |
---|---|
200 |
OK - Request succeeded |
400 |
Bad Request - Missing/Invalid parameters |
401 |
Unauthorized - Invalid API key |
500 |
Internal server error |