Retrieve a list of invoices

Retrieve a list of invoices

Securityapi_key or session_token
Request
query Parameters
companyId
string (HashedId) <= 128 characters /^\w+$/

Retrieve a list of invoices per company. Note that most users will have access to only one (their own) company and typically only SuperAdmins will be able to access invoices from multiple companies. paidState is optional with companyId and defaults to 'NA'

locationId
string (HashedId) <= 128 characters /^\w+$/

Get a list of invoices filtered by location

paidState
string (PaidStateEnum)
Default: ""

companyId is required with paidState. If no companyId is provided the default is the default from UserInfo if available. Providing paidState without a companyId will return a BadRequestError

Enum: "" "Paid" "Unpaid" "NA"
invoiceids
Array of strings (HashedId) <= 20 items
fromcreated
string <date-time> (DateTime)

A timestamp of last modification of the entry.

Example: fromcreated=2020-07-21 17:32:28Z
tocreated
string <date-time> (DateTime)

A timestamp of last modification of the entry.

Example: tocreated=2020-07-21 17:32:28Z
archived
boolean
departmentid
string (HashedId) <= 128 characters /^\w+$/
excludeauthorized
boolean
fromauth
string <date-time> (DateTime)

A timestamp of last modification of the entry.

Example: fromauth=2020-07-21 17:32:28Z
fromdel
string <date-time> (DateTime)

A timestamp of last modification of the entry.

Example: fromdel=2020-07-21 17:32:28Z
fromsentdate
string <date-time> (DateTime)

A timestamp of last modification of the entry.

Example: fromsentdate=2020-07-21 17:32:28Z
ignoreLimit
boolean

The default DefaultPageSize is 20. The original idea was this: Ignore the 'limit' and return 20 items. However, the way this is implemented in the backend is this: if (limit or offset or ignoreLimit) { if limit > 0 { // A specific value between 1 and 20 inclusive retrieves that many items if limit <= DefaultPageSize { retrieve(limit) } else { retrieve(DefaultPageSize) } } else if ignoreLimit == false { retrieve(DefaultPageSize) } } else { retrieve(DefaultPageSize) }

This makes ignoreLimit semantics basically useless in that it is only considered if limit==0 and then it is the same as limit=DefaultPageSize!

Recommendation: NEVER use ignoreLimit. Only use offset and limit.

In v2 of the API ignoreLimit will be silently ignored and have no effect on results whatsoever.

includeregular
boolean
includevoided
boolean
initialinvoicetypes
Array of strings (InvoiceType) <= 64 items
Items Enum: "" "cash" "check" "paycode" "card" "remotecheckout" "directbill" "hostbill" "ach" "batch" "fuelcard"
invoicestatuses
Array of strings (InvoiceStatus) <= 16 items
Items Enum: "" "unknown" "new" "processing" "completed" "failed" "waitingapproval" "pendingreview" "sent"
invoicetypes
Array of strings (InvoiceType) <= 16 items
Items Enum: "" "cash" "check" "paycode" "card" "remotecheckout" "directbill" "hostbill" "ach" "batch" "fuelcard"
limit
integer <int64> (Count) [ 0 .. 999999999 ]

Upper limit for number of items to return. A number >= 1 and <= 20. Default: 20

locationids
Array of strings (HashedId) <= 16 items
offset
integer <int64> (Count) [ 0 .. 999999999 ]

The offset of the requested page of "limit" items to retrieve. If there are 50 invoices and "limit" is not provided then items 0 through 19 will be returned by default. If "offset" is 10, then items 11 through will be returned.

search
string <= 2048 characters /^.*$/
shiftid
string (HashedId) <= 128 characters /^\w+$/
toauth
string <date-time> (DateTime)

A timestamp of last modification of the entry.

Example: toauth=2020-07-21 17:32:28Z
todel
string <date-time> (DateTime)

A timestamp of last modification of the entry.

Example: todel=2020-07-21 17:32:28Z
tosentdate
string <date-time> (DateTime)

A timestamp of last modification of the entry.

Example: tosentdate=2020-07-21 17:32:28Z
timeout
number <float> [ 1 .. 29 ]
Default: 19

Timeout in seconds for searching for invoices that meet the criteria. If the search exceeds this limit a Continuation response will be sent and optionally (if asyncResult == true and asynchronous results are availble) an asyncronous result set token.

asyncResult
boolean
Default: true

Turn on/off the asynchronous result set for this request if the timeout time is exceeded during the execution of this search.

searchStart
number <int64> >= 0
Default: 0

Optionally indicate on subsequent search request (typically with the same filters) where the search in the master list of invoices should be resumed.

resultToken
string <= 256 characters /^.*$/

Optionally indicate on subsequent search request (typically with the same filters) where the search in the master list of invoices should be resumed.

Responses
200

An invoice list response

401

API key is missing or invalid

403

Request is completely forbidden. API not provided or method and or endpoint not supported

404

404 Not found

429

429 too many requests response

500

Service Error

default

unexpected error response

get/invoice/list
Request samples
Response samples
application/json
{
  • "code": "Success",
  • "message": "string",
  • "continuation": {
    },
  • "invoice_list": [
    ],
  • "paging": {
    },
  • "parameters": { },
  • "result_token": "string",
  • "stats": { }
}
Copyright © RoadSync 2023. All right reserved.