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

Search

  • Geo searchPOST
  • Locations and coordinatesGET
  • Name searchGET
  • Name search (JSON body)POST

Hotel content

  • Cards of many hotelsPOST
  • One hotel, for its pagePOST
  • Raw hotel documentsPOST

Rates and booking

  • Rates of a hotelPOST
  • Pre-book a ratePOST
  • BookPOST

After booking

  • VoucherGET
  • CancelPOST

Objects

  • Hotel mini
  • Hotel full

Hotels · After booking

Get the voucher PDF links of a booking

Returns the links of the voucher PDFs of a booking of your agency: one with the price and one without it, to hand to the traveler.

GET/api/v1/hotels/get_voucher

Requires an API key with Read permission; a Read+Write key works too.

The links are permanent public URLs without a signature: anyone who has one can open the voucher, so do not post it where it should not be read. The voucher is made after the booking is confirmed, usually at the same moment and sometimes up to 10 seconds later: until then the call answers 404 with the code pdf_not_found; try again in 2 seconds. The links stay available after a cancellation. The same links are in voucherUrl and voucherUrlNoPrice of the booking detail.

curl 'https://api.fx-port.com/api/v1/hotels/get_voucher?booking_id=HMVXX4ZQ3' \
  -H "Authorization: Bearer fxp_test_YOUR_KEY"
Response200
{
  "environment": "sandbox",
  "success": true,
  "data": {
    "bookingId": "HMVXX4ZQ3",
    "voucherUrl": "https://files.example.com/hotel-bookings/HMVXX4ZQ3-Jane-Smith.pdf",
    "voucherUrlWithPrice": "https://files.example.com/hotel-bookings/HMVXX4ZQ3-Jane-Smith.pdf",
    "voucherUrlNoPrice": "https://files.example.com/hotel-bookings/HMVXX4ZQ3-Jane-Smith-no-price.pdf",
    "status": "confirmed"
  }
}

Request

Query parameters

booking_idstringrequired

The id of the booking: the bookingId of book_hotel.

partner_order_idstringdeprecated

Legacy name, still accepted. Use booking_id instead.

The booking id, in its older spelling. Use booking_id.

partnerOrderIdstringdeprecated

Legacy name, still accepted. Use booking_id instead.

The booking id, in its older spelling. Use booking_id.

bookingIdstringdeprecated

Legacy name, still accepted. Use booking_id instead.

The booking id, in its older spelling. Use booking_id.

Response

200The voucher links.

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 voucher exists.

dataobject

The voucher links of a booking.

ShowHide 9 attributes
bookingIdstringdeprecated

Legacy name, still accepted. Use booking_id instead.

The id of the booking.

booking_idstring

The id of the booking. The snake_case twin of bookingId, with the same value: use this name.

voucherUrlstringdeprecated

Legacy name, still accepted. Use voucher_url instead.

The voucher PDF, with the price. A permanent public link: anyone who has it can open it.

voucher_urlstring

The voucher PDF, with the price. A permanent public link: anyone who has it can open it. The snake_case twin of voucherUrl, with the same value: use this name.

voucherUrlWithPricestringdeprecated

Legacy name, still accepted. Use voucher_url_with_price instead.

The same link as voucherUrl.

voucher_url_with_pricestring

The same link as voucherUrl. The snake_case twin of voucherUrlWithPrice, with the same value: use this name.

voucherUrlNoPricestringnullabledeprecated

Legacy name, still accepted. Use voucher_url_no_price instead.

The voucher PDF without the price, to hand to the traveler. null when it was not made.

voucher_url_no_pricestringnullable

The voucher PDF without the price, to hand to the traveler. null when it was not made. The snake_case twin of voucherUrlNoPrice, with the same value: use this name.

statusstring

The status of the booking. A voucher stays available after a cancellation.

One of pending, confirmed, failed, refunded, partial_refund, cancelled.

Errors

StatusCodeExample message
403forbiddenThis booking does not belong to your agency. Only the agency that made the booking can retrieve its voucher.
404booking_not_foundBooking not found
404pdf_not_foundThe voucher is not available yet: it is made shortly after the booking is confirmed. Retry in a few seconds.
422validation_errorField required
503service_overloadedThe service is temporarily overloaded; retry after the time given in the Retry-After header.

The shape of the error body depends on the endpoint. See Errors for every shape and code.

Related guides

  • Get the hotel voucher
PreviousBook a locked rateNext Cancel a confirmed hotel booking

© 2026 FX-Port

TermsPrivacy[email protected]