pos-list-inventory-detail
Method: GET
Path: /pos/catalog/inventories/detail
Tags: POSAdmin
Summary
Retrieve inventory detail
Description
Retrieves inventory details for a specific product, product variant, or lot/batch based on the parameters provided.
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.content?.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;
/** @description Product Id */
product_id: string;
/** @description Variant Id */
variant_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"];
};
};
};
};
};
};Component References
| Reference | Resolves To |
|---|---|
components["schemas"]["InventoryDetail"] | InventoryDetail |
Parameters
- lot_batch (query): lot batch of selected productor or variant.
- product_id (query): Product Id
- variant_id (query): Variant Id
Responses
200
OK
OpenAPI Definition
json
{
"operationId": "pos-list-inventory-detail",
"summary": "Retrieve inventory detail",
"description": "Retrieves inventory details for a specific product, product variant, or lot/batch based on the parameters provided.",
"parameters": [
{
"name": "lot_batch",
"in": "query",
"description": "lot batch of selected productor or variant.",
"schema": {
"type": "string"
}
},
{
"name": "product_id",
"in": "query",
"description": "Product Id",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "variant_id",
"in": "query",
"description": "Variant Id",
"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"
}
},
"type": "object"
}
}
}
}
}
}
},
"tags": [
"POSAdmin"
],
"x-speakeasy-group": "pos",
"x-speakeasy-ignore": true
}Auto-generated from OpenAPI spec and TypeScript definitions