To read invoice payment due dates the technical user needs the permission Invoices → Read. Roles are assigned as in How to create a role and a user; the technical user and the key are in Technical users and API keys: connecting an integration. Filters, paging and sorting work as in REST API.
The endpoint to get invoice payment due dates is the following:
/rest/v1/invoicePayment
Filtering only the payments still to be paid
To filter the payments still outstanding you can make a call like the following:
https://my.blueshell.it/rest/v1/invoicePayment?filter=[{"property":"date","value":"2021-01-01","operator":">="},{"property":"paid","value":"0","operator":"="},{"property":"transaction_id","value":null,"operator":"="}]&limit=100Inside the filter parameter you put a JSON array with the fields to filter on.
In detail, the fields that can help you filter the due dates are:
date: the deadline of the payment due date; you can filter the due dates before or after a certain date using the operators >= and <=.paid: whether the due date has already been settled or not; if it is 0 the due date is still to be paid, while if it is 1 it has already been settled; you will usually want to filter the due dates where paid = 0.transaction_id: the ID of the transaction (the accounting entry) linked to this due date; if it is NULL there is no transaction linked; here too it is best to filter the due dates where transaction_id = NULL.
