**版本：202201**

# 查询采购项列表

**GET** `/openapi/2022-01/procurements/:id/items`

获取指定采购单中的采购项列表。

## 请求

**Path参数**

- `id` string (required)

  Procurement' ID

**Query参数**

- `page` int32 (required)

  Page number for pagination. Must be greater than 0. Default: 1.
- `limit` int32

  Number of records per page. Must be greater than 0 and less than 100. Default: 10.

## 响应

**200 | 400**

200

**application/json**

**数据结构 | 示例 | Result**

**数据结构**

- `count` integer

  **默认值：** `0`

  **示例：** `1`
- `items` object[]

  *   Array [

  - `id` string

    **示例：** `382706477153919276`
  - `procurement_id` string

    **示例：** `382706443201028396`
  - `pending_quantity` integer

    **默认值：** `0`

    **示例：** `100`
  - `received_quantity` integer

    **默认值：** `0`

    **示例：** `0`
  - `rejected_quantity` integer

    **默认值：** `0`

    **示例：** `0`
  - `transfer_quantity` integer

    **默认值：** `0`

    **示例：** `100`
  - `variant_id` string

    **示例：** `4f442546-3a60-43b2-baa5-5e1f07c85464`
  - `product_id` string

    **示例：** `cbf9e2d2-7f2c-4881-ab7c-abf8e6590592`
  - `product_title` string

    **示例：** `test`
  - `variant_title` string

    **示例：**
  - `variant_sku` string

    **示例：**
  - `created_at` string

    **示例：** `2024-05-22T01:38:54Z`
  - `updated_at` string

    **示例：** `2024-05-22T01:38:54Z`
  - `product_image` object

    - `src` string

      **示例：** `//img.staticdj.com/c8bf5695d347092d7a010f00182581f7.jpeg`
    - `width` integer

      **默认值：** `0`

      **示例：** `710`
    - `height` integer

      **默认值：** `0`

      **示例：** `799`
    - `alt` string

      **示例：**
  *   ]

```json
{
  "count": 1,
  "items": [
    {
      "id": "382706477153919276",
      "procurement_id": "382706443201028396",
      "pending_quantity": 100,
      "received_quantity": 0,
      "rejected_quantity": 0,
      "transfer_quantity": 100,
      "variant_id": "4f442546-3a60-43b2-baa5-5e1f07c85464",
      "product_id": "cbf9e2d2-7f2c-4881-ab7c-abf8e6590592",
      "product_title": "test",
      "variant_title": "",
      "variant_sku": "",
      "created_at": "2024-05-22T01:38:54Z",
      "updated_at": "2024-05-22T01:38:54Z",
      "product_image": {
        "src": "//img.staticdj.com/c8bf5695d347092d7a010f00182581f7.jpeg",
        "width": 710,
        "height": 799,
        "alt": ""
      }
    }
  ]
}
```

```json
{
    "count": 1,
    "items": [
        {
            "id": "382706477153919276",
            "procurement_id": "382706443201028396",
            "pending_quantity": 100,
            "received_quantity": 0,
            "rejected_quantity": 0,
            "transfer_quantity": 100,
            "variant_id": "4f442546-3a60-43b2-baa5-5e1f07c85464",
            "product_id": "cbf9e2d2-7f2c-4881-ab7c-abf8e6590592",
            "product_title": "test",
            "variant_title": "",
            "variant_sku": "",
            "created_at": "2024-05-22T01:38:54Z",
            "updated_at": "2024-05-22T01:38:54Z",
            "product_image": {
                "src": "//img.staticdj.com/c8bf5695d347092d7a010f00182581f7.jpeg",
                "width": 710,
                "height": 799,
                "alt": ""
            }
        }
    ]
}
```

400

**application/json**

**数据结构 | 示例 | Result**

**数据结构**

- `errors` string[]

```json
{
  "errors": [
    "invalid procurement_id"
  ]
}
```

```json
{
  "errors": [
    "invalid procurement_id"
  ]
}
```
