获取有关多个货件的信息

方法适用于模式FBS.

如果您使用API-Key令牌,调用该方法时需要具备列表中可用权限之一

根据指定参数返回有关货件的信息:

  • 日期。
  • 状况;
  • 订单Id。

结果逐页返回。

参数的限制 limit

不要传递大于30的值。

⚙️ 限制: 每小时100个请求

Request

PUT

https://api.partner.market.yandex.ru/v2/campaigns/{campaignId}/first-mile/shipments

Path parameters

Name

Description

campaignId

Type: integer

广告系列(商店)的ID — 通过API工作时,代表您在Yandex市场系统中的商店的技术标识符。 它与您的商店唯一链接,但仅用于自动交互。

您可以使用查询找到它 GET v2/campaigns 或者在市场上的卖家办公室找到它。 点击您的帐户图标→ 设置 在左边的菜单中,选择 Api和模块:

  • 运动ID;
  • 标签 查询日志 →块中的下拉列表 显示日志.

⚠️ 不要把它与:

  • 商店的标识符,显示在商家的个人帐户中。
  • 广告活动。

Min value: 1

Query parameters

Name

Description

limit

Type: integer

每页的值数。

Min value: 1

page_token

Type: string

结果页面的ID。

如果省略该参数,则返回第一页。

我们建议传输输出参数的值 nextPageToken,在最后一次请求期间接收。

如果设置 page_token 并且请求有参数 pagepageSize 它们被忽略了。

Example: eyBuZXh0SWQ6IDIzNDIgfQ==

Body

application/json
{
  "dateFrom": "2025-01-01",
  "dateTo": "2025-01-01",
  "statuses": [
    "OUTBOUND_CREATED"
  ],
  "orderIds": [
    0
  ],
  "cancelledOrders": true
}

Name

Description

dateFrom

Type: string<date>

按发货日期(含)筛选的起始日期。

日期格式: DD-MM-YYYY.

Example: 2025-01-01

dateTo

Type: string<date>

按发货日期(含)过滤的结束日期。

日期格式: DD-MM-YYYY.

Example: 2025-01-01

cancelledOrders

Type: boolean

是否退还已取消的订单。

默认值: true. 如果您不需要退还已取消的订单,请传递价值 false.

Default: true

orderIds

Type: integer[] | null

来自货件的订单Id列表。

Min items: 1

Unique items: true

Example
[
  0
]

statuses

Type: string[] | null

装运状态清单。

Min items: 1

Unique items: true

Example
[
  "OUTBOUND_CREATED"
]

Responses

200 OK

找到货件。

Body

application/json
{
  "status": "OK",
  "result": {
    "shipments": [
      {}
    ],
    "paging": {
      "nextPageToken": "example"
    }
  }
}

Type: object

All of 2 types
  • Type: object

    status

    Type: string

    响应的类型。 可能的值:

    • OK — 没有错误。
    • ERROR — 处理请求时出错。

    Enum: OK, ERROR

    服务器响应的标准包装器。

    Example
    {
      "status": "OK"
    }
    
  • Type: object

    result

    Type: object

    shipments

    Type: object[]

    包含有关货件信息的列表。

    Example
    [
      {
        "id": 1,
        "planIntervalFrom": "2017-11-21T00:00:00+03:00",
        "planIntervalTo": "2017-11-21T00:00:00+03:00",
        "shipmentType": "IMPORT",
        "warehouse": {
          "id": 1,
          "name": "example",
          "address": "example"
        },
        "warehouseTo": {
          "id": 1,
          "name": "example",
          "address": "example"
        },
        "externalId": "example",
        "deliveryService": {
          "id": 0,
          "name": "example"
        },
        "palletsCount": {
          "planned": 0,
          "fact": 0
        },
        "orderIds": [
          1
        ],
        "draftCount": 0,
        "plannedCount": 0,
        "factCount": 0,
        "signature": {
          "signed": true
        },
        "status": "OUTBOUND_CREATED",
        "statusDescription": "example",
        "statusUpdateTime": "2017-11-21T00:00:00+03:00"
      }
    ]
    

    paging

    Type: object

    nextPageToken

    Type: string

    下一个结果页面的ID。

    Example: example

    下一页的ID。

    Example
    {
      "nextPageToken": "example"
    }
    

    有关货件的信息。

    Example
    {
      "shipments": [
        {
          "id": 1,
          "planIntervalFrom": "2017-11-21T00:00:00+03:00",
          "planIntervalTo": "2017-11-21T00:00:00+03:00",
          "shipmentType": "IMPORT",
          "warehouse": {
            "id": 1,
            "name": "example",
            "address": "example"
          },
          "warehouseTo": {
            "id": 1,
            "name": "example",
            "address": "example"
          },
          "externalId": "example",
          "deliveryService": {
            "id": 0,
            "name": "example"
          },
          "palletsCount": {
            "planned": 0,
            "fact": 0
          },
          "orderIds": [
            1
          ],
          "draftCount": 0,
          "plannedCount": 0,
          "factCount": 0,
          "signature": {
            "signed": true
          },
          "status": "OUTBOUND_CREATED",
          "statusDescription": "example",
          "statusUpdateTime": "2017-11-21T00:00:00+03:00"
        }
      ],
      "paging": {
        "nextPageToken": "example"
      }
    }
    
    Example
    {
      "result": {
        "shipments": [
          {
            "id": 1,
            "planIntervalFrom": "2017-11-21T00:00:00+03:00",
            "planIntervalTo": "2017-11-21T00:00:00+03:00",
            "shipmentType": "IMPORT",
            "warehouse": {},
            "warehouseTo": {},
            "externalId": "example",
            "deliveryService": {},
            "palletsCount": {},
            "orderIds": [
              null
            ],
            "draftCount": 0,
            "plannedCount": 0,
            "factCount": 0,
            "signature": {},
            "status": "OUTBOUND_CREATED",
            "statusDescription": "example",
            "statusUpdateTime": "2017-11-21T00:00:00+03:00"
          }
        ],
        "paging": {
          "nextPageToken": "example"
        }
      }
    }
    

400 Bad Request

请求包含不正确的数据。 有关错误的更多信息

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

      响应的类型。 可能的值:

      • OK — 没有错误。
      • ERROR — 处理请求时出错。

      Enum: OK, ERROR

      服务器响应的标准包装器。

      Example
      {
        "status": "OK"
      }
      
    • Type: object

      errors

      Type: object[]

      code

      Type: string

      的错误代码。

      Example: example

      message

      Type: string

      错误的描述。

      Example: example

      错误列表。

      Min items: 1

      Example
      [
        {
          "code": "example",
          "message": "example"
        }
      ]
      
      Example
      {
        "errors": [
          {
            "code": "example",
            "message": "example"
          }
        ]
      }
      

    服务器错误的标准包装器。

    Example
    {
      "status": "OK",
      "errors": [
        {
          "code": "example",
          "message": "example"
        }
      ]
    }
    

401 Unauthorized

请求中未指定授权数据。 有关错误的更多信息

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

      响应的类型。 可能的值:

      • OK — 没有错误。
      • ERROR — 处理请求时出错。

      Enum: OK, ERROR

      服务器响应的标准包装器。

      Example
      {
        "status": "OK"
      }
      
    • Type: object

      errors

      Type: object[]

      code

      Type: string

      的错误代码。

      Example: example

      message

      Type: string

      错误的描述。

      Example: example

      错误列表。

      Min items: 1

      Example
      [
        {
          "code": "example",
          "message": "example"
        }
      ]
      
      Example
      {
        "errors": [
          {
            "code": "example",
            "message": "example"
          }
        ]
      }
      

    服务器错误的标准包装器。

    Example
    {
      "status": "OK",
      "errors": [
        {
          "code": "example",
          "message": "example"
        }
      ]
    }
    

403 Forbidden

授权数据不正确或禁止访问资源。 有关错误的更多信息

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

      响应的类型。 可能的值:

      • OK — 没有错误。
      • ERROR — 处理请求时出错。

      Enum: OK, ERROR

      服务器响应的标准包装器。

      Example
      {
        "status": "OK"
      }
      
    • Type: object

      errors

      Type: object[]

      code

      Type: string

      的错误代码。

      Example: example

      message

      Type: string

      错误的描述。

      Example: example

      错误列表。

      Min items: 1

      Example
      [
        {
          "code": "example",
          "message": "example"
        }
      ]
      
      Example
      {
        "errors": [
          {
            "code": "example",
            "message": "example"
          }
        ]
      }
      

    服务器错误的标准包装器。

    Example
    {
      "status": "OK",
      "errors": [
        {
          "code": "example",
          "message": "example"
        }
      ]
    }
    

404 Not Found

找不到请求的资源。 有关错误的更多信息

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

      响应的类型。 可能的值:

      • OK — 没有错误。
      • ERROR — 处理请求时出错。

      Enum: OK, ERROR

      服务器响应的标准包装器。

      Example
      {
        "status": "OK"
      }
      
    • Type: object

      errors

      Type: object[]

      code

      Type: string

      的错误代码。

      Example: example

      message

      Type: string

      错误的描述。

      Example: example

      错误列表。

      Min items: 1

      Example
      [
        {
          "code": "example",
          "message": "example"
        }
      ]
      
      Example
      {
        "errors": [
          {
            "code": "example",
            "message": "example"
          }
        ]
      }
      

    服务器错误的标准包装器。

    Example
    {
      "status": "OK",
      "errors": [
        {
          "code": "example",
          "message": "example"
        }
      ]
    }
    

420 Method Failure

已超出资源访问限制。 有关错误的更多信息

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

      响应的类型。 可能的值:

      • OK — 没有错误。
      • ERROR — 处理请求时出错。

      Enum: OK, ERROR

      服务器响应的标准包装器。

      Example
      {
        "status": "OK"
      }
      
    • Type: object

      errors

      Type: object[]

      code

      Type: string

      的错误代码。

      Example: example

      message

      Type: string

      错误的描述。

      Example: example

      错误列表。

      Min items: 1

      Example
      [
        {
          "code": "example",
          "message": "example"
        }
      ]
      
      Example
      {
        "errors": [
          {
            "code": "example",
            "message": "example"
          }
        ]
      }
      

    服务器错误的标准包装器。

    Example
    {
      "status": "OK",
      "errors": [
        {
          "code": "example",
          "message": "example"
        }
      ]
    }
    

500 Internal Server Error

Yandex中的内部错误。 市场。 有关错误的更多信息

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

      响应的类型。 可能的值:

      • OK — 没有错误。
      • ERROR — 处理请求时出错。

      Enum: OK, ERROR

      服务器响应的标准包装器。

      Example
      {
        "status": "OK"
      }
      
    • Type: object

      errors

      Type: object[]

      code

      Type: string

      的错误代码。

      Example: example

      message

      Type: string

      错误的描述。

      Example: example

      错误列表。

      Min items: 1

      Example
      [
        {
          "code": "example",
          "message": "example"
        }
      ]
      
      Example
      {
        "errors": [
          {
            "code": "example",
            "message": "example"
          }
        ]
      }
      

    服务器错误的标准包装器。

    Example
    {
      "status": "OK",
      "errors": [
        {
          "code": "example",
          "message": "example"
        }
      ]
    }
    

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