Endpoints:
For member point adjustments:
https://api.website.world/webapps/api/memberpoints
For member point balances (read only):
https://api.website.world/webapps/api/memberpointsbalances
Description:
Points are earned and redeemed based on the loyalty points program setup in your eCommerce area. Using the memberpoints endpoint you can view the history of member points for your site and create new entries.
Parameters for Points
Name | Description | Example | Optional | Data type |
data | The JSON you would like to POST. This can be POST content also |
{
} |
Yes | json object |
id | Search a specific point adjust id | id=123 | Yes | int |
mbr_id | Search by member Id | mbr_id=123 | Yes | int |
adjustmentnote |
Search by the adjustment note |
adjustmentnote="adjustment note" | Yes | string |
includeOrders |
Includes points adjustments from orders(earned or redeemed) if this parameter is set to 1. |
includeOrders=1 |
Yes | boolean |
adjustdate |
Filter by adjustment date. |
adjustdate=01/01/2021 matchType=> |
Yes | string |
before | Filter orders before a specified date. | before=21/02/2021 | Yes | string |
after | Filter orders after a specified date. | after=21/02/2021 | Yes | string |
List your member points balances
Use the member points balances endpoint with GET method to get the points balances of all members or a query a single mbr_id.
Example url:
https://api.website.world/webapps/api/memberpointsbalances
Sample data returned:
{ "endPoint": "memberpointsbalances", "resultCount": 2, "offset": 0, "data": [ { "mbr_email": "test@example.com", "mbr_name": "Johnson", "mbr_id": 442531, "mbr_points_balance": "120.00" }, { "mbr_email": "Jason@exmapleemail.com", "mbr_name": "Jason", "mbr_id": 445123, "mbr_points_balance": "50.00" } ], "success": true, "pageSize": 200 }
List your member points adjustment history
Use the member points endpoint with GET method to get the history of member points adjustments.
Example url:
https://api.website.world/webapps/api/memberpoints
{ "endPoint": "memberpoints", "resultCount": 2, "data": [ { "adjustmentnote": "test note", "pointsadjustid": 222, "mbr_id": 123123, "adjustpoints": "50.00", "id": 22232, "adjustdate": "2021-12-20 16:00:30.834896", "cid": 1111112 }, { "adjustmentnote": "example note", "pointsadjustid": 221, "mbr_id": 123, "adjustpoints": "120.00", "id": 22231, "adjustdate": "2021-12-20 16:27:24.343733", "cid": 11111112 } ], "success": true }
List your member points adjustment history including redemptions (for a specific member only)
View point adjustments due to orders i.e. redeemed or earned points.
This is a read only.
You must include both a mbr_id and set includeOrders to 1
Example get request url:
Sample return data:
{ "endPoint": "memberpoints", "resultCount": 1, "data": [ { "adjustvalue": "9.00", "adjusttype": "earned", "adjustmentnote": "test custom note", "adjustpoints": "0.90", "id": 123123, "adjustdate": "2021-12-23 07:08:34.512266" } ], "success": true }
Create new member points adjustment entry
To create a new entry use POST method and you must include the mbr_id for whom the entry is to be made. You can get all your members with ids using GET member endpoint. Below example will add 10 loyalty points for member if 1234. You can also provide negative values to update the loyalty points for a member.
You must provide a mbr_id or a mbr_email
Example:
{ "mbr_id": 1234, "adjustpoints": 10, "adjustmentnote": "Product refund through points" }
mbr_id, adjustmentnote, adjustpoints, adjustdate
Example return JSON data:
{ "endPoint": "memberpoints", "resultCount": 2, "data": [ { "adjustmentnote": "test note", "pointsadjustid": 222, "mbr_id": 123123, "adjustpoints": "50.00", "id": 22232, "adjustdate": "2021-12-20 16:00:30.834896", "cid": 1234 }, { "adjustmentnote": "example note", "pointsadjustid": 221, "mbr_id": 123, "adjustpoints": "120.00", "id": 22231, "adjustdate": "2021-12-20 16:27:24.343733", "cid": 1234 } ], "success": true }