Raw schema
{
"type": "object",
"properties": {
"relation_id": {
"type": "integer",
"minimum": 1,
"maximum": 2147483647,
"description": "The relation id (from eboekhouden_list_relations)."
},
"template_id": {
"type": "integer",
"minimum": 1,
"maximum": 2147483647,
"description": "The invoice template id (from eboekhouden_list_invoice_templates)."
},
"term_of_payment": {
"type": "integer",
"minimum": 0,
"maximum": 3650,
"description": "Payment term in days."
},
"items": {
"minItems": 1,
"maxItems": 200,
"type": "array",
"items": {
"type": "object",
"properties": {
"description": {
"type": "string",
"minLength": 1,
"maxLength": 5000,
"description": "Item description."
},
"quantity": {
"description": "Quantity, up to 4 decimals (default 1).",
"type": "number",
"exclusiveMinimum": 0,
"maximum": 1000000000
},
"price_per_unit": {
"description": "Price per unit: excluding VAT when in_ex_vat is EX (default), including VAT when IN.",
"type": "number",
"minimum": -1000000000,
"maximum": 1000000000
},
"vat_code": {
"type": "string",
"pattern": "^[A-Z][A-Z0-9_]{1,29}$",
"description": "VAT code of the account's country. NL sale: HOOG_VERK_21 (21%), LAAG_VERK_9 (9%), VERL_VERK (reverse charge), BU_EU_VERK, BI_EU_VERK, AFST_VERK, AFW_VERK (divergent, needs vat_amount). BE sale: BE_21_VERK, BE_12_VERK, BE_6_VERK, BE_0_VERK, BE_IC_VERK, BE_EXP_VERK. GEEN = no VAT."
},
"vat_amount": {
"description": "VAT amount of the item; only with vat_code AFW_VERK.",
"type": "number",
"minimum": -1000000000,
"maximum": 1000000000
},
"ledger_id": {
"type": "integer",
"minimum": 1,
"maximum": 2147483647,
"description": "Ledger (revenue account) id from eboekhouden_list_ledgers."
},
"product_id": {
"type": "integer",
"minimum": 1,
"maximum": 2147483647,
"description": "An existing product id (from eboekhouden_list_products); then code is ignored."
},
"code": {
"description": "Item code.",
"type": "string",
"maxLength": 50
},
"unit_id": {
"type": "integer",
"minimum": 1,
"maximum": 2147483647,
"description": "Unit id from eboekhouden_list_units."
},
"cost_center_id": {
"type": "integer",
"minimum": 1,
"maximum": 2147483647,
"description": "Cost center id from eboekhouden_list_cost_centers."
},
"discount_amount": {
"description": "Fixed discount on price_per_unit (not with discount_percentage).",
"type": "number",
"minimum": 0,
"maximum": 1000000000
},
"discount_percentage": {
"description": "Percentage discount (not with discount_amount).",
"type": "number",
"minimum": 0,
"maximum": 100
}
},
"required": [
"description",
"vat_code",
"ledger_id"
]
},
"description": "1-200 invoice items."
},
"date": {
"description": "Invoice date yyyy-mm-dd (default today).",
"type": "string"
},
"invoice_number": {
"description": "Invoice number; must end with a number. Generated when omitted.",
"type": "string",
"minLength": 1,
"maxLength": 50
},
"in_ex_vat": {
"description": "Whether price_per_unit includes (IN) or excludes (EX) VAT.",
"type": "string",
"enum": [
"IN",
"EX"
]
},
"reference": {
"description": "Payment reference.",
"type": "string",
"maxLength": 50
},
"text": {
"description": "Text on the invoice.",
"type": "string",
"maxLength": 35000
}
},
"required": [
"relation_id",
"template_id",
"term_of_payment",
"items"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}