WarehouseDTO
Represents a warehouse distribution center with geographic location and available product inventory. Warehouses serve as the source of stock for fulfilling store demand.Fields
Unique identifier for the warehouse
Geographic latitude coordinate of the warehouse location
Geographic longitude coordinate of the warehouse location
ISO country code where the warehouse is located (e.g., “US”, “CA”, “UK”)
List of product items with available quantities in the warehouse inventory
Example
Business Logic
Geographic Distribution- Warehouses are strategically positioned to minimize shipping distances
- Location coordinates are used to calculate distance to stores
- Same-country distribution is typically preferred for efficiency
- Stock levels are updated as assignments are created
- Each product item tracks quantity by product ID and size
- Zero-quantity items may be filtered from responses
- Distribution algorithm considers:
- Distance from warehouse to store
- Available stock quantities
- Store capacity constraints
- Cross-border shipping preferences
Related Endpoints
- GET /api/warehouses - List all warehouses
- GET /api/warehouses/ - Get specific warehouse details
- POST /api/warehouses - Create new warehouse
- PUT /api/warehouses/ - Update warehouse information
- DELETE /api/warehouses/ - Delete warehouse
- POST /api/distribution/calculate - Calculate optimal distribution
- GET /api/assignments - View warehouse assignments