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. To find out if they have been applied, use the parameter processing in the method's response POST v2/businesses/{businessId}/promos.
| ⚙️ Limit: 10,000 requests per hour |
|---|
Request
POST
https://api.partner.market.yandex.ru/v2/businesses/{businessId}/promos/offers/update
Path parameters
|
Name |
Description |
|
businessId |
Type: integer Cabinet ID. To find out, use the request GET v2/campaigns. ℹ️ What is a cabinet and a store on the Market? Min value: |
Body
application/json
{
"promoId": "example",
"offers": [
{
"offerId": "example",
"params": {
"discountParams": {
"price": 1,
"promoPrice": 1
}
}
}
]
}
|
Name |
Description |
||||||||||
|
offers |
Type: object[]
Products that need to be added to the promotion or whose prices need to be changed. Min items: Max items: Example
|
||||||||||
|
promoId |
Type: string The ID of the promotion. Example: |
Responses
200 OK
The result of adding products to the promotion or updating their prices.
Body
application/json
{
"status": "OK",
"result": {
"rejectedOffers": [
{
"offerId": "example",
"reason": "OFFER_DOES_NOT_EXIST"
}
],
"warningOffers": [
{
"offerId": "example",
"warnings": [
null
]
}
]
}
}
Type: object
All of 2 types
-
Type: object
status
Type: string
The type of response. Possible values:
OK— There are no errors.ERROR— an error occurred while processing the request.
Enum:
OK,ERRORThe standard wrapper for server responses.
Example
{ "status": "OK" } -
Type: object
result
Type: object
rejectedOffers
Type: object[]
offerId
Type: string
Your SKU — the product ID in your system.
Usage rules SKU:
-
For each product SKU there must be one.
-
Already set SKU it cannot be released and reused for another product. Each product should receive a new identifier that has never been used in your catalog before.
SKU 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.
Warning
Spaces at the beginning and end of the value are automatically deleted. For example,
" SKU123 "and"SKU123"they will be treated as identical values.What is SKU and how to assign it
Min length:
1Max length:
255Pattern:
^(?=.*\S.*)[^\x00-\x08\x0A-\x1f\x7f]{1,255}$Example:
examplereason
Type: string
The reason for rejecting the change:
-
OFFER_DOES_NOT_EXIST— there is no product in the cabinet with this SKU. -
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 price of the promotion 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. -
PRICE_TOO_BIG— The stock price is too high. -
OLD_PRICE_TOO_BIG— The crossed-out price is too large.
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,PRICE_TOO_BIG,OLD_PRICE_TOO_BIGChanges that were rejected.
It is returned only if there are rejected changes.
Min items:
1Example
[ { "offerId": "example", "reason": "OFFER_DOES_NOT_EXIST" } ]warningOffers
Type: object[]
offerId
Type: string
Your SKU — the product ID in your system.
Usage rules SKU:
-
For each product SKU there must be one.
-
Already set SKU it cannot be released and reused for another product. Each product should receive a new identifier that has never been used in your catalog before.
SKU 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.
Warning
Spaces at the beginning and end of the value are automatically deleted. For example,
" SKU123 "and"SKU123"they will be treated as identical values.What is SKU and how to assign it
Min length:
1Max length:
255Pattern:
^(?=.*\S.*)[^\x00-\x08\x0A-\x1f\x7f]{1,255}$Example:
examplewarnings
Type: object[]
code
Type: string
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, which 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 for the promotion. The product in the promotion will display the price in the store. The promotion price will apply to all other stores. -
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,SHOP_OFFER_NOT_ELIGIBLE_FOR_PROMOcampaignIds
Type: integer[] | null
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:
1Unique items:
trueExample
[ 1 ]Warnings that appear when adding an item to a promotion or changing its prices.
Example
[ { "code": "DEEP_DISCOUNT_OFFER", "campaignIds": [ 1 ] } ]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:
1Example
[ { "offerId": "example", "warnings": [ { "code": "DEEP_DISCOUNT_OFFER", "campaignIds": [ 1 ] } ] } ]Errors and warnings that appeared when adding products to the promotion.
Example
{ "rejectedOffers": [ { "offerId": "example", "reason": "OFFER_DOES_NOT_EXIST" } ], "warningOffers": [ { "offerId": "example", "warnings": [ { "code": "DEEP_DISCOUNT_OFFER", "campaignIds": [ null ] } ] } ] }Example
{ "result": { "rejectedOffers": [ { "offerId": "example", "reason": "OFFER_DOES_NOT_EXIST" } ], "warningOffers": [ { "offerId": "example", "warnings": [ {} ] } ] } } -
400 Bad Request
The request contains incorrect data. Learn more about errors when working with stocks
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "example",
"message": "example"
}
]
}
Type: object
All of 1 type
-
Type: object
All of 2 types
-
Type: object
status
Type: string
The type of response. Possible values:
OK— There are no errors.ERROR— an error occurred while processing the request.
Enum:
OK,ERRORThe standard wrapper for server responses.
Example
{ "status": "OK" } -
Type: object
errors
Type: object[]
code
Type: string
The error code.
Example:
examplemessage
Type: string
Description of the error.
Example:
exampleA list of errors.
Min items:
1Example
[ { "code": "example", "message": "example" } ]Example
{ "errors": [ { "code": "example", "message": "example" } ] }
A standard wrapper for server errors.
Example
{ "status": "OK", "errors": [ { "code": "example", "message": "example" } ] } -
401 Unauthorized
The authorization data is not specified in the request. More information about the error
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "example",
"message": "example"
}
]
}
Type: object
All of 1 type
-
Type: object
All of 2 types
-
Type: object
status
Type: string
The type of response. Possible values:
OK— There are no errors.ERROR— an error occurred while processing the request.
Enum:
OK,ERRORThe standard wrapper for server responses.
Example
{ "status": "OK" } -
Type: object
errors
Type: object[]
code
Type: string
The error code.
Example:
examplemessage
Type: string
Description of the error.
Example:
exampleA list of errors.
Min items:
1Example
[ { "code": "example", "message": "example" } ]Example
{ "errors": [ { "code": "example", "message": "example" } ] }
A standard wrapper for server errors.
Example
{ "status": "OK", "errors": [ { "code": "example", "message": "example" } ] } -
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": "example",
"message": "example"
}
]
}
Type: object
All of 1 type
-
Type: object
All of 2 types
-
Type: object
status
Type: string
The type of response. Possible values:
OK— There are no errors.ERROR— an error occurred while processing the request.
Enum:
OK,ERRORThe standard wrapper for server responses.
Example
{ "status": "OK" } -
Type: object
errors
Type: object[]
code
Type: string
The error code.
Example:
examplemessage
Type: string
Description of the error.
Example:
exampleA list of errors.
Min items:
1Example
[ { "code": "example", "message": "example" } ]Example
{ "errors": [ { "code": "example", "message": "example" } ] }
A standard wrapper for server errors.
Example
{ "status": "OK", "errors": [ { "code": "example", "message": "example" } ] } -
404 Not Found
The requested resource was not found. More information about the error
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "example",
"message": "example"
}
]
}
Type: object
All of 1 type
-
Type: object
All of 2 types
-
Type: object
status
Type: string
The type of response. Possible values:
OK— There are no errors.ERROR— an error occurred while processing the request.
Enum:
OK,ERRORThe standard wrapper for server responses.
Example
{ "status": "OK" } -
Type: object
errors
Type: object[]
code
Type: string
The error code.
Example:
examplemessage
Type: string
Description of the error.
Example:
exampleA list of errors.
Min items:
1Example
[ { "code": "example", "message": "example" } ]Example
{ "errors": [ { "code": "example", "message": "example" } ] }
A standard wrapper for server errors.
Example
{ "status": "OK", "errors": [ { "code": "example", "message": "example" } ] } -
420 Method Failure
The resource access limit has been exceeded. More information about the error
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "example",
"message": "example"
}
]
}
Type: object
All of 1 type
-
Type: object
All of 2 types
-
Type: object
status
Type: string
The type of response. Possible values:
OK— There are no errors.ERROR— an error occurred while processing the request.
Enum:
OK,ERRORThe standard wrapper for server responses.
Example
{ "status": "OK" } -
Type: object
errors
Type: object[]
code
Type: string
The error code.
Example:
examplemessage
Type: string
Description of the error.
Example:
exampleA list of errors.
Min items:
1Example
[ { "code": "example", "message": "example" } ]Example
{ "errors": [ { "code": "example", "message": "example" } ] }
A standard wrapper for server errors.
Example
{ "status": "OK", "errors": [ { "code": "example", "message": "example" } ] } -
500 Internal Server Error
Internal error of Yandex. Market. More information about the error
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "example",
"message": "example"
}
]
}
Type: object
All of 1 type
-
Type: object
All of 2 types
-
Type: object
status
Type: string
The type of response. Possible values:
OK— There are no errors.ERROR— an error occurred while processing the request.
Enum:
OK,ERRORThe standard wrapper for server responses.
Example
{ "status": "OK" } -
Type: object
errors
Type: object[]
code
Type: string
The error code.
Example:
examplemessage
Type: string
Description of the error.
Example:
exampleA list of errors.
Min items:
1Example
[ { "code": "example", "message": "example" } ]Example
{ "errors": [ { "code": "example", "message": "example" } ] }
A standard wrapper for server errors.
Example
{ "status": "OK", "errors": [ { "code": "example", "message": "example" } ] } -
No longer supported, please use an alternative and newer version.
Цена, которая действует во всех магазинах.