Cancels an existing hotel booking by provider and reference, subject to provider policy and booking state.
Endpoint
| Method | Path | Auth |
|---|---|---|
DELETE | /v1/hotels/book/:gdsprovider/:reference | Required API key |
| Header | Description |
|---|---|
Authorization | Bearer <secret_key>. The secret is shown only once when the credential is created. |
X-Travelandz-Id | <public_key>:<profile_code>. The profile_code is the dp_-prefixed Developer Profile code shown in your dashboard. This binds the request to a profile and credential. |
Content-Type | Use application/json for requests with a body. |
Request Params Schema
gdsproviderreferenceRequest Body
No request body is required.
Success Response
Returns cancellation status and provider confirmation when available.
Errors
| Status | Code | Case |
|---|---|---|
400 | hotel_booking_already_cancelled | Booking was already cancelled. |
400 | unable_to_perform_hotel_booking_cancellation | Provider could not cancel. |
404 | hotel_booking_not_found | Booking was not found. |
401/403 | auth codes | Invalid credentials. |
500 | - | Internal error. |
Example
bash
curl -X DELETE https://api.sandbox.travelandz.com/v1/hotels/book/:gdsprovider/:reference \
-H "Authorization: Bearer $TRAVELANDZ_SECRET_KEY" \
-H "X-Travelandz-Id: $TRAVELANDZ_PUBLIC_KEY:$TRAVELANDZ_PROFILE_CODE"Responses
| Code | Description |
|---|---|
204 | Booking cancelled successfully |