FX-Port API
Hotels

Get hotel booking

Retrieve full hotel booking details, including pricing breakdown and the voucher PDF link, through the shared account booking endpoint.

Hotel bookings are retrieved through the same shared endpoint documented in Account → GET /api/v1/bookings/{id} — pass product=hotels to scope the lookup.

Permission: Read

Request example

curl --get \
  --url https://api.fx-port.com/api/v1/bookings/HMTLZLWGQ \
  --header 'Authorization: Bearer fxp_test_YOUR_KEY' \
  --data-urlencode 'product=hotels'

Response example

{
  "success": true,
  "data": {
    "product": "hotels",
    "bookingId": "HMTLZLWGQ",
    "status": "confirmed",
    "bookingMode": "standard",
    "voucherUrl": "https://s3.example.com/hotel-bookings/HMTLZLWGQ-Amine-Benali.pdf",
    "record": {
      "id": "24fec1e5-a09f-48ec-8050-1adaab0a8de1",
      "booking_id": "HMTLZLWGQ",
      "status": "confirmed",
      "currency": "DZD",
      "total_price": 43812.75,
      "agency_commission": 87.30,
      "hotel_id": "test_hotel",
      "hotel_name": "Test Hotel",
      "checkin_date": "2026-11-15",
      "checkout_date": "2026-11-18",
      "booking_mode": "standard",
      "bucket_link": "https://s3.example.com/hotel-bookings/HMTLZLWGQ-Amine-Benali.pdf",
      "bucket_link_no_price": "https://s3.example.com/hotel-bookings/HMTLZLWGQ-Amine-Benali-no-price.pdf",
      "supplier_id": "worldota_1",
      "environment": "sandbox",
      "created_at": "2026-09-03T10:15:00+00:00"
    },
    "pricing": [
      {
        "id": "8b1e2c3a-...",
        "created_at": "2026-09-03T10:15:02+00:00",
        "agency_currency": "DZD",
        "total_price": 43812.75,
        "agency_commission": 87.30,
        "b2b_price": 43725.45,
        "environment": "sandbox"
      }
    ],
    "balanceOperations": []
  },
  "meta": {
    "agencyId": "2e800fb6-0bbf-4fc1-b0bd-0f3be3b5bcc4",
    "environment": "sandbox"
  }
}

Field reference

FieldDescription
data.statuspending, confirmed, failed, cancelled, refunded — poll while pending
data.voucherUrl / record.bucket_linkConfirmation voucher PDF URL, with pricing. null until generated. Same endpoint as get_voucher.
data.voucherUrlNoPrice / record.bucket_link_no_priceSecond, price-free voucher PDF variant. null until generated.
record.hotel_idPass to get_hotel_info to redisplay hotel details
record.checkin_date / .checkout_dateDate-only (no time component)
record.free_cancellation_deadline_atDeadline for a no-penalty cancellation, if applicable
pricing[0].b2b_priceAmount debited from your agency balance = total_price − agency_commission
balanceOperationsInternal ledger entries for this booking; usually empty unless a manual adjustment occurred

See Account → GET /api/v1/bookings/{id} for the full shared field reference and lookup-by-PNR/ID caveats, and Account → booking history to list all hotel bookings for your agency.

On this page