Prerequisites

  1. Must have Route360 client account.
  2. Make sure you have added at least one driver.
  3. Make sure you have added at least one home base.

STEP 1 - Create the run on dashboard

Open a Route360 client dashboard and create run Configurations/run

STEP 2 - Generate Auth Token and Config Callback URL

Update the client's callback URL for the Event Listener. Admin/run

STEP 3 - Create request body

{
  "runStartTime": "eg. 2025-05-06T03:00:00Z",
  "runEndTime": "eg. 2025-05-06T09:00:00Z",
  "readyToPickupTime": "eg. 2025-05-06T03:05:00Z",
  "runName": "YOUR RUN NAME",
  "runType":"delivery/pickup" //default: delivery
  "runBookings": [
    {
      "orderId": "np-12-x",
      "priority": 1,
      "quantity": 1,
      "weight": 100,
      "length": 50,
      "width": 50,
      "height": 10,
      "customerName": "Customer One",
      "contactNumber": "xx",
      "address": "Chabahil",
      "latitude": -33.964756,
      "longitude": 151.064887,
      "items": [
        // Item can be null
        {
          "name": "chicken",
          "quantity": 1 // It can have other any attribute, for example, weight
        }
      ]
    }
  ]
}

You can modify the body yourself.

STEP 4 - Generate the route

Send a POST request to the URL https://route360.ai/api/v1/run/generate with the header X-Token set to the Auth Token from https://route360.ai/dashboard/settings/api-config, and include the required data in the request body

Once the request is send get the response
Success Response

{
  "status_code": 200,
  "data": {
    "callBackUrl": "CALL BACK URL/{planId}",
    "solutionUrl": "run/generate/{planId}",
    "planId": "planId",
    "businessNumber": "Client's Business number",
    "runStartTime": "eg. 2025-05-06T03:00:00Z",
    "runEndTime": "eg. 2025-05-06T09:00:00Z",
    "readyToPickupTime": "eg. 2025-05-06T03:05:00Z"
  },
  "message": "Plan created successfully.Further processing..."
}

Error Response

{
  "status_code": 404,
  "data": null,
  "message": "Business not found with this business number."
}

STEP 6 - Listen call back response

All requests generated afterward will be sent to the Callback URL/{planId}. So, create a POST API endpoint at Callback URL/{planId} to receive and handle the event data.
Alternatively, after completion, you can retrieve the solution from the solutionUrl provided in the generate response. https://route360.ai/api/v1/run/generate/{planId}
Response

{
  "status_code": 200,
  "data": {
    "type": "Solution",
    "planId": "01JTJ0SC6F5S2NTY66D02W2ZAN",
    "status": "Success",
    "message": "1 routes generated",
    "runName": "TEST",
    "runRoutes": [...],
    "totalTime": "",
    "runEndTime": "",
    "runStartTime": "",
    "totalDistance": ..,
    "totalIdleTime": ..,
    "totalLoadTime": ..,
    "businessNumber": ".."
  },
  "message": "Success"
}

Events are mainly of two types: Solution and Dispatch. solution refers to the generated route Solution, while Dispatch indicates that a driver has accepted and dispatched the order from the mobile app.

Type Solution

The solution type includes the following statuses: PickupAssigned and DeliveryAssigned.

Solution example Response

{
  "type": "Solution",
  "status": "PickupAssigned for pickup type /DeliveryAssigned for delivery type",
  "assigned": ["12-x", "12-y"],
  "unassigned": [],
  "message": "1 routes generated"
}

Type Dispatch

The dispatch type includes the following statuses: PickupCompleted, PickupCanceled, DeliveryCompleted, and DeliveryCanceled.

Dispatch response Example

{
    "type": "Dispatch",
    "status": "{DispatchType above}"
    "orderId": "{orderId}",
    "message": "Task {orderId} pickup/delivery completed"

}

Run list API

https://route360.ai/api/v1/run/run-list

Response

{
  "status_code": 200,
  "data": [
    {
      "id": "01K5X2SHREPFQN3TMGRMAMPXPR",
      "name": "TEST",
      "is_team": true,
      "drivers": [
        {
          "id": "01JP9YZGK37W0Z98PQW7DKGF27",
          "full_name": "Kirana Driver"
        },
        {
          "id": "01JXF2GAGYTG2DT2B6WT0WCZS5",
          "full_name": "Prithivi Jung"
        }
      ],
      "is_same_start_end": true,
      "start_homebase": "01JP9JQD0YAG2YGY13M08DTN65",
      "end_homebase": null
    }
  ],
  "message": "Success"
}