Chuyển đến nội dung chính
Mục lục tài liệu
GET

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

Get a terminal public optimization result

Mở trong ChatGPTMở trong Claude

Đường dẫn

GET/api/v1/partners/addons/route-optimization/jobs/{jobId}/result
Xác thực yêu cầuapi-key

Ví dụ gọi bằng curl

curl -X GET "https://<your-host>/api/v1/partners/addons/route-optimization/jobs/{jobId}/result" \
  -H "api-key: YOUR_API_KEY"

Tham số

TênVị tríKiểuBắt buộcMô tả
jobIdpathstring (uuid)Có

Nội dung gửi lên

Endpoint này không nhận nội dung gửi lên.

Kết quả trả về

409RESULT_NOT_READY or RESULT_UNAVAILABLE
200

Bổ sung ngoài bản đặc tả

Bản đặc tả OpenAPI chưa mô tả đầy đủ phần này, nên chúng tôi bổ sung nội dung dưới đây từ mã nguồn của API. Khi bản đặc tả có đủ thông tin, phần này sẽ được cập nhật theo.

Ví dụ kết quả trả về

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"
  }
}

Về nhóm: Tối ưu tuyến đường

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