Raw schema
{
"type": "object",
"properties": {
"contact": {
"type": "string",
"description": "The contact being invoiced's numeric id or full FreeAgent URL."
},
"dated_on": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "Invoice date (YYYY-MM-DD)."
},
"payment_terms_in_days": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991,
"description": "Payment terms in days; 0 = due on receipt."
},
"due_on": {
"description": "Explicit due date, if not derived from payment terms (YYYY-MM-DD).",
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"reference": {
"description": "Invoice reference/number; omit to use the next in sequence.",
"type": "string"
},
"currency": {
"description": "ISO currency code, e.g. GBP (defaults to the company currency).",
"type": "string",
"minLength": 3,
"maxLength": 3
},
"exchange_rate": {
"description": "Exchange rate for a foreign-currency invoice.",
"type": "number",
"exclusiveMinimum": 0
},
"project": {
"description": "The project's numeric id or full FreeAgent URL.",
"type": "string"
},
"po_reference": {
"description": "The customer's purchase-order reference.",
"type": "string"
},
"comments": {
"description": "Comments printed on the invoice.",
"type": "string"
},
"discount_percent": {
"description": "Whole-invoice discount percentage.",
"type": "number",
"minimum": 0,
"maximum": 100
},
"invoice_items": {
"minItems": 1,
"type": "array",
"items": {
"type": "object",
"properties": {
"description": {
"type": "string",
"description": "Line description."
},
"item_type": {
"description": "Unit type of the line (e.g. Hours, Days, Services, Products).",
"type": "string",
"enum": [
"Hours",
"Days",
"Weeks",
"Months",
"Years",
"Products",
"Services",
"Training",
"Expenses",
"Comment",
"Bills",
"Discount",
"Credit",
"VAT",
"Stock"
]
},
"quantity": {
"description": "Quantity (default 0).",
"type": "number"
},
"price": {
"description": "Unit price, in the invoice currency (required for non time-based items).",
"type": "number"
},
"sales_tax_rate": {
"description": "VAT rate percentage for this line, e.g. 20.",
"type": "number",
"minimum": 0
}
},
"required": [
"description"
]
},
"description": "The invoice lines."
}
},
"required": [
"contact",
"dated_on",
"payment_terms_in_days",
"invoice_items"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}