Updating documents
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
- offers-and-cards-management — Manage products and cards
- all-methods — Full account management
Completely updates the number, type and dates of the documents for the goods. You can update up to 100 documents per request.
For each document, provide its identifier and the current values of the number, type, and dates. If no date is specified, the previously saved date will be deleted. An error in one document does not interfere with the processing of the rest.
⚙️ Limit without subscription: 5 requests per minute ⭐️ Limit with Medium subscription: 10 requests per minute |
|---|
Request
POST
https://api.partner.market.yandex.ru/v1/businesses/{businessId}/offers/documents/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
{
"documents": [
{
"number": "example",
"type": "CONFORMITY_DECLARATION",
"activeFromDate": "2025-01-01",
"activeToDate": "2025-01-01",
"id": 1
}
]
}
|
Name |
Description |
|
documents |
Type: object[] Documents to update. Document IDs should not be repeated in the same query. If the IDs are repeated, the request is not processed. Min items: Max items: Example
|
Responses
200 OK
If all documents are updated, the field status takes the value OK, and the field result It doesn't come back.
If at least one document could not be updated, the field status takes the value ERROR, and the field
result it contains only errors. The remaining documents are processed at the same time.
Body
application/json
{
"status": "OK",
"result": {
"errors": [
{
"id": 1,
"code": "DOCUMENT_VALIDATION_FAILED",
"message": "example"
}
]
}
}
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
errors
Type: object[]
code
Type: string
Document error code:
DOCUMENT_VALIDATION_FAILED— the document was not verified.DOCUMENT_ALREADY_EXISTS— the document already exists.DOCUMENT_NOT_FOUND— the document was not found.DOCUMENT_UPDATE_NOT_ALLOWED— document modification is prohibited.DOCUMENT_CONCURRENT_MODIFICATION— the document was modified in parallel.
Enum:
DOCUMENT_VALIDATION_FAILED,DOCUMENT_ALREADY_EXISTS,DOCUMENT_NOT_FOUND,DOCUMENT_UPDATE_NOT_ALLOWED,DOCUMENT_CONCURRENT_MODIFICATIONid
Type: integer
The ID of the document.
Min value:
1message
Type: string
Description of the error for the person. To handle the error, use the field
code.Example:
exampleDocument processing errors.
Min items:
1Max items:
100Example
[ { "id": 1, "code": "DOCUMENT_VALIDATION_FAILED", "message": "example" } ]Errors in documents that could not be updated.
Example
{ "errors": [ { "id": 1, "code": "DOCUMENT_VALIDATION_FAILED", "message": "example" } ] }Example
{ "result": { "errors": [ { "id": 1, "code": "DOCUMENT_VALIDATION_FAILED", "message": "example" } ] } }
400 Bad Request
The request contains incorrect data. 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" } ] } -
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" } ] } -
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" } ] } -