This endpoint is only available in SANDBOX. It returns 403 in production.
Authenticate with your merchant app's X-ClientId and Accept-Version: v4.0. No user token is needed. Do not send an Authorization: Bearer header: when a valid Bearer token is present, the API registers a device for that token's user as a side effect. See the Sandbox Testing guide.
Use this endpoint when the reward templates seeded at provisioning don’t cover the reward you need to test. Each call creates one template, publishes it, and creates a granted campaign for it. The response’s campaign_id is the campaign_id for POST /rewards/grant.Send the body as JSON (Content-Type: application/json), with product IDs as JSON arrays.
Reward types
Pick the reward with type, and with scope and bogo_reward where the type needs them. Send only the fields the table lists for that reward: any other combination, including a scope on free_item or a bogo_reward on a non-bogo type, returns 422.
Reward
type
scope
bogo_reward
discount
Amount off the purchase
amount_off
purchase
Cents
Amount off an item
amount_off
item
Cents
Percent off the purchase
percent_off
purchase
Whole percent, 1 to 100
Percent off an item
percent_off
item
Whole percent, 1 to 100
Free item
free_item
Not accepted
Free modifier
free_modifier
Not accepted
Buy one, get an amount off the purchase
bogo
purchase
amount_off
Cents
Buy one, get a percent off the purchase
bogo
purchase
percent_off
Whole percent, 1 to 100
Buy one, get an amount off an item
bogo
item
amount_off
Cents
Buy one, get a percent off an item
bogo
item
percent_off
Whole percent, 1 to 100
Buy one, get an item free
bogo
item
free_item
Not accepted
Parameters
string
required
The template name. It is also the name of the granted campaign.
string
required
Short description of the reward, up to 48 characters.
string
required
The reward type: amount_off, percent_off, free_item, free_modifier or bogo. See Reward types.
string
purchase or item. Required for amount_off, percent_off and bogo. Leave it out for free_item and free_modifier.
string
What a bogo reward gives: amount_off, percent_off, or free_item (item scope only). Send it only with type: bogo, where it is required.
integer
The discount: an amount in cents (500 is $5) or a whole percent (`10` is 10%), per the [Reward types](#reward-types) table. Required for every reward with a value in that table's `discount` column, and must be at least 1. Rewards that give an item for free don't accept it. On purchase-level rewards, an amount can be at most 25000 ($250).
integer
Minimum purchase amount, in cents. Must be at least 1, and at most 25000 ($250) on purchase-level rewards. Leave it out for no minimum, except on amount-off purchase-level rewards (amount_off with scope: purchase, and bogo purchase with amount_off): there the discount is stored as the minimum when it’s left out, and GET /campaigns shows it as minimum_spend.
integer
The most the reward can discount, in cents. Must be at least 1. Required on percent-off purchase-level rewards (percent_off with scope: purchase, and bogo purchase with percent_off). Not accepted by amount-off item rewards (amount_off with scope: item, and bogo item with amount_off), which return 422. On purchase-level rewards it can be at most 25000 ($250), and neither minimum nor an amount discount can exceed it.
string
default:"all"
Where the reward can be redeemed: all, online or instore.
string
Terms and conditions, up to 1,000 characters.
array[string]
The product IDs the reward discounts. Required for item-level rewards redeemable all or online. For free_modifier, these are the modifier IDs given for free. Not accepted with scope: purchase.
array[string]
The product IDs the user must buy. Only for bogo with scope: item.
array[string]
The items the free modifier must be added to. Only for free_modifier.
Product IDs
Product IDs apply to every venue in redemption_venue.
They aren’t checked against any menu or catalog. Use the IDs your test orders will send.
For bogo item rewards, the same ID can go in both required_product_ids and discounted_product_ids (buy one, get a second free). The basket then needs two lines of that item, since one line can’t be both the item bought and the item discounted.
Up to 100 IDs per list, each up to 255 characters.
Response
Returns 201 with the template in the same format as the Partner API’s Get Reward Template, plus two fields:
object
Show reward_template
string
Reward template ID
string
Template name
string
automatic for purchase-level rewards, manual for item-level rewards
string
purchase, item, modifier, bogo/purchase or bogo/item
string
Short description of the reward
string
Terms and conditions
hash
Discount details, as in the Partner API. value is not returned for these subtypes; read configuration instead. For rewards that give an item for free, max_value_cents is the maximum you sent, and is left out without one.
string
all, online or in_store
hash
Image URLs. Empty for templates created here.
string
The granted campaign. Pass it as campaign_id to Grant Reward.
hash
The discount, minimum and maximum you sent, in the units you sent them. Fields you left out are null.
Templates created with this endpoint don’t send the reward_template.created webhook. Use the response, or poll the Partner API’s reward templates, instead of waiting for the webhook.
Errors
Status
Code
When
400
BAD_REQUEST
A required parameter is missing or has the wrong type
400
CLIENT_ID_HEADER_INVALID
The X-ClientId header is missing or doesn’t match an app
403
FORBIDDEN
Called in production, or your X-ClientId isn’t tied to exactly one merchant
422
REWARD_TEMPLATE_INVALID
The template can’t be created. The message says why, for example an unsupported type combination, a parameter the reward type doesn’t accept, a missing discount, a missing maximum on a percent-off purchase-level reward, an amount below 1 or over $250 on a purchase-level reward, a percent over 100, or missing discounted_product_ids for an online item reward. Model validation messages show amounts in dollars
A 422 creates nothing: no template and no campaign.
Not supported yet
Templates are created with the reward builder’s default options. These builder options can’t be set through this endpoint yet:
Modifiers discounted together with the item
Modifiers the qualifying (buy) item must carry, on buy-one-get-one rewards
The “what’s discounted” choice on buy-one-get-one and item rewards
One / All coverage for selected modifiers
curl https://api.thanxsandbox.com/reward_templates \ -X POST \ -H "Content-Type: application/json" \ -H "Accept-Version: v4.0" \ -H "Accept: application/json" \ -H "X-ClientId: ${client_id}" \ -d '{ "name": "$2.50 off a coffee", "description": "$2.50 off any coffee", "type": "amount_off", "scope": "item", "discount": 250, "minimum": 500, "discounted_product_ids": ["SBX-COFFEE-001"] }'
curl https://api.thanxsandbox.com/reward_templates \ -X POST \ -H "Content-Type: application/json" \ -H "Accept-Version: v4.0" \ -H "Accept: application/json" \ -H "X-ClientId: ${client_id}" \ -d '{ "name": "10% off your order", "description": "10% off, up to $10", "type": "percent_off", "scope": "purchase", "discount": 10, "maximum": 1000 }'
curl https://api.thanxsandbox.com/reward_templates \ -X POST \ -H "Content-Type: application/json" \ -H "Accept-Version: v4.0" \ -H "Accept: application/json" \ -H "X-ClientId: ${client_id}" \ -d '{ "name": "Free extra shot", "description": "A free extra shot on any latte", "type": "free_modifier", "discounted_product_ids": ["SBX-EXTRA-SHOT"], "parent_product_ids": ["SBX-LATTE-001"] }'
curl https://api.thanxsandbox.com/reward_templates \ -X POST \ -H "Content-Type: application/json" \ -H "Accept-Version: v4.0" \ -H "Accept: application/json" \ -H "X-ClientId: ${client_id}" \ -d '{ "name": "Buy a sandwich, get a cookie", "description": "Free cookie with any sandwich", "type": "bogo", "scope": "item", "bogo_reward": "free_item", "required_product_ids": ["SBX-SANDWICH-001"], "discounted_product_ids": ["SBX-COOKIE-001"] }'
{ "reward_template": { "id": "x7pq2m9kd4", "name": "$2.50 off a coffee", "type": "manual", "subtype": "item", "description": "$2.50 off any coffee", "fine_print": null, "discount": { "type": "item", "applies_to": "basket", "item_name": "$2.50 off any coffee" }, "redemption_venue": "all", "images": {}, "campaign_id": "85133c3c1258", "configuration": { "discount": 250, "minimum": 500, "maximum": null } }}
{ "error": { "code": "REWARD_TEMPLATE_INVALID", "message": "maximum is not supported for amount_off item rewards" }}
{"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":""},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6b0d80fd578844d44bfd12aa","clientVersion":"0.0.4377","searchFilterCounts":[{"language":"default","tag":"Reference","count":103},{"language":"default","tag":"Consumer API","count":96},{"language":"default","tag":"Data Exports","count":40},{"language":"default","tag":"Partner API","count":30},{"language":"default","tag":"Thanx Connex","count":24},{"language":"default","tag":"Destination Setup","count":23},{"language":"default","tag":"Overview","count":22},{"language":"default","tag":"Models","count":11},{"language":"default","tag":"Loyalty API","count":11},{"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":"rbac-expansion","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":"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":"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":"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":"turbopuffer-dual-write","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":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"consumer/sandbox/create-reward-template","slug":"/consumer/sandbox/create-reward-template","pageMetadata":{"title":"Create Reward Template","api":"POST /reward_templates","description":"Creates a published reward template at your sandbox merchant, with a granted campaign you can pass to Grant Reward right away.","href":"/consumer/sandbox/create-reward-template"},"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: \"Creates a published reward template at your sandbox merchant, with a granted campaign you can pass to Grant Reward right away.\"\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`,li:`li`,p:`p`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{Expandable,Heading,Note,ParamField,ResponseField,Table,Warning}=_components;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(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(Note,{children:_jsxs(_components.p,{children:[`Please review proper request headers `,_jsx(_components.a,{href:`/consumer/usage/headers`,children:`here`}),`.`]})}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`This endpoint is only available in `,_jsx(_components.strong,{children:`SANDBOX`}),`. It returns `,_jsx(_components.code,{children:`403`}),` in production.`]})}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`Authenticate with your merchant app's `,_jsx(_components.code,{children:`X-ClientId`}),` and `,_jsx(_components.code,{children:`Accept-Version: v4.0`}),`. No user token is needed. Do not send an `,_jsx(_components.code,{children:`Authorization: Bearer`}),` header: when a valid Bearer token is present, the API registers a device for that token's user as a side effect. See the `,_jsx(_components.a,{href:`/consumer/sandbox-testing`,children:`Sandbox Testing guide`}),`.`]})}),`\n`,_jsxs(_components.p,{children:[`Use this endpoint when the reward templates seeded at provisioning don’t cover the reward you need to test. Each call creates one template, publishes it, and creates a granted campaign for it. The response’s `,_jsx(_components.code,{children:`campaign_id`}),` is the `,_jsx(_components.code,{children:`campaign_id`}),` for `,_jsx(_components.a,{href:`/consumer/rewards/grant-reward`,children:_jsx(_components.code,{children:`POST /rewards/grant`})}),`.`]}),`\n`,_jsxs(_components.p,{children:[`Send the body as JSON (`,_jsx(_components.code,{children:`Content-Type: application/json`}),`), with product IDs as JSON arrays.`]}),`\n`,_jsx(Heading,{level:`3`,id:`reward-types`,children:`Reward types`}),`\n`,_jsxs(_components.p,{children:[`Pick the reward with `,_jsx(_components.code,{children:`type`}),`, and with `,_jsx(_components.code,{children:`scope`}),` and `,_jsx(_components.code,{children:`bogo_reward`}),` where the type needs them. Send only the fields the table lists for that reward: any other combination, including a `,_jsx(_components.code,{children:`scope`}),` on `,_jsx(_components.code,{children:`free_item`}),` or a `,_jsx(_components.code,{children:`bogo_reward`}),` on a non-bogo type, returns `,_jsx(_components.code,{children:`422`}),`.`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Reward`}),_jsx(_components.th,{children:_jsx(_components.code,{children:`type`})}),_jsx(_components.th,{children:_jsx(_components.code,{children:`scope`})}),_jsx(_components.th,{children:_jsx(_components.code,{children:`bogo_reward`})}),_jsx(_components.th,{children:_jsx(_components.code,{children:`discount`})})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Amount off the purchase`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`amount_off`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`purchase`})}),_jsx(_components.td,{}),_jsx(_components.td,{children:`Cents`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Amount off an item`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`amount_off`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`item`})}),_jsx(_components.td,{}),_jsx(_components.td,{children:`Cents`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Percent off the purchase`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`percent_off`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`purchase`})}),_jsx(_components.td,{}),_jsx(_components.td,{children:`Whole percent, 1 to 100`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Percent off an item`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`percent_off`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`item`})}),_jsx(_components.td,{}),_jsx(_components.td,{children:`Whole percent, 1 to 100`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Free item`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`free_item`})}),_jsx(_components.td,{}),_jsx(_components.td,{}),_jsx(_components.td,{children:`Not accepted`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Free modifier`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`free_modifier`})}),_jsx(_components.td,{}),_jsx(_components.td,{}),_jsx(_components.td,{children:`Not accepted`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Buy one, get an amount off the purchase`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`bogo`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`purchase`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`amount_off`})}),_jsx(_components.td,{children:`Cents`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Buy one, get a percent off the purchase`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`bogo`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`purchase`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`percent_off`})}),_jsx(_components.td,{children:`Whole percent, 1 to 100`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Buy one, get an amount off an item`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`bogo`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`item`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`amount_off`})}),_jsx(_components.td,{children:`Cents`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Buy one, get a percent off an item`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`bogo`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`item`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`percent_off`})}),_jsx(_components.td,{children:`Whole percent, 1 to 100`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Buy one, get an item free`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`bogo`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`item`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`free_item`})}),_jsx(_components.td,{children:`Not accepted`})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`parameters`,children:`Parameters`}),`\n`,_jsx(ParamField,{body:`name`,type:`string`,required:true,id:`param-name`,children:_jsx(_components.p,{children:`The template name. It is also the name of the granted campaign.`})}),`\n`,_jsx(ParamField,{body:`description`,type:`string`,required:true,id:`param-description`,children:_jsx(_components.p,{children:`Short description of the reward, up to 48 characters.`})}),`\n`,_jsx(ParamField,{body:`type`,type:`string`,required:true,id:`param-type`,children:_jsxs(_components.p,{children:[`The reward type: `,_jsx(_components.code,{children:`amount_off`}),`, `,_jsx(_components.code,{children:`percent_off`}),`, `,_jsx(_components.code,{children:`free_item`}),`, `,_jsx(_components.code,{children:`free_modifier`}),` or `,_jsx(_components.code,{children:`bogo`}),`. See `,_jsx(_components.a,{href:`#reward-types`,children:`Reward types`}),`.`]})}),`\n`,_jsx(ParamField,{body:`scope`,type:`string`,id:`param-scope`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`purchase`}),` or `,_jsx(_components.code,{children:`item`}),`. Required for `,_jsx(_components.code,{children:`amount_off`}),`, `,_jsx(_components.code,{children:`percent_off`}),` and `,_jsx(_components.code,{children:`bogo`}),`. Leave it out for `,_jsx(_components.code,{children:`free_item`}),` and `,_jsx(_components.code,{children:`free_modifier`}),`.`]})}),`\n`,_jsx(ParamField,{body:`bogo_reward`,type:`string`,id:`param-bogo-reward`,children:_jsxs(_components.p,{children:[`What a `,_jsx(_components.code,{children:`bogo`}),` reward gives: `,_jsx(_components.code,{children:`amount_off`}),`, `,_jsx(_components.code,{children:`percent_off`}),`, or `,_jsx(_components.code,{children:`free_item`}),` (item scope only). Send it only with `,_jsx(_components.code,{children:`type: bogo`}),`, where it is required.`]})}),`\n`,_jsx(ParamField,{body:`discount`,type:`integer`,id:`param-discount`,children:_jsxs(_components.p,{children:[`The discount: an amount in cents (`,_jsx(_components.code,{children:`500`}),` is `,\"$5) or a whole percent (`10` is 10%), per the [Reward types](#reward-types) table. Required for every reward with a value in that table's `discount` column, and must be at least 1. Rewards that give an item for free don't accept it. On purchase-level rewards, an amount can be at most 25000 ($\",`250).`]})}),`\n`,_jsx(ParamField,{body:`minimum`,type:`integer`,id:`param-minimum`,children:_jsxs(_components.p,{children:[`Minimum purchase amount, in cents. Must be at least 1, and at most 25000 ($250) on purchase-level rewards. Leave it out for no minimum, except on amount-off purchase-level rewards (`,_jsx(_components.code,{children:`amount_off`}),` with `,_jsx(_components.code,{children:`scope: purchase`}),`, and `,_jsx(_components.code,{children:`bogo`}),` purchase with `,_jsx(_components.code,{children:`amount_off`}),`): there the `,_jsx(_components.code,{children:`discount`}),` is stored as the minimum when it’s left out, and `,_jsx(_components.code,{children:`GET /campaigns`}),` shows it as `,_jsx(_components.code,{children:`minimum_spend`}),`.`]})}),`\n`,_jsx(ParamField,{body:`maximum`,type:`integer`,id:`param-maximum`,children:_jsxs(_components.p,{children:[`The most the reward can discount, in cents. Must be at least 1. `,_jsx(_components.strong,{children:`Required`}),` on percent-off purchase-level rewards (`,_jsx(_components.code,{children:`percent_off`}),` with `,_jsx(_components.code,{children:`scope: purchase`}),`, and `,_jsx(_components.code,{children:`bogo`}),` purchase with `,_jsx(_components.code,{children:`percent_off`}),`). Not accepted by amount-off item rewards (`,_jsx(_components.code,{children:`amount_off`}),` with `,_jsx(_components.code,{children:`scope: item`}),`, and `,_jsx(_components.code,{children:`bogo`}),` item with `,_jsx(_components.code,{children:`amount_off`}),`), which return `,_jsx(_components.code,{children:`422`}),`. On purchase-level rewards it can be at most 25000 ($250), and neither `,_jsx(_components.code,{children:`minimum`}),` nor an amount `,_jsx(_components.code,{children:`discount`}),` can exceed it.`]})}),`\n`,_jsx(ParamField,{body:`redemption_venue`,type:`string`,default:`all`,id:`param-redemption-venue`,children:_jsxs(_components.p,{children:[`Where the reward can be redeemed: `,_jsx(_components.code,{children:`all`}),`, `,_jsx(_components.code,{children:`online`}),` or `,_jsx(_components.code,{children:`instore`}),`.`]})}),`\n`,_jsx(ParamField,{body:`fine_print`,type:`string`,id:`param-fine-print`,children:_jsx(_components.p,{children:`Terms and conditions, up to 1,000 characters.`})}),`\n`,_jsx(ParamField,{body:`discounted_product_ids`,type:`array[string]`,id:`param-discounted-product-ids`,children:_jsxs(_components.p,{children:[`The product IDs the reward discounts. Required for item-level rewards redeemable `,_jsx(_components.code,{children:`all`}),` or `,_jsx(_components.code,{children:`online`}),`. For `,_jsx(_components.code,{children:`free_modifier`}),`, these are the modifier IDs given for free. Not accepted with `,_jsx(_components.code,{children:`scope: purchase`}),`.`]})}),`\n`,_jsx(ParamField,{body:`required_product_ids`,type:`array[string]`,id:`param-required-product-ids`,children:_jsxs(_components.p,{children:[`The product IDs the user must buy. Only for `,_jsx(_components.code,{children:`bogo`}),` with `,_jsx(_components.code,{children:`scope: item`}),`.`]})}),`\n`,_jsx(ParamField,{body:`parent_product_ids`,type:`array[string]`,id:`param-parent-product-ids`,children:_jsxs(_components.p,{children:[`The items the free modifier must be added to. Only for `,_jsx(_components.code,{children:`free_modifier`}),`.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`product-ids`,children:`Product IDs`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Product IDs apply to every venue in `,_jsx(_components.code,{children:`redemption_venue`}),`.`]}),`\n`,_jsx(_components.li,{children:`They aren’t checked against any menu or catalog. Use the IDs your test orders will send.`}),`\n`,_jsxs(_components.li,{children:[`For `,_jsx(_components.code,{children:`bogo`}),` item rewards, the same ID can go in both `,_jsx(_components.code,{children:`required_product_ids`}),` and `,_jsx(_components.code,{children:`discounted_product_ids`}),` (buy one, get a second free). The basket then needs two lines of that item, since one line can’t be both the item bought and the item discounted.`]}),`\n`,_jsx(_components.li,{children:`Up to 100 IDs per list, each up to 255 characters.`}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`response`,children:`Response`}),`\n`,_jsxs(_components.p,{children:[`Returns `,_jsx(_components.code,{children:`201`}),` with the template in the same format as the Partner API’s `,_jsx(_components.a,{href:`/partner/reward-templates/get-reward-template`,children:`Get Reward Template`}),`, plus two fields:`]}),`\n`,_jsx(ResponseField,{name:`reward_template`,type:`object`,id:`param-reward-template`,children:_jsxs(Expandable,{title:`reward_template`,children:[_jsx(ResponseField,{name:`id`,type:`string`,id:`param-id`,children:_jsx(_components.p,{children:`Reward template ID`})}),_jsx(ResponseField,{name:`name`,type:`string`,id:`param-name-1`,children:_jsx(_components.p,{children:`Template name`})}),_jsx(ResponseField,{name:`type`,type:`string`,id:`param-type-1`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`automatic`}),` for purchase-level rewards, `,_jsx(_components.code,{children:`manual`}),` for item-level rewards`]})}),_jsx(ResponseField,{name:`subtype`,type:`string`,id:`param-subtype`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`purchase`}),`, `,_jsx(_components.code,{children:`item`}),`, `,_jsx(_components.code,{children:`modifier`}),`, `,_jsx(_components.code,{children:`bogo/purchase`}),` or `,_jsx(_components.code,{children:`bogo/item`})]})}),_jsx(ResponseField,{name:`description`,type:`string`,id:`param-description-1`,children:_jsx(_components.p,{children:`Short description of the reward`})}),_jsx(ResponseField,{name:`fine_print`,type:`string`,id:`param-fine-print-1`,children:_jsx(_components.p,{children:`Terms and conditions`})}),_jsx(ResponseField,{name:`discount`,type:`hash`,id:`param-discount-1`,children:_jsxs(_components.p,{children:[`Discount details, as in the Partner API. `,_jsx(_components.code,{children:`value`}),` is not returned for these subtypes; read `,_jsx(_components.code,{children:`configuration`}),` instead. For rewards that give an item for free, `,_jsx(_components.code,{children:`max_value_cents`}),` is the `,_jsx(_components.code,{children:`maximum`}),` you sent, and is left out without one.`]})}),_jsx(ResponseField,{name:`redemption_venue`,type:`string`,id:`param-redemption-venue-1`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`all`}),`, `,_jsx(_components.code,{children:`online`}),` or `,_jsx(_components.code,{children:`in_store`})]})}),_jsx(ResponseField,{name:`images`,type:`hash`,id:`param-images`,children:_jsx(_components.p,{children:`Image URLs. Empty for templates created here.`})}),_jsx(ResponseField,{name:`campaign_id`,type:`string`,id:`param-campaign-id`,children:_jsxs(_components.p,{children:[`The granted campaign. Pass it as `,_jsx(_components.code,{children:`campaign_id`}),` to `,_jsx(_components.a,{href:`/consumer/rewards/grant-reward`,children:`Grant Reward`}),`.`]})}),_jsx(ResponseField,{name:`configuration`,type:`hash`,id:`param-configuration`,children:_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`discount`}),`, `,_jsx(_components.code,{children:`minimum`}),` and `,_jsx(_components.code,{children:`maximum`}),` you sent, in the units you sent them. Fields you left out are `,_jsx(_components.code,{children:`null`}),`.`]})})]})}),`\n`,_jsxs(_components.p,{children:[`The new template also appears in `,_jsx(_components.a,{href:`/consumer/sandbox/list-campaigns`,children:_jsx(_components.code,{children:`GET /campaigns`})}),` and in the Partner API’s `,_jsx(_components.a,{href:`/partner/reward-templates/list-reward-templates`,children:`List Reward Templates`}),`.`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Templates created with this endpoint don’t send the `,_jsx(_components.code,{children:`reward_template.created`}),` webhook. Use the response, or poll the Partner API’s reward templates, instead of waiting for the webhook.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`errors`,children:`Errors`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Status`}),_jsx(_components.th,{children:`Code`}),_jsx(_components.th,{children:`When`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`400`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`BAD_REQUEST`})}),_jsx(_components.td,{children:`A required parameter is missing or has the wrong type`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`400`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`CLIENT_ID_HEADER_INVALID`})}),_jsxs(_components.td,{children:[`The `,_jsx(_components.code,{children:`X-ClientId`}),` header is missing or doesn’t match an app`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`403`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`FORBIDDEN`})}),_jsxs(_components.td,{children:[`Called in production, or your `,_jsx(_components.code,{children:`X-ClientId`}),` isn’t tied to exactly one merchant`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`422`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`REWARD_TEMPLATE_INVALID`})}),_jsxs(_components.td,{children:[`The template can’t be created. The `,_jsx(_components.code,{children:`message`}),` says why, for example an unsupported `,_jsx(_components.code,{children:`type`}),` combination, a parameter the reward type doesn’t accept, a missing `,_jsx(_components.code,{children:`discount`}),`, a missing `,_jsx(_components.code,{children:`maximum`}),` on a percent-off purchase-level reward, an amount below 1 or over $250 on a purchase-level reward, a percent over 100, or missing `,_jsx(_components.code,{children:`discounted_product_ids`}),` for an online item reward. Model validation messages show amounts in dollars`]})]})]})]}),`\n`,_jsxs(_components.p,{children:[`A `,_jsx(_components.code,{children:`422`}),` creates nothing: no template and no campaign.`]}),`\n`,_jsx(Heading,{level:`3`,id:`not-supported-yet`,children:`Not supported yet`}),`\n`,_jsx(_components.p,{children:`Templates are created with the reward builder’s default options. These builder options can’t be set through this endpoint yet:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Modifiers discounted together with the item`}),`\n`,_jsx(_components.li,{children:`Modifiers the qualifying (buy) item must carry, on buy-one-get-one rewards`}),`\n`,_jsx(_components.li,{children:`The “what’s discounted” choice on buy-one-get-one and item rewards`}),`\n`,_jsx(_components.li,{children:`One / All coverage for selected modifiers`}),`\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":"Create Reward Template","api":"POST /reward_templates","description":"Creates a published reward template at your sandbox merchant, with a granted campaign you can pass to Grant Reward right away.","href":"/consumer/sandbox/create-reward-template"}}},"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`,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,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(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(Note,{children:_jsxs(_components.p,{children:[`Please review proper request headers `,_jsx(_components.a,{href:`/consumer/usage/headers`,children:`here`}),`.`]})}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`This endpoint is only available in `,_jsx(_components.strong,{children:`SANDBOX`}),`. It returns `,_jsx(_components.code,{children:`403`}),` in production.`]})}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`Authenticate with your merchant app's `,_jsx(_components.code,{children:`X-ClientId`}),` and `,_jsx(_components.code,{children:`Accept-Version: v4.0`}),`. No user token is needed. Do not send an `,_jsx(_components.code,{children:`Authorization: Bearer`}),` header: when a valid Bearer token is present, the API registers a device for that token's user as a side effect. See the `,_jsx(_components.a,{href:`/consumer/sandbox-testing`,children:`Sandbox Testing guide`}),`.`]})}),`\n`,_jsxs(_components.p,{children:[`Use this endpoint when the reward templates seeded at provisioning don’t cover the reward you need to test. Each call creates one template, publishes it, and creates a granted campaign for it. The response’s `,_jsx(_components.code,{children:`campaign_id`}),` is the `,_jsx(_components.code,{children:`campaign_id`}),` for `,_jsx(_components.a,{href:`/consumer/rewards/grant-reward`,children:_jsx(_components.code,{children:`POST /rewards/grant`})}),`.`]}),`\n`,_jsxs(_components.p,{children:[`Send the body as JSON (`,_jsx(_components.code,{children:`Content-Type: application/json`}),`), with product IDs as JSON arrays.`]}),`\n`,_jsx(Heading,{level:`3`,id:`reward-types`,children:`Reward types`}),`\n`,_jsxs(_components.p,{children:[`Pick the reward with `,_jsx(_components.code,{children:`type`}),`, and with `,_jsx(_components.code,{children:`scope`}),` and `,_jsx(_components.code,{children:`bogo_reward`}),` where the type needs them. Send only the fields the table lists for that reward: any other combination, including a `,_jsx(_components.code,{children:`scope`}),` on `,_jsx(_components.code,{children:`free_item`}),` or a `,_jsx(_components.code,{children:`bogo_reward`}),` on a non-bogo type, returns `,_jsx(_components.code,{children:`422`}),`.`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Reward`}),_jsx(_components.th,{children:_jsx(_components.code,{children:`type`})}),_jsx(_components.th,{children:_jsx(_components.code,{children:`scope`})}),_jsx(_components.th,{children:_jsx(_components.code,{children:`bogo_reward`})}),_jsx(_components.th,{children:_jsx(_components.code,{children:`discount`})})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Amount off the purchase`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`amount_off`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`purchase`})}),_jsx(_components.td,{}),_jsx(_components.td,{children:`Cents`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Amount off an item`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`amount_off`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`item`})}),_jsx(_components.td,{}),_jsx(_components.td,{children:`Cents`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Percent off the purchase`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`percent_off`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`purchase`})}),_jsx(_components.td,{}),_jsx(_components.td,{children:`Whole percent, 1 to 100`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Percent off an item`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`percent_off`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`item`})}),_jsx(_components.td,{}),_jsx(_components.td,{children:`Whole percent, 1 to 100`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Free item`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`free_item`})}),_jsx(_components.td,{}),_jsx(_components.td,{}),_jsx(_components.td,{children:`Not accepted`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Free modifier`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`free_modifier`})}),_jsx(_components.td,{}),_jsx(_components.td,{}),_jsx(_components.td,{children:`Not accepted`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Buy one, get an amount off the purchase`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`bogo`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`purchase`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`amount_off`})}),_jsx(_components.td,{children:`Cents`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Buy one, get a percent off the purchase`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`bogo`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`purchase`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`percent_off`})}),_jsx(_components.td,{children:`Whole percent, 1 to 100`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Buy one, get an amount off an item`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`bogo`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`item`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`amount_off`})}),_jsx(_components.td,{children:`Cents`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Buy one, get a percent off an item`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`bogo`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`item`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`percent_off`})}),_jsx(_components.td,{children:`Whole percent, 1 to 100`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Buy one, get an item free`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`bogo`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`item`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`free_item`})}),_jsx(_components.td,{children:`Not accepted`})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`parameters`,children:`Parameters`}),`\n`,_jsx(ParamField,{body:`name`,type:`string`,required:true,id:`param-name`,children:_jsx(_components.p,{children:`The template name. It is also the name of the granted campaign.`})}),`\n`,_jsx(ParamField,{body:`description`,type:`string`,required:true,id:`param-description`,children:_jsx(_components.p,{children:`Short description of the reward, up to 48 characters.`})}),`\n`,_jsx(ParamField,{body:`type`,type:`string`,required:true,id:`param-type`,children:_jsxs(_components.p,{children:[`The reward type: `,_jsx(_components.code,{children:`amount_off`}),`, `,_jsx(_components.code,{children:`percent_off`}),`, `,_jsx(_components.code,{children:`free_item`}),`, `,_jsx(_components.code,{children:`free_modifier`}),` or `,_jsx(_components.code,{children:`bogo`}),`. See `,_jsx(_components.a,{href:`#reward-types`,children:`Reward types`}),`.`]})}),`\n`,_jsx(ParamField,{body:`scope`,type:`string`,id:`param-scope`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`purchase`}),` or `,_jsx(_components.code,{children:`item`}),`. Required for `,_jsx(_components.code,{children:`amount_off`}),`, `,_jsx(_components.code,{children:`percent_off`}),` and `,_jsx(_components.code,{children:`bogo`}),`. Leave it out for `,_jsx(_components.code,{children:`free_item`}),` and `,_jsx(_components.code,{children:`free_modifier`}),`.`]})}),`\n`,_jsx(ParamField,{body:`bogo_reward`,type:`string`,id:`param-bogo-reward`,children:_jsxs(_components.p,{children:[`What a `,_jsx(_components.code,{children:`bogo`}),` reward gives: `,_jsx(_components.code,{children:`amount_off`}),`, `,_jsx(_components.code,{children:`percent_off`}),`, or `,_jsx(_components.code,{children:`free_item`}),` (item scope only). Send it only with `,_jsx(_components.code,{children:`type: bogo`}),`, where it is required.`]})}),`\n`,_jsx(ParamField,{body:`discount`,type:`integer`,id:`param-discount`,children:_jsxs(_components.p,{children:[`The discount: an amount in cents (`,_jsx(_components.code,{children:`500`}),` is `,\"$5) or a whole percent (`10` is 10%), per the [Reward types](#reward-types) table. Required for every reward with a value in that table's `discount` column, and must be at least 1. Rewards that give an item for free don't accept it. On purchase-level rewards, an amount can be at most 25000 ($\",`250).`]})}),`\n`,_jsx(ParamField,{body:`minimum`,type:`integer`,id:`param-minimum`,children:_jsxs(_components.p,{children:[`Minimum purchase amount, in cents. Must be at least 1, and at most 25000 ($250) on purchase-level rewards. Leave it out for no minimum, except on amount-off purchase-level rewards (`,_jsx(_components.code,{children:`amount_off`}),` with `,_jsx(_components.code,{children:`scope: purchase`}),`, and `,_jsx(_components.code,{children:`bogo`}),` purchase with `,_jsx(_components.code,{children:`amount_off`}),`): there the `,_jsx(_components.code,{children:`discount`}),` is stored as the minimum when it’s left out, and `,_jsx(_components.code,{children:`GET /campaigns`}),` shows it as `,_jsx(_components.code,{children:`minimum_spend`}),`.`]})}),`\n`,_jsx(ParamField,{body:`maximum`,type:`integer`,id:`param-maximum`,children:_jsxs(_components.p,{children:[`The most the reward can discount, in cents. Must be at least 1. `,_jsx(_components.strong,{children:`Required`}),` on percent-off purchase-level rewards (`,_jsx(_components.code,{children:`percent_off`}),` with `,_jsx(_components.code,{children:`scope: purchase`}),`, and `,_jsx(_components.code,{children:`bogo`}),` purchase with `,_jsx(_components.code,{children:`percent_off`}),`). Not accepted by amount-off item rewards (`,_jsx(_components.code,{children:`amount_off`}),` with `,_jsx(_components.code,{children:`scope: item`}),`, and `,_jsx(_components.code,{children:`bogo`}),` item with `,_jsx(_components.code,{children:`amount_off`}),`), which return `,_jsx(_components.code,{children:`422`}),`. On purchase-level rewards it can be at most 25000 ($250), and neither `,_jsx(_components.code,{children:`minimum`}),` nor an amount `,_jsx(_components.code,{children:`discount`}),` can exceed it.`]})}),`\n`,_jsx(ParamField,{body:`redemption_venue`,type:`string`,default:`all`,id:`param-redemption-venue`,children:_jsxs(_components.p,{children:[`Where the reward can be redeemed: `,_jsx(_components.code,{children:`all`}),`, `,_jsx(_components.code,{children:`online`}),` or `,_jsx(_components.code,{children:`instore`}),`.`]})}),`\n`,_jsx(ParamField,{body:`fine_print`,type:`string`,id:`param-fine-print`,children:_jsx(_components.p,{children:`Terms and conditions, up to 1,000 characters.`})}),`\n`,_jsx(ParamField,{body:`discounted_product_ids`,type:`array[string]`,id:`param-discounted-product-ids`,children:_jsxs(_components.p,{children:[`The product IDs the reward discounts. Required for item-level rewards redeemable `,_jsx(_components.code,{children:`all`}),` or `,_jsx(_components.code,{children:`online`}),`. For `,_jsx(_components.code,{children:`free_modifier`}),`, these are the modifier IDs given for free. Not accepted with `,_jsx(_components.code,{children:`scope: purchase`}),`.`]})}),`\n`,_jsx(ParamField,{body:`required_product_ids`,type:`array[string]`,id:`param-required-product-ids`,children:_jsxs(_components.p,{children:[`The product IDs the user must buy. Only for `,_jsx(_components.code,{children:`bogo`}),` with `,_jsx(_components.code,{children:`scope: item`}),`.`]})}),`\n`,_jsx(ParamField,{body:`parent_product_ids`,type:`array[string]`,id:`param-parent-product-ids`,children:_jsxs(_components.p,{children:[`The items the free modifier must be added to. Only for `,_jsx(_components.code,{children:`free_modifier`}),`.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`product-ids`,children:`Product IDs`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Product IDs apply to every venue in `,_jsx(_components.code,{children:`redemption_venue`}),`.`]}),`\n`,_jsx(_components.li,{children:`They aren’t checked against any menu or catalog. Use the IDs your test orders will send.`}),`\n`,_jsxs(_components.li,{children:[`For `,_jsx(_components.code,{children:`bogo`}),` item rewards, the same ID can go in both `,_jsx(_components.code,{children:`required_product_ids`}),` and `,_jsx(_components.code,{children:`discounted_product_ids`}),` (buy one, get a second free). The basket then needs two lines of that item, since one line can’t be both the item bought and the item discounted.`]}),`\n`,_jsx(_components.li,{children:`Up to 100 IDs per list, each up to 255 characters.`}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`response`,children:`Response`}),`\n`,_jsxs(_components.p,{children:[`Returns `,_jsx(_components.code,{children:`201`}),` with the template in the same format as the Partner API’s `,_jsx(_components.a,{href:`/partner/reward-templates/get-reward-template`,children:`Get Reward Template`}),`, plus two fields:`]}),`\n`,_jsx(ResponseField,{name:`reward_template`,type:`object`,id:`param-reward-template`,children:_jsxs(Expandable,{title:`reward_template`,children:[_jsx(ResponseField,{name:`id`,type:`string`,id:`param-id`,children:_jsx(_components.p,{children:`Reward template ID`})}),_jsx(ResponseField,{name:`name`,type:`string`,id:`param-name-1`,children:_jsx(_components.p,{children:`Template name`})}),_jsx(ResponseField,{name:`type`,type:`string`,id:`param-type-1`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`automatic`}),` for purchase-level rewards, `,_jsx(_components.code,{children:`manual`}),` for item-level rewards`]})}),_jsx(ResponseField,{name:`subtype`,type:`string`,id:`param-subtype`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`purchase`}),`, `,_jsx(_components.code,{children:`item`}),`, `,_jsx(_components.code,{children:`modifier`}),`, `,_jsx(_components.code,{children:`bogo/purchase`}),` or `,_jsx(_components.code,{children:`bogo/item`})]})}),_jsx(ResponseField,{name:`description`,type:`string`,id:`param-description-1`,children:_jsx(_components.p,{children:`Short description of the reward`})}),_jsx(ResponseField,{name:`fine_print`,type:`string`,id:`param-fine-print-1`,children:_jsx(_components.p,{children:`Terms and conditions`})}),_jsx(ResponseField,{name:`discount`,type:`hash`,id:`param-discount-1`,children:_jsxs(_components.p,{children:[`Discount details, as in the Partner API. `,_jsx(_components.code,{children:`value`}),` is not returned for these subtypes; read `,_jsx(_components.code,{children:`configuration`}),` instead. For rewards that give an item for free, `,_jsx(_components.code,{children:`max_value_cents`}),` is the `,_jsx(_components.code,{children:`maximum`}),` you sent, and is left out without one.`]})}),_jsx(ResponseField,{name:`redemption_venue`,type:`string`,id:`param-redemption-venue-1`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`all`}),`, `,_jsx(_components.code,{children:`online`}),` or `,_jsx(_components.code,{children:`in_store`})]})}),_jsx(ResponseField,{name:`images`,type:`hash`,id:`param-images`,children:_jsx(_components.p,{children:`Image URLs. Empty for templates created here.`})}),_jsx(ResponseField,{name:`campaign_id`,type:`string`,id:`param-campaign-id`,children:_jsxs(_components.p,{children:[`The granted campaign. Pass it as `,_jsx(_components.code,{children:`campaign_id`}),` to `,_jsx(_components.a,{href:`/consumer/rewards/grant-reward`,children:`Grant Reward`}),`.`]})}),_jsx(ResponseField,{name:`configuration`,type:`hash`,id:`param-configuration`,children:_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`discount`}),`, `,_jsx(_components.code,{children:`minimum`}),` and `,_jsx(_components.code,{children:`maximum`}),` you sent, in the units you sent them. Fields you left out are `,_jsx(_components.code,{children:`null`}),`.`]})})]})}),`\n`,_jsxs(_components.p,{children:[`The new template also appears in `,_jsx(_components.a,{href:`/consumer/sandbox/list-campaigns`,children:_jsx(_components.code,{children:`GET /campaigns`})}),` and in the Partner API’s `,_jsx(_components.a,{href:`/partner/reward-templates/list-reward-templates`,children:`List Reward Templates`}),`.`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Templates created with this endpoint don’t send the `,_jsx(_components.code,{children:`reward_template.created`}),` webhook. Use the response, or poll the Partner API’s reward templates, instead of waiting for the webhook.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`errors`,children:`Errors`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Status`}),_jsx(_components.th,{children:`Code`}),_jsx(_components.th,{children:`When`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`400`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`BAD_REQUEST`})}),_jsx(_components.td,{children:`A required parameter is missing or has the wrong type`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`400`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`CLIENT_ID_HEADER_INVALID`})}),_jsxs(_components.td,{children:[`The `,_jsx(_components.code,{children:`X-ClientId`}),` header is missing or doesn’t match an app`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`403`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`FORBIDDEN`})}),_jsxs(_components.td,{children:[`Called in production, or your `,_jsx(_components.code,{children:`X-ClientId`}),` isn’t tied to exactly one merchant`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`422`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`REWARD_TEMPLATE_INVALID`})}),_jsxs(_components.td,{children:[`The template can’t be created. The `,_jsx(_components.code,{children:`message`}),` says why, for example an unsupported `,_jsx(_components.code,{children:`type`}),` combination, a parameter the reward type doesn’t accept, a missing `,_jsx(_components.code,{children:`discount`}),`, a missing `,_jsx(_components.code,{children:`maximum`}),` on a percent-off purchase-level reward, an amount below 1 or over $250 on a purchase-level reward, a percent over 100, or missing `,_jsx(_components.code,{children:`discounted_product_ids`}),` for an online item reward. Model validation messages show amounts in dollars`]})]})]})]}),`\n`,_jsxs(_components.p,{children:[`A `,_jsx(_components.code,{children:`422`}),` creates nothing: no template and no campaign.`]}),`\n`,_jsx(Heading,{level:`3`,id:`not-supported-yet`,children:`Not supported yet`}),`\n`,_jsx(_components.p,{children:`Templates are created with the reward builder’s default options. These builder options can’t be set through this endpoint yet:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Modifiers discounted together with the item`}),`\n`,_jsx(_components.li,{children:`Modifiers the qualifying (buy) item must carry, on buy-one-get-one rewards`}),`\n`,_jsx(_components.li,{children:`The “what’s discounted” choice on buy-one-get-one and item rewards`}),`\n`,_jsx(_components.li,{children:`One / All coverage for selected modifiers`}),`\n`]}),`\n`,_jsxs(RequestExample,{children:[_jsx(CodeBlock,{filename:`Amount off an item`,numberOfLines:`15`,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:`15`,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://api.thanxsandbox.com/reward_templates`}),_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:` \"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-Version: v4.0\"`}),_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/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:' \"X-ClientId: ${'}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`client_id`}),_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:` \"name\": \"$2.50 off a coffee\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"description\": \"$2.50 off any coffee\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"type\": \"amount_off\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"scope\": \"item\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"discount\": 250,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"minimum\": 500,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"discounted_product_ids\": [\"SBX-COFFEE-001\"]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`Percent off the purchase`,numberOfLines:`14`,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:`14`,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://api.thanxsandbox.com/reward_templates`}),_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:` \"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-Version: v4.0\"`}),_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/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:' \"X-ClientId: ${'}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`client_id`}),_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:` \"name\": \"10% off your order\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"description\": \"10% off, up to $10\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"type\": \"percent_off\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"scope\": \"purchase\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"discount\": 10,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"maximum\": 1000`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`Free modifier`,numberOfLines:`13`,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:`13`,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://api.thanxsandbox.com/reward_templates`}),_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:` \"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-Version: v4.0\"`}),_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/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:' \"X-ClientId: ${'}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`client_id`}),_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:` \"name\": \"Free extra shot\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"description\": \"A free extra shot on any latte\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"type\": \"free_modifier\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"discounted_product_ids\": [\"SBX-EXTRA-SHOT\"],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"parent_product_ids\": [\"SBX-LATTE-001\"]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`Buy one, get one free`,numberOfLines:`15`,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:`15`,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://api.thanxsandbox.com/reward_templates`}),_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:` \"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-Version: v4.0\"`}),_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/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:' \"X-ClientId: ${'}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`client_id`}),_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:` \"name\": \"Buy a sandwich, get a cookie\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"description\": \"Free cookie with any sandwich\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"type\": \"bogo\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"scope\": \"item\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"bogo_reward\": \"free_item\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"required_product_ids\": [\"SBX-SANDWICH-001\"],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"discounted_product_ids\": [\"SBX-COOKIE-001\"]`})}),`\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:`201`,numberOfLines:`23`,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:`23`,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:` \"reward_template\"`}),_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:`\"x7pq2m9kd4\"`}),_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:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"$2.50 off a coffee\"`}),_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:`\"manual\"`}),_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:` \"subtype\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"item\"`}),_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:` \"description\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"$2.50 off any coffee\"`}),_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:`#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:` \"discount\"`}),_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:`\"item\"`}),_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:` \"applies_to\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"basket\"`}),_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:` \"item_name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"$2.50 off any coffee\"`})]}),`\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:` \"redemption_venue\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"all\"`}),_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:` \"images\"`}),_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:` \"campaign_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"85133c3c1258\"`}),_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:` \"configuration\"`}),_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:` \"discount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`250`}),_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:`500`}),_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`})]}),`\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:`422`,numberOfLines:`6`,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:`6`,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:` \"error\"`}),_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:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"REWARD_TEMPLATE_INVALID\"`}),_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:`\"maximum is not supported for amount_off item rewards\"`})]}),`\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`]})})})]})]})}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":"Create Reward Template","api":"POST /reward_templates","description":"Creates a published reward template at your sandbox merchant, with a granted campaign you can pass to Grant Reward right away.","href":"/consumer/sandbox/create-reward-template"}}}},"mdxExtracts":{"tableOfContents":[{"title":"Reward types","slug":"reward-types","depth":3,"children":[]},{"title":"Parameters","slug":"parameters","depth":3,"children":[]},{"title":"Product IDs","slug":"product-ids","depth":3,"children":[]},{"title":"Response","slug":"response","depth":3,"children":[]},{"title":"Errors","slug":"errors","depth":3,"children":[]},{"title":"Not supported yet","slug":"not-supported-yet","depth":3,"children":[]}],"codeExamples":{"request":{"type":"RequestExample","children":[{"filename":"Amount off an item","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=\"15\">\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#DCDCAA\">curl\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> https://api.thanxsandbox.com/reward_templates\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\"> \"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-Version: v4.0\"\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/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\"> \"X-ClientId: ${\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">client_id\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\"> \"name\": \"$2.50 off a coffee\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"description\": \"$2.50 off any coffee\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"type\": \"amount_off\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"scope\": \"item\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"discount\": 250,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"minimum\": 500,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"discounted_product_ids\": [\"SBX-COFFEE-001\"]\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> }'\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"Percent off the purchase","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=\"14\">\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#DCDCAA\">curl\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> https://api.thanxsandbox.com/reward_templates\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\"> \"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-Version: v4.0\"\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/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\"> \"X-ClientId: ${\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">client_id\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\"> \"name\": \"10% off your order\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"description\": \"10% off, up to $10\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"type\": \"percent_off\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"scope\": \"purchase\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"discount\": 10,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"maximum\": 1000\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> }'\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"Free modifier","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=\"13\">\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#DCDCAA\">curl\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> https://api.thanxsandbox.com/reward_templates\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\"> \"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-Version: v4.0\"\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/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\"> \"X-ClientId: ${\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">client_id\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\"> \"name\": \"Free extra shot\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"description\": \"A free extra shot on any latte\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"type\": \"free_modifier\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"discounted_product_ids\": [\"SBX-EXTRA-SHOT\"],\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"parent_product_ids\": [\"SBX-LATTE-001\"]\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> }'\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"Buy one, get one free","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=\"15\">\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#DCDCAA\">curl\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> https://api.thanxsandbox.com/reward_templates\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\"> \"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-Version: v4.0\"\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/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\"> \"X-ClientId: ${\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">client_id\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\"> \"name\": \"Buy a sandwich, get a cookie\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"description\": \"Free cookie with any sandwich\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"type\": \"bogo\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"scope\": \"item\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"bogo_reward\": \"free_item\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"required_product_ids\": [\"SBX-SANDWICH-001\"],\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"discounted_product_ids\": [\"SBX-COOKIE-001\"]\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":"201","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=\"23\">\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\"> \"reward_template\"\u003c/span>\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\">\"x7pq2m9kd4\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"name\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"$2.50 off a coffee\"\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\">\"manual\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"subtype\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"item\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"description\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"$2.50 off any coffee\"\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:#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\"> \"discount\"\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\">\"item\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"applies_to\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"basket\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"item_name\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"$2.50 off any coffee\"\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\"> \"redemption_venue\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"all\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"images\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: {},\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"campaign_id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"85133c3c1258\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"configuration\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"discount\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">250\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\">500\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>\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":"422","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=\"6\">\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\"> \"error\"\u003c/span>\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:#0A3069;--shiki-dark:#CE9178\">\"REWARD_TEMPLATE_INVALID\"\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\">\"maximum is not supported for amount_off item rewards\"\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>"}],"attributes":[]}},"endpoint":{"title":"Create Reward Template","path":"/reward_templates","method":"post","request":{"security":[],"parameters":{"query":{},"header":{},"cookie":{},"path":{}},"body":{"application/json":{"schemaArray":[{"type":"object","properties":{"name":[{"type":"string","description":"The template name. It is also the name of the granted campaign.","required":true}],"description":[{"type":"string","description":"Short description of the reward, up to 48 characters.","required":true}],"type":[{"type":"string","description":"The reward type: `amount_off` , `percent_off` , `free_item` , `free_modifier` or `bogo` . See Reward types .","required":true}],"scope":[{"type":"string","description":"`purchase` or `item` . Required for `amount_off` , `percent_off` and `bogo` . Leave it out for `free_item` and `free_modifier` ."}],"bogo_reward":[{"type":"string","description":"What a `bogo` reward gives: `amount_off` , `percent_off` , or `free_item` (item scope only). Send it only with `type: bogo` , where it is required."}],"discount":[{"type":"integer","description":"The discount: an amount in cents ( `500` is $5) or a whole percent (`10` is 10%), per the [Reward types](#reward-types) table. Required for every reward with a value in that table's `discount` column, and must be at least 1. Rewards that give an item for free don't accept it. On purchase-level rewards, an amount can be at most 25000 ($ 250)."}],"minimum":[{"type":"integer","description":"Minimum purchase amount, in cents. Must be at least 1, and at most 25000 ($250) on purchase-level rewards. Leave it out for no minimum, except on amount-off purchase-level rewards ( `amount_off` with `scope: purchase` , and `bogo` purchase with `amount_off` ): there the `discount` is stored as the minimum when it’s left out, and `GET /campaigns` shows it as `minimum_spend` ."}],"maximum":[{"type":"integer","description":"The most the reward can discount, in cents. Must be at least 1. Required on percent-off purchase-level rewards ( `percent_off` with `scope: purchase` , and `bogo` purchase with `percent_off` ). Not accepted by amount-off item rewards ( `amount_off` with `scope: item` , and `bogo` item with `amount_off` ), which return `422` . On purchase-level rewards it can be at most 25000 ($250), and neither `minimum` nor an amount `discount` can exceed it."}],"redemption_venue":[{"type":"string","description":"Where the reward can be redeemed: `all` , `online` or `instore` ."}],"fine_print":[{"type":"string","description":"Terms and conditions, up to 1,000 characters."}],"discounted_product_ids":[{"type":"object","properties":{},"description":"The product IDs the reward discounts. Required for item-level rewards redeemable `all` or `online` . For `free_modifier` , these are the modifier IDs given for free. Not accepted with `scope: purchase` ."}],"required_product_ids":[{"type":"object","properties":{},"description":"The product IDs the user must buy. Only for `bogo` with `scope: item` ."}],"parent_product_ids":[{"type":"object","properties":{},"description":"The items the free modifier must be added to. Only for `free_modifier` ."}]}}],"examples":{"example":{"value":{"name":"\u003cstring>","description":"\u003cstring>","type":"\u003cstring>","scope":"\u003cstring>","bogo_reward":"\u003cstring>","discount":123,"minimum":123,"maximum":123,"redemption_venue":"\u003cstring>","fine_print":"\u003cstring>","discounted_product_ids":{},"required_product_ids":{},"parent_product_ids":{}}}}}}},"response":{"200":{"application/json":{"schemaArray":[{"type":"object","properties":{"reward_template":[{"type":"object","properties":{"id":[{"type":"string","description":"Reward template ID"}],"name":[{"type":"string","description":"Template name"}],"type":[{"type":"string","description":"`automatic` for purchase-level rewards, `manual` for item-level rewards"}],"subtype":[{"type":"string","description":"`purchase` , `item` , `modifier` , `bogo/purchase` or `bogo/item`"}],"description":[{"type":"string","description":"Short description of the reward"}],"fine_print":[{"type":"string","description":"Terms and conditions"}],"discount":[{"type":"string","description":"Discount details, as in the Partner API. `value` is not returned for these subtypes; read `configuration` instead. For rewards that give an item for free, `max_value_cents` is the `maximum` you sent, and is left out without one."}],"redemption_venue":[{"type":"string","description":"`all` , `online` or `in_store`"}],"images":[{"type":"string","description":"Image URLs. Empty for templates created here."}],"campaign_id":[{"type":"string","description":"The granted campaign. Pass it as `campaign_id` to Grant Reward ."}],"configuration":[{"type":"string","description":"The `discount` , `minimum` and `maximum` you sent, in the units you sent them. Fields you left out are `null` ."}]}}]}}],"examples":{"example":{"value":{"reward_template":{"id":"\u003cstring>","name":"\u003cstring>","type":"\u003cstring>","subtype":"\u003cstring>","description":"\u003cstring>","fine_print":"\u003cstring>","discount":"\u003cstring>","redemption_venue":"\u003cstring>","images":"\u003cstring>","campaign_id":"\u003cstring>","configuration":"\u003cstring>"}}}}}}},"deprecated":false}},"jsLinks":[],"subdomain":"thanx","siteName":"Thanx","title":"Create Reward Template - Thanx","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-30T13:58:25.619Z","originalFileLocation":"consumer/sandbox/create-reward-template.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=\"Creates a published reward template at your sandbox merchant, with a granted campaign you can pass to Grant Reward right away.\">\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=\"Create Reward Template - Thanx\">\u003cmeta data-mint-head property=\"og:description\" content=\"Creates a published reward template at your sandbox merchant, with a granted campaign you can pass to Grant Reward right away.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Thanx\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.thanx.com/consumer/sandbox/create-reward-template\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://thanx.mintlify.site/_mintlify/api/og/v2?division=Sandbox+Testing\u0026amp;title=Create+Reward+Template\u0026amp;description=Creates+a+published+reward+template+at+your+sandbox+merchant%2C+with+a+granted+campaign+you+can+pass+to+Grant+Reward+right+away.\u0026amp;theme=b4df6fb3c288da3b05f2dd02\u0026amp;signature=facae75055bfb305d93e8e51fe97ede692bdfe3c7bb51df2304d83f75f66f7ad\">\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=\"Create Reward Template - Thanx\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Creates a published reward template at your sandbox merchant, with a granted campaign you can pass to Grant Reward right away.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://thanx.mintlify.site/_mintlify/api/og/v2?division=Sandbox+Testing\u0026amp;title=Create+Reward+Template\u0026amp;description=Creates+a+published+reward+template+at+your+sandbox+merchant%2C+with+a+granted+campaign+you+can+pass+to+Grant+Reward+right+away.\u0026amp;theme=b4df6fb3c288da3b05f2dd02\u0026amp;signature=facae75055bfb305d93e8e51fe97ede692bdfe3c7bb51df2304d83f75f66f7ad\">\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/consumer/sandbox/create-reward-template\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/consumer/sandbox/create-reward-template.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/consumer/sandbox/create-reward-template#webpage\",\"url\":\"https://docs.thanx.com/consumer/sandbox/create-reward-template\",\"name\":\"Create Reward Template\",\"description\":\"Creates a published reward template at your sandbox merchant, with a granted campaign you can pass to Grant Reward right away.\",\"dateModified\":\"2026-11-30T13:58:25.619Z\",\"isPartOf\":{\"@id\":\"https://docs.thanx.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.thanx.com/consumer/sandbox/create-reward-template#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.thanx.com/consumer/sandbox/create-reward-template#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Reference\",\"item\":\"https://docs.thanx.com/consumer/users/create-user\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Sandbox Testing\",\"item\":\"https://docs.thanx.com/consumer/sandbox/get-users\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Create Reward Template\",\"item\":\"https://docs.thanx.com/consumer/sandbox/create-reward-template\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.thanx.com/consumer/sandbox/create-reward-template#apireference\",\"headline\":\"Create Reward Template\",\"name\":\"Create Reward Template\",\"description\":\"Creates a published reward template at your sandbox merchant, with a granted campaign you can pass to Grant Reward right away.\",\"url\":\"https://docs.thanx.com/consumer/sandbox/create-reward-template\",\"mainEntityOfPage\":{\"@id\":\"https://docs.thanx.com/consumer/sandbox/create-reward-template#webpage\"},\"dateModified\":\"2026-11-30T13:58:25.619Z\",\"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\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Thanx\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/consumer/sandbox/create-reward-template.md","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":[{"group":"Consumer API","pages":[{"title":"Overview","href":"/consumer/overview"},{"group":"Guides","pages":[{"title":"Points Integration","href":"/consumer/guides/points"},{"title":"Push Notifications","href":"/consumer/guides/push-notifications"},{"title":"Deep Linking","href":"/consumer/guides/deep-linking"}]},{"group":"Best Practices","pages":[{"title":"Design Best Practices","sidebarTitle":"Design","href":"/consumer/best-practices/design"},{"title":"Card Enrollment Best Practices","sidebarTitle":"Card Enrollment","href":"/consumer/best-practices/enrollment"},{"title":"Onboarding \u0026 Authentication","href":"/consumer/best-practices/onboarding-authentication"},{"title":"Loyalty \u0026 Rewards Best Practices","sidebarTitle":"Loyalty \u0026 Rewards","href":"/consumer/best-practices/loyalty"},{"title":"Feedback \u0026 Support Best Practices","sidebarTitle":"Feedback \u0026 Support","href":"/consumer/best-practices/feedback"},{"title":"Messaging Best Practices","sidebarTitle":"Messaging","href":"/consumer/best-practices/messaging"}]},{"group":"Usage","pages":[{"title":"Patterns","href":"/consumer/usage/patterns"},{"title":"Headers","href":"/consumer/usage/headers"},{"title":"Errors","href":"/consumer/usage/errors"},{"title":"Legal","href":"/consumer/usage/legal"},{"title":"Certification","href":"/consumer/usage/certification"}]},{"title":"Sandbox Testing","icon":"flask","href":"/consumer/sandbox-testing"}]},{"group":"Reference","pages":[{"group":"Users","pages":[{"title":"Create User","api":"POST /users","href":"/consumer/users/create-user"},{"title":"Get User","api":"GET /users/me","href":"/consumer/users/get-user"},{"title":"Update User","api":"PATCH /users/:id","href":"/consumer/users/update-user"},{"title":"Delete User","api":"DELETE /users/me","href":"/consumer/users/delete-user"},{"title":"Get Check In Code","api":"GET /users/:id/check_in_code","href":"/consumer/users/check-in-code"}]},{"group":"SSO","pages":[{"title":"Single Sign-On (SSO) Overview","sidebarTitle":"Overview","href":"/consumer/sso/overview"},{"title":"Legal Requirements","href":"/consumer/sso/legal-requirements"},{"title":"Acquire Authorization Code","api":"POST /oauth/authorize","href":"/consumer/sso/acquire-auth-code"},{"title":"Acquire Authorization Code (Cross-Domain)","api":"POST /oauth/authorize-cross-domain","href":"/consumer/sso/acquire-auth-code-cross-domain"},{"title":"Acquire Access Token","api":"POST /oauth/token","href":"/consumer/sso/acquire-access-token"},{"title":"Revoke Access Token","api":"POST /oauth/revoke","href":"/consumer/sso/revoke-access-token"}]},{"group":"Locations","pages":[{"title":"Get Locations","api":"GET /locations","href":"/consumer/locations/get-locations"}]},{"group":"Features","pages":[{"title":"Get Features","api":"GET /features","href":"/consumer/features/get-features"}]},{"group":"Cards","pages":[{"title":"Create Card","api":"POST https://secure.api.thanxsandbox.com/cards","href":"/consumer/cards/create-card"},{"title":"Get Cards","api":"GET /cards","href":"/consumer/cards/get-cards"},{"title":"Delete Card","api":"DELETE /cards/:id","href":"/consumer/cards/delete-card"}]},{"group":"Rewards","pages":[{"title":"Reward Overview","sidebarTitle":"Overview","href":"/consumer/rewards/overview"},{"title":"Get Rewards","api":"GET /rewards","href":"/consumer/rewards/get-rewards"},{"title":"Get Reward","api":"GET /rewards/:id","href":"/consumer/rewards/get-reward"},{"title":"Activate Reward","api":"PATCH /rewards/:id/activate","href":"/consumer/rewards/activate-reward"},{"title":"Finalize Reward","api":"PATCH /rewards/:id/finalize","href":"/consumer/rewards/finalize-reward"},{"title":"Grant Reward","api":"POST /rewards/grant","href":"/consumer/rewards/grant-reward"},{"title":"Update reward","api":"PATCH /rewards/:id","href":"/consumer/rewards/update-reward"}]},{"group":"Sandbox Testing","pages":[{"title":"Look Up Test Users","api":"GET /users","href":"/consumer/sandbox/get-users"},{"title":"List Campaigns","api":"GET /campaigns","description":"Lists the active granted campaigns at your sandbox merchant. Use a campaign's id as the campaign_id for Grant Reward.","href":"/consumer/sandbox/list-campaigns"},{"title":"Create Reward Template","api":"POST /reward_templates","href":"/consumer/sandbox/create-reward-template"},{"title":"Get a Test User's Rewards","api":"GET /users/{user_id}/rewards","description":"Returns a test user's available, active and used rewards, for example to confirm a grant.","href":"/consumer/sandbox/get-user-rewards"},{"title":"Get a Test User's Points Ledger","api":"GET /users/{user_id}/points_transactions","href":"/consumer/sandbox/get-points-transactions"},{"title":"Set a Test User's Tag","api":"PUT /users/{user_id}/tags","href":"/consumer/sandbox/set-user-tag"},{"title":"Remove a Test User's Tag","api":"DELETE /users/{user_id}/tags","href":"/consumer/sandbox/delete-user-tag"}]},{"group":"Signup Programs","pages":[{"title":"Get Signup Programs","api":"GET /signup_programs","href":"/consumer/signup-programs/get-signup-programs"},{"title":"Get Signup Program","api":"GET /signup_programs/:handle","href":"/consumer/signup-programs/get-signup-program"}]},{"group":"Tags","pages":[{"title":"Get Tags","api":"GET /tags","href":"/consumer/tags/get-tags"},{"title":"Update Tags","api":"PUT /tags","href":"/consumer/tags/update-tags"},{"title":"Delete Tag","api":"DELETE /tags/:id","href":"/consumer/tags/delete-tag"}]},{"group":"Communication Settings","pages":[{"title":"Get Communication Settings","api":"GET /communication_settings","href":"/consumer/communication-settings/get"},{"title":"Get Communication Setting by UID","api":"GET /communication_settings/:uid","href":"/consumer/communication-settings/get-by-uid"},{"title":"Update Communication Settings","api":"PATCH /communication_settings/:id","href":"/consumer/communication-settings/update"}]},{"group":"Push Registrations","pages":[{"title":"Create Push Registration","api":"PUT /push_registrations","href":"/consumer/push/create-push-registration"}]},{"group":"Points","pages":[{"title":"Get Points Experiences","api":"GET /points_experiences","href":"/consumer/points/get-experiences"},{"title":"Get Points Experience","api":"GET /points_experiences/:id","href":"/consumer/points/get-experience"},{"title":"Get Points Balance","api":"GET /points_experiences/:id/balance","href":"/consumer/points/get-points-balance"},{"title":"Get Points Products","api":"GET /points_products","href":"/consumer/points/get-products"},{"title":"Get Points Multipliers","api":"GET /points_multipliers","href":"/consumer/points/get-points-multipliers"},{"title":"Exchange Points Product","api":"POST /points_products/:id/rewards","href":"/consumer/points/exchange-product"}]},{"group":"Tiers","pages":[{"title":"Get Tiers Configurations","api":"GET /tier_configurations","href":"/consumer/tiers/get-configs"},{"title":"Get Tier Statuses","api":"GET /tier_statuses","href":"/consumer/tiers/get-statuses"},{"title":"Grant Tier Status","api":"PATCH /tier_statuses/:id","href":"/consumer/tiers/grant-status"}]},{"group":"Gift Cards","pages":[{"title":"Gift Cards Overview","sidebarTitle":"Overview","href":"/consumer/gift-cards/overview"},{"title":"Get Gift Cards","api":"GET /gift_cards","href":"/consumer/gift-cards/get-gift-cards"},{"title":"Create Gift Card","api":"POST /gift_cards","href":"/consumer/gift-cards/create-gift-card"},{"title":"Get Gift Card","api":"GET /gift_cards/{id}","href":"/consumer/gift-cards/get-gift-card"},{"title":"Delete Gift Card","api":"DELETE /gift_cards/{id}","href":"/consumer/gift-cards/delete-gift-card"},{"title":"Get Merchant Configuration","api":"GET /gift_cards/merchant_config","href":"/consumer/gift-cards/get-merchant-config"}]},{"group":"Purchases","pages":[{"title":"Create Purchase","api":"POST /purchases","href":"/consumer/purchases/create-purchase"},{"title":"Get Purchases","api":"GET /purchases","href":"/consumer/purchases/get-purchases"},{"title":"Get Purchase","api":"GET /purchases/:id","href":"/consumer/purchases/get-purchase"},{"title":"Update Purchase Tags","api":"PUT /purchases/:id/tags","href":"/consumer/purchases/update-tags"}]},{"group":"Receipts","pages":[{"title":"Overview","href":"/consumer/receipts/overview"},{"title":"Create Receipt","api":"POST /receipts","href":"/consumer/receipts/create-receipt"},{"title":"Get Receipts","api":"GET /receipts","href":"/consumer/receipts/get-receipts"},{"title":"Get Upload URL","api":"GET /upload_url","href":"/consumer/receipts/get-upload-url"}]},{"group":"Archive","pages":[{"title":"Archive Overview","sidebarTitle":"Overview","href":"/consumer/archive/overview"},{"title":"Get Loyalty Statuses","api":"GET /loyalty_statuses","href":"/consumer/loyalty/get-loyalty-statuses"}]}]}]},{"tab":"Partner API","pages":[{"title":"Partner API","href":"/partner/overview"}]},{"tab":"Loyalty API","pages":[{"title":"Loyalty API","href":"/loyalty/overview"}]},{"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":"Create Reward Template - Thanx","deploymentId":"dpl_Ab6nteg7kvyK8iL73naC2n7fmsWK","buildId":"dpl_Ab6nteg7kvyK8iL73naC2n7fmsWK","dynamics":["c2aa737661","2b790eda92","b0f84f53ff"],"chunks":["OpenApiReferenceProvider-C6Z1vAfX.js","snippetPresets-Bjd6OXRM.js","utils-QL6OhUyF.js","style-to-object-BY3JEAdk.js","utils-Dsq-HLeF.js","v4-DIgz8zy6.js","addTypeLabelsToSchema-CEYfmkoV.js","conditional-requirements-CFM0id0Q.js","cloneDeep-CHgPjMM8.js","_Uint8Array-IXRJ_ueo.js","isObject-FP1Yky1u.js","ApiExamples-pq4ns9YA.js","usePlaygroundInputsStore-D-gnigmo.js","shallow-DIfWGPrf.js","isEqual-DDFuixlH.js","CodeSnippets-8g5rilZj.js","CodeSnippet-C_J7pouP.js","use-playground-group-access-bkOyfPao.js","Page-B_smDgrp.js","api-description-markdown-DtcP2u3s.js","DynamicMarkdown-DOefW1_8.js","SectionHeading-Cg4lfWZw.js","MethodPill-BnqygvYm.js","getPastedJson-BGXYEZ3P.js","Check2Icon-BBeO3TOS.js","axios-CsQoIw0U.js"]}