Following OData Query gives you all invoices that are not paid and overdue (Due Date has been reached). The datetime provided has to be the current date and time.
When filtering on enum types it requires you to refer to the actual state. For example PaymentStatus on the Invoice-object requires you search for 'NotPaid' and not the enum of 0.
https://api.upodi.io/v2/invoices/?$filter=PaymentStatus eq 'NotPaid' and DueDate le datetime'2018-11-30T00:00:00'
curl
-H "Content-Type: application/json"
-H "Authorization: Bearer <base64 key>"
https://api.upodi.io/v2/invoices?$expand=InvoiceLines&$filter=CustomerID eq guid'aaaef347-1f57-4b1c-9528-57763e307c63'