Transfer of the number of cargo places in the order

Deprecated

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

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:

  • 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.

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.
The parameter displays one cargo location. Nested fields are no longer used, pass the parameter empty.

Min items: 1

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: ^[\p{Alnum}- ]*$

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:

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

Enum: OK, ERROR

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.
The parameter displays one cargo location.

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

ParcelBoxDTO

The parameter displays one cargo location.

Name

Description

fulfilmentId

Type: string

Do not use this option.

Pattern: ^[\p{Alnum}- ]*$

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.
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 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.
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.