Optimize Engine
  1. Optimization
Optimize Engine
  • Health
    • Check health
      GET
  • Optimization
    • Optimize Sync Process
      POST
    • Optimization Engine Asynchronous Process
      POST
    • Get Optimization Status
      GET
  • Authentication
    • User Login
      POST
    • User Logout
      POST
    • User Logout All
      POST
  • Schemas
    • Schemas
      • Configuration
      • Location
      • Vehicle
      • Job
      • OptimizeRequest
      • Summary
      • Stop
      • Route
      • OptimizeResponse
      • Error
      • OptimizationCreateResponse
      • OptimizationStatusResponse
      • LoginRequest
      • LoginResponse
  1. Optimization

Optimize Sync Process

POST
/api/v1.0/optimize
Submit problem and then response the optimize result

Request

Authorization
JWT Bearer
Add the parameter
Authorization
to Headers
Example:
Authorization: ********************
or
Body Params application/jsonRequired

Examples

Responses

🟢200OK
application/json
Optimization completed successfully
Body

🟠400Bad Request
🟠401Unauthorized
🔴500Server Error
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/api/v1.0/optimize' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "configuration": {
        "objective": "minimize_cost"
    },
    "locations": [
        {
            "id": "warehouse_intirub_halim",
            "lat": -6.2536,
            "lon": 106.8842,
            "type": "WAREHOUSE",
            "operational_hours": [
                {
                    "start": "2025-09-14T07:00:00+07:00",
                    "end": "2025-09-14T12:00:00+07:00"
                }
            ],
            "timezone": "Asia/Jakarta"
        }
    ],
    "vehicles": [
        {
            "id": "van_001",
            "start_location_id": "warehouse_intirub_halim",
            "end_location_id": "warehouse_intirub_halim",
            "capacities": {
                "weight": 300000
            },
            "available_time_windows": [
                {
                    "start": "2025-09-14T08:00:00+07:00",
                    "end": "2025-09-14T17:00:00+07:00"
                }
            ],
            "fixed_cost": 200,
            "cost_per_distance": 2.5,
            "cost_per_time": 0.5,
            "skills": [
                "refrigerated",
                "hazmat_certified"
            ]
        }
    ],
    "jobs": [
        {
            "id": "pickup_wh_intirub_halim",
            "type": "DELIVERY",
            "location_id": "warehouse_intirub_halim",
            "demands": {
                "weight": 120000,
                "volume": 2.5,
                "pallets": 4
            },
            "time_window": {
                "start": "2025-09-14T12:00:00+07:00",
                "end": "2025-09-14T16:00:00+07:00"
            },
            "service_time": 60,
            "required_skills": [
                "refrigerated"
            ],
            "priority": 1,
            "predecessor_job_ids": [
                "job_123"
            ]
        }
    ]
}'
Response Response Example
200 - Example 1
{
    "optimization_id": "x123-k331-q998",
    "summary": {
        "total_vehicles_used": 1,
        "total_distance": 68500,
        "total_duration": 565,
        "total_cost": 371.25,
        "unassigned_jobs": []
    },
    "routes": [
        {
            "vehicle_id": "van_001",
            "distance": 68500,
            "duration": 565,
            "cost": 371.25,
            "capacity_utilization": {
                "weight": {
                    "amount": 120000,
                    "total": 300000,
                    "ratio": 0.4
                }
            },
            "stops": [
                {
                    "sequence": 1,
                    "type": "START",
                    "job_id": "pickup_wh_intirub_halim",
                    "location_id": "warehouse_intirub_halim",
                    "arrival_time": "2025-09-14T08:00:00+07:00",
                    "departure_time": "2025-09-14T08:00:00+07:00",
                    "service_time": 60,
                    "waiting_time": 30,
                    "travel_time_to_next_stop": 75,
                    "travel_time_from_prev_stop": 0
                }
            ]
        }
    ]
}
Modified at 2025-09-25 12:17:15
Previous
Check health
Next
Optimization Engine Asynchronous Process
Built with