Website API
Show a property's live rates and availability on its own website, and take bookings that land in the same Tulo console as every other booking. A night booked on the website is gone in the Tulo app too.
Version 1.4.1 · https://api.tulo.homes/partner/v1
What it does#
The website API (partner API v1) lets a property's own website, built by the property or by a studio working for it, do four things:
- Read the property's content: description, address, photos, amenities, stay policies and room types.
- Read a night-by-night calendar of availability, rates and stay rules, and price a stay.
- Create a booking, read the website's own bookings and cancel one for the guest.
- Receive a signed webhook whenever a booking at the property changes.
A booking made through the API is confirmed at once and appears in the property's Tulo console with source website. It counts against the same availability as Tulo app bookings and the property's own walk-in and phone reservations.
Who it is for#
Developers building the website of a property that runs its reservations on the Tulo console. Every key belongs to exactly one property, so there are no property ids in the URLs: the key says which property you are talking to.
How the pieces fit#
| From | Key | Calls |
|---|---|---|
| The visitor's browser | Publishable key, bound to your origins | /place, /calendar, /quote |
| Your website's server | Secret key and a signed request | /quote, /bookings and the routes under it |
| Tulo | Signed with Tulo's own key | POST {your base URL}/tulo/webhooks |
Reading is safe from the browser. Anything that touches a booking runs on your server, with a secret key and an Ed25519 signature made with a key pair only your server holds. See Keys and authentication and Signing requests.
Base URL#
Every path in these docs is relative to https://api.tulo.homes/partner/v1. There is one environment; you test against a demo property with its own keys (see Testing).
| Endpoint | What it does | Auth |
|---|---|---|
| GET/signing-keys | Tulo's webhook signing public keys | None |
| GET/place | The place's website content | Publishable or secret key |
| GET/calendar | Availability, nightly rates and stay rules per room type per night | Publishable or secret key |
| GET/quote | Price a stay | Publishable or secret key |
| GET/bookings | The website's own bookings, for reconciliation | Secret key, signed |
| POST/bookings | Book a stay | Secret key, signed |
| GET/bookings/{id} | One of the website's own bookings | Secret key, signed |
| POST/bookings/{id}/cancel | Cancel one of the website's own bookings for the guest | Secret key, signed |
Formats#
- Requests and responses are JSON. Money is an integer in ngwee (100 ngwee = K1), always with a
currency(today alwaysZMW). - Dates are
YYYY-MM-DDcalendar dates in Africa/Lusaka. A stay runs fromcheck_in(the first night) tocheck_out(the departure day, not a night). Times of day areHH:MMin Africa/Lusaka; timestamps are RFC 3339 in UTC. - Every error has the same shape,
{"error": {"code": "...", "message": "..."}}. Branch oncode; see Errors.
Versioning#
The version is in the path (/partner/v1) and in the contract, now at 1.4.1. Every change within v1 is additive: new optional fields, parameters and webhook events. Ignore fields and event names you do not know, and never build a validator that rejects them. The Changelog lists every version.
