My Points
loyalty-program/v1/mypoints
the my points API is intended solely for frontend use on a customer's session. This allows you to process the following data:
fetch user's points balance and worth
fetch user's redeemed coupons
fetch user's points history
redeem coupons using user's earned points
GET: /wp-json/loyalty-program/v1/mypoints
Fetch all sections of LPFW settings.
Requirements:
Logged-in user
role is allowed to earn points
Method | Endpoint |
GET | /wp-json/loyalty-program/v1/mypoints |
GET: /wp-json/loyalty-program/v1/mypoints/coupons
Fetch all sections of LPFW settings.
Requirements:
Logged-in user
role is allowed to earn points
Method | Endpoint |
GET | /wp-json/loyalty-program/v1/mypoints/coupons |
Query Parameters | Required | Type | Description |
page | false | number | Page number |
Custom Response Headers | Type | Description |
X-TOTAL | number | Total number of history entries |
GET: /wp-json/loyalty-program/v1/mypoints/history
Get customer's points history data.
Requirements:
Logged-in user
role is allowed to earn points
Method | Endpoint |
GET | /wp-json/loyalty-program/v1/mypoints/history |
Query Parameters | Required | Type | Description |
page | false | number | Page number |
Custom Response Headers | Type | Description |
X-TOTAL | number | Total number of history entries |
POST: /wp-json/loyalty-program/v1/mypoints/redeem
Redeem points and create a coupon.
Requirements:
Logged-in user
role is allowed to earn points
Method | Endpoint |
POST | /wp-json/loyalty-program/v1/mypoints/redeem |
Query Parameters | Required | Type | Description |
points | true | integer | Number of points to redeem |
Last updated