Retrieve current balance (store credit) of all customers.

NB! This API call is essentially a report and can take a long time to run. Avoid calling it too frequently. API processes getCustomerBalances calls one at a time; if you issue another call while previous one is running, API returns error 1021.

Balance is essentially the difference between customer's total invoices and total payments. As such, balance cannot be adjusted directly. To change customer's balance (or to import initial balances), either create a payment (savePayment) or an unpaid invoice (saveSalesDocument).

When you create an invoice and want it to be paid off of customer's store credit (prepaid balance), set input parameter amountPaidWithStoreCredit.

If this call returns error 1006, please contact ERPLY helpdesk to update your account.

Input parameters

Parameter name Description Possible value Required
date  If omitted, current date will be used.  ISO date (yyyy-mm-dd)    


Field name Type Description
customerID  Integer  Customer ID.  
customerName  String  Customer name.  
customerCardCode  String  Customer card code.  
customerGroupID  Integer  Customer group ID.  
balance  Decimal  Amount that the customer has prepaid (NEGATIVE VALUE) or is currently due (POSITIVE VALUE). NB! The sign of the value is opposite to the usual expectation, since that's how balances are usually kept in accounting.