Gini Index
Std Deviation
Avg Workload
Assignments
Input JSON (AllocationRequest)
Output JSON (AllocationResponse)
📋 cURL Example
curl -X POST "http://localhost:8000/api/v1/allocate" \
  -H "Content-Type: application/json" \
  -d '{
    "allocation_date": "2026-02-05",
    "warehouse": {"lat": 12.9716, "lng": 77.5946},
    "drivers": [
      {"id": "driver_001", "name": "Raju", "vehicle_capacity_kg": 150, "preferred_language": "en"},
      {"id": "driver_002", "name": "Priya", "vehicle_capacity_kg": 120, "preferred_language": "ta"}
    ],
    "packages": [
      {"id": "pkg_001", "weight_kg": 2.5, "fragility_level": 3, "address": "123 Main St", "latitude": 12.97, "longitude": 77.60, "priority": "NORMAL"},
      {"id": "pkg_002", "weight_kg": 8.0, "fragility_level": 2, "address": "456 Oak Ave", "latitude": 12.98, "longitude": 77.61, "priority": "HIGH"}
    ]
  }'