Customer Loyalty Points
GET
/customers/loyalty/pointsThis endpoint allows you to fetch the history of a customer's loylty points that is assocaited with the store.
:::info
This endopint will work only if the store has Customer Loyalty application installed.
:::
Request
The unique ID number of the customer. Get a list of Customer IDs from here
Request samples
[api.label.responses]
Response status code, a numeric or alphanumeric identifier used to convey the outcome or status of a request, operation, or transaction in various systems and applications, typically indicating whether the action was successful, encountered an error, or resulted in a specific condition.
Response flag, boolean indicator used to signal a particular condition or state in the response of a system or application, often representing the presence or absence of certain conditions or outcomes.
Description or a reason of the loyalty points increase or decrese
Amount of loyalty points for the customer
Amount of used points for the customer
Status of the loyalty points
Date and time of the expirey date
Order ID in case the loyalty points have been earned from an order
Order reference ID in case the loyalty points have been earned from an order
For a better response behavior as well as maintain the best security level, All retrieving API endpoints use a mechanism to retrieve data in chunks called pagination. Pagination working by return only a specific number of records in each response, and through passing the page number you can navigate the different pages.
Number of returned results.
Number of all results.
Number of results per page.
Number of current page.
Number of total pages.
Array of linkes to next and previous pages.
{
"status": 200,
"success": true,
"data": [
{
"name": "مخصصة",
"points": 900,
"used_points": 0,
"status": "مؤكدة",
"created_at": {
"date": "2024-12-17 17:42:14.000000",
"timezone_type": 3,
"timezone": "Asia/Riyadh"
},
"expiry_date": "2029-02-17 17:42:14",
"order_id": 98787845454,
"used_at": null,
"notes": "reason text",
"reference_id": 3215487
},
{
"name": "مخصصة",
"points": 900,
"used_points": 0,
"status": "مؤكدة",
"created_at": {
"date": "2024-12-17 17:15:47.000000",
"timezone_type": 3,
"timezone": "Asia/Riyadh"
},
"expiry_date": "2029-02-17 17:15:47",
"order_id": null,
"used_at": null,
"notes": "sample note",
"reference_id": null
}
],
"pagination": {
"count": 30,
"total": 39,
"perPage": 30,
"currentPage": 1,
"totalPages": 2,
"links": {
"next": "http://api.salla.dev/admin/v2/customers/loyalty/points?customer_id=1227534533&page=2"
}
}
}