Skip to content

F&B room lookup

POST
/v1/functions/hospitality.function.fnb_room_lookup/invoke
curl --request POST \
--url https://api.aerandil.com/v1/functions/hospitality.function.fnb_room_lookup/invoke \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "params": { "query": "example" }, "target": { "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "object_type": "hospitality.property" } }'

The in-house stays a room charge can post to — OHIP’s in-house search by room or surname, at the target property. query is a room number (an exact match, case-insensitive) or at least three letters of the guest’s surname (a prefix) — Simphony’s restricted posting: a shorter query matches room numbers only, and an empty one is refused, so the read never lists the house. At most ten stays come back (truncated says when there were more). Per in-house stay: how it matched (matched_by: room or surname), its reservation and confirmation number, the room it is in, the guest (guest_id, guest_name) and the stay’s open guest folios with their number and window; on a room match also sharers — the other guests in house in that room, each with their guest_id, name and reservation (each signs on their own booking), empty on a surname match. And the stay’s posting rules, so the till warns before the tender is chosen: no_post (the desk’s set_posting_rules — a room charge is refused) and credit_available — the greater of the stay’s credit limit and its live card holds, less its bills’ balance and the room still due for the nights to come (a money; null when no credit rule applies: no limit and no hold). Names only, never contact details. Ordered by room, then guest. Guest names are personal data: a reader not cleared for them gets the rows without them. Read-only.

Media typeapplication/json
object
params
required
object
query
required
Room number or surname prefix
string
target
required
object
id
required
string format: uuid
object_type
required
Allowed value: hospitality.property

Function invoked. The body carries the typed return_value shaped by the function’s declared return_type.

Media typeapplication/json
InvokeFunctionResponse

Envelope returned by the Aerandil function engine. correlation_id is the per-invocation id for trace stitching; return_value is the typed value the function computed (shape declared by the function’s return_type).

object
correlation_id
required

Per-invocation correlation id; appears on log/trace records this function emitted.

string format: uuid
return_value
required
object
property_id
required
string format: uuid
query
required
string
stays
required
Array<object>
object
confirmation_number
string
credit_available
object
amount
required
string format: decimal
currency
required
string format: iso-4217
folios
required
Array<object>
object
folio_id
required
string format: uuid
number
string
window_number
integer
guest_id
string format: uuid
guest_name
string
matched_by
required
string
Allowed values: room surname
no_post
required
boolean
reservation_id
required
string format: uuid
room_number
string
sharers
required
Array<object>
object
guest_id
required
string format: uuid
guest_name
string
reservation_id
required
string format: uuid
stay_id
required
string format: uuid
truncated
required
boolean
Example
{
"return_value": {
"stays": [
{
"matched_by": "room"
}
]
}
}
Cache-Control
string

Always no-store — function results are time-sensitive and never cacheable.

Function or target object not found.

Parameter validation or domain-rule violation.