订单中货位数量的转移
方法适用于模式DBS.
如果您使用API-Key令牌,调用该方法时需要具备列表中可用权限之一
- inventory-and-order-processing — 订单处理和商品核算
- all-methods — 全面管理账户
我应该使用哪种方法而不是过时的方法?
运往市场的订单可能不适合装在一个盒子或包裹中。 — 在这种情况下,事实证明它占用了几个货物空间。
货位数不等于1则必须转移到市场。 这是在将其转移到状态之前完成的 准备装运. 有关在什么点需要传输的内容的更多信息,请参见 分步说明.
该方法有点非标准:数量由空对象数组的长度设置。
以前,该方法需要传输更多数据。 基于旧模式的查询可以工作,但最好以新的方式进行。
以前怎么样
车身结构 PUT-请求:
{
"boxes":
[
{
"fulfilmentId": "{string}",
"weight": {int64},
"width": {int64},
"height": {int64},
"depth": {int64},
"items":
[
{
"id": {int64},
"count": {int32}
},
...
]
},
...
]
}
| 参数 | 类型 | 意义 |
|---|---|---|
boxes |
货物位置列表。 |
参数嵌套在 boxes
| 参数 | 类型 | 意义 |
|---|---|---|
fulfilmentId |
String | 店的信息系统中的货位的标识符。 基于模板创建标识符: 市场上的订单号是货地的编号。. 例如, 7206821‑1, 7206821‑2 等等。 |
weight |
Int64 | 货物区域的总重量(包装和内容物的总重量)以克为单位。 |
width |
Int64 | 以厘米为单位的货物区域的宽度。 |
height |
Int64 | 以厘米为单位的货物区域的高度。 |
depth |
Int64 | 厘米为单位的货物区域的深度。 |
items |
Int64 | 货物区的货物清单。 |
参数嵌套在 items
| 参数 | 类型 | 意义 |
|---|---|---|
id |
Int64 | 订单内产品的标识符。 |
count |
Int32 | 货区的物品数量。 |
| ⚙️ 限制: 每小时100,000次请求 |
|---|
Request
PUT
https://api.partner.market.yandex.ru/v2/campaigns/{campaignId}/orders/{orderId}/delivery/shipments/{shipmentId}/boxes
Path parameters
|
Name |
Description |
|
campaignId* |
Type: integer<int64> 活动ID。 您可以使用查询找到它 GET v2/campaigns 或者在市场上的卖家办公室找到 — 点击您的帐户图标→ 设置 在左边的菜单中,选择 Api和模块:
⚠️ 不要发送商店ID,这是在市场上的卖家帐户旁边的商店名称和一些报告。
Min value: |
|
orderId* |
Type: integer<int64> 的订单ID。 |
|
shipmentId* |
Type: integer<int64> 传递任何数字以获得正确的数字。 URL. 货物位置ID。 |
Body
application/json
{
"boxes": [
{
"fulfilmentId": "string"
}
]
}
|
Name |
Description |
|
boxes* |
Type: ParcelBoxRequestDTO[] 货物位置列表。 市场根据它的长度来决定地点的数量。 Min items: |
ParcelBoxRequestDTO
参数显示一个货物位置。 嵌套字段不再使用,传递参数empty。
|
Name |
Description |
|
fulfilmentId ⦸
|
Type: string 请勿使用此选项。 Pattern: |
Responses
200 OK
只有响应类型才重要。 如果答案是 好的,货物量没有记录。
Body
application/json
{
"status": "OK",
"result": {
"boxes": [
{
"id": 0,
"fulfilmentId": "string"
}
]
}
}
|
Name |
Description |
|
status* |
Type: ApiResponseStatusType 响应的类型。 可能的值:
Enum: |
|
result |
Type: ShipmentBoxesDTO 在响应中,市场返回您提供的货物位置列表。 不要关注这个领域。 |
ApiResponseStatusType
响应的类型。 可能的值:
OK— 没有错误。ERROR— 处理请求时出错。
|
Type |
Description |
|
Enum: |
ShipmentBoxesDTO
在响应中,市场返回您提供的货物位置列表。 不要关注这个领域。
|
Name |
Description |
|
boxes* |
Type: ParcelBoxDTO[] 货物位置列表。 市场根据其长度确定座位数量。
|
ParcelBoxDTO
参数显示一个货物位置。
|
Name |
Description |
|
fulfilmentId ⦸
|
Type: string 请勿使用此选项。 Pattern: |
|
id |
Type: integer<int64> 顺序中的框的ID。 |
400 Bad Request
请求包含不正确的数据。 有关错误的更多信息
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "string",
"message": "string"
}
]
}
|
Name |
Description |
|
errors |
Type: ApiErrorDTO[] 错误列表。 Min items: |
|
status |
Type: ApiResponseStatusType 响应的类型。 可能的值:
Enum: |
ApiErrorDTO
一般错误格式。
|
Name |
Description |
|
code* |
Type: string 的错误代码。 |
|
message |
Type: string 错误的描述。 |
401 Unauthorized
请求中未指定授权数据。 有关错误的更多信息
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "string",
"message": "string"
}
]
}
|
Name |
Description |
|
errors |
Type: ApiErrorDTO[] 错误列表。 Min items: |
|
status |
Type: ApiResponseStatusType 响应的类型。 可能的值:
Enum: |
403 Forbidden
授权数据不正确或禁止访问资源。 有关错误的更多信息
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "string",
"message": "string"
}
]
}
|
Name |
Description |
|
errors |
Type: ApiErrorDTO[] 错误列表。 Min items: |
|
status |
Type: ApiResponseStatusType 响应的类型。 可能的值:
Enum: |
404 Not Found
找不到请求的资源。 有关错误的更多信息
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "string",
"message": "string"
}
]
}
|
Name |
Description |
|
errors |
Type: ApiErrorDTO[] 错误列表。 Min items: |
|
status |
Type: ApiResponseStatusType 响应的类型。 可能的值:
Enum: |
420 Method Failure
已超出资源访问限制。 有关错误的更多信息
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "string",
"message": "string"
}
]
}
|
Name |
Description |
|
errors |
Type: ApiErrorDTO[] 错误列表。 Min items: |
|
status |
Type: ApiResponseStatusType 响应的类型。 可能的值:
Enum: |
500 Internal Server Error
市场的内部错误。 有关错误的更多信息
Body
application/json
{
"status": "OK",
"errors": [
{
"code": "string",
"message": "string"
}
]
}
|
Name |
Description |
|
errors |
Type: ApiErrorDTO[] 错误列表。 Min items: |
|
status |
Type: ApiResponseStatusType 响应的类型。 可能的值:
Enum: |
No longer supported, please use an alternative and newer version.