{"openapi":"3.1.0","info":{"title":"InvoiceHosting REST API","version":"1.0.0","description":"Read and change your company's clients, invoices, payments, products and expenses.\n\nAuthenticate with an API key from Settings \u2192 API keys, sent as `Authorization: Bearer <key>`. A key belongs to one company and acts as the person who created it: it can never do more than their role allows.\n\nMoney, quantities and rates are decimal strings (`\"1080.00\"`), never numbers. Dates are `YYYY-MM-DD`; timestamps are ISO 8601 in UTC.\n\nLists are paginated (`page`, `per_page` up to 100) and accept `updated_since` for incremental syncs.\n\nErrors are JSON: `{\"message\": \"...\"}`, plus `errors` (field => messages) for 422 validation errors."},"servers":[{"url":"https:\/\/api.invoicehosting.co.uk"}],"security":[{"apiKey":[]}],"tags":[{"name":"Account"},{"name":"Clients"},{"name":"Invoices"},{"name":"Payments"},{"name":"Products"},{"name":"Expenses"},{"name":"Reference data"}],"paths":{"\/v1\/me":{"get":{"tags":["Account"],"summary":"The key, its user and company","responses":{"200":{"description":"OK.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Me"}}}}}},"201":{"$ref":"#\/components\/responses\/Unauthorised"},"202":{"$ref":"#\/components\/responses\/Forbidden"},"203":{"$ref":"#\/components\/responses\/TooManyRequests"}}}},"\/v1\/clients":{"get":{"tags":["Clients"],"summary":"List clients","parameters":[{"name":"q","in":"query","description":"Name, surname, email or company number contains","schema":{"type":"string"}},{"name":"status","in":"query","description":"Active or archived clients only","schema":{"type":"string","enum":["active","archived","all"]}},{"name":"email","in":"query","description":"Exact email address","schema":{"type":"string"}},{"$ref":"#\/components\/parameters\/updated_since"},{"$ref":"#\/components\/parameters\/page"},{"$ref":"#\/components\/parameters\/per_page"}],"responses":{"200":{"description":"A page of results.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/Client"}},"links":{"$ref":"#\/components\/schemas\/PageLinks"},"meta":{"$ref":"#\/components\/schemas\/PageMeta"}}}}}},"201":{"$ref":"#\/components\/responses\/Unauthorised"},"202":{"$ref":"#\/components\/responses\/Forbidden"},"203":{"$ref":"#\/components\/responses\/TooManyRequests"}}},"post":{"tags":["Clients"],"summary":"Add a client","responses":{"201":{"description":"Created.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Client"}}}}}},"202":{"$ref":"#\/components\/responses\/Unauthorised"},"203":{"$ref":"#\/components\/responses\/PaymentRequired"},"204":{"$ref":"#\/components\/responses\/Forbidden"},"205":{"$ref":"#\/components\/responses\/Invalid"},"206":{"$ref":"#\/components\/responses\/TooManyRequests"}},"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ClientInput"}}}}}},"\/v1\/clients\/{id}":{"get":{"tags":["Clients"],"summary":"Get a client","responses":{"200":{"description":"OK.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Client"}}}}}},"201":{"$ref":"#\/components\/responses\/Unauthorised"},"202":{"$ref":"#\/components\/responses\/Forbidden"},"203":{"$ref":"#\/components\/responses\/NotFound"},"204":{"$ref":"#\/components\/responses\/TooManyRequests"}},"parameters":[{"$ref":"#\/components\/parameters\/id"}]},"put":{"tags":["Clients"],"summary":"Replace a client (send every field)","responses":{"200":{"description":"OK.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Client"}}}}}},"201":{"$ref":"#\/components\/responses\/Unauthorised"},"202":{"$ref":"#\/components\/responses\/PaymentRequired"},"203":{"$ref":"#\/components\/responses\/Forbidden"},"204":{"$ref":"#\/components\/responses\/NotFound"},"205":{"$ref":"#\/components\/responses\/Invalid"},"206":{"$ref":"#\/components\/responses\/TooManyRequests"}},"parameters":[{"$ref":"#\/components\/parameters\/id"}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ClientInput"}}}}},"patch":{"tags":["Clients"],"summary":"Change some fields of a client","responses":{"200":{"description":"OK.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Client"}}}}}},"201":{"$ref":"#\/components\/responses\/Unauthorised"},"202":{"$ref":"#\/components\/responses\/PaymentRequired"},"203":{"$ref":"#\/components\/responses\/Forbidden"},"204":{"$ref":"#\/components\/responses\/NotFound"},"205":{"$ref":"#\/components\/responses\/Invalid"},"206":{"$ref":"#\/components\/responses\/TooManyRequests"}},"parameters":[{"$ref":"#\/components\/parameters\/id"}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ClientInput"}}}}},"delete":{"tags":["Clients"],"summary":"Delete a client (kept, hidden, when it has history)","parameters":[{"$ref":"#\/components\/parameters\/id"}],"responses":{"204":{"description":"Deleted."},"205":{"$ref":"#\/components\/responses\/Unauthorised"},"206":{"$ref":"#\/components\/responses\/PaymentRequired"},"207":{"$ref":"#\/components\/responses\/Forbidden"},"208":{"$ref":"#\/components\/responses\/NotFound"},"209":{"$ref":"#\/components\/responses\/Invalid"},"210":{"$ref":"#\/components\/responses\/TooManyRequests"}}}},"\/v1\/invoices":{"get":{"tags":["Invoices"],"summary":"List invoices","parameters":[{"name":"status","in":"query","description":"Which invoices","schema":{"type":"string","enum":["all","draft","sent","overdue","paid","void"]}},{"name":"search","in":"query","description":"Number or client name contains","schema":{"type":"string"}},{"name":"client","in":"query","description":"Client id","schema":{"type":"integer"}},{"name":"from","in":"query","description":"Issued on or after (YYYY-MM-DD)","schema":{"type":"string","format":"date"}},{"name":"to","in":"query","description":"Issued on or before (YYYY-MM-DD)","schema":{"type":"string","format":"date"}},{"name":"sort","in":"query","description":"Sort by","schema":{"type":"string","enum":["number","client","issue_date","due_date","total","balance"]}},{"name":"direction","in":"query","description":"Sort direction","schema":{"type":"string","enum":["asc","desc"]}},{"$ref":"#\/components\/parameters\/updated_since"},{"$ref":"#\/components\/parameters\/page"},{"$ref":"#\/components\/parameters\/per_page"}],"responses":{"200":{"description":"A page of results.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/Invoice"}},"links":{"$ref":"#\/components\/schemas\/PageLinks"},"meta":{"$ref":"#\/components\/schemas\/PageMeta"}}}}}},"201":{"$ref":"#\/components\/responses\/Unauthorised"},"202":{"$ref":"#\/components\/responses\/Forbidden"},"203":{"$ref":"#\/components\/responses\/TooManyRequests"}}},"post":{"tags":["Invoices"],"summary":"Create a draft invoice","responses":{"201":{"description":"Created.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Invoice"}}}}}},"202":{"$ref":"#\/components\/responses\/Unauthorised"},"203":{"$ref":"#\/components\/responses\/PaymentRequired"},"204":{"$ref":"#\/components\/responses\/Forbidden"},"205":{"$ref":"#\/components\/responses\/Invalid"},"206":{"$ref":"#\/components\/responses\/TooManyRequests"}},"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/InvoiceInput"}}}}}},"\/v1\/invoices\/{id}":{"get":{"tags":["Invoices"],"summary":"Get a invoice","responses":{"200":{"description":"OK.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Invoice"}}}}}},"201":{"$ref":"#\/components\/responses\/Unauthorised"},"202":{"$ref":"#\/components\/responses\/Forbidden"},"203":{"$ref":"#\/components\/responses\/NotFound"},"204":{"$ref":"#\/components\/responses\/TooManyRequests"}},"parameters":[{"$ref":"#\/components\/parameters\/id"}]},"put":{"tags":["Invoices"],"summary":"Replace a invoice (send every field)","responses":{"200":{"description":"OK.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Invoice"}}}}}},"201":{"$ref":"#\/components\/responses\/Unauthorised"},"202":{"$ref":"#\/components\/responses\/PaymentRequired"},"203":{"$ref":"#\/components\/responses\/Forbidden"},"204":{"$ref":"#\/components\/responses\/NotFound"},"205":{"$ref":"#\/components\/responses\/Invalid"},"206":{"$ref":"#\/components\/responses\/TooManyRequests"}},"parameters":[{"$ref":"#\/components\/parameters\/id"}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/InvoiceInput"}}}}},"patch":{"tags":["Invoices"],"summary":"Change some fields of a invoice","responses":{"200":{"description":"OK.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Invoice"}}}}}},"201":{"$ref":"#\/components\/responses\/Unauthorised"},"202":{"$ref":"#\/components\/responses\/PaymentRequired"},"203":{"$ref":"#\/components\/responses\/Forbidden"},"204":{"$ref":"#\/components\/responses\/NotFound"},"205":{"$ref":"#\/components\/responses\/Invalid"},"206":{"$ref":"#\/components\/responses\/TooManyRequests"}},"parameters":[{"$ref":"#\/components\/parameters\/id"}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/InvoiceInput"}}}}},"delete":{"tags":["Invoices"],"summary":"Delete a draft invoice","parameters":[{"$ref":"#\/components\/parameters\/id"}],"responses":{"204":{"description":"Deleted."},"205":{"$ref":"#\/components\/responses\/Unauthorised"},"206":{"$ref":"#\/components\/responses\/PaymentRequired"},"207":{"$ref":"#\/components\/responses\/Forbidden"},"208":{"$ref":"#\/components\/responses\/NotFound"},"209":{"$ref":"#\/components\/responses\/Invalid"},"210":{"$ref":"#\/components\/responses\/TooManyRequests"}}}},"\/v1\/invoices\/{id}\/send":{"post":{"tags":["Invoices"],"summary":"Mark a draft as sent","responses":{"200":{"description":"OK.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Invoice"}}}}}},"201":{"$ref":"#\/components\/responses\/Unauthorised"},"202":{"$ref":"#\/components\/responses\/Forbidden"},"203":{"$ref":"#\/components\/responses\/NotFound"},"204":{"$ref":"#\/components\/responses\/TooManyRequests"}},"parameters":[{"$ref":"#\/components\/parameters\/id"}]}},"\/v1\/invoices\/{id}\/void":{"post":{"tags":["Invoices"],"summary":"Void a sent invoice with nothing paid","responses":{"200":{"description":"OK.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Invoice"}}}}}},"201":{"$ref":"#\/components\/responses\/Unauthorised"},"202":{"$ref":"#\/components\/responses\/PaymentRequired"},"203":{"$ref":"#\/components\/responses\/Forbidden"},"204":{"$ref":"#\/components\/responses\/NotFound"},"205":{"$ref":"#\/components\/responses\/Invalid"},"206":{"$ref":"#\/components\/responses\/TooManyRequests"}},"parameters":[{"$ref":"#\/components\/parameters\/id"}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/VoidInput"}}}}}},"\/v1\/invoices\/{id}\/pdf":{"get":{"tags":["Invoices"],"summary":"Download the invoice as PDF","parameters":[{"$ref":"#\/components\/parameters\/id"}],"responses":{"200":{"description":"The PDF.","content":{"application\/pdf":{"schema":{"type":"string","format":"binary"}}}},"201":{"$ref":"#\/components\/responses\/Unauthorised"},"202":{"$ref":"#\/components\/responses\/Forbidden"},"203":{"$ref":"#\/components\/responses\/NotFound"},"204":{"$ref":"#\/components\/responses\/TooManyRequests"}}}},"\/v1\/payments":{"get":{"tags":["Payments"],"summary":"List payments, refunds and credit applied","parameters":[{"name":"view","in":"query","description":"Which payments","schema":{"type":"string","enum":["all","received","refunds","on_account","credit"]}},{"name":"q","in":"query","description":"Reference, note, invoice number or client contains","schema":{"type":"string"}},{"name":"client","in":"query","description":"Client id","schema":{"type":"integer"}},{"name":"method","in":"query","description":"Payment method id","schema":{"type":"integer"}},{"name":"from","in":"query","description":"Paid on or after (YYYY-MM-DD)","schema":{"type":"string","format":"date"}},{"name":"to","in":"query","description":"Paid on or before (YYYY-MM-DD)","schema":{"type":"string","format":"date"}},{"name":"sort","in":"query","description":"Sort by (a leading - is newest or largest first)","schema":{"type":"string","enum":["date","-date","amount","-amount"]}},{"$ref":"#\/components\/parameters\/updated_since"},{"$ref":"#\/components\/parameters\/page"},{"$ref":"#\/components\/parameters\/per_page"}],"responses":{"200":{"description":"A page of results.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/Payment"}},"links":{"$ref":"#\/components\/schemas\/PageLinks"},"meta":{"$ref":"#\/components\/schemas\/PageMeta"}}}}}},"201":{"$ref":"#\/components\/responses\/Unauthorised"},"202":{"$ref":"#\/components\/responses\/Forbidden"},"203":{"$ref":"#\/components\/responses\/TooManyRequests"}}},"post":{"tags":["Payments"],"summary":"Record a payment against an invoice, or on account","responses":{"201":{"description":"Created.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Payment"}}}}}},"202":{"$ref":"#\/components\/responses\/Unauthorised"},"203":{"$ref":"#\/components\/responses\/PaymentRequired"},"204":{"$ref":"#\/components\/responses\/Forbidden"},"205":{"$ref":"#\/components\/responses\/Invalid"},"206":{"$ref":"#\/components\/responses\/TooManyRequests"}},"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/PaymentInput"}}}}}},"\/v1\/payments\/{id}":{"get":{"tags":["Payments"],"summary":"Get a payment","responses":{"200":{"description":"OK.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Payment"}}}}}},"201":{"$ref":"#\/components\/responses\/Unauthorised"},"202":{"$ref":"#\/components\/responses\/Forbidden"},"203":{"$ref":"#\/components\/responses\/NotFound"},"204":{"$ref":"#\/components\/responses\/TooManyRequests"}},"parameters":[{"$ref":"#\/components\/parameters\/id"}]},"put":{"tags":["Payments"],"summary":"Replace a payment (send every field)","responses":{"200":{"description":"OK.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Payment"}}}}}},"201":{"$ref":"#\/components\/responses\/Unauthorised"},"202":{"$ref":"#\/components\/responses\/PaymentRequired"},"203":{"$ref":"#\/components\/responses\/Forbidden"},"204":{"$ref":"#\/components\/responses\/NotFound"},"205":{"$ref":"#\/components\/responses\/Invalid"},"206":{"$ref":"#\/components\/responses\/TooManyRequests"}},"parameters":[{"$ref":"#\/components\/parameters\/id"}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/PaymentUpdate"}}}}},"patch":{"tags":["Payments"],"summary":"Change some fields of a payment","responses":{"200":{"description":"OK.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Payment"}}}}}},"201":{"$ref":"#\/components\/responses\/Unauthorised"},"202":{"$ref":"#\/components\/responses\/PaymentRequired"},"203":{"$ref":"#\/components\/responses\/Forbidden"},"204":{"$ref":"#\/components\/responses\/NotFound"},"205":{"$ref":"#\/components\/responses\/Invalid"},"206":{"$ref":"#\/components\/responses\/TooManyRequests"}},"parameters":[{"$ref":"#\/components\/parameters\/id"}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/PaymentUpdate"}}}}},"delete":{"tags":["Payments"],"summary":"Delete a payment recorded in error","parameters":[{"$ref":"#\/components\/parameters\/id"}],"responses":{"204":{"description":"Deleted."},"205":{"$ref":"#\/components\/responses\/Unauthorised"},"206":{"$ref":"#\/components\/responses\/PaymentRequired"},"207":{"$ref":"#\/components\/responses\/Forbidden"},"208":{"$ref":"#\/components\/responses\/NotFound"},"209":{"$ref":"#\/components\/responses\/Invalid"},"210":{"$ref":"#\/components\/responses\/TooManyRequests"}}}},"\/v1\/products":{"get":{"tags":["Products"],"summary":"List products","parameters":[{"name":"q","in":"query","description":"Name, SKU or description contains","schema":{"type":"string"}},{"name":"status","in":"query","description":"Active or inactive products","schema":{"type":"string","enum":["active","inactive","all"]}},{"name":"sku","in":"query","description":"Exact SKU","schema":{"type":"string"}},{"name":"family","in":"query","description":"Product family id","schema":{"type":"integer"}},{"$ref":"#\/components\/parameters\/updated_since"},{"$ref":"#\/components\/parameters\/page"},{"$ref":"#\/components\/parameters\/per_page"}],"responses":{"200":{"description":"A page of results.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/Product"}},"links":{"$ref":"#\/components\/schemas\/PageLinks"},"meta":{"$ref":"#\/components\/schemas\/PageMeta"}}}}}},"201":{"$ref":"#\/components\/responses\/Unauthorised"},"202":{"$ref":"#\/components\/responses\/Forbidden"},"203":{"$ref":"#\/components\/responses\/TooManyRequests"}}},"post":{"tags":["Products"],"summary":"Add a product","responses":{"201":{"description":"Created.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Product"}}}}}},"202":{"$ref":"#\/components\/responses\/Unauthorised"},"203":{"$ref":"#\/components\/responses\/PaymentRequired"},"204":{"$ref":"#\/components\/responses\/Forbidden"},"205":{"$ref":"#\/components\/responses\/Invalid"},"206":{"$ref":"#\/components\/responses\/TooManyRequests"}},"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ProductInput"}}}}}},"\/v1\/products\/{id}":{"get":{"tags":["Products"],"summary":"Get a product","responses":{"200":{"description":"OK.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Product"}}}}}},"201":{"$ref":"#\/components\/responses\/Unauthorised"},"202":{"$ref":"#\/components\/responses\/Forbidden"},"203":{"$ref":"#\/components\/responses\/NotFound"},"204":{"$ref":"#\/components\/responses\/TooManyRequests"}},"parameters":[{"$ref":"#\/components\/parameters\/id"}]},"put":{"tags":["Products"],"summary":"Replace a product (send every field)","responses":{"200":{"description":"OK.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Product"}}}}}},"201":{"$ref":"#\/components\/responses\/Unauthorised"},"202":{"$ref":"#\/components\/responses\/PaymentRequired"},"203":{"$ref":"#\/components\/responses\/Forbidden"},"204":{"$ref":"#\/components\/responses\/NotFound"},"205":{"$ref":"#\/components\/responses\/Invalid"},"206":{"$ref":"#\/components\/responses\/TooManyRequests"}},"parameters":[{"$ref":"#\/components\/parameters\/id"}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ProductInput"}}}}},"patch":{"tags":["Products"],"summary":"Change some fields of a product","responses":{"200":{"description":"OK.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Product"}}}}}},"201":{"$ref":"#\/components\/responses\/Unauthorised"},"202":{"$ref":"#\/components\/responses\/PaymentRequired"},"203":{"$ref":"#\/components\/responses\/Forbidden"},"204":{"$ref":"#\/components\/responses\/NotFound"},"205":{"$ref":"#\/components\/responses\/Invalid"},"206":{"$ref":"#\/components\/responses\/TooManyRequests"}},"parameters":[{"$ref":"#\/components\/parameters\/id"}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ProductInput"}}}}},"delete":{"tags":["Products"],"summary":"Delete a product","parameters":[{"$ref":"#\/components\/parameters\/id"}],"responses":{"204":{"description":"Deleted."},"205":{"$ref":"#\/components\/responses\/Unauthorised"},"206":{"$ref":"#\/components\/responses\/PaymentRequired"},"207":{"$ref":"#\/components\/responses\/Forbidden"},"208":{"$ref":"#\/components\/responses\/NotFound"},"209":{"$ref":"#\/components\/responses\/Invalid"},"210":{"$ref":"#\/components\/responses\/TooManyRequests"}}}},"\/v1\/expenses":{"get":{"tags":["Expenses"],"summary":"List expenses","parameters":[{"name":"q","in":"query","description":"Supplier, description, reference or notes contains","schema":{"type":"string"}},{"name":"status","in":"query","description":"Rebilling status","schema":{"type":"string","enum":["all","to_bill","billed","not_billable"]}},{"name":"category","in":"query","description":"Expense category id, or \"none\"","schema":{"type":"string"}},{"name":"client","in":"query","description":"Client id","schema":{"type":"integer"}},{"name":"period","in":"query","description":"Date range","schema":{"type":"string","enum":["all","this_month","last_month","this_quarter","last_quarter","this_tax_year","last_tax_year","custom"]}},{"name":"from","in":"query","description":"With period=custom: spent on or after","schema":{"type":"string","format":"date"}},{"name":"to","in":"query","description":"With period=custom: spent on or before","schema":{"type":"string","format":"date"}},{"name":"sort","in":"query","description":"Sort by","schema":{"type":"string","enum":["date","supplier","total"]}},{"name":"direction","in":"query","description":"Sort direction","schema":{"type":"string","enum":["asc","desc"]}},{"$ref":"#\/components\/parameters\/updated_since"},{"$ref":"#\/components\/parameters\/page"},{"$ref":"#\/components\/parameters\/per_page"}],"responses":{"200":{"description":"A page of results.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/Expense"}},"links":{"$ref":"#\/components\/schemas\/PageLinks"},"meta":{"$ref":"#\/components\/schemas\/PageMeta"}}}}}},"201":{"$ref":"#\/components\/responses\/Unauthorised"},"202":{"$ref":"#\/components\/responses\/Forbidden"},"203":{"$ref":"#\/components\/responses\/TooManyRequests"}}},"post":{"tags":["Expenses"],"summary":"Add an expense (send receipts as multipart receipts[])","responses":{"201":{"description":"Created.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Expense"}}}}}},"202":{"$ref":"#\/components\/responses\/Unauthorised"},"203":{"$ref":"#\/components\/responses\/PaymentRequired"},"204":{"$ref":"#\/components\/responses\/Forbidden"},"205":{"$ref":"#\/components\/responses\/Invalid"},"206":{"$ref":"#\/components\/responses\/TooManyRequests"}},"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ExpenseInput"}}}}}},"\/v1\/expenses\/{id}":{"get":{"tags":["Expenses"],"summary":"Get a expense","responses":{"200":{"description":"OK.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Expense"}}}}}},"201":{"$ref":"#\/components\/responses\/Unauthorised"},"202":{"$ref":"#\/components\/responses\/Forbidden"},"203":{"$ref":"#\/components\/responses\/NotFound"},"204":{"$ref":"#\/components\/responses\/TooManyRequests"}},"parameters":[{"$ref":"#\/components\/parameters\/id"}]},"put":{"tags":["Expenses"],"summary":"Replace a expense (send every field)","responses":{"200":{"description":"OK.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Expense"}}}}}},"201":{"$ref":"#\/components\/responses\/Unauthorised"},"202":{"$ref":"#\/components\/responses\/PaymentRequired"},"203":{"$ref":"#\/components\/responses\/Forbidden"},"204":{"$ref":"#\/components\/responses\/NotFound"},"205":{"$ref":"#\/components\/responses\/Invalid"},"206":{"$ref":"#\/components\/responses\/TooManyRequests"}},"parameters":[{"$ref":"#\/components\/parameters\/id"}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ExpenseInput"}}}}},"patch":{"tags":["Expenses"],"summary":"Change some fields of a expense","responses":{"200":{"description":"OK.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Expense"}}}}}},"201":{"$ref":"#\/components\/responses\/Unauthorised"},"202":{"$ref":"#\/components\/responses\/PaymentRequired"},"203":{"$ref":"#\/components\/responses\/Forbidden"},"204":{"$ref":"#\/components\/responses\/NotFound"},"205":{"$ref":"#\/components\/responses\/Invalid"},"206":{"$ref":"#\/components\/responses\/TooManyRequests"}},"parameters":[{"$ref":"#\/components\/parameters\/id"}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ExpenseInput"}}}}},"delete":{"tags":["Expenses"],"summary":"Delete an expense that is not on an invoice","parameters":[{"$ref":"#\/components\/parameters\/id"}],"responses":{"204":{"description":"Deleted."},"205":{"$ref":"#\/components\/responses\/Unauthorised"},"206":{"$ref":"#\/components\/responses\/PaymentRequired"},"207":{"$ref":"#\/components\/responses\/Forbidden"},"208":{"$ref":"#\/components\/responses\/NotFound"},"209":{"$ref":"#\/components\/responses\/Invalid"},"210":{"$ref":"#\/components\/responses\/TooManyRequests"}}}},"\/v1\/tax-rates":{"get":{"tags":["Reference data"],"summary":"Tax rates","responses":{"200":{"description":"Every record.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/TaxRate"}}}}}}},"201":{"$ref":"#\/components\/responses\/Unauthorised"},"202":{"$ref":"#\/components\/responses\/Forbidden"},"203":{"$ref":"#\/components\/responses\/TooManyRequests"}}}},"\/v1\/payment-methods":{"get":{"tags":["Reference data"],"summary":"Payment methods","responses":{"200":{"description":"Every record.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/PaymentMethod"}}}}}}},"201":{"$ref":"#\/components\/responses\/Unauthorised"},"202":{"$ref":"#\/components\/responses\/Forbidden"},"203":{"$ref":"#\/components\/responses\/TooManyRequests"}}}},"\/v1\/expense-categories":{"get":{"tags":["Reference data"],"summary":"Expense categories","responses":{"200":{"description":"Every record.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/ExpenseCategory"}}}}}}},"201":{"$ref":"#\/components\/responses\/Unauthorised"},"202":{"$ref":"#\/components\/responses\/Forbidden"},"203":{"$ref":"#\/components\/responses\/TooManyRequests"}}}}},"webhooks":{"client.created":{"post":{"summary":"Client added","description":"Signed with the endpoint's secret: header `InvoiceHosting-Signature: t=<unix time>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\">`. Respond with any 2xx within 10 seconds.","requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique event id (repeated on retries)."},"type":{"type":"string","const":"client.created"},"created_at":{"type":"string","format":"date-time"},"company":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"}}},"data":{"type":"object","properties":{"object":{"$ref":"#\/components\/schemas\/Client"}}}}}}}},"responses":{"2XX":{"description":"Received."}}}},"client.updated":{"post":{"summary":"Client changed","description":"Signed with the endpoint's secret: header `InvoiceHosting-Signature: t=<unix time>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\">`. Respond with any 2xx within 10 seconds.","requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique event id (repeated on retries)."},"type":{"type":"string","const":"client.updated"},"created_at":{"type":"string","format":"date-time"},"company":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"}}},"data":{"type":"object","properties":{"object":{"$ref":"#\/components\/schemas\/Client"}}}}}}}},"responses":{"2XX":{"description":"Received."}}}},"client.deleted":{"post":{"summary":"Client deleted","description":"Signed with the endpoint's secret: header `InvoiceHosting-Signature: t=<unix time>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\">`. Respond with any 2xx within 10 seconds.","requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique event id (repeated on retries)."},"type":{"type":"string","const":"client.deleted"},"created_at":{"type":"string","format":"date-time"},"company":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"}}},"data":{"type":"object","properties":{"object":{"$ref":"#\/components\/schemas\/Deleted"}}}}}}}},"responses":{"2XX":{"description":"Received."}}}},"invoice.created":{"post":{"summary":"Invoice created","description":"Signed with the endpoint's secret: header `InvoiceHosting-Signature: t=<unix time>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\">`. Respond with any 2xx within 10 seconds.","requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique event id (repeated on retries)."},"type":{"type":"string","const":"invoice.created"},"created_at":{"type":"string","format":"date-time"},"company":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"}}},"data":{"type":"object","properties":{"object":{"$ref":"#\/components\/schemas\/Invoice"}}}}}}}},"responses":{"2XX":{"description":"Received."}}}},"invoice.updated":{"post":{"summary":"Invoice changed","description":"Signed with the endpoint's secret: header `InvoiceHosting-Signature: t=<unix time>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\">`. Respond with any 2xx within 10 seconds.","requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique event id (repeated on retries)."},"type":{"type":"string","const":"invoice.updated"},"created_at":{"type":"string","format":"date-time"},"company":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"}}},"data":{"type":"object","properties":{"object":{"$ref":"#\/components\/schemas\/Invoice"}}}}}}}},"responses":{"2XX":{"description":"Received."}}}},"invoice.sent":{"post":{"summary":"Invoice sent","description":"Signed with the endpoint's secret: header `InvoiceHosting-Signature: t=<unix time>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\">`. Respond with any 2xx within 10 seconds.","requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique event id (repeated on retries)."},"type":{"type":"string","const":"invoice.sent"},"created_at":{"type":"string","format":"date-time"},"company":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"}}},"data":{"type":"object","properties":{"object":{"$ref":"#\/components\/schemas\/Invoice"}}}}}}}},"responses":{"2XX":{"description":"Received."}}}},"invoice.viewed":{"post":{"summary":"Invoice viewed by the client","description":"Signed with the endpoint's secret: header `InvoiceHosting-Signature: t=<unix time>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\">`. Respond with any 2xx within 10 seconds.","requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique event id (repeated on retries)."},"type":{"type":"string","const":"invoice.viewed"},"created_at":{"type":"string","format":"date-time"},"company":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"}}},"data":{"type":"object","properties":{"object":{"$ref":"#\/components\/schemas\/Invoice"}}}}}}}},"responses":{"2XX":{"description":"Received."}}}},"invoice.paid":{"post":{"summary":"Invoice paid in full","description":"Signed with the endpoint's secret: header `InvoiceHosting-Signature: t=<unix time>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\">`. Respond with any 2xx within 10 seconds.","requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique event id (repeated on retries)."},"type":{"type":"string","const":"invoice.paid"},"created_at":{"type":"string","format":"date-time"},"company":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"}}},"data":{"type":"object","properties":{"object":{"$ref":"#\/components\/schemas\/Invoice"}}}}}}}},"responses":{"2XX":{"description":"Received."}}}},"invoice.voided":{"post":{"summary":"Invoice voided","description":"Signed with the endpoint's secret: header `InvoiceHosting-Signature: t=<unix time>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\">`. Respond with any 2xx within 10 seconds.","requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique event id (repeated on retries)."},"type":{"type":"string","const":"invoice.voided"},"created_at":{"type":"string","format":"date-time"},"company":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"}}},"data":{"type":"object","properties":{"object":{"$ref":"#\/components\/schemas\/Invoice"}}}}}}}},"responses":{"2XX":{"description":"Received."}}}},"invoice.deleted":{"post":{"summary":"Draft invoice deleted","description":"Signed with the endpoint's secret: header `InvoiceHosting-Signature: t=<unix time>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\">`. Respond with any 2xx within 10 seconds.","requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique event id (repeated on retries)."},"type":{"type":"string","const":"invoice.deleted"},"created_at":{"type":"string","format":"date-time"},"company":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"}}},"data":{"type":"object","properties":{"object":{"$ref":"#\/components\/schemas\/Deleted"}}}}}}}},"responses":{"2XX":{"description":"Received."}}}},"payment.created":{"post":{"summary":"Payment, refund or credit recorded","description":"Signed with the endpoint's secret: header `InvoiceHosting-Signature: t=<unix time>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\">`. Respond with any 2xx within 10 seconds.","requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique event id (repeated on retries)."},"type":{"type":"string","const":"payment.created"},"created_at":{"type":"string","format":"date-time"},"company":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"}}},"data":{"type":"object","properties":{"object":{"$ref":"#\/components\/schemas\/Payment"}}}}}}}},"responses":{"2XX":{"description":"Received."}}}},"payment.updated":{"post":{"summary":"Payment corrected","description":"Signed with the endpoint's secret: header `InvoiceHosting-Signature: t=<unix time>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\">`. Respond with any 2xx within 10 seconds.","requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique event id (repeated on retries)."},"type":{"type":"string","const":"payment.updated"},"created_at":{"type":"string","format":"date-time"},"company":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"}}},"data":{"type":"object","properties":{"object":{"$ref":"#\/components\/schemas\/Payment"}}}}}}}},"responses":{"2XX":{"description":"Received."}}}},"payment.deleted":{"post":{"summary":"Payment deleted","description":"Signed with the endpoint's secret: header `InvoiceHosting-Signature: t=<unix time>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\">`. Respond with any 2xx within 10 seconds.","requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique event id (repeated on retries)."},"type":{"type":"string","const":"payment.deleted"},"created_at":{"type":"string","format":"date-time"},"company":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"}}},"data":{"type":"object","properties":{"object":{"$ref":"#\/components\/schemas\/Deleted"}}}}}}}},"responses":{"2XX":{"description":"Received."}}}},"product.created":{"post":{"summary":"Product added","description":"Signed with the endpoint's secret: header `InvoiceHosting-Signature: t=<unix time>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\">`. Respond with any 2xx within 10 seconds.","requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique event id (repeated on retries)."},"type":{"type":"string","const":"product.created"},"created_at":{"type":"string","format":"date-time"},"company":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"}}},"data":{"type":"object","properties":{"object":{"$ref":"#\/components\/schemas\/Product"}}}}}}}},"responses":{"2XX":{"description":"Received."}}}},"product.updated":{"post":{"summary":"Product changed","description":"Signed with the endpoint's secret: header `InvoiceHosting-Signature: t=<unix time>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\">`. Respond with any 2xx within 10 seconds.","requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique event id (repeated on retries)."},"type":{"type":"string","const":"product.updated"},"created_at":{"type":"string","format":"date-time"},"company":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"}}},"data":{"type":"object","properties":{"object":{"$ref":"#\/components\/schemas\/Product"}}}}}}}},"responses":{"2XX":{"description":"Received."}}}},"product.deleted":{"post":{"summary":"Product deleted","description":"Signed with the endpoint's secret: header `InvoiceHosting-Signature: t=<unix time>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\">`. Respond with any 2xx within 10 seconds.","requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique event id (repeated on retries)."},"type":{"type":"string","const":"product.deleted"},"created_at":{"type":"string","format":"date-time"},"company":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"}}},"data":{"type":"object","properties":{"object":{"$ref":"#\/components\/schemas\/Deleted"}}}}}}}},"responses":{"2XX":{"description":"Received."}}}},"expense.created":{"post":{"summary":"Expense added","description":"Signed with the endpoint's secret: header `InvoiceHosting-Signature: t=<unix time>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\">`. Respond with any 2xx within 10 seconds.","requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique event id (repeated on retries)."},"type":{"type":"string","const":"expense.created"},"created_at":{"type":"string","format":"date-time"},"company":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"}}},"data":{"type":"object","properties":{"object":{"$ref":"#\/components\/schemas\/Expense"}}}}}}}},"responses":{"2XX":{"description":"Received."}}}},"expense.updated":{"post":{"summary":"Expense changed","description":"Signed with the endpoint's secret: header `InvoiceHosting-Signature: t=<unix time>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\">`. Respond with any 2xx within 10 seconds.","requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique event id (repeated on retries)."},"type":{"type":"string","const":"expense.updated"},"created_at":{"type":"string","format":"date-time"},"company":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"}}},"data":{"type":"object","properties":{"object":{"$ref":"#\/components\/schemas\/Expense"}}}}}}}},"responses":{"2XX":{"description":"Received."}}}},"expense.deleted":{"post":{"summary":"Expense deleted","description":"Signed with the endpoint's secret: header `InvoiceHosting-Signature: t=<unix time>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\">`. Respond with any 2xx within 10 seconds.","requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique event id (repeated on retries)."},"type":{"type":"string","const":"expense.deleted"},"created_at":{"type":"string","format":"date-time"},"company":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"}}},"data":{"type":"object","properties":{"object":{"$ref":"#\/components\/schemas\/Deleted"}}}}}}}},"responses":{"2XX":{"description":"Received."}}}}},"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"An API key from Settings \u2192 API keys."}},"parameters":{"page":{"name":"page","in":"query","schema":{"type":"integer","minimum":1}},"per_page":{"name":"per_page","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},"updated_since":{"name":"updated_since","in":"query","description":"Only records changed at or after this moment.","schema":{"type":"string","format":"date-time"}},"id":{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}},"responses":{"Unauthorised":{"description":"The key is missing, wrong, expired or revoked.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"Forbidden":{"description":"The key or its user may not do this, or the plan has no API access.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"NotFound":{"description":"No such record in this company.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"Invalid":{"description":"Validation failed.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ValidationError"}}}},"TooManyRequests":{"description":"Rate limit reached; see the Retry-After header.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"PaymentRequired":{"description":"The plan does not allow this (a limit is used up), or the account is read-only until an overdue bill is paid.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/UpgradeRequired"}}}}},"schemas":{"Error":{"type":"object","properties":{"message":{"type":"string"}}},"UpgradeRequired":{"type":"object","properties":{"message":{"type":"string"},"reason":{"type":"string","enum":["limit","over_limit","feature","read_only"]},"key":{"type":["string","null"]},"limit":{"type":["integer","null"]}}},"ValidationError":{"type":"object","properties":{"message":{"type":"string"},"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}}},"PageLinks":{"type":"object","properties":{"first":{"type":["string","null"]},"last":{"type":["string","null"]},"prev":{"type":["string","null"]},"next":{"type":["string","null"]}}},"PageMeta":{"type":"object","properties":{"current_page":{"type":"integer"},"last_page":{"type":"integer"},"per_page":{"type":"integer"},"total":{"type":"integer"},"from":{"type":["integer","null"]},"to":{"type":["integer","null"]}}},"Me":{"type":"object","properties":{"name":{"type":"string"},"abilities":{"type":"object","additionalProperties":{"type":"string","enum":["none","read","write"]}},"expires_at":{"type":["string","null"],"format":"date-time"},"rate_limit_per_minute":{"type":["integer","null"]},"user":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"role":{"type":"string"}}},"company":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"currency":{"type":"string"},"timezone":{"type":"string"}}}}},"Client":{"type":"object","properties":{"id":{"type":"integer"},"object":{"const":"client"},"type":{"type":"string","enum":["organisation","individual"]},"name":{"type":"string","maxLength":255},"surname":{"type":["string","null"]},"title":{"type":["string","null"]},"email":{"type":["string","null"]},"phone":{"type":["string","null"]},"mobile":{"type":["string","null"]},"fax":{"type":["string","null"]},"website":{"type":["string","null"]},"address_line_1":{"type":["string","null"]},"address_line_2":{"type":["string","null"]},"city":{"type":["string","null"]},"county":{"type":["string","null"]},"postcode":{"type":["string","null"]},"country":{"type":["string","null"],"description":"ISO 3166 alpha-2, e.g. GB"},"vat_number":{"type":["string","null"]},"tax_code":{"type":["string","null"]},"company_number":{"type":["string","null"]},"currency":{"type":["string","null"],"description":"ISO 4217, e.g. GBP; empty uses the company currency"},"locale":{"type":["string","null"]},"payment_terms_days":{"type":["integer","null"],"minimum":0,"maximum":365},"invoicing_contact":{"type":["string","null"]},"birthdate":{"type":["string","null"],"format":"date"},"private_notes":{"type":["string","null"]},"is_active":{"type":"boolean"},"display_name":{"type":"string"},"is_erased":{"type":"boolean"},"custom_fields":{"type":"object","description":"Custom field values keyed by field id: text, true\/false, an option id, or a list of option ids. Leave out to keep them.","additionalProperties":{"oneOf":[{"type":"string"},{"type":"boolean"},{"type":"array","items":{"type":"string"}}]}},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"},"deleted_at":{"type":["string","null"],"format":"date-time"}}},"ClientInput":{"type":"object","required":["type","name"],"properties":{"type":{"type":"string","enum":["organisation","individual"]},"name":{"type":"string","maxLength":255},"surname":{"type":["string","null"]},"title":{"type":["string","null"]},"email":{"type":["string","null"]},"phone":{"type":["string","null"]},"mobile":{"type":["string","null"]},"fax":{"type":["string","null"]},"website":{"type":["string","null"]},"address_line_1":{"type":["string","null"]},"address_line_2":{"type":["string","null"]},"city":{"type":["string","null"]},"county":{"type":["string","null"]},"postcode":{"type":["string","null"]},"country":{"type":["string","null"],"description":"ISO 3166 alpha-2, e.g. GB"},"vat_number":{"type":["string","null"]},"tax_code":{"type":["string","null"]},"company_number":{"type":["string","null"]},"currency":{"type":["string","null"],"description":"ISO 4217, e.g. GBP; empty uses the company currency"},"locale":{"type":["string","null"]},"payment_terms_days":{"type":["integer","null"],"minimum":0,"maximum":365},"invoicing_contact":{"type":["string","null"]},"birthdate":{"type":["string","null"],"format":"date"},"private_notes":{"type":["string","null"]},"is_active":{"type":"boolean"},"custom_fields":{"type":"object","description":"Custom field values keyed by field id: text, true\/false, an option id, or a list of option ids. Leave out to keep them.","additionalProperties":{"oneOf":[{"type":"string"},{"type":"boolean"},{"type":"array","items":{"type":"string"}}]}}}},"InvoiceLine":{"type":"object","required":["name","quantity","price"],"properties":{"id":{"type":["integer","null"],"description":"An existing line's id to keep it; omit for a new line."},"product_id":{"type":["integer","null"]},"tax_rate_id":{"type":["integer","null"]},"name":{"type":"string"},"description":{"type":["string","null"]},"quantity":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","examples":["1080.00"]},"unit_name":{"type":["string","null"]},"price":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","examples":["1080.00"]},"discount_amount":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?$"}}},"Invoice":{"type":"object","properties":{"id":{"type":"integer"},"object":{"const":"invoice"},"number":{"type":["string","null"]},"status":{"type":"string","enum":["draft","sent","viewed","paid","void"]},"display_status":{"type":"string","enum":["draft","sent","viewed","partially_paid","overdue","paid","void"]},"client_id":{"type":"integer"},"client_name":{"type":["string","null"]},"issue_date":{"type":"string","format":"date"},"due_date":{"type":"string","format":"date"},"currency":{"type":"string"},"exchange_rate":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","examples":["1080.00"]},"calculation_mode":{"type":"string","enum":["standard","invoiceplane"]},"discount_amount":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","examples":["1080.00"]},"discount_percent":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","examples":["1080.00"]},"subtotal":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","examples":["1080.00"]},"item_discount_total":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","examples":["1080.00"]},"discount_total":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","examples":["1080.00"]},"item_tax_total":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","examples":["1080.00"]},"tax_total":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","examples":["1080.00"]},"total":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","examples":["1080.00"]},"paid":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","examples":["1080.00"]},"balance":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","examples":["1080.00"]},"terms":{"type":["string","null"]},"footer":{"type":["string","null"]},"private_notes":{"type":["string","null"]},"is_read_only":{"type":"boolean"},"public_url":{"type":["string","null"],"format":"uri"},"void_reason":{"type":["string","null"]},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":["integer","null"],"description":"An existing line's id to keep it; omit for a new line."},"product_id":{"type":["integer","null"]},"tax_rate_id":{"type":["integer","null"]},"name":{"type":"string"},"description":{"type":["string","null"]},"quantity":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","examples":["1080.00"]},"unit_name":{"type":["string","null"]},"price":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","examples":["1080.00"]},"discount_amount":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?$"},"tax_name":{"type":["string","null"]},"tax_percent":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","examples":["1080.00"]},"subtotal":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","examples":["1080.00"]},"discount_total":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","examples":["1080.00"]},"tax_total":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","examples":["1080.00"]},"total":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","examples":["1080.00"]}}}},"tax_rates":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"tax_rate_id":{"type":["integer","null"]},"name":{"type":"string"},"percent":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","examples":["1080.00"]},"include_item_tax":{"type":"boolean"},"amount":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","examples":["1080.00"]}}}},"sent_at":{"type":["string","null"],"format":"date-time"},"viewed_at":{"type":["string","null"],"format":"date-time"},"paid_at":{"type":["string","null"],"format":"date-time"},"voided_at":{"type":["string","null"],"format":"date-time"},"custom_fields":{"type":"object","description":"Custom field values keyed by field id: text, true\/false, an option id, or a list of option ids. Leave out to keep them.","additionalProperties":{"oneOf":[{"type":"string"},{"type":"boolean"},{"type":"array","items":{"type":"string"}}]}},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"}}},"InvoiceInput":{"type":"object","required":["client_id"],"properties":{"client_id":{"type":"integer"},"number":{"type":["string","null"],"description":"Leave out to number it from the default sequence."},"number_sequence_id":{"type":["integer","null"]},"issue_date":{"type":"string","format":"date","description":"Default today."},"due_date":{"type":"string","format":"date","description":"Default from the payment terms."},"currency":{"type":["string","null"],"description":"ISO 4217; default the currency of the client, else of the company."},"exchange_rate":{"type":["string","null"],"description":"To the company currency; default the rate known for the issue date."},"discount_amount":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?$"},"discount_percent":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?$"},"terms":{"type":["string","null"]},"footer":{"type":["string","null"]},"private_notes":{"type":["string","null"]},"custom_fields":{"type":"object","description":"Custom field values keyed by field id: text, true\/false, an option id, or a list of option ids. Leave out to keep them.","additionalProperties":{"oneOf":[{"type":"string"},{"type":"boolean"},{"type":"array","items":{"type":"string"}}]}},"items":{"type":"array","maxItems":200,"items":{"$ref":"#\/components\/schemas\/InvoiceLine"}},"tax_rates":{"type":"array","maxItems":5,"items":{"type":"object","required":["tax_rate_id"],"properties":{"id":{"type":["integer","null"]},"tax_rate_id":{"type":"integer"},"include_item_tax":{"type":"boolean"}}}}}},"VoidInput":{"type":"object","properties":{"reason":{"type":["string","null"]}}},"Payment":{"type":"object","properties":{"id":{"type":"integer"},"object":{"const":"payment"},"type":{"type":"string","enum":["payment","refund","credit"]},"status":{"type":"string","enum":["pending","completed","failed"]},"client_id":{"type":"integer"},"invoice_id":{"type":["integer","null"]},"amount":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","examples":["1080.00"]},"currency":{"type":"string"},"paid_on":{"type":"string","format":"date"},"payment_method_id":{"type":["integer","null"]},"payment_method":{"type":["string","null"]},"reference":{"type":["string","null"]},"gateway_reference":{"type":["string","null"]},"note":{"type":["string","null"]},"refund_of_id":{"type":["integer","null"]},"custom_fields":{"type":"object","description":"Custom field values keyed by field id: text, true\/false, an option id, or a list of option ids. Leave out to keep them.","additionalProperties":{"oneOf":[{"type":"string"},{"type":"boolean"},{"type":"array","items":{"type":"string"}}]}},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"}}},"PaymentInput":{"type":"object","required":["client_id","amount","paid_on"],"properties":{"client_id":{"type":"integer"},"invoice_id":{"type":["integer","null"],"description":"Leave out to hold the money as credit on account."},"amount":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","examples":["1080.00"]},"paid_on":{"type":"string","format":"date"},"payment_method_id":{"type":["integer","null"]},"reference":{"type":["string","null"]},"note":{"type":["string","null"]},"send_receipt":{"type":"boolean"},"custom_fields":{"type":"object","description":"Custom field values keyed by field id: text, true\/false, an option id, or a list of option ids. Leave out to keep them.","additionalProperties":{"oneOf":[{"type":"string"},{"type":"boolean"},{"type":"array","items":{"type":"string"}}]}}}},"PaymentUpdate":{"type":"object","properties":{"amount":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","examples":["1080.00"]},"paid_on":{"type":"string","format":"date"},"payment_method_id":{"type":["integer","null"]},"reference":{"type":["string","null"]},"note":{"type":["string","null"]},"custom_fields":{"type":"object","description":"Custom field values keyed by field id: text, true\/false, an option id, or a list of option ids. Leave out to keep them.","additionalProperties":{"oneOf":[{"type":"string"},{"type":"boolean"},{"type":"array","items":{"type":"string"}}]}}}},"Product":{"type":"object","properties":{"id":{"type":"integer"},"object":{"const":"product"},"sku":{"type":["string","null"]},"name":{"type":"string"},"description":{"type":["string","null"]},"price":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","examples":["1080.00"]},"purchase_price":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?$"},"product_family_id":{"type":["integer","null"]},"unit_id":{"type":["integer","null"]},"tax_rate_id":{"type":["integer","null"]},"provider_name":{"type":["string","null"]},"is_active":{"type":"boolean"},"custom_fields":{"type":"object","description":"Custom field values keyed by field id: text, true\/false, an option id, or a list of option ids. Leave out to keep them.","additionalProperties":{"oneOf":[{"type":"string"},{"type":"boolean"},{"type":"array","items":{"type":"string"}}]}},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"}}},"ProductInput":{"type":"object","required":["name","price"],"properties":{"sku":{"type":["string","null"]},"name":{"type":"string"},"description":{"type":["string","null"]},"price":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","examples":["1080.00"]},"purchase_price":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?$"},"product_family_id":{"type":["integer","null"]},"unit_id":{"type":["integer","null"]},"tax_rate_id":{"type":["integer","null"]},"provider_name":{"type":["string","null"]},"is_active":{"type":"boolean"},"custom_fields":{"type":"object","description":"Custom field values keyed by field id: text, true\/false, an option id, or a list of option ids. Leave out to keep them.","additionalProperties":{"oneOf":[{"type":"string"},{"type":"boolean"},{"type":"array","items":{"type":"string"}}]}}}},"Expense":{"type":"object","properties":{"id":{"type":"integer"},"object":{"const":"expense"},"spent_on":{"type":"string","format":"date"},"supplier":{"type":["string","null"]},"description":{"type":"string"},"expense_category_id":{"type":["integer","null"]},"category":{"type":["string","null"]},"reference":{"type":["string","null"]},"payment_method_id":{"type":["integer","null"]},"currency":{"type":"string"},"exchange_rate":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","examples":["1080.00"]},"net_amount":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","examples":["1080.00"]},"tax_amount":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","examples":["1080.00"]},"total":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","examples":["1080.00"]},"tax_rate_id":{"type":["integer","null"]},"is_billable":{"type":"boolean"},"billing_status":{"type":"string","enum":["not_billable","to_bill","billed"]},"client_id":{"type":["integer","null"]},"project_id":{"type":["integer","null"]},"invoice_id":{"type":["integer","null"]},"notes":{"type":["string","null"]},"custom_fields":{"type":"object","description":"Custom field values keyed by field id: text, true\/false, an option id, or a list of option ids. Leave out to keep them.","additionalProperties":{"oneOf":[{"type":"string"},{"type":"boolean"},{"type":"array","items":{"type":"string"}}]}},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"}}},"ExpenseInput":{"type":"object","required":["spent_on","description","currency","amount"],"properties":{"spent_on":{"type":"string","format":"date"},"supplier":{"type":["string","null"]},"description":{"type":"string"},"expense_category_id":{"type":["integer","null"]},"reference":{"type":["string","null"]},"payment_method_id":{"type":["integer","null"]},"currency":{"type":"string"},"exchange_rate":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d+)?$"},"amount":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","examples":["1080.00"]},"amount_includes_tax":{"type":"boolean","description":"Whether amount includes VAT."},"tax_rate_id":{"type":["integer","null"]},"tax_amount":{"type":["string","null"],"description":"VAT on the receipt, when it differs from the rate."},"is_billable":{"type":"boolean"},"client_id":{"type":["integer","null"]},"project_id":{"type":["integer","null"]},"notes":{"type":["string","null"]},"custom_fields":{"type":"object","description":"Custom field values keyed by field id: text, true\/false, an option id, or a list of option ids. Leave out to keep them.","additionalProperties":{"oneOf":[{"type":"string"},{"type":"boolean"},{"type":"array","items":{"type":"string"}}]}}}},"TaxRate":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"percent":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","examples":["1080.00"]},"is_default":{"type":"boolean"},"is_active":{"type":"boolean"}}},"PaymentMethod":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"is_active":{"type":"boolean"}}},"ExpenseCategory":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"nominal_code":{"type":["string","null"]},"is_active":{"type":"boolean"}}},"Deleted":{"type":"object","properties":{"id":{"type":"integer"},"object":{"type":"string"}}}}}}