Invoice Schema
Schemas
InvoiceHeader
The core invoice object used for both standard and recurring invoices.
| Property | Type | Description |
|---|---|---|
id | integer | Invoice ID |
client_id | integer | Associated client ID |
client_name | string | Client display name |
sitenumber | integer | Site ID |
site_name | string | Site display name |
invoicenumber | string | Invoice number |
thirdpartyinvoicenumber | string | Third-party system invoice number |
posted | boolean | Whether the invoice has been posted to accounting |
invoice_date | datetime | Invoice date |
duedate | datetime | Payment due date |
schedule_date | datetime | Scheduled invoice date |
dateposted | datetime | Date posted to accounting |
last_modified | datetime | Last modification timestamp |
invoice_type_code | string | Invoice type code |
invoicetype | integer | Invoice type ID |
paymentstatus | integer | Payment status code |
amountpaid | number | Total amount paid |
amountdue | number | Total amount due |
amount_remaining | number | Remaining balance |
total | number | Invoice total (read-only) |
tax_total | number | Total tax amount |
revenue | number | Revenue amount |
currency | string | Currency symbol |
currency_code | integer | Currency code ID |
currency_conversion_rate | number | Conversion rate to base currency |
contract_id | integer | Associated contract ID |
contract_ref | string | Contract reference |
ticket_id | integer | Associated ticket ID |
salesorder_id | integer | Associated sales order ID |
purchaseorder_id | integer | Associated purchase order ID |
recurring_invoice_id | integer | Associated recurring invoice template ID |
is_recurring_invoice | boolean | Whether this is a recurring invoice template |
schedule_id | integer | Schedule ID for recurring creation |
period | integer | Billing period |
period_type | integer | Period type code |
nextcreationdate | datetime | Next date a recurring invoice will be created |
lastcreated | datetime | Date recurring invoice was last created |
paymentterms | integer | Payment terms code |
datepaid | datetime | Date payment was received |
datesent | datetime | Date invoice was sent |
approval_status | integer | Approval status code |
voided | boolean | Whether the invoice has been voided |
reference | string | Invoice reference |
notes_1 / notes_2 / notes_3 | string | Invoice notes fields |
internal_note | string | Internal-only note |
order_number | string | Order number |
cust_order_number | string | Customer order/PO number |
payment_ref | string | Payment reference |
take_auto_payment | boolean | Whether to auto-charge payment on due date |
include_in_autopay | boolean | Include in automatic payment run |
billingcategory | integer | Billing category ID |
lines | array[InvoiceDetail] | Invoice line items |
payments | array[InvoicePayment_List] | Payment records against this invoice |
customfields | array[CustomField] | Custom field values |
invoice_totals | object | Totals breakdown object |
xeroid / qboid / kashflowid | string/integer | Third-party accounting system IDs |
credit_total | number | Total credit note value |
credit_outstanding | number | Outstanding credit |
credit_used | number | Credit already applied |
InvoiceHeader_View
Paginated list response wrapper for invoice list endpoints.
| Property | Type | Description |
|---|---|---|
page_no | integer | Current page number |
page_size | integer | Page size |
record_count | integer | Total record count |
invoices | array[InvoiceHeader] | Invoice records |
stripe_payment_method_id | string | Default Stripe payment method ID for the client |
stripe_payment_method_name | string | Stripe payment method display name |
stripe_customer_id | string | Stripe customer ID |
columns | array | View column configuration |
InvoiceDetail
A line item on an invoice or recurring invoice template.
| Property | Type | Description |
|---|---|---|
id | integer | Line item ID |
ihid | integer | Parent invoice header ID |
item_code | string | Item/product code |
item_shortdescription | string | Short description |
item_longdescription | string | Long description |
nominal_code | string | Nominal/GL account code |
tax_code | string | Tax code |
qty_order | number | Quantity |
unit_price | number | Unit price |
net_amount | number | Net line amount |
tax_amount | number | Tax amount |
tax_rate | number | Tax rate percentage |
unit_cost | number | Unit cost price |
discount_perc | number | Discount percentage |
asset_id | integer | Linked asset ID |
contract_id | integer | Linked contract ID |
ticket_id | integer | Linked ticket ID |
recurring_invoice_id | integer | Linked recurring invoice ID |
is_meter | boolean | Whether line is a meter-based charge |
period_type | integer | Billing period type |
startdate / enddate | datetime | Line coverage period |
prorata_next_invoice | boolean | Whether to pro-rate on next invoice |
onetimecharge | boolean | Whether this is a one-time charge on a recurring invoice |
isinactive | boolean | Whether the line is inactive |
net_total | number | Net total (read-only) |
total_tax | number | Total tax amount |
total_price | number | Total price including tax |
customfields | array[CustomField] | Custom field values |
InvoicePayment_List
A payment record applied against an invoice.
| Property | Type | Description |
|---|---|---|
id | integer | Payment record ID |
invoice_id | integer | Invoice this payment is applied to |
date | datetime | Payment date |
amount | number | Payment amount |
method | integer | Payment method code |
status | integer | Payment status code |
type | integer | Payment type code |
intent_id | string | Payment gateway intent ID (e.g. Stripe PaymentIntent ID) |
intent_date | datetime | Date the payment intent was created |
intent_response | string | Raw response from payment gateway |
webhook_payload | string | Webhook payload that triggered the payment record |
webhook_received_date | datetime | Date/time the webhook was received |
client_id | integer | Client ID |
client_name | string | Client display name |
reference | string | Payment reference |
payment_method | integer | Payment method ID |
payment_method_name | string | Payment method display name |
credit_note_id | integer | Linked credit note ID |
thirdpartyid | string | Third-party payment system ID |
posted | boolean | Whether payment has been posted to accounting |
dateposted | datetime | Date posted to accounting |
xero_id / qbo_id / myob_id | string/integer | Accounting integration IDs |
InvoiceChange
An audit record for a change made to an invoice.
| Property | Type | Description |
|---|---|---|
id | integer | Change record ID |
invoice_id | integer | Invoice that was changed |
field_id | integer | ID of the changed field |
field_name | string | Name of the changed field |
old_value | string | Value before the change |
new_value | string | Value after the change |
who | string | User who made the change |
datetime | datetime | Timestamp of the change |
invoice_line_id | integer | Affected invoice line ID (if applicable) |
type_id | integer | Change type ID |
Tax
A tax rate record.
| Property | Type | Description |
|---|---|---|
id | integer | Tax rate ID |
name | string | Tax rate name |
code | string | Tax code |
value | number | Tax percentage value |
is_composite | boolean | Whether this is a composite (combined) tax rate |
linked_rates | array[Tax] | Component rates for composite taxes |
xero_tenant_id / kashflow_tenant_id / qbo_company_id | string/integer | Accounting integration tenant IDs |
category_code | string | Tax category code |
TaxRule
A rule that determines which tax applies based on conditions.
| Property | Type | Description |
|---|---|---|
id | integer | Rule ID |
name | string | Rule name |
taxid | integer | Applied tax rate ID |
sequence | integer | Evaluation sequence order |
tax_name | string | Tax rate name |
tax_conditions | array[TaxRuleConditions] | Conditions that trigger this rule |
Currency
A currency definition.
| Property | Type | Description |
|---|---|---|
id | integer | Currency ID |
name | string | Currency name |
symbol | string | Currency symbol (e.g. $) |
code | string | ISO currency code (e.g. USD) |
conversion_rate | number | Conversion rate relative to base currency |
last_updated | datetime | When the rate was last updated |
history | array[CurrencyHistory] | Historical rate records |
Costcentres
A cost centre for financial categorization.
| Property | Type | Description |
|---|---|---|
id | integer | Cost centre ID |
name | string | Cost centre name |
chargeable | boolean | Whether this cost centre is chargeable |
addr1–addr4 | string | Address fields |
Expense
An expense record linked to a ticket or action.
| Property | Type | Description |
|---|---|---|
id | integer | Expense ID |
agent_id | integer | Agent who incurred the expense |
fault_id | integer | Linked ticket ID |
actionnumber | integer | Linked action number on the ticket |
description | string | Expense description |
amount | number | Expense amount |
date_added | datetime | Date recorded |
date_reimbursed | datetime | Date reimbursed |
date_invoiced | datetime | Date added to an invoice |
invoiceable | boolean | Whether the expense can be invoiced to a client |
ihid | integer | Invoice header ID if invoiced |
client_id | integer | Client to invoice |
site_id | integer | Associated site |
reviewed | boolean | Whether the expense has been reviewed |
customfields | array[CustomField] | Custom field values |