Rooming plan
const url = 'https://api.aerandil.com/v1/functions/hospitality.function.rooming_plan/invoke';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"params":{"date":"2026-04-15"},"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.rooming_plan/invoke \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "params": { "date": "2026-04-15" }, "target": { "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "object_type": "hospitality.property" } }'A room for every arrival on a date that still needs one, as one plan: each unassigned leg of a confirmed, held or modified reservation is placed in the room room_candidates would rank first, longest stay first, and no room is used twice. date defaults to the house’s hotel date. Each of lines gives the reservation, the leg (reservation_room_id, the target assign_room_for_reservation_room takes), the guest, the room (room_id, room_number) and ready, whether the guest could walk in now. held_back lists the legs left to a person, with reason: request_to_check when the stay carries a special request, which has to be read before a room is chosen, and no_room when no room of the booked type can take the stay. Nothing is assigned: this is a read, and a line takes effect only when it is put to the assign action. Guest names are personal data: a reader not cleared for them gets the rows without them.
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
object
object
Example
{ "return_value": { "held_back": [ { "reason": "request_to_check" } ] }}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.