Updates the promotion.
Promotion adds free bonus items to the purchase made by a user. The promotion can be applied to every purchase within a project or to a purchase that includes particular 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 |
| promotion_id required | integer Promotion ID. Unique promotion identifier within the project. Example: 111425 |
required | Array of objects or null Set of items required to be included in the purchase for applying a promotion. If this parameters is | ||||||||||||||||||||||||
required | Array of objects or null | ||||||||||||||||||||||||
required | object Name of promotion. Should contain key/value pairs where key is a locale with "^[a-z]{2}-[A-Z]{2}$" format, value is string. | ||||||||||||||||||||||||
| id | integer Promotion ID. Unique promotion identifier within the project. | ||||||||||||||||||||||||
Array of objects Promotion validity periods. If multiple periods are specified, both | |||||||||||||||||||||||||
Array of type = string (object) or type = number (object) or type = date (object) [ 1 .. 100 ] items Conditions for validating user attributes. Determine promotion availability based on whether user attributes match all specified conditions. | |||||||||||||||||||||||||
Array ([ 1 .. 100 ] items) One of: | |||||||||||||||||||||||||
object Promotion limits. | |||||||||||||||||||||||||
| |||||||||||||||||||||||||
Array of objects or null Array of objects with conditions that set the price range for applying the promotion. | |||||||||||||||||||||||||
Array
| |||||||||||||||||||||||||
| excluded_promotions | Array of integers List of promotion IDs to exclude when applying this promotion. | ||||||||||||||||||||||||
| is_enabled | boolean Whether promotion is enabled or not. | ||||||||||||||||||||||||
Promotion was successfully updated.
Basic authentication not passed or wrong. Make sure you used basic authentication or correct credentials.
Invalid request.
{- "promotion_periods": [
- {
- "date_from": "2020-04-15T18:16:00+05:00",
- "date_until": "2020-04-25T18:16:00+05:00"
}, - {
- "date_from": "2020-05-15T18:16:00+05:00",
- "date_until": "2020-05-25T18:16:00+05:00"
}
], - "name": {
- "en-US": "New Year Bonus",
- "de-DE": "Neujahrsbonus"
}, - "condition": [
- {
- "sku": "com.xsolla.elven_boots_1"
}, - {
- "sku": "com.xsolla.elven_knife_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
}
]
}{- "statusCode": 401,
- "errorCode": 1020,
- "errorMessage": "[0401-1020]: Error in Authentication method occurred"
}