Skip to content
FX-Port/Docs
GuidesAPI referenceChangelog
Get API keys
  • Overview
  • Error object

Search and price

  • Search flightsPOST
  • Flexible datesPOST
  • Price an offerPOST
  • Airport autocompleteGET
  • Most searched airportsGET

Book, pay and cancel

  • Book an offerPOST
  • Quote a held orderPOST
  • Pay a held orderPOST
  • Cancel a held orderPOST

After booking

  • Get a bookingPOST
  • Ticket PDFPOST
  • Ticket numberPOST
  • Quote a refundPOST
  • Confirm a cancellationPOST

ACD documents

  • Get the document statePOST
  • Upload passportsPOST

Objects

  • Flight offer
  • Flight booking

Flights ยท Book, pay and cancel

Cancel a held reservation

Cancel a held (unpaid) reservation: it is deleted at the supplier and the PNR is released.

POST/api/v1/flights/cancel_order

Requires an API key with Read+Write permission: a Read key is refused with read_write_permission_required.

This 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"
}'
Response200
{
  "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_idstring

The supplier's order id (booking.reference of the booking response). Preferred: a PNR is not unique.

booking_idstring

The PNR of the booking.

pnrstring

The airline record locator.

supplier_idstring

Only used when the booking has no supplier of its own.

agency_idstring

Not 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.

orderIdstringdeprecated

Legacy name, still accepted. Use order_id instead.

The previous spelling of order_id: The supplier's order id (booking.reference of the booking response).

bookingIdstringdeprecated

Legacy name, still accepted. Use booking_id instead.

The previous spelling of booking_id: The PNR of the booking.

supplierIdstringdeprecated

Legacy name, still accepted. Use supplier_id instead.

The previous spelling of supplier_id: Only used when the booking has no supplier of its own.

agencyIdstringdeprecated

Legacy 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.

environmentstring

The 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_idstring

The id of the request, also in the X-Request-Id header.

warningsarray of object

Present only when the request used a previous spelling of a field or something the endpoint ignored.

ShowHide 5 attributes
codestring

What the warning is about.

One of deprecated_field, ignored_field, coerced_value, deprecated_value, deprecated_endpoint.

fieldstring

The request field the warning is about.

replacementstring

The name to use instead, for deprecated_* warnings.

messagestring

A sentence that says what happened and what to do.

documentation_urlstring

Where the naming rules are explained.

successboolean

true when the reservation was deleted.

requestIdstringdeprecated

Legacy name, still accepted. Use request_id instead.

The id of this request, 8 characters, for support.

orderIdstringdeprecated

Legacy name, still accepted. Use order_id instead.

The supplier's order id.

order_idstring

The supplier's order id. The snake_case twin of orderId, with the same value: use this name.

processingTimenumberdeprecated

Legacy name, still accepted. Use processing_time instead.

Seconds spent.

processing_timenumber

Seconds spent. The snake_case twin of processingTime, with the same value: use this name.

bookingobject

The order as the supplier knows it.

ShowHide 12 attributes
referencestringdeprecated

Legacy 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_idstring

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. The snake_case twin of reference, with the same value: use this name.

statusstring

confirmed, pending (a hold that is not paid yet), awaiting_payment, cancelled, failed or partial_refund.

pnrstring

The airline record locator. Not unique across suppliers and airlines.

typestring

instant: ticketed at once. hold: reserved, not paid.

One of instant, hold.

createdAtstring

When the order was created.

cancelledAtstringnullable

When the order was cancelled.

contentstring

Who manages the order: managed.

syncedAtstring

When FX-Port last synchronised the order with the supplier.

availableActionsarray of string

What can still be done with the order.

voidableUntilstringnullable

ISO 8601 UTC end of the same-day void window.

cancellationobjectnullable

How the order was cancelled: type, deleted, deletedAt.

supplierobject

The supplier of the order.

ShowHide 7 attributes
idstringdeprecated

Legacy name, still accepted. Use supplier_id instead.

Id of the supplier.

supplier_idstring

Id of the supplier. The snake_case twin of id, with the same value: use this name.

technologystring

The technology of the supplier: amadeus_aqc or duffel.

namestringdeprecated

Legacy name, still accepted. Use supplier_name instead.

Name of the supplier.

supplier_namestring

Name of the supplier. The snake_case twin of name, with the same value: use this name.

offerIdstringnullabledeprecated

Legacy name, still accepted. Use supplier_offer_id instead.

The supplier's own id of the offer.

supplier_offer_idstringnullable

The supplier's own id of the offer. The snake_case twin of offerId, with the same value: use this name.

agencyobject

Your agency. The id of the agency is not returned: you know it.

ShowHide 1 attribute
currencystring

ISO 4217 currency of your agency. Every amount of the response is in it.

cancellationobject

The result of the cancellation.

ShowHide 7 attributes
statusstring

deleted.

deletedboolean

true when the reservation was deleted at the supplier.

deletedAtstring

When it was deleted.

refundAmountnumber

The refund: 0 for a hold (nothing was paid).

refundCurrencystring

Currency of the refund.

refundTostringnullable

Where a refund goes.

messagestring

A sentence about the result.

metaobject

Capabilities of the order and what the supplier reports about it.

ShowHide 11 attributes
supportHoldbooleandeprecated

Legacy name, still accepted. Use support_hold instead.

Whether the supplier can hold.

support_holdboolean

Whether the supplier can hold. The snake_case twin of supportHold, with the same value: use this name.

supportVoidbooleandeprecated

Legacy name, still accepted. Use support_void instead.

Whether the supplier can void the ticket the same day.

support_voidboolean

Whether the supplier can void the ticket the same day. The snake_case twin of supportVoid, with the same value: use this name.

voidDeadlinestringnullabledeprecated

Legacy name, still accepted. Use void_deadline instead.

End of the same-day void window.

void_deadlinestringnullable

End of the same-day void window. The snake_case twin of voidDeadline, with the same value: use this name.

voidWindowEndsAtstringnullable

End of the void window, when the supplier gives it.

airlineInitiatedChangesarray of object

Schedule changes the airline made.

changesarray of object

Changes of the order.

usersarray of object

Users of the order.

orderMetadataobjectnullable

Supplier-specific metadata of the order.

postProcessingobject

What FX-Port did after the supplier call.

ShowHide 5 attributes
bookingDbIdstring

The FX-Port id of the booking (a UUID). The best key to store: it is accepted as booking_id by get_booking.

bucketLinkstringnullable

Address of the PDF of the ticket, null until it is generated. A public link.

emailSentboolean

Whether the confirmation e-mail went out.

bookingStatusUpdatedboolean

cancel_order: whether the FX-Port booking was updated.

refundMethodstring

confirm_cancel: where the refund went: balance.

Errors

StatusCodeExample message
400bad_requestMissing required parameter: order_id (or booking_id / pnr)
400invalid_booking_id`order_id` is not a valid identifier (letters, digits and - _ . : = ~ only, up to 128 characters).
400bad_requestDelete reservation is currently only supported for Amadeus Algeria and Travelport hold bookings. Received supplier_id: duffel_1
403read_write_permission_requiredThis endpoint requires an API key with read_write permission.
404not_foundBooking not found for order_id: ZZZZZZ
409invalid_booking_statusBooking is 'confirmed', expected awaiting_payment
500booking_update_failedReservation 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.

Related guides

  • Cancel a held reservation
  • Post-booking operations
PreviousPay a held order and issue the ticketsNext Get a flight booking

ยฉ 2026 FX-Port

TermsPrivacy[email protected]