ServiceInvoice
Resource
Service Quotes/Invoices
Module
A ServiceInvoice
record is normally attached to a Service
record with a 1-to-1 relationship. In this case the service_id
field will be set. It can also contain a collection of Service
records, known as a batch invoice, in which case the invoice_id
field on the Service
record will be set, and the standalone_num
field will be set on the invoice (as normally an invoice derives its number from the service job, but in the case of a batch invoice, that can't happen). Finally a third possibility is a freeform invoice, which is an invoice not attached to any number of services. This will be identifiable by the is_freeform
field. Freeform invoices also have the standalone_num
field set.
Endpoints | URI | Access Control | Description |
---|---|---|---|
change-quote-status | POST /api/ServiceInvoice/change-quote-status |
Authentication only |
Toggles the status of a quote. Also accessible by the
customer of the quote (if environment is set to 'customer')
Parameters:
|
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 | |
get-estimated-drive-time | GET /api/ServiceInvoice/get-estimated-drive-time |
Endpoint level permissions | |
notify-customer-eta | GET /api/ServiceInvoice/notify-customer-eta |
Endpoint level permissions | |
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 | |
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 | |
attached_files_json |
string | |
attached_wo_summaries_json |
string | |
qbo_id |
number | |
qbo_id_history_json |
string | |
is_quote |
boolean | |
is_change_quote |
boolean | |
quote_rejected |
boolean | |
quote_status |
string | |
quote_followup_date |
date | |
settings_override_json |
string | |
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 |