checkin.activeForStay
Stay-detail UI affordance: number of currently valid portal links for a stay (`pending`/`submitted`/`verified`, effective expiry — the later of `expires_at` and check-out + 10 days — still ahead, booking neither cancelled nor on hold), when they were last blocked (`gesperrtAm`, ISO, `null` if never) and when the youngest valid session was created (`juengsteGueltigeAm`) — a block is current only while it is younger. RLS-scoped via the surrounding protectedProcedure, so the operator cannot probe… Read-only query.
Input parameters
| Field | Type | Required | Notes |
|---|---|---|---|
stayId | string | yes |
Output fields
| Field | Type | Required | Notes |
|---|---|---|---|
activeCount | integer | yes | |
gesperrtAm | string · nullable | yes | |
juengsteGueltigeAm | string · nullable | yes |
checkin.clear_waiver
Clear a guest's Meldeschein waiver on a pending check-in session — e.g. after the ID-OCR contradiction warning shows the guest is not domestic after all. The portal then asks the nationality question again on the guest's next visit. Only works while the session is still pending.
Input parameters
| Field | Type | Required | Notes |
|---|---|---|---|
sessionId | string | yes | UUID of the checkin_session to clear the waiver on. |
Output fields
| Field | Type | Required | Notes |
|---|---|---|---|
ok | boolean | yes |
checkin.create
Start a new online check-in session for a stay.
Input parameters
| Field | Type | Required | Notes |
|---|---|---|---|
stayId | string | yes |
Output fields
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | yes | |
token | string | yes | |
url | string | yes |
checkin.extract_id_ocr
Extract OCR data from a guest ID photo front side using Claude Haiku 4.5 vision. Returns a structured IdOcrResult (vorname, nachname, geburtsdatum, staatsangehoerigkeit, ausweisnummer, address fields, confidence) cached in guest_id_uploads.ocr_data_json. Re-calling returns the cached result without incurring a new Haiku call. Requires a valid 64-char portal token (guest-auth surface). Returns { ok: false, error } for photo_not_found | not_image | cap_exceeded | ocr_failed.
Input parameters
| Field | Type | Required | Notes |
|---|---|---|---|
token | string | yes | 64-char portal token identifying the guest session. |
guestIndex | integer | yes | Guest slot index: 0 = primary booker, 1–5 = co-travelers. |
Output fields
One of 2 shapes, depending on the outcome:
Shape 1
| Field | Type | Required | Notes |
|---|---|---|---|
ok | literal | yes | One of: true |
data | object | yes | IdOcrResult — structured OCR fields. |
cached | boolean | yes | True when result came from DB cache, false when freshly extracted. |
Shape 2
| Field | Type | Required | Notes |
|---|---|---|---|
ok | literal | yes | One of: false |
error | string | yes | One of: invalid_token | token_expired | photo_not_found | not_image | cap_exceeded | ocr_failed |
checkin.get
Get a single check-in session's detail.
Input parameters
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | yes |
Output fields
The whole object may be null.
| Field | Type | Required | Notes |
|---|---|---|---|
session | object | yes | |
session.id | string | yes | |
session.tenantId | string | yes | |
session.stayId | string | yes | |
session.token | string | yes | |
session.status | string | yes | |
session.createdAt | string | yes | |
session.expiresAt | string | yes | |
session.submittedAt | string · nullable | yes | |
session.verifiedAt | string · nullable | yes | |
session.verifiedByUserId | string · nullable | yes | |
session.refreshedFromToken | string · nullable | yes | |
session.preArrivalMailSentAt | string · nullable | yes | |
session.allGuestsDomestic | boolean · nullable | yes | |
session.meldescheinWaivedAt | string · nullable | yes | |
session.erstmalsGeoeffnetAt | string · nullable | yes | |
guestIdUploads | array of object | yes | |
guestIdUploads.uploadId | string | yes | |
guestIdUploads.guestIndex | integer | yes | |
guestIdUploads.guestName | string | yes | |
guestIdUploads.hasFront | boolean | yes | |
guestIdUploads.hasBack | boolean | yes | |
meldeschein | object · nullable | yes | |
meldeschein.id | string | yes | |
meldeschein.sessionId | string | yes | |
meldeschein.vorname | string | yes | |
meldeschein.nachname | string | yes | |
meldeschein.geburtsdatum | string | yes | |
meldeschein.geburtsort | string · nullable | yes | |
meldeschein.staatsangehoerigkeit | string | yes | |
meldeschein.ausweisart | string | yes | |
meldeschein.ausweisnummer | string · nullable | yes | |
meldeschein.anschriftStrasse | string | yes | |
meldeschein.anschriftPlz | string | yes | |
meldeschein.anschriftOrt | string | yes | |
meldeschein.anschriftLand | string | yes | |
meldeschein.ankunft | string | yes | |
meldeschein.abreise | string | yes | |
meldeschein.mitreisendeJson | array of object | yes | |
meldeschein.signatureSvg | string · nullable | yes | |
meldeschein.idPhotoPath | string · nullable | yes | |
meldeschein.createdAt | string | yes | |
stay | object · nullable | yes | |
stay.id | string | yes | |
stay.tenantId | string | yes | |
stay.guestId | string | yes | |
stay.externalRef | string · nullable | yes | |
stay.externalCode | string · nullable | yes | |
stay.sourceChannel | enum · nullable | yes | One of: whatsapp, email, hospitable, voice, channex, beds24 |
stay.checkIn | string · nullable | yes | |
stay.checkOut | string · nullable | yes | |
stay.room | string · nullable | yes | |
stay.status | enum | yes | One of: pending, confirmed, checked_in, checked_out, cancelled, hold |
stay.otaStatus | string · nullable | yes | |
stay.bookingDate | string · nullable | yes | |
stay.issueAlert | string · nullable | yes | |
stay.stayType | string · nullable | yes | |
stay.notes | string · nullable | yes | |
stay.createdAt | string | yes | |
stay.paymentIntentId | string · nullable | yes | |
stay.paymentStatus | string · nullable | yes | |
stay.bookingTotalCents | integer · nullable | yes | |
stay.currencyCode | string · nullable | yes | |
stay.expectedArrivalAt | string · nullable | yes | |
stay.folioClosed | string · nullable | yes | |
stay.holdExpiresAt | string · nullable | yes | |
stay.source | string · nullable | yes | |
stay.guestsCount | integer · nullable | yes | |
stay.adults | integer · nullable | yes | |
stay.children | integer · nullable | yes | |
stay.infants | integer · nullable | yes | |
stay.pets | integer · nullable | yes | |
stay.nights | integer · nullable | yes | |
stay.otaSource | string · nullable | yes | |
stay.otaReservationId | string · nullable | yes | |
guest | object · nullable | yes | |
guest.id | string | yes | |
guest.tenantId | string | yes | |
guest.canonicalEmail | string · nullable | yes | |
guest.canonicalPhone | string · nullable | yes | |
guest.nameHint | string · nullable | yes | |
guest.locale | string · nullable | yes | |
guest.createdAt | string | yes | |
ocrNationalityMismatch | boolean | yes | |
rezeptionsNamen | object · nullable | yes | |
rezeptionsNamen.vorname | string | yes | |
rezeptionsNamen.nachname | string | yes |
checkin.getMeldescheinEntry
Load the operator-finalized Meldeschein entry for a stay. Returns null if no entry exists yet. Read-only query.
Input parameters
| Field | Type | Required | Notes |
|---|---|---|---|
stayId | string | yes |
Output fields
The whole object may be null.
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | yes | |
tenantId | string | yes | |
stayId | string | yes | |
vorname | string | yes | |
nachname | string | yes | |
geburtsdatum | string · nullable | yes | |
staatsangehoerigkeit | string · nullable | yes | |
ausweisart | string · nullable | yes | |
ausweisnummer | string · nullable | yes | |
anschriftStrasse | string · nullable | yes | |
anschriftPlz | string · nullable | yes | |
anschriftOrt | string · nullable | yes | |
anschriftLand | string · nullable | yes | |
ankunft | string | yes | |
abreise | string | yes | |
bundesland | string | yes | |
finalizedBy | string · nullable | yes | |
finalizedAt | string · nullable | yes | |
createdAt | string | yes |
checkin.getPortalMeldeschein
Load the guest-portal submitted Meldeschein for a stay. Looks up the most-recent `submitted` or `verified` checkin_session for the stay, then returns its meldeschein row. Returns null when no portal submission exists. Read-only query.
Input parameters
| Field | Type | Required | Notes |
|---|---|---|---|
stayId | string | yes |
Output fields
The whole object may be null.
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | yes | |
sessionId | string | yes | |
vorname | string | yes | |
nachname | string | yes | |
geburtsdatum | string | yes | |
geburtsort | string · nullable | yes | |
staatsangehoerigkeit | string | yes | |
ausweisart | string | yes | |
ausweisnummer | string · nullable | yes | |
anschriftStrasse | string | yes | |
anschriftPlz | string | yes | |
anschriftOrt | string | yes | |
anschriftLand | string | yes | |
ankunft | string | yes | |
abreise | string | yes | |
mitreisendeJson | array of object | yes | |
mitreisendeJson.vorname | string | yes | |
mitreisendeJson.nachname | string | yes | |
mitreisendeJson.geburtsdatum | string | yes | |
signatureSvg | string · nullable | yes | |
idPhotoPath | string · nullable | yes | |
createdAt | string | yes |
checkin.get_meldeschein
Get the finalized operator Meldeschein entry for a stay, or the guest-portal submitted data if no operator entry exists. Returns null when neither source has data for the stay. Prefers the operator-finalized entry (meldeschein_entries) over the guest-portal submission (meldescheine) when both exist.
Input parameters
| Field | Type | Required | Notes |
|---|---|---|---|
stayId | string | yes | UUID of the stay to get the Meldeschein for. |
Output fields
One of 3 shapes, depending on the outcome:
Shape 1
| Field | Type | Required | Notes |
|---|---|---|---|
source | literal | yes | Operator-finalized entry (meldeschein_entries). — One of: operator |
data | object | yes | |
data.id | string | yes | |
data.tenantId | string | yes | |
data.stayId | string | yes | |
data.vorname | string | yes | |
data.nachname | string | yes | |
data.geburtsdatum | string · nullable | yes | ISO date, YYYY-MM-DD. |
data.staatsangehoerigkeit | string · nullable | yes | |
data.ausweisart | string · nullable | yes | perso | reisepass | sonstiges |
data.ausweisnummer | string · nullable | yes | |
data.anschriftStrasse | string · nullable | yes | |
data.anschriftPlz | string · nullable | yes | |
data.anschriftOrt | string · nullable | yes | |
data.anschriftLand | string · nullable | yes | |
data.ankunft | string | yes | ISO date, YYYY-MM-DD. |
data.abreise | string | yes | ISO date, YYYY-MM-DD. |
data.bundesland | string | yes | Federal state whose Meldeschein rules apply, e.g. 'nrw'. |
data.finalizedBy | string · nullable | yes | User id who finalized, or null. |
data.finalizedAt | any · nullable | yes | |
data.createdAt | any | yes |
Shape 2
| Field | Type | Required | Notes |
|---|---|---|---|
source | literal | yes | Guest-portal submission (meldescheine). — One of: portal |
data | object | yes | |
data.id | string | yes | |
data.sessionId | string | yes | |
data.vorname | string | yes | |
data.nachname | string | yes | |
data.geburtsdatum | string | yes | ISO date, YYYY-MM-DD. |
data.geburtsort | string · nullable | yes | |
data.staatsangehoerigkeit | string | yes | |
data.ausweisart | string | yes | perso | reisepass | sonstiges |
data.ausweisnummer | string · nullable | yes | |
data.anschriftStrasse | string | yes | |
data.anschriftPlz | string | yes | |
data.anschriftOrt | string | yes | |
data.anschriftLand | string | yes | |
data.ankunft | string | yes | ISO date, YYYY-MM-DD. |
data.abreise | string | yes | ISO date, YYYY-MM-DD. |
data.mitreisendeJson | array of object | yes | Accompanying guests. Empty array when the guest travelled alone. |
data.signatureSvg | string · nullable | yes | SVG path data from the signature pad. |
data.idPhotoPath | string · nullable | yes | Storage path of the uploaded ID photo. |
data.createdAt | any | yes |
Shape 3
| Field | Type | Required | Notes |
|---|---|---|---|
source | literal | yes | Neither source holds data for this stay. — One of: none |
data | null | yes |
checkin.list
List check-in sessions, optionally filtered by stay/status.
Input parameters
| Field | Type | Required | Notes |
|---|---|---|---|
status | enum | no | One of: pending, submitted, verified, expired |
limit | integer | no | Default: 50 |
Output fields
Returns array of object. Fields of each element:
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | yes | |
stayId | string | yes | |
status | string | yes | |
createdAt | string | yes | |
submittedAt | string · nullable | yes | |
verifiedAt | string · nullable | yes | |
token | string | yes | |
meldescheinWaivedAt | string · nullable | yes | |
checkIn | string · nullable | yes | |
checkOut | string · nullable | yes | |
room | string · nullable | yes | |
guestName | string · nullable | yes | |
exConversationId | string · nullable | yes | |
externalRef | string · nullable | yes |
checkin.list_guest_id_uploads
List all guest ID document uploads for a given stay. Returns metadata including guest name, index (0 = primary booker, 1+ = co-travelers), photo URLs for the photo-serve endpoint, and upload timestamps. Only owner and staff roles may call this tool.
Input parameters
| Field | Type | Required | Notes |
|---|---|---|---|
stayId | string | yes | UUID of the stay to list uploads for. |
Output fields
| Field | Type | Required | Notes |
|---|---|---|---|
uploads | array of object | yes | |
uploads.uploadId | string | yes | |
uploads.guestIndex | integer | yes | |
uploads.guestName | string | yes | |
uploads.frontUrl | string | yes | |
uploads.backUrl | string · nullable | yes | |
uploads.uploadedAt | string | yes | ISO 8601 UTC timestamp. |
checkin.markVerified
Mark a guest's submitted check-in / ID as operator-verified.
Input parameters
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | yes |
Output fields
| Field | Type | Required | Notes |
|---|---|---|---|
ok | boolean | yes |
checkin.portalLink
“Copy link” in the click window of the timeline: the guest's portal link as the guest receives it — an existing short link (`<origin>/g/<code>`), otherwise the long URL. READ ONLY: `null` without a live session; creates neither a session nor a short link (that is what “send link again” does). Operator roles.
Input parameters
| Field | Type | Required | Notes |
|---|---|---|---|
stayId | string | yes |
Output fields
| Field | Type | Required | Notes |
|---|---|---|---|
url | string · nullable | yes |
checkin.portalTrichter
Portal funnel: how far do guests get from “Link verschickt” (link sent) to “Ausweis hochgeladen” (ID uploaded)? Basis is the stays with arrival in the period (default: last 30 days and next 7), excluding cancelled stays, voice holds and mere inquiries. Stages: sent, opened (by humans only, never by link previews), started (any guest action in the portal), registration form (Meldeschein) submitted or waived, ID uploaded — each with count and share. Per stage, the stays that are stuck there… Read-only query.
Input parameters
| Field | Type | Required | Notes |
|---|---|---|---|
tageZurueck | integer | no | Default: 30 |
tageVoraus | integer | no | Default: 7 |
Output fields
| Field | Type | Required | Notes |
|---|---|---|---|
von | string | yes | |
bis | string | yes | |
gesamt | integer | yes | |
fertig | integer | yes | |
basis | object | yes | |
basis.anzahl | integer | yes | |
basis.anteil | number | yes | |
basis.haengen | array of object | yes | |
stufen | array of object | yes | |
stufen.stufe | enum | yes | One of: verschickt, geoeffnet, angefangen, meldeschein, ausweis |
stufen.anzahl | integer | yes | |
stufen.anteil | number | yes | |
stufen.ohneSignal | integer | yes | |
stufen.haengen | array of object | yes |
checkin.revokeForStay
Revoke the online check-in session for a stay. Requires confirmation.
Input parameters
| Field | Type | Required | Notes |
|---|---|---|---|
stayId | string | yes |
Output fields
| Field | Type | Required | Notes |
|---|---|---|---|
revokedCount | integer | yes | |
abgelaufen | integer | yes | |
gedreht | integer | yes | |
bearbeiteteNachrichtenMitAltemLink | integer | yes |
checkin.rotateIdPhoto
Rotates an ID photo by 90° and SAVES the rotation. Only the EXIF Orientation entry is written, losslessly — afterwards the preview, enlarged view, new tab, registration form (Meldeschein) printout and OCR all show the photo the right way up. Staff only; the row is read RLS-bound AND with an explicit property filter, and the path comes from the database, never from the input. Every rotation is recorded in the stay's change history. Mutation — changes data.
Input parameters
| Field | Type | Required | Notes |
|---|---|---|---|
uploadId | string | yes | |
side | enum | yes | One of: front, back |
richtung | enum | yes | One of: links, rechts |
Output fields
| Field | Type | Required | Notes |
|---|---|---|---|
orientierung | integer | yes |
checkin.saveGuestPhone
PUBLIC — no auth. The guest enters a phone number in the portal (arrival time section). Reason, 2026-10-09: since 28 September 2026, Booking.com no longer passes phone numbers on to channel managers. Mutation — changes data.
Input parameters
| Field | Type | Required | Notes |
|---|---|---|---|
token | string | yes | |
telefon | string | yes | |
zweck | enum | no | One of: whatsapp, rueckfrage |
Output fields
| Field | Type | Required | Notes |
|---|---|---|---|
ok | boolean | yes |
checkin.upcoming_without_session
List stays arriving in the next 14 days that have no checkin_session yet — i.e. guests who have not received a portal link. Use this to identify who needs a Pre-Arrival link sent before their arrival. Returns up to 50 rows ordered by check-in date ascending.
Input parameters
Returns object.
Output fields
| Field | Type | Required | Notes |
|---|---|---|---|
stays | array of object | yes | |
stays.stayId | string | yes | |
stays.guestName | string · nullable | yes | |
stays.room | string · nullable | yes | |
stays.checkIn | string | yes | ISO 8601 date of arrival. |
stays.checkOut | string · nullable | yes |
checkin.upsertMeldescheinEntry
Create or update a guest's Meldeschein (German registration) entry.
Input parameters
| Field | Type | Required | Notes |
|---|---|---|---|
stayId | string | yes | |
vorname | string | yes | |
nachname | string | yes | |
geburtsdatum | string | no | |
staatsangehoerigkeit | string | no | |
ausweisart | enum | no | One of: perso, reisepass, sonstiges |
ausweisnummer | string | no | |
anschriftStrasse | string | no | |
anschriftPlz | string | no | |
anschriftOrt | string | no | |
anschriftLand | string | no | |
ankunft | string | yes | |
abreise | string | yes | |
bundesland | string | no |
Output fields
The whole object may be null.
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | yes | |
tenantId | string | yes | |
stayId | string | yes | |
vorname | string | yes | |
nachname | string | yes | |
geburtsdatum | string · nullable | yes | |
staatsangehoerigkeit | string · nullable | yes | |
ausweisart | string · nullable | yes | |
ausweisnummer | string · nullable | yes | |
anschriftStrasse | string · nullable | yes | |
anschriftPlz | string · nullable | yes | |
anschriftOrt | string · nullable | yes | |
anschriftLand | string · nullable | yes | |
ankunft | string | yes | |
abreise | string | yes | |
bundesland | string | yes | |
finalizedBy | string · nullable | yes | |
finalizedAt | string · nullable | yes | |
createdAt | string | yes |