{"$schema":"http://json-schema.org/draft-07/schema#","title":"Receipt","type":"object","additionalProperties":false,"required":["number","date","currency","business","customer","items","payment"],"properties":{"number":{"type":"string","maxLength":60},"date":{"type":"string","format":"date"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"business":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"address":{"type":"string"},"taxId":{"type":"string"},"phone":{"type":"string"}},"additionalProperties":false},"customer":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"email":{"type":"string"}},"additionalProperties":false},"items":{"type":"array","minItems":1,"maxItems":300,"items":{"type":"object","required":["name","quantity","price"],"properties":{"name":{"type":"string","maxLength":200},"quantity":{"type":"number","minimum":0},"price":{"type":"number"}},"additionalProperties":false}},"taxRate":{"type":"number","minimum":0,"maximum":100,"description":"VAT included in prices, in percent"},"payment":{"type":"object","required":["method"],"properties":{"method":{"type":"string"},"last4":{"type":"string","pattern":"^[0-9]{4}$"},"reference":{"type":"string"}},"additionalProperties":false}}}