Order preparation

The method is available for models: FBS, Express and DBS.

If you are using an API Key token, one of the accesses in the list is required to call the method

It is also suitable for DBS

The request is designed to work with FBS-orders, but you can use it for processing DBS- orders, if it is convenient.

Allows you to perform three operations:

  • send information about the distribution of goods by boxes to the Market;
  • send the labeling codes for the products to the Market;
  • remove an item from the order if it is not in stock.

If you need to fix something in the transmitted data, just repeat the request. — This can be done as many times as you want before the order status is changed. Ready for shipment. ⚠️ If you change the layout after printing and pasting the labels, do not forget to reprint them and paste them again.

How to send information about the distribution of goods

In this request, you need to send the Market a list of boxes and specify which products are in each of them. There are two types of boxes:

  • Containing the entire product. Such a box can contain any number of items of any kind.

  • Containing a part of the product. Such boxes contain one part of one product. For example, one contains an external air conditioner unit, and the other — the indoor unit.

⚠️ One box cannot contain both the whole goods and parts of the goods.

How to transfer marking codes and get their verification status

Labeling of goods in the system «Честный ЗНАК» optional for orders from individuals

For business orders, you still need to send the labeling codes.

If the order contains products subject to labeling, the corresponding unique codes must be provided in the request. What is labeling?

The following types of codes are accepted:

For each item in the order that requires labeling, you need to provide a list of codes. — one for each item. For example, if there are two pairs of slippers and one pair of shoes in the order, you will get a list of two codes for the first position and a list of one code for the second.

If the product is traveling in several boxes, the labeling code must be transmitted for each of them.

If you work according to the model FBS, EXPRESS

For orders that contain jewelry or products marked in the system «Честный ЗНАК», conversion to the status READY_TO_SHIP becomes available only when:

  1. You will transfer it to Yandex.Market УИНы for each piece of jewelry in the order and the codes in the system «Честный ЗНАК» for all products in the order that require this marking.
  2. All marking codes will be successfully verified. How to get verification statuses
How to remove an item from an order

To remove an item from an order:

  1. Add to the request allowRemove: true.
  2. Transfer the distribution to boxes without the item to be removed.

Deletion cannot be undone

This operation is irreversible: the buyer will immediately receive a notification, and the order composition will change.

To delete an entire position, do not pass the corresponding OrderBoxLayoutItemDTO. To reduce the quantity of the product, pass the reduced value in the field fullCount.

You cannot delete or reduce the quantity of an item if it:

  • added by special offer;
  • amounts to 99% of the order value;
  • the only product in the order.

If you cannot ship such an item, cancel the order. To do this, send a request using the method PUT v2/campaigns/{campaignId}/orders/{orderId}/status and send the order status CANCELLED with the reason for cancellation SHOP_FAILED.

You cannot increase the order

You cannot use a query to increase the number of identical items, add new items to an order, or replace one item with another.

Examples

The product fits in a box

This is what the request will look like if they are traveling in the same box:

  • three units of the same product that require labeling;
  • one unit of another product that does not require labeling.
{
    "boxes": [
        {
            "items": [
                {
                    "id": 123456,
                    "fullCount": 3,
                    "instances": [
                        {
                            "cis": "01030410947874432155Qbag!\u001d93Zjqw"
                        },
                        {
                            "cis": "010304109478gftJ14545762!\u001dhGt264"
                        },
                        {
                            "cis": "010304109478fRs28323ks23!\u001dhet201"
                        }
                    ]
                },
                {
                    "id": 654321,
                    "fullCount": 1
                }
            ]
        }
    ]
}
The goods are traveling in different boxes

This is what the request will look like if the product comes in two boxes:

{
    "boxes": [
        {
            "items": [
                {
                    "id": 123456,
                    "partialCount": {
                        "current": 1,
                        "total": 2
                    },
                    "instances": [
                        {
                            "cis": "01030410947874432155Qbag!\u001d93Zjqw"
                        }
                    ]
                }
            ]
        },
        {
            "items": [
                {
                    "id": 123456,
                    "partialCount": {
                        "current": 2,
                        "total": 2
                    },
                    "instances": [
                        {
                            "cis": "01030410947874432155Qbag!\u001d93Zjqw"
                        }
                    ]
                }
            ]
        }
    ]
}
Identical goods, where everyone travels in several boxes

This is what the request will look like if each of the two identical products travels in two boxes:

{
    "boxes": [
        {
            "items": [
                {
                    "id": 123456,
                    "partialCount": {
                        "current": 1,
                        "total": 2
                    },
                    "instances": [
                        {
                            "cis": "01030410947874432155Qbag!\u001d93Zjqw"
                        }
                    ]
                }
            ]
        },
        {
            "items": [
                {
                    "id": 123456,
                    "partialCount": {
                        "current": 2,
                        "total": 2
                    },
                    "instances": [
                        {
                            "cis": "01030410947874432155Qbag!\u001d93Zjqw"
                        }
                    ]
                }
            ]
        },
        {
            "items": [
                {
                    "id": 123456,
                    "partialCount": {
                        "current": 1,
                        "total": 2
                    },
                    "instances": [
                        {
                            "cis": "01030410947874432155Qbag!\u001d93Zjqw"
                        }
                    ]
                }
            ]
        },
        {
            "items": [
                {
                    "id": 123456,
                    "partialCount": {
                        "current": 2,
                        "total": 2
                    },
                    "instances": [
                        {
                            "cis": "01030410947874432155Qbag!\u001d93Zjqw"
                        }
                    ]
                }
            ]
        }
    ]
}
Different products in different boxes

This is what the request will look like if two different products are placed in different boxes:

{
    "boxes": [
        {
            "items": [
                {
                    "id": 123456,
                    "fullCount": 1
                }
            ]
        },
        {
            "items": [
                {
                    "id": 654321,
                    "fullCount": 1
                }
            ]
        }
    ]
}
⚙️ Limit: 100,000 requests per hour

Request

PUT

https://api.partner.market.yandex.ru/v2/campaigns/{campaignId}/orders/{orderId}/boxes

Path parameters

Name

Description

campaignId

Type: integer

The ID of the campaign (store) — The technical identifier that represents your store in the Yandex Market system when working through the API. It is uniquely linked to your store, but it is intended only for automated interaction.

You can find it using a query GET v2/campaigns or find it in the seller's office on the Market. Click on your account icon → Settings and in the menu on the left, select APIs and modules:

  • block Campaign ID;
  • tab Query log → drop-down list in the block Show logs.

⚠️ Do not confuse it with:

  • the store's identifier, which is displayed in the merchant's personal account.
  • advertising campaigns.

Min value: 1

orderId

Type: integer

The order ID.

Body

application/json
{
  "boxes": [
    {
      "items": [
        {
          "id": 0,
          "fullCount": 1,
          "partialCount": {},
          "instances": [
            null
          ]
        }
      ]
    }
  ],
  "allowRemove": false
}

Name

Description

boxes

Type: object[]

items

Type: object[]

id

Type: integer

The product ID in the order.

It comes in the response of the method POST v1/businesses/{businessId}/orders — parameter id in items.

fullCount

Type: integer

The number of items in a box.

Use this field if there are whole items in the box that are not divided into parts. Do not use this field at the same time as partialCount.

Min value: 1

instances

Type: object[]

cis

Type: string

Identification code product units in the system "An honest SIGN" or «ASL BELGISI» (for sellers of the Yandex Go Market).

Do not escape the slash in the separator character code. \u001d

01030410947874432155Qbag!\u001d93Zjqw

01030410947874432155Qbag!\\u001d93Zjqw

Escape slashes and quotation marks in other places according to the JSON rules.: \\ and \"

Example: example

countryCode

Type: string

The country of manufacture is in the ISO 3166-1 alpha-2 format. How to get

Min length: 2

Max length: 2

Pattern: ^[A-Z]{2}$

Example: RU

gtd

Type: string

Cargo customs declaration.

It is a string of three numbers separated by a slash: XXXXXXXXXX/XXXXXXXX/XXXXXXXX.

The first part — the code of the customs office that registered the declaration for imported goods. Further — date and number of the declaration.

Example: example

rnpt

Type: string

The registration number of the product batch.

It is a string of four numbers separated by slashes: XXXXXXXXXX/XXXXXXXX/XXXXXXXX/XXX.

The first part — the code of the customs office that registered the declaration for the shipment. Further — the date, number of the declaration and the number of the marked product in the declaration.

Example: example

uin

Type: string

The unique identification number of the jewelry.

It is a 16-digit number.

Example: example

Transmitted marking codes.

Min items: 1

Example
[
  {
    "cis": "example",
    "uin": "example",
    "rnpt": "example",
    "gtd": "example",
    "countryCode": "RU"
  }
]

partialCount

Type: object

current

Type: integer

The part number, starting from 1.

Min value: 1

total

Type: integer

The total number of parts the product is divided into.

Min value: 2

Information about the part of the product in the box.

Example
{
  "current": 1,
  "total": 2
}

The list of products in the box.

If there is a part of a large product in the box, there can be only one item in the list.

Min items: 1

Example
[
  {
    "id": 0,
    "fullCount": 1,
    "partialCount": {
      "current": 1,
      "total": 2
    },
    "instances": [
      {
        "cis": "example",
        "uin": "example",
        "rnpt": "example",
        "gtd": "example",
        "countryCode": "RU"
      }
    ]
  }
]

A list of boxes.

Min items: 1

Example
[
  {
    "items": [
      {
        "id": 0,
        "fullCount": 1,
        "partialCount": {
          "current": 1,
          "total": 2
        },
        "instances": [
          {}
        ]
      }
    ]
  }
]

allowRemove

Type: boolean

Pass it on true if you are going to remove some of the items from the order.

Default: false

Responses

200 OK

In response, you will receive the transmitted layout with the box IDs. — you will need them to request shortcuts.

Body

application/json
{
  "status": "OK",
  "result": {
    "boxes": [
      {}
    ]
  }
}

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

    boxes

    Type: object[]

    A list of boxes.

    Example
    [
      {
        "items": [
          {
            "id": 0,
            "fullCount": 1,
            "partialCount": {},
            "instances": [
              null
            ]
          }
        ],
        "boxId": 0
      }
    ]
    

    Distribution of goods by boxes.

    Example
    {
      "boxes": [
        {
          "items": [
            {}
          ],
          "boxId": 0
        }
      ]
    }
    
    Example
    {
      "result": {
        "boxes": [
          {
            "items": [
              null
            ],
            "boxId": 0
          }
        ]
      }
    }
    

400 Bad Request

The request contains incorrect data. Learn more about errors when working with orders

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"
        }
      ]
    }
    

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, 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"
        }
      ]
    }
    

No longer supported, please use an alternative and newer version.

Meaning cis must match the regular expression ^(?=.{1,256}$)\u001D?(\(?01\)?\d{14}\(?21\)?([!-~]{6,8}|[!-~]{13}|[!-~]{20})(\u001D\(?240\)?.{1,30})?\u001D\(?9[1,3]\)?.+)$.

Without the cryptotail — ^(?=[!-~]{1,256}$)(\(?01\)?\d{14}\(?21\)?(.{6,8}|.{13}|.{20}))$.