Skip to content

Regret record

POST
/v1/functions/hospitality.function.regret_record/invoke
curl --request POST \
--url https://api.aerandil.com/v1/functions/hospitality.function.regret_record/invoke \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "params": { "as_of": "2026-04-15T12:00:00Z", "property_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "since": "2026-04-15T12:00:00Z" } }'

The regret record, derived. Every shopping session the house kept through offer_stay that booked nothing — no reservation linked to it (reservation_booked_in_session) booked by as_of — as its last offer, OPERA’s “only the last room/rate combination”: the stay, the party, the room type and plan, the rate quoted, the channel, when the shopper last looked, how many offers the session made, and the visitor key the house issued (absent for a reader without pii.guest clearance), so a desk can fold one browser’s earlier visits into its later booking. Nobody records a regret: the absence of a booking in the session is one. A session whose last offer is within thirty minutes of as_of is still in progress and left off. since keeps the sessions whose last offer fell at or after it. Read-only — emits no edits.

Media typeapplication/json
object
params
required
object
as_of
Read the record as it stood at this instant (defaults to now)
string format: date-time
property_id
required
Property
string format: uuid
since
Sessions whose last offer fell at or after this instant; omit for all
string format: date-time
Examplegenerated
{
"params": {
"as_of": "2026-04-15T12:00:00Z",
"property_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"since": "2026-04-15T12:00:00Z"
}
}

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
adults
required
integer
arrival_date
required
string format: date
departure_date
required
string format: date
nights
required
integer
offered_at
required
string format: date-time
offers
required
integer
quoted_rate
required
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
session_id
required
string
source
required
string
Allowed values: direct_web direct_call property_direct ota gds wholesale corporate walk_in group_block agent loyalty
total
required
object
amount
required
string format: decimal
currency
required
string format: iso-4217
visitor_id
string
Example
{
"return_value": [
{
"source": "direct_web"
}
]
}
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.