Creates a discount promotion for an item.
Promotions provide a discount (%) on items. The discount will be applied to all prices of the specified items.
project_id required | integer Project ID. You can find this parameter in your Publisher Account next to the name of the project. Example: 44056 |
Object with promotion data.
required | Array of objects | ||||||||||||||||||
required | object | ||||||||||||||||||
required | object Name of promotion. Should contain key/value pairs, where key is locale with format "^[a-z]{2}-[A-Z]{2}$", 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 type = string (objects) or Array of type = date (objects) or Array of type = number (objects) | |||||||||||||||||||
One of: [ 1 .. 100 ] items Array ([ 1 .. 100 ] items) | |||||||||||||||||||
Array of objects or null Array of objects with conditions that set the price range for applying the promotion. | |||||||||||||||||||
Array
| |||||||||||||||||||
object Promotion limits. | |||||||||||||||||||
excluded_promotions | Array of integers List of promotion IDs to exclude when applying this promotion. |
Promotion was successfully created.
Basic authentication not passed or wrong. Make sure you used basic authentication or correct credentials.
Invalid request.
{- "date_start": "2020-04-15T18:16:00+05:00",
- "date_end": "2020-04-25T18:16:00+05:00",
- "discount": {
- "percent": "10.00"
}, - "items": [
- {
- "sku": "com.xsolla.elven_sword_1"
}, - {
- "sku": "com.xsolla.elven_helmet_1"
}, - {
- "sku": "com.xsolla.elven_armor_1"
}
], - "name": {
- "en-US": "Promotion",
- "ru-RU": "Акция"
}
}
{- "promotion_id": 2384756
}