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 query is designed to work with FBS orders, but you can use it to process 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 correct something in the transmitted data, simply repeat the request. You can do this 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 each product. For example, one contains an external air conditioner unit, and the other contains an internal unit.

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

How to transfer marking codes

Labeling of goods in the system "An honest SIGN" 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:

  • Codes in the system "An honest SIGN" or «ASL BELGISI» (for sellers of the Yandex Go Market).
  • WIN for jewelry.
  • RNPT and GTD for imported traceable goods.

For each item in the order that requires labeling, you need to send 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.

For orders that contain jewelry

The order status will change to READY_TO_SHIP, only when:

  1. You will give the Store the blame for each piece of jewelry in the order.
  2. All plugins will be successfully verified. How to get LOGin 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 campaigns/{campaignId}/orders/{orderId}/status and send the order status CANCELLED with the reason for cancellation SHOP_FAILED.

You can't 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"
                        }
                    ]
                }
            ]
        }
    ]
}
, Limit: 100,000 requests per hour

Request

PUT

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

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:

  • Modules and APIs → block Sending data to Yandex.Market.
  • Query log → drop-down list in the block Show logs.

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

orderId*

Type: integer<int64>

The order ID.

Body

application/json
{
    "boxes": [
        {
            "items": [
                {
                    "id": 0,
                    "fullCount": 0,
                    "partialCount": {
                        "current": 0,
                        "total": 0
                    },
                    "instances": [
                        {
                            "cis": "string",
                            "uin": "string",
                            "rnpt": "string",
                            "gtd": "string",
                            "countryCode": "RU"
                        }
                    ]
                }
            ]
        }
    ],
    "allowRemove": false
}

Name

Description

boxes*

Type: OrderBoxLayoutDTO[]

A list of boxes.
Information about the box.

Min items: 1

allowRemove

Type: boolean

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

Default: false

OrderBoxLayoutDTO

Information about the box.

Name

Description

items*

Type: OrderBoxLayoutItemDTO[]

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.
Information about the product in the box.

Min items: 1

OrderBoxLayoutItemDTO

Information about the product in the box.

Name

Description

id*

Type: integer<int64>

The product ID in the order.

It comes in response to a request GET campaigns/{campaignId}/orders/{orderId} — parameter id in items.

fullCount

Type: integer<int32>

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: BriefOrderItemInstanceDTO[]

The marking codes you provided.
Product unit ID.

Fill in only one field, depending on which system the product is labeled in.

Detailed information about working with labeled products is provided in the Help of the Market for sellers.

Min items: 1

partialCount

Type: OrderBoxLayoutPartialCountDTO

Part of the product is in the box.

Use this field if a part of a large item is in the box. Do not use this field at the same time as fullCount.

BriefOrderItemInstanceDTO

Product unit ID.

Fill in only one field, depending on which system the product is labeled in.

Detailed information about working with labeled goods is provided in the Help of the Market for sellers.

Name

Description

cis

Type: string

The unit identification code 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 \"

countryCode

Type: string

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

Example: RU

Min length: 2

Max length: 2

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

gtd

Type: string

Cargo customs declaration.

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

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

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 is the code of the customs office that registered the declaration for the shipment. Next is the date, the declaration number, and the number of the labeled product in the declaration.

uin

Type: string

The unique identification number of the jewelry.

It is a 16-digit number.

OrderBoxLayoutPartialCountDTO

Information about the part of the product in the box.

Name

Description

current*

Type: integer<int32>

The part number, starting from 1.

Min value: 1

total*

Type: integer<int32>

The total number of parts the product is divided into.

Min value: 2

Responses

200 OK

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

Body

application/json
{
    "status": "OK",
    "result": {
        "boxes": [
            {
                "items": [
                    {
                        "id": 0,
                        "fullCount": 0,
                        "partialCount": {
                            "current": 0,
                            "total": 0
                        },
                        "instances": [
                            {
                                "cis": "string",
                                "uin": "string",
                                "rnpt": "string",
                                "gtd": "string",
                                "countryCode": "RU"
                            }
                        ]
                    }
                ],
                "boxId": 0
            }
        ]
    }
}

Name

Description

result

Type: OrderBoxesLayoutDTO

Distribution of goods by boxes.

status

Type: ApiResponseStatusType

The type of response. Possible values:

  • OK — there are no mistakes.
  • ERROR — an error occurred while processing the request.

Enum: OK, ERROR

OrderBoxesLayoutDTO

Distribution of goods by boxes.

Name

Description

boxes*

Type: EnrichedOrderBoxLayoutDTO[]

A list of boxes.
Information about the box.
Information about the box.

ApiResponseStatusType

The type of response. Possible values:

  • OK — there are no mistakes.
  • ERROR — an error occurred while processing the request.

Type

Description

ApiResponseStatusType

Enum: OK, ERROR

EnrichedOrderBoxLayoutDTO

Information about the box.

Name

Description

items*

Type: OrderBoxLayoutItemDTO[]

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.
Information about the product in the box.

Min items: 1

boxId

Type: integer<int64>

The ID of the box.

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.
The general error format.

Min items: 1

status

Type: ApiResponseStatusType

The type of response. Possible values:

  • OK — there are no mistakes.
  • ERROR — an error occurred while processing the request.

Enum: OK, ERROR

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.
The general error format.

Min items: 1

status

Type: ApiResponseStatusType

The type of response. Possible values:

  • OK — there are no mistakes.
  • ERROR — an error occurred while processing the request.

Enum: OK, ERROR

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.
The general error format.

Min items: 1

status

Type: ApiResponseStatusType

The type of response. Possible values:

  • OK — there are no mistakes.
  • ERROR — an error occurred while processing the request.

Enum: OK, ERROR

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.
The general error format.

Min items: 1

status

Type: ApiResponseStatusType

The type of response. Possible values:

  • OK — there are no mistakes.
  • ERROR — an error occurred while processing the request.

Enum: OK, ERROR

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.
The general error format.

Min items: 1

status

Type: ApiResponseStatusType

The type of response. Possible values:

  • OK — there are no mistakes.
  • ERROR — an error occurred while processing the request.

Enum: OK, ERROR

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.
The general error format.

Min items: 1

status

Type: ApiResponseStatusType

The type of response. Possible values:

  • OK — there are no mistakes.
  • ERROR — an error occurred while processing the request.

Enum: OK, ERROR

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