Skip to main content
POST
Please review proper request headers here.
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.

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
The new template also appears in GET /campaigns and in the Partner API’s List Reward Templates.
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

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