hotels

Book a rate: the price is held and captured only once the hotel confirms (asynchronous)

Returns 202 immediately with a booking_job_id; poll GET /hotels/booking/{booking_job_id} for the result. Guest details are checked first (400 invalid_details, before anything is held). Then the full price is HELD (authorised, not taken) on the connected Revolut payment method, LetsFG books the room, and the hold is captured only once the supplier has confirmed. A booking that fails for any reason releases the hold, and nothing is charged. There is no reservation fee, no deposit and no pay link.

Hotel bookings run one at a time; one that cannot start within 20 minutes fails and releases its hold. Do NOT re-POST while a job is running: poll it. A retry of the same booking (the same idempotency_key, or the same offer, e-mail and check-in) returns the existing job with duplicate: true and never holds the money twice. The guest is e-mailed at email however the booking ends. A successful booking resets the look-to-book search allowance back to 1,000.

post/hotels/book

Request

  • Base URL: https://letsfg.co/developers/api/v1
  • URL: https://letsfg.co/developers/api/v1/hotels/book
  • Auth: API key in header X-API-Key

Request body

session_idstring required

The session_id on the chosen offer.

hotel_codeinteger required
combination_idinteger nullable
combination_id_v2string required
expected_pricenumber required

The price from the chosen offer.

expected_costnumber

The expected_cost from the chosen offer (0), sent back as returned. Optional.

currencystring

The offer currency. Defaults to PLN, so an offer priced in USD (the search default) must send it.

fx_ratenumber nullable

The offer fx_rate, copied verbatim.

hotel_namestring nullable
city_idinteger required
city_namestring required
check_instring date required
check_outstring date required
adultsinteger
emailstring email required

The guest e-mail. The confirmation goes here, or word that the booking did not go through. A typo loses the booking.

phonestring required

A number valid for phone_country_code.

phone_country_codestring
special_requestsstring[]
idempotency_keystring nullable

Optional. The same key on a retry returns the booking already opened instead of holding the money twice.

Response

Booking started; the price is held.

booking_job_idstring

Pass to GET /hotels/booking/{booking_job_id} to poll for the result.

booking_idstring
status'in_progress'
duplicateboolean

True when this booking was already under way; nothing new was held.

pollstring
poll_after_secondsinteger
notestring

Example response

{
  "poll_after_seconds": 20
}

Changes

No recorded changes to this operation across all 1 revision of this API.