getAccountStatements

Retrieve all customers who have a non-zero balance (who have unpaid invoices, prepayments, store credit etc.). For each customer, API returns a link to PDF payment reminder document, and also links to all unpaid invoices in PDF format.

NB! The links are valid for one-time use ONLY. You should download the PDFs and e-mail or display them as needed, but the link should not be shown or forwarded to customer.

Input parameters

Parameter name Description Possible value Required
type Possible values: PAYMENT_REMINDER string yes
customerGroupID Customer group ID. integer
customerIDs Multiple customer IDs, separated by commas, such as: 1,2,3,4,5 string

Response

Field name Type Description
customerID integer Customer ID
customerName string Name of the customer.
customerGroupID integer Customer group ID
customerGroupName string Name of customer group.
email string Email of the customer.
statementLink string URL pointing to pdf file
balanceEnabled integer 0 or 1. For some customers, balance calculation may be disabled (typically the anonymous retail customer who is the default customer in POS). This flag can manually be set on customer card. If flag is set, balanceEnabled = 0.
unpaidInvoices array A list of customer's unpaid invoices. Each list item has the following attributes:

invoiceID - ID of the invoice
invoiceNo - number of the invoice
invoiceDate - date of the invoice
total - Invoice total (= net + vat + rounding)
paid - paid amount
dueDate - due date of the invoice
pdfLink - URL pointing to a PDF version of the invoice.