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

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

Body

application/json
{
  "documents": [
    {
      "number": "example",
      "type": "CONFORMITY_DECLARATION",
      "activeFromDate": "2025-01-01",
      "activeToDate": "2025-01-01"
    }
  ]
}

Name

Description

documents

Type: object[]

number

Type: string

The number specified in the certificate, declaration, or other document.

Min length: 1

Max length: 100

Pattern: ^\S(?:.*\S)?$

Example: example

type

Type: string

Document type:

  • CONFORMITY_DECLARATION — Declaration of Conformity.
  • CONFORMITY_CERTIFICATE — Certificate of conformity.
  • STATE_REGISTRATION_CERTIFICATE — State registration of products (sanitary requirements).
  • MEDICINAL_PRODUCT_CERTIFICATE — Required documents for pharmacies.
  • BIOLOGICALLY_ACTIVE_ADDITIVE_CERTIFICATE — Certificate of state registration of dietary supplements.
  • MEDICAL_DEVICE_CERTIFICATE — Registration certificate of a medical device.
  • AGROCHEMICAL_PESTICIDE_CERTIFICATE — State registration of pesticides and agrochemicals.

Enum: CONFORMITY_DECLARATION, CONFORMITY_CERTIFICATE, STATE_REGISTRATION_CERTIFICATE, MEDICINAL_PRODUCT_CERTIFICATE, BIOLOGICALLY_ACTIVE_ADDITIVE_CERTIFICATE, MEDICAL_DEVICE_CERTIFICATE, AGROCHEMICAL_PESTICIDE_CERTIFICATE

activeFromDate

Type: string<date>

The document's validity date.

Example: 2025-01-01

activeToDate

Type: string<date>

The expiration date of the document.

Example: 2025-01-01

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

Max items: 100

Example
[
  {
    "number": "example",
    "type": "CONFORMITY_DECLARATION",
    "activeFromDate": "2025-01-01",
    "activeToDate": "2025-01-01"
  }
]

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, ERROR

    The standard wrapper for server responses.

    Example
    {
      "status": "OK"
    }
    
  • Type: object

    result

    Type: object

    documents

    Type: object[] | null

    Documents created by this request.

    Min items: 1

    Max items: 100

    Example
    [
      {
        "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_MODIFICATION

    number

    Type: string

    The number specified in the certificate, declaration, or other document.

    Min length: 1

    Max length: 100

    Pattern: ^\S(?:.*\S)?$

    Example: example

    message

    Type: string

    Description of the error for the person. To handle the error, use the field code.

    Example: example

    Errors in documents that could not be created.

    Min items: 1

    Max items: 100

    Example
    [
      {
        "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, ERROR

      The standard wrapper for server responses.

      Example
      {
        "status": "OK"
      }
      
    • Type: object

      errors

      Type: object[]

      code

      Type: string

      The error code.

      Example: example

      message

      Type: string

      Description of the error.

      Example: example

      A list of errors.

      Min items: 1

      Example
      [
        {
          "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, ERROR

      The standard wrapper for server responses.

      Example
      {
        "status": "OK"
      }
      
    • Type: object

      errors

      Type: object[]

      code

      Type: string

      The error code.

      Example: example

      message

      Type: string

      Description of the error.

      Example: example

      A list of errors.

      Min items: 1

      Example
      [
        {
          "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, ERROR

      The standard wrapper for server responses.

      Example
      {
        "status": "OK"
      }
      
    • Type: object

      errors

      Type: object[]

      code

      Type: string

      The error code.

      Example: example

      message

      Type: string

      Description of the error.

      Example: example

      A list of errors.

      Min items: 1

      Example
      [
        {
          "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, ERROR

      The standard wrapper for server responses.

      Example
      {
        "status": "OK"
      }
      
    • Type: object

      errors

      Type: object[]

      code

      Type: string

      The error code.

      Example: example

      message

      Type: string

      Description of the error.

      Example: example

      A list of errors.

      Min items: 1

      Example
      [
        {
          "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, ERROR

      The standard wrapper for server responses.

      Example
      {
        "status": "OK"
      }
      
    • Type: object

      errors

      Type: object[]

      code

      Type: string

      The error code.

      Example: example

      message

      Type: string

      Description of the error.

      Example: example

      A list of errors.

      Min items: 1

      Example
      [
        {
          "code": "example",
          "message": "example"
        }
      ]
      
      Example
      {
        "errors": [
          {
            "code": "example",
            "message": "example"
          }
        ]
      }
      

    A standard wrapper for server errors.

    Example
    {
      "status": "OK",
      "errors": [
        {
          "code": "example",
          "message": "example"
        }
      ]
    }