Transfer of the number of cargo places in the order
The method is available for the DBS model.
If you are using an API Key token, one of the accesses in the list is required to call the method
- inventory-and-order-processing — Order processing and inventory
- all-methods — Full account management
Which method should I use instead of the outdated one?
An order shipped to the Market may not fit into one box or package. In this case, it turns out that it takes up several cargo spaces.
The number of cargo spaces must be transferred to the Market if it is not equal to 1. This is done before transferring it to the status Ready for shipment. For more information about what needs to be transmitted at what point, see step-by-step instructions.
The method is slightly non-standard: the number is set by the length of the array of empty objects.
Previously, the method required transmitting more data. Queries based on the old pattern work, but it's better to do it in a new way.
How it was before
The structure of the PUT request body:
{
"boxes":
[
{
"fulfilmentId": "{string}",
"weight": {int64},
"width": {int64},
"height": {int64},
"depth": {int64},
"items":
[
{
"id": {int64},
"count": {int32}
},
...
]
},
...
]
}
Parameter | Type | Meaning |
---|---|---|
boxes |
List of cargo locations. |
Parameters nested in boxes
Parameter | Type | Meaning |
---|---|---|
fulfilmentId |
String | The identifier of the cargo space in the store's information system. Create an identifier based on a template: The order number on the Market is the number of the cargo place. . For example, 7206821‑1, 7206821‑2 and so on . |
weight |
Int64 | The gross weight of the cargo area (the total weight of the package and contents) in grams. |
width |
Int64 | The width of the cargo area in centimeters. |
height |
Int64 | The height of the cargo area in centimeters. |
depth |
Int64 | The depth of the cargo area in centimeters. |
items |
Int64 | The list of goods in the cargo area. |
Parameters nested in items
Parameter | Type | Meaning |
---|---|---|
id |
Int64 | The identifier of the product within the order. |
count |
Int32 | The number of items in the cargo area. |
, Limit: 100,000 requests per hour |
---|
Request
PUT
https://api.partner.market.yandex.ru/campaigns/{campaignId}/orders/{orderId}/delivery/shipments/{shipmentId}/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:
, 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: |
orderId* |
Type: integer<int64> The order ID. |
shipmentId* |
Type: integer<int64> The parameter is no longer used. Insert any number, just to get the correct URL. |
Body
application/json
{
"boxes": [
{
"fulfilmentId": "string"
}
]
}
Name |
Description |
boxes* |
Type: ParcelBoxRequestDTO[] List of cargo locations. The Market determines the number of places based on its length. Min items: |
ParcelBoxRequestDTO
The parameter displays one cargo location. Nested fields are no longer used, pass the parameter empty.
Name |
Description |
fulfilmentId ⦸
|
Type: string Do not use this option. Pattern: |
Responses
200 OK
Only the type of response matters. If the answer is ok
, the amount of cargo is not recorded.
Body
application/json
{
"status": "OK",
"result": {
"boxes": [
{
"id": 0,
"fulfilmentId": "string"
}
]
}
}
Name |
Description |
result |
Type: ShipmentBoxesDTO In the response, the Market returns the list of cargo locations you provided. Don't pay any attention to this field. |
status |
Type: ApiResponseStatusType The type of response. Possible values:
Enum: |
ShipmentBoxesDTO
In the response, the Market returns the list of cargo locations you provided. Don't pay any attention to this field.
Name |
Description |
boxes* |
Type: ParcelBoxDTO[] List of cargo locations. The Market determined the number of seats based on its length.
|
ApiResponseStatusType
The type of response. Possible values:
OK
— there are no mistakes.ERROR
— an error occurred while processing the request.
Type |
Description |
Enum: |
ParcelBoxDTO
The parameter displays one cargo location.
Name |
Description |
fulfilmentId ⦸
|
Type: string Do not use this option. Pattern: |
id |
Type: integer<int64> The ID of the box in the order. |
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. Min items: |
status |
Type: ApiResponseStatusType The type of response. Possible values:
Enum: |
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. Min items: |
status |
Type: ApiResponseStatusType The type of response. Possible values:
Enum: |
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. Min items: |
status |
Type: ApiResponseStatusType The type of response. Possible values:
Enum: |
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. Min items: |
status |
Type: ApiResponseStatusType The type of response. Possible values:
Enum: |
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. Min items: |
status |
Type: ApiResponseStatusType The type of response. Possible values:
Enum: |
500 Internal Server Error
Internal error of 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. Min items: |
status |
Type: ApiResponseStatusType The type of response. Possible values:
Enum: |
No longer supported, please use an alternative and newer version.