Skip to content

Validate Set tax rule (dry-run)

POST
/v1/actions/hospitality.action.set_tax_rule/validate
curl --request POST \
--url https://api.aerandil.com/v1/actions/hospitality.action.set_tax_rule/validate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "branch": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "params": { "adults_only": true, "basis": "percent", "bucket": "rooms", "code": "example", "description": "example", "effective_from": "2026-04-15", "effective_to": "2026-04-15", "flat_amount": { "amount": "example", "currency": "example" }, "inclusive": true, "jurisdiction": "example", "rate": "example", "reduced_after_nights": 1, "reduced_value_share": "example", "system_charge_kind": "forfeited_deposit", "tax_class": "example" }, "return_modified": false, "target": { "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "object_type": "hospitality.property" } }'

Dry-run of apply_hospitality_action_set_tax_rule’s parameter checks. No side effects, no idempotency reservation, no handler dispatch — just the schema pass plus action-level shape (target presence, target type, unknown-parameter rejection). return_modified is meaningless here and ignored.

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
adults_only
per_person_per_night only: count adults, not children
boolean
basis
required
How the tax computes
string
Allowed values: percent flat_per_night per_person_per_night
bucket
USALI bucket whose charges this rule taxes (or give system_charge_kind)
string
Allowed values: rooms food_beverage health_club_spa golf parking minibar other_operated minor_operated miscellaneous_income it_services retail
code
required
Tax code — the rule's identity within the property
string
description
Operator-facing description
string
effective_from
required
First business date the rule applies (inclusive)
string format: date
effective_to
Last business date the rule applies (inclusive); omit for open-ended
string format: date
flat_amount
Amount per room night (flat_per_night) or per guest per night (per_person_per_night)
object
amount
required
string format: decimal
currency
required
string format: iso-4217
inclusive
required
Tax lives inside the posted amount (true) or on top (false)
boolean
jurisdiction
required
Taxing jurisdiction
string
rate
Rate for percent rules (decimal in [0, 1]; 0.10 = 10%)
string format: decimal
reduced_after_nights
Percent rooms rules only: tax a reduced value from the night after this many nights of a continuous stay (28 for the UK)
integer
reduced_value_share
The share of a long-stay night still taxed (0.20 for the UK)
string format: decimal
system_charge_kind
The retained payment this rule taxes (or give bucket)
string
Allowed values: forfeited_deposit cancellation_fee no_show_fee no_show_revenue
tax_class
The F&B tax class this rule taxes (or give bucket / system_charge_kind)
string
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

Validation outcome. result is valid or invalid; per-parameter diagnostics are always populated for every declared parameter so a UI can render the action’s full surface.

Media typeapplication/json
object
action
required
string
errors

Action-level errors not tied to a single parameter (missing target, target type mismatch, unknown parameter names). Absent when empty.

Array<string>
parameters
required

Per-parameter diagnostics keyed by api_name.

object
key
additional properties
object
errors
Array<string>
result
required
Allowed values: valid invalid
value
required

The serialised value the server interpreted, or null if the parameter was not supplied.

result
required
Allowed values: valid invalid
Example
{
"parameters": {
"additionalProperty": {
"result": "valid"
}
},
"result": "valid"
}