Reference
Invoices
GET/api/v1/invoicesList invoices
Lists invoices and drafts the way the invoice list does, newest first, 50 per page: number, company, order, date, gross, status and payment state. finance.manage only.scope invoices
Query
| status | one of draft, issuing, issued, cancelled[] |
| query | stringWords to find in number, company, order or customer reference. |
| page | integer1-based page of 50 rows. Omit for the first page. |
Response 200
| items[] | object[] |
| items[].id | string |
| items[].number | string | null |
| items[].company | string |
| items[].order | string | null |
| items[].invoice_date | string | null |
| items[].gross_cents | integer | null |
| items[].status | one of draft, issuing, issued, cancelled |
| items[].payment | one of unsent, open, partially_paid, paid, overdue, cancelled | null |
| items[].url | string |
| page | integer |
| total | integer |
| has_more | boolean |
Schema
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"number": {
"type": [
"string",
"null"
]
},
"company": {
"type": "string"
},
"order": {
"type": [
"string",
"null"
]
},
"invoice_date": {
"type": [
"string",
"null"
]
},
"gross_cents": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"enum": [
"draft",
"issuing",
"issued",
"cancelled"
]
},
"payment": {
"anyOf": [
{
"type": "string",
"enum": [
"unsent",
"open",
"partially_paid",
"paid",
"overdue",
"cancelled"
]
},
{
"type": "null"
}
]
},
"url": {
"type": "string"
}
},
"required": [
"id",
"number",
"company",
"order",
"invoice_date",
"gross_cents",
"status",
"payment",
"url"
],
"additionalProperties": false
}
},
"page": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"total": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"has_more": {
"type": "boolean"
}
},
"required": [
"items",
"page",
"total",
"has_more"
],
"additionalProperties": false
}Refusals are problems with a code — see Errors.
POST/api/v1/invoicesCreate invoice draft
Creates an invoice draft, as the signed-in person -- never issued; a person reviews and issues it on the page the answer links. source "contract": the due charges of an order's sales contract, all of them or the keys from list_invoice_sources. source "service_report": one issued service report, as a whole. source "free": an empty draft for a company (an active customer), with a business unit and optionally an order of that company; add its lines with update_invoice_draft. finance.manage only.scope invoices
Body (JSON)
| sourcerequired | one of contract, service_report, free |
| order | stringOrder id or number. Required for "contract"; optional for "free". |
| keys | string[]"contract" only: charge keys from list_invoice_sources. Default: every due charge. |
| service_report | string"service_report" only: the report's id or number. |
| company | string"free" only: the company's id (search_companies). |
| business_unit | string"free" only: name or id of a business unit (list_business_units). Default: the default unit. |
Response 200
| id | string |
| number | string | null |
| kind | string |
| status | one of draft, issuing, issued, cancelled |
| payment | one of unsent, open, partially_paid, paid, overdue, cancelled | null |
| invoice_date | string | null |
| company | string |
| order | string | null |
| business_unit | string | null |
| customer_reference | string | null |
| lines[] | object[] |
| lines[].id | string |
| lines[].position | integer |
| lines[].source | string |
| lines[].name | string |
| lines[].description | string | null |
| lines[].period_from | string | null |
| lines[].period_to | string | null |
| lines[].quantity | string |
| lines[].unit | string |
| lines[].unit_price_cents | integer |
| lines[].net_cents | integer |
| totals | object |
| totals.net_cents | integer |
| totals.vat_cents | integer |
| totals.gross_cents | integer |
| payments[] | object[] |
| payments[].id | string |
| payments[].paid_on | string | null |
| payments[].amount_cents | integer |
| payments[].note | string | null |
| payments[].origin | one of hand, bank, reversal, cancellation |
| payments[].bank_transaction_id | string | null |
| payments[].cancelled | object | null |
| payments[].cancelled.on | string | null |
| payments[].cancelled.by | string |
| payments[].cancelled.reason | string |
| url | string |
Schema
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"number": {
"type": [
"string",
"null"
]
},
"kind": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"draft",
"issuing",
"issued",
"cancelled"
]
},
"payment": {
"anyOf": [
{
"type": "string",
"enum": [
"unsent",
"open",
"partially_paid",
"paid",
"overdue",
"cancelled"
]
},
{
"type": "null"
}
]
},
"invoice_date": {
"type": [
"string",
"null"
]
},
"company": {
"type": "string"
},
"order": {
"type": [
"string",
"null"
]
},
"business_unit": {
"type": [
"string",
"null"
]
},
"customer_reference": {
"type": [
"string",
"null"
]
},
"lines": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"position": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"source": {
"type": "string"
},
"name": {
"type": "string"
},
"description": {
"type": [
"string",
"null"
]
},
"period_from": {
"type": [
"string",
"null"
]
},
"period_to": {
"type": [
"string",
"null"
]
},
"quantity": {
"type": "string"
},
"unit": {
"type": "string"
},
"unit_price_cents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"net_cents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"id",
"position",
"source",
"name",
"description",
"period_from",
"period_to",
"quantity",
"unit",
"unit_price_cents",
"net_cents"
],
"additionalProperties": false
}
},
"totals": {
"type": "object",
"properties": {
"net_cents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"vat_cents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"gross_cents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"net_cents",
"vat_cents",
"gross_cents"
],
"additionalProperties": false
},
"payments": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"paid_on": {
"type": [
"string",
"null"
]
},
"amount_cents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"note": {
"type": [
"string",
"null"
]
},
"origin": {
"type": "string",
"enum": [
"hand",
"bank",
"reversal",
"cancellation"
]
},
"bank_transaction_id": {
"type": [
"string",
"null"
]
},
"cancelled": {
"anyOf": [
{
"type": "object",
"properties": {
"on": {
"type": [
"string",
"null"
]
},
"by": {
"type": "string"
},
"reason": {
"type": "string"
}
},
"required": [
"on",
"by",
"reason"
],
"additionalProperties": false
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"paid_on",
"amount_cents",
"note",
"origin",
"bank_transaction_id",
"cancelled"
],
"additionalProperties": false
}
},
"url": {
"type": "string"
}
},
"required": [
"id",
"number",
"kind",
"status",
"payment",
"invoice_date",
"company",
"order",
"business_unit",
"customer_reference",
"lines",
"totals",
"payments",
"url"
],
"additionalProperties": false
}Refusals are problems with a code — see Errors.
GET/api/v1/invoices/{id}Get invoice
One invoice or draft with its lines, totals, status and payment state, and the page to review it on. finance.manage only.scope invoices
Path
| idrequired | stringThe invoice's id, or its number once issued. |
Response 200
| id | string |
| number | string | null |
| kind | string |
| status | one of draft, issuing, issued, cancelled |
| payment | one of unsent, open, partially_paid, paid, overdue, cancelled | null |
| invoice_date | string | null |
| company | string |
| order | string | null |
| business_unit | string | null |
| customer_reference | string | null |
| lines[] | object[] |
| lines[].id | string |
| lines[].position | integer |
| lines[].source | string |
| lines[].name | string |
| lines[].description | string | null |
| lines[].period_from | string | null |
| lines[].period_to | string | null |
| lines[].quantity | string |
| lines[].unit | string |
| lines[].unit_price_cents | integer |
| lines[].net_cents | integer |
| totals | object |
| totals.net_cents | integer |
| totals.vat_cents | integer |
| totals.gross_cents | integer |
| payments[] | object[] |
| payments[].id | string |
| payments[].paid_on | string | null |
| payments[].amount_cents | integer |
| payments[].note | string | null |
| payments[].origin | one of hand, bank, reversal, cancellation |
| payments[].bank_transaction_id | string | null |
| payments[].cancelled | object | null |
| payments[].cancelled.on | string | null |
| payments[].cancelled.by | string |
| payments[].cancelled.reason | string |
| url | string |
Schema
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"number": {
"type": [
"string",
"null"
]
},
"kind": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"draft",
"issuing",
"issued",
"cancelled"
]
},
"payment": {
"anyOf": [
{
"type": "string",
"enum": [
"unsent",
"open",
"partially_paid",
"paid",
"overdue",
"cancelled"
]
},
{
"type": "null"
}
]
},
"invoice_date": {
"type": [
"string",
"null"
]
},
"company": {
"type": "string"
},
"order": {
"type": [
"string",
"null"
]
},
"business_unit": {
"type": [
"string",
"null"
]
},
"customer_reference": {
"type": [
"string",
"null"
]
},
"lines": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"position": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"source": {
"type": "string"
},
"name": {
"type": "string"
},
"description": {
"type": [
"string",
"null"
]
},
"period_from": {
"type": [
"string",
"null"
]
},
"period_to": {
"type": [
"string",
"null"
]
},
"quantity": {
"type": "string"
},
"unit": {
"type": "string"
},
"unit_price_cents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"net_cents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"id",
"position",
"source",
"name",
"description",
"period_from",
"period_to",
"quantity",
"unit",
"unit_price_cents",
"net_cents"
],
"additionalProperties": false
}
},
"totals": {
"type": "object",
"properties": {
"net_cents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"vat_cents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"gross_cents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"net_cents",
"vat_cents",
"gross_cents"
],
"additionalProperties": false
},
"payments": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"paid_on": {
"type": [
"string",
"null"
]
},
"amount_cents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"note": {
"type": [
"string",
"null"
]
},
"origin": {
"type": "string",
"enum": [
"hand",
"bank",
"reversal",
"cancellation"
]
},
"bank_transaction_id": {
"type": [
"string",
"null"
]
},
"cancelled": {
"anyOf": [
{
"type": "object",
"properties": {
"on": {
"type": [
"string",
"null"
]
},
"by": {
"type": "string"
},
"reason": {
"type": "string"
}
},
"required": [
"on",
"by",
"reason"
],
"additionalProperties": false
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"paid_on",
"amount_cents",
"note",
"origin",
"bank_transaction_id",
"cancelled"
],
"additionalProperties": false
}
},
"url": {
"type": "string"
}
},
"required": [
"id",
"number",
"kind",
"status",
"payment",
"invoice_date",
"company",
"order",
"business_unit",
"customer_reference",
"lines",
"totals",
"payments",
"url"
],
"additionalProperties": false
}Refusals are problems with a code — see Errors.
PATCH/api/v1/invoices/{id}Update invoice draft
Changes a draft: adds free lines, removes lines, sets the customer reference, and on a free draft the business unit -- any of them, at least one. Every new line is checked first; if one is refused, nothing is written. Drafts only; a cancellation draft takes only a customer reference. finance.manage only.scope invoices
Path
| idrequired | stringThe draft's id. |
Body (JSON)
| add_lines[] | object[] |
| add_lines[].namerequired | string |
| add_lines[].description | string |
| add_lines[].period_fromrequired | stringYYYY-MM-DD. |
| add_lines[].period_torequired | stringYYYY-MM-DD, not before period_from. |
| add_lines[].quantityrequired | stringDecimal, at most two places, e.g. "2" or "7.5"; hours only in quarter hours. |
| add_lines[].unitrequired | one of HUR, C62, MON, DAY |
| add_lines[].unit_pricerequired | stringNet euros per unit, e.g. "750.00" or "750,00". |
| remove_lines | string[]Line ids from get_invoice. |
| customer_reference | stringThe customer's own reference; empty clears it. |
| business_unit | stringA free draft's business unit: name or id (list_business_units). |
Response 200
| id | string |
| number | string | null |
| kind | string |
| status | one of draft, issuing, issued, cancelled |
| payment | one of unsent, open, partially_paid, paid, overdue, cancelled | null |
| invoice_date | string | null |
| company | string |
| order | string | null |
| business_unit | string | null |
| customer_reference | string | null |
| lines[] | object[] |
| lines[].id | string |
| lines[].position | integer |
| lines[].source | string |
| lines[].name | string |
| lines[].description | string | null |
| lines[].period_from | string | null |
| lines[].period_to | string | null |
| lines[].quantity | string |
| lines[].unit | string |
| lines[].unit_price_cents | integer |
| lines[].net_cents | integer |
| totals | object |
| totals.net_cents | integer |
| totals.vat_cents | integer |
| totals.gross_cents | integer |
| payments[] | object[] |
| payments[].id | string |
| payments[].paid_on | string | null |
| payments[].amount_cents | integer |
| payments[].note | string | null |
| payments[].origin | one of hand, bank, reversal, cancellation |
| payments[].bank_transaction_id | string | null |
| payments[].cancelled | object | null |
| payments[].cancelled.on | string | null |
| payments[].cancelled.by | string |
| payments[].cancelled.reason | string |
| url | string |
Schema
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"number": {
"type": [
"string",
"null"
]
},
"kind": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"draft",
"issuing",
"issued",
"cancelled"
]
},
"payment": {
"anyOf": [
{
"type": "string",
"enum": [
"unsent",
"open",
"partially_paid",
"paid",
"overdue",
"cancelled"
]
},
{
"type": "null"
}
]
},
"invoice_date": {
"type": [
"string",
"null"
]
},
"company": {
"type": "string"
},
"order": {
"type": [
"string",
"null"
]
},
"business_unit": {
"type": [
"string",
"null"
]
},
"customer_reference": {
"type": [
"string",
"null"
]
},
"lines": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"position": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"source": {
"type": "string"
},
"name": {
"type": "string"
},
"description": {
"type": [
"string",
"null"
]
},
"period_from": {
"type": [
"string",
"null"
]
},
"period_to": {
"type": [
"string",
"null"
]
},
"quantity": {
"type": "string"
},
"unit": {
"type": "string"
},
"unit_price_cents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"net_cents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"id",
"position",
"source",
"name",
"description",
"period_from",
"period_to",
"quantity",
"unit",
"unit_price_cents",
"net_cents"
],
"additionalProperties": false
}
},
"totals": {
"type": "object",
"properties": {
"net_cents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"vat_cents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"gross_cents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"net_cents",
"vat_cents",
"gross_cents"
],
"additionalProperties": false
},
"payments": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"paid_on": {
"type": [
"string",
"null"
]
},
"amount_cents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"note": {
"type": [
"string",
"null"
]
},
"origin": {
"type": "string",
"enum": [
"hand",
"bank",
"reversal",
"cancellation"
]
},
"bank_transaction_id": {
"type": [
"string",
"null"
]
},
"cancelled": {
"anyOf": [
{
"type": "object",
"properties": {
"on": {
"type": [
"string",
"null"
]
},
"by": {
"type": "string"
},
"reason": {
"type": "string"
}
},
"required": [
"on",
"by",
"reason"
],
"additionalProperties": false
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"paid_on",
"amount_cents",
"note",
"origin",
"bank_transaction_id",
"cancelled"
],
"additionalProperties": false
}
},
"url": {
"type": "string"
}
},
"required": [
"id",
"number",
"kind",
"status",
"payment",
"invoice_date",
"company",
"order",
"business_unit",
"customer_reference",
"lines",
"totals",
"payments",
"url"
],
"additionalProperties": false
}Refusals are problems with a code — see Errors.
DELETE/api/v1/invoices/{id}Delete invoice draft
Deletes a draft outright. An issued invoice is never deleted: it is cancelled, by a person, in nxva.base. finance.manage only.scope invoices
Path
| idrequired | stringThe draft's id. |
Response 200
| id | string |
| deleted | boolean |
Schema
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"deleted": {
"type": "boolean",
"const": true
}
},
"required": [
"id",
"deleted"
],
"additionalProperties": false
}Refusals are problems with a code — see Errors.
GET/api/v1/invoices/{id}/checkCheck invoice
Runs the check the draft page runs before issuing: what is missing on the company profile, the customer or the lines (problems, which block issuing), what a person should look at (warnings), and the e-invoice validation of the rendered document. Changes nothing; takes a few seconds. A clean result is what a person needs before issuing on the page.scope invoices
Path
| idrequired | stringThe draft's id. |
Response 200
| ready | boolean |
| problems[] | object[] |
| problems[].code | string |
| problems[].message | string |
| warnings[] | object[] |
| warnings[].code | string |
| warnings[].message | string |
| validation | object | null |
| validation.status | one of valid, invalid, unavailable |
| validation.errors | string[] |
| validation.notices | string[] |
| url | string |
Schema
{
"type": "object",
"properties": {
"ready": {
"type": "boolean"
},
"problems": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"code",
"message"
],
"additionalProperties": false
}
},
"warnings": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"code",
"message"
],
"additionalProperties": false
}
},
"validation": {
"anyOf": [
{
"type": "object",
"properties": {
"status": {
"type": "string",
"enum": [
"valid",
"invalid",
"unavailable"
]
},
"errors": {
"type": "array",
"items": {
"type": "string"
}
},
"notices": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"status",
"errors",
"notices"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"url": {
"type": "string"
}
},
"required": [
"ready",
"problems",
"warnings",
"validation",
"url"
],
"additionalProperties": false
}Refusals are problems with a code — see Errors.
POST/api/v1/invoices/{id}/paymentsRecord payment
Records a payment received for an issued invoice: the day, the gross amount in cents (negative for a refund), and a note. Payments are recorded by hand and are never deducted automatically; a recorded one is corrected by cancel_payment and recording it again. Only an issued invoice that no cancellation corrects.scope invoices
Path
| idrequired | stringThe invoice's id or number, e.g. "RE-2026-0042". |
Body (JSON)
| paid_onrequired | stringYYYY-MM-DD, not in the future. |
| amount_centsrequired | integerGross, in cents; negative for a refund. |
| note | string |
Response 200
| id | string |
| number | string | null |
| kind | string |
| status | one of draft, issuing, issued, cancelled |
| payment | one of unsent, open, partially_paid, paid, overdue, cancelled | null |
| invoice_date | string | null |
| company | string |
| order | string | null |
| business_unit | string | null |
| customer_reference | string | null |
| lines[] | object[] |
| lines[].id | string |
| lines[].position | integer |
| lines[].source | string |
| lines[].name | string |
| lines[].description | string | null |
| lines[].period_from | string | null |
| lines[].period_to | string | null |
| lines[].quantity | string |
| lines[].unit | string |
| lines[].unit_price_cents | integer |
| lines[].net_cents | integer |
| totals | object |
| totals.net_cents | integer |
| totals.vat_cents | integer |
| totals.gross_cents | integer |
| payments[] | object[] |
| payments[].id | string |
| payments[].paid_on | string | null |
| payments[].amount_cents | integer |
| payments[].note | string | null |
| payments[].origin | one of hand, bank, reversal, cancellation |
| payments[].bank_transaction_id | string | null |
| payments[].cancelled | object | null |
| payments[].cancelled.on | string | null |
| payments[].cancelled.by | string |
| payments[].cancelled.reason | string |
| url | string |
Schema
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"number": {
"type": [
"string",
"null"
]
},
"kind": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"draft",
"issuing",
"issued",
"cancelled"
]
},
"payment": {
"anyOf": [
{
"type": "string",
"enum": [
"unsent",
"open",
"partially_paid",
"paid",
"overdue",
"cancelled"
]
},
{
"type": "null"
}
]
},
"invoice_date": {
"type": [
"string",
"null"
]
},
"company": {
"type": "string"
},
"order": {
"type": [
"string",
"null"
]
},
"business_unit": {
"type": [
"string",
"null"
]
},
"customer_reference": {
"type": [
"string",
"null"
]
},
"lines": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"position": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"source": {
"type": "string"
},
"name": {
"type": "string"
},
"description": {
"type": [
"string",
"null"
]
},
"period_from": {
"type": [
"string",
"null"
]
},
"period_to": {
"type": [
"string",
"null"
]
},
"quantity": {
"type": "string"
},
"unit": {
"type": "string"
},
"unit_price_cents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"net_cents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"id",
"position",
"source",
"name",
"description",
"period_from",
"period_to",
"quantity",
"unit",
"unit_price_cents",
"net_cents"
],
"additionalProperties": false
}
},
"totals": {
"type": "object",
"properties": {
"net_cents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"vat_cents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"gross_cents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"net_cents",
"vat_cents",
"gross_cents"
],
"additionalProperties": false
},
"payments": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"paid_on": {
"type": [
"string",
"null"
]
},
"amount_cents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"note": {
"type": [
"string",
"null"
]
},
"origin": {
"type": "string",
"enum": [
"hand",
"bank",
"reversal",
"cancellation"
]
},
"bank_transaction_id": {
"type": [
"string",
"null"
]
},
"cancelled": {
"anyOf": [
{
"type": "object",
"properties": {
"on": {
"type": [
"string",
"null"
]
},
"by": {
"type": "string"
},
"reason": {
"type": "string"
}
},
"required": [
"on",
"by",
"reason"
],
"additionalProperties": false
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"paid_on",
"amount_cents",
"note",
"origin",
"bank_transaction_id",
"cancelled"
],
"additionalProperties": false
}
},
"url": {
"type": "string"
}
},
"required": [
"id",
"number",
"kind",
"status",
"payment",
"invoice_date",
"company",
"order",
"business_unit",
"customer_reference",
"lines",
"totals",
"payments",
"url"
],
"additionalProperties": false
}Refusals are problems with a code — see Errors.