Skip to main content

Method signature

client.inventory.getInventoryLevels(params)
Retrieves current inventory levels for a specified product. This method queries the supplier’s Inventory service to get real-time stock availability.

Parameters

body.productId
string
required
The unique identifier for the product. This is the supplier’s product ID.
body.productIDtype
string
The type of product identifier being used. Only applicable for version 1.2.1.
body.filters
object
Optional filters to narrow down inventory results by specific parts, sizes, or colors.

Return value

Returns a Promise that resolves to the inventory levels data. The response format depends on the client’s configured format option (JSON or XML).
success
boolean
Indicates whether the request was successful.
inventoryLevels
object[]
Array of inventory level records for the requested product.

Code example

const inventoryData = await client.inventory.getInventoryLevels({
  productId: 'item_id'
});

console.log(inventoryData);

Get filter values

Retrieve available filter values for a product

Build docs developers (and LLMs) love