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#

Who calls what
FromKeyCalls
The visitor's browserPublishable key, bound to your origins/place, /calendar, /quote
Your website's serverSecret key and a signed request/quote, /bookings and the routes under it
TuloSigned with Tulo's own keyPOST {your base URL}/tulo/webhooks
Fig. 1 · Who calls what

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).

Endpoints
EndpointWhat it doesAuth
GET/signing-keysTulo's webhook signing public keysNone
GET/placeThe place's website contentPublishable or secret key
GET/calendarAvailability, nightly rates and stay rules per room type per nightPublishable or secret key
GET/quotePrice a stayPublishable or secret key
GET/bookingsThe website's own bookings, for reconciliationSecret key, signed
POST/bookingsBook a staySecret key, signed
GET/bookings/{id}One of the website's own bookingsSecret key, signed
POST/bookings/{id}/cancelCancel one of the website's own bookings for the guestSecret key, signed

Formats#

  • Requests and responses are JSON. Money is an integer in ngwee (100 ngwee = K1), always with a currency (today always ZMW).
  • Dates are YYYY-MM-DD calendar dates in Africa/Lusaka. A stay runs from check_in (the first night) to check_out (the departure day, not a night). Times of day are HH:MM in Africa/Lusaka; timestamps are RFC 3339 in UTC.
  • Every error has the same shape, {"error": {"code": "...", "message": "..."}}. Branch on code; 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.

Questions? Email support@mail.tulo.homes or WhatsApp +260 77 235 2417.