Raw schema
{
"type": "object",
"properties": {
"connection_id": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "The numeric id (not the hash_key) of the connection to bill."
},
"statement_no": {
"type": "string",
"minLength": 1,
"description": "Unique invoice number, for example IN-001."
},
"date": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "Invoice date, YYYY-MM-DD."
},
"due_date": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "Due date, YYYY-MM-DD."
},
"summary": {
"type": "string"
},
"note": {
"type": "string"
},
"po_number": {
"type": "string"
},
"payment_options": {
"description": "Accepted payment methods.",
"type": "array",
"items": {
"type": "string",
"enum": [
"cash",
"check",
"bank_transfer",
"paypal"
]
}
},
"allow_partial_payments": {
"type": "boolean"
},
"send_receipts_automatically": {
"type": "boolean"
},
"send_reminders": {
"type": "boolean"
},
"items": {
"description": "Item lines (description, price, quantity).",
"maxItems": 100,
"type": "array",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"description": {
"type": "string",
"description": "Line description."
},
"price": {
"description": "Unit price.",
"anyOf": [
{
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$"
},
{
"type": "number"
}
]
},
"quantity": {
"description": "Quantity.",
"anyOf": [
{
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$"
},
{
"type": "number"
}
]
},
"unit": {
"description": "Unit label such as \"hourly\".",
"type": "string"
}
},
"required": [
"description",
"price",
"quantity"
]
}
},
"expenses": {
"description": "Expense lines.",
"maxItems": 100,
"type": "array",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"description": {
"type": "string"
},
"amount": {
"anyOf": [
{
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$"
},
{
"type": "number"
}
]
}
},
"required": [
"description",
"amount"
]
}
},
"tasks": {
"description": "Time task lines.",
"maxItems": 100,
"type": "array",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"description": {
"type": "string"
},
"duration": {
"description": "Duration in minutes.",
"anyOf": [
{
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$"
},
{
"type": "number"
}
]
},
"rate": {
"description": "Rate per hour.",
"anyOf": [
{
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$"
},
{
"type": "number"
}
]
}
},
"required": [
"description",
"duration",
"rate"
]
}
},
"trips": {
"description": "Mileage lines.",
"maxItems": 100,
"type": "array",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"description": {
"type": "string"
},
"distance": {
"anyOf": [
{
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$"
},
{
"type": "number"
}
]
},
"rate": {
"description": "Rate per distance unit.",
"anyOf": [
{
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$"
},
{
"type": "number"
}
]
}
},
"required": [
"description",
"distance",
"rate"
]
}
},
"taxes": {
"description": "Taxes added to the sub total.",
"maxItems": 20,
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Name, for example \"VAT\"."
},
"combined_amount_percent": {
"type": "string",
"description": "Fixed or percentage value, for example \"5.00\" or \"5.25%\"."
},
"percentage": {
"description": "true if the value is a percentage.",
"type": "boolean"
}
},
"required": [
"name",
"combined_amount_percent"
]
}
},
"discounts": {
"description": "Discounts applied to the sub total.",
"maxItems": 20,
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Name, for example \"VAT\"."
},
"combined_amount_percent": {
"type": "string",
"description": "Fixed or percentage value, for example \"5.00\" or \"5.25%\"."
},
"percentage": {
"description": "true if the value is a percentage.",
"type": "boolean"
}
},
"required": [
"name",
"combined_amount_percent"
]
}
},
"shipping_amounts": {
"description": "Shipping charges.",
"maxItems": 20,
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Name, for example \"VAT\"."
},
"combined_amount_percent": {
"type": "string",
"description": "Fixed or percentage value, for example \"5.00\" or \"5.25%\"."
},
"percentage": {
"description": "true if the value is a percentage.",
"type": "boolean"
}
},
"required": [
"name",
"combined_amount_percent"
]
}
}
},
"required": [
"connection_id",
"statement_no",
"date",
"due_date"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}