F&B receipt
const url = 'https://api.aerandil.com/v1/functions/hospitality.function.fnb_receipt/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.check_receipt"}}'};
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_receipt/invoke \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "params": {}, "target": { "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "object_type": "hospitality.check_receipt" } }'A settled check’s receipt as it was issued — the document’s own snapshot, never re-read from the check: its number (R-{outlet}-{000001}) and series, the check it was issued for and that check’s number, outlet, order kind, table, covers and server, the business date, the time of supply (settled_at) and issued_at; the totals (subtotal, tax_total, total_due, paid_total, tip_total, change_total, strings in currency); vat per rate (code, rate, net, tax, gross — VAT Notice 700 §16.6.1); the printed lines (description, quantity, unit price, line total, modifier, comped); the payments (tender, amount, tip, cash tendered and change; a room charge’s room and the name of the guest who signed — never card data); the supplier (supplier_name, and issuer: legal name, address lines, VAT number and scheme); and content_hash / previous_hash, its place on the property’s document chain. What the till previews and the printer renders. The target is the receipt, 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
Example
{ "return_value": { "order_kind": "dine_in", "payments": [ { "tender": "room_charge" } ] }}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.