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

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: 1

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.
Description of the products that participate in the promotion.

Min items: 1

Max items: 500

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:

  • Each product must have its own SKU.

  • An already set SKU cannot be released and reused for another product. Each product should receive a new identifier that has never been used in your catalog before.

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: 1

Max length: 255

Pattern: ^(?=.*\S.*)[^\x00-\x08\x0A-\x1f\x7f]{1,255}$

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 DIRECT_DISCOUNT or BLUE_FLASH.

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: 1

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: 1

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:

  • OK — there are no mistakes.
  • ERROR — an error occurred while processing the request.

Enum: OK, ERROR

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.
Description of the rejected change.

Min items: 1

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.
Description of the warning that appeared when adding the product.

Min items: 1

ApiResponseStatusType

The type of response. Possible values:

  • OK — there are no mistakes.
  • ERROR — an error occurred while processing the request.

Type

Description

ApiResponseStatusType

Enum: OK, ERROR

RejectedPromoOfferUpdateDTO

Description of the rejected change.

Name

Description

offerId*

Type: string

Your SKU is the product identifier in your system.

SKU Usage Rules:

  • Each product must have its own SKU.

  • An already set SKU cannot be released and reused for another product. Each product should receive a new identifier that has never been used in your catalog before.

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: 1

Max length: 255

Pattern: ^(?=.*\S.*)[^\x00-\x08\x0A-\x1f\x7f]{1,255}$

reason*

Type: RejectedPromoOfferUpdateReasonType

The reason for rejecting the change:

  • OFFER_DOES_NOT_EXIST — there is no product with this 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.

Enum: OFFER_DOES_NOT_EXIST, OFFER_DUPLICATION, OFFER_NOT_ELIGIBLE_FOR_PROMO, OFFER_PROMOS_MAX_BYTE_SIZE_EXCEEDED, DEADLINE_FOR_FOCUS_PROMOS_EXCEEDED, EMPTY_OLD_PRICE, EMPTY_PROMO_PRICE, MAX_PROMO_PRICE_EXCEEDED, PROMO_PRICE_BIGGER_THAN_MAX, PROMO_PRICE_SMALLER_THAN_MIN

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:

  • Each product must have its own SKU.

  • An already set SKU cannot be released and reused for another product. Each product should receive a new identifier that has never been used in your catalog before.

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: 1

Max length: 255

Pattern: ^(?=.*\S.*)[^\x00-\x08\x0A-\x1f\x7f]{1,255}$

warnings*

Type: PromoOfferUpdateWarningDTO[]

Warnings that appear when adding an item to a promotion or changing its prices.
A warning that appeared when adding an item to the 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

RejectedPromoOfferUpdateReasonType

Enum: OFFER_DOES_NOT_EXIST, OFFER_DUPLICATION, OFFER_NOT_ELIGIBLE_FOR_PROMO, OFFER_PROMOS_MAX_BYTE_SIZE_EXCEEDED, DEADLINE_FOR_FOCUS_PROMOS_EXCEEDED, EMPTY_OLD_PRICE, EMPTY_PROMO_PRICE, MAX_PROMO_PRICE_EXCEEDED, PROMO_PRICE_BIGGER_THAN_MAX, PROMO_PRICE_SMALLER_THAN_MIN

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:

  • 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.

Enum: DEEP_DISCOUNT_OFFER, CATALOG_PRICE_IS_LOWER_THAN_PROMO, SHOP_PRICES_ARE_LOWER_THAN_PROMO, PROMOCODE_PRICE_MORE_THAN_MAX_FAIR_PRICE, SHOP_OFFER_NOT_ELIGIBLE_FOR_PROMO

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.
The campaign ID.

Min items: 1

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

PromoOfferUpdateWarningCodeType

Enum: DEEP_DISCOUNT_OFFER, CATALOG_PRICE_IS_LOWER_THAN_PROMO, SHOP_PRICES_ARE_LOWER_THAN_PROMO, PROMOCODE_PRICE_MORE_THAN_MAX_FAIR_PRICE, SHOP_OFFER_NOT_ELIGIBLE_FOR_PROMO

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.
The general error format.

Min items: 1

status

Type: ApiResponseStatusType

The type of response. Possible values:

  • OK — there are no mistakes.
  • ERROR — an error occurred while processing the request.

Enum: OK, ERROR

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.
The general error format.

Min items: 1

status

Type: ApiResponseStatusType

The type of response. Possible values:

  • OK — there are no mistakes.
  • ERROR — an error occurred while processing the request.

Enum: OK, ERROR

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.
The general error format.

Min items: 1

status

Type: ApiResponseStatusType

The type of response. Possible values:

  • OK — there are no mistakes.
  • ERROR — an error occurred while processing the request.

Enum: OK, ERROR

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.
The general error format.

Min items: 1

status

Type: ApiResponseStatusType

The type of response. Possible values:

  • OK — there are no mistakes.
  • ERROR — an error occurred while processing the request.

Enum: OK, ERROR

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.
The general error format.

Min items: 1

status

Type: ApiResponseStatusType

The type of response. Possible values:

  • OK — there are no mistakes.
  • ERROR — an error occurred while processing the request.

Enum: OK, ERROR

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.
The general error format.

Min items: 1

status

Type: ApiResponseStatusType

The type of response. Possible values:

  • OK — there are no mistakes.
  • ERROR — an error occurred while processing the request.

Enum: OK, ERROR

No longer supported, please use an alternative and newer version.

The price that is valid in all stores.