Point manupulation
Manually manupulate customer points balance via API
Earn point via Rest API
This api allows you to increase point for a specific shopify customer via Rest API
Header parameters
X-Joy-Loyalty-App-KeystringOptionalExample:
{{appKey}}
X-Joy-Loyalty-Secret-KeystringOptionalExample:
{{secretKey}}
Body
objectOptionalExample:
{"shopifyCustomerId":7278822981918,"point":10000,"adminNote":"Note that is only visible in admin side","userNote":"Note that is visible in both admin and customer side"}
Responses
200
OK
application/json
Responseobject
post
POST /rest_api/v1/shopify/earn-point HTTP/1.1
Host: dev-api.joy.so
Content-Type: application/json
Accept: */*
Content-Length: 169
{
"shopifyCustomerId": 7278822981918,
"point": 10000,
"adminNote": "Note that is only visible in admin side",
"userNote": "Note that is visible in both admin and customer side"
}
200
OK
{
"success": true,
"data": {
"id": "Pb4yrH4p6N9Io6p5zJ5E",
"type": "earn_point",
"event": "earn_point_rest_api",
"email": "[email protected]",
"oldPoint": 1500,
"newPoint": 2000,
"customerId": "Jf3sCbwddU8AmxnD5bD5",
"shopifyCustomerId": 6179199123509,
"adminNote": "Note that is only visible in admin side",
"userNote": "Note that is visible in both admin and customer side",
"isWebhookSent": true,
"source": "rest_api",
"shopId": "6bSgyVPwoU5MJAohirCE",
"hasWebhook": true,
"content": null,
"programId": null,
"programTitle": null,
"priceRuleId": null,
"discountId": null,
"couponCode": null,
"orderId": null,
"orderNumber": null,
"orderCurrency": null,
"earnBy": null,
"rateMoney": null,
"earnPoint": null,
"spendPoint": null,
"referralCustomerEmail": null,
"referredCustomerEmail": null,
"milestoneOrder": null,
"isPendingPointPlaceOrder": null,
"refundPendingPoint": null,
"pendingPointUntil": null,
"reason": null,
"createdAt": "2023-09-29T05:27:35.432Z",
"updatedAt": "2023-09-29T05:27:35.432Z"
}
}
Spend point via Rest API
This api allows you to decrease point for a specific shopify customer via Rest API
Header parameters
X-Joy-Loyalty-App-KeystringOptionalExample:
{{appKey}}
X-Joy-Loyalty-Secret-KeystringOptionalExample:
{{secretKey}}
Body
objectOptionalExample:
{"shopifyCustomerId":7278822981918,"point":10000,"adminNote":"Note that is only visible in admin side","userNote":"Note that is visible in both admin and customer side"}
Responses
200
OK
application/json
Responseobject
post
POST /rest_api/v1/shopify/spend-point HTTP/1.1
Host: dev-api.joy.so
Content-Type: application/json
Accept: */*
Content-Length: 169
{
"shopifyCustomerId": 7278822981918,
"point": 10000,
"adminNote": "Note that is only visible in admin side",
"userNote": "Note that is visible in both admin and customer side"
}
200
OK
{
"success": true,
"data": {
"id": "Pb4yrH4p6N9Io6p5zJ5E",
"type": "redeem_point",
"event": "spend_point_rest_api",
"email": "[email protected]",
"oldPoint": 2000,
"newPoint": 1500,
"customerId": "Jf3sCbwddU8AmxnD5bD5",
"shopifyCustomerId": 6179199123509,
"adminNote": "Note that is only visible in admin side",
"userNote": "Note that is visible in both admin and customer side",
"isWebhookSent": true,
"source": "rest_api",
"shopId": "6bSgyVPwoU5MJAohirCE",
"hasWebhook": true,
"content": null,
"programId": null,
"programTitle": null,
"priceRuleId": null,
"discountId": null,
"couponCode": null,
"orderId": null,
"orderNumber": null,
"orderCurrency": null,
"earnBy": null,
"rateMoney": null,
"earnPoint": null,
"spendPoint": null,
"referralCustomerEmail": null,
"referredCustomerEmail": null,
"milestoneOrder": null,
"isPendingPointPlaceOrder": null,
"refundPendingPoint": null,
"pendingPointUntil": null,
"reason": null,
"createdAt": "2023-09-29T05:27:35.432Z",
"updatedAt": "2023-09-29T05:27:35.432Z"
}
}
Adjust point via Rest API
This api allows you to reset point for a specific shopify customer via Rest API
Header parameters
X-Joy-Loyalty-App-KeystringOptionalExample:
{{appKey}}
X-Joy-Loyalty-Secret-KeystringOptionalExample:
{{secretKey}}
Body
objectOptionalExample:
{"shopifyCustomerId":7278822981918,"point":10000,"adminNote":"Note that is only visible in admin side","userNote":"Note that is visible in both admin and customer side"}
Responses
200
OK
application/json
Responseobject
post
POST /rest_api/v1/shopify/reset-point HTTP/1.1
Host: dev-api.joy.so
Content-Type: application/json
Accept: */*
Content-Length: 169
{
"shopifyCustomerId": 7278822981918,
"point": 10000,
"adminNote": "Note that is only visible in admin side",
"userNote": "Note that is visible in both admin and customer side"
}
200
OK
{
"success": true,
"data": {
"id": "Pb4yrH4p6N9Io6p5zJ5E",
"type": "adjust_point",
"event": "adjust_point_rest_api",
"email": "[email protected]",
"oldPoint": 2000,
"newPoint": 2500,
"customerId": "Jf3sCbwddU8AmxnD5bD5",
"shopifyCustomerId": 6179199123509,
"adminNote": "Note that is only visible in admin side",
"userNote": "Note that is visible in both admin and customer side",
"isWebhookSent": true,
"source": "rest_api",
"shopId": "6bSgyVPwoU5MJAohirCE",
"hasWebhook": true,
"content": null,
"programId": null,
"programTitle": null,
"priceRuleId": null,
"discountId": null,
"couponCode": null,
"orderId": null,
"orderNumber": null,
"orderCurrency": null,
"earnBy": null,
"rateMoney": null,
"earnPoint": null,
"spendPoint": null,
"referralCustomerEmail": null,
"referredCustomerEmail": null,
"milestoneOrder": null,
"isPendingPointPlaceOrder": null,
"refundPendingPoint": null,
"pendingPointUntil": null,
"reason": null,
"createdAt": "2023-09-29T05:27:35.432Z",
"updatedAt": "2023-09-29T05:27:35.432Z"
}
}
Adjust point via Rest API
This api allows you to adjust (increase or decrease) point for a specific shopify customer via Rest API
Header parameters
X-Joy-Loyalty-App-KeystringOptionalExample:
{{appKey}}
X-Joy-Loyalty-Secret-KeystringOptionalExample:
{{secretKey}}
Body
objectOptionalExample:
{"shopifyCustomerId":7278822981918,"point":10000,"adminNote":"Note that is only visible in admin side","userNote":"Note that is visible in both admin and customer side"}
Responses
200
OK
application/json
Responseobject
post
POST /rest_api/v1/shopify/adjust-point HTTP/1.1
Host: dev-api.joy.so
Content-Type: application/json
Accept: */*
Content-Length: 169
{
"shopifyCustomerId": 7278822981918,
"point": 10000,
"adminNote": "Note that is only visible in admin side",
"userNote": "Note that is visible in both admin and customer side"
}
200
OK
{
"success": true,
"data": {
"id": "Pb4yrH4p6N9Io6p5zJ5E",
"type": "adjust_point",
"event": "adjust_point_rest_api",
"email": "[email protected]",
"oldPoint": 2000,
"newPoint": 2500,
"customerId": "Jf3sCbwddU8AmxnD5bD5",
"shopifyCustomerId": 6179199123509,
"adminNote": "Note that is only visible in admin side",
"userNote": "Note that is visible in both admin and customer side",
"isWebhookSent": true,
"source": "rest_api",
"shopId": "6bSgyVPwoU5MJAohirCE",
"hasWebhook": true,
"content": null,
"programId": null,
"programTitle": null,
"priceRuleId": null,
"discountId": null,
"couponCode": null,
"orderId": null,
"orderNumber": null,
"orderCurrency": null,
"earnBy": null,
"rateMoney": null,
"earnPoint": null,
"spendPoint": null,
"referralCustomerEmail": null,
"referredCustomerEmail": null,
"milestoneOrder": null,
"isPendingPointPlaceOrder": null,
"refundPendingPoint": null,
"pendingPointUntil": null,
"reason": null,
"createdAt": "2023-09-29T05:27:35.432Z",
"updatedAt": "2023-09-29T05:27:35.432Z"
}
}
Last updated