F&B check detail
const url = 'https://api.aerandil.com/v1/functions/hospitality.function.fnb_check_detail/invoke';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"params":{},"target":{"id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","object_type":"hospitality.guest_check"}}'};
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.fnb_check_detail/invoke \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "params": {}, "target": { "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "object_type": "hospitality.guest_check" } }'One check as the till and the receipt read it. check: its header — number, status, order kind, daypart, business date, covers, table, outlet, server, when it opened and settled — and every total (subtotal, tax_total, total_due, paid_total, tip_total, balance_due, strings in currency). lines: every line in the order it rang, voided and comped ones included with their reasons, each with its item and variant names, quantity, course, seat, unit price, line total, VAT, revenue category, tax class and kitchen instructions, and its modifier lines nested beneath it as modifiers (each with the prefix its option was chosen with; a modifier line’s quantity already includes its parent’s). tickets: the check’s kitchen tickets, oldest fired first — id, ticket number, status, course, station (none = the unrouted expo ticket), fired and bumped — so a till with no kitchen screen bumps what it fired and the check can close. payments: each tender with its amount, tip, cash tendered and change, the card terminal’s references, the folio a room charge posted to with its reservation and the guest who signed, when it was taken and by whom, and a manager’s override of the stay’s posting rules (override_kind no_post / no_credit, authorised_by — the manager signed in — and override_reason; null when none). vat: per rate over the live lines, the receipt’s figures (VAT Notice 700 §16.6.1) — code, rate, net, tax and gross. receipt: once the check has settled, the receipt it was issued (id, number, content_hash, issued_at — read it whole with fnb_receipt), else null. The target is the check, so a house-bound bearer reads its own house’s — and a till its own outlet’s — only. Read-only.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
object
object
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
object
object
object
object
object
object
Example
{ "return_value": { "check": { "conveyance": "tray", "daypart": "breakfast", "delivery_status": "taken", "order_kind": "dine_in", "status": "open" }, "lines": [ { "modifiers": [ { "prefix": "no", "revenue_category": "food", "status": "entered" } ], "revenue_category": "food", "status": "entered" } ], "payments": [ { "override_kind": "no_post", "tender": "room_charge" } ], "tickets": [ { "status": "fired" } ] }}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.