Bookings
Create a booking for a guest, read the website's own bookings back, and cancel one for the guest. Every call is made from your server and signed.
Create a booking#
POST /bookings books one room type for one stay and answers 201 with the booking, already confirmed, with source website. It needs the bookings.write scope, a signature and an Idempotency-Key. The full request is in the Quickstart.
- room_type_idstring (uuid) · required
From the quote or
GET /place.- check_instring (date) · required
The first night.
- check_outstring (date) · required
The departure day.
- adultsinteger · required
Adults in the party.
1 to 50
- childreninteger
Children in the party.
0 to 50 · default 0
- bedsinteger
Shared (dorm) room types only: beds to hold, at least one per adult.
1 to 50
- guest.namestring · required
The lead guest's name.
- guest.phonestring · required
A Zambian mobile number, for example
0971234567or+260971234567. Tulo stores and returns it in E.164 (+260971234567).
- Unknown fields are refused with
400 invalid_json, so nothing else (an ID document number, for example) can ever be sent. - The same gates and stay rules as a Tulo app booking apply: see Stay rules. A broken rule is
422 validation_failed; a night that is no longer open is409 no_availability. - To book several rooms of one type as one booking, send
rooms[]instead ofroom_type_id,adults,childrenandbeds: see Several rooms in one booking.
{
"booking": {
"id": "5f0c2a1e-8b7d-4c3a-9e21-0d6f4b8a7c11",
"place_id": "c4a1e7b2-3d5f-4e69-8a0b-1c2d3e4f5a6b",
"room_type_id": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
"status": "confirmed",
"status_label": "Confirmed",
"source": "website",
"check_in": "2026-12-01",
"check_out": "2026-12-03",
"nights": 2,
"adults": 2,
"children": 0,
"beds": 1,
"stay_total": 90000,
"currency": "ZMW",
"payment": "pay_at_property",
"created_at": "2026-11-13T10:00:00Z",
"confirmed_at": "2026-11-13T10:00:00Z",
"cancelled_at": null,
"checked_in_at": null,
"checked_out_at": null
}
}Only the website's own bookings#
A website sees and cancels only bookings that its property's keys created through this API. Any other booking id, including Tulo app bookings and walk-ins at the same property, reads as 404 not_found. All secret keys of a property act as one website.
List bookings#
GET /bookings?from=&to= returns the website's bookings with check-in between from and to, both inclusive and at most 366 days apart, oldest check-in first. Filter with status; limit is 1 to 500, default 100. Use it to reconcile your records with Tulo's, for example nightly.
import { privateKeyFromPem, tuloRequest } from "./tulo-signing.mjs";
const auth = {
secretKey: process.env.TULO_SECRET_KEY,
keyId: process.env.TULO_SIGNING_KEY_ID,
privateKey: privateKeyFromPem(process.env.TULO_SIGNING_PRIVATE_KEY),
};
const { bookings } = await tuloRequest({
...auth,
method: "GET",
pathWithQuery: "/partner/v1/bookings?from=2026-12-01&to=2026-12-31&status=confirmed",
});Read and cancel one booking#
GET /bookings/{id} returns one booking. POST /bookings/{id}/cancel cancels it for the guest and returns it with status cancelled_by_guest. Only a confirmed booking the guest has not checked into can be cancelled; anything else is 409 not_cancellable. A cancel through the API cancels every room of the booking.
import { privateKeyFromPem, tuloRequest } from "./tulo-signing.mjs";
const auth = {
secretKey: process.env.TULO_SECRET_KEY,
keyId: process.env.TULO_SIGNING_KEY_ID,
privateKey: privateKeyFromPem(process.env.TULO_SIGNING_PRIVATE_KEY),
};
const id = "5f0c2a1e-8b7d-4c3a-9e21-0d6f4b8a7c11";
const { booking } = await tuloRequest({ ...auth, method: "GET", pathWithQuery: `/partner/v1/bookings/${id}` });
// Cancel for the guest. No Idempotency-Key: cancelling twice answers 409 not_cancellable.
const { booking: cancelled } = await tuloRequest({
...auth,
method: "POST",
pathWithQuery: `/partner/v1/bookings/${id}/cancel`,
});Statuses and lifecycle#
A website booking is created confirmed and can end in one of three ways:
| status | Meaning |
|---|---|
| confirmed | Booked. Every website booking starts here. |
| cancelled_by_guest | Cancelled through this API (the guest cancelled on your site). |
| cancelled_by_property | Cancelled by the property at the desk. |
| no_show | The property marked that the guest did not arrive. It can go back to confirmed if the property undoes it the same day. |
Check-in and check-out do not change the status: they set checked_in_at and checked_out_at. status_label is an English label you can show as it is.
Statuses you only see in webhooks#
Webhooks report every booking at the property, so they can carry statuses that only Tulo app bookings go through: checking_availability, held_pending_payment, expired_unpaid, confirming, failed_rejected, failed_timeout, refunded. Treat a status you do not know as not staying.
Guest fields#
guest(name,phone) is present only on bookings this website created, in API responses and webhooks alike.- No response or webhook ever carries an ID document number.
- On a booking with several rooms, each room may list who sleeps in it (
rooms[].guests, names only), again only on the website's own bookings.
