InvoiceDetail
One invoice **plus** the credit notes written against it (AP-090). Only the detail read carries them. The list is a working document set the dashboard pages through, and attaching each row's notes there would cost one query per invoice to render a link the list has no room for; opening the document is exactly the moment "what has been credited off this?" is asked. A credit note read through this route answers with an empty ``credit_notes`` and a set ``credit_note_of``: the store refuses to credit a credit note, so the list is empty by construction rather than by omission.
Properties
| Name | Type | Description |
|---|---|---|
| client_id | object | |
| ateco | object | |
| issue_date | object | |
| due_date | object | |
| causale | object | |
| lines | array | |
| id | string | |
| year | integer | |
| number | object | |
| doc_type | string | |
| status | string | |
| total_amount | string | |
| bollo_applied | boolean | |
| credit_note_of | object | |
| client_label | object | |
| created_at | object | |
| updated_at | object | |
| payment | object | |
| credit_notes | array |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://artifacts.apis.io/taxcompass-it/json-schema/taxcompass-it-invoice-detail-schema.json",
"title": "InvoiceDetail",
"description": "One invoice **plus** the credit notes written against it (AP-090).\n\nOnly the detail read carries them. The list is a working document set the\ndashboard pages through, and attaching each row's notes there would cost one\nquery per invoice to render a link the list has no room for; opening the\ndocument is exactly the moment \"what has been credited off this?\" is asked.\n\nA credit note read through this route answers with an empty ``credit_notes``\nand a set ``credit_note_of``: the store refuses to credit a credit note, so\nthe list is empty by construction rather than by omission.",
"x-generated": "2026-11-25",
"x-method": "derived",
"x-generator": "derive-json-schema.py",
"x-source": "openapi/taxcompass-it-openapi.json#/components/schemas/InvoiceDetail",
"properties": {
"client_id": {
"anyOf": [
{
"type": "string",
"format": "uuid"
},
{
"type": "null"
}
],
"title": "Client Id"
},
"ateco": {
"anyOf": [
{
"type": "string",
"maxLength": 8
},
{
"type": "null"
}
],
"title": "Ateco"
},
"issue_date": {
"anyOf": [
{
"type": "string",
"format": "date"
},
{
"type": "null"
}
],
"title": "Issue Date"
},
"due_date": {
"anyOf": [
{
"type": "string",
"format": "date"
},
{
"type": "null"
}
],
"title": "Due Date"
},
"causale": {
"anyOf": [
{
"type": "string",
"maxLength": 200
},
{
"type": "null"
}
],
"title": "Causale"
},
"lines": {
"items": {
"$ref": "#/$defs/InvoiceLine-Output"
},
"type": "array",
"maxItems": 9999,
"title": "Lines"
},
"id": {
"type": "string",
"format": "uuid",
"title": "Id"
},
"year": {
"type": "integer",
"title": "Year"
},
"number": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Number"
},
"doc_type": {
"type": "string",
"title": "Doc Type",
"default": "TD01"
},
"status": {
"type": "string",
"enum": [
"draft",
"sending",
"issued",
"delivered",
"not_delivered",
"rejected",
"error",
"imported"
],
"title": "Status",
"default": "draft"
},
"total_amount": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Total Amount",
"default": "0.00"
},
"bollo_applied": {
"type": "boolean",
"title": "Bollo Applied",
"default": false
},
"credit_note_of": {
"anyOf": [
{
"type": "string",
"format": "uuid"
},
{
"type": "null"
}
],
"title": "Credit Note Of"
},
"client_label": {
"anyOf": [
{
"type": "string",
"maxLength": 200
},
{
"type": "null"
}
],
"title": "Client Label"
},
"created_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
],
"title": "Created At"
},
"updated_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
],
"title": "Updated At"
},
"payment": {
"anyOf": [
{
"$ref": "#/$defs/InvoicePayment"
},
{
"type": "null"
}
]
},
"credit_notes": {
"items": {
"$ref": "#/$defs/InvoiceRead"
},
"type": "array",
"title": "Credit Notes"
}
},
"type": "object",
"required": [
"id",
"year"
],
"$defs": {
"InvoiceLine-Output": {
"properties": {
"description": {
"type": "string",
"maxLength": 1000,
"title": "Description"
},
"unit_price": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Unit Price"
},
"quantity": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Quantity",
"default": "1.00"
},
"unit": {
"anyOf": [
{
"type": "string",
"maxLength": 10
},
{
"type": "null"
}
],
"title": "Unit"
}
},
"type": "object",
"required": [
"description",
"unit_price"
],
"title": "InvoiceLine",
"description": "One ``DettaglioLinee``. Amounts are net — a forfettario adds no VAT.\n\nDeliberately the same three fields as ``fatturapa.builder.InvoiceLine``: the\nstore converts one into the other and lets the **builder** own every money\nrule (line total, rounding, the bollo threshold), so a line is never summed\ntwice by two different rules. Discount lines (``ScontoMaggiorazione``) are\nout of this slice — a negative price would reach the XSD unmodelled — hence\n``unit_price`` is non-negative here."
},
"InvoicePayment": {
"properties": {
"state": {
"type": "string",
"enum": [
"unpaid",
"partly_paid",
"paid",
"overpaid",
"credited"
],
"title": "State"
},
"due": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Due"
},
"credited": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Credited",
"default": "0.00"
},
"paid": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Paid",
"default": "0.00"
},
"outstanding": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Outstanding",
"default": "0.00"
},
"overpaid_by": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Overpaid By",
"default": "0.00"
},
"last_payment_date": {
"anyOf": [
{
"type": "string",
"format": "date"
},
{
"type": "null"
}
],
"title": "Last Payment Date"
},
"days_overdue": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Days Overdue"
}
},
"type": "object",
"required": [
"state",
"due"
],
"title": "InvoicePayment",
"description": "The payment side of one invoice — computed by ``services.invoice_payments``.\n\nOnly ever computed on the server, from the ledger: a paid flag on the\ndocument would be a second copy of a fact the incassi table already holds,\nand the two would disagree the first time someone deleted a payment.\n\n* ``due`` — the invoice total minus the credit notes *issued* against it (a\n draft credit note has told the customer nothing yet, so it owes nothing less).\n* ``credited`` — that credit-note sum.\n* ``paid`` — net cash collected against this invoice: its own payments plus\n the refunds recorded against its credit notes (which are stored negative).\n* ``outstanding`` — what the customer still owes, never below zero.\n* ``overpaid_by`` — what arrived beyond ``due``, never below zero.\n* ``last_payment_date`` — the latest *incoming* payment (a refund is not a payment).\n* ``days_overdue`` — whole days past ``due_date`` while something is still\n owed; ``None`` when nothing is owed or the invoice has no due date."
},
"InvoiceRead": {
"properties": {
"client_id": {
"anyOf": [
{
"type": "string",
"format": "uuid"
},
{
"type": "null"
}
],
"title": "Client Id"
},
"ateco": {
"anyOf": [
{
"type": "string",
"maxLength": 8
},
{
"type": "null"
}
],
"title": "Ateco"
},
"issue_date": {
"anyOf": [
{
"type": "string",
"format": "date"
},
{
"type": "null"
}
],
"title": "Issue Date"
},
"due_date": {
"anyOf": [
{
"type": "string",
"format": "date"
},
{
"type": "null"
}
],
"title": "Due Date"
},
"causale": {
"anyOf": [
{
"type": "string",
"maxLength": 200
},
{
"type": "null"
}
],
"title": "Causale"
},
"lines": {
"items": {
"$ref": "#/$defs/InvoiceLine-Output"
},
"type": "array",
"maxItems": 9999,
"title": "Lines"
},
"id": {
"type": "string",
"format": "uuid",
"title": "Id"
},
"year": {
"type": "integer",
"title": "Year"
},
"number": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Number"
},
"doc_type": {
"type": "string",
"title": "Doc Type",
"default": "TD01"
},
"status": {
"type": "string",
"enum": [
"draft",
"sending",
"issued",
"delivered",
"not_delivered",
"rejected",
"error",
"imported"
],
"title": "Status",
"default": "draft"
},
"total_amount": {
"type": "string",
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
"title": "Total Amount",
"default": "0.00"
},
"bollo_applied": {
"type": "boolean",
"title": "Bollo Applied",
"default": false
},
"credit_note_of": {
"anyOf": [
{
"type": "string",
"format": "uuid"
},
{
"type": "null"
}
],
"title": "Credit Note Of"
},
"client_label": {
"anyOf": [
{
"type": "string",
"maxLength": 200
},
{
"type": "null"
}
],
"title": "Client Label"
},
"created_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
],
"title": "Created At"
},
"updated_at": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
],
"title": "Updated At"
},
"payment": {
"anyOf": [
{
"$ref": "#/$defs/InvoicePayment"
},
{
"type": "null"
}
]
}
},
"type": "object",
"required": [
"id",
"year"
],
"title": "InvoiceRead",
"description": "One stored invoice as the API returns it (``payload`` decrypted).\n\n``number`` is NULL until the issue transaction assigns it, so a draft is\nexactly the row whose ``status`` is ``draft`` and whose ``number`` is unset.\n``total_amount`` is the imponibile the store computed from the lines, and\n``bollo_applied`` the builder's verdict on it — both stored plaintext because\nthe live estimate aggregates them in SQL.\n\n``credit_note_of`` is what makes a TD04 legible on its own (AP-090): set, this\nrow is a nota di credito and names the invoice it corrects; NULL on every\nordinary document. It is the store's field and never a client's — a credit\nnote is opened through its own route, not by writing this on a draft.\n\n``client_label`` is the same kind of field for an ``imported`` row (AP-095):\na pre-signup invoice names its customer as the text the user's own export\ncarried, because there is no client record behind it and inventing one would\nput a half-filled customer — no address, no identifier — in the picker that\nissues real documents. It is NULL on every invoice that has a ``client_id``."
}
}
}
Work with this as data
Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for schemas
4 MCP tools reach this
find_json_schemasBrowse and filter every JSON Schema in the catalog.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.
Call it yourself
curl for this page
curl "https://apis.io/api/v1/json-schemas/taxcompass-it-invoice-detail"
curl "https://apis.io/api/v1/json-schemas?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.