Activities
Point activities and transactions
Retrieve paginated list of point transactions/activities
Filter by Shopify customer ID
Filter by internal customer ID
Cursor for pagination (before) - Firestore document ID
Cursor for pagination (after) - Firestore document ID
Number of transactions per page
10
Filter by activity type
Filter by specific event
Filter by activity source
Filter activities created after this date
Filter activities 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}}
Paginated list of transactions
GET /rest_api/v2/transactions HTTP/1.1
Host: dev-api.joy.so
X-Joy-Loyalty-App-Key: text
X-Joy-Loyalty-Secret-Key: text
Accept: */*
Paginated list of transactions
{
"success": true,
"data": [
{
"id": "act_abc123",
"shopId": "shop_xyz789",
"customerId": "cust_def456",
"shopifyCustomerId": 7801029525739,
"email": "[email protected]",
"content": "Award points via REST API",
"type": "earnPoint",
"source": "rest_api",
"event": "earn_point_rest_api",
"oldPoint": 50,
"newPoint": 150,
"programId": "prog_abc123",
"programTitle": "Manual Point Award",
"priceRuleId": "text",
"discountId": "text",
"couponCode": "text",
"orderId": "text",
"orderName": "text",
"orderNumber": 1,
"orderCurrency": "text",
"earnBy": "text",
"rateMoney": 1,
"earnPoint": 100,
"spendPoint": 1,
"referralCustomerEmail": "text",
"referredCustomerEmail": "text",
"milestoneOrder": 1,
"isPendingPointPlaceOrder": true,
"refundPendingPoint": 1,
"pendingPointUntil": "2025-09-09T02:46:08.038Z",
"adminNote": "text",
"userNote": "text",
"reason": "text",
"createdAt": "2024-01-15T10:30:00.000Z",
"updatedAt": "2024-01-15T10:30:00.000Z"
}
],
"meta": {
"pagination": {
"hasNext": true,
"hasPre": true,
"total": 1,
"totalPage": 1
}
},
"message": "Operation completed successfully",
"timestamp": "2023-07-28T07:27:54.123Z"
}
Retrieve details of a specific point transaction
Transaction ID
App ID of your shop which retrieved from the Settings page
{{appKey}}
Secret Key of your shop which retrieved from the Settings page
{{secretKey}}
Transaction details
GET /rest_api/v2/transactions/{transactionId} HTTP/1.1
Host: dev-api.joy.so
X-Joy-Loyalty-App-Key: text
X-Joy-Loyalty-Secret-Key: text
Accept: */*
Transaction details
{
"success": true,
"data": {
"id": "act_abc123",
"shopId": "shop_xyz789",
"customerId": "cust_def456",
"shopifyCustomerId": 7801029525739,
"email": "[email protected]",
"content": "Award points via REST API",
"type": "earnPoint",
"source": "rest_api",
"event": "earn_point_rest_api",
"oldPoint": 50,
"newPoint": 150,
"programId": "prog_abc123",
"programTitle": "Manual Point Award",
"priceRuleId": "text",
"discountId": "text",
"couponCode": "text",
"orderId": "text",
"orderName": "text",
"orderNumber": 1,
"orderCurrency": "text",
"earnBy": "text",
"rateMoney": 1,
"earnPoint": 100,
"spendPoint": 1,
"referralCustomerEmail": "text",
"referredCustomerEmail": "text",
"milestoneOrder": 1,
"isPendingPointPlaceOrder": true,
"refundPendingPoint": 1,
"pendingPointUntil": "2025-09-09T02:46:08.038Z",
"adminNote": "text",
"userNote": "text",
"reason": "text",
"createdAt": "2024-01-15T10:30:00.000Z",
"updatedAt": "2024-01-15T10:30:00.000Z"
},
"meta": {},
"message": "Operation completed successfully",
"timestamp": "2023-07-28T07:27:54.123Z"
}
Remove points from a customer's account
App ID of your shop which retrieved from the Settings page
{{appKey}}
Secret Key of your shop which retrieved from the Settings page
{{secretKey}}
Points deducted successfully
POST /rest_api/v2/transactions/points/deduct HTTP/1.1
Host: dev-api.joy.so
X-Joy-Loyalty-App-Key: text
X-Joy-Loyalty-Secret-Key: text
Content-Type: application/json
Accept: */*
Content-Length: 91
{
"shopifyCustomerId": "text",
"point": 1,
"adminNote": "text",
"userNote": "text",
"reason": "text"
}
Points deducted successfully
{
"success": true,
"data": {},
"meta": {},
"message": "Operation completed successfully",
"timestamp": "2023-07-28T07:27:54.123Z"
}
Add points to a customer's account
App ID of your shop which retrieved from the Settings page
{{appKey}}
Secret Key of your shop which retrieved from the Settings page
{{secretKey}}
Points awarded successfully
POST /rest_api/v2/transactions/points/award HTTP/1.1
Host: dev-api.joy.so
X-Joy-Loyalty-App-Key: text
X-Joy-Loyalty-Secret-Key: text
Content-Type: application/json
Accept: */*
Content-Length: 91
{
"shopifyCustomerId": "text",
"point": 1,
"adminNote": "text",
"userNote": "text",
"reason": "text"
}
Points awarded successfully
{
"success": true,
"data": {},
"meta": {},
"message": "Operation completed successfully",
"timestamp": "2023-07-28T07:27:54.123Z"
}
Adjust customer points (positive or negative adjustment)
App ID of your shop which retrieved from the Settings page
{{appKey}}
Secret Key of your shop which retrieved from the Settings page
{{secretKey}}
Points adjusted successfully
POST /rest_api/v2/transactions/points/adjust HTTP/1.1
Host: dev-api.joy.so
X-Joy-Loyalty-App-Key: text
X-Joy-Loyalty-Secret-Key: text
Content-Type: application/json
Accept: */*
Content-Length: 91
{
"shopifyCustomerId": "text",
"point": 1,
"adminNote": "text",
"userNote": "text",
"reason": "text"
}
Points adjusted successfully
{
"success": true,
"data": {},
"meta": {},
"message": "Operation completed successfully",
"timestamp": "2023-07-28T07:27:54.123Z"
}
Set customer points to a specific value
App ID of your shop which retrieved from the Settings page
{{appKey}}
Secret Key of your shop which retrieved from the Settings page
{{secretKey}}
Points reset successfully
POST /rest_api/v2/transactions/points/reset HTTP/1.1
Host: dev-api.joy.so
X-Joy-Loyalty-App-Key: text
X-Joy-Loyalty-Secret-Key: text
Content-Type: application/json
Accept: */*
Content-Length: 91
{
"shopifyCustomerId": "text",
"point": 1,
"adminNote": "text",
"userNote": "text",
"reason": "text"
}
Points reset successfully
{
"success": true,
"data": {},
"meta": {},
"message": "Operation completed successfully",
"timestamp": "2023-07-28T07:27:54.123Z"
}
Last updated