Raw schema
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"income",
"expense"
]
},
"amount": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 10000000,
"description": "In pounds, VAT included"
},
"date": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "The date on the receipt or of the payment"
},
"description": {
"type": "string",
"minLength": 1,
"maxLength": 500,
"description": "Supplier or client, and what it was for"
},
"category": {
"type": "string",
"enum": [
"costOfGoods",
"constructionIndustryScheme",
"staffCosts",
"travelCosts",
"premisesRunningCosts",
"maintenanceCosts",
"adminCosts",
"advertisingCosts",
"businessEntertainmentCosts",
"interest",
"financialCharges",
"badDebt",
"professionalFees",
"depreciation",
"other",
"turnover"
],
"description": "For an expense, its HMRC self-employment box (SA103F): costOfGoods: materials, parts and stock used in the work or sold on, e.g. trade and building suppliers such as Screwfix, Toolstation, City Electrical Factors, Edmundson Electrical, Travis Perkins, Wickes; constructionIndustryScheme: payments to subcontractors under the Construction Industry Scheme; staffCosts: wages, salaries and pension contributions for employees, and payments to non-CIS subcontractors; travelCosts: car, van and travel: fuel, vehicle insurance, servicing and repairs, road tax, parking, tolls, public transport and taxi fares, and hotels and meals on overnight business trips; premisesRunningCosts: rent, business rates, power, heating, water, insurance and security for business premises (never vehicles); maintenanceCosts: repairs and maintenance of business premises, machinery and equipment; adminCosts: phone, broadband, postage, stationery, printing, small office items, and software and app subscriptions such as accounting or tax software (TapTax, Xero, QuickBooks); advertisingCosts: advertising, marketing and website costs; businessEntertainmentCosts: entertaining clients or customers; interest: interest on business loans and overdrafts; financialCharges: bank, overdraft, card and payment-processing charges; badDebt: money owed to the business that will not be paid and was counted as income; professionalFees: accountants, solicitors and other professional fees, and professional indemnity insurance; depreciation: depreciation of equipment (rare in a bank transaction); other: other allowable business costs, e.g. protective clothing, trade and professional body memberships, public liability insurance. For income: turnover (sales and fees) or other (other business income)."
},
"personal": {
"default": false,
"description": "True for a personal (non-business) payment",
"type": "boolean"
}
},
"required": [
"type",
"amount",
"date",
"description",
"category"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}