Cancel a held reservation
Cancel a held (unpaid) reservation: it is deleted at the supplier and the PNR is released.
/api/v1/flights/cancel_orderThis is not a refund and it does not apply to issued tickets.
Only Amadeus Algeria and Travelport holds can be cancelled here; a Duffel order is answered 400. Cancel a hold you abandon: the airline can refuse a new booking for the same passenger on the same route while the old reservation is pending. A booking that is not awaiting_payment (it is confirmed or already cancelled) is 409 invalid_booking_status. To get money back for an issued Duffel order use cancel_quote then confirm_cancel; void, exchange and refund of an issued Amadeus Algeria ticket are manual (see Post-booking operations).
Send one of order_id (preferred), booking_id and pnr. An unknown order and the order of another agency answer the same 404 not_found.
curl https://api.fx-port.com/api/v1/flights/cancel_order \
-H "Authorization: Bearer fxp_test_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"order_id": "eJzTd9ePNA90dHUGAAsuAlA"
}'{
"environment": "sandbox",
"success": true,
"requestId": "11487aa1",
"orderId": "eJzTd9ePNA90dHUGAAsuAlA",
"processingTime": 2.147,
"booking": {
"reference": "Y7QAEC",
"status": "cancelled",
"pnr": "Y7QAEC",
"type": "hold",
"createdAt": "2026-11-01T15:26:27.977426+00:00",
"cancelledAt": "2026-11-01T15:26:30.748257",
"content": "managed",
"syncedAt": "2026-11-01T15:26:30.748257",
"availableActions": [],
"voidableUntil": null,
"cancellation": {
"type": "void",
"deleted": true,
"deletedAt": "2026-11-01T15:26:30.748257"
}
},
"supplier": {
"id": "amadeus_aqc_dz_1",
"technology": "amadeus_aqc",
"name": "Amadeus Algeria",
"offerId": null
},
"agency": {
"currency": "DZD"
},
"cancellation": {
"status": "deleted",
"deleted": true,
"deletedAt": "2026-11-01T15:26:30.748257",
"refundAmount": 0,
"refundCurrency": "DZD",
"refundTo": null,
"message": "Reservation deleted successfully."
},
"meta": {
"supportHold": true,
"supportVoid": true,
"voidDeadline": "2026-11-01T23:00:00Z",
"voidWindowEndsAt": null,
"airlineInitiatedChanges": [],
"changes": [],
"users": [],
"orderMetadata": {
"supplierStatusCode": 204,
"supplierDeleteErrorIgnored": false,
"supplierDeleteErrorCode": 204,
"supplierDeleteErrorMessage": null
}
},
"postProcessing": {
"bookingStatusUpdated": true
}
}Request
Body
Required, JSON.
order_idstringThe supplier's order id (booking.reference of the booking response). Preferred: a PNR is not unique.
booking_idstringThe PNR of the booking.
pnrstringThe airline record locator.
supplier_idstringOnly used when the booking has no supplier of its own.
agency_idstringNot needed: the agency of a call is always the one of your API key. The field is accepted so that older clients keep working, and it is ignored.
orderIdstringdeprecatedLegacy name, still accepted. Use order_id instead.
The previous spelling of order_id: The supplier's order id (booking.reference of the booking response).
bookingIdstringdeprecatedLegacy name, still accepted. Use booking_id instead.
The previous spelling of booking_id: The PNR of the booking.
supplierIdstringdeprecatedLegacy name, still accepted. Use supplier_id instead.
The previous spelling of supplier_id: Only used when the booking has no supplier of its own.
agencyIdstringdeprecatedLegacy name, still accepted. Use agency_id instead.
The previous spelling of agency_id: Not needed: the agency of a call is always the one of your API key.
Response
200The reservation was deleted and the booking is cancelled.
environmentstringThe environment of the key that made the call: sandbox for fxp_test_ keys, live for fxp_live_ keys. Present in every JSON body.
One of sandbox, live.
request_idstringThe id of the request, also in the X-Request-Id header.
warningsarray of objectPresent only when the request used a previous spelling of a field or something the endpoint ignored.
ShowHide 5 attributes
codestringWhat the warning is about.
One of deprecated_field, ignored_field, coerced_value, deprecated_value, deprecated_endpoint.
fieldstringThe request field the warning is about.
replacementstringThe name to use instead, for deprecated_* warnings.
messagestringA sentence that says what happened and what to do.
documentation_urlstringWhere the naming rules are explained.
successbooleantrue when the reservation was deleted.
requestIdstringdeprecatedLegacy name, still accepted. Use request_id instead.
The id of this request, 8 characters, for support.
orderIdstringdeprecatedLegacy name, still accepted. Use order_id instead.
The supplier's order id.
order_idstringThe supplier's order id. The snake_case twin of orderId, with the same value: use this name.
processingTimenumberdeprecatedLegacy name, still accepted. Use processing_time instead.
Seconds spent.
processing_timenumberSeconds spent. The snake_case twin of processingTime, with the same value: use this name.
bookingobjectThe order as the supplier knows it.
ShowHide 12 attributes
referencestringdeprecatedLegacy name, still accepted. Use order_id instead.
The supplier's order id (ord_... for Duffel, a base64-like text for Amadeus; for a cancelled hold of Amadeus Algeria the PNR). Send it as order_id to pay_order, cancel_order and cancel_quote.
order_idstringThe supplier's order id (ord_... for Duffel, a base64-like text for Amadeus; for a cancelled hold of Amadeus Algeria the PNR). Send it as order_id to pay_order, cancel_order and cancel_quote. The snake_case twin of reference, with the same value: use this name.
statusstringconfirmed, pending (a hold that is not paid yet), awaiting_payment, cancelled, failed or partial_refund.
pnrstringThe airline record locator. Not unique across suppliers and airlines.
typestringinstant: ticketed at once. hold: reserved, not paid.
One of instant, hold.
createdAtstringWhen the order was created.
cancelledAtstringnullableWhen the order was cancelled.
contentstringWho manages the order: managed.
syncedAtstringWhen FX-Port last synchronised the order with the supplier.
availableActionsarray of stringWhat can still be done with the order.
voidableUntilstringnullableISO 8601 UTC end of the same-day void window.
cancellationobjectnullableHow the order was cancelled: type, deleted, deletedAt.
supplierobjectThe supplier of the order.
ShowHide 7 attributes
idstringdeprecatedLegacy name, still accepted. Use supplier_id instead.
Id of the supplier.
supplier_idstringId of the supplier. The snake_case twin of id, with the same value: use this name.
technologystringThe technology of the supplier: amadeus_aqc or duffel.
namestringdeprecatedLegacy name, still accepted. Use supplier_name instead.
Name of the supplier.
supplier_namestringName of the supplier. The snake_case twin of name, with the same value: use this name.
offerIdstringnullabledeprecatedLegacy name, still accepted. Use supplier_offer_id instead.
The supplier's own id of the offer.
supplier_offer_idstringnullableThe supplier's own id of the offer. The snake_case twin of offerId, with the same value: use this name.
agencyobjectYour agency. The id of the agency is not returned: you know it.
ShowHide 1 attribute
currencystringISO 4217 currency of your agency. Every amount of the response is in it.
cancellationobjectThe result of the cancellation.
ShowHide 7 attributes
statusstringdeleted.
deletedbooleantrue when the reservation was deleted at the supplier.
deletedAtstringWhen it was deleted.
refundAmountnumberThe refund: 0 for a hold (nothing was paid).
refundCurrencystringCurrency of the refund.
refundTostringnullableWhere a refund goes.
messagestringA sentence about the result.
metaobjectCapabilities of the order and what the supplier reports about it.
ShowHide 11 attributes
supportHoldbooleandeprecatedLegacy name, still accepted. Use support_hold instead.
Whether the supplier can hold.
support_holdbooleanWhether the supplier can hold. The snake_case twin of supportHold, with the same value: use this name.
supportVoidbooleandeprecatedLegacy name, still accepted. Use support_void instead.
Whether the supplier can void the ticket the same day.
support_voidbooleanWhether the supplier can void the ticket the same day. The snake_case twin of supportVoid, with the same value: use this name.
voidDeadlinestringnullabledeprecatedLegacy name, still accepted. Use void_deadline instead.
End of the same-day void window.
void_deadlinestringnullableEnd of the same-day void window. The snake_case twin of voidDeadline, with the same value: use this name.
voidWindowEndsAtstringnullableEnd of the void window, when the supplier gives it.
airlineInitiatedChangesarray of objectSchedule changes the airline made.
changesarray of objectChanges of the order.
usersarray of objectUsers of the order.
orderMetadataobjectnullableSupplier-specific metadata of the order.
postProcessingobjectWhat FX-Port did after the supplier call.
ShowHide 5 attributes
bookingDbIdstringThe FX-Port id of the booking (a UUID). The best key to store: it is accepted as booking_id by get_booking.
bucketLinkstringnullableAddress of the PDF of the ticket, null until it is generated. A public link.
emailSentbooleanWhether the confirmation e-mail went out.
bookingStatusUpdatedbooleancancel_order: whether the FX-Port booking was updated.
refundMethodstringconfirm_cancel: where the refund went: balance.
Errors
| Status | Code | Example message |
|---|---|---|
| 400 | bad_request | Missing required parameter: order_id (or booking_id / pnr) |
| 400 | invalid_booking_id | `order_id` is not a valid identifier (letters, digits and - _ . : = ~ only, up to 128 characters). |
| 400 | bad_request | Delete reservation is currently only supported for Amadeus Algeria and Travelport hold bookings. Received supplier_id: duffel_1 |
| 403 | read_write_permission_required | This endpoint requires an API key with read_write permission. |
| 404 | not_found | Booking not found for order_id: ZZZZZZ |
| 409 | invalid_booking_status | Booking is 'confirmed', expected awaiting_payment |
| 500 | booking_update_failed | Reservation was deleted at the supplier, but local booking status could not be updated. |
The shape of the error body depends on the endpoint. See Errors for every shape and code.