MenuClose

Member Points - API Reference

Select API:

Member Points

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.

End Point URL

https://api.cms-tool.net/webapps/api/memberpoints

API Parameters and Filters

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.
Use matchType parameter along for more control over the data.

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

Data Dictionary

Key Definition Type Format
adjustdate
Timestamp
Adjustment Timestamp
timestamp
adjustmentnote
Note
Comment about why the points were given
text
adjustpoints
Points
Number of points to add or deduct. Negative points reduce the balance. Positive points increase the balance.
decimal
Precision: 10.2
cid
Website ID
Internal ID for the website
int
mbr_id
Member ID
The user ID to which benefits from this points adjustment
int
object_id
Object id
If the points related to a product review, then this would be the product ID
int
point_rule
point rule
The sourceof the points, eg {Review,RegoLogin}
text
pointsadjustid
ID
Unique ID for the point activity record transaction
Integer (Unique ID)

Usage Instructions and Examples

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.cms-tool.net/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.cms-tool.net/webapps/api/memberpoints

Sample data returned:

{
    "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:

https://api.cms-tool.net/webapps/api/memberpoints?includeOrders=1&mbr_id=123123

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"
} 

Sample Object


{
"adjustvalue":"9.00",
"adjusttype":"earned",
"adjustmentnote":"test custom note",
"adjustpoints":"0.90",
"id":123123,
"adjustdate":"2021-12-23 07:08:34.512266"
}