Creating 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
Creates documents for the specified business for goods. You can create up to 100 documents per request.
To link a document to a product, enter its number in the field certificates the method
POST v2/businesses/{businessId}/offer-mappings/update.
If a document with this number already exists, the result for the document contains an error.
DOCUMENT_ALREADY_EXISTS. The existing document is not returned. A single document error
it 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/create
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"
}
]
}
|
Name |
Description |
||||||||
|
documents |
Type: object[]
Documents to create. Document numbers should not be repeated in a single request. If the numbers are repeated, the request is not processed. Min items: Max items: Example
|
Responses
200 OK
Documents created by this request and creation errors.
If at least one document could not be created, the field status takes the value ERROR. The others
the documents are processed at the same time.
Body
application/json
{
"status": "OK",
"result": {
"documents": [
{}
],
"errors": [
{
"number": "example",
"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
documents
Type: object[] | null
Documents created by this request.
Min items:
1Max items:
100Example
[ { "number": "example", "type": "CONFORMITY_DECLARATION", "activeFromDate": "2025-01-01", "activeToDate": "2025-01-01", "id": 1, "status": "ACTIVE" } ]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_MODIFICATIONnumber
Type: string
The number specified in the certificate, declaration, or other document.
Min length:
1Max length:
100Pattern:
^\S(?:.*\S)?$Example:
examplemessage
Type: string
Description of the error for the person. To handle the error, use the field
code.Example:
exampleErrors in documents that could not be created.
Min items:
1Max items:
100Example
[ { "number": "example", "code": "DOCUMENT_VALIDATION_FAILED", "message": "example" } ]Created documents and processing errors.
Example
{ "documents": [ { "number": "example", "type": "CONFORMITY_DECLARATION", "activeFromDate": "2025-01-01", "activeToDate": "2025-01-01", "id": 1, "status": "ACTIVE" } ], "errors": [ { "number": "example", "code": "DOCUMENT_VALIDATION_FAILED", "message": "example" } ] }Example
{ "result": { "documents": [ { "number": "example", "type": "CONFORMITY_DECLARATION", "activeFromDate": "2025-01-01", "activeToDate": "2025-01-01", "id": 1, "status": "ACTIVE" } ], "errors": [ { "number": "example", "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" } ] } -