getInventory
Get inventory entries.
By default, it uses the getInventoryDefaultQuery GraphQL query
Signature
declare function getInventory(
context: CommercetoolsIntegrationContext,
params?: GetInventoryParams,
customQuery?: CustomQuery
): Promise<GetInventoryResponse>;Parameters
| Name | Required | Type | Description |
|---|---|---|---|
context | Required | CommercetoolsIntegrationContext | |
params | Optional | GetInventoryParams | |
customQuery | Optional | CustomQuery |
Referenced Types
Examples
Fetch inventory entries
const { inventoryEntries } = await sdk.commerce.getInventory({ sku: "example-sku" })