pos-list-inventory-detail
Method: GET
Path: /pos/catalog/inventories/detail
Tags: Inventory
Summary
Retrieve inventory detail
Description
Lists stock detail for either product_id or variant_id, optionally restricted to warehouse_id.
Pos SDK Usage
SDK Method: pos.getInventoryDetail()
Example:
typescript
// Get inventory detail for a product
const { data, error } = await pos.getInventoryDetail({
product_id: "01H9XYZ12345ABCDE"
});
if (error) {
console.error("Failed to get inventory detail:", error.message);
} else {
const inventory = data.inventory;
console.log(`Product: ${inventory?.product_name}`);
console.log(`Stock: ${inventory?.stock_quantity}`);
console.log(`Warehouse details:`, inventory?.details);
}
// Get inventory detail for a product variant
const { data: variantData, error: variantError } = await pos.getInventoryDetail({
product_id: "01H9XYZ12345ABCDE",
variant_id: "01H9ABC67890FGHIJ"
});
// Get inventory detail for a specific lot/batch
const { data: batchData, error: batchError } = await pos.getInventoryDetail({
product_id: "01H9XYZ12345ABCDE",
lot_batch: "BATCH001"
});TypeScript Definition
typescript
"pos-list-inventory-detail": {
parameters: {
query?: {
/** @description lot batch of selected productor or variant. */
lot_batch?: string;
product_id?: string;
variant_id?: string;
warehouse_id?: string;
};
header?: never;
path?: never;
cookie?: never;
};
requestBody?: never;
responses: {
/** @description OK */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
message: string;
success: boolean;
content: {
inventory: components["schemas"]["InventoryDetail"];
};
};
};
};
400: components["responses"]["AdminBadRequest"];
401: components["responses"]["AdminUnauthorized"];
403: components["responses"]["Forbidden"];
404: components["responses"]["NotFound"];
500: components["responses"]["AdminInternalServerError"];
504: components["responses"]["GatewayTimeout"];
};
};Component References
| Reference | Resolves To |
|---|---|
components["schemas"]["InventoryDetail"] | InventoryDetail |
components["responses"]["AdminBadRequest"] | AdminBadRequest |
components["responses"]["AdminUnauthorized"] | AdminUnauthorized |
components["responses"]["Forbidden"] | Forbidden |
components["responses"]["NotFound"] | NotFound |
components["responses"]["AdminInternalServerError"] | AdminInternalServerError |
components["responses"]["GatewayTimeout"] | GatewayTimeout |
Parameters
- lot_batch (query): lot batch of selected productor or variant.
- product_id (query): No description
- variant_id (query): No description
- warehouse_id (query): No description
Responses
200
OK
400
401
403
Access denied. token-required requires an authenticated session; permission-denied means the caller cannot access this resource. On POS, session-expired requires signing in again.
404
Requested resource not found
500
504
The request timed out.
OpenAPI Definition
json
{
"operationId": "pos-list-inventory-detail",
"summary": "Retrieve inventory detail",
"description": "Lists stock detail for either product_id or variant_id, optionally restricted to warehouse_id.",
"parameters": [
{
"name": "lot_batch",
"in": "query",
"description": "lot batch of selected productor or variant.",
"schema": {
"type": "string"
}
},
{
"name": "product_id",
"in": "query",
"schema": {
"type": "string"
}
},
{
"name": "variant_id",
"in": "query",
"schema": {
"type": "string"
}
},
{
"name": "warehouse_id",
"in": "query",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"message": {
"type": "string"
},
"success": {
"type": "boolean"
},
"content": {
"properties": {
"inventory": {
"$ref": "#/components/schemas/InventoryDetail"
}
},
"required": [
"inventory"
],
"type": "object"
}
},
"required": [
"message",
"success",
"content"
]
}
}
}
},
"400": {
"$ref": "#/components/responses/AdminBadRequest"
},
"401": {
"$ref": "#/components/responses/AdminUnauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"500": {
"$ref": "#/components/responses/AdminInternalServerError"
},
"504": {
"$ref": "#/components/responses/GatewayTimeout"
}
},
"externalDocs": {
"url": "https://llm-docs.commercengine.io/admin-pos/operations/pos-list-inventory-detail"
},
"security": [
{
"Authorization": []
}
],
"tags": [
"Inventory"
],
"x-speakeasy-group": "pos"
}Auto-generated from OpenAPI spec and TypeScript definitions