Raw schema
{
"type": "object",
"properties": {
"contact_id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 2147483647,
"description": "The customer contact (from bexio_list_contacts)."
},
"positions": {
"minItems": 1,
"maxItems": 150,
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"custom",
"article",
"text"
],
"description": "custom = a free line (text, amount, unit_price, tax_id); article = an existing item (article_id, amount, tax_id); text = a text-only line."
},
"text": {
"description": "Line text (required for custom and text lines; for article lines the item's text is used when omitted).",
"type": "string",
"maxLength": 10000
},
"amount": {
"description": "Quantity (max. 6 decimals). Required for custom and article lines.",
"type": "number",
"exclusiveMinimum": 0,
"maximum": 1000000000
},
"unit_price": {
"description": "Price per unit (max. 6 decimals). Required for custom lines; article lines default to the item's price.",
"type": "number",
"minimum": -1000000000,
"maximum": 1000000000
},
"tax_id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 2147483647,
"description": "An ACTIVE sales tax (bexio_list_taxes with types sales_tax, scope active). Required for custom and article lines."
},
"article_id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 2147483647,
"description": "The item (from bexio_list_articles). Required for article lines only."
},
"account_id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 2147483647,
"description": "Revenue account (from bexio_list_accounts); bexio's default when omitted."
},
"unit_id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 2147483647,
"description": "Unit id (bexio's units, e.g. hours); none when omitted."
},
"discount_in_percent": {
"description": "Line discount in percent.",
"type": "number",
"minimum": 0,
"maximum": 100
}
},
"required": [
"type"
]
},
"description": "1-150 invoice lines."
},
"title": {
"description": "Invoice title.",
"type": "string",
"maxLength": 255
},
"document_nr": {
"description": "Invoice number. Only when automatic numbering is OFF in bexio's settings (then it is required); leave empty with automatic numbering.",
"type": "string",
"minLength": 1,
"maxLength": 100
},
"contact_sub_id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 2147483647,
"description": "A contact person of the customer."
},
"project_id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 2147483647,
"description": "Link to this project."
},
"valid_from": {
"description": "Invoice date, yyyy-mm-dd (default today).",
"type": "string"
},
"valid_to": {
"description": "Due date, yyyy-mm-dd (default from the payment terms).",
"type": "string"
},
"tax_mode": {
"description": "net = unit prices are net and VAT is added (default); gross = unit prices include VAT; exempt = the invoice is exempt from VAT.",
"type": "string",
"enum": [
"net",
"gross",
"exempt"
]
},
"currency_id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 2147483647,
"description": "Currency (from bexio_list_currencies); company default when omitted."
},
"bank_account_id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 2147483647,
"description": "Bank account for the payment slip (from bexio_list_bank_accounts); default when omitted."
},
"language_id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 2147483647,
"description": "Document language id; the contact's language when omitted."
},
"payment_type_id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 2147483647,
"description": "Payment type id; default when omitted."
},
"header": {
"description": "Text above the lines.",
"type": "string",
"maxLength": 10000
},
"footer": {
"description": "Text below the lines.",
"type": "string",
"maxLength": 10000
},
"reference": {
"description": "Customer reference shown on the invoice.",
"type": "string",
"maxLength": 255
},
"api_reference": {
"description": "Your own external reference (only visible through the API).",
"type": "string",
"maxLength": 255
},
"user_id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 2147483647,
"description": "Responsible bexio user (default: the signed-in user)."
}
},
"required": [
"contact_id",
"positions"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}