Adding products to a promotion or changing their prices
The method is available for all models.
Not yet available for Market Yandex Go sellers.
If you are using an API Key token, one of the accesses in the list is required to call the method
- pricing — Manage prices
- promotion — Product promotion
- all-methods — Full account management
Adds products to the promotion or changes the prices of the products that participate in the promotion.
The changes begin to take effect within 4-6 hours.
, Limit: 10,000 requests per hour |
---|
Request
POST
https://api.partner.market.yandex.ru/businesses/{businessId}/promos/offers/update
Path parameters
Name |
Description |
businessId* |
Type: integer<int64> Cabinet ID. To find out, use the request GET campaigns. ℹ️ What is a cabinet and a store on the Market?
Min value: |
Body
application/json
{
"promoId": "string",
"offers": [
{
"offerId": "string",
"params": {
"discountParams": {
"price": 0,
"promoPrice": 0
}
}
}
]
}
Name |
Description |
offers* |
Type: UpdatePromoOfferDTO[] Products that need to be added to the promotion or whose prices need to be changed. Min items: Max items: |
promoId* |
Type: string The ID of the promotion. |
UpdatePromoOfferDTO
Description of the products that participate in the promotion.
Name |
Description |
offerId* |
Type: string Your SKU is the product identifier in your system. SKU Usage Rules:
The SKU of the product can be changed in the seller's account on the Market. Read about how to do this. in the Help of the Market for sellers. What is a SKU and how to assign it Min length: Max length: Pattern: |
params |
Type: UpdatePromoOfferParamsDTO Parameters of the product that participates in the promotion. |
UpdatePromoOfferParamsDTO
Parameters of the product that participates in the promotion.
Name |
Description |
discountParams |
Type: UpdatePromoOfferDiscountParamsDTO Product parameters in the promotion with the type A required parameter for stocks with these types. |
UpdatePromoOfferDiscountParamsDTO
Product parameters in the promotion with the type DIRECT_DISCOUNT
or BLUE_FLASH
.
A required parameter for stocks with these types.
Name |
Description |
price |
Type: integer<int64> The crossed—out price is the one at which the product was sold before the promotion. Indicated in rubles. The number must be an integer. Min value: |
promoPrice |
Type: integer<int64> The share price is the one at which you want to sell the product. Indicated in rubles. The number must be an integer. Min value: |
Responses
200 OK
The result of adding products to the promotion or updating their prices.
Body
application/json
{
"status": "OK",
"result": {
"rejectedOffers": [
{
"offerId": "string",
"reason": "OFFER_DOES_NOT_EXIST"
}
],
"warningOffers": [
{
"offerId": "string",
"warnings": [
{
"code": "DEEP_DISCOUNT_OFFER",
"campaignIds": [
0
]
}
]
}
]
}
}
Name |
Description |
result |
Type: UpdatePromoOffersResultDTO Errors and warnings that appeared when adding products to the promotion. |
status |
Type: ApiResponseStatusType The type of response. Possible values:
Enum: |
UpdatePromoOffersResultDTO
Errors and warnings that appeared when adding products to the promotion.
Name |
Description |
rejectedOffers |
Type: RejectedPromoOfferUpdateDTO[] Changes that were rejected. It is returned only if there are rejected changes.
Min items: |
warningOffers |
Type: WarningPromoOfferUpdateDTO[] Changes that have warnings. They inform you about possible problems. The product information will be updated. It is returned only if there are warnings.
Min items: |
ApiResponseStatusType
The type of response. Possible values:
OK
— there are no mistakes.ERROR
— an error occurred while processing the request.
Type |
Description |
Enum: |
RejectedPromoOfferUpdateDTO
Description of the rejected change.
Name |
Description |
offerId* |
Type: string Your SKU is the product identifier in your system. SKU Usage Rules:
The SKU of the product can be changed in the seller's account on the Market. Read about how to do this. in the Help of the Market for sellers. What is a SKU and how to assign it Min length: Max length: Pattern: |
reason* |
Type: RejectedPromoOfferUpdateReasonType The reason for rejecting the change:
Enum: |
WarningPromoOfferUpdateDTO
Description of the warning that appeared when adding the product.
Name |
Description |
offerId* |
Type: string Your SKU is the product identifier in your system. SKU Usage Rules:
The SKU of the product can be changed in the seller's account on the Market. Read about how to do this. in the Help of the Market for sellers. What is a SKU and how to assign it Min length: Max length: Pattern: |
warnings* |
Type: PromoOfferUpdateWarningDTO[] Warnings that appear when adding an item to a promotion or changing its prices. |
RejectedPromoOfferUpdateReasonType
The reason for rejecting the change:
-
OFFER_DOES_NOT_EXIST
— there is no product with such a SKU in the cabinet. -
OFFER_DUPLICATION
— the same product has been transferred several times. -
OFFER_NOT_ELIGIBLE_FOR_PROMO
— the product does not meet the terms of the promotion. -
OFFER_PROMOS_MAX_BYTE_SIZE_EXCEEDED
— the product was not added to the promotion due to technical reasons. -
DEADLINE_FOR_FOCUS_PROMOS_EXCEEDED
— the deadline for adding products to the promotion has expired. -
EMPTY_OLD_PRICE
— the crossed-out price is not specified. -
EMPTY_PROMO_PRICE
— the share price is not specified. -
MAX_PROMO_PRICE_EXCEEDED
— the share price exceeds the maximum possible price for participation in the promotion. -
PROMO_PRICE_BIGGER_THAN_MAX
— the share price is more than 95% of the crossed-out price. -
PROMO_PRICE_SMALLER_THAN_MIN
— the share price is less than 1% of the crossed-out price.
Type |
Description |
Enum: |
PromoOfferUpdateWarningDTO
A warning that appeared when adding an item to the promotion or changing its prices.
Name |
Description |
code* |
Type: PromoOfferUpdateWarningCodeType The warning that appeared when adding the product:
Enum: |
campaignIds |
Type: integer<int64>[] The campaign IDs of those stores for which warnings were received. It is not refunded if the warnings are valid for all stores in the cabinet.
Min items: Unique items |
PromoOfferUpdateWarningCodeType
The warning that appeared when adding the product:
-
DEEP_DISCOUNT_OFFER
— there is a big difference with the price in the catalog. Check if there is an error. -
CATALOG_PRICE_IS_LOWER_THAN_PROMO
— the price that is valid in all stores is lower than the price of the promotion. The product price will not be displayed for the promotion. -
SHOP_PRICES_ARE_LOWER_THAN_PROMO
— the price in a separate store is lower than the price of the promotion. The product in the promotion will display the price in the store. The promotion price will apply to all other stores. -
PROMOCODE_PRICE_MORE_THAN_MAX_FAIR_PRICE
— in a separate store, the price, including the promo code, is higher than the maximum possible price. The product will not participate in the promotion. -
SHOP_OFFER_NOT_ELIGIBLE_FOR_PROMO
— the product in a separate store does not meet the terms of the promotion.
Type |
Description |
Enum: |
400 Bad Request
The request contains incorrect data. More information about the error
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "string",
"message": "string"
}
]
}
Name |
Description |
errors |
Type: ApiErrorDTO[] A list of errors. Min items: |
status |
Type: ApiResponseStatusType The type of response. Possible values:
Enum: |
ApiErrorDTO
The general error format.
Name |
Description |
code* |
Type: string The error code. |
message |
Type: string Description of the error. |
401 Unauthorized
The authorization data is not specified in the request. More information about the error
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "string",
"message": "string"
}
]
}
Name |
Description |
errors |
Type: ApiErrorDTO[] A list of errors. Min items: |
status |
Type: ApiResponseStatusType The type of response. Possible values:
Enum: |
403 Forbidden
The authorization data is incorrect or access to the resource is prohibited. More information about the error
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "string",
"message": "string"
}
]
}
Name |
Description |
errors |
Type: ApiErrorDTO[] A list of errors. Min items: |
status |
Type: ApiResponseStatusType The type of response. Possible values:
Enum: |
404 Not Found
The requested resource was not found. More information about the error
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "string",
"message": "string"
}
]
}
Name |
Description |
errors |
Type: ApiErrorDTO[] A list of errors. Min items: |
status |
Type: ApiResponseStatusType The type of response. Possible values:
Enum: |
420 Method Failure
The resource access limit has been exceeded. More information about the error
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "string",
"message": "string"
}
]
}
Name |
Description |
errors |
Type: ApiErrorDTO[] A list of errors. Min items: |
status |
Type: ApiResponseStatusType The type of response. Possible values:
Enum: |
500 Internal Server Error
Internal error of Yandex. Market. More information about the error
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "string",
"message": "string"
}
]
}
Name |
Description |
errors |
Type: ApiErrorDTO[] A list of errors. Min items: |
status |
Type: ApiResponseStatusType The type of response. Possible values:
Enum: |
No longer supported, please use an alternative and newer version.
The price that is valid in all stores.