Book at our price
Book a room without running a search first. You tell us what you want;
we price it with the same engine POST /search prices with, and either
quote it back or book it.
These two endpoints are new in v1.20.0, together with the
rate-plan subscription calls and
POST /webhooks/resync. The paths that existed before behave
exactly as they always have.
All endpoints require authentication: Authorization: Bearer {token}
Base URL: https://b2b.quendoo.com/api/b2b/v1
When to use it
The usual flow is POST /search, then POST /booking with the search_id
and the accommodation_id the search gave you. That search id is valid for
thirty minutes, which means your system has to hold it and book inside
the window.
Use auto-price when that does not fit:
- you already know the room and rate you want and do not need a list;
- your booking flow is longer than thirty minutes;
- you want a price for one specific room and party, not a catalogue.
The price is ours, not yours. If you want to send your own figure, use
POST /booking/with-price instead.
POST /booking/auto-price
Request
{
"property": 1860,
"ref_id": "AG-2026-00417",
"checkin_date": "2026-11-22",
"checkout_date": "2026-11-24",
"notes": "Late arrival, around 23:00",
"client": {
"first_name": "Ivan",
"last_name": "Petrov",
"email": "[email protected]",
"phone": "+359888123456"
},
"items": [
{
"ref_id": "AG-2026-00417-1",
"room": 5696,
"rate": 11058,
"occupancy": { "adults": 2, "children": [7] },
"guests": [
{ "first_name": "Ivan", "last_name": "Petrov", "adult": true },
{ "first_name": "Maria", "last_name": "Petrova", "adult": true },
{ "first_name": "Nikola","last_name": "Petrov", "adult": false, "non_adult_age": 7 }
],
"extra_services": [412]
}
]
}
| Field | Required | Notes |
|---|---|---|
property |
yes | Property id |
checkin_date, checkout_date |
yes | YYYY-MM-DD, for the whole booking |
client |
yes | first_name, last_name, email, phone all required |
items |
yes | At least one. One item is one room |
items[].room |
yes | Room id |
items[].rate |
yes | Rate plan id you are subscribed to |
items[].occupancy.adults |
yes | Number of adults |
items[].occupancy.children |
no | Ages, one entry per child — not a count |
items[].guests |
yes | One entry per person, adults and children. Must fit occupancy (fewer names are filled in; more is error 6 "Occupancy not equal to guests!") |
items[].ref_id |
no | Your own id for the room |
ref_id |
no | Your own id for the booking |
dry_run |
no | See Quoting without booking |
Do not send search_id, accommodation_id or price. Each is
rejected with error code 4 — this endpoint prices the stay itself.
Response
The booking, in the same shape POST /booking answers with:
{
"id": 712904,
"ref_id": "AG-2026-00417",
"booking_status": "CREATED",
"payment_status": "WAITING",
"currency": "EUR",
"total_amount": 200.0,
"property": { "id": 1860, "name": "Hotel Example" },
"items": [ { "id": 988311, "room": { "id": 5696 }, "rate": { "id": 11058 } } ]
}
POST /booking/request-auto-price
The same body and the same pricing, but it creates a booking request
rather than a booking: it holds no rooms and cannot be paid until the hotel
approves it. booking_status comes back as REQUESTED.
Your subscription to the rate plan must allow booking requests. If it does
not, you get error 6 with Can't send booking request!.
Quoting without booking — dry_run
Add "dry_run": true to the body. You get the price and nothing is
created:
{
"currency": "EUR",
"total": 200.0,
"items": [
{ "room": 5696, "rate": 11058, "ref_id": "AG-2026-00417-1", "price": 200.0 }
],
"dry_run": true
}
Send the same body again without dry_run to book it.
Two things worth knowing:
- The quote is not held. It is today's price for that stay, and the
next call prices again. If the hotel changes its calendar between the two
calls, the booking takes the newer price. There is no thirty-minute lock
here, which is the trade for not needing a
search_id. - A dry run works even on a property whose booking module is not set up. Quoting is not booking.
Errors
The contract's usual shape — a bare array, HTTP 400:
[ { "code": 6, "message": "No price for room 5696 on rate 11058 for that party, or it is not available." } ]
| Code | When |
|---|---|
| 4 | The body does not match the schema — a missing field, or one of search_id / accommodation_id / price |
| 3 | checkin_date or checkout_date is not a date |
| 7 | No such property |
| 8 | The rate plan is not yours, is not on that property, or is not searchable |
| 6 | Everything else: no price for that party, the room is not free, the property has no booking module, or booking requests are not allowed for you |
When any item fails, nothing is created. A booking is all of its rooms or none of them.
How it differs from the other booking endpoints
/booking |
/booking/with-price |
/booking/auto-price |
|
|---|---|---|---|
Needs a prior /search |
yes | no | no |
search_id |
required | — | rejected |
accommodation_id |
required | — | rejected |
| Who sets the price | the search, sealed | you | we price it |
currency per item |
— | required | — |
| Thirty-minute window | yes | — | — |
dry_run |
— | — | yes |
| Rate plan must allow | booking_types.search |
booking_types.fit |
booking_types.search |
If you already run searches and book from them, nothing changes — keep
using /search and /booking.