Skip to content

Invoices due

POST
/v1/functions/hospitality.function.invoices_due/invoke
curl --request POST \
--url https://api.aerandil.com/v1/functions/hospitality.function.invoices_due/invoke \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "params": { "as_of": "2026-04-15", "property_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" } }'

The company bills a property still owes a document, soonest deadline first: guest folios direct-billed to a company’s A/R account (open until their invoice seals them; counted from the transfer) and closed folios of reservations booked for a company (counted from the close), with no invoice yet. The deadline is the property’s billing_identity.invoice_issue_deadline_days — 30 when unset, the UK rule (VAT Notice 700 §16.2.3); a German house sets about six months (§14 Abs. 2 UStG). Leisure guests’ bills are not listed: a VAT invoice is owed to a VAT-registered customer, not to every guest (Notice 700 §16.2.1). Each row carries the folio, the company, why it is listed, the supply date, the deadline and the days left (negative once passed). Read-only.

Media typeapplication/json
object
params
required
object
as_of
The day to count the days left from; omit for the house's today — its hotel date, the business date it has open, else its local calendar day
string format: date
property_id
required
Property
string format: uuid
Examplegenerated
{
"params": {
"as_of": "2026-04-15",
"property_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
}
}

Function invoked. The body carries the typed return_value shaped by the function’s declared return_type.

Media typeapplication/json
InvokeFunctionResponse

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
correlation_id
required

Per-invocation correlation id; appears on log/trace records this function emitted.

string format: uuid
return_value
required
Array<object>
object
balance
object
amount
required
string format: decimal
currency
required
string format: iso-4217
basis
required
string
Allowed values: direct_bill company_booking
company_id
required
string format: uuid
company_name
string
days_left
required
integer
deadline
required
string format: date
deadline_days
required
integer
folio_id
required
string format: uuid
folio_number
required
string
supply_date
required
string format: date
Example
{
"return_value": [
{
"basis": "direct_bill"
}
]
}
Cache-Control
string

Always no-store — function results are time-sensitive and never cacheable.

Function or target object not found.

Parameter validation or domain-rule violation.