Skip to content
ApiqDevelopers
API v1.64.0Open console
API referencepayments

Mint approval grant

POST/v1/approvals
Idempotency-Key requiredAccepts bearer

A money-touching action an AI caller asks for (booking, cancel, amend commit, payment confirm / capture / void / refund) is refused 403 PERMISSION_DENIED details.reason APPROVAL_REQUIRED until a HUMAN…Show moreA money-touching action an AI caller asks for (booking, cancel, amend commit, payment confirm / capture / void / refund) is refused 403 PERMISSION_DENIED details.reason APPROVAL_REQUIRED until a HUMAN approves it in a UI the platform controls. This route is where that human's approval becomes a grant: it mints a single-use token of about 2 minutes, bound to the tenant, the action, the resource and the exact amount, which the AI caller then presents as X-Approval-Token on the verb it binds, retried with the SAME Idempotency-Key. Any drift at redemption (another resource, another amount, another action) burns the token: 403 PERMISSION_DENIED APPROVAL_TOKEN_MISMATCH. HUMAN SESSION ONLY: an API key or a service token from POST /v1/oauth/token is 403 PERMISSION_DENIED details.reason SESSION_REQUIRED whatever its scopes, because the API surface never mints approval tokens for machine callers. An MCP grant-derived token is likewise 403 PERMISSION_DENIED details.reason SESSION_REQUIRED, details.credential mcp-grant: an agent acting for a human is never that human's session. The model can never mint. The minter must hold the permission the action needs: orders:write for orders.create, orders:cancel for orders.cancel, orders:amend for amend.commit, payments:write for payments.confirm, payments.capture, payments.void and payments.refund. The token value is returned once (Cache-Control no-store) and never logged; approvalTokenId is what audit rows and the approved action carry. The console's POST /admin/v1/approvals is the console spelling of the same mint. The caller's actor kind is bound to its credential, never to a request header. A mint is NOT replayed: re-sending a mint under an Idempotency-Key that already minted does not re-serve the token (a token value is returned exactly once). It answers 409 CONFLICT details.reason APPROVAL_ALREADY_MINTED, meaning mint again under a new key. The same key from a different user is 409 IDEMPOTENCY_CONFLICT.

Headers

  • 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

  • actionstringRequired
    The verb the grant unlocks. Open string; values today orders.create | orders.cancel | amend.commit | payments.confirm | payments.capture | payments.void | payments.refund.Show moreThe verb the grant unlocks. Open string; values today orders.create | orders.cancel | amend.commit | payments.confirm | payments.capture | payments.void | payments.refund. An unknown value is 400 VALIDATION.
  • resourceRefstringRequired
    The resource the verb acts on: the paymentId for payments.*, the repriceRef for orders.create, the orderRef for orders.cancel and amend.commit
  • amountMoneyRequired
    Integer minor units + ISO-4217, never floats (platform law)
    5 child attributes
    • amountintegerRequired
      Minor units
    • currencystringRequired
      ISO-4217
    • fxAppliedbooleanOptional
      True when the amount was converted from the supplier's currency.
    • fxSnapshotIdstringOptional
      The 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 moreSell-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.
      13 child attributes
      • typestringRequired
        The kind of line, for example BASE, TAX, FEE or DISCOUNT.
      • amountintegerRequired
        Minor units
      • feeTypestringOptional
        For FEE lines produced by a FEE_LINE rule — the tenant's fee label
      • labelstringOptional
        Display label in the request locale
      • taxComponentstringOptional
        For GST / TAX lines — CGST | SGST | IGST | UTGST | CESS | VAT | SALES_TAX | OCCUPANCY_TAX; open string
      • taxCodeTaxCodeOptional
        The statutory classification of a taxed line (SAC/HSN in India, VAT codes elsewhere)
        2 child attributes
        • schemestringRequired
          SAC | HSN | VAT | GST | OTHER; open string
        • codestringRequired
          The tax code, for example a SAC or HSN code in India or a VAT code elsewhere.
      • rateBasisPointsintegerOptional
        The tax or fee rate in basis points when the line is rate-based (1800 = 18%)
      • collectedBystringOptional
        PLATFORM | SUPPLIER | PROPERTY — who takes the money; a non-PLATFORM line outside Offer.price is a pay-at-property disclosure
      • payableAtstringOptional
        BOOKING | PROPERTY | DESK | AFTER_SERVICE
      • includedbooleanOptional
        True when the line is inside the enclosing amount (default); false for a disclosed line outside it
      • quantityintegerOptional
        How many units the line covers, when more than one.
      • unitAmountintegerOptional
        Minor units per unit when quantity is given
      • currencystringOptional
        ISO-4217 code of this line's amount and unitAmount.Show moreISO-4217 code of this line's amount and unitAmount. Set ONLY on a disclosed line (included false) that is NOT in the enclosing price's currency, for example a resort fee payable at the property in its local currency. Absent means the enclosing price's currency, as before; a line inside the total never carries it.
  • scopestringOptional
    Optional. A scope that does not match the action is 400 VALIDATION.

Responses

  • 201The grant — present approvalToken as X-Approval-Token on the bound verb within expiresAtApprovalGrant
  • 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
  • 403
    PERMISSION_DENIED on POST /v1/approvals: details.reason SESSION_REQUIRED when the credential is not a human session, or details.requiredScope when the signed-in person lacks the permission the action…Show morePERMISSION_DENIED on POST /v1/approvals: details.reason SESSION_REQUIRED when the credential is not a human session, or details.requiredScope when the signed-in person lacks the permission the action needs.
    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
    CONFLICT with details.reason APPROVAL_ALREADY_MINTED: this Idempotency-Key already minted a grant, and the token is never re-served, so mint again under a new key.Show moreCONFLICT with details.reason APPROVAL_ALREADY_MINTED: this Idempotency-Key already minted a grant, and the token is never re-served, so mint again under a new key. IDEMPOTENCY_CONFLICT when the same key is reused by a different user or with a different body; IDEMPOTENCY_IN_PROGRESS while the first mint is still executing.
    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
  • 429
    RATE_LIMITED — the API key or its tenant is over a rate limit; wait for Retry-After, then retry.Show moreRATE_LIMITED — the API key or its tenant is over a rate limit; wait for Retry-After, then retry. Every routed request is counted against two token buckets, the key's and the tenant's (all its keys together): 50 requests a second with a burst of 100 on the standard plan. Every travel verb except polling a search also spends from a supplier budget, per key and per tenant: 10 requests a second with a burst of 20, and a plan may add a daily quota of supplier calls. Answers carry the IETF RateLimit header fields for the tightest bucket consulted (RateLimit-Limit, RateLimit-Remaining, RateLimit-Reset, RateLimit-Policy); a refusal adds Retry-After and details.scope (KEY or TENANT), details.budget (PLATFORM or SUPPLIER), details.reason (RATE or DAILY_QUOTA), details.tier and details.retryAfterMs. A sandbox may run with the limiter off, in which case none of these headers is sent. A search that is still warming is a different answer with a different meaning (keep polling). with the key-velocity check on, also details.reason VELOCITY_LIMIT, a soft breach of the API key's own scope (components/responses/VelocityLimited), nextAction slow_down.
    ApiErrorResponse
  • 500INTERNAL — a bug, and traceId is the support handle.ApiErrorResponse

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
Approvals are minted by a signed-in person only. API keys and service tokens are refused here whatever their scopes.
not retryable
405VALIDATION
This method is not served.
not retryable
409CONFLICT
This Idempotency-Key already minted an approval grant; the token is returned once. Mint again with a new key.
not retryable
409IDEMPOTENCY_CONFLICT
Idempotency-Key 7f0c33d1-9a1e-4d2c-9f77-1c0f2b3a4d55 was used by a different caller or body; never executed
not retryable
409IDEMPOTENCY_IN_PROGRESS
A request with this Idempotency-Key is still executing
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
429RATE_LIMITED
Too many requests for this key on the supplier budget. Wait for the Retry-After interval before trying again.
retryable
500INTERNAL
An unexpected error occurred. Quote the traceId to support.
retryable