Creates a promo code promotion.
project_id required | integer Project ID. You can find this parameter in your Publisher Account next to the name of the project. Example: 44056 |
external_id required | string Default: "coupon_external_id" Unique promotion ID. The | ||||||||||||||||||
required | object Default: {"en-US":"Coupon title","de-DE":"Gutscheintitel"} Name of promotion. Should contain key/value pairs where key is a locale with "^[a-z]{2}-[A-Z]{2}$" format, value is string. | ||||||||||||||||||
date_start | string or null <date-time> Default: "2020-04-15T18:16:00+05:00" Date when your promotion will be started. | ||||||||||||||||||
date_end | string or null <date-time> Default: "2020-04-15T18:16:00+05:00" Date when your promotion will be finished. Can be | ||||||||||||||||||
Array of objects or null | |||||||||||||||||||
redeem_total_limit | integer or null Default: 10 Limits total numbers of coupons. | ||||||||||||||||||
redeem_user_limit | integer or null Default: 10 Limits total numbers of coupons redeemed by single user. | ||||||||||||||||||
redeem_code_limit | integer or null Default: 10 Number of redemptions per code. | ||||||||||||||||||
object or null | |||||||||||||||||||
Array of objects or null List of items that are discounted by a promo code. | |||||||||||||||||||
Array of type = string (objects) or Array of type = date (objects) or Array of type = number (objects) Conditions which are compared to user attribute values. All conditions must be met for the action to take an effect. | |||||||||||||||||||
One of: Conditions which are compared to user attribute values. All conditions must be met for the action to take an effect. Array ([ 1 .. 100 ] items) | |||||||||||||||||||
Array of objects or null Array of objects with conditions that set the price range for applying the promotion to the entire cart. | |||||||||||||||||||
Array
| |||||||||||||||||||
Array of objects or null Array of objects with conditions that set the price range for applying the promotion to certain items in the cart. | |||||||||||||||||||
Array
| |||||||||||||||||||
excluded_promotions | Array of integers List of promotion IDs to exclude when applying this promotion. |
Promo code was successfully created.
Basic authentication not passed or wrong. Make sure you used basic authentication or correct credentials.
Invalid request.
{- "external_id": "promo_code_external_id",
- "date_start": "2020-04-15T18:16:00+05:00",
- "date_end": "2020-04-25T18:16:00+05:00",
- "name": {
- "en-US": "New Year Bonus",
- "de-DE": "Neujahrsbonus"
}, - "redeem_total_limit": 100,
- "redeem_user_limit": 1,
- "redeem_code_limit": 1,
- "bonus": [
- {
- "sku": "com.xsolla.elven_sword_1",
- "quantity": 1
}, - {
- "sku": "com.xsolla.elven_shield_1",
- "quantity": 2
}, - {
- "sku": "com.xsolla.elven_gloves_1",
- "quantity": 2
}
]
}
{- "external_id": "coupon_external_id"
}