Skip to content

Search Stay

POST
/v1/object-types/hospitality.stay/search
curl --request POST \
--url https://api.aerandil.com/v1/object-types/hospitality.stay/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "branch": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "cursor": "example", "filters": [ { "property": "id", "type": "eq", "value": "example" } ], "limit": 1, "order": "asc", "property_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "scope": { "level": "tenant" }, "sort_by": "created_at" }'

Search for instances. Filters eq, contains, gte and lte AND-compose; or / not are additive follow-ups. Pages with an opaque cursor; the +1 fetch returns has_more without a second round-trip. Ordered by sort_by (default created_at) in order (default ascending), id breaking ties; rows with no value for a property key sort last.

The execution of a reservation: the actual arrival, room assignment, in-house period, and departure. Charges and payments hang off the stay’s folio.

Media typeapplication/json
object
branch

Optional open-branch id. Search composes that branch’s copy-on-first-write overlay instead of main, so a preview reads its own hypothetical writes. Omit to read main.

string format: uuid
cursor

Opaque cursor from a prior response’s next_cursor. Pass back verbatim; do not introspect.

string
filters

Conjunctive list of predicates. Empty or omitted matches every row in scope, capped by limit.

Array
One of:
object
property
required
Allowed value: id
type
required
Allowed value: eq
value
required
string
limit

Page size. Server defaults to 50, silently clamps at 500 (AIP-158 §3).

integer
>= 1 <= 500
order

Direction of sort_by: asc (oldest / smallest first) or desc. A cursor is bound to the sort_by and order it was minted under; another pair is refused (422).

string
default: asc
Allowed values: asc desc
property_id

The house a desk stands in: keeps this property’s rows (property- or venue-scoped there) and every row scoped to no property (tenant, brand, portfolio), and drops a sibling house’s — the meaning property_id has on the event tail.

string format: uuid
scope
One of: discriminator: level
object
level
required
string
Allowed value: tenant
Allowed values: tenant
sort_by

What the page is ordered by: the row’s created_at or updated_at, or a property whose type orders — strings, enums and dates as text, ints, decimals and durations as numbers, datetimes as instants. Rows with no value sort last in either direction. A property the caller is not cleared to read is refused (403).

string
default: created_at
Allowed values: created_at updated_at id status arrival_actual departure_actual room_assignment_status green_stay_set_at post_stay_window post_stay_window_until post_stay_window_closed_at post_stay_collection_attempt post_stay_refusal hold_top_up_attempt hold_top_up_attempt_kind hold_top_ups hold_top_up_last_at hold_top_up_refusal hold_top_up_refusal_detail hold_top_up_refused_at hold_top_up_attempt_opened_at

Search results, ordered by (sort_by, id) in the requested order (ascending by default).

Media typeapplication/json
object
data
required
Array<object>
object
created_at
required
string format: date-time
id
required
string format: uuid
object_type
required
Allowed value: hospitality.stay
properties
required
object
arrival_actual
Actual arrival
string format: date-time
credit_limit
Stay credit limit

The most the desk lets the stay’s bill reach, the room still to come included — OPERA’s credit limit set for the guest’s payment method. A till’s posting is held to the greater of this and what the stay’s live card holds hold, less the bills’ balance and the room still due; over it the posting is refused (no_credit) unless a manager overrides. With neither a limit nor a hold, no credit rule applies. Set by the desk with set_posting_rules.

object
amount
required
string format: decimal
currency
required
string format: iso-4217
departure_actual
Actual departure
string format: date-time
green_stay
The guest declined the day's clean for sustainability — while set, generate_housekeeping_tasks mints no stayover clean for the room (a shared room only when every guest in it declined)
boolean
green_stay_set_at
When the green stay was set (present while green_stay is true)
string format: date-time
hold_top_up_attempt
The card rail's open top-up attempt — the id its processor keys are derived from; cleared when the attempt is recorded
string
hold_top_up_attempt_amount
Stay hold top up attempt amount

What the open top-up attempt holds (or, for a credit-limit charge, holds afresh)

object
amount
required
string format: decimal
currency
required
string format: iso-4217
hold_top_up_attempt_capture
Stay hold top up attempt capture

What an open credit-limit charge takes from the holds

object
amount
required
string format: decimal
currency
required
string format: iso-4217
hold_top_up_attempt_holds
The holds the open attempt acts on, largest first: those a credit-limit charge takes, or the hold whose card a top-up goes on
Array<string>
hold_top_up_attempt_kind
top_up (a second hold or an increment) or overage_charge
string
Allowed values: top_up overage_charge
hold_top_up_attempt_opened_at
When the open top-up attempt was written down; past 23 hours it is abandoned and a new one opened
string format: date-time
hold_top_up_last_at
When the last top-up was placed
string format: date-time
hold_top_up_refusal
Why the last top-up took nothing, until one takes something
string
Allowed values: card_declined insufficient_funds authentication_required no_consent no_card max_reached other_currency processor_refused attempt_abandoned
hold_top_up_refusal_balance
Stay hold top up refusal balance

The bill’s balance when that refusal was recorded

object
amount
required
string format: decimal
currency
required
string format: iso-4217
hold_top_up_refusal_detail
The processor's words for that refusal
string
hold_top_up_refused_at
When that refusal was recorded
string format: date-time
hold_top_ups
How many top-ups the card rail has placed for this stay
integer
id
required
Stay id
string
no_post
No outlet may post to the stay's bill

OPERA’s NOPOST: while true, a till’s room charge or charge-to-key to this stay is refused (no_post) unless a manager’s override is recorded on the payment. Set by the desk with set_posting_rules; unset reads as false.

boolean
post_stay_collection_amount
Stay post stay collection amount

What the open collection attempt asks for

object
amount
required
string format: decimal
currency
required
string format: iso-4217
post_stay_collection_attempt
The card rail's open collection attempt — the id its processor keys are derived from; cleared when the attempt is recorded
string
post_stay_refusal
Why the last post-stay collection took nothing, until one takes something
string
Allowed values: window_closed post_stay_charging_off authentication_required declined no_card
post_stay_refusal_balance
Stay post stay refusal balance

The bill’s balance when that refusal was recorded

object
amount
required
string format: decimal
currency
required
string format: iso-4217
post_stay_window
open while charges found after departure may still post; closed after
string
Allowed values: open closed
post_stay_window_closed_at
When the card rail closed the post-stay window
string format: date-time
post_stay_window_until
When the post-stay window closes — the house's midnight after the window's last business day
string format: date-time
room_assignment_status
required
Room assignment status
string
Allowed values: pending assigned occupied released
status
required
Stay state
string
Allowed values: not_arrived in_house checked_out no_show cancelled
provenance

Per-property source attribution and pins. An entry under properties means the property’s current value came from that source (on the source’s own clock, source_updated_at); an entry under pins is a human override protecting the property from sourced writes.

object
pins
object
key
additional properties
object
pinned_at
string format: date-time
pinned_by
object
reason
required
string
properties
object
key
additional properties
object
external_id
string
recorded_at
required
string format: date-time
source
required
string
source_updated_at
string format: date-time
stream
string
scope
required
One of: discriminator: level
object
level
required
string
Allowed value: tenant
Allowed values: tenant
tenant_id
required
string format: uuid
updated_at
required
string format: date-time
version
required
integer
>= 1
has_more
required
boolean
next_cursor

Cursor for the next page; omitted when the result set is exhausted.

string
Example
{
"data": [
{
"object_type": "hospitality.stay",
"properties": {
"hold_top_up_attempt_kind": "top_up",
"hold_top_up_refusal": "card_declined",
"post_stay_refusal": "window_closed",
"post_stay_window": "open",
"room_assignment_status": "pending",
"status": "not_arrived"
},
"scope": {
"level": "tenant"
}
}
]
}

Validation error — unknown property or filter type mismatch.