API referenceorders
Cancel order
POST
/v1/orders/{orderRef}/cancelIdempotency-Key requiredAccepts X-Api-Key · oauthClientCredentials · bearer
Cancel; optional cancelQuoteRef guarantees the quoted penalty until validUntil
Consent-first cancel: send intent.acceptedPenalty from the cancel-quote.Show more
Consent-first cancel: send intent.acceptedPenalty from the cancel-quote. Single use, retried with the same Idempotency-Key. Human sessions and system keys are exempt; an ai key and every service token are the AI channel.Path parameters
- orderRefstringRequiredMO-XXX-XXX-XXX; BK- retained as read alias
Headers
- X-Approval-TokenstringOptional
Redeemed by the payment verbs and by POST /v1/orders (orders.create), cancel (orders.cancel) and amend COMMIT (amend.commit).Show more
Redeemed by the payment verbs and by POST /v1/orders (orders.create), cancel (orders.cancel) and amend COMMIT (amend.commit). Human sessions and system keys are exempt. Single use, ~2 min TTL, bound to tenant + action + resource + amount; any drift fails closed and burns the token. - Idempotency-KeystringRequired
Mandatory on mutations: **48h TTL**; replay with same body-hash returns the original response with Idempotency-Replayed true; same key + different body is 409 IDEMPOTENCY_CONFLICT; in-flight duplicate…Show more
Mandatory on mutations: **48h TTL**; replay with same body-hash returns the original response with Idempotency-Replayed true; same key + different body is 409 IDEMPOTENCY_CONFLICT; in-flight duplicate is 409 IDEMPOTENCY_IN_PROGRESS.
Request body
- contextMondeeContextRequiredRequest context envelope. domain selects the product; URL carries the verb.
13 child attributes
- domainstringRequired
Canonical code or alias per the domain registry; unknown = 400 UNKNOWN_DOMAIN.Show more
Canonical code or alias per the domain registry; unknown = 400 UNKNOWN_DOMAIN. APTSVC (airport services: meet and assist, porter, buggy, wheelchair, concierge bundles) is registered by this release beside FASTTRK. FNB (dining: restaurant reservations; aliases REST, DINING, RESTAURANT, RESTAURANTS; category DO, money model FREE, artifact CONF_NUMBER, served under the dining service key with base path /v1/dining) is registered since v1.7.0. GIFT (gift cards; category SUPPORT, money model MERCHANT, artifact VOUCHER, served under the gift-cards service key with base path /v1/gift-cards) is described from v1.31.0: until the backend seam change merges, domain GIFT answers 400 UNKNOWN_DOMAIN. AICONT (the Example Content experience-scraping service's operations; category DO, money model MERCHANT, artifact NONE, served under the aicont service key with base path /v1/aicont; a content supplier) has its typed intent from v1.39.0; it answers only where its supplier set is landed and ACTIVE. PARK (airport and cruise-port parking; aliases PRK and PARKING; category SUPPORT, money model MERCHANT, artifact CONF_NUMBER — the supplier's gate barcode is the order's BARCODE document — served under the parking service key with base path /v1/parking) has its typed intent and its verb book from v1.55.0. - actionstringOptionalMirrors the verb; optional (server sets from route)
- enricharray of stringOptional
Opt-in enrichment on shopping answers: EMISSIONS | RATINGS | AMENITIES | ROUTE.Show more
Opt-in enrichment on shopping answers: EMISSIONS | RATINGS | AMENITIES | ROUTE. Absent = the tenant's configured default. Decoration reads cache or the pre-warmed store only and never delays the verb. - session_idstringOptionalYour own id for the user session the call belongs to.
- transaction_idstringOptionalConstant across one shop-to-book journey
- currencystringOptionalISO-4217; absent = tenant default; blank/invalid = 400
- localestringOptionalThe language and region for text in the answer, as a BCP 47 tag (for example en-US).
- posstringOptionalPoint-of-sale market, orthogonal to tenant
- clientReferencestringOptionalCaller's own id; searchable; the reconciliation primitive
- fareSourcePolicystringOptionalBYOC tenants only; narrows, never widens, the configured strategy
- DEFAULT
- OWN_ONLY
- MONDEE_ONLY
- BLEND
- includeUpstreambooleanOptionalDefault false
Ask for the supplier's own answer, verbatim, beside what the platform read from it: Offer.upstream on every offer of a search, poll, detail or flight-returns answer, AirReturnOption.upstream on each…Show more
Ask for the supplier's own answer, verbatim, beside what the platform read from it: Offer.upstream on every offer of a search, poll, detail or flight-returns answer, AirReturnOption.upstream on each listed return, RepriceResponse.message.upstream and OrderItem.upstream. Served only where the deployment enables upstream pass-through; elsewhere a true value is 400 VALIDATION details.reason UPSTREAM_PASS_THROUGH_DISABLED, details.field context.includeUpstream, before any supplier call. Absent or false, nothing changes. The block is informational: offerRef, repriceRef and price stay the only handles and the only price of record. - selectionSelectionPreferencesOptional
context.selection: the caller's offer-selection preferences for this search.Show more
context.selection: the caller's offer-selection preferences for this search. Each field set here replaces the tenant's and the platform's for this search, within the caller's entitlements and the platform's ceilings, unless the tenant has locked request overrides. It never widens reach: a preferred supplier the caller may not reach is ignored with context.warnings[] SELECTION_PREFERENCE_IGNORED. Ignored where selection is off.4 child attributes
- viewstringOptionalSELECTED (one entry per item, alternatives under the winner) or ALL (the flat list, tagged)
- SELECTED
- ALL
- objectivestringOptional
How the winner of an item is picked. CHEAPEST is the lowest comparison total; REFUNDABLE_FIRST the lowest total among offers free to cancel now (else CHEAPEST); PREFERRED_SUPPLIERS the first of…Show more
How the winner of an item is picked. CHEAPEST is the lowest comparison total; REFUNDABLE_FIRST the lowest total among offers free to cancel now (else CHEAPEST); PREFERRED_SUPPLIERS the first of preferSuppliers with an offer inside the tenant's preference band (else CHEAPEST); PLATFORM_DEFAULT defers to the tenant and platform policies. Any other value is 400 VALIDATION details.field context.selection.objective.- CHEAPEST
- REFUNDABLE_FIRST
- PREFERRED_SUPPLIERS
- PLATFORM_DEFAULT
- preferSuppliersarray of stringOptionalSupplier codes as in fareSource.supplier, most preferred first (PREFERRED_SUPPLIERS)
- excludeSuppliersarray of stringOptionalSupplier codes whose offers this search does not show; narrows only
- onBehalfOfOnBehalfOfOptional
Who a desk or agent books FOR: stamped into the audit actor and the clientReference lineage of the order.Show more
Who a desk or agent books FOR: stamped into the audit actor and the clientReference lineage of the order. Send customerId (a customer or traveller id the tenant knows) or traveler (a free-text identity), or both. Attribution only: it grants nothing, and the credential's own actor is still what authorises the call. Audit mapping: the audit actor.onBehalfOf (a string) is customerId when present, otherwise "traveler:<redacted-hash>" (a stable hash of traveler, never the text).2 child attributes
- customerIdstringOptionalA customer or traveller id your own system knows.
- travelerstringOptional
Free-text traveller identity when there is no customer id.Show more
Free-text traveller identity when there is no customer id. Personal data: it is logged redacted, never in clear. A card number in it is 400 VALIDATION details.reason INSTRUMENT_DATA_REFUSED.
- messageobjectRequired
1 child attribute
- intentobjectOptional
Consent-first: acceptedPenalty is the penalty the traveller agreed to, from the cancel-quote.Show more
Consent-first: acceptedPenalty is the penalty the traveller agreed to, from the cancel-quote. A cancel without it cancels nothing and is answered 409 PENALTY_CHANGED with details.penalty (the current one) and details.requoteRequired true; a current penalty other than the accepted one is the same 409 with details.previousPenalty.4 child attributes
- cancelQuoteRefstringOptionalFrom POST /v1/orders/{orderRef}/cancel-quote; guarantees its penalty until validUntil
- acceptedPenaltyMoneyOptionalInteger minor units + ISO-4217, never floats (platform law)
5 child attributes
- amountintegerRequiredMinor units
- currencystringRequiredISO-4217
- fxAppliedbooleanOptionalTrue when the amount was converted from the supplier's currency.
- fxSnapshotIdstringOptionalThe exchange-rate snapshot the amount was converted with, fixed when the price was quoted.
- breakdownarray of PriceBreakdownLineOptional
Sell-side component lines summing to amount; the platform may send it empty.Show more
Sell-side component lines summing to amount; the platform may send it empty. One line shape everywhere — the same PriceBreakdownLine the rule simulation answers. Never carries a supplier net.
- itemIdsarray of stringOptionalLines to cancel (a partial cancel where the rate allows it); absent = the whole order
- reasonCodestringOptionalOpen string; the cancel-reasons lookup type is
Responses
- 200Cancellation result; refunds appear on the order's refunds[] blockOrderResponse
- 202OrderResponse
AMBIGUOUS_RESULT: book timed out upstream; order persisted PENDING_RECONCILIATION; poll the order or await order.state_changed.Show more
AMBIGUOUS_RESULT: book timed out upstream; order persisted PENDING_RECONCILIATION; poll the order or await order.state_changed. Never re-book on a different key. - 307
HOME_REGION_REDIRECT: this tenant's writer region is not the region that received the request.Show more
HOME_REGION_REDIRECT: this tenant's writer region is not the region that received the request. Nothing was executed at this region. There is no body. Clients MUST NOT auto-follow this redirect: a cross-origin redirect makes most HTTP stacks drop the Authorization header, and some drop Location altogether. The client MUST re-send the same request (method and body unchanged) to Location WITH its credentials and the SAME Idempotency-Key. Follow-up sends are deduplicated on the Idempotency-Key in the home region. - 400VALIDATION or UNKNOWN_DOMAINApiErrorResponse
- 401ApiErrorResponse
UNAUTHENTICATED — missing or expired token.Show more
UNAUTHENTICATED — missing or expired token. Declared on every operation because `security` is declared globally at the document root: every route is authenticated, so every route can answer 401. - 403ApiErrorResponse
- 404NOT_FOUND — unknown or expired ref (unguessable refs, 15)ApiErrorResponse
- 405ApiErrorResponse
VALIDATION — the public edge serves GET, POST, PUT, PATCH and DELETE only; any other method is refused before the platform sees it (details.reason METHOD_NOT_ALLOWED, details.source edge).Show more
VALIDATION — the public edge serves GET, POST, PUT, PATCH and DELETE only; any other method is refused before the platform sees it (details.reason METHOD_NOT_ALLOWED, details.source edge). Not retryable as sent. - 409ApiErrorResponse
PENALTY_CHANGED | CONFLICT. PENALTY_CHANGED — the penalty moved against the one the client accepted, or (details.reason CONTRADICTS_BOOKED_TERMS) the supplier's penalty contradicts the cancellation…Show more
PENALTY_CHANGED | CONFLICT. PENALTY_CHANGED — the penalty moved against the one the client accepted, or (details.reason CONTRADICTS_BOOKED_TERMS) the supplier's penalty contradicts the cancellation terms the order was booked on, before any consent is read. CONFLICT — the order's state forbids a cancel: it is over, it has no supplier locator yet, or it is PENDING_RECONCILIATION (details.state names it). A cancel sent without intent.acceptedPenalty cancels nothing: it is PENALTY_CHANGED with details.penalty (the current penalty) and requoteRequired true, so consent always comes first. QUOTE_EXPIRED — the cancelQuoteRef is past its validUntil; re-quote. IDEMPOTENCY_CONFLICT | IDEMPOTENCY_IN_PROGRESS. - 413ApiErrorResponse
VALIDATION — the request body is larger than the surface's limit.Show more
VALIDATION — the request body is larger than the surface's limit. Not retryable as sent: shrink the body. Declared on every operation that takes a request body. details carries exactly one key, maxBodyBytes (integer): the limit that applies to this surface, in bytes. - 414ApiErrorResponse
VALIDATION — the request URI (path and query string) is longer than 8 KiB; the public edge refuses it before the platform sees it (details.reason URI_TOO_LONG, details.source edge).Show more
VALIDATION — the request URI (path and query string) is longer than 8 KiB; the public edge refuses it before the platform sees it (details.reason URI_TOO_LONG, details.source edge). Not retryable as sent: send long input in the body of a POST. - 415ApiErrorResponse
VALIDATION — a request body that is not JSON (application/json or application/*+json; a form body only on the OAuth token routes).Show more
VALIDATION — a request body that is not JSON (application/json or application/*+json; a form body only on the OAuth token routes). The public edge refuses it before the platform sees it (details.reason UNSUPPORTED_MEDIA_TYPE, details.source edge). Not retryable as sent: send Content-Type application/json. Declared on every operation that takes a JSON request body. - 423ApiErrorResponse
PERMISSION_DENIED with details.reason KEY_PAUSED: the API key is PAUSED and every call with it is refused until an Owner or Admin resumes it (POST /v1/keys/{keyPrefix}:resume, a person only); or…Show more
PERMISSION_DENIED with details.reason KEY_PAUSED: the API key is PAUSED and every call with it is refused until an Owner or Admin resumes it (POST /v1/keys/{keyPrefix}:resume, a person only); or details.reason LOOP_DETECTED on the call whose loop paused the key (20 identical requests in 60 s, or 50 holds without a booking or release in 10 min; replays of one Idempotency-Key never count). Not retryable; nextAction stop — the agent stops using the key and tells the person; details carry resumeBy (owner), consoleLink and evidence (ApiKeyPauseEvidence). Nothing was charged, held or sent; holds and orders already made are untouched. A key whose ancestor (the key that minted it, or that key's minter) is PAUSED answers the same 423 KEY_PAUSED, and resuming the ancestor resumes it, so a child never outlasts a pause of its parent. The MCP plane answers the identical body as an isError result. Any key-authenticated route may answer it; it is declared on the order and hold writes, search, reprice and the key routes. - 429ApiErrorResponse
RATE_LIMITED with details.reason VELOCITY_LIMIT: a soft breach of the API key's own scope (reqPerSec, holdsPerHour, cancelsPerDay, lookToBook, spendPerDay) — the first two in 24 hours; the third, or a…Show more
RATE_LIMITED with details.reason VELOCITY_LIMIT: a soft breach of the API key's own scope (reqPerSec, holdsPerHour, cancelsPerDay, lookToBook, spendPerDay) — the first two in 24 hours; the third, or a burst above 5× the limit, pauses the key instead (423 KeyPaused). Retryable after retryAfterMs (mirrored by Retry-After); nextAction slow_down; details carry limit, windowSeconds and the dimension in details.field. The tenant quota of RateLimited and the key's velocity are separate limits. Every call of a minted key also counts against each ancestor key's velocity and spend windows, so minting N children never multiplies the blast radius; spendPerDay is reserved atomically before the order is placed and released if it fails. - 500ApiErrorResponse
INTERNAL — a bug, traceId the support handle; or, on this verb, details.reason FX_SNAPSHOT_UNAVAILABLE: the supplier stated the servicing figures in a currency the order's own booked FX snapshot…Show more
INTERNAL — a bug, traceId the support handle; or, on this verb, details.reason FX_SNAPSHOT_UNAVAILABLE: the supplier stated the servicing figures in a currency the order's own booked FX snapshot cannot convert to the order's currency, so they are not shown in another currency (drop-and-count) and nothing is cancelled: the refusal comes before any supplier commit. Not retryable: a retry reads the same booked snapshot. - 501ApiErrorResponse
NOT_IMPLEMENTED — honest fallback; every production 501 is a capabilities-doc bug.Show more
NOT_IMPLEMENTED — honest fallback; every production 501 is a capabilities-doc bug. Also the order read routes (getOrder, listOrderDocuments, listOrderEvents, searchOrders) on a deployment with no order reader assembled; not retryable. - 502Also the order read routes (getOrder, listOrderDocuments, listOrderEvents, searchOrders) when the order store times out: details.store names the store, retryable true.ApiErrorResponse
- 503ApiErrorResponse
Errors you should handle
Branch on code and honour retryable — never on the HTTP status alone.
| 400 | VALIDATION message.intent.checkOut must be after message.intent.checkIn | not retryable |
| 400 | UNKNOWN_DOMAIN Unknown domain 'HOTELS'. Did you mean HTL? | not retryable |
| 401 | UNAUTHENTICATED The bearer token is expired. Re-authenticate and retry. | not retryable |
| 403 | PERMISSION_DENIED Role lacks the required scope: booking:write | not retryable |
| 403 | TAB_DISABLED Tenant acme-travel is not entitled to sell CRU | not retryable |
| 403 | OUT_OF_SCOPE The token's scope ladder does not reach this customer subtree | not retryable |
| 403 | TENANT_MISMATCH orderRef MO-8KD-2FQ-9XT does not belong to tenant acme-travel | not retryable |
| 404 | NOT_FOUND searchRef SR-F-7b31d0a9 is unknown or has expired; re-search | not retryable |
| 405 | VALIDATION This method is not served. | not retryable |
| 409 | PENALTY_CHANGED Accept the current cancellation penalty to cancel. Nothing was cancelled. | not retryable |
| 409 | QUOTE_EXPIRED cancelQuoteRef CQ-H-77b301 was valid until 2026-09-14T17:36:02Z; re-quote before cancelling | not retryable |
| 409 | IDEMPOTENCY_CONFLICT Idempotency-Key 7f0c33d1-9a1e-4d2c-9f77-1c0f2b3a4d55 was used with a different body; never executed | not retryable |
| 409 | IDEMPOTENCY_IN_PROGRESS A request with this Idempotency-Key is still executing | retryable |
| 409 | CONFLICT This order is CANCELLED, so there is nothing left to cancel. Nothing was sent to the supplier and the order is unchanged. | not retryable |
| 413 | VALIDATION The request body is larger than this API accepts (262144 bytes). | not retryable |
| 414 | VALIDATION The request URI is longer than 8 KiB. | not retryable |
| 415 | VALIDATION Send application/json. | not retryable |
| 423 | PERMISSION_DENIED This API key is paused: 212 holds in 9 min. An Owner or Admin must resume it in the console. | not retryable |
| 429 | RATE_LIMITED This API key exceeded its rate: 10 requests a second. Retry after 1.2 s. | retryable |
| 500 | INTERNAL An unexpected error occurred. Quote the traceId to support. | retryable |
| 501 | NOT_IMPLEMENTED seatmap is NOT_APPLICABLE for HTL; GET /v1/capabilities says so | not retryable |
| 502 | UPSTREAM_UNAVAILABLE Every supplier for HTL is circuit-open; no fan-out was attempted | retryable |
| 503 | PROVIDER_DOWN EXAMPLEHOTELS is unavailable; the order was not attempted and nothing was captured | retryable |