Inventory List
Retrieves products and categories from a specific warehouse with optional filtering.
GET
/api/v1/device-hub/inventory?warehouse_id=QebLm2p7Description
Fetch available inventory from a warehouse. Supports filtering by search term, category name, and warehouse ID to help you find specific products for deployment.
Request
Headers
| Header | Value | Required |
|---|---|---|
| Content-Type | application/json | Yes |
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| warehouse_id | string | Yes | Warehouse ID to fetch inventory from (e.g., QebLm2p7) |
| search | string | No | Search products by title, brand name, or model name |
| category_name | string | No | Filter products by category (e.g., Laptops) |
Response
Response Fields
| Field | Type | Description |
|---|---|---|
| success | boolean | Whether the request was successful |
| message | string | Response message |
| warehouse_id | string | The warehouse ID used for the query |
| warehouse_name | string | Name of the warehouse |
| total_categories | integer | Total number of product categories |
| total_products | integer | Total number of products available |
| data | array | Array of category objects with products |
Product Object Fields
| Field | Type | Description |
|---|---|---|
| company_sku | string | Company SKU identifier |
| title | string | Product title |
| slug | string | URL-friendly product identifier |
| description | string | Product description |
| quantity | integer | Available quantity in stock |
| brand_name | string | Product brand |
| model_name | string | Product model |
| product_image | string | URL to product image |
| created_at | string | ISO 8601 timestamp of creation |
| updated_at | string | ISO 8601 timestamp of last update |
Error Responses
Common error responses you may encounter when using this endpoint.
Notes
- The warehouse_id parameter is required to fetch inventory
- Use the search parameter to find products by title, brand, or model name
- Filter by category_name to narrow results to specific product types (e.g., "Laptops")
- Check the quantity field to ensure product availability before placing orders
- Use the exact product title when placing orders
Related Endpoints
Did this page help you?
Request
curl --location 'https://dev-api.unduit.com/api/v1/device-hub/inventory?warehouse_id=QebLm2p7' \
--header 'Content-Type: application/json' \
--data ''Success Response (200)
{
"success": true,
"message": "Products retrieved successfully from warehouse: Unduit***",
"warehouse_id": "QebLm2p7",
"warehouse_name": "Unduit***",
"total_categories": 1,
"total_products": 3,
"data": [
{
"category_name": "Laptops",
"products": [
{
"company_sku": "****",
"title": "Apple MacBook Pro 14-inch (M2, 2023)",
"slug": "apple-macbook-pro-14-m2-2023",
"description": "High-performance laptop with M2 Pro chip, Liquid Retina XDR display, and long battery life.",
"quantity": 5,
"brand_name": "Apple",
"model_name": "MacBook Pro 14 M2",
"created_at": "2025-01-15T10:12:45.000Z",
"updated_at": "2025-02-03T06:21:27.000Z",
"product_image": "https://example.com/images/macbook-pro-14.png"
},
{
"company_sku": "****",
"title": "Dell XPS 13 Plus (12th Gen Intel)",
"slug": "dell-xps-13-plus-12th-gen",
"description": "Ultra-portable laptop with edge-to-edge display and 12th Gen Intel Core i7 processor.",
"quantity": 10,
"brand_name": "Dell",
"model_name": "XPS 13 Plus",
"created_at": "2025-01-20T14:38:12.000Z",
"updated_at": "2025-02-11T07:34:39.000Z",
"product_image": "https://example.com/images/dell-xps-13-plus.png"
},
{
"company_sku": "****",
"title": "Lenovo ThinkPad X1 Carbon Gen 11",
"slug": "lenovo-thinkpad-x1-carbon-gen-11",
"description": "Business-class ultrabook with Intel vPro, lightweight carbon fiber chassis, and Dolby Vision.",
"quantity": 8,
"brand_name": "Lenovo",
"model_name": "ThinkPad X1 Carbon",
"created_at": "2025-01-28T09:05:10.000Z",
"updated_at": "2025-02-11T07:39:47.000Z",
"product_image": "https://example.com/images/thinkpad-x1-carbon.png"
}
]
}
]
}Error Responses
400 Bad Request
{
"message": "Invalid warehouse_id parameter"
}401 Unauthorized
{
"message": "Authentication token is missing or invalid"
}404 Not Found
{
"message": "Warehouse with ID 'warehouse-123' not found"
}