Quendoo DEVELOPERS API documentation →
Developers » Webhooks

Webhooks

Instead of asking us again and again whether something changed, give us a URL and we call it when something does. You register webhooks in your Quendoo agency account, under B2B → Webhooks. The same page lists every call we made and how your server answered. If you do not see the page, ask us to turn webhooks on for your account.

What you can subscribe to

Webhook Sent when payload
booking One of your bookings is created, changed, confirmed or cancelled, including by the hotel The booking, exactly as GET /booking returns it with locale=en
availability Availability changes on a room you can sell The changed range, in the shape of GET /availabilities
rates-restrictions Prices or restrictions change on a rate plan you can sell The changed range, in the shape of GET /rates-restrictions

The availability and rates-restrictions payloads cover only the properties and rooms you may sell, and only the nights that changed:

A resync is the exception: it comes as one call per webhook, covering every property you named and every room for the whole range.

What we send

A POST to your URL, with Content-Type: application/json and this body:

{
  "timestamp": 1784123456,
  "nonce": "9f2c4e0b7a1d4c3e8b6a5f0e1d2c3b4a",
  "webhook": "booking",
  "sequence": 1842,
  "payload": { "id": 712904, "booking_status": "APPROVED" }
}

The payload above is shortened. A real one is the full booking.

Nights or ranges

By default, availability and rates-restrictions list every night on its own, exactly as GET /availabilities and GET /rates-restrictions do:

"dates": [
  { "date": "2027-07-01", "qty": 3 },
  { "date": "2027-07-02", "qty": 3 },
  { "date": "2027-07-03", "qty": 1 }
]

You can choose ranges instead, for each webhook, on the B2B → Webhooks page. Consecutive nights with exactly the same values then come as one entry, and the body carries "format": "ranges":

"dates": [
  { "date_from": "2027-07-01", "date_to": "2027-07-02", "qty": 3 },
  { "date_from": "2027-07-03", "date_to": "2027-07-03", "qty": 1 }
]

The same applies to a rate's restrictions and to each accommodation's prices. Both dates are included: date_to is the last night, not the departure day.

Switch to ranges only after your system reads them. The change applies to the next call.

Checking that it came from us

Every call carries the header X-Signature-SHA256: an HMAC-SHA256 of the raw request body, keyed with the shared secret of the webhook, as a hex string.

$body = file_get_contents('php://input');
$expected = hash_hmac('sha256', $body, base64_decode($secret));

if (! hash_equals($expected, $_SERVER['HTTP_X_SIGNATURE_SHA256'] ?? '')) {
    http_response_code(401);
    exit;
}

Answering

Asking for a range again

If you missed deliveries — your server was down, or a call kept failing for two hours — ask for the range again instead of pulling it window by window:

POST /webhooks/resync
{
  "webhook": "availability",
  "date_from": "2027-07-01",
  "date_to": "2027-07-31",
  "properties": [63]
}

We queue one delivery per webhook you registered for it, and it reaches you like any other call. The answer is {"queued": 1, "webhook": "availability", "date_from": "…", "date_to": "…"}. You can ask 30 times an hour; only accepted requests count.

It is refused:

Webhooks and syncing

Webhooks tell you quickly. They are not a guarantee: your server can be down for longer than the retries last. Keep a nightly full sync of prices and availability as the safety net, and use webhooks to stay current between syncs.