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 PDF's 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  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.