get
https://{subdomain}.myshoplaza.com/openapi/2025-06/products//inventory
Retrieves the inventory details of a product by its unique identifier (product_id).
Requiresread_inventoryaccess scope. More access scope
The Get Product Inventory Details API Retrieves the inventory details of a product by its unique identifier (product_id).
This API is especially useful for:
- Checking real-time product inventory levels.
- Managing stock across multiple locations.
- Synchronizing inventory data with external systems.
Request Parameters
Public Request Parameters
Path Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
product_id | string | Yes | Unique identifier of the product. | prod_123456 |
location_id | string | No | Unique identifier of the location to filter inventory details (optional). | loc_789 |
Response Explanation
Public Response Parameters
Successful Response
| Parameter | Type | Example | Description |
|---|---|---|---|
code | string | "success" | Error code indicating request status. |
message | string | Descriptive message about the response. | |
data.product_id | string | "prod_123456" | Unique identifier of the product. |
data.stock | int32 | 150 | Product's total inventory quantity. |
data.variants | array[object] | - | List of variant objects. |
data.variants.variant_id | string | "var_789" | Unique identifier of the variant. |
data.variants.location_items | array[object] | - | Inventory details per location. |
data.variants.location_items.location_id | string | "loc_789" | Unique location identifier. |
data.variants.location_items.stock | int32 | 50 | Current stock at this location. |
Error Response
| Field | Type | Example | Description |
|---|---|---|---|
code | string | InvalidParameter | Error http message |
message | string | `` | Error message |
