{ "rewards": [ { "id": "MkkhgM", "value": 5.0, "minimum": 25.0, "maximum": null, "label": "$5 off your next purchase", "state": "redeemable", "type": "amount", "products": [], "fine_print": "Minimum purchase size is $25 for redemption.", "retire_at": null, "restriction_location_ids": [] }, { "id": "M6QhQN", "value": 10.0, "minimum": null, "maximum": null, "label": "10% off your next purchase", "state": "redeemable", "type": "percent", "products": [], "fine_print": "", "retire_at": null, "restriction_location_ids": [] } ], "points_products": [ { "id": "AqdC9L", "points": 100, "value": 5.0, "minimum": 10.0, "maximum": null, "label": "$5 off your next purchase", "state": "redeemable", "type": "amount", "products": [], "fine_print": "Minimum purchase size is $10 for redemption.", "restriction_location_ids": [] } ]}
{ "code": 400, "message": "redemption_venue must be one of: instore, online"}
{ "code": 401, "message": "The Merchant-Key header is missing or invalid"}
Reference
Qualifying Rewards for a Basket
Returns the subset of the user’s rewards and points products that would actually produce a discount against a given basket. Read-only dry-run companion to Create & Update Basket — no state is mutated, no reward is redeemed, and no points are debited.
{ "rewards": [ { "id": "MkkhgM", "value": 5.0, "minimum": 25.0, "maximum": null, "label": "$5 off your next purchase", "state": "redeemable", "type": "amount", "products": [], "fine_print": "Minimum purchase size is $25 for redemption.", "retire_at": null, "restriction_location_ids": [] }, { "id": "M6QhQN", "value": 10.0, "minimum": null, "maximum": null, "label": "10% off your next purchase", "state": "redeemable", "type": "percent", "products": [], "fine_print": "", "retire_at": null, "restriction_location_ids": [] } ], "points_products": [ { "id": "AqdC9L", "points": 100, "value": 5.0, "minimum": 10.0, "maximum": null, "label": "$5 off your next purchase", "state": "redeemable", "type": "amount", "products": [], "fine_print": "Minimum purchase size is $10 for redemption.", "restriction_location_ids": [] } ]}
{ "code": 400, "message": "redemption_venue must be one of: instore, online"}
{ "code": 401, "message": "The Merchant-Key header is missing or invalid"}
Use this endpoint to surface “applicable” offers to a customer before checkout (e.g. an offers carousel that only shows rewards the customer can use against the current basket). For the full unfiltered list of what the user owns, use Get Account instead.
Read-only dry-run of Create & Update Basket — same eligibility and discount-calculation logic, no state mutation, no points debit. It accepts the same request body shape, including the flat, top-level location_uid string used for location-restricted rewards.
POST /baskets runs the full reward redemption pipeline (state machine, validation, side effects).
POST /baskets/qualifying runs the same eligibility and discount calculation logic, but does not mutate state, does not redeem any reward, and does not debit points. It returns the rewards and points products that would apply if the basket were submitted as-is.
A reward returned by this endpoint is one that Create & Update Basket would accept for the same basket shape — the two endpoints share the same applicability check.
Every field is optional on this endpoint. Unlike Create & Update Basket — where fields such as location_uid, items, and subtotal are required — /baskets/qualifying accepts them all optionally; omitting a field simply reduces the precision of the qualifying set (see the per-field notes below). Any field accepted by Create & Update Basket is also accepted here and forwarded into the discount calculation engine unchanged.
Thanx Location UID, used to apply reward location restrictions — the same flat, top-level location_uid accepted by Create & Update Basket.A mapping of Thanx location identifiers can be provided by the Thanx developer support team or fetched from the following endpoints depending on your integration type:
Item amount. Include this so item-redeem rewards (free item, BOGO, modifier-discount) can be calculated — without it, item-type rewards resolve to a $0 discount and are filtered out of the response.
Basket subtotal in USD (pre-discount). Include it so minimum-gated rewards can be evaluated — without it, minimum-gated rewards are treated as not-yet-qualifying and filtered out.
Rewards the user owns that (1) pass eligibility (state, ownership, location, time restrictions, handoff, expiration), AND (2) would produce a positive discount against the supplied basket.Ordering: effective expiration ascending (soonest-to-expire first); rewards without an expiration are placed last; reward id is the tiebreaker.
The value of the discount. For amount rewards, the dollar amount off (10.0 = $10 off). For percent rewards, the percentage off (10.0 = 10% off). This field is returned for every reward type, but it does not describe the discount for item or fixed_price rewards — do not use it for those types. Use label to describe them.
A basket with no items and no subtotal always returns empty arrays:
{ "rewards": [], "points_products": [] }
This is intentional — nothing in the user’s portfolio can produce a positive discount against a nonexistent basket. Treat empty arrays as “no applicable offers for the current basket” rather than “the user has no offers at all”; for the full unfiltered list, use Get Account.
Call frequency. Safe to call on every basket change (item added or removed, quantity changed). The endpoint is read-only and does not mutate user or merchant state.
Do not cache responses across baskets. The qualifying set changes with basket contents — caching defeats the purpose of the endpoint.
Item prices: include price on each item so item-redeem rewards (free item, BOGO) are evaluated. Without prices, item-type rewards resolve to a $0 discount and are filtered out.
Location and timestamp: include location_uid and order_timestamp when known so location-restricted and time-restricted rewards filter correctly. Omitting these is safe — they default to “no restriction match” / “current server time” — but means location-restricted offers may surface for baskets that ultimately won’t be eligible at checkout.
Handoff restrictions: rewards limited to a specific handoff mode (e.g. a delivery-only offer) are returned only when the request body’s handoff matches the reward’s restriction; omit handoff and those rewards are filtered out. As with Create & Update Basket, handoff is read from the request body and applied to reward eligibility.
Redemption still requires POST /baskets. A reward returned here is one that Create & Update Basket would accept for the same basket. Calling /baskets/qualifying does not redeem anything; partners must still call /baskets at checkout to actually apply the reward.
Create & Update Basket — the redemption endpoint; the same applicability check used here.
Get Account — full unfiltered list of the user’s rewards and affordable points products (no basket filtering).
Loyalty API Headers — required Authorization, Merchant-Key, and Accept headers.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Thanx","public":true,"colors":{"primary":"#129B9B","light":"#13C1BF","dark":"#129B9B"},"logo":{"light":"https://mintcdn.com/thanx/NEzLP0j6kJjm2liR/logo/light.svg?fit=max\u0026auto=format\u0026n=NEzLP0j6kJjm2liR\u0026q=85\u0026s=8b3bd3f1ffbb1567714a92067df956d9","dark":"https://mintcdn.com/thanx/NEzLP0j6kJjm2liR/logo/dark.svg?fit=max\u0026auto=format\u0026n=NEzLP0j6kJjm2liR\u0026q=85\u0026s=9b7fc286cc5789385ace66cf725d131f"},"favicon":"https://mintcdn.com/thanx/slNzKdUXQiByOc6X/favicon.png?fit=max\u0026auto=format\u0026n=slNzKdUXQiByOc6X\u0026q=85\u0026s=bc7fda50982b59fe2dd5384ca7bd2961","api":{},"styling":{"latex":true},"navigation":{"global":{"anchors":[{"anchor":"Help Center","icon":"book-bookmark","href":"https://help.thanx.com/hc/en-us"},{"anchor":"Thanx Product Updates","icon":"bullhorn","href":"https://thanx.launchnotes.io/"},{"anchor":"Status","icon":"wave-pulse","href":"https://status.thanx.com"},{"anchor":"Email Support","icon":"envelope","href":"mailto:developer.support@thanx.com"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"thanx","hasAudioNarration":false,"actualSubdomain":"thanx","customDomains":["docs.thanx.com"],"gitSource":{"type":"github","owner":"thanx","repo":"thanx-docs","deployBranch":"master","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6aea117f98ee2cfbfea95812","collectionId":"99582c81-7caa-4f62-b8fc-3dd133171cc4","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6aea117f98ee2cfbfea95812"},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6aea117f98ee2cfbfea95812","clientVersion":"0.0.4054","searchFilterCounts":[{"language":"default","tag":"Reference","count":101},{"language":"default","tag":"Consumer API","count":90},{"language":"default","tag":"Data Exports","count":39},{"language":"default","tag":"Partner API","count":32},{"language":"default","tag":"Thanx Connex","count":24},{"language":"default","tag":"Destination Setup","count":23},{"language":"default","tag":"Overview","count":22},{"language":"default","tag":"Loyalty API","count":11},{"language":"default","tag":"Models","count":10},{"language":"default","tag":"Users","count":8}]},"assistantConfig":{},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"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":"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":"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":"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":"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":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","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":"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":"turbopuffer-dual-write","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},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"loyalty/qualifying-baskets","slug":"/loyalty/qualifying-baskets","pageMetadata":{"title":"Qualifying Rewards for a Basket","api":"POST https://loyalty.thanxsandbox.com/api/baskets/qualifying","description":"Returns the subset of the user's rewards and points products that would actually produce a discount against a given basket. Read-only dry-run companion to Create \u0026 Update Basket — no state is mutated, no reward is redeemed, and no points are debited.","href":"/loyalty/qualifying-baskets"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Returns the subset of the user’s rewards and points products that would actually produce a discount against a given basket. Read-only dry-run companion to Create \u0026 Update Basket — no state is mutated, no reward is redeemed, and no points are debited.\"\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,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,em:`em`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Expandable,Heading,Note,ParamField,ResponseField,Table,Tip,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tip)_missingMdxReference(`Tip`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(Tip,{children:_jsxs(_components.p,{children:[`Use this endpoint to surface “applicable” offers to a customer before checkout (e.g. an offers carousel that only shows rewards the customer can use against the current basket). For the full unfiltered list of what the user owns, use `,_jsx(_components.a,{href:`/loyalty/get-account`,children:`Get Account`}),` instead.`]})}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`Read-only dry-run of `,_jsx(_components.a,{href:`/loyalty/create-update-basket`,children:`Create \u0026 Update Basket`}),` — same eligibility and discount-calculation logic, no state mutation, no points debit. It accepts the same request body shape, including the flat, top-level `,_jsx(_components.code,{children:`location_uid`}),` string used for location-restricted rewards.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`overview`,children:`Overview`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`POST /baskets/qualifying`}),` is a dry-run companion to `,_jsx(_components.a,{href:`/loyalty/create-update-basket`,children:`Create \u0026 Update Basket`}),`:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`POST /baskets`}),` runs the full reward redemption pipeline (state machine, validation, side effects).`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`POST /baskets/qualifying`}),` runs the same eligibility and discount calculation logic, but does `,_jsx(_components.strong,{children:`not`}),` mutate state, does `,_jsx(_components.strong,{children:`not`}),` redeem any reward, and does `,_jsx(_components.strong,{children:`not`}),` debit points. It returns the rewards and points products that `,_jsx(_components.em,{children:`would`}),` apply if the basket were submitted as-is.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`A reward returned by this endpoint is one that `,_jsx(_components.a,{href:`/loyalty/create-update-basket`,children:`Create \u0026 Update Basket`}),` would accept for the same basket shape — the two endpoints share the same applicability check.`]}),`\n`,_jsx(Heading,{level:`2`,id:`http-request`,children:`HTTP Request`}),`\n`,_jsx(Heading,{level:`3`,id:`parameters`,children:`Parameters`}),`\n`,_jsxs(_components.p,{children:[`Every field is optional on this endpoint. Unlike `,_jsx(_components.a,{href:`/loyalty/create-update-basket`,children:`Create \u0026 Update Basket`}),` — where fields such as `,_jsx(_components.code,{children:`location_uid`}),`, `,_jsx(_components.code,{children:`items`}),`, and `,_jsx(_components.code,{children:`subtotal`}),` are required — `,_jsx(_components.code,{children:`/baskets/qualifying`}),` accepts them all optionally; omitting a field simply reduces the precision of the qualifying set (see the per-field notes below). Any field accepted by Create \u0026 Update Basket is also accepted here and forwarded into the discount calculation engine unchanged.`]}),`\n`,_jsx(ParamField,{body:`redemption_venue`,type:`string`,id:`param-redemption-venue`,children:_jsxs(_components.p,{children:[`Either `,_jsx(_components.code,{children:`instore`}),` or `,_jsx(_components.code,{children:`online`}),`. Defaults to `,_jsx(_components.code,{children:`online`}),` when omitted, which only surfaces rewards whose `,_jsx(_components.code,{children:`redemption_venue`}),` is `,_jsx(_components.code,{children:`online`}),` or `,_jsx(_components.code,{children:`all`}),`.`]})}),`\n`,_jsx(ParamField,{body:`order_timestamp`,type:`string`,id:`param-order-timestamp`,children:_jsxs(_components.p,{children:[`Order timestamp used by time-restricted reward eligibility, in `,_jsx(_components.strong,{children:`ISO 8601 (UTC)`}),`. Defaults to the current server time when omitted.`]})}),`\n`,_jsxs(ParamField,{body:`location_uid`,type:`string`,id:`param-location-uid`,children:[_jsxs(_components.p,{children:[`Thanx Location UID, used to apply reward location restrictions — the same flat, top-level `,_jsx(_components.code,{children:`location_uid`}),` accepted by `,_jsx(_components.a,{href:`/loyalty/create-update-basket`,children:`Create \u0026 Update Basket`}),`.`]}),_jsx(_components.p,{children:`A mapping of Thanx location identifiers can be provided by the Thanx developer support team or fetched from the following endpoints depending on your integration type:`}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Consumer API `,_jsx(_components.a,{href:`/consumer/locations/get-locations`,children:`Get Locations`}),` endpoint.`]}),`\n`,_jsxs(_components.li,{children:[`Partner API `,_jsx(_components.a,{href:`/partner/metadata/get-locations`,children:`Get Locations`}),` endpoint.`]}),`\n`]}),_jsx(Note,{children:_jsx(_components.p,{children:`Locations belonging to a different merchant than the one the access token resolves to are silently dropped.`})})]}),`\n`,_jsxs(ParamField,{body:`items`,type:`array(hash)`,id:`param-items`,children:[_jsxs(_components.p,{children:[`Basket items. Same shape as `,_jsx(_components.a,{href:`/loyalty/create-update-basket`,children:`Create \u0026 Update Basket`}),` — modifiers are nested under each item.`]}),_jsxs(Expandable,{title:`item`,children:[_jsx(ParamField,{body:`id`,type:`string`,id:`param-id`,children:_jsx(_components.p,{children:`Item ID in your system / POS.`})}),_jsx(ParamField,{body:`name`,type:`string`,id:`param-name`,children:_jsx(_components.p,{children:`Item name.`})}),_jsx(ParamField,{body:`price`,type:`decimal`,id:`param-price`,children:_jsxs(_components.p,{children:[`Item amount. Include this so item-redeem rewards (free item, BOGO, modifier-discount) can be calculated — without it, item-type rewards resolve to a `,_jsx(_components.code,{children:`$0`}),` discount and are filtered out of the response.`]})}),_jsx(ParamField,{body:`categories`,type:`array(string)`,id:`param-categories`,children:_jsx(_components.p,{children:`Categories that describe this item.`})}),_jsxs(ParamField,{body:`modifiers`,type:`array(hash)`,id:`param-modifiers`,children:[_jsx(_components.p,{children:`Array of modifiers for this item.`}),_jsxs(Expandable,{title:`modifier`,children:[_jsx(ParamField,{body:`id`,type:`string`,id:`param-id-1`,children:_jsx(_components.p,{children:`Modifier ID in your system / POS.`})}),_jsx(ParamField,{body:`name`,type:`string`,id:`param-name-1`,children:_jsx(_components.p,{children:`Modifier name.`})}),_jsx(ParamField,{body:`price`,type:`decimal`,id:`param-price-1`,children:_jsx(_components.p,{children:`Modifier price adjustment.`})}),_jsx(ParamField,{body:`item_base_price`,type:`decimal`,id:`param-item-base-price`,children:_jsx(_components.p,{children:`Base price of the item before modifiers.`})})]})]})]})]}),`\n`,_jsx(ParamField,{body:`subtotal`,type:`decimal`,id:`param-subtotal`,children:_jsxs(_components.p,{children:[`Basket subtotal in USD (pre-discount). Include it so `,_jsx(_components.code,{children:`minimum`}),`-gated rewards can be evaluated — without it, minimum-gated rewards are treated as not-yet-qualifying and filtered out.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`response`,children:`Response`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`200 OK`}),` with a JSON body containing two arrays: `,_jsx(_components.code,{children:`rewards`}),` and `,_jsx(_components.code,{children:`points_products`}),`.`]}),`\n`,_jsxs(ResponseField,{name:`rewards`,type:`array(RewardEntity)`,id:`param-rewards`,children:[_jsx(_components.p,{children:`Rewards the user owns that (1) pass eligibility (state, ownership, location, time restrictions, handoff, expiration), AND (2) would produce a positive discount against the supplied basket.`}),_jsxs(_components.p,{children:[`Ordering: effective expiration ascending (soonest-to-expire first); rewards without an expiration are placed last; reward `,_jsx(_components.code,{children:`id`}),` is the tiebreaker.`]}),_jsxs(Expandable,{title:`RewardEntity`,children:[_jsx(ResponseField,{name:`id`,type:`string`,id:`param-id-2`,children:_jsxs(_components.p,{children:[`Reward hashid. Use this as the `,_jsx(_components.code,{children:`reward_id`}),` when calling `,_jsx(_components.a,{href:`/loyalty/create-update-basket`,children:`Create \u0026 Update Basket`}),`.`]})}),_jsx(ResponseField,{name:`value`,type:`decimal`,id:`param-value`,children:_jsxs(_components.p,{children:[`The value of the discount. For `,_jsx(_components.code,{children:`amount`}),` rewards, the dollar amount off (`,_jsx(_components.code,{children:`10.0`}),` = $10 off). For `,_jsx(_components.code,{children:`percent`}),` rewards, the percentage off (`,_jsx(_components.code,{children:`10.0`}),` = 10% off). This field is returned for every reward type, but it does not describe the discount for `,_jsx(_components.code,{children:`item`}),` or `,_jsx(_components.code,{children:`fixed_price`}),` rewards — do not use it for those types. Use `,_jsx(_components.code,{children:`label`}),` to describe them.`]})}),_jsx(ResponseField,{name:`minimum`,type:`decimal`,id:`param-minimum`,children:_jsxs(_components.p,{children:[`Minimum basket subtotal required for the reward to apply. `,_jsx(_components.code,{children:`null`}),` when there is no minimum.`]})}),_jsx(ResponseField,{name:`maximum`,type:`decimal`,id:`param-maximum`,children:_jsxs(_components.p,{children:[`Maximum discount cap. `,_jsx(_components.code,{children:`null`}),` when there is no cap.`]})}),_jsx(ResponseField,{name:`label`,type:`string`,id:`param-label`,children:_jsxs(_components.p,{children:[`Customer-facing reward label (e.g. `,_jsx(_components.code,{children:`\"$5 off your next purchase\"`}),`).`]})}),_jsx(ResponseField,{name:`state`,type:`string`,id:`param-state`,children:_jsxs(_components.p,{children:[`Always `,_jsx(_components.code,{children:`\"redeemable\"`}),` for rewards in this array.`]})}),_jsx(ResponseField,{name:`type`,type:`string`,id:`param-type`,children:_jsxs(_components.p,{children:[`One of `,_jsx(_components.code,{children:`amount`}),`, `,_jsx(_components.code,{children:`percent`}),`, `,_jsx(_components.code,{children:`item`}),`, `,_jsx(_components.code,{children:`fixed_price`}),`.`]})}),_jsx(ResponseField,{name:`products`,type:`array(string)`,id:`param-products`,children:_jsx(_components.p,{children:`Product IDs the reward is restricted to (item-redeem and BOGO). Empty for unrestricted rewards.`})}),_jsx(ResponseField,{name:`fine_print`,type:`string`,id:`param-fine-print`,children:_jsx(_components.p,{children:`Customer-facing fine print (location restrictions, minimums, etc.).`})}),_jsx(ResponseField,{name:`retire_at`,type:`string`,id:`param-retire-at`,children:_jsxs(_components.p,{children:[`Reward expiration (ISO 8601). `,_jsx(_components.code,{children:`null`}),` when the reward does not expire.`]})}),_jsx(ResponseField,{name:`restriction_location_ids`,type:`array(string)`,id:`param-restriction-location-ids`,children:_jsx(_components.p,{children:`Location hashids the reward is restricted to. Empty when the reward is not location-restricted.`})})]})]}),`\n`,_jsxs(ResponseField,{name:`points_products`,type:`array(PointsProductEntity)`,id:`param-points-products`,children:[_jsx(_components.p,{children:`Points-exchange products the user can afford AND that would produce a positive discount against the supplied basket.`}),_jsxs(Expandable,{title:`PointsProductEntity`,children:[_jsx(ResponseField,{name:`id`,type:`string`,id:`param-id-3`,children:_jsxs(_components.p,{children:[`Points product hashid. Use this as the points-product id when calling `,_jsx(_components.a,{href:`/loyalty/create-update-basket`,children:`Create \u0026 Update Basket`}),`.`]})}),_jsx(ResponseField,{name:`points`,type:`integer`,id:`param-points`,children:_jsx(_components.p,{children:`Points cost to redeem.`})}),_jsx(ResponseField,{name:`value`,type:`decimal`,id:`param-value-1`,children:_jsxs(_components.p,{children:[`Discount value (same semantics as `,_jsx(_components.code,{children:`RewardEntity.value`}),`).`]})}),_jsx(ResponseField,{name:`minimum`,type:`decimal`,id:`param-minimum-1`,children:_jsxs(_components.p,{children:[`Minimum basket subtotal. `,_jsx(_components.code,{children:`null`}),` when there is no minimum.`]})}),_jsx(ResponseField,{name:`maximum`,type:`decimal`,id:`param-maximum-1`,children:_jsxs(_components.p,{children:[`Discount cap. `,_jsx(_components.code,{children:`null`}),` when there is no cap.`]})}),_jsx(ResponseField,{name:`label`,type:`string`,id:`param-label-1`,children:_jsx(_components.p,{children:`Customer-facing label.`})}),_jsx(ResponseField,{name:`state`,type:`string`,id:`param-state-1`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`\"redeemable\"`}),` or `,_jsx(_components.code,{children:`\"unredeemable\"`}),`.`]})}),_jsx(ResponseField,{name:`type`,type:`string`,id:`param-type-1`,children:_jsxs(_components.p,{children:[`One of `,_jsx(_components.code,{children:`amount`}),`, `,_jsx(_components.code,{children:`percent`}),`, `,_jsx(_components.code,{children:`item`}),`, `,_jsx(_components.code,{children:`fixed_price`}),`.`]})}),_jsx(ResponseField,{name:`products`,type:`array(string)`,id:`param-products-1`,children:_jsx(_components.p,{children:`Restricted product IDs (empty when unrestricted).`})}),_jsx(ResponseField,{name:`fine_print`,type:`string`,id:`param-fine-print-1`,children:_jsx(_components.p,{children:`Customer-facing fine print.`})}),_jsx(ResponseField,{name:`restriction_location_ids`,type:`array(string)`,id:`param-restriction-location-ids-1`,children:_jsx(_components.p,{children:`Location restrictions (empty when none).`})})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`empty-basket-behavior`,children:`Empty basket behavior`}),`\n`,_jsxs(_components.p,{children:[`A basket with no `,_jsx(_components.code,{children:`items`}),` and no `,_jsx(_components.code,{children:`subtotal`}),` always returns empty arrays:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{ `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"rewards\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [], `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"points_products\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [] }`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`This is intentional — nothing in the user’s portfolio can produce a positive discount against a nonexistent basket. Treat empty arrays as “no applicable offers for the current basket” rather than “the user has no offers at all”; for the full unfiltered list, use `,_jsx(_components.a,{href:`/loyalty/get-account`,children:`Get Account`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`notes-for-implementation`,children:`Notes for implementation`}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Call frequency.`}),` Safe to call on every basket change (item added or removed, quantity changed). The endpoint is read-only and does not mutate user or merchant state.`]})}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Do not cache responses across baskets.`}),` The qualifying set changes with basket contents — caching defeats the purpose of the endpoint.`]})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Item prices`}),`: include `,_jsx(_components.code,{children:`price`}),` on each item so item-redeem rewards (free item, BOGO) are evaluated. Without prices, item-type rewards resolve to a `,_jsx(_components.code,{children:`$0`}),` discount and are filtered out.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Location and timestamp`}),`: include `,_jsx(_components.code,{children:`location_uid`}),` and `,_jsx(_components.code,{children:`order_timestamp`}),` when known so location-restricted and time-restricted rewards filter correctly. Omitting these is safe — they default to “no restriction match” / “current server time” — but means location-restricted offers may surface for baskets that ultimately won’t be eligible at checkout.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Handoff restrictions`}),`: rewards limited to a specific handoff mode (e.g. a delivery-only offer) are returned only when the request body’s `,_jsx(_components.code,{children:`handoff`}),` matches the reward’s restriction; omit `,_jsx(_components.code,{children:`handoff`}),` and those rewards are filtered out. As with `,_jsx(_components.a,{href:`/loyalty/create-update-basket`,children:`Create \u0026 Update Basket`}),`, `,_jsx(_components.code,{children:`handoff`}),` is read from the request body and applied to reward eligibility.`]}),`\n`,_jsxs(_components.li,{children:[_jsxs(_components.strong,{children:[`Redemption still requires `,_jsx(_components.code,{children:`POST /baskets`}),`.`]}),` A reward returned here is one that `,_jsx(_components.a,{href:`/loyalty/create-update-basket`,children:`Create \u0026 Update Basket`}),` would accept for the same basket. Calling `,_jsx(_components.code,{children:`/baskets/qualifying`}),` does not redeem anything; partners must still call `,_jsx(_components.code,{children:`/baskets`}),` at checkout to actually apply the reward.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`error-responses`,children:`Error responses`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Status`}),_jsx(_components.th,{children:`When`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`400 Bad Request`})}),_jsxs(_components.td,{children:[`Validation error on `,_jsx(_components.code,{children:`redemption_venue`}),` (not `,_jsx(_components.code,{children:`instore`}),` / `,_jsx(_components.code,{children:`online`}),`) or malformed `,_jsx(_components.code,{children:`order_timestamp`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`401 Unauthorized`})}),_jsxs(_components.td,{children:[`Missing or invalid `,_jsx(_components.code,{children:`Authorization`}),` bearer token or `,_jsx(_components.code,{children:`Merchant-Key`}),`, or the `,_jsx(_components.code,{children:`Merchant-Key`}),` resolves to a different merchant than the access token.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`406 Not Acceptable`})}),_jsxs(_components.td,{children:[`Missing or wrong `,_jsx(_components.code,{children:`Accept`}),` header. Use `,_jsx(_components.code,{children:`application/vnd.thanx-v1+json`}),`.`]})]})]})]}),`\n`,`\n`,`\n`,_jsx(Heading,{level:`2`,id:`related-pages`,children:`Related Pages`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/loyalty/create-update-basket`,children:`Create \u0026 Update Basket`}),` — the redemption endpoint; the same applicability check used here.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/loyalty/get-account`,children:`Get Account`}),` — full unfiltered list of the user’s rewards and affordable points products (no basket filtering).`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/loyalty/headers`,children:`Loyalty API Headers`}),` — required `,_jsx(_components.code,{children:`Authorization`}),`, `,_jsx(_components.code,{children:`Merchant-Key`}),`, and `,_jsx(_components.code,{children:`Accept`}),` headers.`]}),`\n`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Qualifying Rewards for a Basket","api":"POST https://loyalty.thanxsandbox.com/api/baskets/qualifying","description":"Returns the subset of the user's rewards and points products that would actually produce a discount against a given basket. Read-only dry-run companion to Create \u0026 Update Basket — no state is mutated, no reward is redeemed, and no points are debited.","href":"/loyalty/qualifying-baskets"}}},"mdxSourceWithNoJs":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,em:`em`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Expandable,Heading,Note,ParamField,RequestExample,ResponseExample,ResponseField,Table,Tip,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!RequestExample)_missingMdxReference(`RequestExample`,true);if(!ResponseExample)_missingMdxReference(`ResponseExample`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tip)_missingMdxReference(`Tip`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(Tip,{children:_jsxs(_components.p,{children:[`Use this endpoint to surface “applicable” offers to a customer before checkout (e.g. an offers carousel that only shows rewards the customer can use against the current basket). For the full unfiltered list of what the user owns, use `,_jsx(_components.a,{href:`/loyalty/get-account`,children:`Get Account`}),` instead.`]})}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`Read-only dry-run of `,_jsx(_components.a,{href:`/loyalty/create-update-basket`,children:`Create \u0026 Update Basket`}),` — same eligibility and discount-calculation logic, no state mutation, no points debit. It accepts the same request body shape, including the flat, top-level `,_jsx(_components.code,{children:`location_uid`}),` string used for location-restricted rewards.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`overview`,children:`Overview`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`POST /baskets/qualifying`}),` is a dry-run companion to `,_jsx(_components.a,{href:`/loyalty/create-update-basket`,children:`Create \u0026 Update Basket`}),`:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`POST /baskets`}),` runs the full reward redemption pipeline (state machine, validation, side effects).`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`POST /baskets/qualifying`}),` runs the same eligibility and discount calculation logic, but does `,_jsx(_components.strong,{children:`not`}),` mutate state, does `,_jsx(_components.strong,{children:`not`}),` redeem any reward, and does `,_jsx(_components.strong,{children:`not`}),` debit points. It returns the rewards and points products that `,_jsx(_components.em,{children:`would`}),` apply if the basket were submitted as-is.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`A reward returned by this endpoint is one that `,_jsx(_components.a,{href:`/loyalty/create-update-basket`,children:`Create \u0026 Update Basket`}),` would accept for the same basket shape — the two endpoints share the same applicability check.`]}),`\n`,_jsx(Heading,{level:`2`,id:`http-request`,children:`HTTP Request`}),`\n`,_jsx(Heading,{level:`3`,id:`parameters`,children:`Parameters`}),`\n`,_jsxs(_components.p,{children:[`Every field is optional on this endpoint. Unlike `,_jsx(_components.a,{href:`/loyalty/create-update-basket`,children:`Create \u0026 Update Basket`}),` — where fields such as `,_jsx(_components.code,{children:`location_uid`}),`, `,_jsx(_components.code,{children:`items`}),`, and `,_jsx(_components.code,{children:`subtotal`}),` are required — `,_jsx(_components.code,{children:`/baskets/qualifying`}),` accepts them all optionally; omitting a field simply reduces the precision of the qualifying set (see the per-field notes below). Any field accepted by Create \u0026 Update Basket is also accepted here and forwarded into the discount calculation engine unchanged.`]}),`\n`,_jsx(ParamField,{body:`redemption_venue`,type:`string`,id:`param-redemption-venue`,children:_jsxs(_components.p,{children:[`Either `,_jsx(_components.code,{children:`instore`}),` or `,_jsx(_components.code,{children:`online`}),`. Defaults to `,_jsx(_components.code,{children:`online`}),` when omitted, which only surfaces rewards whose `,_jsx(_components.code,{children:`redemption_venue`}),` is `,_jsx(_components.code,{children:`online`}),` or `,_jsx(_components.code,{children:`all`}),`.`]})}),`\n`,_jsx(ParamField,{body:`order_timestamp`,type:`string`,id:`param-order-timestamp`,children:_jsxs(_components.p,{children:[`Order timestamp used by time-restricted reward eligibility, in `,_jsx(_components.strong,{children:`ISO 8601 (UTC)`}),`. Defaults to the current server time when omitted.`]})}),`\n`,_jsxs(ParamField,{body:`location_uid`,type:`string`,id:`param-location-uid`,children:[_jsxs(_components.p,{children:[`Thanx Location UID, used to apply reward location restrictions — the same flat, top-level `,_jsx(_components.code,{children:`location_uid`}),` accepted by `,_jsx(_components.a,{href:`/loyalty/create-update-basket`,children:`Create \u0026 Update Basket`}),`.`]}),_jsx(_components.p,{children:`A mapping of Thanx location identifiers can be provided by the Thanx developer support team or fetched from the following endpoints depending on your integration type:`}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Consumer API `,_jsx(_components.a,{href:`/consumer/locations/get-locations`,children:`Get Locations`}),` endpoint.`]}),`\n`,_jsxs(_components.li,{children:[`Partner API `,_jsx(_components.a,{href:`/partner/metadata/get-locations`,children:`Get Locations`}),` endpoint.`]}),`\n`]}),_jsx(Note,{children:_jsx(_components.p,{children:`Locations belonging to a different merchant than the one the access token resolves to are silently dropped.`})})]}),`\n`,_jsxs(ParamField,{body:`items`,type:`array(hash)`,id:`param-items`,children:[_jsxs(_components.p,{children:[`Basket items. Same shape as `,_jsx(_components.a,{href:`/loyalty/create-update-basket`,children:`Create \u0026 Update Basket`}),` — modifiers are nested under each item.`]}),_jsxs(Expandable,{title:`item`,children:[_jsx(ParamField,{body:`id`,type:`string`,id:`param-id`,children:_jsx(_components.p,{children:`Item ID in your system / POS.`})}),_jsx(ParamField,{body:`name`,type:`string`,id:`param-name`,children:_jsx(_components.p,{children:`Item name.`})}),_jsx(ParamField,{body:`price`,type:`decimal`,id:`param-price`,children:_jsxs(_components.p,{children:[`Item amount. Include this so item-redeem rewards (free item, BOGO, modifier-discount) can be calculated — without it, item-type rewards resolve to a `,_jsx(_components.code,{children:`$0`}),` discount and are filtered out of the response.`]})}),_jsx(ParamField,{body:`categories`,type:`array(string)`,id:`param-categories`,children:_jsx(_components.p,{children:`Categories that describe this item.`})}),_jsxs(ParamField,{body:`modifiers`,type:`array(hash)`,id:`param-modifiers`,children:[_jsx(_components.p,{children:`Array of modifiers for this item.`}),_jsxs(Expandable,{title:`modifier`,children:[_jsx(ParamField,{body:`id`,type:`string`,id:`param-id-1`,children:_jsx(_components.p,{children:`Modifier ID in your system / POS.`})}),_jsx(ParamField,{body:`name`,type:`string`,id:`param-name-1`,children:_jsx(_components.p,{children:`Modifier name.`})}),_jsx(ParamField,{body:`price`,type:`decimal`,id:`param-price-1`,children:_jsx(_components.p,{children:`Modifier price adjustment.`})}),_jsx(ParamField,{body:`item_base_price`,type:`decimal`,id:`param-item-base-price`,children:_jsx(_components.p,{children:`Base price of the item before modifiers.`})})]})]})]})]}),`\n`,_jsx(ParamField,{body:`subtotal`,type:`decimal`,id:`param-subtotal`,children:_jsxs(_components.p,{children:[`Basket subtotal in USD (pre-discount). Include it so `,_jsx(_components.code,{children:`minimum`}),`-gated rewards can be evaluated — without it, minimum-gated rewards are treated as not-yet-qualifying and filtered out.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`response`,children:`Response`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`200 OK`}),` with a JSON body containing two arrays: `,_jsx(_components.code,{children:`rewards`}),` and `,_jsx(_components.code,{children:`points_products`}),`.`]}),`\n`,_jsxs(ResponseField,{name:`rewards`,type:`array(RewardEntity)`,id:`param-rewards`,children:[_jsx(_components.p,{children:`Rewards the user owns that (1) pass eligibility (state, ownership, location, time restrictions, handoff, expiration), AND (2) would produce a positive discount against the supplied basket.`}),_jsxs(_components.p,{children:[`Ordering: effective expiration ascending (soonest-to-expire first); rewards without an expiration are placed last; reward `,_jsx(_components.code,{children:`id`}),` is the tiebreaker.`]}),_jsxs(Expandable,{title:`RewardEntity`,children:[_jsx(ResponseField,{name:`id`,type:`string`,id:`param-id-2`,children:_jsxs(_components.p,{children:[`Reward hashid. Use this as the `,_jsx(_components.code,{children:`reward_id`}),` when calling `,_jsx(_components.a,{href:`/loyalty/create-update-basket`,children:`Create \u0026 Update Basket`}),`.`]})}),_jsx(ResponseField,{name:`value`,type:`decimal`,id:`param-value`,children:_jsxs(_components.p,{children:[`The value of the discount. For `,_jsx(_components.code,{children:`amount`}),` rewards, the dollar amount off (`,_jsx(_components.code,{children:`10.0`}),` = $10 off). For `,_jsx(_components.code,{children:`percent`}),` rewards, the percentage off (`,_jsx(_components.code,{children:`10.0`}),` = 10% off). This field is returned for every reward type, but it does not describe the discount for `,_jsx(_components.code,{children:`item`}),` or `,_jsx(_components.code,{children:`fixed_price`}),` rewards — do not use it for those types. Use `,_jsx(_components.code,{children:`label`}),` to describe them.`]})}),_jsx(ResponseField,{name:`minimum`,type:`decimal`,id:`param-minimum`,children:_jsxs(_components.p,{children:[`Minimum basket subtotal required for the reward to apply. `,_jsx(_components.code,{children:`null`}),` when there is no minimum.`]})}),_jsx(ResponseField,{name:`maximum`,type:`decimal`,id:`param-maximum`,children:_jsxs(_components.p,{children:[`Maximum discount cap. `,_jsx(_components.code,{children:`null`}),` when there is no cap.`]})}),_jsx(ResponseField,{name:`label`,type:`string`,id:`param-label`,children:_jsxs(_components.p,{children:[`Customer-facing reward label (e.g. `,_jsx(_components.code,{children:`\"$5 off your next purchase\"`}),`).`]})}),_jsx(ResponseField,{name:`state`,type:`string`,id:`param-state`,children:_jsxs(_components.p,{children:[`Always `,_jsx(_components.code,{children:`\"redeemable\"`}),` for rewards in this array.`]})}),_jsx(ResponseField,{name:`type`,type:`string`,id:`param-type`,children:_jsxs(_components.p,{children:[`One of `,_jsx(_components.code,{children:`amount`}),`, `,_jsx(_components.code,{children:`percent`}),`, `,_jsx(_components.code,{children:`item`}),`, `,_jsx(_components.code,{children:`fixed_price`}),`.`]})}),_jsx(ResponseField,{name:`products`,type:`array(string)`,id:`param-products`,children:_jsx(_components.p,{children:`Product IDs the reward is restricted to (item-redeem and BOGO). Empty for unrestricted rewards.`})}),_jsx(ResponseField,{name:`fine_print`,type:`string`,id:`param-fine-print`,children:_jsx(_components.p,{children:`Customer-facing fine print (location restrictions, minimums, etc.).`})}),_jsx(ResponseField,{name:`retire_at`,type:`string`,id:`param-retire-at`,children:_jsxs(_components.p,{children:[`Reward expiration (ISO 8601). `,_jsx(_components.code,{children:`null`}),` when the reward does not expire.`]})}),_jsx(ResponseField,{name:`restriction_location_ids`,type:`array(string)`,id:`param-restriction-location-ids`,children:_jsx(_components.p,{children:`Location hashids the reward is restricted to. Empty when the reward is not location-restricted.`})})]})]}),`\n`,_jsxs(ResponseField,{name:`points_products`,type:`array(PointsProductEntity)`,id:`param-points-products`,children:[_jsx(_components.p,{children:`Points-exchange products the user can afford AND that would produce a positive discount against the supplied basket.`}),_jsxs(Expandable,{title:`PointsProductEntity`,children:[_jsx(ResponseField,{name:`id`,type:`string`,id:`param-id-3`,children:_jsxs(_components.p,{children:[`Points product hashid. Use this as the points-product id when calling `,_jsx(_components.a,{href:`/loyalty/create-update-basket`,children:`Create \u0026 Update Basket`}),`.`]})}),_jsx(ResponseField,{name:`points`,type:`integer`,id:`param-points`,children:_jsx(_components.p,{children:`Points cost to redeem.`})}),_jsx(ResponseField,{name:`value`,type:`decimal`,id:`param-value-1`,children:_jsxs(_components.p,{children:[`Discount value (same semantics as `,_jsx(_components.code,{children:`RewardEntity.value`}),`).`]})}),_jsx(ResponseField,{name:`minimum`,type:`decimal`,id:`param-minimum-1`,children:_jsxs(_components.p,{children:[`Minimum basket subtotal. `,_jsx(_components.code,{children:`null`}),` when there is no minimum.`]})}),_jsx(ResponseField,{name:`maximum`,type:`decimal`,id:`param-maximum-1`,children:_jsxs(_components.p,{children:[`Discount cap. `,_jsx(_components.code,{children:`null`}),` when there is no cap.`]})}),_jsx(ResponseField,{name:`label`,type:`string`,id:`param-label-1`,children:_jsx(_components.p,{children:`Customer-facing label.`})}),_jsx(ResponseField,{name:`state`,type:`string`,id:`param-state-1`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`\"redeemable\"`}),` or `,_jsx(_components.code,{children:`\"unredeemable\"`}),`.`]})}),_jsx(ResponseField,{name:`type`,type:`string`,id:`param-type-1`,children:_jsxs(_components.p,{children:[`One of `,_jsx(_components.code,{children:`amount`}),`, `,_jsx(_components.code,{children:`percent`}),`, `,_jsx(_components.code,{children:`item`}),`, `,_jsx(_components.code,{children:`fixed_price`}),`.`]})}),_jsx(ResponseField,{name:`products`,type:`array(string)`,id:`param-products-1`,children:_jsx(_components.p,{children:`Restricted product IDs (empty when unrestricted).`})}),_jsx(ResponseField,{name:`fine_print`,type:`string`,id:`param-fine-print-1`,children:_jsx(_components.p,{children:`Customer-facing fine print.`})}),_jsx(ResponseField,{name:`restriction_location_ids`,type:`array(string)`,id:`param-restriction-location-ids-1`,children:_jsx(_components.p,{children:`Location restrictions (empty when none).`})})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`empty-basket-behavior`,children:`Empty basket behavior`}),`\n`,_jsxs(_components.p,{children:[`A basket with no `,_jsx(_components.code,{children:`items`}),` and no `,_jsx(_components.code,{children:`subtotal`}),` always returns empty arrays:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{ `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"rewards\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [], `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"points_products\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [] }`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`This is intentional — nothing in the user’s portfolio can produce a positive discount against a nonexistent basket. Treat empty arrays as “no applicable offers for the current basket” rather than “the user has no offers at all”; for the full unfiltered list, use `,_jsx(_components.a,{href:`/loyalty/get-account`,children:`Get Account`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`notes-for-implementation`,children:`Notes for implementation`}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Call frequency.`}),` Safe to call on every basket change (item added or removed, quantity changed). The endpoint is read-only and does not mutate user or merchant state.`]})}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Do not cache responses across baskets.`}),` The qualifying set changes with basket contents — caching defeats the purpose of the endpoint.`]})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Item prices`}),`: include `,_jsx(_components.code,{children:`price`}),` on each item so item-redeem rewards (free item, BOGO) are evaluated. Without prices, item-type rewards resolve to a `,_jsx(_components.code,{children:`$0`}),` discount and are filtered out.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Location and timestamp`}),`: include `,_jsx(_components.code,{children:`location_uid`}),` and `,_jsx(_components.code,{children:`order_timestamp`}),` when known so location-restricted and time-restricted rewards filter correctly. Omitting these is safe — they default to “no restriction match” / “current server time” — but means location-restricted offers may surface for baskets that ultimately won’t be eligible at checkout.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Handoff restrictions`}),`: rewards limited to a specific handoff mode (e.g. a delivery-only offer) are returned only when the request body’s `,_jsx(_components.code,{children:`handoff`}),` matches the reward’s restriction; omit `,_jsx(_components.code,{children:`handoff`}),` and those rewards are filtered out. As with `,_jsx(_components.a,{href:`/loyalty/create-update-basket`,children:`Create \u0026 Update Basket`}),`, `,_jsx(_components.code,{children:`handoff`}),` is read from the request body and applied to reward eligibility.`]}),`\n`,_jsxs(_components.li,{children:[_jsxs(_components.strong,{children:[`Redemption still requires `,_jsx(_components.code,{children:`POST /baskets`}),`.`]}),` A reward returned here is one that `,_jsx(_components.a,{href:`/loyalty/create-update-basket`,children:`Create \u0026 Update Basket`}),` would accept for the same basket. Calling `,_jsx(_components.code,{children:`/baskets/qualifying`}),` does not redeem anything; partners must still call `,_jsx(_components.code,{children:`/baskets`}),` at checkout to actually apply the reward.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`error-responses`,children:`Error responses`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Status`}),_jsx(_components.th,{children:`When`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`400 Bad Request`})}),_jsxs(_components.td,{children:[`Validation error on `,_jsx(_components.code,{children:`redemption_venue`}),` (not `,_jsx(_components.code,{children:`instore`}),` / `,_jsx(_components.code,{children:`online`}),`) or malformed `,_jsx(_components.code,{children:`order_timestamp`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`401 Unauthorized`})}),_jsxs(_components.td,{children:[`Missing or invalid `,_jsx(_components.code,{children:`Authorization`}),` bearer token or `,_jsx(_components.code,{children:`Merchant-Key`}),`, or the `,_jsx(_components.code,{children:`Merchant-Key`}),` resolves to a different merchant than the access token.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`406 Not Acceptable`})}),_jsxs(_components.td,{children:[`Missing or wrong `,_jsx(_components.code,{children:`Accept`}),` header. Use `,_jsx(_components.code,{children:`application/vnd.thanx-v1+json`}),`.`]})]})]})]}),`\n`,_jsx(RequestExample,{children:_jsx(CodeBlock,{filename:``,numberOfLines:`16`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`16`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://loyalty.thanxsandbox.com/api/baskets/qualifying`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:' \"Authorization: Bearer ${'}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`token`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`}\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Accept: application/vnd.thanx-v1+json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:' \"Merchant-Key: ${'}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`merchant_key`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`}\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"redemption_venue\": \"instore\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"order_timestamp\": \"2026-05-20T18:02:05Z\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"location_uid\": \"LG-567fhwer\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"subtotal\": 30.00,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"items\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` { \"id\": \"burger-001\", \"name\": \"Cheeseburger\", \"price\": 22.00 },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` { \"id\": \"fries-001\", \"name\": \"Fries\", \"price\": 8.00 }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})})}),`\n`,_jsxs(ResponseExample,{children:[_jsx(CodeBlock,{filename:`200`,numberOfLines:`45`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`45`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"rewards\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"MkkhgM\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"value\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`5.0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"minimum\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`25.0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"maximum\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"label\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"$5 off your next purchase\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"state\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"redeemable\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"amount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"products\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"fine_print\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Minimum purchase size is $25 for redemption.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"retire_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"restriction_location_ids\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: []`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"M6QhQN\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"value\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`10.0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"minimum\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"maximum\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"label\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"10% off your next purchase\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"state\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"redeemable\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"percent\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"products\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"fine_print\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"retire_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"restriction_location_ids\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: []`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"points_products\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"AqdC9L\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"points\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`100`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"value\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`5.0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"minimum\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`10.0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"maximum\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"label\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"$5 off your next purchase\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"state\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"redeemable\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"amount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"products\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"fine_print\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Minimum purchase size is $10 for redemption.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"restriction_location_ids\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: []`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`400`,numberOfLines:`4`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`400`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"redemption_venue must be one of: instore, online\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`401`,numberOfLines:`4`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`401`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"The Merchant-Key header is missing or invalid\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]}),`\n`,_jsx(Heading,{level:`2`,id:`related-pages`,children:`Related Pages`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/loyalty/create-update-basket`,children:`Create \u0026 Update Basket`}),` — the redemption endpoint; the same applicability check used here.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/loyalty/get-account`,children:`Get Account`}),` — full unfiltered list of the user’s rewards and affordable points products (no basket filtering).`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/loyalty/headers`,children:`Loyalty API Headers`}),` — required `,_jsx(_components.code,{children:`Authorization`}),`, `,_jsx(_components.code,{children:`Merchant-Key`}),`, and `,_jsx(_components.code,{children:`Accept`}),` headers.`]}),`\n`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Qualifying Rewards for a Basket","api":"POST https://loyalty.thanxsandbox.com/api/baskets/qualifying","description":"Returns the subset of the user's rewards and points products that would actually produce a discount against a given basket. Read-only dry-run companion to Create \u0026 Update Basket — no state is mutated, no reward is redeemed, and no points are debited.","href":"/loyalty/qualifying-baskets"}}}},"mdxExtracts":{"tableOfContents":[{"title":"Overview","slug":"overview","depth":2,"children":[]},{"title":"HTTP Request","slug":"http-request","depth":2,"children":[{"title":"Parameters","slug":"parameters","depth":3,"children":[]},{"title":"Response","slug":"response","depth":3,"children":[]},{"title":"Empty basket behavior","slug":"empty-basket-behavior","depth":3,"children":[]}]},{"title":"Notes for implementation","slug":"notes-for-implementation","depth":2,"children":[]},{"title":"Error responses","slug":"error-responses","depth":2,"children":[]},{"title":"Related Pages","slug":"related-pages","depth":2,"children":[]}],"codeExamples":{"request":{"type":"RequestExample","children":[{"filename":"","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"shellscript\">\u003ccode language=\"shellscript\" numberOfLines=\"16\">\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#DCDCAA\">curl\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> https://loyalty.thanxsandbox.com/api/baskets/qualifying\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -X\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> POST\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Authorization: Bearer ${\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">token\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">}\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Content-Type: application/json\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Accept: application/vnd.thanx-v1+json\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Merchant-Key: ${\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">merchant_key\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">}\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -d\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> '{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"redemption_venue\": \"instore\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"order_timestamp\": \"2026-05-20T18:02:05Z\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"location_uid\": \"LG-567fhwer\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"subtotal\": 30.00,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"items\": [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> { \"id\": \"burger-001\", \"name\": \"Cheeseburger\", \"price\": 22.00 },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> { \"id\": \"fries-001\", \"name\": \"Fries\", \"price\": 8.00 }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> ]\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> }'\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]},"response":{"type":"ResponseExample","children":[{"filename":"200","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"45\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"rewards\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"MkkhgM\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"value\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">5.0\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"minimum\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">25.0\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"maximum\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">null\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"label\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"$5 off your next purchase\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"state\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"redeemable\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"type\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"amount\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"products\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: [],\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"fine_print\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Minimum purchase size is $25 for redemption.\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"retire_at\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">null\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"restriction_location_ids\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: []\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"M6QhQN\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"value\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">10.0\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"minimum\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">null\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"maximum\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">null\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"label\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"10% off your next purchase\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"state\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"redeemable\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"type\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"percent\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"products\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: [],\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"fine_print\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"retire_at\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">null\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"restriction_location_ids\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: []\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> ],\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"points_products\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"AqdC9L\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"points\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">100\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"value\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">5.0\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"minimum\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">10.0\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"maximum\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">null\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"label\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"$5 off your next purchase\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"state\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"redeemable\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"type\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"amount\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"products\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: [],\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"fine_print\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Minimum purchase size is $10 for redemption.\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"restriction_location_ids\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: []\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> ]\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"400","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"4\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"code\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">400\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"message\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"redemption_venue must be one of: instore, online\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"401","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"4\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"code\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">401\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"message\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"The Merchant-Key header is missing or invalid\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]}},"endpoint":{"title":"Qualifying Rewards for a Basket","path":"/api/baskets/qualifying","servers":[{"url":"https://loyalty.thanxsandbox.com"}],"method":"post","request":{"security":[],"parameters":{"query":{},"header":{},"cookie":{},"path":{}},"body":{"application/json":{"schemaArray":[{"type":"object","properties":{"redemption_venue":[{"type":"string","description":"Either `instore` or `online` . Defaults to `online` when omitted, which only surfaces rewards whose `redemption_venue` is `online` or `all` ."}],"order_timestamp":[{"type":"string","description":"Order timestamp used by time-restricted reward eligibility, in ISO 8601 (UTC) . Defaults to the current server time when omitted."}],"location_uid":[{"type":"string","description":"Thanx Location UID, used to apply reward location restrictions — the same flat, top-level `location_uid` accepted by Create \u0026 Update Basket . A mapping of Thanx location identifiers can be provided by the Thanx developer support team or fetched from the following endpoints depending on your integration type: Consumer API Get Locations endpoint. Partner API Get Locations endpoint."}],"items":[{"type":"object","properties":{"id":[{"type":"string","description":"Item ID in your system / POS."}],"name":[{"type":"string","description":"Item name."}],"price":[{"type":"number","description":"Item amount. Include this so item-redeem rewards (free item, BOGO, modifier-discount) can be calculated — without it, item-type rewards resolve to a `$0` discount and are filtered out of the response."}],"categories":[{"type":"object","properties":{},"description":"Categories that describe this item."}],"modifiers":[{"type":"object","properties":{"id":[{"type":"string","description":"Modifier ID in your system / POS."}],"name":[{"type":"string","description":"Modifier name."}],"price":[{"type":"number","description":"Modifier price adjustment."}],"item_base_price":[{"type":"number","description":"Base price of the item before modifiers."}]},"description":"Array of modifiers for this item."}]},"description":"Basket items. Same shape as Create \u0026 Update Basket — modifiers are nested under each item."}],"subtotal":[{"type":"number","description":"Basket subtotal in USD (pre-discount). Include it so `minimum` -gated rewards can be evaluated — without it, minimum-gated rewards are treated as not-yet-qualifying and filtered out."}]}}],"examples":{"example":{"value":{"redemption_venue":"\u003cstring>","order_timestamp":"\u003cstring>","location_uid":"\u003cstring>","items":{"id":"\u003cstring>","name":"\u003cstring>","price":123,"categories":{},"modifiers":{"id":"\u003cstring>","name":"\u003cstring>","price":123,"item_base_price":123}},"subtotal":123}}}}}},"response":{"200":{"application/json":{"schemaArray":[{"type":"object","properties":{"rewards":[{"type":"object","properties":{"id":[{"type":"string","description":"Reward hashid. Use this as the `reward_id` when calling Create \u0026 Update Basket ."}],"value":[{"type":"number","description":"The value of the discount. For `amount` rewards, the dollar amount off ( `10.0` = $10 off). For `percent` rewards, the percentage off ( `10.0` = 10% off). This field is returned for every reward type, but it does not describe the discount for `item` or `fixed_price` rewards — do not use it for those types. Use `label` to describe them."}],"minimum":[{"type":"number","description":"Minimum basket subtotal required for the reward to apply. `null` when there is no minimum."}],"maximum":[{"type":"number","description":"Maximum discount cap. `null` when there is no cap."}],"label":[{"type":"string","description":"Customer-facing reward label (e.g. `\"$5 off your next purchase\"` )."}],"state":[{"type":"string","description":"Always `\"redeemable\"` for rewards in this array."}],"type":[{"type":"string","description":"One of `amount` , `percent` , `item` , `fixed_price` ."}],"products":[{"type":"object","properties":{},"description":"Product IDs the reward is restricted to (item-redeem and BOGO). Empty for unrestricted rewards."}],"fine_print":[{"type":"string","description":"Customer-facing fine print (location restrictions, minimums, etc.)."}],"retire_at":[{"type":"string","description":"Reward expiration (ISO 8601). `null` when the reward does not expire."}],"restriction_location_ids":[{"type":"object","properties":{},"description":"Location hashids the reward is restricted to. Empty when the reward is not location-restricted."}]},"description":"Rewards the user owns that (1) pass eligibility (state, ownership, location, time restrictions, handoff, expiration), AND (2) would produce a positive discount against the supplied basket. Ordering: effective expiration ascending (soonest-to-expire first); rewards without an expiration are placed last; reward `id` is the tiebreaker."}],"points_products":[{"type":"object","properties":{"id":[{"type":"string","description":"Points product hashid. Use this as the points-product id when calling Create \u0026 Update Basket ."}],"points":[{"type":"integer","description":"Points cost to redeem."}],"value":[{"type":"number","description":"Discount value (same semantics as `RewardEntity.value` )."}],"minimum":[{"type":"number","description":"Minimum basket subtotal. `null` when there is no minimum."}],"maximum":[{"type":"number","description":"Discount cap. `null` when there is no cap."}],"label":[{"type":"string","description":"Customer-facing label."}],"state":[{"type":"string","description":"`\"redeemable\"` or `\"unredeemable\"` ."}],"type":[{"type":"string","description":"One of `amount` , `percent` , `item` , `fixed_price` ."}],"products":[{"type":"object","properties":{},"description":"Restricted product IDs (empty when unrestricted)."}],"fine_print":[{"type":"string","description":"Customer-facing fine print."}],"restriction_location_ids":[{"type":"object","properties":{},"description":"Location restrictions (empty when none)."}]},"description":"Points-exchange products the user can afford AND that would produce a positive discount against the supplied basket."}]}}],"examples":{"example":{"value":{"rewards":{"id":"\u003cstring>","value":123,"minimum":123,"maximum":123,"label":"\u003cstring>","state":"\u003cstring>","type":"\u003cstring>","products":{},"fine_print":"\u003cstring>","retire_at":"\u003cstring>","restriction_location_ids":{}},"points_products":{"id":"\u003cstring>","points":123,"value":123,"minimum":123,"maximum":123,"label":"\u003cstring>","state":"\u003cstring>","type":"\u003cstring>","products":{},"fine_print":"\u003cstring>","restriction_location_ids":{}}}}}}}},"deprecated":false}},"jsLinks":[],"subdomain":"thanx","siteName":"Thanx","title":"Qualifying Rewards for a Basket - Thanx","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-06T19:05:14.479Z","originalFileLocation":"loyalty/qualifying-baskets.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;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=\"system\"}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=\"Returns the subset of the user\u0026#x27;s rewards and points products that would actually produce a discount against a given basket. Read-only dry-run companion to Create \u0026amp; Update Basket — no state is mutated, no reward is redeemed, and no points are debited.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Thanx\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/thanx/0JkP31DGq1SVLm6U/_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/thanx/0JkP31DGq1SVLm6U/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/thanx/0JkP31DGq1SVLm6U/_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/thanx/0JkP31DGq1SVLm6U/_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/thanx/0JkP31DGq1SVLm6U/_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/thanx/0JkP31DGq1SVLm6U/_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/thanx/0JkP31DGq1SVLm6U/_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/thanx/0JkP31DGq1SVLm6U/_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/thanx/0JkP31DGq1SVLm6U/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Qualifying Rewards for a Basket - Thanx\">\u003cmeta data-mint-head property=\"og:description\" content=\"Returns the subset of the user\u0026#x27;s rewards and points products that would actually produce a discount against a given basket. Read-only dry-run companion to Create \u0026amp; Update Basket — no state is mutated, no reward is redeemed, and no points are debited.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Thanx\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.thanx.com/loyalty/qualifying-baskets\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://thanx.mintlify.app/_mintlify/api/og/v2?division=Reference\u0026amp;title=Qualifying+Rewards+for+a+Basket\u0026amp;description=Returns+the+subset+of+the+user%27s+rewards+and+points+products+that+would+actually+produce+a+discount+against+a+given+basket.+Read-only+dry-run+companion+to+Creat\u0026amp;theme=547b57199640445129b8df81\u0026amp;signature=c95d5f96e00def693565efca75fd1db4de1e9cf08d372065ae690f24b555cb22\">\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=\"Qualifying Rewards for a Basket - Thanx\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Returns the subset of the user\u0026#x27;s rewards and points products that would actually produce a discount against a given basket. Read-only dry-run companion to Create \u0026amp; Update Basket — no state is mutated, no reward is redeemed, and no points are debited.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://thanx.mintlify.app/_mintlify/api/og/v2?division=Reference\u0026amp;title=Qualifying+Rewards+for+a+Basket\u0026amp;description=Returns+the+subset+of+the+user%27s+rewards+and+points+products+that+would+actually+produce+a+discount+against+a+given+basket.+Read-only+dry-run+companion+to+Creat\u0026amp;theme=547b57199640445129b8df81\u0026amp;signature=c95d5f96e00def693565efca75fd1db4de1e9cf08d372065ae690f24b555cb22\">\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/thanx/0JkP31DGq1SVLm6U/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Thanx\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#129B9B\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.thanx.com/loyalty/qualifying-baskets\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/loyalty/qualifying-baskets.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.thanx.com/#organization\",\"name\":\"Thanx\",\"url\":\"https://docs.thanx.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/thanx/NEzLP0j6kJjm2liR/logo/light.svg?fit=max\u0026auto=format\u0026n=NEzLP0j6kJjm2liR\u0026q=85\u0026s=8b3bd3f1ffbb1567714a92067df956d9\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.thanx.com#website\",\"name\":\"Thanx\",\"url\":\"https://docs.thanx.com\",\"publisher\":{\"@id\":\"https://docs.thanx.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.thanx.com/loyalty/qualifying-baskets#webpage\",\"url\":\"https://docs.thanx.com/loyalty/qualifying-baskets\",\"name\":\"Qualifying Rewards for a Basket\",\"description\":\"Returns the subset of the user's rewards and points products that would actually produce a discount against a given basket. Read-only dry-run companion to Create \u0026 Update Basket — no state is mutated, no reward is redeemed, and no points are debited.\",\"dateModified\":\"2026-10-06T19:05:14.479Z\",\"isPartOf\":{\"@id\":\"https://docs.thanx.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.thanx.com/loyalty/qualifying-baskets#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.thanx.com/loyalty/qualifying-baskets#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Reference\",\"item\":\"https://docs.thanx.com/loyalty/headers\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Qualifying Rewards for a Basket\",\"item\":\"https://docs.thanx.com/loyalty/qualifying-baskets\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.thanx.com/loyalty/qualifying-baskets#apireference\",\"headline\":\"Qualifying Rewards for a Basket\",\"name\":\"Qualifying Rewards for a Basket\",\"description\":\"Returns the subset of the user's rewards and points products that would actually produce a discount against a given basket. Read-only dry-run companion to Create \u0026 Update Basket — no state is mutated, no reward is redeemed, and no points are debited.\",\"url\":\"https://docs.thanx.com/loyalty/qualifying-baskets\",\"mainEntityOfPage\":{\"@id\":\"https://docs.thanx.com/loyalty/qualifying-baskets#webpage\"},\"dateModified\":\"2026-10-06T19:05:14.479Z\",\"publisher\":{\"@id\":\"https://docs.thanx.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.thanx.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Thanx\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Thanx","nav":{"global":{"anchors":[{"anchor":"Help Center","icon":"book-bookmark","href":"https://help.thanx.com/hc/en-us"},{"anchor":"Thanx Product Updates","icon":"bullhorn","href":"https://thanx.launchnotes.io/"},{"anchor":"Status","icon":"wave-pulse","href":"https://status.thanx.com"},{"anchor":"Email Support","icon":"envelope","href":"mailto:developer.support@thanx.com"}]},"tabs":[{"tab":"Overview","pages":[{"title":"Overview","href":"/overview/intro"}]},{"tab":"Consumer API","pages":[{"title":"Consumer API","href":"/consumer/overview"}]},{"tab":"Partner API","pages":[{"title":"Partner API","href":"/partner/overview"}]},{"tab":"Loyalty API","pages":[{"group":"Loyalty API","pages":[{"title":"Overview","href":"/loyalty/overview"},{"title":"AWS PrivateLink","href":"/loyalty/private-link"},{"title":"Guest Universal Promo Codes","href":"/loyalty/guest-promo-codes"}]},{"group":"Reference","pages":[{"title":"Headers","href":"/loyalty/headers"},{"title":"Create Guest Token","api":"POST https://loyalty.thanxsandbox.com/loyalty-api/oauth/token","href":"/loyalty/create-guest-token"},{"title":"Get Account","api":"GET https://loyalty.thanxsandbox.com/api/account","href":"/loyalty/get-account"},{"title":"Create \u0026 Update Basket","api":"POST https://loyalty.thanxsandbox.com/api/baskets","description":"This endpoint is used to notify Thanx of the states that a basket is in, apply rewards to the order, and accrue loyalty progress or points for the order.","href":"/loyalty/create-update-basket"},{"title":"Qualifying Rewards for a Basket","api":"POST https://loyalty.thanxsandbox.com/api/baskets/qualifying","href":"/loyalty/qualifying-baskets"}]}]},{"tab":"Webhooks","pages":[{"title":"Webhooks","href":"/webhooks/overview"}]},{"tab":"Data Exports","pages":[{"title":"Data Exports","href":"/data/overview"}]},{"tab":"AI","icon":"sparkles","pages":[{"title":"AI","href":"/ai/overview"}]}]},"basePath":"","title":"Qualifying Rewards for a Basket - Thanx","buildId":"dpl_345ReqzYaAjzS9QpeJemsKdb7KDj","deploymentId":"dpl_345ReqzYaAjzS9QpeJemsKdb7KDj","dynamics":["c2aa737661","2b790eda92","b0f84f53ff"],"chunks":["OpenApiReferenceProvider-C8RPHPxo.js","utils-0BK-9q6z.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-DfjzsUJT.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-B4v9psJ4.js","snippetPresets-CpTQv-Ez.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-BNP-Fvr0.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-BSgu6h1D.js","shallow-Biv1i9Gs.js","getApiPlaygroundDisplay-BoGOXhtF.js","CodeSnippet-DvQoT18_.js","CodeSnippets-Dnpa15xT.js","Page-Buji1S4J.js","getPastedJson-xAIyhUFE.js","icon-S6FBih11.js","MethodPill-SaYeUZyk.js","DuplicateIcon-Cs-p3v2Q.js","createIcon-DjCFEoHq.js","DynamicMarkdown-BcnBltEQ.js","SectionHeading-BUBl0eEF.js","axios-vUo_bRtp.js"]}