Sandbox orders are test bookings

Sandbox keys reach the airlines’ test systems: nobody flies on these orders and no booking fee is charged. Check status and tickets[], not the HTTP code.

Orders

Cancel order

Cancel an order at the airline. Verified, not merely accepted.

DELETE/v1/orders/{orderID}Requires X-API-Key

Cancels the order at the airline and returns 204 once the airline shows it closed. A ticketed order is cancelled on its fare's terms; any refund the airline quotes is recorded in the order's payments[] and history.

To see the refund first, call POST /v1/orders/{orderID}/cancel for a quote (and …/cancel/confirm to accept it). An order already cancelled answers 204 without an airline call; a refunded or failed one is 409 illegal_transition.

Idempotency. Idempotency-Key is required (400 idempotency_key_required without it) and works as on POST /v1/orders. Another write still running on the order is 409 order_busy (Retry-After: 5). The key is shared with POST /v1/orders/{orderID}/cancel/confirm. A refusal from the airline is 422; 503 airline_unreachable means nothing was sent (retry with the same key); 502 cancel_outcome_unknown means the answer was lost: do not resend.

Request example

curl --request DELETE \
  --url https://api.norba.io/v1/orders/{orderID} \
  --header "X-API-Key: $NORBA_KEY" \
  --header "Idempotency-Key: 3f2b8c1e-6d4a-4e9b-9a57-0c1d2e3f4a5b"

Response example

Response example
(no content)

Authorization

X-API-KeystringRequired

Your API key from the dashboard. A missing or invalid key answers 401; see Authentication.

Path parameters

orderIDstringRequired

Canonical order ID.

Example: AA001Y1XD7ZA6

Query parameters

airlinestring

IATA code. Optional: taken from your stored order; a different value is 400 airline does not match the order.

Example: AA

Error codes

400

idempotency_key_required, or airline does not match the order.

404

order_not_found — not this account's order in this key's environment.

409

illegal_transition, order_busy, idempotency_key_in_flight, idempotency_key_reused, or cancel_outcome_unknown (with attempt_id).

422

airline_refused: the airline refused the cancellation, or the order was still open afterwards.

502

cancel_outcome_unknown with attempt_id: read the order with ?refresh=true before resending.

503

airline_unreachable or ledger_unavailable (Retry-After: 5, nothing was sent), or coming_soon.

DELETE /v1/orders/{orderID} — Cancel order | Norba API