{"openapi":"3.1.0","info":{"version":"1.0.0","contact":{"name":"Aloaha Limited"},"title":"Guest Portal — Tenant API","description":"Manage properties, the local calendar, bookings, guest check-in data, payments (eco-contribution, deposits, extras), the MTA eco return, channels, users, API keys and webhooks of ONE tenant. Authenticate with `Authorization: Bearer gpk_…` (create keys in the backend under Settings → API keys). Every key has a role; the same permissions apply as for users. Writes from a browser session additionally need the header `X-GP: 1`."},"servers":[{"url":"https://guestbud.io"}],"tags":[{"name":"API keys"},{"name":"Account"},{"name":"Bookings"},{"name":"Calendar"},{"name":"Channels"},{"name":"Customers"},{"name":"Messages"},{"name":"Payments"},{"name":"Payments setup"},{"name":"Properties"},{"name":"Reports"},{"name":"Settings"},{"name":"Smart locks"},{"name":"Tourist taxes"},{"name":"Users"},{"name":"Webhooks"}],"paths":{"/api/v1/me":{"get":{"tags":["Account"],"summary":"Who am I: tenant, user/key, role and permissions","operationId":"get__api_v1_me","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"apiKey":[]},{"session":[]}]}},"/api/v1/properties":{"get":{"tags":["Properties"],"summary":"List properties (no codes / Wi-Fi in the list)","operationId":"get__api_v1_properties","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"description":"Requires permission `properties.view`.","security":[{"apiKey":[]},{"session":[]}]},"post":{"tags":["Properties"],"summary":"Create a property (local, or linked to a channel)","operationId":"post__api_v1_properties","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyInput"}}}},"description":"Requires permission `properties.edit`.","security":[{"apiKey":[]},{"session":[]}]}},"/api/v1/properties/{id}":{"get":{"tags":["Properties"],"summary":"Property with its full guest guide (incl. codes & Wi-Fi)","operationId":"get__api_v1_properties_id","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"description":"Requires permission `properties.view`.","security":[{"apiKey":[]},{"session":[]}]},"patch":{"tags":["Properties"],"summary":"Update property settings and/or the guest guide (send the whole guide object)","operationId":"patch__api_v1_properties_id","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyInput"}}}},"description":"Requires permission `properties.edit`.","security":[{"apiKey":[]},{"session":[]}]},"delete":{"tags":["Properties"],"summary":"Delete a property (refused while it has upcoming bookings)","operationId":"delete__api_v1_properties_id","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"description":"Requires permission `properties.edit`.","security":[{"apiKey":[]},{"session":[]}]}},"/api/v1/waste-presets":{"get":{"tags":["Properties"],"summary":"Rubbish & recycling presets (per country) for the guest guide","operationId":"get__api_v1_waste_presets","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"description":"Requires permission `properties.view`.","security":[{"apiKey":[]},{"session":[]}]}},"/api/v1/properties/{id}/media":{"post":{"tags":["Properties"],"summary":"Upload a photo (JPEG/PNG/WebP, base64, ≤ 6 MB) → returns its URL for the guide","operationId":"post__api_v1_properties_id_media","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaUpload"}}}},"description":"Requires permission `properties.edit`.","security":[{"apiKey":[]},{"session":[]}]}},"/api/v1/properties/{id}/feed-token/rotate":{"post":{"tags":["Calendar"],"summary":"Rotate the private iCal export URL (old URL stops working)","operationId":"post__api_v1_properties_id_feed_token_rotate","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"description":"Requires permission `properties.edit`.","security":[{"apiKey":[]},{"session":[]}]}},"/api/v1/calendar":{"get":{"tags":["Calendar"],"summary":"Calendar: bookings + owner blocks per property in a date window","operationId":"get__api_v1_calendar","parameters":[{"name":"from","in":"query","required":false,"schema":{"type":"string"}},{"name":"to","in":"query","required":false,"schema":{"type":"string"}},{"name":"propertyId","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"description":"Requires permission `bookings.view`.","security":[{"apiKey":[]},{"session":[]}]}},"/api/v1/properties/{id}/blocks":{"post":{"tags":["Calendar"],"summary":"Block dates on a property (owner stay, maintenance)","operationId":"post__api_v1_properties_id_blocks","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlockInput"}}}},"description":"Requires permission `bookings.edit`.","security":[{"apiKey":[]},{"session":[]}]}},"/api/v1/properties/{id}/blocks/{blockId}":{"delete":{"tags":["Calendar"],"summary":"Remove a date block","operationId":"delete__api_v1_properties_id_blocks_blockId","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"blockId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"description":"Requires permission `bookings.edit`.","security":[{"apiKey":[]},{"session":[]}]}},"/api/v1/bookings":{"get":{"tags":["Bookings"],"summary":"List bookings (filters; format=csv for a spreadsheet export)","operationId":"get__api_v1_bookings","parameters":[{"name":"from","in":"query","required":false,"schema":{"type":"string"}},{"name":"to","in":"query","required":false,"schema":{"type":"string"}},{"name":"dateField","in":"query","required":false,"schema":{"type":"string"}},{"name":"propertyId","in":"query","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"state","in":"query","required":false,"schema":{"type":"string"}},{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"source","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"string"}},{"name":"format","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"description":"Requires permission `bookings.view`.","security":[{"apiKey":[]},{"session":[]}]},"post":{"tags":["Bookings"],"summary":"Create a booking (local calendar) — or upsert by source+externalId for integrations","operationId":"post__api_v1_bookings","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"booking":{"$ref":"#/components/schemas/Booking"}}}}}},"4XX":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingInput"}}}},"description":"Requires permission `bookings.edit`.","security":[{"apiKey":[]},{"session":[]}]}},"/api/v1/bookings/{id}":{"get":{"tags":["Bookings"],"summary":"Booking with check-in data, payments and activity log","operationId":"get__api_v1_bookings_id","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"description":"Requires permission `bookings.view`.","security":[{"apiKey":[]},{"session":[]}]},"patch":{"tags":["Bookings"],"summary":"Edit a booking (dates, guests, guest contact, notes, noDeposit)","operationId":"patch__api_v1_bookings_id","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"booking":{"$ref":"#/components/schemas/Booking"}}}}}},"4XX":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingInput"}}}},"description":"Requires permission `bookings.edit`.","security":[{"apiKey":[]},{"session":[]}]}},"/api/v1/bookings/{id}/cancel":{"post":{"tags":["Bookings"],"summary":"Cancel a booking (frees the calendar; portal shows \"cancelled\")","operationId":"post__api_v1_bookings_id_cancel","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"description":"Requires permission `bookings.edit`.","security":[{"apiKey":[]},{"session":[]}]}},"/api/v1/bookings/{id}/reinstate":{"post":{"tags":["Bookings"],"summary":"Undo a cancellation (refused if the dates were booked meanwhile, unless allowOverlap)","operationId":"post__api_v1_bookings_id_reinstate","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"description":"Requires permission `bookings.edit`.","security":[{"apiKey":[]},{"session":[]}]}},"/api/v1/bookings/{id}/checkin":{"patch":{"tags":["Bookings"],"summary":"Staff correction of check-in data (adults / under-18 / ETA)","operationId":"patch__api_v1_bookings_id_checkin","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckinPatch"}}}},"description":"Requires permission `bookings.edit`.","security":[{"apiKey":[]},{"session":[]}]}},"/api/v1/bookings/{id}/portal-link/rotate":{"post":{"tags":["Bookings"],"summary":"Issue a new guest portal link (the old one stops working)","operationId":"post__api_v1_bookings_id_portal_link_rotate","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"description":"Requires permission `bookings.edit`.","security":[{"apiKey":[]},{"session":[]}]}},"/api/v1/bookings/{id}/send-link":{"post":{"tags":["Bookings"],"summary":"Email the guest their portal link","operationId":"post__api_v1_bookings_id_send_link","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"description":"Requires permission `bookings.edit`.","security":[{"apiKey":[]},{"session":[]}]}},"/api/v1/bookings/{id}/messages":{"get":{"tags":["Messages"],"summary":"The guest conversation from the booking channel (live), plus messages sent from here","operationId":"get__api_v1_bookings_id_messages","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"description":"Requires permission `bookings.view`.","security":[{"apiKey":[]},{"session":[]}]},"post":{"tags":["Messages"],"summary":"Send a message to the guest through the booking channel (Airbnb / Booking.com … via Hostaway or Channex). Body {text}","operationId":"post__api_v1_bookings_id_messages","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageInput"}}}},"description":"Requires permission `bookings.edit`.","security":[{"apiKey":[]},{"session":[]}]}},"/api/v1/bookings/{id}/send-link-channel":{"post":{"tags":["Messages"],"summary":"Send the portal link (or a reminder, ?kind=reminder) through the booking channel chat","operationId":"post__api_v1_bookings_id_send_link_channel","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"description":"Requires permission `bookings.edit`.","security":[{"apiKey":[]},{"session":[]}]}},"/api/v1/bookings/{id}/remind":{"post":{"tags":["Bookings"],"summary":"Send a payment / check-in reminder email","operationId":"post__api_v1_bookings_id_remind","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"description":"Requires permission `bookings.edit`.","security":[{"apiKey":[]},{"session":[]}]}},"/api/v1/bookings/{id}/payments/{leg}/waive":{"post":{"tags":["Payments"],"summary":"Waive the eco-contribution or deposit (reason required; waived eco stays due to the MTA)","operationId":"post__api_v1_bookings_id_payments_leg_waive","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"leg","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WaiveInput"}}}},"description":"Requires permission `payments.manage`.","security":[{"apiKey":[]},{"session":[]}]}},"/api/v1/bookings/{id}/payments/{leg}/unwaive":{"post":{"tags":["Payments"],"summary":"Undo a waiver — the guest is asked to pay again","operationId":"post__api_v1_bookings_id_payments_leg_unwaive","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"leg","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"description":"Requires permission `payments.manage`.","security":[{"apiKey":[]},{"session":[]}]}},"/api/v1/bookings/{id}/payments/{leg}/mark-paid":{"post":{"tags":["Payments"],"summary":"Record a payment collected outside the portal (cash / bank transfer)","operationId":"post__api_v1_bookings_id_payments_leg_mark_paid","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"leg","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkPaidInput"}}}},"description":"Requires permission `payments.manage`.","security":[{"apiKey":[]},{"session":[]}]}},"/api/v1/bookings/{id}/deposit/release":{"post":{"tags":["Payments"],"summary":"Release the deposit in full, or retain part (amount + reason)","operationId":"post__api_v1_bookings_id_deposit_release","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReleaseInput"}}}},"description":"Requires permission `payments.manage`.","security":[{"apiKey":[]},{"session":[]}]}},"/api/v1/bookings/{id}/files/{file}":{"get":{"tags":["Bookings"],"summary":"Download an ID document photo / signature uploaded at check-in","operationId":"get__api_v1_bookings_id_files_file","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"file","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"description":"Requires permission `bookings.view`.","security":[{"apiKey":[]},{"session":[]}]}},"/api/v1/bookings/{id}/meldeschein":{"get":{"tags":["Bookings"],"summary":"Printable Meldeschein (German guest registration, bilingual) — HTML, ?lang=de|en","operationId":"get__api_v1_bookings_id_meldeschein","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"lang","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"description":"Requires permission `bookings.view`.","security":[{"apiKey":[]},{"session":[]}]}},"/api/v1/bookings/{id}/lock/{action}":{"post":{"tags":["Smart locks"],"summary":"Create / renew (provision) or remove (revoke) the Nuki door code of a booking now","operationId":"post__api_v1_bookings_id_lock_action","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"action","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"description":"Requires permission `payments.manage`.","security":[{"apiKey":[]},{"session":[]}]}},"/api/v1/settings/nuki":{"get":{"tags":["Smart locks"],"summary":"Nuki settings of this tenant (token masked)","operationId":"get__api_v1_settings_nuki","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"description":"Requires permission `settings.manage`.","security":[{"apiKey":[]},{"session":[]}]},"patch":{"tags":["Smart locks"],"summary":"Save this tenant's Nuki Web API token and code rules","operationId":"patch__api_v1_settings_nuki","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NukiSettings"}}}},"description":"Requires permission `settings.manage`.","security":[{"apiKey":[]},{"session":[]}]}},"/api/v1/settings/nuki/smartlocks":{"get":{"tags":["Smart locks"],"summary":"Smart locks on this tenant's Nuki account (to assign to properties)","operationId":"get__api_v1_settings_nuki_smartlocks","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"description":"Requires permission `settings.manage`.","security":[{"apiKey":[]},{"session":[]}]}},"/api/v1/payment-reasons":{"get":{"tags":["Payments"],"summary":"Waive reasons offered in the backend","operationId":"get__api_v1_payment_reasons","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"description":"Requires permission `bookings.view`.","security":[{"apiKey":[]},{"session":[]}]}},"/api/v1/customers":{"get":{"tags":["Customers"],"summary":"Guest directory (search with q)","operationId":"get__api_v1_customers","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"description":"Requires permission `bookings.view`.","security":[{"apiKey":[]},{"session":[]}]}},"/api/v1/customers/{id}":{"get":{"tags":["Customers"],"summary":"Customer with stay history","operationId":"get__api_v1_customers_id","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"description":"Requires permission `bookings.view`.","security":[{"apiKey":[]},{"session":[]}]},"patch":{"tags":["Customers"],"summary":"Edit a customer record","operationId":"patch__api_v1_customers_id","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerInput"}}}},"description":"Requires permission `bookings.edit`.","security":[{"apiKey":[]},{"session":[]}]},"delete":{"tags":["Customers"],"summary":"Erase a customer record (GDPR) — bookings keep only what the law requires","operationId":"delete__api_v1_customers_id","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"description":"Requires permission `bookings.edit`.","security":[{"apiKey":[]},{"session":[]}]}},"/api/v1/reports/eco-return":{"get":{"tags":["Reports"],"summary":"Quarterly MTA eco-contribution return (JSON, or format=xlsx|csv|working-csv)","operationId":"get__api_v1_reports_eco_return","parameters":[{"name":"quarter","in":"query","required":false,"schema":{"type":"string"}},{"name":"propertyId","in":"query","required":false,"schema":{"type":"string"}},{"name":"includeUnpaid","in":"query","required":false,"schema":{"type":"string"}},{"name":"format","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"description":"Requires permission `reports.view`.","security":[{"apiKey":[]},{"session":[]}]}},"/api/v1/tax-rules":{"get":{"tags":["Tourist taxes"],"summary":"Tax definitions available to this tenant (platform-wide + own)","operationId":"get__api_v1_tax_rules","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"description":"Requires permission `properties.view`.","security":[{"apiKey":[]},{"session":[]}]},"post":{"tags":["Tourist taxes"],"summary":"Create a tenant tax definition (e.g. a municipality's Kurtaxe)","operationId":"post__api_v1_tax_rules","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxRuleInput"}}}},"description":"Requires permission `settings.manage`.","security":[{"apiKey":[]},{"session":[]}]}},"/api/v1/tax-rules/{id}":{"patch":{"tags":["Tourist taxes"],"summary":"Edit a tenant tax definition","operationId":"patch__api_v1_tax_rules_id","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxRuleInput"}}}},"description":"Requires permission `settings.manage`.","security":[{"apiKey":[]},{"session":[]}]},"delete":{"tags":["Tourist taxes"],"summary":"Delete a tenant tax definition (refused while a property uses it)","operationId":"delete__api_v1_tax_rules_id","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"description":"Requires permission `settings.manage`.","security":[{"apiKey":[]},{"session":[]}]}},"/api/v1/reports/tourist-tax":{"get":{"tags":["Reports"],"summary":"Tourist tax collected per definition in a date range (check-in based); format=csv","operationId":"get__api_v1_reports_tourist_tax","parameters":[{"name":"from","in":"query","required":false,"schema":{"type":"string"}},{"name":"to","in":"query","required":false,"schema":{"type":"string"}},{"name":"ruleId","in":"query","required":false,"schema":{"type":"string"}},{"name":"format","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"description":"Requires permission `reports.view`.","security":[{"apiKey":[]},{"session":[]}]}},"/api/v1/settings":{"get":{"tags":["Settings"],"summary":"Tenant settings (secrets masked)","operationId":"get__api_v1_settings","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"description":"Requires permission `settings.manage`.","security":[{"apiKey":[]},{"session":[]}]},"patch":{"tags":["Settings"],"summary":"Update branding, host defaults, check-in form options, email sender","operationId":"patch__api_v1_settings","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettingsInput"}}}},"description":"Requires permission `settings.manage`.","security":[{"apiKey":[]},{"session":[]}]}},"/api/v1/settings/mail/test":{"post":{"tags":["Settings"],"summary":"Send a test email to an address","operationId":"post__api_v1_settings_mail_test","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MailTest"}}}},"description":"Requires permission `settings.manage`.","security":[{"apiKey":[]},{"session":[]}]}},"/api/v1/settings/mail/log":{"get":{"tags":["Settings"],"summary":"Last 300 emails handed to the mail server","operationId":"get__api_v1_settings_mail_log","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"description":"Requires permission `settings.manage`.","security":[{"apiKey":[]},{"session":[]}]}},"/api/v1/settings/payments":{"patch":{"tags":["Payments setup"],"summary":"Configure this tenant's payment methods (Revolut keys, Apple/Google Pay, manual collection)","operationId":"patch__api_v1_settings_payments","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentSettingsInput"}}}},"description":"Requires permission `settings.manage`.","security":[{"apiKey":[]},{"session":[]}]}},"/api/v1/settings/payments/test":{"post":{"tags":["Payments setup"],"summary":"Check the Revolut secret key (lists webhooks)","operationId":"post__api_v1_settings_payments_test","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"description":"Requires permission `settings.manage`.","security":[{"apiKey":[]},{"session":[]}]}},"/api/v1/settings/payments/webhook":{"post":{"tags":["Payments setup"],"summary":"Register (or re-register) the Revolut webhook for this tenant","operationId":"post__api_v1_settings_payments_webhook","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"description":"Requires permission `settings.manage`.","security":[{"apiKey":[]},{"session":[]}]}},"/api/v1/settings/payments/apple-pay-domains":{"post":{"tags":["Payments setup"],"summary":"Register this tenant's portal domains with Revolut for Apple Pay","operationId":"post__api_v1_settings_payments_apple_pay_domains","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"description":"Requires permission `settings.manage`.","security":[{"apiKey":[]},{"session":[]}]}},"/api/v1/channels":{"get":{"tags":["Channels"],"summary":"Available channel connectors and this tenant's (masked) connection settings","operationId":"get__api_v1_channels","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"description":"Requires permission `channels.manage`.","security":[{"apiKey":[]},{"session":[]}]}},"/api/v1/channels/{id}":{"patch":{"tags":["Channels"],"summary":"Save a channel connection (empty / masked secret = keep the stored one)","operationId":"patch__api_v1_channels_id","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChannelInput"}}}},"description":"Requires permission `channels.manage`.","security":[{"apiKey":[]},{"session":[]}]}},"/api/v1/channels/{id}/test":{"post":{"tags":["Channels"],"summary":"Test a channel connection","operationId":"post__api_v1_channels_id_test","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"description":"Requires permission `channels.manage`.","security":[{"apiKey":[]},{"session":[]}]}},"/api/v1/channels/{id}/listings":{"get":{"tags":["Channels"],"summary":"Listings available in the connected channel (to link properties)","operationId":"get__api_v1_channels_id_listings","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"description":"Requires permission `channels.manage`.","security":[{"apiKey":[]},{"session":[]}]}},"/api/v1/channels/rentalsunited/import":{"post":{"tags":["Channels"],"summary":"Import one RentalsUnited reservation by its ID (for stays that have not changed since connecting)","operationId":"post__api_v1_channels_rentalsunited_import","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuImportInput"}}}},"description":"Requires permission `channels.manage`.","security":[{"apiKey":[]},{"session":[]}]}},"/api/v1/channels/sync":{"post":{"tags":["Channels"],"summary":"Import reservations now (all channels, or ?channel=…)","operationId":"post__api_v1_channels_sync","parameters":[{"name":"channel","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"description":"Requires permission `channels.manage`.","security":[{"apiKey":[]},{"session":[]}]}},"/api/v1/roles":{"get":{"tags":["Users"],"summary":"Roles and the permissions each grants","operationId":"get__api_v1_roles","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"apiKey":[]},{"session":[]}]}},"/api/v1/users":{"get":{"tags":["Users"],"summary":"List users of this tenant","operationId":"get__api_v1_users","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"description":"Requires permission `users.manage`.","security":[{"apiKey":[]},{"session":[]}]},"post":{"tags":["Users"],"summary":"Add a user (password optional — a temporary one is generated). Sign-in: password, Google (email) or phone.codeb.io (email / phone)","operationId":"post__api_v1_users","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserInput"}}}},"description":"Requires permission `users.manage`.","security":[{"apiKey":[]},{"session":[]}]}},"/api/v1/users/{id}":{"patch":{"tags":["Users"],"summary":"Change role, contact, disable, or reset password","operationId":"patch__api_v1_users_id","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserPatch"}}}},"description":"Requires permission `users.manage`.","security":[{"apiKey":[]},{"session":[]}]},"delete":{"tags":["Users"],"summary":"Remove a user (never the last owner)","operationId":"delete__api_v1_users_id","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"description":"Requires permission `users.manage`.","security":[{"apiKey":[]},{"session":[]}]}},"/api/v1/api-keys":{"get":{"tags":["API keys"],"summary":"List this tenant's API keys (never the secret)","operationId":"get__api_v1_api_keys","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"description":"Requires permission `users.manage`.","security":[{"apiKey":[]},{"session":[]}]},"post":{"tags":["API keys"],"summary":"Create an API key with a role — the full key is returned ONCE","operationId":"post__api_v1_api_keys","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyInput"}}}},"description":"Requires permission `users.manage`.","security":[{"apiKey":[]},{"session":[]}]}},"/api/v1/api-keys/{id}":{"delete":{"tags":["API keys"],"summary":"Revoke an API key immediately","operationId":"delete__api_v1_api_keys_id","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"description":"Requires permission `users.manage`.","security":[{"apiKey":[]},{"session":[]}]}},"/api/v1/webhooks":{"get":{"tags":["Webhooks"],"summary":"Outbound webhooks (events pushed to your systems)","operationId":"get__api_v1_webhooks","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"description":"Requires permission `settings.manage`.","security":[{"apiKey":[]},{"session":[]}]},"post":{"tags":["Webhooks"],"summary":"Add a webhook — the signing secret is returned ONCE","operationId":"post__api_v1_webhooks","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookInput"}}}},"description":"Requires permission `settings.manage`.","security":[{"apiKey":[]},{"session":[]}]}},"/api/v1/webhooks/{id}":{"patch":{"tags":["Webhooks"],"summary":"Change URL / events / active","operationId":"patch__api_v1_webhooks_id","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookInput"}}}},"description":"Requires permission `settings.manage`.","security":[{"apiKey":[]},{"session":[]}]},"delete":{"tags":["Webhooks"],"summary":"Delete a webhook","operationId":"delete__api_v1_webhooks_id","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"description":"Requires permission `settings.manage`.","security":[{"apiKey":[]},{"session":[]}]}},"/api/v1/webhooks/{id}/test":{"post":{"tags":["Webhooks"],"summary":"Send a test event (event: \"ping\")","operationId":"post__api_v1_webhooks_id_test","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"description":"Requires permission `settings.manage`.","security":[{"apiKey":[]},{"session":[]}]}},"/api/v1/webhooks/log":{"get":{"tags":["Webhooks"],"summary":"Last 200 webhook deliveries","operationId":"get__api_v1_webhooks_log","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"description":"Requires permission `settings.manage`.","security":[{"apiKey":[]},{"session":[]}]}},"/api/v1/audit":{"get":{"tags":["Account"],"summary":"Audit trail (latest first)","operationId":"get__api_v1_audit","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"4XX":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"description":"Requires permission `users.manage`.","security":[{"apiKey":[]},{"session":[]}]}}},"components":{"schemas":{"Error":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable message"}},"required":["error"]},"Guest":{"type":"object","properties":{"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string","format":"email"},"phone":{"type":"string"},"language":{"type":"string","examples":["en"]},"country":{"type":"string"}}},"BookingInput":{"type":"object","description":"Create (local calendar) or, with source + externalId, idempotently upsert a booking from another system.","properties":{"propertyId":{"type":"string","pattern":"^[a-z]_[a-z2-9]{10}$"},"checkIn":{"type":"string","format":"date","examples":["2026-11-18"]},"checkOut":{"type":"string","format":"date","examples":["2026-11-18"]},"checkInTime":{"type":"string","pattern":"^\\d{2}:\\d{2}$","examples":["15:00"]},"checkOutTime":{"type":"string","pattern":"^\\d{2}:\\d{2}$","examples":["15:00"]},"adults":{"type":"integer","minimum":0},"children":{"type":"integer","minimum":0,"description":"Guests under 18 (eco-tax exempt)"},"guest":{"$ref":"#/components/schemas/Guest"},"channelLabel":{"type":"string","examples":["Booking.com","Airbnb","Direct"]},"notes":{"type":"string"},"totalPrice":{"type":"number"},"noDeposit":{"type":"boolean"},"source":{"type":"string","description":"Integration id, e.g. \"codeb\". Omit for local bookings."},"externalId":{"type":"string","description":"Your booking id — makes POST an upsert"},"status":{"type":"string","enum":["confirmed","cancelled"]},"allowOverlap":{"type":"boolean","description":"Skip the double-booking check"},"sendPortalLink":{"type":"boolean","description":"Email the guest their portal link right away"}},"required":["propertyId","checkIn","checkOut"]},"Payment":{"type":"object","properties":{"status":{"type":"string","enum":["unpaid","pending","failed","paid","held","waived","released","partial"]},"amount":{"type":"number"},"orderId":{"type":"string"},"method":{"type":"string"},"paidAt":{"type":"string","format":"date-time"},"reason":{"type":"string"},"retained":{"type":"number"},"retainReason":{"type":"string"}}},"Booking":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z]_[a-z2-9]{10}$"},"ref":{"type":"string","examples":["GP-7KX2MQ"]},"source":{"type":"string"},"externalId":{"type":["string","null"]},"status":{"type":"string","enum":["confirmed","cancelled"]},"channelLabel":{"type":"string"},"propertyId":{"type":"string","pattern":"^[a-z]_[a-z2-9]{10}$"},"propertyName":{"type":"string"},"licence":{"type":"string","description":"MTA licence"},"checkIn":{"type":"string","format":"date","examples":["2026-11-18"]},"checkOut":{"type":"string","format":"date","examples":["2026-11-18"]},"checkInTime":{"type":"string","pattern":"^\\d{2}:\\d{2}$","examples":["15:00"]},"checkOutTime":{"type":"string","pattern":"^\\d{2}:\\d{2}$","examples":["15:00"]},"nights":{"type":"integer"},"adults":{"type":"integer"},"children":{"type":"integer"},"guest":{"$ref":"#/components/schemas/Guest"},"stayState":{"type":"string","enum":["awaiting","ready","inhouse","completed","cancelled"]},"unlocked":{"type":"boolean","description":"Portal unlocked (all steps done)"},"checkinDone":{"type":"boolean"},"steps":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","enum":["details","eco","deposit"]},"done":{"type":"boolean"},"amount":{"type":["number","null"]},"status":{"type":"string"}}}},"eco":{"$ref":"#/components/schemas/Payment"},"deposit":{"$ref":"#/components/schemas/Payment"},"portalUrl":{"type":"string","format":"uri"},"checkin":{"type":["object","null"],"description":"Detail view only: lead guest, ID document, co-travellers, ETA, files"},"log":{"type":"array","description":"Detail view only: activity timeline"}}},"PropertyInput":{"type":"object","properties":{"name":{"type":"string"},"area":{"type":"string"},"country":{"type":"string","examples":["MT"]},"timezone":{"type":"string","examples":["Europe/Malta"]},"taxRule":{"type":"string","description":"'auto' (country default), 'none', or a tax-rule id from GET /api/v1/tax-rules"},"requireCheckinForm":{"type":["boolean","null"]},"meldeschein":{"type":"string","enum":["auto","yes","no"],"description":"German guest registration: auto = DE properties, non-German guests"},"lock":{"type":["object","null"],"properties":{"type":{"type":"string","enum":["nuki"]},"smartlockId":{"type":"string"},"label":{"type":"string"},"after":{"type":"string"}}},"links":{"type":"object","properties":{"hostaway":{"type":"string"},"rentalsunited":{"type":"string"},"channex":{"type":"string"},"leviathan":{"type":"string"},"ical":{"type":"string","format":"uri"}}},"guide":{"$ref":"#/components/schemas/Guide"}}},"Guide":{"type":"object","description":"Everything the guest sees (Guide editor). Codes, Wi-Fi, address and phone numbers are only shown to the guest after all steps are complete.","properties":{"property":{"type":"object","properties":{"name":{"type":"string"},"area":{"type":"string"},"address":{"type":"string"},"mapsUrl":{"type":"string"},"photo":{"type":"string"},"photoAlt":{"type":"string"},"floor":{"type":"string"},"welcome":{"type":"string"},"checkInTime":{"type":"string","pattern":"^\\d{2}:\\d{2}$","examples":["15:00"]},"checkOutTime":{"type":"string","pattern":"^\\d{2}:\\d{2}$","examples":["15:00"]},"licence":{"type":"string"}}},"host":{"type":"object","properties":{"name":{"type":"string"},"role":{"type":"string"},"replyTime":{"type":"string"},"phone":{"type":"string"},"whatsapp":{"type":"string"},"email":{"type":"string"},"helpTitle":{"type":"string"}}},"payments":{"type":"object","properties":{"deposit":{"type":"object","properties":{"amount":{"type":"number"},"mode":{"type":"string","enum":["hold","charge"]},"refundDays":{"type":"integer"},"desc":{"type":"string"},"facts":{"type":"array","items":{"type":"string"}},"terms":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"text":{"type":"string"}}}}}},"eco":{"type":"object","properties":{"desc":{"type":"string"},"facts":{"type":"array","items":{"type":"string"}}}},"trust":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"text":{"type":"string"}}}},"houseRules":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"text":{"type":"string"},"amount":{"type":"number"}}}},"termsText":{"type":"string"}}},"access":{"type":"object","properties":{"codes":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"code":{"type":"string"},"after":{"type":"string"}}}},"steps":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"text":{"type":"string"}}}},"etaSlots":{"type":"array","items":{"type":"string"}},"guidance":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"text":{"type":"string"}}}},"checkout":{"type":"array","items":{"type":"string"}}}},"wifi":{"type":"object","properties":{"network":{"type":"string"},"password":{"type":"string"},"speed":{"type":"string"},"router":{"type":"string"},"tips":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"text":{"type":"string"}}}}}},"bins":{"type":"object","description":"Malta waste collection: put-out / collection times, weekly bag schedule (organic | mixed | recycle | glass | \"\")"},"area":{"type":"array","items":{"type":"object","properties":{"cat":{"type":"string","enum":["eat","shop","transport","do","help"]},"name":{"type":"string"},"note":{"type":"string"},"dist":{"type":"string"},"q":{"type":"string"},"tel":{"type":"string"}}}},"extras":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"cat":{"type":"string","enum":["hampers","services"]},"name":{"type":"string"},"desc":{"type":"string"},"price":{"type":"number"},"unit":{"type":"string"},"badge":{"type":"string"},"note":{"type":"string"},"img":{"type":"string"},"maxQty":{"type":"integer"},"active":{"type":"boolean"}}}}}},"TaxRuleInput":{"type":"object","description":"A tourist-tax definition. Rates are chosen by the check-in date; add several entries for rate changes or seasons.","properties":{"name":{"type":"string","examples":["Kurtaxe"]},"collector":{"type":"string","examples":["Gemeinde Musterbad"]},"country":{"type":"string","examples":["DE"]},"municipality":{"type":"string"},"info":{"type":"string"},"schedule":{"type":"array","items":{"type":"object","properties":{"from":{"type":"string","format":"date","examples":["2026-11-18"]},"to":{"type":"string","format":"date","examples":["2026-11-18"]},"basis":{"type":"string","enum":["per_person_night","per_night","per_stay","percent_of_price"]},"rate":{"type":"number"},"maxNights":{"type":"integer"},"adultAge":{"type":"integer","default":18},"childRate":{"type":"number","default":0}},"required":["from","basis","rate"]}}},"required":["name","schedule"]},"NukiSettings":{"type":"object","properties":{"token":{"type":"string","description":"Nuki Web API token (web.nuki.io → API). Empty/masked = keep"},"autoProvision":{"type":"boolean"},"leadDays":{"type":"integer","minimum":2},"graceHours":{"type":"integer"}}},"MediaUpload":{"type":"object","properties":{"filename":{"type":"string"},"dataBase64":{"type":"string","description":"Base64 (or data: URL) of a JPEG/PNG/WebP image, ≤ 6 MB"}},"required":["dataBase64"]},"BlockInput":{"type":"object","properties":{"from":{"type":"string","format":"date","examples":["2026-11-18"]},"to":{"type":"string","format":"date","examples":["2026-11-18"]},"note":{"type":"string"}},"required":["from","to"]},"CheckinPatch":{"type":"object","properties":{"adults":{"type":"integer"},"children":{"type":"integer"},"eta":{"type":"string"}}},"MessageInput":{"type":"object","properties":{"text":{"type":"string","maxLength":4000,"examples":["Hi Anna, the cleaner will leave the keys in the lockbox."]}},"required":["text"]},"WaiveInput":{"type":"object","properties":{"reason":{"type":"string","examples":["Goodwill — repeat guest"]},"note":{"type":"string"}},"required":["reason"]},"MarkPaidInput":{"type":"object","properties":{"method":{"type":"string","examples":["Cash","Bank transfer"]},"note":{"type":"string"}}},"ReleaseInput":{"type":"object","properties":{"retain":{"type":"number","description":"0 = release in full"},"reason":{"type":"string"},"note":{"type":"string"}}},"CustomerInput":{"type":"object","properties":{"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"nationality":{"type":"string"},"language":{"type":"string"},"notes":{"type":"string"},"address":{"type":"string"}}},"SettingsInput":{"type":"object","properties":{"brandName":{"type":"string"},"brandColor":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"accentColor":{"type":"string"},"logoUrl":{"type":"string"},"currency":{"type":"string","examples":["EUR"]},"host":{"type":"object"},"checkin":{"type":"object","properties":{"requireForm":{"type":"boolean"},"requireIdDocument":{"type":"boolean"},"requireIdPhoto":{"type":"boolean"},"requireSignature":{"type":"boolean"},"requireAddress":{"type":"boolean"},"collectCoTravellers":{"type":"boolean"}}},"mail":{"type":"object","properties":{"from":{"type":"string"},"fromName":{"type":"string"},"replyTo":{"type":"string"},"hostNotify":{"type":"string"},"testRedirect":{"type":"string"},"autoInvite":{"type":"boolean"},"autoInviteDays":{"type":"integer"}}},"applePayAssociation":{"type":"string"}}},"PaymentSettingsInput":{"type":"object","properties":{"revolut":{"type":"object","properties":{"apiKey":{"type":"string","description":"Secret API key (sk_…). Empty or masked = keep"},"publicKey":{"type":"string","description":"Public key (pk_…) — needed for Apple Pay / Google Pay buttons"},"sandbox":{"type":"boolean"},"preauth30d":{"type":"boolean"}}},"methods":{"type":"object","properties":{"card":{"type":"boolean"},"applePay":{"type":"boolean"},"googlePay":{"type":"boolean"},"manual":{"type":"object","properties":{"enabled":{"type":"boolean"},"instructions":{"type":"string"}}}}}}},"ChannelInput":{"type":"object","description":"Fields depend on the channel (see GET /api/v1/channels). Secrets: empty or masked = keep.","additionalProperties":{"type":["string","boolean"]}},"RuImportInput":{"type":"object","properties":{"reservationId":{"type":"string","description":"RentalsUnited reservation ID (numeric)"}},"required":["reservationId"]},"UserInput":{"type":"object","properties":{"username":{"type":"string"},"name":{"type":"string"},"email":{"type":"string","description":"Used for Google / phone.codeb.io sign-in"},"phone":{"type":"string","description":"Used for phone.codeb.io sign-in"},"role":{"type":"string","examples":["owner","manager","staff","viewer"]},"password":{"type":"string"}},"required":["username"]},"UserPatch":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"role":{"type":"string"},"disabled":{"type":"boolean"},"resetPassword":{"type":"boolean"},"unlinkProvider":{"type":"string","enum":["google","codeb"]}}},"ApiKeyInput":{"type":"object","properties":{"name":{"type":"string"},"role":{"type":"string"}}},"WebhookInput":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"events":{"type":"array","items":{"type":"string","enum":["booking.created","booking.updated","booking.cancelled","checkin.completed","payment.completed","booking.unlocked","extras.ordered"]}},"active":{"type":"boolean"}}},"MailTest":{"type":"object","properties":{"to":{"type":"string","format":"email"}},"required":["to"]},"GuestCheckin":{"type":"object","properties":{"leadGuest":{"type":"object","properties":{"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"dob":{"type":"string","format":"date","examples":["2026-11-18"]},"nationality":{"type":"string"},"docType":{"type":"string","enum":["passport","id_card","driving_licence","residence_permit","eudi_wallet"],"description":"eudi_wallet only after a verified EUDI Wallet presentation; not for the German Meldeschein"},"docNumber":{"type":"string"},"address":{"type":"string"},"zip":{"type":"string"},"city":{"type":"string"},"country":{"type":"string"}}},"adults":{"type":"integer"},"children":{"type":"integer"},"coTravellers":{"type":"array","items":{"type":"object"}},"eta":{"type":"string"},"acceptRules":{"type":"boolean"},"idPhotos":{"type":"array","items":{"type":"string","description":"data: URL"}},"signature":{"type":"string","description":"PNG data: URL"}},"required":["leadGuest","adults","acceptRules"]},"GuestPay":{"type":"object","properties":{"mode":{"type":"string","enum":["checkout","wallet"],"description":"checkout → hosted Revolut page; wallet → order token for Apple Pay / Google Pay buttons"}}},"GuestExtras":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"qty":{"type":"integer"}}}},"deliver":{"type":"string","description":"\"arrival\" or a date"}}},"GuestEta":{"type":"object","properties":{"eta":{"type":"string"}}},"ContactInput":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string"},"company":{"type":"string"},"phone":{"type":"string"},"properties":{"type":"string"},"topic":{"type":"string"},"message":{"type":"string"},"formToken":{"type":"string","description":"From GET /api/public/form-token"},"website":{"type":"string","description":"Honeypot — leave empty"}},"required":["name","email","message","formToken"]},"SignupInput":{"type":"object","properties":{"company":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"password":{"type":"string","minLength":10},"phone":{"type":"string"},"acceptTerms":{"type":"boolean"},"via":{"type":"string","description":"Set when signing up with Google or phone.codeb.io (from the /signup?via= redirect); then email and password are optional"},"formToken":{"type":"string"},"website":{"type":"string"}},"required":["company","name","email","password","acceptTerms","formToken"]},"TenantCreate":{"type":"object","properties":{"name":{"type":"string"},"slug":{"type":"string"},"ownerUsername":{"type":"string"},"ownerEmail":{"type":"string"},"ownerName":{"type":"string"},"ownerPhone":{"type":"string"},"ownerPassword":{"type":"string"},"domain":{"type":"string"}},"required":["name"]},"TenantPatch":{"type":"object","properties":{"name":{"type":"string"},"status":{"type":"string","enum":["active","suspended"]}}},"TenantDelete":{"type":"object","properties":{"confirm":{"type":"string","description":"The tenant slug"}},"required":["confirm"]},"DomainInput":{"type":"object","properties":{"domain":{"type":"string","examples":["guests.example.com"]},"propertyId":{"type":"string","pattern":"^[a-z]_[a-z2-9]{10}$"}},"required":["domain"]},"EnquiryPatch":{"type":"object","properties":{"handled":{"type":"boolean"},"note":{"type":"string"}}},"PlatformConfig":{"type":"object","description":"platformName, platformHost, serverIp, wildcardSubdomains, operator, oidc{google,codeb}, taxRules (via /api/platform/v1/tax-rules), acme{auto,staging,email}, mail{pickupDir,defaultFrom,defaultFromName,enabled}, signup{enabled,requireApproval,notifyEmail}, contact{notifyEmail}, seo{indexNow{enabled},gsc{enabled,property,saJson}}"}},"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","bearerFormat":"gpk_<id>_<secret>"},"platformKey":{"type":"http","scheme":"bearer","bearerFormat":"gpp_<id>_<secret>"},"session":{"type":"apiKey","in":"cookie","name":"gp_s"},"superSession":{"type":"apiKey","in":"cookie","name":"gp_sa"}}}}