Skip to main content
POST
First obtain a short-lived cancellation quote from POST /hotels/book/{booking_id}/cancellation-quote. Show its current penalty and policy to the user, then pass the returned quote_id to this endpoint. The cancel request also requires an Idempotency-Key; reuse the same key and body after an uncertain network result.

Request Example

Handle Cancellation State

Keep the returned booking_id and request ID in your support record. If the request returns CANCELLATION_PENDING, do not assume the booking is cancelled until status polling reports CANCELLED or another final state.
penalty_status: UNKNOWN means the supplier does not expose a reliably computable amount. Do not display it as zero. Accepting that quote explicitly acknowledges the uncertainty.
The OpenAPI section below documents the required booking ID, success response, and error response.

Authorizations

x-api-key
string
header
required

Environment-specific API key created in the Unifystays portal

Headers

Idempotency-Key
string
required

Unique key for this cancellation attempt.

X-Unifystays-Contract-Version
enum<string>
default:1

Hotel API contract version. Missing defaults to v1.

Available options:
1

Path Parameters

booking_id
string
required
Example:

"ubk_eGQ0dW9uV1Vi"

Body

application/json
cancellation_quote_id
string
required

Cancellation quote being explicitly accepted. Obtain it immediately beforehand from the cancellation-quote endpoint.

Response

contract_version
string
required
Example:

"1"

success
boolean
required
Example:

true

message
string
required
Example:

"Booking request accepted and is being processed."

data
object
required