hostech.ai developersAPI version 2026-12-01

Lumin API and webhooks

Read your hotel's bookings, availability, rates, reports and invoices over a read-only REST API, and receive signed webhooks when something happens. Every plan has both. Nothing here changes a booking, a rate or a payment.

Authentication

Base address https://api.hostech.ai/v1. A director creates a key in Lumin under Settings, Connectivity, API keys, and picks its scopes, optionally the hotels it may see, an expiry date and the addresses it may be used from. The key looks like lumin_live_<id>_<secret> and is shown once: Lumin keeps only a hash of it and the last four characters. Send it on every request.

curl https://api.hostech.ai/v1/hotels \
  -H "Authorization: Bearer lumin_live_abcd1234_yourSecretHere"

A key reaches its own organisation's data and nothing else. A key that is missing, unknown, revoked or expired answers 401; one used from an address outside its list, or without the scope an endpoint needs, answers 403. Rotating a key makes a new one with the same scopes, hotels, addresses and expiry; the old key keeps working for 0, 1, 7 days as the director chooses, then stops. Revoking stops a key at once. An organisation may hold 10 live keys.

Scopes

ScopeGives
hotels:readYour hotels, their room types and room counts.
reports:readOccupancy, ADR, RevPAR, revenue by night and by channel, and what is on the books.
finance:readIssued invoices: number, date, status and amounts. No client names.
bookings:readBookings and webhook events, without the guest's personal details unless the key has them.
availability:readRooms left to sell per room type per night, and stop-sells.
rates:readThe rate calendar and its restrictions, and a price quote for dates.

A scope may be ticked even where the hotel does not use that part of Lumin yet: its lists then come back empty.

Guest details

Off by default. A director switches Guest details on for one key, and every response that carried them is written to the audit trail.

Without the switch, no answer contains a guest's name, phone number or email, nor nationality, identity number, address, signature, notes, special requests or messages. With it, /v1/bookings, /v1/bookings/{id} and /v1/events/{id} add a guest object with exactly name, phone, email and nothing more of the guest. Treat these as personal data under the Personal Data Protection Act 2010: keep what you need, protect it, delete it when you no longer need it. Switching the option off takes effect on the next request. A new or rotated key starts with it off. Room numbers appear only once the guest is in the house.

Conventions

Errors

Every error has the same shape:

{ "error": { "code": "insufficient_scope", "message": "This API key does not have the bookings:read scope.", "request_id": "req_..." } }
CodeMeaning
invalid_api_key401. The key is missing, malformed or unknown.
key_expired401. The key's expiry date has passed.
key_revoked401. The key was revoked or rotated out.
ip_not_allowed403. The key is limited to other addresses.
insufficient_scope403. The key lacks the scope this endpoint needs.
organization_not_active403. The organisation's account is not active.
api_paused503. The API is paused for now; retry later.
rate_limited429. Wait the number of seconds in Retry-After.
not_found404. No such endpoint, hotel, booking or event for this key.
method_not_allowed405. The API is read-only.
invalid_parameter400. A parameter has the wrong type, range or length.
unknown_parameter400. A parameter this endpoint does not take.
hotel_required400. Name a hotel_id: the key sees too many hotels for one call.
quote_unavailable422. The hotel does not sell through Lumin yet, so there is no price to quote.
internal_error500. Quote the request_id when you ask for help.

Rate limits

120 requests a minute per key, and 300 a minute and 100,000 a day per organisation. Every answer carries RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset (seconds). Past a limit the answer is 429 with Retry-After. Every request is kept in the hotel's request log for 30 days (the key, the path, the status, the time it took, the number of rows and the address; never a body) and shown under the key.

Endpoints

The OpenAPI 3.1 document is at https://api.hostech.ai/v1/openapi.json; this reference is made from the same registry.

hotels:read

GET /v1/hotels

Your hotels (or the ones this key is limited to), with room counts. Scope hotels:read.

Parameters

NameInDescription
limitqueryinteger, default 50. Rows per page, 1 to 200.
starting_afterquerystring. The next_cursor of the page before.

Answer (a list: data, has_more, next_cursor)

FieldTypeNotes
idstring
namestring
currencystring
time_zonestring
room_countinteger
room_type_countinteger

GET /v1/hotels/{id}/room-types

The room types of one hotel and how many rooms each has. Scope hotels:read.

Parameters

NameInDescription
idpath, requiredstring. The hotel's id.

Answer (a list: data, has_more, next_cursor)

FieldTypeNotes
hotel_idstring
namestring
roomsinteger

reports:read

GET /v1/reports/occupancy

Occupancy for a period, one entry per hotel, with a row per night. Scope reports:read.

Parameters

NameInDescription
hotel_idquerystring. Only this hotel. A hotel that is not yours answers 404.
fromquery, requireddate. First night (YYYY-MM-DD).
toquery, requireddate. Last night (YYYY-MM-DD), at most 366 nights after from.

Answer (a list: data, has_more, next_cursor)

FieldTypeNotes
hotel_idstring
fromstring (date)
tostring (date)
kindstring: past, running, futurepast: complete. running: today is inside (figures to date). future: on the books only.
roomsinteger
available_room_nightsinteger
room_nights_soldinteger
occupancy_pctnumber
by_daylist of object

GET /v1/reports/revenue

Revenue, ADR and RevPAR for a period by the Revenue page's own rule, one entry per hotel, with a row per night and the channel mix of the last 90 days. Scope reports:read.

Parameters

NameInDescription
hotel_idquerystring. Only this hotel. A hotel that is not yours answers 404.
fromquery, requireddate. First night (YYYY-MM-DD).
toquery, requireddate. Last night (YYYY-MM-DD), at most 366 nights after from.

Answer (a list: data, has_more, next_cursor)

FieldTypeNotes
hotel_idstring
fromstring (date)
tostring (date)
currencystring
kindstring: past, running, future
revenuestringRoom revenue as booked, by the same rule as the Revenue page.
netstringWhat the hotel keeps after the estimated OTA commission.
adrstringA decimal string with two places.
revparstringA decimal string with two places.
bookingsinteger
by_daylist of object
by_channellist of object
by_channel_windowobjectThe channel table always covers the last 90 days up to today, whatever from and to say.

GET /v1/reports/on-the-books

Rooms already booked for each of the coming nights, one entry per hotel. Scope reports:read.

Parameters

NameInDescription
hotel_idquerystring. Only this hotel. A hotel that is not yours answers 404.
daysqueryinteger, default 30. How many nights from today.

Answer (a list: data, has_more, next_cursor)

FieldTypeNotes
hotel_idstring
roomsinteger
nightslist of object

finance:read

GET /v1/invoices

Issued invoices in id order: number, date, status and amounts. No client name, no line text, no document. Drafts and sponsorships are not listed. Scope finance:read.

Parameters

NameInDescription
hotel_idquerystring. Only this hotel. A hotel that is not yours answers 404.
statusqueryone of sent, paid, cancelled, pending_payment, partially_paid. Only this status.
date_fromquerydate. Invoices dated on or after this day.
date_toquerydate. Invoices dated on or before this day, at most 366 days after date_from.
modified_sincequerydatetime. Only rows changed at or after this moment (ISO 8601).
limitqueryinteger, default 50. Rows per page, 1 to 200.
starting_afterquerystring. The next_cursor of the page before.

Answer (a list: data, has_more, next_cursor)

FieldTypeNotes
idstring
numberstring
hotel_idstring
datestring (date)
statusstring: sent, paid, cancelled, pending_payment, partially_paid
subtotalstringA decimal string with two places.
taxstringA decimal string with two places.
totalstringA decimal string with two places.
currencystring
paid_atstring or null (date-time)
created_atstring (date-time)
modified_atstring (date-time)

bookings:read

GET /v1/bookings

Bookings in id order. Filter by hotel, status, arrival dates or the moment they last changed. The guest's details are added only for a key that has Guest details switched on. Scope bookings:read. Carries guest details only for a key that has them.

Parameters

NameInDescription
hotel_idquerystring. Only this hotel. A hotel that is not yours answers 404.
statusqueryone of booked, in_house, checked_out, cancelled, no_show. Only this status.
arrival_fromquerydate. Arrivals on or after this date.
arrival_toquerydate. Arrivals on or before this date, at most 366 nights after arrival_from.
modified_sincequerydatetime. Only rows changed at or after this moment (ISO 8601).
limitqueryinteger, default 50. Rows per page, 1 to 200.
starting_afterquerystring. The next_cursor of the page before.

Answer (a list: data, has_more, next_cursor)

FieldTypeNotes
idstringThe booking's id.
hotel_idstring
booking_numberstring
statusstring: booked, in_house, checked_out, cancelled, no_show
sourcestringWhere the booking came from (a channel name).
arrivalstring (date)
departurestring (date)
nightsinteger
roomslist of object
adultsinteger
childreninteger
totalstringA decimal string with two places.
currencystring
balance_duestringA decimal string with two places.
created_atstring (date-time)
modified_atstring (date-time)
guestGuest, optional

GET /v1/bookings/{id}

One booking, with its payments (amount, method and time only). Scope bookings:read. Carries guest details only for a key that has them.

Parameters

NameInDescription
idpath, requiredstring. The booking's id.

Answer

FieldTypeNotes
idstringThe booking's id.
hotel_idstring
booking_numberstring
statusstring: booked, in_house, checked_out, cancelled, no_show
sourcestringWhere the booking came from (a channel name).
arrivalstring (date)
departurestring (date)
nightsinteger
roomslist of object
adultsinteger
childreninteger
totalstringA decimal string with two places.
currencystring
balance_duestringA decimal string with two places.
created_atstring (date-time)
modified_atstring (date-time)
guestGuest, optional
paymentslist of object

GET /v1/events/{id}

A webhook event's body again, by the id its delivery carried (evt_...). Guest details only for a key that has them. Scope bookings:read. Carries guest details only for a key that has them.

Parameters

NameInDescription
idpath, requiredstring. The event's id, with or without the evt_ prefix.

Answer

FieldTypeNotes
idstringevt_ followed by the event's id.
typestring
api_versionstring
created_atstring or null (date-time)
hotel_idstring
dataobjectThe event's own fields, as the webhook sends them (docs: outbound webhooks). Guest details only for a key that has them.

availability:read

GET /v1/availability

Rooms left to sell for each room type and night of one hotel, and whether a stop-sell closes the night. Scope availability:read.

Parameters

NameInDescription
hotel_idquery, requiredstring. Only this hotel. A hotel that is not yours answers 404.
fromquery, requireddate. First night (YYYY-MM-DD).
toquery, requireddate. End date, the first night NOT covered (YYYY-MM-DD), at most 366 nights after from.

Answer (a list: data, has_more, next_cursor)

FieldTypeNotes
hotel_idstring
room_typestring
nightslist of object

rates:read

GET /v1/rates

The calendar price and the restrictions of each room type and night of one hotel. Scope rates:read.

Parameters

NameInDescription
hotel_idquery, requiredstring. Only this hotel. A hotel that is not yours answers 404.
room_typequerystring. Only this room type.
fromquery, requireddate. First night (YYYY-MM-DD).
toquery, requireddate. End date, the first night NOT covered (YYYY-MM-DD), at most 366 nights after from.

Answer (a list: data, has_more, next_cursor)

FieldTypeNotes
hotel_idstring
room_typestring
nightslist of object

GET /v1/quote

What a stay would cost, computed the way the booking engine computes it. Nothing is booked, held or stored. Scope rates:read.

Parameters

NameInDescription
hotel_idquery, requiredstring. Only this hotel. A hotel that is not yours answers 404.
fromquery, requireddate. Arrival date (YYYY-MM-DD).
toquery, requireddate. Departure date, the first night NOT covered (YYYY-MM-DD), at most 366 nights after from.
adultsqueryinteger, default 2. Adults.
childrenqueryinteger, default 0. Children.
room_typequerystring. Only this room type.

Answer

FieldTypeNotes
hotel_idstring
fromstring (date)
tostring (date)
nightsinteger
adultsinteger
childreninteger
currencystring
cancellationobject
roomslist of object

Webhooks

Lumin sends an HTTPS POST to an address registered under Settings, Connectivity, Webhooks. A new address starts paused and goes active once a test ping answers 2xx. An organisation may have up to 10 addresses, one per host. Events carry ids and figures, never a guest's personal data unless a director switched Guest details on for that address (only booking, stay and payment events: booking.created, booking.modified, booking.cancelled, stay.checked_in, stay.checked_out, payment.received, payment.refunded); fetch more with the API using the ids.

EventWhen
booking.createdA booking is made, from any source.
booking.modifiedDates, room type, room, guests, total or a time changed. data.changed lists which.
booking.cancelledA booking is cancelled.
stay.checked_inThe guest is checked in.
stay.checked_outThe guest is checked out.
payment.receivedA payment or deposit is recorded.
payment.refundedA refund is recorded.
invoice.issuedAn invoice is raised.
conversation.handed_offThe guest assistant hands a chat to staff.
pingThe Test button.

The request

POST /your/path HTTP/1.1
Content-Type: application/json
User-Agent: Lumin-Webhooks/1
Lumin-Event-Id: evt_cm4x...
Lumin-Delivery-Id: dlv_cm4y..._1
Lumin-Timestamp: 1796181845
Lumin-Signature: t=1796181845,v1=5c1f...

{ "id": "evt_cm4x...", "type": "booking.created", "api_version": "2026-12-01", "created_at": "2026-12-02T04:13:53.000Z", "hotel_id": "anggerik", "data": { ... } }

Verify the signature

Lumin-Signature is t=<unix seconds>,v1=<hex>, where v1 is HMAC-SHA256 of "<t>.<raw body>" with the address's signing secret (whsec_..., shown once). During the 24 hours after a rotation the header carries two v1 values: accept either.

  1. Read the raw body before any JSON parsing.
  2. Reject a timestamp more than 5 minutes (300 seconds) from your own clock. This is the replay window.
  3. Compute the HMAC and compare in constant time.
  4. De-duplicate on Lumin-Event-Id: a retry keeps the event id and takes a new delivery id and a fresh timestamp. Remember ids for at least 48 hours, and 30 days where a repeat matters, since a director can send a delivery again from the log.
  5. Answer 2xx within 5 seconds and do the work afterwards.

Node.js

import { createHmac, timingSafeEqual } from "node:crypto"

export function verify(header, rawBody, secret, nowSeconds = Math.floor(Date.now() / 1000)) {
  const parts = String(header).split(",")
  const t = parts.find((p) => p.startsWith("t="))?.slice(2)
  const sigs = parts.filter((p) => p.startsWith("v1=")).map((p) => p.slice(3))
  if (!t || !sigs.length || Math.abs(nowSeconds - Number(t)) > 300) return false
  const want = createHmac("sha256", secret).update(`${t}.${rawBody}`).digest()
  return sigs.some((s) => { const got = Buffer.from(s, "hex"); return got.length === want.length && timingSafeEqual(got, want) })
}

Python

import hmac, hashlib, time

def verify(header, raw_body: bytes, secret: str, now=None) -> bool:
    parts = header.split(",")
    t = next((p[2:] for p in parts if p.startswith("t=")), None)
    sigs = [p[3:] for p in parts if p.startswith("v1=")]
    if not t or not t.isdigit() or not sigs or abs((now or time.time()) - int(t)) > 300:
        return False
    want = hmac.new(secret.encode(), f"{t}.".encode() + raw_body, hashlib.sha256).hexdigest()
    return any(hmac.compare_digest(s, want) for s in sigs)

Delivery

Success is any 2xx; redirects are never followed. Attempt 1 goes at once, then after 5 min, 15 min, 1 h, 3 h, 6 h, 12 h, 24 h, each wait jittered by up to 10 percent (8 attempts over about 46 hours). After the last failure the delivery is a dead letter a director can send again. An address that answers 410, fails 25 sends in a row or has failed for 6 hours is paused. Events are not ordered: use created_at and modified_at. There is no fixed sending address, so do not allowlist by IP; the signature is the trust mechanism. The address must be https on port 443 with a public name. The delivery log and payloads are kept 30 days.