Skip to content
ApiqDevelopers
API v1.64.0Open console

Amend order

POST/v1/orders/{orderRef}/amend
Idempotency-Key requiredAccepts X-Api-Key · oauthClientCredentials · bearer

Two-phase amend in one endpoint

mode QUOTE returns amendRef + delta price; mode COMMIT with amendRef executes.Show moremode QUOTE returns amendRef + delta price; mode COMMIT with amendRef executes. Covers date shift, exchange, name correction, and post-booking ancillary adds (amendType ADD_ANCILLARY) plus document resubmission (VISA ADD_DOCUMENT). 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

  • orderRefstringRequired
    MO-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 moreRedeemed 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 moreMandatory 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

  • contextMondeeContextRequired
    Request 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 moreCanonical 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.
    • actionstringOptional
      Mirrors the verb; optional (server sets from route)
    • enricharray of stringOptional
      Opt-in enrichment on shopping answers: EMISSIONS | RATINGS | AMENITIES | ROUTE.Show moreOpt-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_idstringOptional
      Your own id for the user session the call belongs to.
    • transaction_idstringOptional
      Constant across one shop-to-book journey
    • currencystringOptional
      ISO-4217; absent = tenant default; blank/invalid = 400
    • localestringOptional
      The language and region for text in the answer, as a BCP 47 tag (for example en-US).
    • posstringOptional
      Point-of-sale market, orthogonal to tenant
    • clientReferencestringOptional
      Caller's own id; searchable; the reconciliation primitive
    • fareSourcePolicystringOptional
      BYOC 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 moreAsk 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 morecontext.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
      • viewstringOptional
        SELECTED (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 moreHow 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 stringOptional
        Supplier codes as in fareSource.supplier, most preferred first (PREFERRED_SUPPLIERS)
      • excludeSuppliersarray of stringOptional
        Supplier 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 moreWho 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
      • customerIdstringOptional
        A customer or traveller id your own system knows.
      • travelerstringOptional
        Free-text traveller identity when there is no customer id.Show moreFree-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
      The amend intent, typed in v1.7.0 as built (EngineIntent): mode QUOTE | COMMIT, amendType (required on both), amendRef (required on COMMIT), itemIds (the lines to amend; absent = the whole order) and…Show moreThe amend intent, typed in v1.7.0 as built (EngineIntent): mode QUOTE | COMMIT, amendType (required on both), amendRef (required on COMMIT), itemIds (the lines to amend; absent = the whole order) and changes (the values a QUOTE asks for). Open: a per-domain key the platform does not know is ignored.
      6 child attributes
      • modestringOptional
        QUOTE | COMMIT; open string
      • amendTypestringOptional
        One of the product's capabilities verbs.amend.amendTypes (FNB DATE_SHIFT)
      • amendRefstringOptional
        From the QUOTE answer; required on COMMIT
      • itemIdsarray of stringOptional
      • changesAmendChangesOptional
        The values an amend QUOTE asks for beside its amendType.Show moreThe values an amend QUOTE asks for beside its amendType. A flat object of scalars: anything else is 400 VALIDATION details.field message.intent.changes. FNB (DATE_SHIFT): `dateTime` (restaurant-local yyyy-MM-ddTHH:mm) or `date` + `time`, and/or `partySize`; at least one must differ from the booking, or the amend is 400 VALIDATION. A COMMIT sends no changes: what it executes travels in the amendRef. Other domains add keys additively.
        4 child attributes
        • dateTimestringOptional
        • datestring · dateOptional
        • timestringOptional
        • partySizeintegerOptional
      • paymentobjectOptional
        v1.7.0 (CARDS lane): the card for an amend whose target slot is card-secured.Show morev1.7.0 (CARDS lane): the card for an amend whose target slot is card-secured. The token is never stored, so nothing carries over from QUOTE to COMMIT: the client MAY send it on the QUOTE, where it is only validated and then dropped (warning <SUPPLIER>_CARD_TOKEN_UNUSED), and the COMMIT MUST carry message.intent.payment.paymentMethod again. A COMMIT to a card-secured target without it is refused: 400 VALIDATION details.reason PAYMENT_METHOD_REQUIRED when the supplier can take a token on a modify (resend with one), or 409 CONFLICT details.reason CARD_SECURED_SLOT_NOT_AMENDABLE when it cannot (In-House capture, an experience slot): cancel and rebook instead. Nothing is sent to the supplier in either case. The QUOTE answer's message.targetSlot.creditCardRequired says whether the COMMIT needs it.
        1 child attribute
        • paymentMethodPaymentMethodTokenOptional
          A card the CLIENT tokenised with the payment-method vault.Show moreA card the CLIENT tokenised with the payment-method vault. TOKEN ONLY: this object has no field for a card number, an expiry or a security code, and the platform never receives, stores or logs one. The client collects the card in the vault's own iframe (Spreedly iFrame or Express), receives a payment-method token and sends it here; the platform passes the token to the supplier (Example Dining's credit_card object) and keeps only provider, brand and last4 on the order. A digit run that looks like a card number in ANY field of the request is 400 VALIDATION details.reason INSTRUMENT_DATA_REFUSED (PanGuard), and the token itself is never echoed or logged. threeDs is sent only on the RETRY of an order the supplier refused with details.reason SCA_REQUIRED: the same token plus the result of the 3-D Secure challenge the client ran with the vault.

Responses

  • 200Quote (amendRef + delta) or commit resultAmendResponse
  • 202
    AMBIGUOUS_RESULT: book timed out upstream; order persisted PENDING_RECONCILIATION; poll the order or await order.state_changed.Show moreAMBIGUOUS_RESULT: book timed out upstream; order persisted PENDING_RECONCILIATION; poll the order or await order.state_changed. Never re-book on a different key.
    OrderResponse
  • 307
    HOME_REGION_REDIRECT: this tenant's writer region is not the region that received the request.Show moreHOME_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
  • 401
    UNAUTHENTICATED — missing or expired token.Show moreUNAUTHENTICATED — 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.
    ApiErrorResponse
  • 403ApiErrorResponse
  • 404NOT_FOUND — unknown or expired ref (unguessable refs, 15)ApiErrorResponse
  • 405
    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 moreVALIDATION — 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.
    ApiErrorResponse
  • 409
    QUOTE_EXPIRED — commit past validity | PRICE_CHANGED — the supplier moved the amendment's price at COMMIT; both figures in details, re-quote | CONFLICT — the order's state forbids an amendment…Show moreQUOTE_EXPIRED — commit past validity | PRICE_CHANGED — the supplier moved the amendment's price at COMMIT; both figures in details, re-quote | CONFLICT — the order's state forbids an amendment (details.state; an order that is over or PENDING_RECONCILIATION) | IDEMPOTENCY_CONFLICT | IDEMPOTENCY_IN_PROGRESS. Both modes take an Idempotency-Key; a QUOTE sends a fresh one.
    ApiErrorResponse
  • 413
    VALIDATION — the request body is larger than the surface's limit.Show moreVALIDATION — 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.
    ApiErrorResponse
  • 414
    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 moreVALIDATION — 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.
    ApiErrorResponse
  • 415
    VALIDATION — a request body that is not JSON (application/json or application/*+json; a form body only on the OAuth token routes).Show moreVALIDATION — 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.
    ApiErrorResponse
  • 500INTERNAL — a bug, and traceId is the support handle.ApiErrorResponse
  • 501
    NOT_IMPLEMENTED — honest fallback; every production 501 is a capabilities-doc bug.Show moreNOT_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.
    ApiErrorResponse
  • 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.

400VALIDATION
message.intent.checkOut must be after message.intent.checkIn
not retryable
400UNKNOWN_DOMAIN
Unknown domain 'HOTELS'. Did you mean HTL?
not retryable
401UNAUTHENTICATED
The bearer token is expired. Re-authenticate and retry.
not retryable
403PERMISSION_DENIED
Role lacks the required scope: booking:write
not retryable
403TAB_DISABLED
Tenant acme-travel is not entitled to sell CRU
not retryable
403OUT_OF_SCOPE
The token's scope ladder does not reach this customer subtree
not retryable
403TENANT_MISMATCH
orderRef MO-8KD-2FQ-9XT does not belong to tenant acme-travel
not retryable
404NOT_FOUND
searchRef SR-F-7b31d0a9 is unknown or has expired; re-search
not retryable
405VALIDATION
This method is not served.
not retryable
409PRICE_CHANGED
The amendment's price moved since the quote. Nothing was changed; re-quote.
not retryable
409CONFLICT
Order MO-8KD-2FQ-9XT is CANCELLED and cannot be amended.
not retryable
409IDEMPOTENCY_CONFLICT
Idempotency-Key 7f0c33d1-9a1e-4d2c-9f77-1c0f2b3a4d55 was used with a different body; never executed
not retryable
409IDEMPOTENCY_IN_PROGRESS
A request with this Idempotency-Key is still executing
retryable
409QUOTE_EXPIRED
amendRef AM-H-30cc91 was valid until 2026-09-14T17:36:02Z; re-quote
not retryable
413VALIDATION
The request body is larger than this API accepts (262144 bytes).
not retryable
414VALIDATION
The request URI is longer than 8 KiB.
not retryable
415VALIDATION
Send application/json.
not retryable
500INTERNAL
An unexpected error occurred. Quote the traceId to support.
retryable
501NOT_IMPLEMENTED
seatmap is NOT_APPLICABLE for HTL; GET /v1/capabilities says so
not retryable
502UPSTREAM_UNAVAILABLE
Every supplier for HTL is circuit-open; no fan-out was attempted
retryable
503PROVIDER_DOWN
EXAMPLEHOTELS is unavailable; the order was not attempted and nothing was captured
retryable