WHMS API Reference
Complete API reference for the Warehouse Management System — 37 endpoints covering warehouses, zones, slots, assets, events, dashboard, and floor plans.
Last updated: 2025-02-18
WHMS API Reference
The Warehouse Management System exposes 37 REST endpoints for managing warehouses, zones, slots, assets, placement events, and dashboard analytics.
Dashboard KPIs powered by the WHMS API — utilization, throughput, incidents, and active units.
Authentication
All WHMS endpoints require authentication. See REST API Reference for authentication details.
Warehouses
/api/whms/warehousesList all warehouses accessible to the authenticated user
Returns warehouses with zone counts, total slots, and overall utilization.
{
"warehouses": [
{
"id": 1,
"name": "Monterrey Hub",
"location": { "lat": 25.6866, "lng": -100.3161 },
"timezone": "America/Mexico_City",
"zones": 5,
"totalSlots": 120,
"utilization": 72
}
]
}
/api/whms/warehousesCreate a new warehouse
{
"name": "Monterrey Hub",
"location": { "lat": 25.6866, "lng": -100.3161 },
"timezone": "America/Mexico_City",
"floor_plan_image": "base64_or_url"
}
/api/whms/warehouses/:idGet warehouse details with zone summary
Returns full warehouse metadata including all zones, slot counts, and utilization breakdown.
/api/whms/warehouses/:idUpdate warehouse metadata
Update name, location, timezone, or floor plan image.
Zones
/api/whms/zonesList all zones with occupancy data
Returns zones with slot counts, occupied slots, and zone-level utilization.
{
"zones": [
{
"id": 1,
"name": "Zone A",
"zone_type": "storage",
"color": "#3b82f6",
"warehouseId": 1,
"totalSlots": 40,
"occupiedSlots": 29,
"utilization": 72.5
}
]
}
/api/whms/zonesCreate a zone
{
"name": "Zone A",
"zone_type": "storage",
"color": "#3b82f6",
"warehouseId": 1
}
/api/whms/zones/:idGet zone details
Returns zone metadata, all slots, and zone-level analytics.
/api/whms/zones/:idUpdate zone metadata
Update zone name, type, color, or warehouse assignment.
/api/whms/zones/:id/slotsList all slots in a zone
Returns slots with computed occupancy status from the event ledger.
/api/whms/zones/:id/analyticsGet zone analytics
Returns time-series data for zone utilization, events per hour, and incident counts.
Slots
/api/whms/slotsList all slots
Supports filtering by zone, status (empty, occupied, verified), and pagination.
/api/whms/slotsCreate a slot
{
"slot_id": "A-01-01",
"zone": "A",
"floor_plan_polygon": [
{ "x": 10, "y": 20 },
{ "x": 50, "y": 20 },
{ "x": 50, "y": 60 },
{ "x": 10, "y": 60 }
],
"constraints": {
"max_weight_kg": 5000,
"max_height_m": 4.0,
"allowed_types": ["pallet", "box"]
}
}
/api/whms/slots/:idGet slot with computed occupancy
Returns slot metadata and derived state: isOccupied, assetBarcode, isVerified, lastEvent.
/api/whms/slots/:idUpdate slot metadata
Update polygon, constraints, or zone assignment. Does not affect the event ledger.
/api/whms/slots/:id/eventsGet event history for a slot
Returns chronological events for a specific slot. Supports pagination and date filtering.
Assets
/api/whms/assetsList all registered assets
Returns assets with type, metadata, and current location (derived from events).
/api/whms/assetsRegister a new asset
{
"asset_id": "PLT-2024-00042",
"type": "pallet",
"weight_kg": 1250,
"dimensions": { "length": 120, "width": 100, "height": 15 }
}
/api/whms/assets/:barcodeGet asset details
Returns asset metadata, current location, and placement history.
/api/whms/assets/:barcode/locationGet current asset location
Returns the current slot where the asset is placed, derived from the event ledger.
/api/whms/assets/:barcode/historyGet asset movement history
Chronological list of all placement and removal events for this asset.
Placement Events
Immutable Ledger
The events endpoint is append-only. Events cannot be updated or deleted. All corrections must be recorded as new events.
/api/whms/eventsCreate a placement event
{
"event_type": "PLACED",
"slot_id": 5,
"asset_barcode": "PLT-2024-00042",
"operator": "op-123",
"photo_url": "https://cloud.example.com/evidence/photo.jpg",
"scale_weight_kg": 1250,
"cctv_clip_url": "https://cloud.example.com/clips/cam3-14h32.mp4",
"work_order_ref": "WO-2025-001"
}
Response includes the SHA-256 evidence_hash of the event bundle.
/api/whms/eventsQuery event history
Supports filtering by slot_id, asset_barcode, event_type, operator, date range, and pagination via limit/offset.
/api/whms/events/:idGet event details
Returns full event record including evidence URLs, hash, and linked CCTV clips.
/api/whms/events/streamStream events for map visualization
Returns events within a time window and viewport bounds. Automatically selects response mode (raw, clustered, or aggregated) based on data density.
Dashboard
/api/whms/dashboard/utilizationZone utilization statistics
{
"totalSlots": 200,
"occupiedSlots": 142,
"utilizationPercent": 71,
"pendingVerifications": 8,
"byZone": [
{ "zone": "A", "occupied": 45, "total": 60, "utilization": 75 }
]
}
/api/whms/dashboard/throughputThroughput metrics
Returns units processed per hour/day/week with trend data.
/api/whms/dashboard/incidentsActive incidents summary
Returns open incidents grouped by severity and category.
/api/whms/dashboard/kpisAggregated KPI data
Combined endpoint returning utilization, throughput, incidents, and active transport units.
Floor Plans
/api/whms/floor-plansList floor plans
Returns all floor plan images with slot counts per plan.
/api/whms/floor-plansUpload a floor plan image
Accepts multipart/form-data with the blueprint image and metadata.
/api/whms/floor-plans/:idGet floor plan with slot polygons
Returns the floor plan image URL and all associated slot polygon definitions.
Transport Units
/api/whms/transport-unitsList transport units
Supports filtering by status, stage, operator, and priority.
/api/whms/transport-units/:idGet transport unit details
Returns full record including workflow history, evidence items, and weight data.
/api/whms/transport-unitsCreate a transport unit
{
"type": "container",
"operation": "import",
"priority": "normal",
"seal_number": "SEAL-2025-00042"
}
/api/whms/transport-units/:id/advanceAdvance to next workflow stage
Validates all stage requirements are met before advancing. Returns validation errors if incomplete.