Cancels one of the authenticated customer’s redeemed discount codes and credits the redeemed points back.
Only available when the merchant enabled “Let customers return unused rewards” in Advanced Settings.
The reward must belong to the authenticated customer, be UNUSED, not expired, bought with points
(not store credit or a gifted VIP/birthday/referral reward), and Shopify must report the code was never used.
The discount code is removed from Shopify before the points are credited.
Returns the updated customer loyalty details, like redeem-points.
POST
/
loyalty
/
cp
/
api
/
return-reward
/
{rewardId}
Return an unused reward for its points
curl --request POST \ --url https://{storeDomain}/apps/loyalty/cp/api/return-reward/{rewardId}
{"docsConfig":{"theme":"luma","$schema":"https://mintlify.com/docs.json","name":"Appstle","colors":{"primary":"#0caceb","light":"#6ccdf2","dark":"#0a7eae"},"favicon":"https://mintcdn.com/appstleinc-aeca3e0a/811jRr2WFwD6kXFw/favicon.webp?fit=max\u0026auto=format\u0026n=811jRr2WFwD6kXFw\u0026q=85\u0026s=a98f329ae5c5ff4deaa241d8abe53f11","api":{"playground":{"display":"interactive"},"examples":{"defaults":"required","languages":["bash","python","javascript","node","php","go","ruby"]}},"appearance":{"default":"light","strict":true},"navbar":{"primary":{"type":"github","href":"https://github.com/AppstleInc"}},"footer":{"socials":{"website":"https://appstle.com"}},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"appstleinc-aeca3e0a","hasAudioNarration":false,"actualSubdomain":"appstleinc-aeca3e0a","customDomains":["developers.appstle.com"],"gitSource":{"type":"github","owner":"appstleinc","repo":"appstle-docs-mintlify","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ae0f4be60c69efa9eff734a","collectionId":"1894d340-3cb7-40ea-b6f1-d2491cf29b0b","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ae0f4be60c69efa9eff734a"},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6ae0f4be60c69efa9eff734a","clientVersion":"0.0.3990","searchFilterCounts":[{"language":"default","tag":"Subscriptions","count":262},{"language":"default","tag":"Admin API","count":183},{"language":"default","tag":"Storefront API","count":174},{"language":"default","tag":"Memberships","count":118},{"language":"default","tag":"Subscription Contracts","count":63},{"language":"default","tag":"Membership Contracts","count":62},{"language":"default","tag":"Customer Portal API","count":55},{"language":"default","tag":"Loyalty","count":47},{"language":"default","tag":"Billing \u0026 Payments","count":28},{"language":"default","tag":"Bundles","count":25}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-v7-file-tree","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"per-site-search-delta","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-private-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-nav-generations","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"isAtlas":false,"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"loyalty-storefront-api/redemptions-\u0026-discount-codes/return-an-unused-reward-for-its-points","slug":"/loyalty-storefront-api/redemptions-\u0026-discount-codes/return-an-unused-reward-for-its-points","pageMetadata":{"title":"Return an unused reward for its points","description":"Cancels one of the authenticated customer's redeemed discount codes and credits the redeemed points back.\n\nOnly available when the merchant enabled \"Let customers return unused rewards\" in Advanced Settings.\nThe reward must belong to the authenticated customer, be UNUSED, not expired, bought with points\n(not store credit or a gifted VIP/birthday/referral reward), and Shopify must report the code was never used.\nThe discount code is removed from Shopify before the points are credited.\n\nReturns the updated customer loyalty details, like redeem-points.\n","deprecated":null,"version":null,"openapi":"/loyalty/storefront-api-swagger.json post /loyalty/cp/api/return-reward/{rewardId}","href":"/loyalty-storefront-api/redemptions-\u0026-discount-codes/return-an-unused-reward-for-its-points","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsx(_components.p, {\n children: \"Cancels one of the authenticated customer’s redeemed discount codes and credits the redeemed points back.\"\n }), \"\\n\", _jsx(_components.p, {\n children: \"Only available when the merchant enabled “Let customers return unused rewards” in Advanced Settings.\\nThe reward must belong to the authenticated customer, be UNUSED, not expired, bought with points\\n(not store credit or a gifted VIP/birthday/referral reward), and Shopify must report the code was never used.\\nThe discount code is removed from Shopify before the points are credited.\"\n }), \"\\n\", _jsx(_components.p, {\n children: \"Returns the updated customer loyalty details, like redeem-points.\"\n })]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Return an unused reward for its points","description":"Cancels one of the authenticated customer's redeemed discount codes and credits the redeemed points back.\n\nOnly available when the merchant enabled \"Let customers return unused rewards\" in Advanced Settings.\nThe reward must belong to the authenticated customer, be UNUSED, not expired, bought with points\n(not store credit or a gifted VIP/birthday/referral reward), and Shopify must report the code was never used.\nThe discount code is removed from Shopify before the points are credited.\n\nReturns the updated customer loyalty details, like redeem-points.\n","deprecated":null,"version":null,"openapi":"/loyalty/storefront-api-swagger.json post /loyalty/cp/api/return-reward/{rewardId}","href":"/loyalty-storefront-api/redemptions-\u0026-discount-codes/return-an-unused-reward-for-its-points","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"description":"Cancels one of the authenticated customer's redeemed discount codes and credits the redeemed points back.\n\nOnly available when the merchant enabled \"Let customers return unused rewards\" in Advanced Settings.\nThe reward must belong to the authenticated customer, be UNUSED, not expired, bought with points\n(not store credit or a gifted VIP/birthday/referral reward), and Shopify must report the code was never used.\nThe discount code is removed from Shopify before the points are credited.\n\nReturns the updated customer loyalty details, like redeem-points.\n","operationId":"returnReward","parameters":["8e625702-e458-441b-a6cd-462b97eb9dc2"],"responses":{"200":"45747536-29c6-449f-b9df-cc223591ef25","400":"3c574b7b-fa6d-4e76-abc0-4ff5567a8257","401":"5edfa07d-d64d-4d6a-a1c0-072fd0ad952d"},"summary":"Return an unused reward for its points","tags":["Redemptions \u0026 Discount Codes"],"method":"post","type":"path","servers":["0cc0d43e-e7e4-4b39-b847-31981e9a2fcb"],"security":[],"path":"/loyalty/cp/api/return-reward/{rewardId}","baseUrlOptions":["https://{storeDomain}/apps"],"title":"Return an unused reward for its points","codeSamples":[],"requestExampleLanguages":["bash","python","javascript","node","php","go","ruby"],"requiredOnlyExamples":true,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"8e625702-e458-441b-a6cd-462b97eb9dc2":{"description":"ID of the customer's reward to return","in":"path","name":"rewardId","required":true,"schema":{"format":"int64","type":"integer","isRequired":true,"description":"ID of the customer's reward to return","uniqueKey":"","typeLabel":"integer\u003cint64>"}}},"responses":{"45747536-29c6-449f-b9df-cc223591ef25":{"content":{"application/json":{"schema":{"properties":{"achievableTierId":{"format":"int64","type":"integer","uniqueKey":"achievableTierId","typeLabel":"integer\u003cint64>"},"availablePoints":{"format":"double","type":"number","uniqueKey":"availablePoints","typeLabel":"number\u003cdouble>"},"createAt":{"format":"date-time","type":"string","uniqueKey":"createAt","typeLabel":"string\u003cdate-time>"},"creditedPoints":{"format":"double","type":"number","uniqueKey":"creditedPoints","typeLabel":"number\u003cdouble>"},"currentVipTier":{"type":"string","uniqueKey":"currentVipTier","typeLabel":"string"},"customerStatus":{"enum":["ACTIVE","INACTIVE","EXCLUDED","EXCLUDED_BY_CUSTOMER"],"type":"string","uniqueKey":"customerStatus","typeLabel":"enum\u003cstring>"},"dob":{"format":"date","type":"string","uniqueKey":"dob","typeLabel":"string\u003cdate>"},"dobYearProvided":{"type":"boolean","uniqueKey":"dobYearProvided","typeLabel":"boolean"},"expiringPointsAmount":{"format":"double","type":"number","uniqueKey":"expiringPointsAmount","typeLabel":"number\u003cdouble>"},"pendingPoints":{"format":"double","type":"number","uniqueKey":"pendingPoints","typeLabel":"number\u003cdouble>"},"pointsExpireAt":{"format":"date-time","type":"string","uniqueKey":"pointsExpireAt","typeLabel":"string\u003cdate-time>"},"referralLink":{"type":"string","uniqueKey":"referralLink","typeLabel":"string"},"referredCompleted":{"format":"int64","type":"integer","uniqueKey":"referredCompleted","typeLabel":"integer\u003cint64>"},"rewardedForCreatingAccount":{"type":"boolean","uniqueKey":"rewardedForCreatingAccount","typeLabel":"boolean"},"rewardedForFacebook":{"type":"boolean","uniqueKey":"rewardedForFacebook","typeLabel":"boolean"},"rewardedForInstagram":{"type":"boolean","uniqueKey":"rewardedForInstagram","typeLabel":"boolean"},"rewardedForNewsLetter":{"type":"boolean","uniqueKey":"rewardedForNewsLetter","typeLabel":"boolean"},"rewardedForPinterest":{"type":"boolean","uniqueKey":"rewardedForPinterest","typeLabel":"boolean"},"rewardedForSharingOnFacebook":{"type":"boolean","uniqueKey":"rewardedForSharingOnFacebook","typeLabel":"boolean"},"rewardedForSharingOnX":{"type":"boolean","uniqueKey":"rewardedForSharingOnX","typeLabel":"boolean"},"rewardedForSms":{"type":"boolean","uniqueKey":"rewardedForSms","typeLabel":"boolean"},"rewardedForTiktok":{"type":"boolean","uniqueKey":"rewardedForTiktok","typeLabel":"boolean"},"rewardedForTwitter":{"type":"boolean","uniqueKey":"rewardedForTwitter","typeLabel":"boolean"},"rewardedForYoutube":{"type":"boolean","uniqueKey":"rewardedForYoutube","typeLabel":"boolean"},"rewards":{"items":{"properties":{"createAt":{"format":"date-time","type":"string","isRequired":true,"uniqueKey":"rewards.items.[INDEX].createAt","typeLabel":"string\u003cdate-time>"},"customerId":{"format":"int64","type":"integer","isRequired":true,"uniqueKey":"rewards.items.[INDEX].customerId","typeLabel":"integer\u003cint64>"},"discountCode":{"type":"string","isRequired":true,"uniqueKey":"rewards.items.[INDEX].discountCode","typeLabel":"string"},"shop":{"type":"string","isRequired":true,"uniqueKey":"rewards.items.[INDEX].shop","typeLabel":"string"},"status":{"enum":["USED","UNUSED","REFUNDED","EXPIRED","SUBSCRIPTION_ACTIVE","CANCELED"],"type":"string","isRequired":true,"uniqueKey":"rewards.items.[INDEX].status","typeLabel":"enum\u003cstring>"},"activeFrom":{"format":"date-time","type":"string","uniqueKey":"rewards.items.[INDEX].activeFrom","typeLabel":"string\u003cdate-time>"},"amount":{"format":"double","type":"number","uniqueKey":"rewards.items.[INDEX].amount","typeLabel":"number\u003cdouble>"},"description":{"type":"string","uniqueKey":"rewards.items.[INDEX].description","typeLabel":"string"},"discountCodeId":{"type":"string","uniqueKey":"rewards.items.[INDEX].discountCodeId","typeLabel":"string"},"expireDate":{"format":"date-time","type":"string","uniqueKey":"rewards.items.[INDEX].expireDate","typeLabel":"string\u003cdate-time>"},"id":{"format":"int64","type":"integer","uniqueKey":"rewards.items.[INDEX].id","typeLabel":"integer\u003cint64>"},"lastExpiryReminderSentDate":{"format":"date-time","type":"string","uniqueKey":"rewards.items.[INDEX].lastExpiryReminderSentDate","typeLabel":"string\u003cdate-time>"},"orderId":{"format":"int64","type":"integer","uniqueKey":"rewards.items.[INDEX].orderId","typeLabel":"integer\u003cint64>"},"orderName":{"type":"string","uniqueKey":"rewards.items.[INDEX].orderName","typeLabel":"string"},"pointRedeemRuleId":{"format":"int64","type":"integer","uniqueKey":"rewards.items.[INDEX].pointRedeemRuleId","typeLabel":"integer\u003cint64>"},"pointTransactionId":{"format":"int64","type":"integer","uniqueKey":"rewards.items.[INDEX].pointTransactionId","typeLabel":"integer\u003cint64>"},"productData":{"type":"string","uniqueKey":"rewards.items.[INDEX].productData","typeLabel":"string"},"rewardType":{"enum":["STORE_CREDIT","DISCOUNT_CODE","POINTS"],"type":"string","uniqueKey":"rewards.items.[INDEX].rewardType","typeLabel":"enum\u003cstring>"},"usageCount":{"format":"int64","type":"integer","uniqueKey":"rewards.items.[INDEX].usageCount","typeLabel":"integer\u003cint64>"},"usedAt":{"format":"date-time","type":"string","uniqueKey":"rewards.items.[INDEX].usedAt","typeLabel":"string\u003cdate-time>"},"variantId":{"format":"int64","type":"integer","uniqueKey":"rewards.items.[INDEX].variantId","typeLabel":"integer\u003cint64>"}},"required":["createAt","customerId","discountCode","shop","status"],"type":"object","uniqueKey":"rewards.items.[INDEX]","typeLabel":"object"},"type":"array","uniqueKey":"rewards","typeLabel":"object[]"},"spentAmount":{"format":"double","type":"number","uniqueKey":"spentAmount","typeLabel":"number\u003cdouble>"},"storeCreditBalance":{"format":"double","type":"number","uniqueKey":"storeCreditBalance","typeLabel":"number\u003cdouble>"},"storeCreditCurrency":{"type":"string","uniqueKey":"storeCreditCurrency","typeLabel":"string"},"vipTierExpiredAt":{"format":"date-time","type":"string","uniqueKey":"vipTierExpiredAt","typeLabel":"string\u003cdate-time>"},"vipTierSpentAmount":{"format":"double","type":"number","uniqueKey":"vipTierSpentAmount","typeLabel":"number\u003cdouble>"}},"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"achievableTierId":123,"availablePoints":123,"createAt":"2023-11-07T05:31:56Z","creditedPoints":123,"currentVipTier":"\u003cstring>","customerStatus":"ACTIVE","dob":"2023-12-25","dobYearProvided":true,"expiringPointsAmount":123,"pendingPoints":123,"pointsExpireAt":"2023-11-07T05:31:56Z","referralLink":"\u003cstring>","referredCompleted":123,"rewardedForCreatingAccount":true,"rewardedForFacebook":true,"rewardedForInstagram":true,"rewardedForNewsLetter":true,"rewardedForPinterest":true,"rewardedForSharingOnFacebook":true,"rewardedForSharingOnX":true,"rewardedForSms":true,"rewardedForTiktok":true,"rewardedForTwitter":true,"rewardedForYoutube":true,"rewards":[{"createAt":"2023-11-07T05:31:56Z","customerId":123,"discountCode":"\u003cstring>","shop":"\u003cstring>","status":"USED","activeFrom":"2023-11-07T05:31:56Z","amount":123,"description":"\u003cstring>","discountCodeId":"\u003cstring>","expireDate":"2023-11-07T05:31:56Z","id":123,"lastExpiryReminderSentDate":"2023-11-07T05:31:56Z","orderId":123,"orderName":"\u003cstring>","pointRedeemRuleId":123,"pointTransactionId":123,"productData":"\u003cstring>","rewardType":"STORE_CREDIT","usageCount":123,"usedAt":"2023-11-07T05:31:56Z","variantId":123}],"spentAmount":123,"storeCreditBalance":123,"storeCreditCurrency":"\u003cstring>","vipTierExpiredAt":"2023-11-07T05:31:56Z","vipTierSpentAmount":123}}},"exampleType":"generated"}},"description":"Reward cancelled and points returned","exampleType":"generated"},"3c574b7b-fa6d-4e76-abc0-4ff5567a8257":{"content":{"application/json":{"schema":{"properties":{"achievableTierId":{"format":"int64","type":"integer","uniqueKey":"achievableTierId","typeLabel":"integer\u003cint64>"},"availablePoints":{"format":"double","type":"number","uniqueKey":"availablePoints","typeLabel":"number\u003cdouble>"},"createAt":{"format":"date-time","type":"string","uniqueKey":"createAt","typeLabel":"string\u003cdate-time>"},"creditedPoints":{"format":"double","type":"number","uniqueKey":"creditedPoints","typeLabel":"number\u003cdouble>"},"currentVipTier":{"type":"string","uniqueKey":"currentVipTier","typeLabel":"string"},"customerStatus":{"enum":["ACTIVE","INACTIVE","EXCLUDED","EXCLUDED_BY_CUSTOMER"],"type":"string","uniqueKey":"customerStatus","typeLabel":"enum\u003cstring>"},"dob":{"format":"date","type":"string","uniqueKey":"dob","typeLabel":"string\u003cdate>"},"dobYearProvided":{"type":"boolean","uniqueKey":"dobYearProvided","typeLabel":"boolean"},"expiringPointsAmount":{"format":"double","type":"number","uniqueKey":"expiringPointsAmount","typeLabel":"number\u003cdouble>"},"pendingPoints":{"format":"double","type":"number","uniqueKey":"pendingPoints","typeLabel":"number\u003cdouble>"},"pointsExpireAt":{"format":"date-time","type":"string","uniqueKey":"pointsExpireAt","typeLabel":"string\u003cdate-time>"},"referralLink":{"type":"string","uniqueKey":"referralLink","typeLabel":"string"},"referredCompleted":{"format":"int64","type":"integer","uniqueKey":"referredCompleted","typeLabel":"integer\u003cint64>"},"rewardedForCreatingAccount":{"type":"boolean","uniqueKey":"rewardedForCreatingAccount","typeLabel":"boolean"},"rewardedForFacebook":{"type":"boolean","uniqueKey":"rewardedForFacebook","typeLabel":"boolean"},"rewardedForInstagram":{"type":"boolean","uniqueKey":"rewardedForInstagram","typeLabel":"boolean"},"rewardedForNewsLetter":{"type":"boolean","uniqueKey":"rewardedForNewsLetter","typeLabel":"boolean"},"rewardedForPinterest":{"type":"boolean","uniqueKey":"rewardedForPinterest","typeLabel":"boolean"},"rewardedForSharingOnFacebook":{"type":"boolean","uniqueKey":"rewardedForSharingOnFacebook","typeLabel":"boolean"},"rewardedForSharingOnX":{"type":"boolean","uniqueKey":"rewardedForSharingOnX","typeLabel":"boolean"},"rewardedForSms":{"type":"boolean","uniqueKey":"rewardedForSms","typeLabel":"boolean"},"rewardedForTiktok":{"type":"boolean","uniqueKey":"rewardedForTiktok","typeLabel":"boolean"},"rewardedForTwitter":{"type":"boolean","uniqueKey":"rewardedForTwitter","typeLabel":"boolean"},"rewardedForYoutube":{"type":"boolean","uniqueKey":"rewardedForYoutube","typeLabel":"boolean"},"rewards":{"items":{"properties":{"createAt":{"format":"date-time","type":"string","isRequired":true,"uniqueKey":"rewards.items.[INDEX].createAt","typeLabel":"string\u003cdate-time>"},"customerId":{"format":"int64","type":"integer","isRequired":true,"uniqueKey":"rewards.items.[INDEX].customerId","typeLabel":"integer\u003cint64>"},"discountCode":{"type":"string","isRequired":true,"uniqueKey":"rewards.items.[INDEX].discountCode","typeLabel":"string"},"shop":{"type":"string","isRequired":true,"uniqueKey":"rewards.items.[INDEX].shop","typeLabel":"string"},"status":{"enum":["USED","UNUSED","REFUNDED","EXPIRED","SUBSCRIPTION_ACTIVE","CANCELED"],"type":"string","isRequired":true,"uniqueKey":"rewards.items.[INDEX].status","typeLabel":"enum\u003cstring>"},"activeFrom":{"format":"date-time","type":"string","uniqueKey":"rewards.items.[INDEX].activeFrom","typeLabel":"string\u003cdate-time>"},"amount":{"format":"double","type":"number","uniqueKey":"rewards.items.[INDEX].amount","typeLabel":"number\u003cdouble>"},"description":{"type":"string","uniqueKey":"rewards.items.[INDEX].description","typeLabel":"string"},"discountCodeId":{"type":"string","uniqueKey":"rewards.items.[INDEX].discountCodeId","typeLabel":"string"},"expireDate":{"format":"date-time","type":"string","uniqueKey":"rewards.items.[INDEX].expireDate","typeLabel":"string\u003cdate-time>"},"id":{"format":"int64","type":"integer","uniqueKey":"rewards.items.[INDEX].id","typeLabel":"integer\u003cint64>"},"lastExpiryReminderSentDate":{"format":"date-time","type":"string","uniqueKey":"rewards.items.[INDEX].lastExpiryReminderSentDate","typeLabel":"string\u003cdate-time>"},"orderId":{"format":"int64","type":"integer","uniqueKey":"rewards.items.[INDEX].orderId","typeLabel":"integer\u003cint64>"},"orderName":{"type":"string","uniqueKey":"rewards.items.[INDEX].orderName","typeLabel":"string"},"pointRedeemRuleId":{"format":"int64","type":"integer","uniqueKey":"rewards.items.[INDEX].pointRedeemRuleId","typeLabel":"integer\u003cint64>"},"pointTransactionId":{"format":"int64","type":"integer","uniqueKey":"rewards.items.[INDEX].pointTransactionId","typeLabel":"integer\u003cint64>"},"productData":{"type":"string","uniqueKey":"rewards.items.[INDEX].productData","typeLabel":"string"},"rewardType":{"enum":["STORE_CREDIT","DISCOUNT_CODE","POINTS"],"type":"string","uniqueKey":"rewards.items.[INDEX].rewardType","typeLabel":"enum\u003cstring>"},"usageCount":{"format":"int64","type":"integer","uniqueKey":"rewards.items.[INDEX].usageCount","typeLabel":"integer\u003cint64>"},"usedAt":{"format":"date-time","type":"string","uniqueKey":"rewards.items.[INDEX].usedAt","typeLabel":"string\u003cdate-time>"},"variantId":{"format":"int64","type":"integer","uniqueKey":"rewards.items.[INDEX].variantId","typeLabel":"integer\u003cint64>"}},"required":["createAt","customerId","discountCode","shop","status"],"type":"object","uniqueKey":"rewards.items.[INDEX]","typeLabel":"object"},"type":"array","uniqueKey":"rewards","typeLabel":"object[]"},"spentAmount":{"format":"double","type":"number","uniqueKey":"spentAmount","typeLabel":"number\u003cdouble>"},"storeCreditBalance":{"format":"double","type":"number","uniqueKey":"storeCreditBalance","typeLabel":"number\u003cdouble>"},"storeCreditCurrency":{"type":"string","uniqueKey":"storeCreditCurrency","typeLabel":"string"},"vipTierExpiredAt":{"format":"date-time","type":"string","uniqueKey":"vipTierExpiredAt","typeLabel":"string\u003cdate-time>"},"vipTierSpentAmount":{"format":"double","type":"number","uniqueKey":"vipTierSpentAmount","typeLabel":"number\u003cdouble>"}},"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"achievableTierId":123,"availablePoints":123,"createAt":"2023-11-07T05:31:56Z","creditedPoints":123,"currentVipTier":"\u003cstring>","customerStatus":"ACTIVE","dob":"2023-12-25","dobYearProvided":true,"expiringPointsAmount":123,"pendingPoints":123,"pointsExpireAt":"2023-11-07T05:31:56Z","referralLink":"\u003cstring>","referredCompleted":123,"rewardedForCreatingAccount":true,"rewardedForFacebook":true,"rewardedForInstagram":true,"rewardedForNewsLetter":true,"rewardedForPinterest":true,"rewardedForSharingOnFacebook":true,"rewardedForSharingOnX":true,"rewardedForSms":true,"rewardedForTiktok":true,"rewardedForTwitter":true,"rewardedForYoutube":true,"rewards":[{"createAt":"2023-11-07T05:31:56Z","customerId":123,"discountCode":"\u003cstring>","shop":"\u003cstring>","status":"USED","activeFrom":"2023-11-07T05:31:56Z","amount":123,"description":"\u003cstring>","discountCodeId":"\u003cstring>","expireDate":"2023-11-07T05:31:56Z","id":123,"lastExpiryReminderSentDate":"2023-11-07T05:31:56Z","orderId":123,"orderName":"\u003cstring>","pointRedeemRuleId":123,"pointTransactionId":123,"productData":"\u003cstring>","rewardType":"STORE_CREDIT","usageCount":123,"usedAt":"2023-11-07T05:31:56Z","variantId":123}],"spentAmount":123,"storeCreditBalance":123,"storeCreditCurrency":"\u003cstring>","vipTierExpiredAt":"2023-11-07T05:31:56Z","vipTierSpentAmount":123}}},"exampleType":"generated"}},"description":"Reward can't be returned. errorKey is one of rewardReturnDisabled, idnotfound, rewardNotUnused, rewardNotReturnable, rewardExpired, rewardUsageUnverified, rewardActionInProgress","exampleType":"generated"},"5edfa07d-d64d-4d6a-a1c0-072fd0ad952d":{"content":{"application/json":{"schema":{"properties":{"achievableTierId":{"format":"int64","type":"integer","uniqueKey":"achievableTierId","typeLabel":"integer\u003cint64>"},"availablePoints":{"format":"double","type":"number","uniqueKey":"availablePoints","typeLabel":"number\u003cdouble>"},"createAt":{"format":"date-time","type":"string","uniqueKey":"createAt","typeLabel":"string\u003cdate-time>"},"creditedPoints":{"format":"double","type":"number","uniqueKey":"creditedPoints","typeLabel":"number\u003cdouble>"},"currentVipTier":{"type":"string","uniqueKey":"currentVipTier","typeLabel":"string"},"customerStatus":{"enum":["ACTIVE","INACTIVE","EXCLUDED","EXCLUDED_BY_CUSTOMER"],"type":"string","uniqueKey":"customerStatus","typeLabel":"enum\u003cstring>"},"dob":{"format":"date","type":"string","uniqueKey":"dob","typeLabel":"string\u003cdate>"},"dobYearProvided":{"type":"boolean","uniqueKey":"dobYearProvided","typeLabel":"boolean"},"expiringPointsAmount":{"format":"double","type":"number","uniqueKey":"expiringPointsAmount","typeLabel":"number\u003cdouble>"},"pendingPoints":{"format":"double","type":"number","uniqueKey":"pendingPoints","typeLabel":"number\u003cdouble>"},"pointsExpireAt":{"format":"date-time","type":"string","uniqueKey":"pointsExpireAt","typeLabel":"string\u003cdate-time>"},"referralLink":{"type":"string","uniqueKey":"referralLink","typeLabel":"string"},"referredCompleted":{"format":"int64","type":"integer","uniqueKey":"referredCompleted","typeLabel":"integer\u003cint64>"},"rewardedForCreatingAccount":{"type":"boolean","uniqueKey":"rewardedForCreatingAccount","typeLabel":"boolean"},"rewardedForFacebook":{"type":"boolean","uniqueKey":"rewardedForFacebook","typeLabel":"boolean"},"rewardedForInstagram":{"type":"boolean","uniqueKey":"rewardedForInstagram","typeLabel":"boolean"},"rewardedForNewsLetter":{"type":"boolean","uniqueKey":"rewardedForNewsLetter","typeLabel":"boolean"},"rewardedForPinterest":{"type":"boolean","uniqueKey":"rewardedForPinterest","typeLabel":"boolean"},"rewardedForSharingOnFacebook":{"type":"boolean","uniqueKey":"rewardedForSharingOnFacebook","typeLabel":"boolean"},"rewardedForSharingOnX":{"type":"boolean","uniqueKey":"rewardedForSharingOnX","typeLabel":"boolean"},"rewardedForSms":{"type":"boolean","uniqueKey":"rewardedForSms","typeLabel":"boolean"},"rewardedForTiktok":{"type":"boolean","uniqueKey":"rewardedForTiktok","typeLabel":"boolean"},"rewardedForTwitter":{"type":"boolean","uniqueKey":"rewardedForTwitter","typeLabel":"boolean"},"rewardedForYoutube":{"type":"boolean","uniqueKey":"rewardedForYoutube","typeLabel":"boolean"},"rewards":{"items":{"properties":{"createAt":{"format":"date-time","type":"string","isRequired":true,"uniqueKey":"rewards.items.[INDEX].createAt","typeLabel":"string\u003cdate-time>"},"customerId":{"format":"int64","type":"integer","isRequired":true,"uniqueKey":"rewards.items.[INDEX].customerId","typeLabel":"integer\u003cint64>"},"discountCode":{"type":"string","isRequired":true,"uniqueKey":"rewards.items.[INDEX].discountCode","typeLabel":"string"},"shop":{"type":"string","isRequired":true,"uniqueKey":"rewards.items.[INDEX].shop","typeLabel":"string"},"status":{"enum":["USED","UNUSED","REFUNDED","EXPIRED","SUBSCRIPTION_ACTIVE","CANCELED"],"type":"string","isRequired":true,"uniqueKey":"rewards.items.[INDEX].status","typeLabel":"enum\u003cstring>"},"activeFrom":{"format":"date-time","type":"string","uniqueKey":"rewards.items.[INDEX].activeFrom","typeLabel":"string\u003cdate-time>"},"amount":{"format":"double","type":"number","uniqueKey":"rewards.items.[INDEX].amount","typeLabel":"number\u003cdouble>"},"description":{"type":"string","uniqueKey":"rewards.items.[INDEX].description","typeLabel":"string"},"discountCodeId":{"type":"string","uniqueKey":"rewards.items.[INDEX].discountCodeId","typeLabel":"string"},"expireDate":{"format":"date-time","type":"string","uniqueKey":"rewards.items.[INDEX].expireDate","typeLabel":"string\u003cdate-time>"},"id":{"format":"int64","type":"integer","uniqueKey":"rewards.items.[INDEX].id","typeLabel":"integer\u003cint64>"},"lastExpiryReminderSentDate":{"format":"date-time","type":"string","uniqueKey":"rewards.items.[INDEX].lastExpiryReminderSentDate","typeLabel":"string\u003cdate-time>"},"orderId":{"format":"int64","type":"integer","uniqueKey":"rewards.items.[INDEX].orderId","typeLabel":"integer\u003cint64>"},"orderName":{"type":"string","uniqueKey":"rewards.items.[INDEX].orderName","typeLabel":"string"},"pointRedeemRuleId":{"format":"int64","type":"integer","uniqueKey":"rewards.items.[INDEX].pointRedeemRuleId","typeLabel":"integer\u003cint64>"},"pointTransactionId":{"format":"int64","type":"integer","uniqueKey":"rewards.items.[INDEX].pointTransactionId","typeLabel":"integer\u003cint64>"},"productData":{"type":"string","uniqueKey":"rewards.items.[INDEX].productData","typeLabel":"string"},"rewardType":{"enum":["STORE_CREDIT","DISCOUNT_CODE","POINTS"],"type":"string","uniqueKey":"rewards.items.[INDEX].rewardType","typeLabel":"enum\u003cstring>"},"usageCount":{"format":"int64","type":"integer","uniqueKey":"rewards.items.[INDEX].usageCount","typeLabel":"integer\u003cint64>"},"usedAt":{"format":"date-time","type":"string","uniqueKey":"rewards.items.[INDEX].usedAt","typeLabel":"string\u003cdate-time>"},"variantId":{"format":"int64","type":"integer","uniqueKey":"rewards.items.[INDEX].variantId","typeLabel":"integer\u003cint64>"}},"required":["createAt","customerId","discountCode","shop","status"],"type":"object","uniqueKey":"rewards.items.[INDEX]","typeLabel":"object"},"type":"array","uniqueKey":"rewards","typeLabel":"object[]"},"spentAmount":{"format":"double","type":"number","uniqueKey":"spentAmount","typeLabel":"number\u003cdouble>"},"storeCreditBalance":{"format":"double","type":"number","uniqueKey":"storeCreditBalance","typeLabel":"number\u003cdouble>"},"storeCreditCurrency":{"type":"string","uniqueKey":"storeCreditCurrency","typeLabel":"string"},"vipTierExpiredAt":{"format":"date-time","type":"string","uniqueKey":"vipTierExpiredAt","typeLabel":"string\u003cdate-time>"},"vipTierSpentAmount":{"format":"double","type":"number","uniqueKey":"vipTierSpentAmount","typeLabel":"number\u003cdouble>"}},"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"achievableTierId":123,"availablePoints":123,"createAt":"2023-11-07T05:31:56Z","creditedPoints":123,"currentVipTier":"\u003cstring>","customerStatus":"ACTIVE","dob":"2023-12-25","dobYearProvided":true,"expiringPointsAmount":123,"pendingPoints":123,"pointsExpireAt":"2023-11-07T05:31:56Z","referralLink":"\u003cstring>","referredCompleted":123,"rewardedForCreatingAccount":true,"rewardedForFacebook":true,"rewardedForInstagram":true,"rewardedForNewsLetter":true,"rewardedForPinterest":true,"rewardedForSharingOnFacebook":true,"rewardedForSharingOnX":true,"rewardedForSms":true,"rewardedForTiktok":true,"rewardedForTwitter":true,"rewardedForYoutube":true,"rewards":[{"createAt":"2023-11-07T05:31:56Z","customerId":123,"discountCode":"\u003cstring>","shop":"\u003cstring>","status":"USED","activeFrom":"2023-11-07T05:31:56Z","amount":123,"description":"\u003cstring>","discountCodeId":"\u003cstring>","expireDate":"2023-11-07T05:31:56Z","id":123,"lastExpiryReminderSentDate":"2023-11-07T05:31:56Z","orderId":123,"orderName":"\u003cstring>","pointRedeemRuleId":123,"pointTransactionId":123,"productData":"\u003cstring>","rewardType":"STORE_CREDIT","usageCount":123,"usedAt":"2023-11-07T05:31:56Z","variantId":123}],"spentAmount":123,"storeCreditBalance":123,"storeCreditCurrency":"\u003cstring>","vipTierExpiredAt":"2023-11-07T05:31:56Z","vipTierSpentAmount":123}}},"exampleType":"generated"}},"description":"Customer not authenticated","exampleType":"generated"}},"security":{},"servers":{"0cc0d43e-e7e4-4b39-b847-31981e9a2fcb":{"description":"Shop's storefront domain (App Proxy). Must be called from the storefront by a logged-in customer.","url":"https://{storeDomain}/apps","variables":{"storeDomain":{"default":"your-store.myshopify.com"}}}}},"originalFileLocation":"loyalty/storefront-api-swagger.json"},"subdomain":"appstleinc-aeca3e0a","siteName":"Appstle","title":"Return an unused reward for its points - Appstle","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-27T19:01:04.248Z","originalFileLocation":"loyalty-storefront-api/redemptions-\u0026-discount-codes/return-an-unused-reward-for-its-points.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=\"light\";if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"light\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Cancels one of the authenticated customer\u0026#x27;s redeemed discount codes and credits the redeemed points back. Only available when the merchant enabled \u0026quot;Let customers return unused rewards\u0026quot; in Advanced Settings. The reward must belong to the authenticated customer, be UNUSED, not expired, bought with points (not store credit or a gifted VIP/birthday/referral reward), and Shopify must report the code was never used. The discount code is removed from Shopify before the points are credited. Returns the updated customer loyalty details, like redeem-points.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Appstle\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/appstleinc-aeca3e0a/qTHqMufQccFjyOE2/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/appstleinc-aeca3e0a/qTHqMufQccFjyOE2/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/appstleinc-aeca3e0a/qTHqMufQccFjyOE2/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/appstleinc-aeca3e0a/qTHqMufQccFjyOE2/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/appstleinc-aeca3e0a/qTHqMufQccFjyOE2/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/appstleinc-aeca3e0a/qTHqMufQccFjyOE2/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/appstleinc-aeca3e0a/qTHqMufQccFjyOE2/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/appstleinc-aeca3e0a/qTHqMufQccFjyOE2/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/appstleinc-aeca3e0a/qTHqMufQccFjyOE2/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Return an unused reward for its points - Appstle\">\u003cmeta data-mint-head property=\"og:description\" content=\"Cancels one of the authenticated customer\u0026#x27;s redeemed discount codes and credits the redeemed points back. Only available when the merchant enabled \u0026quot;Let customers return unused rewards\u0026quot; in Advanced Settings. The reward must belong to the authenticated customer, be UNUSED, not expired, bought with points (not store credit or a gifted VIP/birthday/referral reward), and Shopify must report the code was never used. The discount code is removed from Shopify before the points are credited. Returns the updated customer loyalty details, like redeem-points.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Appstle\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://developers.appstle.com/loyalty-storefront-api/redemptions-\u0026amp;-discount-codes/return-an-unused-reward-for-its-points\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://appstleinc-aeca3e0a.mintlify.app/_mintlify/api/og/v2?division=Redemptions+%26+Discount+Codes\u0026amp;title=Return+an+unused+reward+for+its+points\u0026amp;description=Cancels+one+of+the+authenticated+customer%27s+redeemed+discount+codes+and+credits+the+redeemed+points+back.%0A%0AOnly+available+when+the+merchant+enabled+%22Let+custome\u0026amp;theme=f3911f4da205a97f19a260f1\u0026amp;signature=52e79232910610345e370e44925d159876a14fdc7d8f7e0acde7c78cbf744bb6\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Return an unused reward for its points - Appstle\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Cancels one of the authenticated customer\u0026#x27;s redeemed discount codes and credits the redeemed points back. Only available when the merchant enabled \u0026quot;Let customers return unused rewards\u0026quot; in Advanced Settings. The reward must belong to the authenticated customer, be UNUSED, not expired, bought with points (not store credit or a gifted VIP/birthday/referral reward), and Shopify must report the code was never used. The discount code is removed from Shopify before the points are credited. Returns the updated customer loyalty details, like redeem-points.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://appstleinc-aeca3e0a.mintlify.app/_mintlify/api/og/v2?division=Redemptions+%26+Discount+Codes\u0026amp;title=Return+an+unused+reward+for+its+points\u0026amp;description=Cancels+one+of+the+authenticated+customer%27s+redeemed+discount+codes+and+credits+the+redeemed+points+back.%0A%0AOnly+available+when+the+merchant+enabled+%22Let+custome\u0026amp;theme=f3911f4da205a97f19a260f1\u0026amp;signature=52e79232910610345e370e44925d159876a14fdc7d8f7e0acde7c78cbf744bb6\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/appstleinc-aeca3e0a/qTHqMufQccFjyOE2/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Appstle\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0caceb\">\u003clink data-mint-head rel=\"canonical\" href=\"https://developers.appstle.com/loyalty-storefront-api/redemptions-\u0026amp;-discount-codes/return-an-unused-reward-for-its-points\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/loyalty-storefront-api/redemptions-%26-discount-codes/return-an-unused-reward-for-its-points.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://developers.appstle.com/#organization\",\"name\":\"Appstle\",\"url\":\"https://developers.appstle.com\"},{\"@type\":\"WebSite\",\"@id\":\"https://developers.appstle.com#website\",\"name\":\"Appstle\",\"url\":\"https://developers.appstle.com\",\"publisher\":{\"@id\":\"https://developers.appstle.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://developers.appstle.com/loyalty-storefront-api/redemptions-\u0026-discount-codes/return-an-unused-reward-for-its-points#webpage\",\"url\":\"https://developers.appstle.com/loyalty-storefront-api/redemptions-\u0026-discount-codes/return-an-unused-reward-for-its-points\",\"name\":\"Return an unused reward for its points\",\"description\":\"Cancels one of the authenticated customer's redeemed discount codes and credits the redeemed points back. Only available when the merchant enabled \\\"Let customers return unused rewards\\\" in Advanced Settings. The reward must belong to the authenticated customer, be UNUSED, not expired, bought with points (not store credit or a gifted VIP/birthday/referral reward), and Shopify must report the code was never used. The discount code is removed from Shopify before the points are credited. Returns the updated customer loyalty details, like redeem-points.\",\"dateModified\":\"2026-10-27T19:01:04.248Z\",\"isPartOf\":{\"@id\":\"https://developers.appstle.com#website\"},\"breadcrumb\":{\"@id\":\"https://developers.appstle.com/loyalty-storefront-api/redemptions-\u0026-discount-codes/return-an-unused-reward-for-its-points#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://developers.appstle.com/loyalty-storefront-api/redemptions-\u0026-discount-codes/return-an-unused-reward-for-its-points#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Storefront API\",\"item\":\"https://developers.appstle.com/loyalty-storefront-api/referrals/generate-customer-referral-url\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Redemptions \u0026 Discount Codes\",\"item\":\"https://developers.appstle.com/loyalty-storefront-api/redemptions-\u0026-discount-codes/redeem-customer-loyalty-points\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Return an unused reward for its points\",\"item\":\"https://developers.appstle.com/loyalty-storefront-api/redemptions-\u0026-discount-codes/return-an-unused-reward-for-its-points\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://developers.appstle.com/loyalty-storefront-api/redemptions-\u0026-discount-codes/return-an-unused-reward-for-its-points#apireference\",\"headline\":\"Return an unused reward for its points\",\"name\":\"Return an unused reward for its points\",\"description\":\"Cancels one of the authenticated customer's redeemed discount codes and credits the redeemed points back. Only available when the merchant enabled \\\"Let customers return unused rewards\\\" in Advanced Settings. The reward must belong to the authenticated customer, be UNUSED, not expired, bought with points (not store credit or a gifted VIP/birthday/referral reward), and Shopify must report the code was never used. The discount code is removed from Shopify before the points are credited. Returns the updated customer loyalty details, like redeem-points.\",\"url\":\"https://developers.appstle.com/loyalty-storefront-api/redemptions-\u0026-discount-codes/return-an-unused-reward-for-its-points\",\"mainEntityOfPage\":{\"@id\":\"https://developers.appstle.com/loyalty-storefront-api/redemptions-\u0026-discount-codes/return-an-unused-reward-for-its-points#webpage\"},\"dateModified\":\"2026-10-27T19:01:04.248Z\",\"publisher\":{\"@id\":\"https://developers.appstle.com/#organization\"},\"isPartOf\":{\"@id\":\"https://developers.appstle.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Appstle\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Appstle","nav":{"global":null,"products":[{"product":"Subscriptions","icon":"arrows-rotate","description":"Recurring orders, selling plans, and the customer portal","pages":[{"title":"Subscriptions","href":"/subscription/introduction"}]},{"product":"Loyalty","icon":"medal","description":"Points, VIP tiers, rewards, referrals, and store credit","groups":[{"group":"Get Started","pages":[{"title":"Appstle Loyalty: Points, VIP Tiers \u0026 Referrals","sidebarTitle":"Introduction","href":"/loyalty/introduction"},{"title":"Authenticate with the Appstle Loyalty API","sidebarTitle":"Authentication","href":"/loyalty/authentication"},{"title":"Get started with Appstle Loyalty API","sidebarTitle":"Quickstart","href":"/loyalty/quickstart"}]},{"group":"Guides","pages":[{"title":"Appstle Loyalty third-party integration guide","sidebarTitle":"Integration guide","href":"/loyalty/integration-guide"},{"title":"Automate loyalty with Shopify Flow","sidebarTitle":"Shopify Flow","href":"/loyalty/shopify-flow"},{"title":"Shopify metafields and tags for Appstle Loyalty","sidebarTitle":"Metafields \u0026 tags","href":"/loyalty/metafields-and-tags"}]},{"group":"Partner Integration","pages":[{"title":"Partner Integration Framework overview","sidebarTitle":"Framework overview","href":"/loyalty/partner-framework-overview"},{"title":"Partner Integration Framework","sidebarTitle":"Partner integration","href":"/loyalty/partner-integration"}]},{"group":"Webhooks","pages":[{"title":"Appstle Loyalty webhook events and setup","sidebarTitle":"Webhooks","href":"/loyalty/webhooks"}]},{"group":"Admin API","pages":[{"group":"Points \u0026 Earn Rules","pages":[{"title":"Add store credits to customer account","deprecated":null,"version":null,"openapi":"/loyalty/admin-api-swagger.json post /api/external/add-credits","href":"/loyalty-admin-api/points-\u0026-earn-rules/add-store-credits-to-customer-account"},{"title":"Add points to customer account","deprecated":null,"version":null,"openapi":"/loyalty/admin-api-swagger.json post /api/external/add-points","href":"/loyalty-admin-api/points-\u0026-earn-rules/add-points-to-customer-account"},{"title":"Approve pending point transactions","deprecated":null,"version":null,"openapi":"/loyalty/admin-api-swagger.json put /api/external/approve-pending-transactions","href":"/loyalty-admin-api/points-\u0026-earn-rules/approve-pending-point-transactions"},{"title":"Get all point earning rules","deprecated":null,"version":null,"openapi":"/loyalty/admin-api-swagger.json get /api/external/point-earn-rules","href":"/loyalty-admin-api/points-\u0026-earn-rules/get-all-point-earning-rules"},{"title":"Get customer point transaction history","deprecated":null,"version":null,"openapi":"/loyalty/admin-api-swagger.json get /api/external/point-transaction-history/{customer_id}","href":"/loyalty-admin-api/points-\u0026-earn-rules/get-customer-point-transaction-history"},{"title":"Remove points from customer account","deprecated":null,"version":null,"openapi":"/loyalty/admin-api-swagger.json post /api/external/remove-points","href":"/loyalty-admin-api/points-\u0026-earn-rules/remove-points-from-customer-account"},{"title":"Get top customers by points earned","deprecated":null,"version":null,"openapi":"/loyalty/admin-api-swagger.json get /api/external/top-customers","href":"/loyalty-admin-api/points-\u0026-earn-rules/get-top-customers-by-points-earned"}]},{"group":"Redemptions \u0026 Discount Codes","pages":[{"title":"Check discount code validity","deprecated":null,"version":null,"openapi":"/loyalty/admin-api-swagger.json put /api/external/check-discount","href":"/loyalty-admin-api/redemptions-\u0026-discount-codes/check-discount-code-validity"},{"title":"Get all point redemption rules","deprecated":null,"version":null,"openapi":"/loyalty/admin-api-swagger.json get /api/external/point-redeem-rules","href":"/loyalty-admin-api/redemptions-\u0026-discount-codes/get-all-point-redemption-rules"},{"title":"Redeem customer points for rewards","deprecated":null,"version":null,"openapi":"/loyalty/admin-api-swagger.json post /api/external/redeem-points","href":"/loyalty-admin-api/redemptions-\u0026-discount-codes/redeem-customer-points-for-rewards"},{"title":"Update discount code status","deprecated":null,"version":null,"openapi":"/loyalty/admin-api-swagger.json put /api/external/update-discount","href":"/loyalty-admin-api/redemptions-\u0026-discount-codes/update-discount-code-status"},{"title":"Update discount code status (legacy endpoint)","deprecated":null,"version":null,"openapi":"/loyalty/admin-api-swagger.json put /api/external/update-discount-code-status","href":"/loyalty-admin-api/redemptions-\u0026-discount-codes/update-discount-code-status-legacy-endpoint"}]},{"group":"Customer Enrollment \u0026 Profile","pages":[{"title":"Get customer loyalty details","deprecated":null,"version":null,"openapi":"/loyalty/admin-api-swagger.json get /api/external/customer-loyalty","href":"/loyalty-admin-api/customer-enrollment-\u0026-profile/get-customer-loyalty-details"},{"title":"Enroll customer in loyalty program","deprecated":null,"version":null,"openapi":"/loyalty/admin-api-swagger.json post /api/external/enroll-customer","href":"/loyalty-admin-api/customer-enrollment-\u0026-profile/enroll-customer-in-loyalty-program"},{"title":"Update customer birth date","deprecated":null,"version":null,"openapi":"/loyalty/admin-api-swagger.json put /api/external/update-customer-birth-date","href":"/loyalty-admin-api/customer-enrollment-\u0026-profile/update-customer-birth-date"}]},{"group":"Storefront Widgets \u0026 Labels","pages":[{"title":"List storefront widget label translations","deprecated":null,"version":null,"openapi":"/loyalty/admin-api-swagger.json get /api/external/widget-labels","href":"/loyalty-admin-api/storefront-widgets-\u0026-labels/list-storefront-widget-label-translations"}]}]},{"group":"Storefront API","pages":[{"group":"Referrals","pages":[{"title":"Generate customer referral URL","deprecated":null,"version":null,"openapi":"/loyalty/storefront-api-swagger.json post /loyalty/cp/api/add-customer-referral-url","href":"/loyalty-storefront-api/referrals/generate-customer-referral-url"},{"title":"Get customer referral history","deprecated":null,"version":null,"openapi":"/loyalty/storefront-api-swagger.json get /loyalty/cp/api/customer-referrals","href":"/loyalty-storefront-api/referrals/get-customer-referral-history"},{"title":"Accept referral offer (GET)","deprecated":null,"version":null,"openapi":"/loyalty/storefront-api-swagger.json get /loyalty/cp/api/referral-rules/accept-offer","href":"/loyalty-storefront-api/referrals/accept-referral-offer-get"},{"title":"Accept referral offer (POST)","deprecated":null,"version":null,"openapi":"/loyalty/storefront-api-swagger.json post /loyalty/cp/api/referral-rules/accept-offer","href":"/loyalty-storefront-api/referrals/accept-referral-offer-post"},{"title":"Send customer referral email","deprecated":null,"version":null,"openapi":"/loyalty/storefront-api-swagger.json post /loyalty/cp/api/send-customer-referral-url","href":"/loyalty-storefront-api/referrals/send-customer-referral-email"}]},{"group":"Points \u0026 Earn Rules","pages":[{"title":"Claim social media reward points","deprecated":null,"version":null,"openapi":"/loyalty/storefront-api-swagger.json post /loyalty/cp/api/claim-social-media-points","href":"/loyalty-storefront-api/points-\u0026-earn-rules/claim-social-media-reward-points"},{"title":"Track customer store visit","deprecated":null,"version":null,"openapi":"/loyalty/storefront-api-swagger.json post /loyalty/cp/api/customer-visit-store","href":"/loyalty-storefront-api/points-\u0026-earn-rules/track-customer-store-visit"},{"title":"Get customer point transaction history","deprecated":null,"version":null,"openapi":"/loyalty/storefront-api-swagger.json get /loyalty/cp/api/transaction-by-shop","href":"/loyalty-storefront-api/points-\u0026-earn-rules/get-customer-point-transaction-history"}]},{"group":"Customer Enrollment \u0026 Profile","pages":[{"title":"Get customer loyalty information","deprecated":null,"version":null,"openapi":"/loyalty/storefront-api-swagger.json get /loyalty/cp/api/customer-loyalty","href":"/loyalty-storefront-api/customer-enrollment-\u0026-profile/get-customer-loyalty-information"},{"title":"Enable loyalty program for customer","deprecated":null,"version":null,"openapi":"/loyalty/storefront-api-swagger.json post /loyalty/cp/api/enable-loyalty-program","href":"/loyalty-storefront-api/customer-enrollment-\u0026-profile/enable-loyalty-program-for-customer"},{"title":"Enroll customer in loyalty program","deprecated":null,"version":null,"openapi":"/loyalty/storefront-api-swagger.json post /loyalty/cp/api/enroll-customer","href":"/loyalty-storefront-api/customer-enrollment-\u0026-profile/enroll-customer-in-loyalty-program"},{"title":"Get logged-in customer ID","deprecated":null,"version":null,"openapi":"/loyalty/storefront-api-swagger.json get /loyalty/cp/api/logged-in-customer","href":"/loyalty-storefront-api/customer-enrollment-\u0026-profile/get-logged-in-customer-id"},{"title":"Sync customer metafield data","deprecated":null,"version":null,"openapi":"/loyalty/storefront-api-swagger.json post /loyalty/cp/api/update-customer","href":"/loyalty-storefront-api/customer-enrollment-\u0026-profile/sync-customer-metafield-data"},{"title":"Update customer birth date","deprecated":null,"version":null,"openapi":"/loyalty/storefront-api-swagger.json post /loyalty/cp/api/update-customer-birth-date","href":"/loyalty-storefront-api/customer-enrollment-\u0026-profile/update-customer-birth-date"},{"title":"Update customer loyalty status","deprecated":null,"version":null,"openapi":"/loyalty/storefront-api-swagger.json post /loyalty/cp/api/update-customer-status","href":"/loyalty-storefront-api/customer-enrollment-\u0026-profile/update-customer-loyalty-status"}]},{"group":"store-front-resource","pages":[{"title":"Get loyaltycpapinotification session","deprecated":null,"version":null,"openapi":"/loyalty/storefront-api-swagger.json get /loyalty/cp/api/notification-session","href":"/loyalty-storefront-api/store-front-resource/get-loyaltycpapinotification-session"},{"title":"Post loyaltycpapisubmit review","deprecated":null,"version":null,"openapi":"/loyalty/storefront-api-swagger.json post /loyalty/cp/api/submit-review/{reviewToken}","href":"/loyalty-storefront-api/store-front-resource/post-loyaltycpapisubmit-review"}]},{"group":"Reviews","pages":[{"title":"Get product reviews by product ID","deprecated":null,"version":null,"openapi":"/loyalty/storefront-api-swagger.json get /loyalty/cp/api/product-review-details/{productId}","href":"/loyalty-storefront-api/reviews/get-product-reviews-by-product-id"},{"title":"Submit product review","deprecated":null,"version":null,"openapi":"/loyalty/storefront-api-swagger.json post /loyalty/cp/api/submit-review","href":"/loyalty-storefront-api/reviews/submit-product-review"}]},{"group":"Redemptions \u0026 Discount Codes","pages":[{"title":"Redeem customer loyalty points","description":"Allows the authenticated customer to redeem their loyalty points for rewards.\n\n**Redemption flow:**\n1. Customer selects a reward from available options\n2. Frontend calls this endpoint with redeemRuleId\n3. System validates customer has sufficient points\n4. Points are deducted from available balance\n5. Discount code is created in Shopify\n6. Reward record is created with status \"UNUSED\"\n7. Transaction is logged\n8. Updated loyalty info is returned\n9. Customer receives discount code to use at checkout\n\n**Request body fields:**\n- redeemRuleId: ID of reward to redeem (required)\n Get available options from GET /loyalty/cp/api/customer-loyalty\n- points: Override default points (optional)\n If not provided, uses the redemption rule's default point value\n- variantId: Required for product-specific rewards (optional)\n Shopify variant ID for \"free product\" type rewards\n\n**Authentication:**\nRequires customer JWT token. The authenticated customer is the one redeeming points.\nCannot redeem points on behalf of another customer.\n\n**Validation checks:**\n- Customer is authenticated\n- Customer has sufficient availablePoints\n- Redemption rule exists and is active\n- For product rewards, variantId is provided\n- Customer is enrolled in loyalty program\n- Customer status is ACTIVE (not excluded)\n\n**What happens to points:**\n- Deducted from availablePoints immediately\n- Added to lifetime spending total\n- Transaction created with type \"REDEEMED\"\n- Cannot be undone (points deduction is final)\n\n**Discount code generation:**\n- For discounts: Creates Shopify discount code\n- Code is unique per customer\n- Has expiry date if configured\n- Minimum purchase amount if configured\n- Product/collection restrictions if configured\n\n**Store credit rewards:**\n- Adds value to storeCreditBalance instead of creating discount code\n- Can be used as payment method at checkout\n- Managed separately from Shopify discount codes\n\n**Error scenarios:**\n- Insufficient points: availablePoints is lower than the required points\n- Invalid rule: redeemRuleId doesn't exist or is inactive\n- Missing variantId: Required for product rewards\n- Customer not enrolled: Must enroll first\n- Customer excluded: EXCLUDED or EXCLUDED_BY_CUSTOMER status\n- System error: Shopify API failure, discount code creation failure\n\n**Best practices:**\n1. Check availablePoints before showing redemption options\n2. Display point cost clearly to customer\n3. Show expected reward (discount %, amount, etc.)\n4. Handle errors gracefully with clear messages\n5. After success, show discount code prominently\n6. Provide copy-to-clipboard functionality for code\n7. Explain when/how to use the discount code\n\n**Example response handling:**\n```javascript\n// After successful redemption\nconst response = await redeemPoints(ruleId);\n// Find the newly created reward\nconst newReward = response.rewards.find(r => r.status === 'UNUSED');\n// Display to customer\nshowDiscountCode(newReward.discountCode, newReward.expiryDate);\n```\n\n**Common UI flow:**\n1. Display available redemption options with point costs\n2. Customer clicks \"Redeem\"\n3. Show confirmation dialog with point cost\n4. Call this endpoint\n5. On success: Show discount code in modal/banner\n6. Update points display with new balance\n7. Add code to \"My Rewards\" list\n","deprecated":null,"version":null,"openapi":"/loyalty/storefront-api-swagger.json post /loyalty/cp/api/redeem-points","href":"/loyalty-storefront-api/redemptions-\u0026-discount-codes/redeem-customer-loyalty-points"},{"title":"Return an unused reward for its points","deprecated":null,"version":null,"openapi":"/loyalty/storefront-api-swagger.json post /loyalty/cp/api/return-reward/{rewardId}","href":"/loyalty-storefront-api/redemptions-\u0026-discount-codes/return-an-unused-reward-for-its-points"}]},{"group":"Product Catalog","pages":[{"title":"Proxy a Shopify Storefront GraphQL request from the customer portal","description":null,"deprecated":null,"version":null,"openapi":"/loyalty/storefront-api-swagger.json post /loyalty/cp/api/storefront-graphql","href":"/loyalty-storefront-api/product-catalog/proxy-a-shopify-storefront-graphql-request-from-the-customer-portal"}]}]}]},{"product":"Memberships","icon":"id-card","description":"Membership plans, member perks, billing, and access control","pages":[{"title":"Memberships","href":"/memberships/introduction"}]},{"product":"Bundles","icon":"boxes-stacked","description":"Fixed, dynamic, and volume-discount bundles plus Build-a-Box","pages":[{"title":"Bundles","href":"/bundles/introduction"}]}]},"title":"Return an unused reward for its points - Appstle","buildId":"dpl_2oYXwqkEXirXBPk8wV1FtM5USFWi","deploymentId":"dpl_2oYXwqkEXirXBPk8wV1FtM5USFWi","dynamics":["c2aa737661","b0f84f53ff","a9bb46feb3","2b790eda92"],"chunks":["OpenApiReferenceProvider-WRhTSUDL.js","utils-ChMov4Kr.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-_REmC2bI.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-Bp6nVRCu.js","snippetPresets-DZadmXoU.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","Page-R3M_BF4L.js","ApiExamples-CY2WdoTl.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-DwYG-Q4l.js","shallow-BXQIGwv4.js","getApiPlaygroundDisplay-CK5nK5B9.js","CodeSnippet-TH4a2aGW.js","CodeSnippets-DwsQiOFS.js","getPastedJson-DD7kUzi_.js","icon-holE3QoJ.js","MethodPill-DUW0T8us.js","DuplicateIcon-CI_p4be-.js","createIcon-BdbRvavb.js","DynamicMarkdown-DN96a4Ur.js","SectionHeading-SCu36A9d.js","axios-vUo_bRtp.js","Markdown-CCeGv-zI.js","clsx-BGBGWFTt.js","lib--scc4DXi.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-Cv_O2fky.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-2C5OB2eV.js"]}