Route (Run) Ended

The Run Ended callback occurs when a route ends.


The Run Ended webhook is sent to your designated URL when a route ends, and by default includes route, order, waypoint, and user details.

The end of a route can be triggered in a few ways:

  • Manually in the driver app once all orders are completed. This can also be done automatically if configured accordingly with your Bringg support representative.
  • Automatically, when the assigned driver arrives at your team location without unfinished orders.
  • For on-demand orders, if a driver returns to the team location to collect more orders, the open orders from the existing route are extracted and moved to the new one.
  • Thirty minutes after a driver's shift ends without any open orders.

Webhook

Below are the default parameters included in the Run Ended webhook.

{
    "run": {
    "id": 12345,
    "user_id": 67890,
    "estimated_distance_traveled": null,
    "team_id": 1122,
    "scheduled_end_time": "2024-03-15T17:00:00Z",
    "external_id": 334455,
    "tasks": [
{
    "id": 101,
    "status": 4,
    "title": "Deliver Package",
    "external_id": "ext123",
    "way_points": [
{
    "id": 201,
    "position": 1,
    "scheduled_at": "2024-03-15T15:30:00Z",
    "eta": "2024-03-15T15:45:00Z",
    "address": "123 Main St, Anytown, AT 12345"
},
{
    "id": 202,
    "position": 2,
    "scheduled_at": "2024-03-15T16:00:00Z",
    "eta": "2024-03-15T16:15:00Z",
    "address": "456 Second St, Anytown, AT 67890"
}
    ]
}
    ],
    "user": {
    "id": 78901,
    "name": "Rowan Birchwood",
    "status": "assigned",
    "sub": "free",
    "phone": "+1234567890",
    "external_id": "userext456"
}
},
    "webhook_type": "run_ended",
    "merchant_id": 1
}

Output Params

The Run Ended webhook includes the Run Object.