Skip to content

Rooming plan

POST
/v1/functions/hospitality.function.rooming_plan/invoke
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.

Media typeapplication/json
object
params
required
object
date
The arrival date to plan; the house's hotel date when omitted
string format: date
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
date
required
string format: date
held_back
required
Array<object>
object
confirmation_number
string
guest_name
string
reason
required
string
Allowed values: request_to_check no_room
reservation_id
required
string format: uuid
reservation_room_id
required
string format: uuid
room_type_code
string
lines
required
Array<object>
object
confirmation_number
string
guest_name
string
ready
required
boolean
reservation_id
required
string format: uuid
reservation_room_id
required
string format: uuid
room_id
required
string format: uuid
room_number
string
room_type_code
string
Example
{
"return_value": {
"held_back": [
{
"reason": "request_to_check"
}
]
}
}
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.