Skip to main content
Docs menu
GET

/addons/route-optimization/jobs/{jobId}/result

Get a terminal public optimization result

Path

GET/api/v1/partners/addons/route-optimization/jobs/{jobId}/result
Authentication requiredapi-key

curl example

curl -X GET "https://api.route4green.com/api/v1/partners/addons/route-optimization/jobs/{jobId}/result" \
  -H "api-key: YOUR_API_KEY"

Parameters

NameInTypeRequiredDescription
jobIdpathstring (uuid)Yes

Request body

This endpoint takes no request body.

Responses

200Result available for a SUCCEEDED or PARTIAL job, wrapped in the success envelope; read it at data
409RESULT_NOT_READY or RESULT_UNAVAILABLE
410RESULT_PURGED: the job data was deleted after the retention period; the job itself still answers with purged_at set

Details not in the specification

The OpenAPI specification does not describe this fully, so the details below come from the API's source code. We update this section when the specification covers it.

Example response

200
{
  "success": true,
  "message": "success",
  "error_code": 0,
  "data": {
    "job_id": "b6f2b6b0-6b9e-4a3a-9b8b-6f6f6a2b9c3d",
    "external_reference": "order-batch-2026-09-04",
    "status": "PARTIAL",
    "summary": {
      "order_count": 5,
      "assigned_order_count": 4,
      "unassigned_order_count": 1,
      "vehicle_count": 2,
      "used_vehicle_count": 2,
      "unused_vehicle_count": 0,
      "route_count": 2,
      "total_distance": 48.6,
      "total_duration": 97
    },
    "routes": [
      {
        "pickup_date": "2026-09-04",
        "transport_mode": "lastmile",
        "chunk_index": 0,
        "route_index": 0,
        "external_vehicle_id": "29C-123.45",
        "distance": 24.1,
        "duration": 48,
        "count_of_orders": 2,
        "count_of_packages": 6,
        "weight": 300,
        "volume": 1.8,
        "stops": [
          {
            "sequence": 0,
            "external_order_id": "ord-1001",
            "type": "PICKUP_POINT",
            "eta": "2026-09-04T08:15:00+07:00",
            "etd": null,
            "latitude": 21.0285,
            "longitude": 105.8542,
            "distance_to_next": 3.2
          },
          {
            "sequence": 1,
            "external_order_id": "ord-1001",
            "type": "DROP_POINT",
            "eta": "2026-09-04T08:45:00+07:00",
            "etd": null,
            "latitude": 21.0369,
            "longitude": 105.7826,
            "distance_to_next": 0
          }
        ]
      },
      {
        "pickup_date": "2026-09-04",
        "transport_mode": "lastmile",
        "chunk_index": 0,
        "route_index": 1,
        "external_vehicle_id": "30F-678.90",
        "distance": 24.5,
        "duration": 49,
        "count_of_orders": 2,
        "count_of_packages": 4,
        "weight": 210,
        "volume": 1.2,
        "stops": [
          {
            "sequence": 0,
            "external_order_id": "ord-1002",
            "type": "PICKUP_POINT",
            "eta": "2026-09-04T09:00:00+07:00",
            "etd": null,
            "latitude": 21.0122,
            "longitude": 105.8252,
            "distance_to_next": 5.4
          },
          {
            "sequence": 1,
            "external_order_id": "ord-1002",
            "type": "DROP_POINT",
            "eta": "2026-09-04T09:35:00+07:00",
            "etd": null,
            "latitude": 20.97,
            "longitude": 105.789,
            "distance_to_next": 0
          }
        ]
      }
    ],
    "unassigned_orders": [
      "ord-1003"
    ],
    "unused_vehicles": [],
    "completed_at": "2026-09-04T10:02:11+07:00"
  }
}

Back to group: Route optimisation

GET /addons/route-optimization/jobs/{jobId}/result | Route4Green