Changing the terms of sale of goods in the store
The method is available for all models.
If you are using an API Key token, one of the accesses in the list is required to call the method
- offers-and-cards-management — Manage products and cards
- all-methods — Full account management
Changes the parameters of product placement in a particular store: product availability, quantum sales, and applicable VAT.
, Limit: 10,000 items per minute |
---|
Request
POST
https://api.partner.market.yandex.ru/campaigns/{campaignId}/offers/update
Path parameters
Name |
Description |
campaignId* |
Type: integer<int64> The campaign ID. You can find it using a query GET campaigns or find it in the seller's office on the Market — click on the name of your business and go to the page:
, Do not send the store's ID instead, which is indicated in the seller's account on the Market next to the store's name and in some reports.
Min value: |
Body
application/json
{
"offers": [
{
"offerId": "string",
"quantum": {
"minQuantity": 0,
"stepQuantity": 0
},
"available": false,
"vat": 0
}
]
}
Name |
Description |
offers* |
Type: UpdateCampaignOfferDTO[] Product placement parameters in the specified store. Min items: Max items: |
UpdateCampaignOfferDTO
Product placement parameters in the store.
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: |
available ⦸
|
Type: boolean Instead, use methods to hide goods from the showcase.
Whether the product is on sale. |
quantum ⦸
|
Type: QuantumDTO Setting up a quantum sale. What does it mean? |
vat |
Type: integer<int32> The VAT identifier used for the product:
If the parameter is omitted, the VAT set in the cabinet is used. For sellers of the Yandex Go Market transfer and receipt of VAT is not available. |
QuantumDTO
Setting up a quantum sale.
To reset the previously set values, pass an empty parameter quantum
.
Example
{
"offers": [
{
"offerId": "08e35dc1-89a2-11e3-8055-0015e9b8c48d",
"quantum": {}
}
]
}
Name |
Description |
minQuantity |
Type: integer<int32> The minimum number of product units in the order. For example, if you specify 10, the customer will be able to add at least 10 items to the cart. If the quantity of goods in stock is less than the specified quantity, the restriction will not work and the buyer will be able to order it. Min value: |
stepQuantity |
Type: integer<int32> By how many units the buyer will be able to increase the quantity of goods in the basket. For example, if you set 5, the buyer will be able to add only 5, 10, 15, ... items to the order. If the quantity of goods in stock does not reach the quantum, the restriction will not work and the buyer will be able to order a quantity that is not a multiple of the quantum. Min value: Max value: |
Responses
200 OK
The 200 response means that the new parameters have been received by Yandex.Market and will take effect soon.
Body
application/json
{
"status": "OK"
}
Name |
Description |
status |
Type: ApiResponseStatusType The type of response. Possible values:
Enum: |
ApiResponseStatusType
The type of response. Possible values:
OK
— there are no mistakes.ERROR
— an error occurred while processing the request.
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: |
423 Locked
The specified method cannot be applied to the resource. 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 in 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.