Integration guide for AI agents

If you are an automated agent integrating a system with ChatInvoice, this page is the whole contract in the order you need it. Everything else is discoverable from the API itself.

01Discover before you act

  1. GET /v1/me — read allowed_document_types, business.prices_include_vat, business.vat_rate, tax_authority_connected, auto_send, limits. Do not assume; read.
  2. GET /v1/document-types — per type: requires_payments, allows_discount, based_on_types, based_on_required.
  3. GET /v1/customers?q= — find an existing customer before creating one by name.

02Choose the document type

situationtypenotes
Price offer, nothing sold yetquotecancellable
Payment request before payment (e.g. bank transfer pending)proformaany legal type; not an accounting document
Sale completed, payment NOT yet received, business is not an exempt dealertax_invoicelater a receipt with based_on closes it
Sale completed AND paid, business is not an exempt dealertax_invoice_receiptpayments required, must equal total
Payment received, business IS an exempt dealer / NPOreceiptthe only accounting document they issue for income
Donation received (NPO)donation_receiptpayments required
Refund / correction of a tax invoicecredit_notebased_on required
Goods shipped / returneddelivery_note / return_noteno amounts due

If allowed_document_types does not contain the type you chose, choose again from the table — never override the business's legal type.

03Build the request

04Handle the response

05Do not

06Minimal happy path

GET  /v1/me                                   → allowed types, prices_include_vat, auto_send
GET  /v1/customers?q=515123456                → customer.id (or none)
POST /v1/documents  (Idempotency-Key: order-10021:invrec)
     { type: "tax_invoice_receipt", customer: {id}, items, payments, expected_total, external_ref }
201  → store id/number/view_url; check delivery.status and allocation.status

Machine-readable: openapi.json · llms-full.txt · GET /v1/errors.

ChatInvoice · API v1.0 · updated 2026-09-07 · openapi.yaml · llms.txt