Invoices
List and read your sales invoices, and get each issued invoice as a structured document for your own systems.
This is a published preview. Names and fields may still change before general availability; changes will be listed in the changelog.
Read the sales invoices in your organisation's books, with their lines, taxes and history, and get any invoice as a structured JSON document laid out for machines. Every operation here needs finance:read.
| Operation | What it returns |
|---|---|
| GET/invoices | A legal entity's invoices, newest first |
| GET/invoices/{id} | One invoice with its lines, taxes and history |
| GET/invoices/{id}/document | The invoice as a structured document, agoo.invoice.v1 |
An invoice your key can't see, because of its scopes or its legal entity limit, doesn't exist for it: you get not_found.
What the API leaves to people
The API reads invoices. Issuing, posting, approving and recording payments are done by people in Agoo, never through the API, by a key, an app or an AI assistant. The scope finance:write exists for drafting quotes and invoices and preparing bills and journals; no operation takes it yet, and the changelog will say when one does.
Invoice states
An invoice's lifecycle is one of these named states. Whether it's paid isn't a state: it's worked out from the amounts.
lifecycle | Meaning |
|---|---|
draft | Being written. It has no number yet. |
pending_approval | Waiting for someone to approve it before it's issued. |
approved | Approved, not yet issued. |
pending_fiscal | Waiting for the tax authority's E-VAT before it's issued. |
issued | Issued, with its number. It never changes in place again. |
cancelled | Cancelled before it was issued. |
An issued invoice is corrected only by a credit note or a debit note, each a document of its own linked from the invoice. What's still owed is total_minor - allocated_minor - credited_minor. Treat a state you don't recognise as not issued and not paid.
fiscal_state says where the invoice stands with E-VAT: not_applicable, recorded, awaiting_authorisation, accepted, rejected, offline_authorised or pending_upload.
The structured document
GET/invoices/{id}/document gives the invoice as issued, laid out for
machines: stable source lines, totals, taxes, the parties, references, and links to the credit and debit notes that correct it. schema names the
layout, agoo.invoice.v1, so your parser can check it before reading the rest.
{
"object": "invoice_document",
"schema": "agoo.invoice.v1",
"id": "finv_01m6k4d6f8h0k2m4p6r8t0v2xz",
"lifecycle": "issued",
"draft": false,
"document": { "…": "the lines, totals, taxes and parties, as issued" },
"corrections": { "credit_notes": [], "debit_notes": [] },
"references": { "number": "INV-2026-0142", "po_number": "PO-7781", "party_id": "fparty_01m6k4d6f8h0k2m4p6r8t0v2xw" },
"fiscal": {
"certified_document": false,
"note": "This JSON is Agoo's record of what was issued. Where the tax authority signed the invoice, authority holds its own number and code.",
"authority": { "evat_status": "accepted", "evat_number": "…" }
}
}| Field | What it holds |
|---|---|
document | What was issued: lines, totals, taxes and parties, frozen at issue. A later change to your branding or address never changes it. |
corrections | The credit and debit notes that correct the invoice. |
references | The invoice number, your reference, the customer's purchase order, the quote and project it came from, and the party. |
fiscal | certified_document is always false. authority holds what the tax authority recorded, if anything. |
draft | true while the invoice isn't issued: the document is a preview and can still change. |
A structured copy, not a fiscal document
This JSON is a structured copy of the invoice for your systems, such as an accounting import, a data warehouse or a customer's purchasing
system. It isn't a certified fiscal document: it's Agoo's record of what was issued. Where E-VAT applies, the tax authority's own number
and code are in fiscal.authority, and the invoice your customer received is the one that counts.
Webhooks and the change feed
invoice.created, invoice.issued, invoice.updated, invoice.cancelled and invoice.payment_allocated tell you as things happen; see the event catalogue. To keep a full copy, take a snapshot with invoices (and credit_notes) and follow the feed.
Related
Workspace
Read invoices and the books, log time as drafts, read goals, submit intake requests and see the approvals waiting for someone, from your own systems.
Quotes, Bills, Budgets and Journals
Read the rest of your organisation's books (quotes, supplier bills, budgets and posted journals) from your own systems.