lib/suppliers/hotelbeds/ and is built only from Hotelbeds’ public documentation.
At a glance
Their flow and ours
Must do
1
Sign every request
The signature changes every second, so it is computed for each call on the server. The key and secret never reach the browser and are masked in every log.
2
Send exactly one search filter
A destination code, a circle around a place (radius in km), or a list of hotel codes. Both a place and hotel codes at once are refused with HTTP 400 (“The request must have unique filter”).
3
Give every child's age
One occupancy per room, and with children a
paxes entry per child (type: CH and the age). Without it Hotelbeds refuses the search with HTTP 400.4
Check the rate before booking
Every booking is preceded by
checkrates with the offer’s rateKey.5
Name every guest at booking
The holder’s name and surname, then a
paxes list with each guest’s room number, AD or CH (children with their age), name and surname. Each booking carries our own clientReference.6
Count every call
Each live call reserves one unit of the daily allowance first, in one atomic statement in Postgres shared by every server. At 40 the call isn’t made.