Skip to content
ajar.Get started

Reservation cancel

booking.reservation.cancel

View connector

Cancel a reservation at the confirmed fee

POST /v1/operations/booking.reservation.cancel

Headers

Authorization: Bearer YOUR_CONNECTOR_TOKEN
x-booking-token: YOUR_BOOKING_TOKEN
x-idempotency-key: YOUR_UNIQUE_ATTEMPT_KEY
Content-Type: application/json

x-idempotency-key identifies one intended action. Generate a unique value, such as crypto.randomUUID(), before sending it. Use 1–128 letters, numbers, hyphens, underscores or periods. A duplicate attempt is rejected; it does not return a cached success. If a request times out, check the provider’s state before starting a new attempt with a new key. See the idempotency guide.

Use your connector bearer token and caller-held guest token in x-booking-token.

Inputs

ParameterExample typeExample value
cancellation_refstring"fictional-cancellation-ref"
confirm_cancelbooleantrue

Example input

{
  "cancellation_ref": "fictional-cancellation-ref",
  "confirm_cancel": true
}
Open JSON schema

Input schema

{
  "$id": "https://useajar.com/schemas/booking/reservation-cancel.input.schema.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "cancellation_ref": {
      "maxLength": 128,
      "minLength": 1,
      "type": "string"
    },
    "confirm_cancel": {
      "const": true
    }
  },
  "required": [
    "cancellation_ref",
    "confirm_cancel"
  ],
  "type": "object"
}