Redeeming programs
Redeeming program get, list and redeem using custome balance.
Last updated
Redeeming program get, list and redeem using custome balance.
Last updated
Get a specific redeeming program by its ID.
OK
The list of redeeming program
OK
const response = await fetch('https://dev-api.joy.so/rest_api/v1/spending/{spendingProgramId}', {
method: 'GET',
headers: {},
});
const data = await response.json();
{
"data": {
"id": "aYorhxYUTkUKIDZgL1R5",
"enableRefundPointRedeem": false,
"redeemed": 0,
"prefix": "SW-",
"isLimitIntervalCustomer": false,
"combinedWith": [
"orderDiscounts",
"productDiscounts",
"shippingDiscounts"
],
"type": "spending",
"title": "Free Product Test",
"specificProductIds": [
44438017147115
],
"limitIntervalCustomer": 0,
"appliedDiscountToSaleChannel": "applyOnlineStore",
"variantId": null,
"shopId": "umN0f3GKyQC3XS1AwVWg",
"event": "free_gift",
"redeemIn": "available_in_online_store",
"spendPoint": 200,
"limitRedeem": "redeemWithoutLimit",
"showLoyaltyPage": true,
"isUsePrefixDiscountCode": true,
"userAvailability": "userRedeemed",
"totalLimitationRedeem": 0,
"earnAmount": 700,
"priority": 0,
"appliedCollectionIds": [],
"variantIds": [
44438017147115,
44438017147115,
44438017179883,
44438017245419
],
"redeemType": "fixed",
"appliedTo": "sf_product",
"specificProducts": [
{
"image": {
"src": "https://cdn.shopify.com/s/files/1/0680/3950/8203/products/Main_589fc064-24a2-4236-9eaf-13b2bd35d21d.jpg?v=1703045153"
},
"id": 8209413669099,
"title": "The Complete Snowboard"
}
],
"createdAt": "2024-08-27T08:09:46.757Z",
"expired": false,
"isDraft": false,
"giftStatus": "none",
"status": true,
"listShopifyIdDiscount": [
"1370365395179",
"1370365460715"
],
"translateTitle": "اختبار المنتج مجانا",
"updatedAt": "2024-08-30T09:50:38.967Z",
"friendSpecificProducts": [
{
"image": {
"src": "https://cdn.shopify.com/s/files/1/0680/3950/8203/products/Main_589fc064-24a2-4236-9eaf-13b2bd35d21d.jpg?v=1703045153"
},
"id": 8209413669099,
"title": "The Complete Snowboard"
}
],
"customerSpecificProductIds": [
44438017147115
],
"customerSpecificProducts": [
{
"image": {
"src": "https://cdn.shopify.com/s/files/1/0680/3950/8203/products/Main_589fc064-24a2-4236-9eaf-13b2bd35d21d.jpg?v=1703045153"
},
"id": 8209413669099,
"title": "The Complete Snowboard"
}
],
"friendSpecificProductIds": [
44438017147115
]
}
}
const response = await fetch('https://dev-api.joy.so/rest_api/v1/spending', {
method: 'GET',
headers: {},
});
const data = await response.json();
{
"data": [
{
"id": "aYorhxYUTkUKIDZgL1R5",
"enableRefundPointRedeem": false,
"redeemed": 0,
"prefix": "SW-",
"isLimitIntervalCustomer": false,
"combinedWith": [
"orderDiscounts",
"productDiscounts",
"shippingDiscounts"
],
"type": "spending",
"title": "Free Product Test",
"specificProductIds": [
44438017147115
],
"limitIntervalCustomer": 0,
"appliedDiscountToSaleChannel": "applyOnlineStore",
"variantId": null,
"shopId": "umN0f3GKyQC3XS1AwVWg",
"event": "free_gift",
"redeemIn": "available_in_online_store",
"spendPoint": 200,
"limitRedeem": "redeemWithoutLimit",
"showLoyaltyPage": true,
"isUsePrefixDiscountCode": true,
"userAvailability": "userRedeemed",
"totalLimitationRedeem": 0,
"earnAmount": 700,
"priority": 0,
"appliedCollectionIds": [],
"variantIds": [
44438017147115,
44438017147115,
44438017179883,
44438017245419
],
"redeemType": "fixed",
"appliedTo": "sf_product",
"specificProducts": [
{
"image": {
"src": "https://cdn.shopify.com/s/files/1/0680/3950/8203/products/Main_589fc064-24a2-4236-9eaf-13b2bd35d21d.jpg?v=1703045153"
},
"id": 8209413669099,
"title": "The Complete Snowboard"
}
],
"createdAt": "2024-08-27T08:09:46.757Z",
"expired": false,
"isDraft": false,
"giftStatus": "none",
"status": true,
"listShopifyIdDiscount": [
"1370365395179",
"1370365460715"
],
"translateTitle": "اختبار المنتج مجانا",
"updatedAt": "2024-08-30T09:50:38.967Z",
"friendSpecificProducts": [
{
"image": {
"src": "https://cdn.shopify.com/s/files/1/0680/3950/8203/products/Main_589fc064-24a2-4236-9eaf-13b2bd35d21d.jpg?v=1703045153"
},
"id": 8209413669099,
"title": "The Complete Snowboard"
}
],
"customerSpecificProductIds": [
44438017147115
],
"customerSpecificProducts": [
{
"image": {
"src": "https://cdn.shopify.com/s/files/1/0680/3950/8203/products/Main_589fc064-24a2-4236-9eaf-13b2bd35d21d.jpg?v=1703045153"
},
"id": 8209413669099,
"title": "The Complete Snowboard"
}
],
"friendSpecificProductIds": [
44438017147115
]
}
]
}