Skip to content

Room candidates

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

The physical rooms of a reservation leg’s booked room type, for the leg’s stay. Refused once the reservation is past the point of assignment: this is a pre-check-in read, like the move it serves. Per room: its id and number, its floor, housekeeping status and occupancy, any status block the stay’s window meets, and two answers. assignable is what assign_room_for_reservation_room will do: false when another reservation holds the room for an overlapping window (held_by names it; a declared share does not count) or it is out of order for the stay. Out of service only warns, and a dirty or occupied room can still be assigned, because the desk plans ahead. ready is whether the guest could walk in now: clean or inspected, vacant, and not out of order. Ordered best first: assignable rooms that are ready, then assignable rooms that are not, then the rest, by room number. has_special_request is true when the stay carries a request, whether or not this reader may see the text. Read-only.

Media typeapplication/json
object
params
required
object
target
required
object
id
required
string format: uuid
object_type
required
Allowed value: hospitality.reservation_room

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
arrival_date
required
string format: date
departure_date
required
string format: date
has_special_request
required
boolean
reservation_id
required
string format: uuid
reservation_room_id
required
string format: uuid
room_type_code
string
room_type_id
required
string format: uuid
rooms
required
Array<object>
object
assignable
required
boolean
block
string
Allowed values: out_of_order out_of_service
floor
string
held_by
string format: uuid
housekeeping_status
string
number
string
occupancy
string
ready
required
boolean
room_id
required
string format: uuid
Example
{
"return_value": {
"rooms": [
{
"block": "out_of_order"
}
]
}
}
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.