The Invoices endpoint supports GET, PUT and POST.

The purpose is to allow you to access invoice details from Streamtime and also create new invoices. You could use the Invoices endpoint to build an interface with an accounting package, or to access invoice figures for reporting purposes.

The fields available as criteria in the API Previewer when utilising the Invoices endpoint for a GET are - 

Invoice UID: the primary key of the invoice and never the same as the invoice number. It is not visible in the Streamtime interface.

Invoice Number: this is the invoice number as it appears in Streamtime.

Order Number: this is the order number as supplied by the client on the job although it can be different to the job order number. 

Invoice Status: can be viewed when doing a GET and can be added. A list of available statuses (from Setup - System Setup - Invoices - Defaults - Invoice Status Value List) is not available as a GET from the Streamtime database using the API so this would need to be hard coded into any invoice builder/updater interface developed.

Job UID: the UID of the job, not the job number.

Job Name: job name as it appears in Streamtime.

Job Summary: is the related job number, job name and client name

Client UID: is the Client Unique Identifier and can be accessed using the Contacts endpoint GET.

Client Name: is the Client company name as it appears in Streamtime.

Account Manager: is the client manager as visible on the Streamtime interface. This a Streamtime user. A list of Streamtime users are not available as a GET so when creating a job you would ideally leave this blank and assign through the Streamtime interface or hard code.

Notes: invoice notes field which is visible in the invoice detail view of Streamtime.

To see some simple example PHP code for interfacing with the Streamtime API click here.

There is no minimum requirements when creating an invoice. A UID, date invoiced, due date and exchange rate will be set when you create an invoice with no criteria in. The Invoice number will need to be added by hitting the plus button beside the invoice number.

The full list of fields returned when doing a GET are -

'UID'				// Unique ID for Invoice (read-only)
'InvoiceNumber' // Displayed Invoice number
'DateInvoiced' // Invoice Created (Date)
'DateInvoiceDue' // Invoice Due (Date)
'OrderNumber' // Client PO
'JobUID' // Unique ID for Related Job
'JobNumber' // Related Job Number (read-only)
'JobSummary' // Related Job Number, Job name, Client Name (read-only)
'AccountManagerName' // Name of Client Manager for related Job (read only)
'InvoiceLock' // Lock this invoice ("Yes" to lock, "No" or "")
'InvoiceStatus' // Status
'Branch' // Branch Code
'BranchName' // Branch Name from branch (read-only)
'Currency' // Currency from branch (read-only)
'CurrencySymbol' // Currency Symbol from branch (read-only)
'ExchangeRate' // Currency conversion rate (read-only)
'Terms' // Payment Terms (lookup from client payment terms)(read only)
'PaymentDate' // Date Paid (Date)
'PaymentAmount' // Amount paid (auto sets PaymentInFull and vice versa)
'PaymentInFull' // Due amount paid in full ("Yes" for paid, "No" or "")
'PaymentRef' // Reference number for payment if applicable
'TotalExcTax' // Total amount due exc. Tax (read only)
'TotalTax' // Total Tax due (read only)
'TotalIncGST' // Total amount due inc. Tax (read only)
'Notes' // Internal notes for invoice
'InvoiceHeader' // Invoice header appearing above invoice lines
'Footer' // Invoice footer appearing below invoice lines
'EmailInvoiceTo' // Recipient of emailed invoice
'EmailInvoiceCC' // CC recipients of emailed invoice
'EmailInvoiceBCC' // BCC recipients of emailed invoice
'EmailInvoiceSubject' // Email subject of invoice
'EmailInvoiceBody' // Email body of invoice
'ClientUID' // UID of client contact to invoice (read only)
'ClientName' // Name of Client to invoice (read-only)
'ContactName' // Contact Name of Client to invoice
'ContactEmail' // Contact Email of Client to invoice
'ClientAddress1' // Address 1 of Client to invoice
'ClientAddress2' // Address 2 of Client to invoice
'ClientAddress3' // Address 3 of Client to invoice
'ClientAddressCity' // Address City of Client to invoice
'ClientAddressPCode' // Address City PCode of Client to invoice
'ClientAddressState' // Address State State of Client to invoice
'ClientAddressCountry'          // Address Country State of Client to invoice

INVOICE_LINES (returned with the above)

'UID'
'InvoiceUID'
'JobUID'
'JobNumber'
'ItemLetter'
'Category'
'Material'
'Description'
'Quantity'
'TotalExcGST'
'TotalGST'
'TaxCode'
'TotalIncGST'

Fields marked (read only) cannot be manipulated using PUT or POST operations, the values for these fields are calculated automatically within the Streamtime database.
Did this answer your question?