Skip to content

Hotel date

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

The property’s today as the kernel dates a posting, a no-show, a postponement or a report made now — its hotel date: the business date it has open (open_business_date) once that day was opened, else its local calendar day. So at 01:00 with yesterday still open the answer is yesterday, and after an early night audit that rolled tomorrow open it is tomorrow. With it time_zone, the IANA zone that calendar is read in (absent when the property names none the kernel can read; the calendar is then UTC’s), and business_date_open: true when the date is a business date opened and not yet closed by run_night_audit — it holds until the audit rolls it — and false when no day is open and the date is the calendar’s, which moves at the house’s midnight. A client reads this rather than computing the fallback with its own clock. Read-only.

Media typeapplication/json
object
params
required
object
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
business_date_open
required
boolean
hotel_date
required
string format: date
property_id
required
string format: uuid
time_zone
string
Examplegenerated
{
"correlation_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"return_value": {
"business_date_open": true,
"hotel_date": "2026-04-15",
"property_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"time_zone": "example"
}
}
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.