Rewards
Customer rewards and redemptions
Retrieve customer rewards with optional filtering and pagination.
Customer Identifier Required: Must provide either customerId
or shopifyCustomerId
parameter.
Joy internal customer ID
XLacU68YKR5tC3moGqUP
Shopify customer ID
8720295559390
Filter by reward status
Filter by reward type
Cursor for pagination (before) - Firestore document ID of reward to paginate before
Cursor for pagination (after) - Firestore document ID of reward to paginate after
Number of rewards per page
10
Filter rewards created after this date
Filter rewards created before this date
Sort order for results
createdAt_desc
Possible values: Include total count in response (may increase response time)
false
App ID of your shop which retrieved from the Settings page
{{appKey}}
Secret Key of your shop which retrieved from the Settings page
{{secretKey}}
List of customer rewards
Customer not found
GET /rest_api/v2/rewards HTTP/1.1
Host: dev-api.joy.so
X-Joy-Loyalty-App-Key: text
X-Joy-Loyalty-Secret-Key: text
Accept: */*
{
"success": true,
"data": [
{
"id": "OPfV7dXaPn1Ejbm9piPs",
"customerId": "o9AQeUCXYDjbeFm7vAKy",
"email": "[email protected]",
"couponCode": "JOY-8PBFA801B2FH",
"programTitle": "Points for discounts",
"shopifyCustomerId": 7603687882987,
"programDescription": "1 x 1% discount",
"orderReqAmount": "$1",
"expiredAt": null,
"discountStatus": "active",
"program": {
"id": "akwQ96WZJMIqrG26PNlC",
"title": "Points for discounts"
},
"createdAt": "2025-06-12T10:31:25.781Z",
"updatedAt": "2025-06-12T10:31:25.781Z"
}
],
"meta": {
"pagination": {
"hasNext": false,
"hasPre": false,
"total": 1,
"totalPage": 1
}
},
"timestamp": "2025-06-12T10:31:25.781Z"
}
Reward ID
OPfV7dXaPn1Ejbm9piPs
App ID of your shop which retrieved from the Settings page
{{appKey}}
Secret Key of your shop which retrieved from the Settings page
{{secretKey}}
Reward details
GET /rest_api/v2/rewards/{rewardId} HTTP/1.1
Host: dev-api.joy.so
X-Joy-Loyalty-App-Key: text
X-Joy-Loyalty-Secret-Key: text
Accept: */*
Reward details
{
"success": true,
"data": {
"id": "OPfV7dXaPn1Ejbm9piPs",
"customerId": "o9AQeUCXYDjbeFm7vAKy",
"email": "[email protected]",
"couponCode": "JOY-8PBFA801B2FH",
"programTitle": "Points for discounts",
"shopifyCustomerId": 7603687882987,
"programDescription": "1 x 1% discount",
"orderReqAmount": "$1",
"expiredAt": null,
"discountStatus": "active",
"program": {
"id": "akwQ96WZJMIqrG26PNlC",
"title": "Points for discounts"
},
"createdAt": "2025-06-12T10:31:25.781Z",
"updatedAt": "2025-06-12T10:31:25.781Z"
},
"meta": {},
"message": "Operation completed successfully",
"timestamp": "2023-07-28T07:27:54.123Z"
}
Process coupon refund and return points to customer
The coupon/discount code to refund
JOY-8PBFA801B2FH
Shopify customer ID who owns the coupon
7603687882987
Optional reason for the refund
Customer request
Coupon refunded successfully
Invalid request or coupon not found
POST /rest_api/v2/rewards/coupons/refund HTTP/1.1
Host: dev-api.joy.so
Content-Type: application/json
Accept: */*
Content-Length: 99
{
"discountCode": "JOY-8PBFA801B2FH",
"shopifyCustomerId": "7603687882987",
"reason": "Customer request"
}
{
"success": true,
"data": {
"success": true,
"message": "Coupon refunded successfully"
}
}