Skip to content

Quote stay

POST
/v1/functions/hospitality.function.quote_stay/invoke
curl --request POST \
--url https://api.aerandil.com/v1/functions/hospitality.function.quote_stay/invoke \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "params": { "adults": 1, "arrival_date": "2026-04-15", "departure_date": "2026-04-15", "property_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "rate_plan_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "room_type_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" } }'

The read half of create_reservation’s admission gate. For a stay (arrival, departure) at an occupancy (adults, the grid’s occupancy), one offer per room type and rate plan the property sells — or the one asked for: whether the action would admit it without a nightly_rate, the published price of every night and the total, the rooms the availability ledger will still sell and the ceiling it sells to, the stop-sold nights, the stay-length window in force for the arrival, and every blocker in the STAY_BLOCKERS vocabulary, each carrying the refusal the action would make for it verbatim. The action refuses with the first blocker, in the order it checks; the quote returns them all, so the two cannot disagree about what is wrong. A room per offer: a multi-room stay is several quotes. Read-only — emits no edits and holds nothing.

Media typeapplication/json
object
params
required
object
adults
required
Adults — the occupancy the grid is priced at
integer
arrival_date
required
Arrival date
string format: date
departure_date
required
Departure date (the arrival date for a day-use slot)
string format: date
property_id
required
Property
string format: uuid
rate_plan_id
Rate plan; omit for every plan the property sells
string format: uuid
room_type_id
Room type; omit for every type the property sells
string format: uuid
Examplegenerated
{
"params": {
"adults": 1,
"arrival_date": "2026-04-15",
"departure_date": "2026-04-15",
"property_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"rate_plan_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"room_type_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
}
}

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
Array<object>
object
available
integer
blockers
required
Array<object>
object
kind
required
string
Allowed values: stay_shape below_plan_minimum above_plan_maximum rate_plan_invalid unpriced currency_mismatch closed closed_to_arrival closed_to_departure below_minimum_stay above_maximum_stay sold_out
night
string format: date
reason
required
string
bookable
required
boolean
currency
string format: iso-4217
max_stay
integer
min_stay
integer
nights
required
Array<object>
object
ceiling
integer
closed
required
boolean
date
required
string format: date
free
integer
rate
object
amount
required
string format: decimal
currency
required
string format: iso-4217
rate_plan_id
required
string format: uuid
room_type_id
required
string format: uuid
total
object
amount
required
string format: decimal
currency
required
string format: iso-4217
Example
{
"return_value": [
{
"blockers": [
{
"kind": "stay_shape"
}
]
}
]
}
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.