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.
Cancel order
Cancel an order at the airline. Verified, not merely accepted.
/v1/orders/{orderID}Requires X-API-KeyCancels 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
(no content)Path parameters
orderIDstringRequiredCanonical order ID.
AA001Y1XD7ZA6Query parameters
airlinestringIATA code. Optional: taken from your stored order; a different value is 400 airline does not match the order.
AAError codes
400idempotency_key_required, or airline does not match the order.
404order_not_found — not this account's order in this key's environment.
409illegal_transition, order_busy, idempotency_key_in_flight, idempotency_key_reused, or cancel_outcome_unknown (with attempt_id).
422airline_refused: the airline refused the cancellation, or the order was still open afterwards.
502cancel_outcome_unknown with attempt_id: read the order with ?refresh=true before resending.
503airline_unreachable or ledger_unavailable (Retry-After: 5, nothing was sent), or coming_soon.