Add a new points transaction and increase customer's point balance.
Typically, reward points accumulate automatically from customer's purchases. You can define the "dollar spent / points earned" ratio in Erply backend, SETTINGS → Configuration → Invoices and Sales. This API function is only for adjusting customer's point balance manually, or for building a custom loyalty program.
To subtract points from customer, see subtractCustomerRewardPoints. To get current point balance for a specific customer, see getCustomerRewardPoints. (There is currently no way to retrieve point balances for all customers simultaneously.)
If you are building a custom loyalty program, you may also take a look at getEarnedRewardPointRecords and getUsedRewardPointRecords — to retrieve a detailed list of all transactions where customer has earned or spent points.
| Parameter name | Description | Possible value | Required |
|---|---|---|---|
| customerID | Customer ID. | integer | |
| invoiceID | Invoice ID. Sale that earned the points. | integer | |
| points | Points must be bigger then 0. | integer | |
| createdUnixTime | integer | Unix timestamp. Transaction timestamp. | |
| expiryUnixTime | integer | Unix timestamp. Expiry timestamp. | |
| pointOfSaleID | Register ID. Available only if "Reward point extras" module is enabled on your account. | integer | |
| employeeID | Cashier who processed the sale. Available only if "Reward point extras" module is enabled on your account. | integer | |
| description | Available only if "Reward point extras" module is enabled on your account. | string |
| Field name | Type | Description |
|---|---|---|
| transactionID | integer | ID of the newly-created item. |
| customerID | integer | |
| points | integer | |
| createdUnixTime | Unix timestamp | |
| expiryUnixTime | Unix timestamp |
This API call returns error 1006 if "Reward points" module is not enabled on your account.