Developers · API version 2026-11-22

Sell HotelDesk properties on your platform

One JSON API for the properties that choose to work with you: their rooms, photos, nightly availability and prices, bookings straight into their calendar, and signed webhooks the moment anything changes.

Overview

HotelDesk runs the front desk of hotels, hostels and guesthouses: their rooms, prices and calendar. The Partner API lets your platform show those properties and take bookings for them, with the same availability and prices the property's own website and its OTAs get.

  • You get credentials from HotelDesk: a key id and a secret, plus a webhook signing secret. Each property you can sell is connected to your account once its owner agrees.
  • You read properties, room types and photos, then nightly availability, prices and stay rules.
  • You book one room (or one dorm bed) per booking. HotelDesk chooses the room, as it does for every channel, and may re-assign other guests to make space, so a stay is never refused while rooms can be moved around.
  • We tell you about every change by webhook: new availability or prices, and any change to your bookings made at the hotel.

Base URL: https://hoteldesk.tech/api/partner/v1

Authentication

Every request carries your key id (hdpk_live_… or hdpk_test_…) and secret (hdsk_…). Use HTTP Basic auth: key id as the username, secret as the password. Two other forms are accepted if Basic is awkward in your stack:

Any one of these
Authorization: Basic base64(hdpk_live_…:hdsk_live_…)
Authorization: Bearer hdpk_live_…:hdsk_live_…
X-HotelDesk-Key: hdpk_live_…   +   X-HotelDesk-Secret: hdsk_live_…

Keep the secret on your servers: never in an app, a browser or a repository. HotelDesk stores only a fingerprint of it, so a lost secret can't be recovered. Ask us for a new one and the old one stops working at once.

Quick start

1. Check your credentials
curl -u "$HD_KEY:$HD_SECRET" https://hoteldesk.tech/api/partner/v1/me
2. List the properties you can sell
curl -u "$HD_KEY:$HD_SECRET" https://hoteldesk.tech/api/partner/v1/properties
3. Availability and prices for the next 30 nights
curl -u "$HD_KEY:$HD_SECRET" "https://hoteldesk.tech/api/partner/v1/properties/$PROPERTY_ID/availability?from=2027-01-10&to=2027-02-09"
4. Price one stay
curl -u "$HD_KEY:$HD_SECRET" "https://hoteldesk.tech/api/partner/v1/properties/$PROPERTY_ID/quote?roomTypeId=$ROOM_TYPE_ID&checkIn=2027-01-14&checkOut=2027-01-17&guests=2"
5. Book it
curl -u "$HD_KEY:$HD_SECRET" -X POST https://hoteldesk.tech/api/partner/v1/properties/$PROPERTY_ID/bookings \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: IS-104233" \
  -d '{
    "roomTypeId": "'$ROOM_TYPE_ID'",
    "checkIn": "2027-01-14",
    "checkOut": "2027-01-17",
    "adults": 2,
    "guest": { "name": "Ana Souza", "email": "ana@example.com", "phone": "+55 11 91234 5678" },
    "totalAmount": 4350,
    "externalReference": "IS-104233"
  }'
201 Created
{
  "data": {
    "id": "8a3f1c2e-…",
    "reference": "HD-7K2Q9P",
    "propertyId": "prop_…",
    "roomTypeId": "rt_…",
    "roomNumber": "204",
    "status": "confirmed",
    "checkIn": "2027-01-14",
    "checkOut": "2027-01-17",
    "adults": 2,
    "children": 0,
    "guest": {
      "name": "Ana Souza",
      "email": "ana@example.com",
      "phone": "+55 11 91234 5678"
    },
    "total": {
      "amount": 4350,
      "currency": "THB"
    },
    "externalReference": "IS-104233",
    "createdAt": "2026-12-02T09:41:12.000Z",
    "updatedAt": "2026-12-02T09:41:12.000Z"
  },
  "requestId": "req_9f2c…"
}

Conventions

  • JSON in, JSON out. Successful answers wrap the result in data. Lists that page also return page and hasMore.
  • Dates are YYYY-MM-DD in the property's own time zone (timezone on the property). Ranges are half-open: checkOut and to are the first day not included, so a stay from 14 to 17 January is three nights.
  • Money is { "amount": 4350, "currency": "THB" } in the property's currency, in major units (4350 means ฿4,350.00).
  • Ids are opaque strings. Store them as they are.
  • Every response has an X-Request-Id header (errors also have it in the body), plus HotelDesk-Version. Quote the request id when you contact us.
  • Idempotency. Send Idempotency-Key on every booking. A retry with the same key and body returns the first answer (with Idempotent-Replayed: true) for 24 hours, so a timeout never books twice.
  • Rate limit: about 120 requests a minute per key. Prefer webhooks to polling; if you poll, every 10 to 15 minutes is plenty.

Scopes

Every key can read the properties connected to it, their availability and prices, and (unless it is read-only) book and cancel. A key can also be given scopes that reach further into HotelDesk. Without the scope, those endpoints answer 403 missing_scope. GET /me lists your key's scopes.

ScopeWhat it opens
leads:readEvery lead with contacts, research, stage, history and tasks
leads:writeAdd leads, change stage and details, add notes and tasks. Nothing is deleted or emailed
scout:readThe Koh Phangan walk list, visit reports, who holds each place, research contributed
scout.people:readScouts, their check-ins with locations, ranks and paid conversions
research:readWhat each lead-research run added and enriched
pricing:readMarket snapshot, competitor rates, events and advice for connected properties

Endpoints

MethodPathWhat it does
GET/meWho these credentials belong to
GET/propertiesProperties connected to your account
GET/properties/{propertyId}One property
GET/properties/{propertyId}/availabilityNightly availability, prices and stay rulesPer room type, per night in [from, to): units free, the night's price in the property's currency, and its stay rules. At most 366 nights per call. Past nights are left out.
GET/properties/{propertyId}/quotePrice and sellability of one stayThe total for one room (or dorm bed), night by night, exactly as the property's own booking site prices it. Holds nothing. A stay that can't be sold returns 200 with bookable: false and a reason.
GET/properties/{propertyId}/bookingsBookings you made at a property
POST/properties/{propertyId}/bookingsCreate a bookingOne room (or one dorm bed) for one stay. HotelDesk chooses the room and may re-assign other bookings to make space, the same as for every channel. For a group, create one booking per room or bed. Send an Idempotency-Key so a retried request never books twice; the same key with the same body returns the first answer for 24 hours.
GET/bookings/{bookingId}One booking, as it stands now
POST/bookings/{bookingId}/cancelCancel a bookingCancels a booking that hasn't started. Repeating it is safe. A guest who has checked in is the hotel's to handle (409).
GET/crm/leadsThe shared lead listEvery lead in the Sales CRM, most recently changed first, with contacts, research, drafts and where it stands. Scope leads:read.
POST/crm/leadsAdd leadsUp to 100 per call. A lead already in the CRM (same name, website or email) is matched, not duplicated; its blanks are filled only while it is still being researched. Scope leads:write.
GET/crm/leads/{leadId}One lead with history and tasks
PATCH/crm/leads/{leadId}Update a leadSend only the fields to change; null clears one. Editable: company, type, size, rooms, staff, contactName, role, email, phone, whatsapp, website, address, city, region, country, mapsUrl, linkedin, companyLinkedin, instagram, facebook, bookingUrl, hostelworldUrl, agodaUrl, airbnbUrl, tripadvisorUrl, rating, pms, pmsEvidence, whyFit, brief, nextAction, nextDate, notes, priority, stage. Logged on the lead under your name. Scope leads:write.
POST/crm/leads/{leadId}/notesAdd to a lead's history
POST/crm/leads/{leadId}/tasksAdd a follow-up taskAppears on CRM Today. Send your own ref so a retry returns the same task.
GET/crm/runsLead-research runsNewest first: region, how many leads each added, skipped and enriched, and its summary. Scope research:read.
GET/scout/placesEvery Koh Phangan place on the Scout walkWhat each place is, its current system and the evidence, the estimated cost, why it's a lead, every visit report, who holds it and research scouts added. Scout names only with scout.people:read. Scope scout:read.
GET/scout/scoutsScoutsEvery scout: name, email, rank, approval, check-ins and paid conversions. Scope scout.people:read.
GET/scout/checkinsGPS check-ins at placesNewest first, with latitude and longitude. Scope scout.people:read.
GET/properties/{propertyId}/pricingDynamic Pricing for a propertyThe mode, the latest market check (competitors, their prices per night or sold out, local events, area averages, summary, advice) and the day's suggested changes. Read only. Scope pricing:read.
POST/webhooks/testSend a signed ping to your webhook address

Availability response

{
  "data": {
    "propertyId": "prop_…",
    "currency": "THB",
    "from": "2027-01-10",
    "to": "2027-01-12",
    "roomTypes": [
      {
        "roomTypeId": "rt_…",
        "nights": [
          {
            "date": "2027-01-10",
            "available": 3,
            "rate": 1450,
            "minStay": 2,
            "maxStay": null,
            "closed": false,
            "closedToArrival": false,
            "closedToDeparture": false
          },
          {
            "date": "2027-01-11",
            "available": 1,
            "rate": 1450,
            "minStay": null,
            "maxStay": null,
            "closed": false,
            "closedToArrival": false,
            "closedToDeparture": false
          }
        ]
      }
    ]
  },
  "requestId": "req_…"
}

A night is sellable when available > 0 and closed is false. A stay must also respect the arrival night's minStay / maxStay, closedToArrival on check-in and closedToDeparture on check-out. The quote endpoint applies all of these for you, including one exception: a stay that exactly fills the gap between two bookings is always sellable, even under the minimum stay.

Room types

Each property lists its room types with kind: room (book by room, up to maxGuests) or dorm_bed (each booking is one bed for one guest). units is how many rooms or beds the type has. For a group, create one booking per room or bed; give them the same externalReference if they belong together on your side.

Booking flow

  1. Show prices from /availability (cached on your side, refreshed by webhooks).
  2. When a guest picks a stay, call /quote to confirm it's bookable and get the exact total.
  3. Take payment on your platform, then POST /bookings with an Idempotency-Key. Send what the guest paid as totalAmount; leave it out to use HotelDesk's quote.
  4. On 409 no_availability or 409 restricted the stay was taken or closed since you quoted: offer the guest something else or refund.
  5. To cancel, POST /bookings/{id}/cancel. Only bookings that haven't started can be cancelled this way; after check-in the hotel handles it.

The booking lands on the hotel's calendar straight away, marked as new, with your platform as the channel. Payment collected on your platform is settled between you and the property; HotelDesk records the amount but doesn't move money.

Webhooks

Give HotelDesk an https:// address and we POST a JSON event to it whenever something you sell changes. Answer with any 2xx within 8 seconds. Anything else is retried, after 1 minute, 5 minutes, 30 minutes, 2, 6, 12 and 24 hours (eight tries in all). Events can arrive more than once and out of order: use the event id to ignore duplicates, and re-read the resource when order matters.

EventWhen
booking.createdA booking you made was created.
booking.updatedOne of your bookings changed at the hotel: dates, room type or status (checked in, checked out, no-show).
booking.cancelledOne of your bookings was cancelled, by you or by the hotel.
availability.changedRooms free changed for these room types and nights. Re-read availability for the range.
rates.changedPrices or stay rules changed for these room types and nights. Re-read availability for the range.
property.grantedA property was connected to your account.
property.revokedA property was disconnected from your account.
pingA test from POST /webhooks/test or from HotelDesk.
booking.cancelled
{
  "id": "5d0b7e…",
  "type": "booking.cancelled",
  "apiVersion": "2026-11-22",
  "createdAt": "2026-12-03T02:10:44.000Z",
  "data": {
    "booking": {
      "id": "8a3f1c2e-…",
      "reference": "HD-7K2Q9P",
      "propertyId": "prop_…",
      "roomTypeId": "rt_…",
      "roomNumber": "204",
      "status": "cancelled",
      "checkIn": "2027-01-14",
      "checkOut": "2027-01-17",
      "adults": 2,
      "children": 0,
      "guest": {
        "name": "Ana Souza",
        "email": "ana@example.com",
        "phone": "+55 11 91234 5678"
      },
      "total": {
        "amount": 4350,
        "currency": "THB"
      },
      "externalReference": "IS-104233",
      "createdAt": "2026-12-02T09:41:12.000Z",
      "updatedAt": "2026-12-02T09:41:12.000Z"
    },
    "previous": {
      "status": "confirmed",
      "checkIn": "2027-01-14",
      "checkOut": "2027-01-17",
      "roomTypeId": "rt_…"
    }
  }
}
availability.changed (to is exclusive)
{
  "id": "c71a…",
  "type": "availability.changed",
  "apiVersion": "2026-11-22",
  "createdAt": "2026-12-03T02:10:44.000Z",
  "data": {
    "propertyId": "prop_…",
    "roomTypeIds": [
      "rt_…"
    ],
    "from": "2027-01-14",
    "to": "2027-01-17"
  }
}

Availability and price events say what changed, not the new values: re-read /availability for that range. Call POST /webhooks/test at any time to receive a signed ping.

Verifying signatures

Each webhook has a HotelDesk-Signature header: t=<unix seconds>,v1=<hex>, where the hex is HMAC-SHA256 of <t>.<raw request body> keyed with your webhook signing secret (whsec_…). Compute it over the raw body before parsing, compare in constant time, and reject events older than five minutes.

Node.js
import crypto from "node:crypto";

export function verifyHotelDesk(rawBody, header, secret) {
  const parts = Object.fromEntries(header.split(",").map((p) => p.split("=")));
  const t = Number(parts.t);
  if (!t || Math.abs(Date.now() / 1000 - t) > 300) return false;
  const expected = crypto.createHmac("sha256", secret).update(`${t}.${rawBody}`).digest("hex");
  const a = Buffer.from(expected), b = Buffer.from(parts.v1 ?? "");
  return a.length === b.length && crypto.timingSafeEqual(a, b);
}
Python
import hmac, hashlib, time

def verify_hoteldesk(raw_body: bytes, header: str, secret: str) -> bool:
    parts = dict(p.split("=", 1) for p in header.split(","))
    t = int(parts.get("t", "0"))
    if abs(time.time() - t) > 300:
        return False
    expected = hmac.new(secret.encode(), f"{t}.".encode() + raw_body, hashlib.sha256).hexdigest()
    return hmac.compare_digest(expected, parts.get("v1", ""))
PHP
function verify_hoteldesk(string $raw, string $header, string $secret): bool {
  parse_str(str_replace(',', '&', $header), $p);
  if (abs(time() - (int)($p['t'] ?? 0)) > 300) return false;
  $expected = hash_hmac('sha256', $p['t'] . '.' . $raw, $secret);
  return hash_equals($expected, $p['v1'] ?? '');
}

Errors

Errors share one shape. code is stable and safe to branch on; message is for people and may change.

{
  "error": {
    "code": "restricted",
    "message": "Minimum stay from 2027-01-14 is 3 nights.",
    "rule": "min_stay",
    "minStay": 3
  },
  "requestId": "req_4b1e…"
}
StatusCodesMeaning
400invalid_json · missing_fields · invalid_dates · invalid_guests · invalid_email · invalid_amount · range_too_longFix the request; the message says what.
401unauthenticated · invalid_credentialsNo credentials, or the key id and secret don't match.
403revoked · read_onlyCredentials were revoked, or can read but not book.
404property_not_found · room_type_not_found · booking_not_foundNot connected to your account (we don't say whether it exists).
409no_availability · restricted · not_cancellable · request_in_progress · no_webhookThe request was fine but can't be done now. restricted also returns rule, date, minStay or maxStay.
422idempotency_key_reusedSame Idempotency-Key, different body. Use a new key.
429rate_limitedAbout 120 requests a minute per key. Wait for Retry-After seconds.
500server_errorOur side. Safe to retry with the same Idempotency-Key; quote the requestId.

Testing

Start with test credentials (hdpk_test_…). They are connected only to demo hotels, so you can book, cancel and receive webhooks freely without touching a real calendar. When your integration works end to end, we issue live credentials and connect the properties that have agreed to sell through you.

A checklist we run with every partner before going live: credentials check (/me), property and room type import, a 365-night availability read, a quote, a booking with an Idempotency-Key and the same request repeated (one booking, the same answer), a cancellation, a refused stay (409), and webhooks verified with the signature check above.

OpenAPI spec

Everything on this page is also in machine-readable form, ready for Postman, Insomnia or a client generator: https://hoteldesk.tech/api/partner/v1/openapi.json (OpenAPI 3.1, webhooks included).

Questions, or ready to connect? Write to hello@hoteldesk.tech or use the contact page.