**Version: 202201**

# List Procurements

**GET** `/openapi/2022-01/procurements`

Retrieves a list of Procurement objects, representing the associations between products and Procurementions.

## Request

**Query Parameters**

- `page` int32

  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.
- `ids` string[]

  Array of Procurement IDs to filter by. Each ID must be a valid UUID.
- `state` int32

  Procurement state filter. Accepted values:
  `1` (waiting for stock)
  `2` (partial receipt)
  `3`(complete receipt)
  `4`(cancelled)
- `created_at_min` string

  Filter procurements created at or after this date (ISO-8601 format). Example: `2023-01-01T00:00:00Z`.
- `created_at_max` string

  Filter procurements created at or before this date (ISO-8601 format). Example: `2023-01-31T23:59:59Z`.
- `updated_at_min` string

  Filter procurements updated at or after this date (ISO-8601 format). Example: `2023-01-01T00:00:00Z`.
- `updated_at_max` string

  Filter procurements updated at or before this date (ISO-8601 format). Example: `2023-01-31T23:59:59Z`.

## Responses

**200**

200

**application/json**

**Schema | Example | Result**

**Schema**

- `procurements` object[]

  *   Array [

  - `id` string

    **Example:** `382451985837728044`
  - `procurement_sn` string

    **Example:** `00000002`
  - `supplier_id` string

    **Example:** `382453603865993516`
  - `location_id` string

    **Example:** `190035786870033452`
  - `note` string

    **Example:** `teest note`
  - `state` integer

    **Default value:** `0`

    **Example:** `4`
  - `pending_quantity` integer

    **Default value:** `0`

    **Example:** `0`
  - `received_quantity` integer

    **Default value:** `0`

    **Example:** `0`
  - `rejected_quantity` integer

    **Default value:** `0`

    **Example:** `0`
  - `transfer_quantity` integer

    **Default value:** `0`

    **Example:** `0`
  - `created_by` string

    **Example:**
  - `created_at` string

    **Example:** `2024-05-21T08:47:39Z`
  - `updated_at` string

    **Example:** `2024-05-21T09:59:29Z`
  *   ]
- `count` integer

  **Default value:** `0`

  **Example:** `2`

```json
{
  "procurements": [
    {
      "id": "382451985837728044",
      "procurement_sn": "00000002",
      "supplier_id": "382453603865993516",
      "location_id": "190035786870033452",
      "note": "teest note",
      "state": 4,
      "pending_quantity": 0,
      "received_quantity": 0,
      "rejected_quantity": 0,
      "transfer_quantity": 0,
      "created_by": "",
      "created_at": "2024-05-21T08:47:39Z",
      "updated_at": "2024-05-21T09:59:29Z"
    }
  ],
  "count": 2
}
```

```json
{
    "procurements": [
        {
            "id": "382451985837728044",
            "procurement_sn": "00000002",
            "supplier_id": "382453603865993516",
            "location_id": "190035786870033452",
            "note": "teest note",
            "state": 4,
            "pending_quantity": 0,
            "received_quantity": 0,
            "rejected_quantity": 0,
            "transfer_quantity": 0,
            "created_by": "",
            "created_at": "2024-05-21T08:47:39Z",
            "updated_at": "2024-05-21T09:59:29Z"
        },
        {
            "id": "382416861263834540",
            "procurement_sn": "00000001",
            "supplier_id": "382415819906231724",
            "location_id": "190035786870033452",
            "note": "test11",
            "state": 3,
            "pending_quantity": 0,
            "received_quantity": 148,
            "rejected_quantity": 36,
            "transfer_quantity": 100,
            "created_by": "",
            "created_at": "2024-05-21T06:28:05Z",
            "updated_at": "2024-05-21T07:26:33Z"
        }
    ],
    "count": 2
}
```
