{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Simple Invoice",
"type": "object",
"properties": {
"invoiceId": {
"type": "string",
"title": "Invoice ID",
"description": "A unique identifier for the invoice."
},
"dateIssued": {
"type": "string",
"format": "date",
"title": "Date Issued",
"description": "The date the invoice was issued."
},
"dueDate": {
"type": "string",
"format": "date",
"title": "Due Date",
"description": "The date the invoice payment is due."
},
"billingDetails": {
"type": "object",
"title": "Billing Details",
"properties": {
"name": {
"type": "string",
"title": "Name",
"description": "Name of the individual or company being billed."
},
"address": {
"type": "string",
"title": "Address",
"description": "Billing address."
},
"email": {
"type": "string",
"format": "email",
"title": "Email",
"description": "Email address of the individual or company being billed."
},
"phone": {
"type": "string",
"title": "Phone",
"description": "Phone number of the individual or company being billed."
}
},
"required": [
"name",
"address"
]
},
"items": {
"type": "array",
"title": "Items",
"description": "List of items or services included in the invoice.",
"items": {
"type": "object",
"title": "Item",
"properties": {
"description": {
"type": "string",
"title": "Description",
"description": "Description of the item or service."
},
"quantity": {
"type": "number",
"title": "Quantity",
"description": "Quantity of the item or service."
},
"unitPrice": {
"type": "number",
"title": "Unit Price",
"description": "Price per unit of the item or service."
},
"total": {
"type": "number",
"title": "Total",
"description": "Total price for this item or service (quantity * unit price)."
}
},
"required": [
"description",
"quantity",
"unitPrice",
"total"
]
}
},
"subTotal": {
"type": "number",
"title": "Subtotal",
"description": "The subtotal amount for all items before taxes and discounts."
},
"tax": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Tax",
"description": "The tax amount applied to the invoice."
},
"total": {
"type": "number",
"title": "Total",
"description": "The total amount due for the invoice."
},
"notes": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Notes",
"description": "Additional notes or comments on the invoice."
}
},
"required": [
"invoiceId",
"dateIssued",
"billingDetails",
"items",
"subTotal",
"total"
]
}