Warehouse Endpoints
Manage warehouses, warehouse products, and product variant inventory.
Base Pathβ
/api/warehouses
Endpointsβ
List Warehousesβ
GET /api/warehouses
Authorization: Bearer {token}
Get Warehouse by IDβ
GET /api/warehouses/:id
Authorization: Bearer {token}
Create Warehouseβ
POST /api/warehouses
Authorization: Bearer {token}
Content-Type: application/json
{
"name": "Main Warehouse",
"code": "WH001",
"email": "warehouse@example.com",
"description": "Primary storage facility",
"active": true,
"organizationId": "uuid",
"contact": {
"name": "Warehouse Manager",
"phone": "+1-555-0123"
}
}
Update Warehouseβ
PUT /api/warehouses/:id
Authorization: Bearer {token}
Content-Type: application/json
{
"name": "Updated Warehouse Name",
"active": false
}
Delete Warehouseβ
DELETE /api/warehouses/:id
Authorization: Bearer {token}
Data Modelβ
interface IWarehouse {
id: string;
name: string;
code: string;
email?: string;
description?: string;
active: boolean;
logo?: string;
// Relations
contact?: IContact;
products?: IWarehouseProduct[];
tags?: ITag[];
organizationId: string;
tenantId: string;
}
interface IWarehouseProduct {
id: string;
quantity: number;
warehouseId: string;
productId: string;
product?: IProduct;
variants?: IWarehouseProductVariant[];
}
interface IWarehouseProductVariant {
id: string;
quantity: number;
warehouseProductId: string;
variantId: string;
variant?: IProductVariant;
}
Related Pagesβ
- Inventory Feature β inventory management
- Products & Inventory β product management
- Warehousing Feature β warehousing guide