Test with Postman
Every endpoint under /api/v1/channel is in a Postman v2.1 collection, grouped by domain,
each with a sample body and a response recorded on the sandbox. Every request carries its tests:
HTTP status, envelope, expected fields. Request descriptions are in French, then English.
It also carries documented examples, whose name starts with “Exemple documenté”: the responses the sandbox does not produce on demand (401, 403, 404, 409, 429, validation errors) and the read-back of a complete property, in the exact server format. The “Send a test event” request carries, as examples, the body and headers of every webhook.
There is no “Run in Postman” button: it would require hosting the collection in a public Postman workspace, which would make you depend on a third-party account. Importing by file or by link does the same in one step, and always gives you the latest version.
What the scenario does
Section titled “What the scenario does”Run in full on the sandbox, the collection plays a complete integration, in order:
| Step | Requests |
|---|---|
| Account | instance, GET /ping, compliance |
| Hosts | exchange of the authorization code for a host_ref |
| Listings | idempotent creation, COMPLETE property (every field) and MINIMAL property (two fields), update, full read back, cursor pagination, photos, bulk import |
| Lifecycle | pause, reactivation |
| Rates and availability | nightly prices, restrictions, closing and reopening nights, calendar read back |
| Reservations | send, replay (idempotency), update, read back, catch-up, cancellation |
| Messaging, reviews | write to the guest, read the conversation, read reviews |
| Webhooks | declare the URL, send a test, verify the signature, list and retry deliveries |
| Events | read back everything that was emitted |
| Sandbox | simulate a Localoge reservation, its update, a message, a review, validation, cancellation; test inbox |
| Cleanup | archive the test listing |
Identifiers chain automatically: the listing, reservation, import and delivery ids, the webhook
secret and the simulated reservation are kept in collection variables and reused by the next
requests. Vérifier sa clé (ping) starts a new test run: new dates (200 to 320 days ahead) and a
new reservation id.
Signature verification
Section titled “Signature verification”Without a webhookUrl variable, Déclarer son URL de réception points to the Localoge mirror
(https://sandbox.localoge.com/webhook-echo/<your-slug>). Vérifier la signature du webhook reçu
reads what the mirror received and redoes, inside Postman, the computation your server must do:
// X-Localoge-Signature: t=<timestamp>,v1=<hmac>const [, t, v1] = /^t=(\d+),v1=([0-9a-f]+)$/.exec(signature);const expected = CryptoJS.HmacSHA256(`${t}.${rawBody}`, whsecSecret).toString(CryptoJS.enc.Hex);// expected === v1, compared in constant time; reject if |now - t| > 300 sThe webhook leaves on the sender’s next pass, within a minute: in the collection runner, the request re-runs itself every 10 seconds until it arrives.
⚠️ Every PUT /webhooks produces a new secret and invalidates the previous one. Set
webhookUrl to your own address when you want to test your server.
Collection safeguards
Section titled “Collection safeguards”- No key in the files.
apiKeyis empty in both environments. The collection refuses to run without a key, or with a key from the wrong environment (lok_test_on the sandbox,lok_live_in production). - Production: read-only by default. Every write (creation, reservation, webhook…) is skipped
until the
autoriserEcrituresProductionvariable is set tooui. Running the whole collection in production therefore creates nothing. Exchanging a host authorization code stays allowed: it is the only way to obtain ahost_ref. - Reset on confirmation.
Remettre le sandbox à zérodeletes all your test listings: it is skipped untilconfirmerRemiseAZerois set tooui. - Simulator and test inbox requests are skipped outside the sandbox.
From the command line
Section titled “From the command line”The same collection runs without Postman, with Newman, for instance in your CI:
npx newman run https://developers.localoge.com/postman/localoge-channel-api.postman_collection.json \ -e https://developers.localoge.com/postman/localoge-sandbox.postman_environment.json \ --env-var "apiKey=$LOCALOGE_TEST_KEY"The OpenAPI specification remains the reference for the contract; the collection is its runnable version.