Start a hotel booking (asynchronous)
Changed onReturns a booking_job_id, not a booking. The full price is held on the connected card (not taken), LetsFG books the room and pays the supplier, and the hold is captured only once the hotel confirms. A failed booking releases the hold. There is no reservation fee, no deposit and no pay link.
A real booking takes minutes. Poll GET /api/v1/hotels/booking/{booking_job_id} until status is succeeded, failed or attention.
Send expected_price, expected_cost, currency and fx_rate back exactly as the chosen offer returned them. currency defaults to PLN here, so a USD offer sent without it is refused. The booking is also refused if the supplier's price has moved, so a guest is never charged a price they did not agree to.
Guest names, phone and e-mail are checked before anything is held. Never call this again while its job is running — poll it; a retry with the same idempotency_key returns the existing job (duplicate: true) instead of booking twice.
Request
- Base URL: https://letsfg.co/developers/api/v1
- URL: https://letsfg.co/developers/api/v1/api/v1/hotels/book
- Auth: API key in header X-API-Key
Request body
Example request
{
"guests": [
{
"title": "Mr"
}
]
}Response
Booking started — poll the returned booking_job_id
Changes
- breaking
added the new required request property
- warning
removed the request property
- info
added the new optional request property
- info
added the new optional request property
- info
added the new optional request property
- info
added the non-success response with the status
- breaking
- info
endpoint added
- info