{"openapi":"3.1.0","info":{"title":"Lumin API","version":"2026-12-01","summary":"Read-only access to a hotel's bookings, availability, rates, reports and invoices.","description":"Every request carries `Authorization: Bearer <key>`. Keys are made by a director under Settings, Connectivity, API keys. All endpoints are GET. Dates are YYYY-MM-DD (a calendar date at the hotel), moments are ISO 8601 UTC, money is a decimal string. Lists page by cursor."},"servers":[{"url":"https://api.hostech.ai","description":"Production"}],"security":[{"bearerAuth":[]}],"tags":[{"name":"hotels"},{"name":"reports"},{"name":"finance"},{"name":"bookings"},{"name":"availability"},{"name":"rates"}],"paths":{"/v1/hotels":{"get":{"operationId":"listHotels","summary":"List hotels","description":"Your hotels (or the ones this key is limited to), with room counts.\n\nRequires the scope `hotels:read`.","tags":["hotels"],"security":[{"bearerAuth":[]}],"x-lumin-scope":"hotels:read","parameters":[{"name":"limit","in":"query","required":false,"description":"Rows per page, 1 to 200.","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"starting_after","in":"query","required":false,"description":"The next_cursor of the page before.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HotelList"}}}},"400":{"description":"A parameter is wrong.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The key is missing, unknown, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's scope, address list or organisation does not allow this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such hotel, booking or event for this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/hotels/{id}/room-types":{"get":{"operationId":"listRoomTypes","summary":"List a hotel's room types","description":"The room types of one hotel and how many rooms each has.\n\nRequires the scope `hotels:read`.","tags":["hotels"],"security":[{"bearerAuth":[]}],"x-lumin-scope":"hotels:read","parameters":[{"name":"id","in":"path","required":true,"description":"The hotel's id.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoomTypeList"}}}},"400":{"description":"A parameter is wrong.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The key is missing, unknown, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's scope, address list or organisation does not allow this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such hotel, booking or event for this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/bookings":{"get":{"operationId":"listBookings","summary":"List bookings","description":"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. Carries guest details (name, phone, email) only for a key whose director switched Guest details on.\n\nRequires the scope `bookings:read`.","tags":["bookings"],"security":[{"bearerAuth":[]}],"x-lumin-scope":"bookings:read","parameters":[{"name":"hotel_id","in":"query","required":false,"description":"Only this hotel. A hotel that is not yours answers 404.","schema":{"type":"string"}},{"name":"status","in":"query","required":false,"description":"Only this status.","schema":{"type":"string","enum":["booked","in_house","checked_out","cancelled","no_show"]}},{"name":"arrival_from","in":"query","required":false,"description":"Arrivals on or after this date.","schema":{"type":"string","format":"date"}},{"name":"arrival_to","in":"query","required":false,"description":"Arrivals on or before this date, at most 366 nights after arrival_from.","schema":{"type":"string","format":"date"}},{"name":"modified_since","in":"query","required":false,"description":"Only rows changed at or after this moment (ISO 8601).","schema":{"type":"string","format":"date-time"}},{"name":"limit","in":"query","required":false,"description":"Rows per page, 1 to 200.","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"starting_after","in":"query","required":false,"description":"The next_cursor of the page before.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingList"}}}},"400":{"description":"A parameter is wrong.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The key is missing, unknown, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's scope, address list or organisation does not allow this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such hotel, booking or event for this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/bookings/{id}":{"get":{"operationId":"getBooking","summary":"Get a booking","description":"One booking, with its payments (amount, method and time only). Carries guest details (name, phone, email) only for a key whose director switched Guest details on.\n\nRequires the scope `bookings:read`.","tags":["bookings"],"security":[{"bearerAuth":[]}],"x-lumin-scope":"bookings:read","parameters":[{"name":"id","in":"path","required":true,"description":"The booking's id.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingDetail"}}}},"400":{"description":"A parameter is wrong.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The key is missing, unknown, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's scope, address list or organisation does not allow this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such hotel, booking or event for this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/availability":{"get":{"operationId":"getAvailability","summary":"Rooms left per type per night","description":"Rooms left to sell for each room type and night of one hotel, and whether a stop-sell closes the night.\n\nRequires the scope `availability:read`.","tags":["availability"],"security":[{"bearerAuth":[]}],"x-lumin-scope":"availability:read","parameters":[{"name":"hotel_id","in":"query","required":true,"description":"Only this hotel. A hotel that is not yours answers 404.","schema":{"type":"string"}},{"name":"from","in":"query","required":true,"description":"First night (YYYY-MM-DD).","schema":{"type":"string","format":"date"}},{"name":"to","in":"query","required":true,"description":"End date, the first night NOT covered (YYYY-MM-DD), at most 366 nights after from.","schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvailabilityList"}}}},"400":{"description":"A parameter is wrong.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The key is missing, unknown, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's scope, address list or organisation does not allow this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such hotel, booking or event for this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/rates":{"get":{"operationId":"getRates","summary":"Rate calendar","description":"The calendar price and the restrictions of each room type and night of one hotel.\n\nRequires the scope `rates:read`.","tags":["rates"],"security":[{"bearerAuth":[]}],"x-lumin-scope":"rates:read","parameters":[{"name":"hotel_id","in":"query","required":true,"description":"Only this hotel. A hotel that is not yours answers 404.","schema":{"type":"string"}},{"name":"room_type","in":"query","required":false,"description":"Only this room type.","schema":{"type":"string"}},{"name":"from","in":"query","required":true,"description":"First night (YYYY-MM-DD).","schema":{"type":"string","format":"date"}},{"name":"to","in":"query","required":true,"description":"End date, the first night NOT covered (YYYY-MM-DD), at most 366 nights after from.","schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RatesList"}}}},"400":{"description":"A parameter is wrong.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The key is missing, unknown, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's scope, address list or organisation does not allow this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such hotel, booking or event for this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/quote":{"get":{"operationId":"getQuote","summary":"Price a stay","description":"What a stay would cost, computed the way the booking engine computes it. Nothing is booked, held or stored.\n\nRequires the scope `rates:read`.","tags":["rates"],"security":[{"bearerAuth":[]}],"x-lumin-scope":"rates:read","parameters":[{"name":"hotel_id","in":"query","required":true,"description":"Only this hotel. A hotel that is not yours answers 404.","schema":{"type":"string"}},{"name":"from","in":"query","required":true,"description":"Arrival date (YYYY-MM-DD).","schema":{"type":"string","format":"date"}},{"name":"to","in":"query","required":true,"description":"Departure date, the first night NOT covered (YYYY-MM-DD), at most 366 nights after from.","schema":{"type":"string","format":"date"}},{"name":"adults","in":"query","required":false,"description":"Adults.","schema":{"type":"integer","minimum":1,"maximum":20,"default":2}},{"name":"children","in":"query","required":false,"description":"Children.","schema":{"type":"integer","minimum":0,"maximum":20,"default":0}},{"name":"room_type","in":"query","required":false,"description":"Only this room type.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Quote"}}}},"400":{"description":"A parameter is wrong.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The key is missing, unknown, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's scope, address list or organisation does not allow this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such hotel, booking or event for this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/reports/occupancy":{"get":{"operationId":"getOccupancyReport","summary":"Occupancy report","description":"Occupancy for a period, one entry per hotel, with a row per night.\n\nRequires the scope `reports:read`.","tags":["reports"],"security":[{"bearerAuth":[]}],"x-lumin-scope":"reports:read","parameters":[{"name":"hotel_id","in":"query","required":false,"description":"Only this hotel. A hotel that is not yours answers 404.","schema":{"type":"string"}},{"name":"from","in":"query","required":true,"description":"First night (YYYY-MM-DD).","schema":{"type":"string","format":"date"}},{"name":"to","in":"query","required":true,"description":"Last night (YYYY-MM-DD), at most 366 nights after from.","schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OccupancyReportList"}}}},"400":{"description":"A parameter is wrong.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The key is missing, unknown, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's scope, address list or organisation does not allow this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such hotel, booking or event for this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/reports/revenue":{"get":{"operationId":"getRevenueReport","summary":"Revenue report","description":"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.\n\nRequires the scope `reports:read`.","tags":["reports"],"security":[{"bearerAuth":[]}],"x-lumin-scope":"reports:read","parameters":[{"name":"hotel_id","in":"query","required":false,"description":"Only this hotel. A hotel that is not yours answers 404.","schema":{"type":"string"}},{"name":"from","in":"query","required":true,"description":"First night (YYYY-MM-DD).","schema":{"type":"string","format":"date"}},{"name":"to","in":"query","required":true,"description":"Last night (YYYY-MM-DD), at most 366 nights after from.","schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevenueReportList"}}}},"400":{"description":"A parameter is wrong.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The key is missing, unknown, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's scope, address list or organisation does not allow this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such hotel, booking or event for this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/reports/on-the-books":{"get":{"operationId":"getOnTheBooks","summary":"On the books","description":"Rooms already booked for each of the coming nights, one entry per hotel.\n\nRequires the scope `reports:read`.","tags":["reports"],"security":[{"bearerAuth":[]}],"x-lumin-scope":"reports:read","parameters":[{"name":"hotel_id","in":"query","required":false,"description":"Only this hotel. A hotel that is not yours answers 404.","schema":{"type":"string"}},{"name":"days","in":"query","required":false,"description":"How many nights from today.","schema":{"type":"integer","minimum":1,"maximum":366,"default":30}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnTheBooksReportList"}}}},"400":{"description":"A parameter is wrong.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The key is missing, unknown, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's scope, address list or organisation does not allow this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such hotel, booking or event for this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/invoices":{"get":{"operationId":"listInvoices","summary":"List invoices","description":"Issued invoices in id order: number, date, status and amounts. No client name, no line text, no document. Drafts and sponsorships are not listed.\n\nRequires the scope `finance:read`.","tags":["finance"],"security":[{"bearerAuth":[]}],"x-lumin-scope":"finance:read","parameters":[{"name":"hotel_id","in":"query","required":false,"description":"Only this hotel. A hotel that is not yours answers 404.","schema":{"type":"string"}},{"name":"status","in":"query","required":false,"description":"Only this status.","schema":{"type":"string","enum":["sent","paid","cancelled","pending_payment","partially_paid"]}},{"name":"date_from","in":"query","required":false,"description":"Invoices dated on or after this day.","schema":{"type":"string","format":"date"}},{"name":"date_to","in":"query","required":false,"description":"Invoices dated on or before this day, at most 366 days after date_from.","schema":{"type":"string","format":"date"}},{"name":"modified_since","in":"query","required":false,"description":"Only rows changed at or after this moment (ISO 8601).","schema":{"type":"string","format":"date-time"}},{"name":"limit","in":"query","required":false,"description":"Rows per page, 1 to 200.","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"starting_after","in":"query","required":false,"description":"The next_cursor of the page before.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceList"}}}},"400":{"description":"A parameter is wrong.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The key is missing, unknown, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's scope, address list or organisation does not allow this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such hotel, booking or event for this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/events/{id}":{"get":{"operationId":"getEvent","summary":"Get an event","description":"A webhook event's body again, by the id its delivery carried (evt_...). Guest details only for a key that has them. Carries guest details (name, phone, email) only for a key whose director switched Guest details on.\n\nRequires the scope `bookings:read`.","tags":["bookings"],"security":[{"bearerAuth":[]}],"x-lumin-scope":"bookings:read","parameters":[{"name":"id","in":"path","required":true,"description":"The event's id, with or without the evt_ prefix.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"400":{"description":"A parameter is wrong.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The key is missing, unknown, expired or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key's scope, address list or organisation does not allow this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such hotel, booking or event for this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests. Wait Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"lumin_live_<id>_<secret>"}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"}},"required":["code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"Guest":{"type":"object","description":"Present only when a director switched Guest details on for this key. Exactly these three fields, nothing else of the guest.","properties":{"name":{"type":["string","null"]},"phone":{"type":["string","null"]},"email":{"type":["string","null"]}},"required":["name","phone","email"],"additionalProperties":false},"Hotel":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"currency":{"type":"string"},"time_zone":{"type":"string"},"room_count":{"type":"integer"},"room_type_count":{"type":"integer"}},"required":["id","name","currency","time_zone","room_count","room_type_count"],"additionalProperties":false},"RoomType":{"type":"object","properties":{"hotel_id":{"type":"string"},"name":{"type":"string"},"rooms":{"type":"integer"}},"required":["hotel_id","name","rooms"],"additionalProperties":false},"Booking":{"type":"object","properties":{"id":{"type":"string","description":"The booking's id."},"hotel_id":{"type":"string"},"booking_number":{"type":"string"},"status":{"type":"string","enum":["booked","in_house","checked_out","cancelled","no_show"]},"source":{"type":"string","description":"Where the booking came from (a channel name)."},"arrival":{"type":"string","format":"date"},"departure":{"type":"string","format":"date"},"nights":{"type":"integer"},"rooms":{"type":"array","items":{"type":"object","properties":{"room_type":{"type":["string","null"]},"room_number":{"type":"string","description":"Only once the guest is in the house."}},"required":["room_type"],"additionalProperties":false}},"adults":{"type":"integer"},"children":{"type":"integer"},"total":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$","description":"A decimal string with two places."},"currency":{"type":"string"},"balance_due":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$","description":"A decimal string with two places."},"created_at":{"type":"string","format":"date-time"},"modified_at":{"type":"string","format":"date-time"},"guest":{"$ref":"#/components/schemas/Guest"}},"required":["id","hotel_id","booking_number","status","source","arrival","departure","nights","rooms","adults","children","total","currency","balance_due","created_at","modified_at"],"additionalProperties":false},"BookingDetail":{"type":"object","properties":{"id":{"type":"string","description":"The booking's id."},"hotel_id":{"type":"string"},"booking_number":{"type":"string"},"status":{"type":"string","enum":["booked","in_house","checked_out","cancelled","no_show"]},"source":{"type":"string","description":"Where the booking came from (a channel name)."},"arrival":{"type":"string","format":"date"},"departure":{"type":"string","format":"date"},"nights":{"type":"integer"},"rooms":{"type":"array","items":{"type":"object","properties":{"room_type":{"type":["string","null"]},"room_number":{"type":"string","description":"Only once the guest is in the house."}},"required":["room_type"],"additionalProperties":false}},"adults":{"type":"integer"},"children":{"type":"integer"},"total":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$","description":"A decimal string with two places."},"currency":{"type":"string"},"balance_due":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$","description":"A decimal string with two places."},"created_at":{"type":"string","format":"date-time"},"modified_at":{"type":"string","format":"date-time"},"guest":{"$ref":"#/components/schemas/Guest"},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["deposit","refund","payment"]},"amount":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$","description":"A decimal string with two places."},"currency":{"type":"string"},"method":{"type":"string","enum":["cash","card","transfer","booking_site","voucher","other"]},"at":{"type":["string","null"],"format":"date-time"}},"required":["id","kind","amount","currency","method","at"],"additionalProperties":false}}},"required":["id","hotel_id","booking_number","status","source","arrival","departure","nights","rooms","adults","children","total","currency","balance_due","created_at","modified_at","payments"],"additionalProperties":false},"Event":{"type":"object","properties":{"id":{"type":"string","description":"evt_ followed by the event's id."},"type":{"type":"string"},"api_version":{"type":"string"},"created_at":{"type":["string","null"],"format":"date-time"},"hotel_id":{"type":"string"},"data":{"type":"object","description":"The event's own fields, as the webhook sends them (docs: outbound webhooks). Guest details only for a key that has them.","additionalProperties":true}},"required":["id","type","api_version","created_at","hotel_id","data"],"additionalProperties":false},"Invoice":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"hotel_id":{"type":"string"},"date":{"type":"string","format":"date"},"status":{"type":"string","enum":["sent","paid","cancelled","pending_payment","partially_paid"]},"subtotal":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$","description":"A decimal string with two places."},"tax":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$","description":"A decimal string with two places."},"total":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$","description":"A decimal string with two places."},"currency":{"type":"string"},"paid_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"},"modified_at":{"type":"string","format":"date-time"}},"required":["id","number","hotel_id","date","status","subtotal","tax","total","currency","paid_at","created_at","modified_at"],"additionalProperties":false},"Availability":{"type":"object","properties":{"hotel_id":{"type":"string"},"room_type":{"type":"string"},"nights":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","format":"date"},"rooms_left":{"type":"integer"},"stop_sell":{"type":"boolean"}},"required":["date","rooms_left","stop_sell"],"additionalProperties":false}}},"required":["hotel_id","room_type","nights"],"additionalProperties":false},"Rates":{"type":"object","properties":{"hotel_id":{"type":"string"},"room_type":{"type":"string"},"nights":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","format":"date"},"rate":{"type":["string","null"],"description":"The calendar price for the night, the same one the booking engine sells at; null when none is set.","pattern":"^-?\\d+\\.\\d{2}$"},"currency":{"type":"string"},"stop_sell":{"type":"boolean"},"closed_to_arrival":{"type":"boolean"},"min_stay_arrival":{"type":["integer","null"]},"min_stay_through":{"type":["integer","null"]},"max_stay":{"type":["integer","null"]}},"required":["date","rate","currency","stop_sell","closed_to_arrival","min_stay_arrival","min_stay_through","max_stay"],"additionalProperties":false}}},"required":["hotel_id","room_type","nights"],"additionalProperties":false},"Quote":{"type":"object","properties":{"hotel_id":{"type":"string"},"from":{"type":"string","format":"date"},"to":{"type":"string","format":"date"},"nights":{"type":"integer"},"adults":{"type":"integer"},"children":{"type":"integer"},"currency":{"type":"string"},"cancellation":{"type":"object","properties":{"free_cancel_days":{"type":"integer"},"free_until":{"type":["string","null"],"format":"date"}},"required":["free_cancel_days","free_until"],"additionalProperties":false},"rooms":{"type":"array","items":{"type":"object","properties":{"room_type":{"type":"string"},"rooms_left":{"type":"integer"},"bookable":{"type":"boolean"},"total":{"type":["string","null"],"description":"The price for the stay; null when a night has no price.","pattern":"^-?\\d+\\.\\d{2}$"},"nightly":{"type":["array","null"],"items":{"type":"object","properties":{"date":{"type":"string","format":"date"},"rate":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$","description":"A decimal string with two places."}},"required":["date","rate"],"additionalProperties":false}},"reasons":{"type":"array","items":{"type":"string","description":"Why the type cannot be booked for these dates: sold_out, stop_sell, closed_to_arrival, min_stay, max_stay, too_many_guests, no_price and the like."}}},"required":["room_type","rooms_left","bookable","total","nightly","reasons"],"additionalProperties":false}}},"required":["hotel_id","from","to","nights","adults","children","currency","cancellation","rooms"],"additionalProperties":false},"OccupancyReport":{"type":"object","properties":{"hotel_id":{"type":"string"},"from":{"type":"string","format":"date"},"to":{"type":"string","format":"date"},"kind":{"type":"string","enum":["past","running","future"],"description":"past: complete. running: today is inside (figures to date). future: on the books only."},"rooms":{"type":"integer"},"available_room_nights":{"type":"integer"},"room_nights_sold":{"type":"integer"},"occupancy_pct":{"type":"number"},"by_day":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","format":"date"},"when":{"type":"string","enum":["past","today","ahead"]},"room_nights":{"type":"integer"},"rooms":{"type":"integer"},"occupancy_pct":{"type":"number"}},"required":["date","when","room_nights","rooms","occupancy_pct"],"additionalProperties":false}}},"required":["hotel_id","from","to","kind","rooms","available_room_nights","room_nights_sold","occupancy_pct","by_day"],"additionalProperties":false},"RevenueReport":{"type":"object","properties":{"hotel_id":{"type":"string"},"from":{"type":"string","format":"date"},"to":{"type":"string","format":"date"},"currency":{"type":"string"},"kind":{"type":"string","enum":["past","running","future"]},"revenue":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$","description":"Room revenue as booked, by the same rule as the Revenue page."},"net":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$","description":"What the hotel keeps after the estimated OTA commission."},"adr":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$","description":"A decimal string with two places."},"revpar":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$","description":"A decimal string with two places."},"bookings":{"type":"integer"},"by_day":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","format":"date"},"revenue":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$","description":"A decimal string with two places."},"net":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$","description":"A decimal string with two places."}},"required":["date","revenue","net"],"additionalProperties":false}},"by_channel":{"type":"array","items":{"type":"object","properties":{"channel":{"type":"string"},"bookings":{"type":"integer"},"room_nights":{"type":"integer"},"revenue":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$","description":"A decimal string with two places."},"net":{"type":"string","pattern":"^-?\\d+\\.\\d{2}$","description":"A decimal string with two places."},"cancelled":{"type":"integer"},"no_shows":{"type":"integer"}},"required":["channel","bookings","room_nights","revenue","net","cancelled","no_shows"],"additionalProperties":false}},"by_channel_window":{"type":"object","description":"The channel table always covers the last 90 days up to today, whatever from and to say.","properties":{"from":{"type":"string","format":"date"},"to":{"type":"string","format":"date"}},"required":["from","to"],"additionalProperties":false}},"required":["hotel_id","from","to","currency","kind","revenue","net","adr","revpar","bookings","by_day","by_channel","by_channel_window"],"additionalProperties":false},"OnTheBooksReport":{"type":"object","properties":{"hotel_id":{"type":"string"},"rooms":{"type":"integer"},"nights":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","format":"date"},"rooms_occupied":{"type":"integer"},"occupancy_pct":{"type":"number"}},"required":["date","rooms_occupied","occupancy_pct"],"additionalProperties":false}}},"required":["hotel_id","rooms","nights"],"additionalProperties":false},"HotelList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Hotel"}},"has_more":{"type":"boolean","description":"More rows follow: pass next_cursor as starting_after."},"next_cursor":{"type":["string","null"],"description":"The id to pass as starting_after, or null."}},"required":["data","has_more","next_cursor"],"additionalProperties":false},"RoomTypeList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/RoomType"}},"has_more":{"type":"boolean","description":"More rows follow: pass next_cursor as starting_after."},"next_cursor":{"type":["string","null"],"description":"The id to pass as starting_after, or null."}},"required":["data","has_more","next_cursor"],"additionalProperties":false},"BookingList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Booking"}},"has_more":{"type":"boolean","description":"More rows follow: pass next_cursor as starting_after."},"next_cursor":{"type":["string","null"],"description":"The id to pass as starting_after, or null."}},"required":["data","has_more","next_cursor"],"additionalProperties":false},"InvoiceList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Invoice"}},"has_more":{"type":"boolean","description":"More rows follow: pass next_cursor as starting_after."},"next_cursor":{"type":["string","null"],"description":"The id to pass as starting_after, or null."}},"required":["data","has_more","next_cursor"],"additionalProperties":false},"AvailabilityList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Availability"}},"has_more":{"type":"boolean","description":"More rows follow: pass next_cursor as starting_after."},"next_cursor":{"type":["string","null"],"description":"The id to pass as starting_after, or null."}},"required":["data","has_more","next_cursor"],"additionalProperties":false},"RatesList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Rates"}},"has_more":{"type":"boolean","description":"More rows follow: pass next_cursor as starting_after."},"next_cursor":{"type":["string","null"],"description":"The id to pass as starting_after, or null."}},"required":["data","has_more","next_cursor"],"additionalProperties":false},"OccupancyReportList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/OccupancyReport"}},"has_more":{"type":"boolean","description":"More rows follow: pass next_cursor as starting_after."},"next_cursor":{"type":["string","null"],"description":"The id to pass as starting_after, or null."}},"required":["data","has_more","next_cursor"],"additionalProperties":false},"RevenueReportList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/RevenueReport"}},"has_more":{"type":"boolean","description":"More rows follow: pass next_cursor as starting_after."},"next_cursor":{"type":["string","null"],"description":"The id to pass as starting_after, or null."}},"required":["data","has_more","next_cursor"],"additionalProperties":false},"OnTheBooksReportList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/OnTheBooksReport"}},"has_more":{"type":"boolean","description":"More rows follow: pass next_cursor as starting_after."},"next_cursor":{"type":["string","null"],"description":"The id to pass as starting_after, or null."}},"required":["data","has_more","next_cursor"],"additionalProperties":false}}}}