Raw schema
{
"type": "object",
"properties": {
"contact_id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "Customer contact id (bukku_list_contacts type customer)."
},
"date": {
"type": "string",
"pattern": "^(\\d{4})-(\\d{2})-(\\d{2})$",
"description": "Invoice date, yyyy-mm-dd."
},
"items": {
"minItems": 1,
"maxItems": 100,
"type": "array",
"items": {
"type": "object",
"properties": {
"account_id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "Income account id (bukku_list_accounts, category income)."
},
"description": {
"type": "string",
"minLength": 1,
"maxLength": 500,
"description": "Line description (required by Bukku)."
},
"unit_price": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000,
"description": "Price per unit (up to 4 decimals)."
},
"quantity": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 1000000000,
"description": "Quantity (up to 4 decimals)."
},
"product_id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"product_unit_id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"tax_code_id": {
"description": "Tax code id (bukku_get_lookup_lists tax_codes).",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"discount": {
"description": "Discount as a value (25.50) or a percentage (10%).",
"type": "string",
"maxLength": 14,
"pattern": "^\\d+(\\.\\d+)?%?$"
},
"service_date": {
"type": "string",
"pattern": "^(\\d{4})-(\\d{2})-(\\d{2})$",
"description": "A date, yyyy-mm-dd."
},
"classification_code": {
"description": "MyInvois classification code (bukku_get_lookup_lists classification_code_list). Required on every line with myinvois_action VALIDATE.",
"type": "string",
"minLength": 1,
"maxLength": 10
}
},
"required": [
"account_id",
"description",
"unit_price",
"quantity"
]
},
"description": "Invoice lines."
},
"tax_mode": {
"type": "string",
"enum": [
"inclusive",
"exclusive"
],
"description": "Whether unit prices include tax."
},
"currency_code": {
"type": "string",
"pattern": "^[A-Za-z]{3}$",
"description": "Invoice currency, for example MYR. Use the company's home currency unless invoicing in another one."
},
"exchange_rate": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 1000000000,
"description": "Rate from the home currency to currency_code. Use 1 when currency_code is the home currency."
},
"payment_mode": {
"description": "credit (needs term_items) or cash (needs deposit_items).",
"type": "string",
"enum": [
"cash",
"credit"
]
},
"term_items": {
"description": "Payment terms, for payment_mode credit.",
"minItems": 1,
"maxItems": 50,
"type": "array",
"items": {
"type": "object",
"properties": {
"term_id": {
"description": "Payment term id (bukku_get_lookup_lists terms); the due date is calculated. Give term_id or date.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"date": {
"description": "Custom due date, yyyy-mm-dd. Give term_id or date.",
"type": "string",
"pattern": "^(\\d{4})-(\\d{2})-(\\d{2})$"
},
"payment_due": {
"type": "string",
"maxLength": 20,
"pattern": "^\\d+(\\.\\d+)?%?$",
"description": "Amount due, as a value (100.25) or a percentage (20%)."
},
"description": {
"type": "string",
"minLength": 1,
"maxLength": 200
}
},
"required": [
"payment_due"
]
}
},
"deposit_items": {
"description": "Payment received, for payment_mode cash.",
"minItems": 1,
"maxItems": 50,
"type": "array",
"items": {
"type": "object",
"properties": {
"account_id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "Account the money was deposited to (bukku_list_accounts)."
},
"amount": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 1000000000000,
"description": "Amount received."
},
"payment_method_id": {
"description": "Payment method id (bukku_get_lookup_lists payment_methods).",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"number": {
"description": "Payment reference.",
"type": "string",
"minLength": 1,
"maxLength": 50
}
},
"required": [
"account_id",
"amount"
]
}
},
"number": {
"description": "Invoice number, blank uses the default number format.",
"type": "string",
"minLength": 1,
"maxLength": 50
},
"number2": {
"description": "Reference number.",
"type": "string",
"minLength": 1,
"maxLength": 50
},
"title": {
"type": "string",
"minLength": 1,
"maxLength": 255
},
"description": {
"type": "string",
"minLength": 1,
"maxLength": 255
},
"remarks": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"status": {
"description": "draft (default) or ready.",
"type": "string",
"enum": [
"draft",
"ready"
]
},
"myinvois_action": {
"description": "MyInvois handling, only with status ready.",
"type": "string",
"enum": [
"NORMAL",
"VALIDATE",
"EXTERNAL"
]
}
},
"required": [
"contact_id",
"date",
"items",
"tax_mode",
"currency_code",
"exchange_rate"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}