Regret record
const url = 'https://api.aerandil.com/v1/functions/hospitality.function.regret_record/invoke';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"params":{"as_of":"2026-04-15T12:00:00Z","property_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","since":"2026-04-15T12:00:00Z"}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
object
Examplegenerated
{ "params": { "as_of": "2026-04-15T12:00:00Z", "property_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "since": "2026-04-15T12:00:00Z" }}Responses
Section titled “Responses”Function invoked. The body carries the typed return_value shaped by the function’s declared return_type.
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
Per-invocation correlation id; appears on log/trace records this function emitted.
object
object
object
Example
{ "return_value": [ { "source": "direct_web" } ]}Headers
Section titled “Headers”Always no-store — function results are time-sensitive and never cacheable.
Function or target object not found.
Parameter validation or domain-rule violation.