**Version: 202201**

# Get Product Inventory Detail

**GET** `/openapi/2022-01/products/:product_id/inventory`

Retrieves the inventory details of a product by its unique identifier (product_id).

## Request

**Path Parameters**

- `product_id` string (required)

  Product id.

**Query Parameters**

- `location_id` string

  Warehouse address id

## Responses

**200 | 500**

200

**application/json**

**Schema | Example | Result**

**Schema**

- `product_id` string

  **Example:** `f854e9a2-986d-4e2b-9df0-8e4c139ae80e`
- `variants` object[]

  *   Array [

  - `variant_id` string

    **Example:** `5723299f-238a-4491-8b42-a187462e748a`
  - `location_items` object[]

    *   Array [

    - `location_id` integer

      **Default value:** `0`

      **Example:** `327627904831724000`
    - `stock` integer

      **Default value:** `0`

      **Example:** `1`
    *   ]
  *   ]

```json
{
  "product_id": "f854e9a2-986d-4e2b-9df0-8e4c139ae80e",
  "variants": [
    {
      "variant_id": "5723299f-238a-4491-8b42-a187462e748a",
      "location_items": [
        {
          "location_id": 327627904831724000,
          "stock": 1
        }
      ]
    }
  ]
}
```

```json
{
    "product_id": "f854e9a2-986d-4e2b-9df0-8e4c139ae80e",
    "variants": [
        {
            "variant_id": "5723299f-238a-4491-8b42-a187462e748a",
            "location_items": [
                {
                    "location_id": 327627904831724058,
                    "stock": 1
                }
            ]
        }
    ]
}
```

500

**application/json**

**Schema | Example | Result**

**Schema**

- `errors` string[]

```json
{
  "errors": [
    "invalid UUID length: 10"
  ]
}
```

```json
{
  "errors": [
    "invalid UUID length: 10"
  ]
}
```
