{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","description":"Country-agnostic commercial invoice. Intended to be complemented by the caller's country profile for local legal mentions (Art. 226 Council Directive 2006/112/EC for EU callers, equivalent national rules elsewhere).","required":["supplier","customer","invoice","lines","totals","payment"],"additionalProperties":false,"properties":{"supplier":{"type":"object","required":["name","address","contact_email"],"additionalProperties":false,"properties":{"name":{"type":"string","minLength":1},"address":{"type":"string","minLength":1},"vat_id":{"type":"string","description":"Optional. Supplier VAT identification, e.g. BE0123456789."},"contact_email":{"type":"string","format":"email"}}},"customer":{"type":"object","required":["name","address"],"additionalProperties":false,"properties":{"name":{"type":"string","minLength":1},"address":{"type":"string","minLength":1},"vat_id":{"type":"string","description":"Optional. Customer VAT identification."}}},"invoice":{"type":"object","required":["number","issue_date","due_date"],"additionalProperties":false,"properties":{"number":{"type":"string","minLength":1},"issue_date":{"type":"string","format":"date"},"due_date":{"type":"string","format":"date"},"reference":{"type":"string","description":"Optional customer order reference."},"notes":{"type":"string","description":"Optional free-form note printed under the totals."},"language_currency_overrides":{"type":"object","description":"Optional overrides when the rendering locale differs from the country profile.","additionalProperties":false,"properties":{"language":{"type":"string","description":"ISO 639-1 code, e.g. 'en'."},"currency":{"type":"string","description":"ISO 4217 code, e.g. 'EUR'."}}}}},"lines":{"type":"array","minItems":1,"items":{"type":"object","required":["description","quantity","unit","unit_price","vat_rate_pct","amount_net"],"additionalProperties":false,"properties":{"description":{"type":"string","minLength":1},"quantity":{"type":"number","exclusiveMinimum":0},"unit":{"type":"string","description":"Unit of measure (e.g. 'pcs', 'hour', 'kg')."},"unit_price":{"type":"number","minimum":0},"vat_rate_pct":{"type":"number","minimum":0,"maximum":100},"amount_net":{"type":"number","minimum":0}}}},"totals":{"type":"object","required":["subtotal","vat_total","total","currency"],"additionalProperties":false,"properties":{"subtotal":{"type":"number","minimum":0},"vat_total":{"type":"number","minimum":0},"total":{"type":"number","minimum":0},"currency":{"type":"string","description":"ISO 4217 code, e.g. 'EUR'."}}},"payment":{"type":"object","required":["terms"],"additionalProperties":false,"properties":{"iban":{"type":"string","description":"Optional IBAN in electronic format, e.g. BE68539007547034."},"bic":{"type":"string","description":"Optional BIC/SWIFT, e.g. GEBABEBB."},"terms":{"type":"string","minLength":1,"description":"Payment terms (e.g. 'Net 30 days from invoice date')."}}},"signatory":{"type":"object","description":"Optional signatory block.","required":["name","role"],"additionalProperties":false,"properties":{"name":{"type":"string"},"role":{"type":"string"},"date":{"type":"string","format":"date"}}}}}