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.

certexi.com/app/dashboard/kpi
Loading interactive demo...

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

GET/api/whms/warehouses

List 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
    }
  ]
}
POST/api/whms/warehouses

Create a new warehouse

{
  "name": "Monterrey Hub",
  "location": { "lat": 25.6866, "lng": -100.3161 },
  "timezone": "America/Mexico_City",
  "floor_plan_image": "base64_or_url"
}
GET/api/whms/warehouses/:id

Get warehouse details with zone summary

Returns full warehouse metadata including all zones, slot counts, and utilization breakdown.

PUT/api/whms/warehouses/:id

Update warehouse metadata

Update name, location, timezone, or floor plan image.

Zones

GET/api/whms/zones

List 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
    }
  ]
}
POST/api/whms/zones

Create a zone

{
  "name": "Zone A",
  "zone_type": "storage",
  "color": "#3b82f6",
  "warehouseId": 1
}
GET/api/whms/zones/:id

Get zone details

Returns zone metadata, all slots, and zone-level analytics.

PUT/api/whms/zones/:id

Update zone metadata

Update zone name, type, color, or warehouse assignment.

GET/api/whms/zones/:id/slots

List all slots in a zone

Returns slots with computed occupancy status from the event ledger.

GET/api/whms/zones/:id/analytics

Get zone analytics

Returns time-series data for zone utilization, events per hour, and incident counts.

Slots

GET/api/whms/slots

List all slots

Supports filtering by zone, status (empty, occupied, verified), and pagination.

POST/api/whms/slots

Create 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"]
  }
}
GET/api/whms/slots/:id

Get slot with computed occupancy

Returns slot metadata and derived state: isOccupied, assetBarcode, isVerified, lastEvent.

PUT/api/whms/slots/:id

Update slot metadata

Update polygon, constraints, or zone assignment. Does not affect the event ledger.

GET/api/whms/slots/:id/events

Get event history for a slot

Returns chronological events for a specific slot. Supports pagination and date filtering.

Assets

GET/api/whms/assets

List all registered assets

Returns assets with type, metadata, and current location (derived from events).

POST/api/whms/assets

Register a new asset

{
  "asset_id": "PLT-2024-00042",
  "type": "pallet",
  "weight_kg": 1250,
  "dimensions": { "length": 120, "width": 100, "height": 15 }
}
GET/api/whms/assets/:barcode

Get asset details

Returns asset metadata, current location, and placement history.

GET/api/whms/assets/:barcode/location

Get current asset location

Returns the current slot where the asset is placed, derived from the event ledger.

GET/api/whms/assets/:barcode/history

Get 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.

POST/api/whms/events

Create 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.

GET/api/whms/events

Query event history

Supports filtering by slot_id, asset_barcode, event_type, operator, date range, and pagination via limit/offset.

GET/api/whms/events/:id

Get event details

Returns full event record including evidence URLs, hash, and linked CCTV clips.

GET/api/whms/events/stream

Stream 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

GET/api/whms/dashboard/utilization

Zone utilization statistics

{
  "totalSlots": 200,
  "occupiedSlots": 142,
  "utilizationPercent": 71,
  "pendingVerifications": 8,
  "byZone": [
    { "zone": "A", "occupied": 45, "total": 60, "utilization": 75 }
  ]
}
GET/api/whms/dashboard/throughput

Throughput metrics

Returns units processed per hour/day/week with trend data.

GET/api/whms/dashboard/incidents

Active incidents summary

Returns open incidents grouped by severity and category.

GET/api/whms/dashboard/kpis

Aggregated KPI data

Combined endpoint returning utilization, throughput, incidents, and active transport units.

Floor Plans

GET/api/whms/floor-plans

List floor plans

Returns all floor plan images with slot counts per plan.

POST/api/whms/floor-plans

Upload a floor plan image

Accepts multipart/form-data with the blueprint image and metadata.

GET/api/whms/floor-plans/:id

Get floor plan with slot polygons

Returns the floor plan image URL and all associated slot polygon definitions.

Transport Units

GET/api/whms/transport-units

List transport units

Supports filtering by status, stage, operator, and priority.

GET/api/whms/transport-units/:id

Get transport unit details

Returns full record including workflow history, evidence items, and weight data.

POST/api/whms/transport-units

Create a transport unit

{
  "type": "container",
  "operation": "import",
  "priority": "normal",
  "seal_number": "SEAL-2025-00042"
}
POST/api/whms/transport-units/:id/advance

Advance to next workflow stage

Validates all stage requirements are met before advancing. Returns validation errors if incomplete.

WHMS API Reference | Certexi Docs