GET /api/v1/hotels/get_voucher
Retrieve the confirmation voucher PDF URL for a confirmed hotel booking.
Retrieve the voucher PDF URL for a hotel booking. Only the agency that owns the booking can retrieve its voucher.
Permission: Read
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
booking_id | string | Yes | The partner_order_id / bookingId from book_hotel |
Request example
curl --get \
--url https://api.fx-port.com/api/v1/hotels/get_voucher \
--header 'Authorization: Bearer fxp_test_YOUR_KEY' \
--data-urlencode 'booking_id=HMTLZLWGQ'Response example
{
"environment": "sandbox",
"success": true,
"data": {
"bookingId": "HMTLZLWGQ",
"voucherUrl": "https://s3.example.com/hotel-bookings/HMTLZLWGQ-Amine-Benali.pdf",
"voucherUrlWithPrice": "https://s3.example.com/hotel-bookings/HMTLZLWGQ-Amine-Benali.pdf",
"voucherUrlNoPrice": "https://s3.example.com/hotel-bookings/HMTLZLWGQ-Amine-Benali-no-price.pdf",
"status": "confirmed"
}
}voucherUrl and voucherUrlWithPrice always point to the same PDF (with a pricing/payment
section). voucherUrlNoPrice is a second, price-free voucher PDF you can hand to a traveler
without disclosing what was paid — both variants are generated for every confirmed booking.
Errors
| HTTP | detail | Cause |
|---|---|---|
404 | "Booking not found" | No booking with that ID for your agency |
404 | "pdf_not_found" | Booking exists but the voucher PDF hasn't finished generating yet — retry in a few seconds |
403 | forbidden | The booking belongs to a different agency |
The same URLs are also available as record.bucket_link / record.bucket_link_no_price and
data.voucherUrl / data.voucherUrlNoPrice on
GET /api/v1/bookings/{id}?product=hotels — use whichever call fits your
flow. get_voucher is a lighter-weight call when you only need the PDF link.