Testing
Build against Tulo's demo property with its own keys, check your signing code against the published test vectors, then certify against a test property.
The demo property#
There is one API, at https://api.tulo.homes/partner/v1. To build without touching a real property, ask Tulo for keys to its demo property at support@mail.tulo.homes or WhatsApp +260 77 235 2417: a secret key, a publishable key for your development origins, a registered signing key and, if you want them, webhooks to your test server. On a real property (from 1.4.1) a manager makes the keys and registers your signing key in the Tulo console under Settings, then API keys.
To check the browser path from your page: from one of the publishable key's origins, fetch("https://api.tulo.homes/partner/v1/place", { headers: { "X-Api-Key": key } }) succeeds (from 1.4.1); the same call from any other origin is blocked by the browser, and with curl and that other Origin header it answers 403 origin_not_allowed.
- The demo is a property on the Tulo console like any other, hidden from travellers in the Tulo app.
- It books like any property: the same gates, stay rules, idempotency, signatures and webhooks, so what works there works on a real property.
- Demo keys reach only the demo, and no other property's key reaches it. Tulo can reset the demo, which clears its bookings.
Signing test vectors#
partner-v1-signing-test-vectors.json has a fixed key pair, payloads and the exact signatures they produce. Run your signer and verifier against it in your own test suite:
| Vector | What it covers |
|---|---|
| request | The website's server to Tulo. Sign with website_key.private_seed; Tulo verifies with the registered public_key over signing_string = "v1." + METHOD + "." + path_with_query + "." + timestamp + "." + nonce + "." + hex(sha256(body)). |
| request_empty_body | A GET with a query string and no body: the body hash is the SHA-256 of zero bytes. Same website_key as request. |
| request_multi_room | A multi-room create (partner API 1.4.0): rooms[] instead of the top-level room_type_id and adults. Same website_key and signing rule as request; the signature covers the exact body bytes, so a changed room list does not verify. |
| webhook | Tulo to the website. Verify with tulo_key.public_key over signing_string = "v1." + delivery_id + "." + timestamp + "." + body (the exact raw body bytes). |
The must_fail list has 7 cases your verifier must reject. The Signing page walks through them.
Checks you can run without Tulo#
- Your signer reproduces every valid request vector byte for byte.
- Your webhook verifier accepts the webhook vector at its timestamp and rejects every must-fail case.
- Your webhook endpoint answers a repeated
X-Tulo-Delivery-Idwith 2xx and acts once. - Your client ignores fields, event names, statuses and night reasons it does not know.
- Your webhook endpoint answers within 10 seconds and handles every event in the event list, including
booking.createdandbooking.unit_moved. - Your
POST /bookingsretry keeps the sameIdempotency-Keyand body after a timeout or a5xx, and treatsIdempotency-Persistence: degradedas a made booking.
When those pass, work through the Certification checklist on the demo or a test property.
