Skip to content

What-if Book function event (rollup delta)

POST
/v1/actions/hospitality.action.book_function_event/whatif
curl --request POST \
--url https://api.aerandil.com/v1/actions/hospitality.action.book_function_event/whatif \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "branch": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "params": { "contact_person_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "do_not_move": true, "end_at": "2026-04-15T12:00:00Z", "event_date": "2026-04-15", "event_type": "meeting", "expected_count": 1, "function_space_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "group_block_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "guarantee_due_at": "2026-04-15T12:00:00Z", "guaranteed_count": 1, "name": "example", "notes": "example", "rental": { "amount": "example", "currency": "example" }, "setup_from": "2026-04-15T12:00:00Z", "setup_style": "theatre", "start_at": "2026-04-15T12:00:00Z", "status": "tentative", "teardown_until": "2026-04-15T12:00:00Z" }, "return_modified": false, "target": { "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "object_type": "hospitality.property" } }'

What-if projection of apply_hospitality_action_book_function_event — previews the action (execute-and-roll-back) and folds its would-be events into rollup deltas, returning the contribution an apply would make to the daily_rooms fact (ADR / RevPAR / TRevPAR / Occupancy inputs) without persisting anything. Requires the same actions:hospitality.action.book_function_event:apply scope as apply. An action that emits no rooms-fact events yields an empty daily_rooms.

Media typeapplication/json
object
branch

Apply against an open branch’s overlay view instead of the canonical (main) plane. The action’s writes land in the branch’s copy-on-first-write overlay, its events in the branch’s own stream, and the invocation is journaled for merge-by-replay. Branch writes are action-only, so this is the write-side entry point to a branch (POST /v1/branches forks one).

string format: uuid
params
required
object
contact_person_id
The client's on-site contact
string format: uuid
do_not_move
The client was promised this room (default false)
boolean
end_at
required
Doors close
string format: date-time
event_date
required
The property-local day
string format: date
event_type
required
What kind of function
string
Allowed values: meeting conference breakout reception breakfast lunch dinner banquet wedding_ceremony wedding_breakfast exhibition rehearsal other
expected_count
required
Expected attendance
integer
function_space_id
required
The space to set it in
string format: uuid
group_block_id
The group block this is an event of
string format: uuid
guarantee_due_at
When the guarantee is due
string format: date-time
guaranteed_count
Guaranteed attendance, when already given
integer
name
required
Event name
string
notes
Notes for the operating departments
string
rental
Function space rental agreed
object
amount
required
string format: decimal
currency
required
string format: iso-4217
setup_from
When the setup crew may have the room
string format: date-time
setup_style
required
How the room is set
string
Allowed values: theatre classroom boardroom u_shape hollow_square banquet_rounds cabaret reception exhibition existing
start_at
required
Doors open
string format: date-time
status
tentative (default) or definite
string
Allowed values: tentative definite
teardown_until
When the room must be clear again
string format: date-time
return_modified

When true, the response carries modified_objects and modified_links projections — the engine reads the event log inside the same transaction so the projection observes the handler’s own writes.

boolean
target
required
object
id
required
string format: uuid
object_type
required
Allowed value: hospitality.property

Rollup deltas the action would contribute, computed and rolled back.

Media typeapplication/json
object
daily_rooms
required

Per (property, business_date) additive contribution to the rooms rollup.

Array<object>
object
business_date
required
string format: date
currency

ISO 4217, when the fold observed one.

string
property_id
required
string format: uuid
rooms_revenue_net_delta
required

Decimal, net rooms revenue delta.

string
rooms_sold_delta
required
integer format: int64
total_revenue_net_delta
required

Decimal, net total revenue delta.

string
Examplegenerated
{
"daily_rooms": [
{
"business_date": "2026-04-15",
"currency": "example",
"property_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"rooms_revenue_net_delta": "example",
"rooms_sold_delta": 1,
"total_revenue_net_delta": "example"
}
]
}
Cache-Control
string
Allowed value: no-store

Always no-store — derived, uncommitted data.

Validation error — the apply would be rejected.