API credentials define access to the data so that one can access either only PAID invoices, only UNPAID invoices, or both. When requesting access from Autopay, the operator should specify what kind of access is needed.
GET - Get invoices
This service allows you to retrieve all invoices within a period. An invoice can have multiple invoice items that are linked to parking sessions by the same vehicle or client.
Endpoint
GET https://api.autopay.io/accounting/v1/invoices
Request parameters
Path parameters must include a date interval.
Request parameters must be URL encoded.
Data is not propagated to the Accounting API in real-time; therefore, all the queries should be delayed as well and not made in real-time.
The request path must include a date interval, either for invoice date (parameters "invoice_date_from" and "invoice_date_to") or time on which the data was registered/updated in the Accounting API (parameters "from" and "to"). Accounting API features two sets of date parameters to query invoices and sales from the API to allow covering different use cases on how to acquire data from the API. Parameters "from" and "to" allow to query data based on the time the data became available or updated in the API. These parameters will enable acquiring data continuously and get all the new data that comes available. Parameters "invoice_date_from" and "invoice_date_to" will allow acquiring data for a specific timeframe (e.g., all invoices from March 2019). IMPORTANT: Both date intervals cannot be used at once!
When making multiple or recurring requests to the API it is recommended to use the exact to or invoice_date_to parameter from the previous request as from or invoice_date_from to prevent any data loss.
Parameter
Type
Mandatory
Description
from
datetime (ISO 8601)
no
Beginning of the query period for a request to get data based on the time the data was updated in the API, e.g. 2016-02-02T12:15:00+0200 (URL encoded: 2016-02-02T12:15:00%2B0200).
to
datetime (ISO 8601)
no
End of the query period for a request to get data based on the time the data was updated in the API, e.g. 2017-02-02T12:15:00+0200 (URL encoded: 2017-02-02T12:15:00%2B0200).
invoice_date_from
datetime (ISO 8601)
no
Beginning of the query period for a request to get data based on the invoice date, e.g. 2017-02-02T12:15:00+0200 (URL encoded: 2017-02-02T12:15:00%2B0200).
invoice_date_to
datetime (ISO 8601)
no
End of the query period for a request to get data based on the invoice date, e.g. 2017-02-02T12:15:00+0200 (URL encoded: 2017-02-02T12:15:00%2B0200).
status
string
no
Invoice status. Supported values: PAID, UNPAID
cursor
string
no
Use the cursor string returned with response to get the next set of results.
Client ID is a unique ID for the specific client. The client ID comes either from the owner lookup service provider or is generated by the Autopay system based on the client data.