_list
Returns a list of invoice details
Parameters
all of these parameters are optional
fields
JSON-encoded list of fields you want returned along with the default 'id' field. Accepted fields are 'num', 'cdate', 'customer_id', 'customer_type', 'last_edited', 'status'
open
If set, this filters the invoices to those that with statuses -1=Draft, 0=Quoted, 1=Invoiced
status
Integer. Only invoices with this status will be returned
customer_type, customer_id
Integers. If both of hese are set, then invoices with the specified customer type and ID will be returned
days_from
Integer. Invoices created in the last $days_from days will be returned
days_to
Integer. Invoices created up to %days_to days from now will be returned
last_edited_from
Integer timestamp. Invoices edited from this time on will be returned
last_edited_to
Integer timestamp. Invoices edited up to this time will be returned. NOTE: if using this for synchronising purposes, it is best to use a timestamp a few seconds into the past, to make sure you don't miss any updates that happen in the very second you make your request.
ids
JSON-encoded list of IDs to return
Example
FM_api('Invoices_list', [
'fields'=> '["cdate","last_edited","status"]',
'last_edited_from'=> '1611316345',
'last_edited_to', '1611316473',
'status'=> '3',
]);
On Success
[{"id":"698362","cdate":"2021-01-22","last_edited":"1611316345","status":"3"},{"id":"698363","cdate":"2021-01-22","last_edited":"1611316345","status":"3"}]
Last updated