Creates a new coupon. Please note: coupons cannot be updated after being created.
DISCOUNT IN DOLLARS
When specifying a discount amount as a flat amount, the currency must be specified with the amount in an array. For example:
<discount_type>dollars</discount_type>
<discount_in_cents>
<USD>500</USD>
<EUR>400</EUR>
<GBP>300</GBP>
</discount_in_cents>DISCOUNT IN PERCENTAGE
Percentage discounts only need to specify the discount percentage. For example:
<discount_type>percent</discount_type>
<discount_percent>10</discount_percent>LIMITING TO SPECIFIC PLANS
If a coupon applies to all plans, it will also apply to any plans created in the future. To limit a coupon to specific plans, you may specify an array of plan codes. For example:
<applies_to_all_plans>false</applies_to_all_plans>
<plan_codes>
<plan_code>silver</plan_code>
<plan_code>gold</plan_code>
</plan_codes>LIMITING TO SPECIFIC ITEMS
To limit a coupon to specific items, you may specify an array of item codes. For example:
<applies_to_all_items>false</applies_to_all_items>
<item_codes>
<item_code>terracotta</item_code>
<item_code>terrazzo</item_code>
<item_code>marble</item_code>
</item_codes>CREATING UNIQUE CODE TEMPLATES
If you are creating a bulk coupon, you will need to create a unique_code_template. Here are the rules:
- You must start the template with your coupon_code wrapped in single quotes.
- Outside of single quotes, use a 9 for a character that you want to be a random number.
- Outside of single quotes, use an "x" for a character that you want to be a random letter.
- Outside of single quotes, use an * for a character that you want to be a random number or letter.
- Use single quotes ' ' for characters that you want to remain static. These strings can be alphanumeric and may contain a - _ or +.
<coupon_code>thankyou</coupon_code>
<coupon_type>bulk</coupon_type>
<unique_code_template>'thankyou'99999999</unique_code_template>This example will create a unique code like: thankyou41863675
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||