Search Guest check
const url = 'https://api.aerandil.com/v1/object-types/hospitality.guest_check/search';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"branch":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","cursor":"example","filters":[{"property":"number","type":"eq","value":"example"}],"limit":1,"order":"asc","property_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","scope":{"level":"tenant"},"sort_by":"created_at"}'};
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/object-types/hospitality.guest_check/search \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "branch": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "cursor": "example", "filters": [ { "property": "number", "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 order/check entity: opened against a service table (or takeaway / room service) in a meal period on a business date, owned by a server, open until its payments (check_payment) cover what is due — the payment that brings balance_due to zero settles it and marks the table dirty (Simphony model). Carries its running totals, kept by every action that moves them: subtotal (live lines, modifier lines included, voided and comped out), tax_total, total_due (subtotal plus add-on tax), paid_total (tips excluded), tip_total and balance_due. Mutates only through the fnb actions.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
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.
Opaque cursor from a prior response’s next_cursor. Pass back verbatim; do not introspect.
Conjunctive list of predicates. Empty or omitted matches every row in scope, capped by limit.
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
- object
object
object
Case-insensitive substring needle.
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
Case-insensitive substring needle.
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
Case-insensitive substring needle.
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
Case-insensitive substring needle.
object
object
Page size. Server defaults to 50, silently clamps at 500 (AIP-158 §3).
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).
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.
object
object
object
object
object
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).
Responses
Section titled “Responses”Search results, ordered by (sort_by, id) in the requested order (ascending by default).
object
object
object
Total_due less paid_total — the payment that brings it to zero settles the check
object
The hotel date at open (the date the property has open, else its local calendar day) — what every line’s price and VAT resolve on, however late in the service it rings. Revenue still reports under the business day of the settle or the folio posting, as the ledger dates it.
The meal period the check was opened in — the daypart an item_price row may be narrowed to (the bar’s lunch price) and a package’s meal allowance is matched on. Stamped from the outlet’s meal_periods when a live check names none. Absent = opened outside the outlet’s periods, or before it had any, which only matches rows with no daypart.
Taken → dispatched → delivered → cleared, each step only from the one before (dispatch_room_service, deliver_room_service, collect_tray). Independent of the check’s own open / settled: a tray is collected after the bill is signed.
What the check’s payments applied to it, tips excluded
object
The time quoted to the guest: what open_check was given, else twenty minutes after opening for a breakfast order and thirty for any other. The board marks an order late once it passes undelivered.
The stay’s room number when a check opened for an in-house stay (always, for room service), snapshotted for the runner and the board; the stay itself is the check_for_stay link.
Gross of the live lines (modifier lines included; voided and comped out)
object
Tax on the live lines, inclusive and add-on
object
Tips taken with the check’s payments (a pass-through, not revenue)
object
What the guest owes: subtotal plus add-on (non-inclusive) tax
object
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
object
object
object
object
object
object
object
object
object
object
Cursor for the next page; omitted when the result set is exhausted.
Example
{ "data": [ { "object_type": "hospitality.guest_check", "properties": { "conveyance": "tray", "daypart": "breakfast", "delivery_status": "taken", "order_kind": "dine_in", "status": "open" }, "scope": { "level": "tenant" } } ]}Validation error — unknown property or filter type mismatch.