nqfs/specification/schema-nqfs-1.0.json

38 lines
1.2 KiB
JSON

{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "NQFS 1.0",
"type": "object",
"required": [
"spec",
"supplier_name",
"invoice_number",
"invoice_date",
"currency",
"subtotal",
"tps_rate",
"tps_amount",
"tvq_rate",
"tvq_amount",
"total"
],
"properties": {
"spec": { "type": "string" },
"supplier_name": { "type": "string", "minLength": 1 },
"supplier_tax_id": { "type": "string" },
"supplier_email": { "type": "string" },
"supplier_phone": { "type": "string" },
"invoice_number": { "type": "string", "minLength": 1 },
"invoice_date": { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}$" },
"due_date": { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}$" },
"currency": { "type": "string", "pattern": "^[A-Z]{3}$" },
"subtotal": { "type": "number", "minimum": 0 },
"tps_rate": { "type": "number", "minimum": 0 },
"tps_amount": { "type": "number", "minimum": 0 },
"tvq_rate": { "type": "number", "minimum": 0 },
"tvq_amount": { "type": "number", "minimum": 0 },
"total": { "type": "number", "minimum": 0 },
"reference": { "type": "string" },
"description": { "type": "string" }
},
"additionalProperties": false
}