Skip to main content

Endpoint

POST /api/cancel

Authentication

  • Required header: api-key: <partner-api-key>
  • Required body field: settings.access.code

Headers

HeaderRequiredDescription
Content-TypeYesapplication/json
api-keyYesPartner API key
connection-codeOptionalAuto-filled from body
session-idOptionalAuto-generated if missing

Request Body

Top-level fields

FieldTypeRequiredNotes
inputobjectYesCancel input
settingsobjectYesMust include access.code

input fields

FieldTypeRequiredNotes
accommodation.typestringNoOptional, currently not used in cancel logic
accommodation.codestringNoOptional, currently not used in cancel logic
languagestringNoOptional
reference.bookingReferencestringYesBooking reference to cancel

Example Request

{
  "input": {
    "reference": {
      "bookingReference": "BK_EXAMPLE_001"
    },
    "language": "EN"
  },
  "settings": {
    "access": {
      "code": 10001
    }
  }
}

Success Response

{
  "data": {
    "status": "cancelled",
    "cancelledAt": "2026-02-11T18:46:12.201Z"
  },
  "message": "success"
}

Response Fields

FieldTypeNotes
data.statusstringcancelled
data.cancelledAtdatetimeCancellation timestamp
data.cancelLocatorstringOptional (reserved)
data.referenceobjectOptional (reserved)
data.bookPriceobjectOptional (reserved)
data.cancelPriceobjectOptional (reserved)

Cancellation Rules Enforced by Backend

  • Connection code must belong to current partner
  • Booking must exist
  • Booking must belong to current partner
  • Booking status must be success before cancel
  • Cancel is rejected on/after check-in date
  • Booking must be refundable according to stored cancellation policy

Common Errors

  • 400 bookingReference is required for cancellation
  • 400 Booking cannot be cancelled. Current status: ...
  • 400 This booking can no longer be cancelled after the check-in date
  • 400 Cancellation policy not found for this booking
  • 400 This booking is not refundable according to the cancellation policy
  • 403 Invalid connection code.
  • 403 This booking does not belong to the current partner
  • 404 Booking not found with bookingReference: ...