{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","description":"Country-agnostic credit note issued against a prior commercial invoice. Reflects Art. 219 Council Directive 2006/112/EC (documents treated as invoices) — the country profile supplies local mandatory mentions.","required":["supplier","customer","credit_note","original_invoice_reference","reason","lines","totals","payment","impact_on_vat"],"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"},"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"}}},"credit_note":{"type":"object","required":["number","issue_date"],"additionalProperties":false,"properties":{"number":{"type":"string","minLength":1},"issue_date":{"type":"string","format":"date"},"notes":{"type":"string"},"language_currency_overrides":{"type":"object","additionalProperties":false,"properties":{"language":{"type":"string"},"currency":{"type":"string"}}}}},"original_invoice_reference":{"type":"object","required":["number","issue_date"],"additionalProperties":false,"properties":{"number":{"type":"string","minLength":1},"issue_date":{"type":"string","format":"date"}}},"reason":{"type":"string","enum":["return","discount","error_correction","goodwill","other"]},"reason_detail":{"type":"string","description":"Optional free text expanding on the reason code."},"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"},"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","credit_total","currency"],"additionalProperties":false,"properties":{"subtotal":{"type":"number","minimum":0},"vat_total":{"type":"number","minimum":0},"credit_total":{"type":"number","minimum":0},"currency":{"type":"string"}}},"impact_on_vat":{"type":"string","enum":["net_reduction","reverse_full"],"description":"net_reduction = reduce the VAT originally charged by the line-level VAT of this credit note; reverse_full = fully reverse the VAT of the original invoice (used when the underlying supply is cancelled)."},"payment":{"type":"object","required":["method"],"additionalProperties":false,"properties":{"method":{"type":"string","enum":["offset_next_invoice","bank_refund","store_credit"]},"iban":{"type":"string"},"bic":{"type":"string"},"notes":{"type":"string"}}},"signatory":{"type":"object","required":["name","role"],"additionalProperties":false,"properties":{"name":{"type":"string"},"role":{"type":"string"},"date":{"type":"string","format":"date"}}}}}