8 · Cancel
Cancel a booking.
Only Kitionz Test Air cancels a booked flight through the API today. With your Live suppliers, cancelling a CONFIRMED or HELD booking is refused: contact the seller named in the booking’s seller. Withdrawing a PENDING_FULFILMENT request works with every supplier, Live included (no supplier call).
What: cancels a CONFIRMED or HELD booking with the supplier, or withdraws a PENDING_FULFILMENT request.
When: the customer cancels before travel.
Answers — the booking is cancelled only when status is CANCELLED:
200— done: the booking isCANCELLED(also when you ask again for a booking already cancelled: no second supplier call).202— the supplier accepted the cancellation but has not finished it: the booking keeps its status for now; read it later.422 CANCEL_REFUSED— the supplier said no. The booking keeps its status and its ticket.422 CANCEL_WITH_SUPPLIER— this supplier does not take cancellations through Kitionz: contact the seller named in the booking’sseller.409 BOOKING_NOT_CANCELLABLE— the booking’s status has nothing to cancel (for exampleFAILED, or stillPENDING_CONFIRMATION).
Authentication
Your Kitionz API key, sent as Authorization: Bearer keyId:secret. Create a Test key at sandbox.kitionz.com → API keys, a Live key at kitionz.com → API → API keys.
Path parameters
Headers
A new unique value (a UUID) for every write: one booking, one cancel. Save it with your order before you call. Send the SAME value again only when you send the SAME request again after a timeout: you get the first answer back. Reusing it on any other write answers 422 IDEMPOTENCY_KEY_REUSED_WITH_DIFFERENT_PARAMS.
Response
A full persisted booking (passengers, segments, events, amounts, status).