ServiceInvoice Resource
Service Quotes/Invoices Module
Service invoices and quotes billing documents. Normally 1-to-1 with a Service (service_id set); may be batch invoices (services point at invoice_id, standalone_num set) or freeform invoices (is_freeform). Supports /report aggregate total_revenue (sum of pretax_total). Filter is_quote when you need invoices only vs quotes. Create with save; save-batch updates only.
| Endpoints | URI | Access Control | Description |
|---|---|---|---|
| find | GET /api/ServiceInvoice/find |
Admin or Module READ | |
| save | POST /api/ServiceInvoice/save |
Admin or Module WRITE | |
| save-batch | POST /api/ServiceInvoice/save-batch |
Admin or Module WRITE | |
| delete | POST /api/ServiceInvoice/delete |
Admin or Module WRITE | |
| get-attached-files | GET /api/ServiceInvoice/get-attached-files |
Endpoint level permissions | Returns filtered collection of Service files that have been attached to the invoice if $input['type'] == 'zip', then zip archive will be force downloaded |
| send | POST /api/ServiceInvoice/send |
Endpoint level permissions | |
GET /api/ServiceInvoice/pdf |
Authentication only | ||
| view-pdf | GET /api/ServiceInvoice/view-pdf |
Open | Does the same thing as /pdf, but also logs the request in the invoice field 'seen_json' and is an open endpoint Requires a new field 'log' that represents the email slug. |
| get | GET /api/ServiceInvoice/get |
Admin or Module READ | |
| report | GET /api/ServiceInvoice/report |
Endpoint level permissions |
Server-side aggregates over filtered rows (same-table filters only). Response
|
| payment | POST /api/ServiceInvoice/payment |
Endpoint level permissions | |
| partial-payment | POST /api/ServiceInvoice/partial-payment |
Endpoint level permissions | |
| setDueDateFromTerms | GET /api/ServiceInvoice/setDueDateFromTerms |
Endpoint level permissions |
| Property | Type | Description |
|---|---|---|
id |
number | |
slug |
string | |
service_id |
number | |
service_contract_id |
number | |
standalone_num |
number | |
manual_invoice_number |
string | |
is_freeform |
boolean | |
customer_id |
number | |
work_completed_description |
string | |
internal_notes |
string | |
grand_total |
number | |
untaxed_total |
number | |
amount_due |
number | |
last_issued |
datetime | |
last_emailed |
datetime | |
is_portal_document |
boolean | |
is_processed |
boolean | |
is_paid |
boolean | |
amount_paid |
number | |
is_revised |
boolean | |
date_first_issued |
datetime | |
issue_date |
date | |
due_date |
date | |
payment_terms |
number | |
attn |
string | |
customer_notes |
string | |
bottom_text |
string | |
finalized |
boolean | |
applied_sales_tax_json |
string | Sales tax lines applied to this invoice as JSON (tax names, rates, amounts). Complements scalar tax totals on the invoice. |
quote_labour_total |
number | |
pretax_total |
number | |
taxable_total |
number | |
submitted_log_json |
string | |
seen_log_json |
string | |
editing_log_json |
string | |
payments_json |
string | Payment history / payment entries recorded against this invoice as JSON. Prefer structured payment endpoints when mutating; this field is the stored payment log used by the UI. |
attached_files_json |
string | |
attached_wo_summaries_json |
string | |
qbo_id |
number | |
qbo_id_history_json |
string | |
exchange_rate |
number | |
is_quote |
boolean | |
is_change_quote |
boolean | |
quote_rejected |
boolean | |
quote_status |
string | |
quote_followup_date |
date | |
settings_override_json |
string | Invoice/quote document settings for this billing document (sections shown, tax behaviour, etc.). JSON object that can override customer |
message_thread_id |
number | |
created_at |
datetime | |
updated_at |
datetime | |
updated_by |
number |
| Setting | |
|---|---|
Pagination Limit (when page parameter is set) |
50 per page |
| Default Sort Order |
due_date ASC |
| Related Resource | Key | Relationship to ServiceInvoice | Property |
|---|---|---|---|
| Service | service_id |
Belongs To | Service |
| Service | invoice_id |
Owns Many | GroupServices |
| ServiceContract | service_contract_id |
Belongs To | ServiceContract |
| ServiceInvoiceObject | invoice_id |
Owns Many | ServiceInvoiceObject |
| MessageThread | message_thread_id |
Belongs To | MessageThread |
| Contact | customer_id |
Belongs To | Customer |