Raw schema
{
"type": "object",
"properties": {
"seller": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"address": {
"type": "string",
"maxLength": 400
},
"email": {
"type": "string",
"maxLength": 254,
"format": "email",
"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
},
"phone": {
"type": "string",
"maxLength": 40
},
"tax_id": {
"type": "string",
"maxLength": 60
}
},
"required": [
"name"
]
},
"buyer": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"address": {
"type": "string",
"maxLength": 400
},
"email": {
"type": "string",
"maxLength": 254,
"format": "email",
"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
},
"phone": {
"type": "string",
"maxLength": 40
},
"tax_id": {
"type": "string",
"maxLength": 60
}
},
"required": [
"name"
]
},
"invoice_number": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"issue_date": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"due_date": {
"description": "YYYY-MM-DD; or give terms instead",
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"terms": {
"description": "e.g. \"Net 15\"; sets due_date from issue_date (early-pay discounts are not applied to the invoice)",
"type": "string",
"minLength": 1,
"maxLength": 40
},
"currency": {
"default": "USD",
"type": "string"
},
"default_rate": {
"description": "Hourly rate for entries without their own rate",
"type": "number",
"minimum": 0,
"maximum": 1000000
},
"entries": {
"minItems": 1,
"maxItems": 500,
"type": "array",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"description": {
"type": "string",
"minLength": 1,
"maxLength": 250
},
"hours": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 1000
},
"rate": {
"type": "number",
"minimum": 0,
"maximum": 1000000
}
},
"required": [
"description",
"hours"
],
"additionalProperties": false
}
},
"group_by": {
"default": "entry",
"description": "entry = one line per entry; description = merge entries with the same description and rate",
"type": "string",
"enum": [
"entry",
"description"
]
},
"rounding": {
"type": "object",
"properties": {
"increment_minutes": {
"anyOf": [
{
"type": "number",
"const": 1
},
{
"type": "number",
"const": 5
},
{
"type": "number",
"const": 6
},
{
"type": "number",
"const": 10
},
{
"type": "number",
"const": 15
},
{
"type": "number",
"const": 30
},
{
"type": "number",
"const": 60
}
],
"description": "Round each entry to this many minutes"
},
"mode": {
"default": "up",
"type": "string",
"enum": [
"up",
"nearest"
]
}
},
"required": [
"increment_minutes"
],
"additionalProperties": false
},
"expenses": {
"description": "Reimbursable expenses, one line each",
"maxItems": 100,
"type": "array",
"items": {
"type": "object",
"properties": {
"description": {
"type": "string",
"minLength": 1,
"maxLength": 250
},
"amount": {
"type": "number",
"minimum": 0,
"maximum": 1000000000
}
},
"required": [
"description",
"amount"
],
"additionalProperties": false
}
},
"tax_rate": {
"type": "number",
"minimum": 0,
"maximum": 100
},
"discount": {
"type": "number",
"minimum": 0,
"maximum": 1000000000
},
"notes": {
"type": "string",
"maxLength": 2000
},
"payment_instructions": {
"type": "string",
"maxLength": 1000
}
},
"required": [
"seller",
"buyer",
"invoice_number",
"issue_date",
"entries"
],
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false
}