Skip to content

Suggest incidental hold

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

The card hold a check-in should suggest for this reservation, from the property’s incidental-hold rule (set_incidental_hold_policy): the active rule the reservation matches most specifically in OPERA’s precedence (room type, then rate plan, then guarantee, then source, the house default last), applied to the stay’s nights (a day-use stay counts one), its persons and its room total — OPERA’s nights × Daily Rate, the expected_total (else the booked nights) plus the room taxes charged on top (room_taxes). Returns the amount, the rule (id, code, basis, allowance), what it matched on and why (matched_on, match_reason) and the inputs, or — with no amount — the reason there is nothing to suggest. The desk pre-fills its hold field with the amount and names the rule; nothing is held until a person confirms. Read-only.

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

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
allowance
object
amount
required
string format: decimal
currency
required
string format: iso-4217
amount
object
amount
required
string format: decimal
currency
required
string format: iso-4217
basis
string
Allowed values: per_night room_and_per_night room_plus_flat flat room room_and_per_person_night per_person_night room_plus_percent
match_reason
string
matched_on
Array<string>
nights
required
integer
persons
integer
policy_code
string
policy_id
string format: uuid
reason
string
room_taxes
object
amount
required
string format: decimal
currency
required
string format: iso-4217
room_total
object
amount
required
string format: decimal
currency
required
string format: iso-4217
Example
{
"return_value": {
"basis": "per_night"
}
}
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.