REST API v1 (deprecated)
Point manipulation

Point manipulation

⚠️

REST API v1 is deprecated. Build new integrations on REST API v2, and see the REST API v2 reference for current endpoints.

Earn point via Rest API

POST/rest_api/v1/shopify/earn-point

Earn point via Rest API

This api allows you to increase point for a specific shopify customer via Rest API

POST/rest_api/v1/shopify/earn-point
curl -L \
--request POST \
--url 'https://api.joy.so/rest_api/v1/shopify/earn-point' \
--header 'Content-Type: application/json' \
--data '{
"shopifyCustomerId": 7278822981918,
"point": 10000,
"adminNote": "Note that is only visible in admin side",
"userNote": "Note that is visible in both admin and customer side"
}'

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"
}
}
Parameters
X-Joy-Loyalty-App-Keyheader · string
X-Joy-Loyalty-Secret-Keyheader · string
Request body
Returns200

OK

No response body.

Spend point via Rest API

POST/rest_api/v1/shopify/spend-point

Spend point via Rest API

This api allows you to decrease point for a specific shopify customer via Rest API

POST/rest_api/v1/shopify/spend-point
curl -L \
--request POST \
--url 'https://api.joy.so/rest_api/v1/shopify/spend-point' \
--header 'Content-Type: application/json' \
--data '{
"shopifyCustomerId": 7278822981918,
"point": 10000,
"adminNote": "Note that is only visible in admin side",
"userNote": "Note that is visible in both admin and customer side"
}'

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"
}
}
Parameters
X-Joy-Loyalty-App-Keyheader · string
X-Joy-Loyalty-Secret-Keyheader · string
Request body
Returns200

OK

No response body.