FoyerDevelopers

Generated · Live registry

invoices tools

19 tools in this domain, generated from the running registry.

All tool domains

invoices.cancel

writesconfirm

**DESTRUCTIVE**: Mark an invoice as cancelled. The PDF is preserved as an audit record. Once cancelled, the invoice cannot be resent. Use `invoices.reissue` to create a corrected replacement. Requires _confirm: true.

Input parameters

FieldTypeRequiredNotes
idstringyes
reasonstringyes

Output fields

FieldTypeRequiredNotes
idstringyes
statusliteralyesOne of: cancelled
cancelledAtstringyes

invoices.create_request

writes

Mint a guest-facing invoice-request link for a reservation: creates a submission row (status pending, workflow offen) with a CSPRNG token and returns { submissionId, token, path } where path is the public form URL (/invoice-request/{token}) to send the guest. Throws 'reservation_not_found' if the reservation is not in this tenant.

Input parameters

FieldTypeRequiredNotes
reservationIdstringyes

Output fields

FieldTypeRequiredNotes
submissionIdstringyes
tokenstringyes
pathstringyes

invoices.get

read-only

Fetch a single Foyer-native invoice by UUID with joined reservation, address, tax-id and line-items. Throws 'invoice_not_found' if the row is missing or belongs to another tenant. Read-only.

Input parameters

FieldTypeRequiredNotes
idstringyes

Output fields

An object keyed by string. Each value is any.

invoices.list

read-only

List Foyer-native invoices (operator inbox + history). All filters are optional: status (draft|created|sent|cancelled|reissued), reservationId (UUID), from/to (YYYY-MM-DD, matched against createdAt), limit (1-500, default 100), offset (default 0). Ordered by createdAt desc. Read-only.

Input parameters

FieldTypeRequiredNotes
statusenumnoOne of: draft, created, sent, cancelled, reissued
reservationIdstringno
fromstringno
tostringno
limitintegerno
offsetintegerno

Output fields

FieldTypeRequiredNotes
invoicesarrayyes

invoices.list_requests

read-only

List invoice requests (Anfragen): every invoice-eligible booking joined with its latest submission, showing the operator workflow status (offen|in_bearbeitung|versandbereit|erledigt, default offen) and completeness badges (hasAddress / hasTaxId / hasInvoice). Optional filters: workflowStatus, needsInvoice (bookings with no invoice yet), search (guest name/email/reservation code), limit (1-200, default 100), offset. Read-only.

Input parameters

FieldTypeRequiredNotes
workflowStatusenumnoOne of: offen, in_bearbeitung, versandbereit, erledigt
needsInvoicebooleanno
searchstringno
limitintegerno
offsetintegerno

Output fields

FieldTypeRequiredNotes
requestsarrayyes

invoices.rechnungsdatenErneutSenden

writes

Invoices: rechnungsdaten erneut senden. Mutation — changes data. See the input schema for argument details.

Input parameters

FieldTypeRequiredNotes
reservationIdstringyes

Output fields

FieldTypeRequiredNotes
eingereihtbooleanyes

invoices.reissue

writesconfirm

**DESTRUCTIVE**: Mark an existing invoice as `reissued` and create a fresh draft for the same reservation, with a new sequential number and a `parent_invoice_id` link back to the original. The new draft starts without a PDF (placeholder file refs). Requires _confirm: true.

Input parameters

FieldTypeRequiredNotes
idstringyes

Output fields

FieldTypeRequiredNotes
wegenumyesOne of: stay, lokal
fileNamestring · nullableyes
idstring · nullableyes
numberinteger · nullableyes
parentInvoiceIdstring · nullableyes

invoices.remove_request_billing

writesconfirm

Remove billing parts from a reservation's invoice request (command-center 'Löschen'): set tax=true to soft-delete the tax-id (is_removed — none shows, survives the daily re-sync), email=true to hard-delete the billing email. Addresses have no delete. Returns the resulting billing. Mutating action — requires _confirm: true.

Input parameters

FieldTypeRequiredNotes
reservationIdstringyes
taxbooleanno
emailbooleanno

Output fields

FieldTypeRequiredNotes
addressany · nullableyes
taxIdany · nullableyes
emailstring · nullableyes

invoices.request_billing

read-only

Collected billing data for a reservation's invoice request: the latest billing address (name/company, lines, postal code, city, country, isBusiness) and tax-id (value + kind: ust_idnr|steuernummer). Both nullable when the guest hasn't provided them. Read-only.

Input parameters

FieldTypeRequiredNotes
reservationIdstringyes

Output fields

FieldTypeRequiredNotes
addressany · nullableyes
taxIdany · nullableyes
emailstring · nullableyes

invoices.request_stats

read-only

Invoice-request pipeline counts for the Anfragen tabs: total + per workflow status (offen, in_bearbeitung, versandbereit, erledigt) + needsInvoice (eligible bookings with no invoice yet). Read-only.

Input parameters

Returns object.

Output fields

FieldTypeRequiredNotes
totalnumberyes
offennumberyes
inBearbeitungnumberyes
versandbereitnumberyes
erledigtnumberyes
needsInvoicenumberyes

invoices.send

writesconfirm

Email the invoice to the guest. This is a real send over the configured channel. Requires confirmation.

Input parameters

FieldTypeRequiredNotes
invoiceIdstringyes
toEmailstringyes

Output fields

FieldTypeRequiredNotes
okliteralyesOne of: true
viaenumyesOne of: gmail, brevo, postmark
messageIdstringyes
sentAtstring · nullableyes

invoices.send_smtp

writesconfirm

**IRREVERSIBLE**: send a Foyer-native invoice PDF to the guest via email. Uses Postmark BYOK if the tenant has configured a token, else falls back to the Gmail SMTP relay. Marks the invoice as 'sent' on success. Once the remote MTA accepts the message there is no way to recall it. Mutating action — requires _confirm: true.

Input parameters

FieldTypeRequiredNotes
invoiceIdstringyes
toEmailstringyes

Output fields

FieldTypeRequiredNotes
okliteralyesOne of: true
viaenumyesOne of: gmail, brevo, postmark
messageIdstringyes
sentAtstring · nullableyes

invoices.setRequestStatus

writes

Invoices: set request status. Mutation — changes data. See the input schema for argument details.

Input parameters

FieldTypeRequiredNotes
reservationIdstringyes
workflowStatusenumyesOne of: offen, in_bearbeitung, versandbereit, erledigt

Output fields

FieldTypeRequiredNotes
okliteralyesOne of: true
submissionIdstringyes
workflowStatusenumyesOne of: offen, in_bearbeitung, versandbereit, erledigt

invoices.stats

read-only

Counters for the operator dashboard stat-strip: total + per-status (draft, created, sent, cancelled, reissued) for the caller's tenant. Read-only.

Input parameters

Returns object.

Output fields

FieldTypeRequiredNotes
totalCountnumberyes
draftCountnumberyes
createdCountnumberyes
sentCountnumberyes
cancelledCountnumberyes
reissuedCountnumberyes

invoices.submitForm

writes

Invoices: submit form. Mutation — changes data. See the input schema for argument details.

Input parameters

FieldTypeRequiredNotes
tokenstringyes
firstNamestringyes
lastNamestringyes
emailstringyes
isBusinessbooleannoDefault: false
companystringno
line1stringyes
line2stringno
postalCodestringyes
citystringyes
countrystringno
taxIdValuestringno
taxIdKindenumnoOne of: ust_idnr, steuernummer

Output fields

FieldTypeRequiredNotes
okliteralyesOne of: true
submitCountintegeryes

invoices.updateRequestBilling

writes

Invoices: update request billing. Mutation — changes data. See the input schema for argument details.

Input parameters

FieldTypeRequiredNotes
reservationIdstringyes
addressobject · nullableno
address.namestringyes
address.line1string · nullableno
address.line2string · nullableno
address.postalCodestring · nullableno
address.citystring · nullableno
address.countrystring · nullableno
address.isBusinessbooleanno
taxIdobject · nullableno
taxId.valuestringyes
taxId.kindenumyesOne of: ust_idnr, steuernummer
emailstring · nullableno

Output fields

FieldTypeRequiredNotes
addressobject · nullableyes
address.namestringyes
address.line1string · nullableyes
address.line2string · nullableyes
address.postalCodestring · nullableyes
address.citystring · nullableyes
address.countrystring · nullableyes
address.isBusinessbooleanyes
address.legacyIdstring · nullableyes
address.anStayUebertragenAtstring · nullableyes
address.anStayFehlerstring · nullableyes
taxIdobject · nullableyes
taxId.valuestringyes
taxId.kindstringyes
taxId.legacyIdstring · nullableyes
taxId.anStayUebertragenAtstring · nullableyes
taxId.anStayFehlerstring · nullableyes
emailstring · nullableyes

invoices.update_address

writesconfirm

Update the billing address on a Foyer-native invoice. Inserts a new invoice_addresses row (append-only — old rows stay for audit) and repoints invoices.address_id at it. Use to correct typos / fix incomplete guest submissions. Mutating action — requires _confirm: true.

Input parameters

FieldTypeRequiredNotes
invoiceIdstringyes
addressobjectyes
address.namestringyes
address.line1stringno
address.line2stringno
address.postalCodestringno
address.citystringno
address.countrystringno
address.isBusinessbooleanno

Output fields

FieldTypeRequiredNotes
idstringyes

invoices.update_email

writesconfirm

Set or replace the billing email for a reservation. Inserts a new invoice_emails row (append-only) — send-time logic resolves the latest email by reservation, so this cascades to all future invoices for that stay. Mutating action — requires _confirm: true.

Input parameters

FieldTypeRequiredNotes
reservationIdstringyes
emailstringyes

Output fields

FieldTypeRequiredNotes
idstringyes

invoices.update_tax_id

writesconfirm

Set or replace the tax ID on a Foyer-native invoice. Inserts a new invoice_tax_ids row (append-only — old rows stay for audit) and repoints invoices.tax_id_id at it. `kind` distinguishes USt-IdNr (EU VAT) from Steuernummer (DE local). Mutating action — requires _confirm: true.

Input parameters

FieldTypeRequiredNotes
invoiceIdstringyes
valuestringyes
kindenumyesOne of: ust_idnr, steuernummer

Output fields

FieldTypeRequiredNotes
idstringyes