bexio Invoices
bexio_invoicesManage bexio invoices with full CRUD and workflow actions: list, search, create, update, delete, issue, cancel, send, copy, and generate PDFs, supporting polymorphic positions.
Instructions
Manage bexio invoices (kb_invoice). Status ids: 7 Draft, 8 Pending, 9 Paid, 16 Partial, 19 Canceled, 31 Unpaid. Actions: "list" (all invoices; optional limit/offset/order_by — orderable by id, total, total_net, total_gross, updated_at), "search" (search_criteria required; searchable fields: id, document_nr, title, contact_id, contact_sub_id, user_id, kb_item_status_id, currency_id, total, total_gross, total_net, is_valid_from, is_valid_to, api_reference, updated_at; optional limit/offset/order_by), "get" (id; returns the invoice including positions), "create" (payload; polymorphic positions array supported — custom, article, text, subtotal, pagebreak, discount), "update" (id + payload of fields to change; positions cannot be updated here), "delete" (id; permanently deletes the invoice — cannot be undone), "issue" (id; draft -> pending), "revert_issue" (id; sets an issued invoice back to draft), "cancel" (id; cancels the invoice — there is no API to un-cancel), "mark_as_sent" (id), "send" (id + email with recipient_email/subject/message, optional mark_as_open/attach_pdf; message must contain "[Network Link]"), "copy" (id + copy with contact_id required; creates a new invoice as a copy), "pdf" (id; optional logopaper for letterhead and save_path to write the PDF to disk instead of returning base64).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Invoice id (required for every action except list, search and create) | |
| copy | No | Copy parameters for "copy" | |
| No | Email parameters for "send" | ||
| limit | No | Maximum number of results (default 500, max 2000) | |
| action | Yes | Operation to perform | |
| offset | No | Number of results to skip (pagination) | |
| payload | No | Invoice fields for "create"/"update" | |
| order_by | No | Field to order by; append "_desc" for descending (e.g. "id_desc") | |
| logopaper | No | For "pdf": render the PDF on the letterhead paper | |
| save_path | No | For "pdf": write the PDF to this file path instead of returning base64 | |
| search_criteria | No | Search conditions, combined with logical AND |