Hotel date
const url = 'https://api.aerandil.com/v1/functions/hospitality.function.hotel_date/invoke';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"params":{},"target":{"id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","object_type":"hospitality.property"}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
object
object
Responses
Section titled “Responses”Function invoked. The body carries the typed return_value shaped by the function’s declared return_type.
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
Per-invocation correlation id; appears on log/trace records this function emitted.
object
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" }}Headers
Section titled “Headers”Always no-store — function results are time-sensitive and never cacheable.
Function or target object not found.
Parameter validation or domain-rule violation.