Get Product Inventory Detail

🔒

Requires read_inventory access scope. More access scope

The List Product Inventory API retrieves the inventory details of a product by its unique identifier (product_id). This includes stock levels for different locations, helping businesses manage inventory efficiently.This API is especially useful for:

  1. Fetching stock levels of a product across various locations.
  2. Managing inventory levels for specific products.
  3. Supporting decision-making in restocking and inventory transfers.

Request Parameters

Public Request Parameters

📘

Public Request Parameters

Path Parameters

ParameterTypeRequiredExampleDescription
product_idstringYesa1b2c3d4-e5f6-7g8hUnique identifier of the product.
location_idNo327627904831724000Unique identifier of the location to filter inventory details (optional).

Response Explanation

Public Response Parameters

📘

Public Response Parameters

Success Response

FieldTypeExampleDescription
product_idstringf854e9a2-986d-4e2b-9df0-8e4c139ae80eUnique identifier of the product.
variantsarrayList of variant objects containing inventory details.
variants.variant_idstring5723299f-238a-4491-8b42-a187462e748aUnique identifier of the product variant.
variants.location_itemsarrayInventory details for each location.
variants.location_items.
location_id
uint64327627904831724000Unique identifier of the location.
variants.
location_items.
stock
integer1Current stock quantity at the location.

Error Response

Error responses in the API can be represented using two different fields: errors and error. Both fields provide details about issues encountered during request processing. Below is an explanation of the fields with their respective examples and descriptions.

FieldTypeExampleDescription
errorsArray[ "collect_id has an invalid UUID"]A list of errors encountered during the request processing.
FieldTypeExampleDescription
errorArray "invalid UUID length: 10"Indicates an error encountered during the process.

Error Details

Status CodeMessagePossible ReasonExample Response
400Bad RequestInvalid input format or request structure (e.g., missing required fields or incorrect data types).Bad Request
UnauthorizedThe request is missing valid authentication credentials or the credentials provided are invalid.Unauthorized
500Invalid product_idproduct_id with incorrect UUID types{ "errors": [ "invalid UUID length: 10"]}

API Structure Overview

Language
Credentials
Header
URL
Click Try It! to start a request and see the response here!