Run Ended

The Run Ended callback occurs when a route ends.

📘

Register Your URL for this Webhook

To start receiving webhooks from Bringg, you must first register a URL. Detailed guidance on setting up and managing Bringg webhooks is available in the following resources:


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.

Parameter NameDescription
external_id
Int32
Your external system's ID for this run. Appears as planned_route_external_id when included outside of the run object.
id
Int32
The ID Bringg assigns to a run when it is created.
Use only in theupdate_task API request. When using update_task, either id or external_id can be indicated in the run object.
planned_route_id
Int32
Bringg's ID for the planned route. Planned routes are created in advanced (not created using AutoDispatch).
run_configuration_id
Int32
Refers to the GPS configuration (x seconds between location updates) per user status. Values include: Free =>10, "Started" =>10, "Assigned" =>10, "Checked-In" =>10, "Late" =>10}
scheduled_end_time
datetime
The date and time when this route is scheduled to end, formatted as "%Y-%m-%dT%H:%M:%S%z" and according to the UTC time zone.
scheduled_start_time
datetime
The date and time when this route is scheduled to begin, formatted as "%Y-%m-%dT%H:%M:%S%z" and according to the UTC time zone.
start_method
int32
Indicates the method used to start this route.
Possible values:
0 - manually using the Driver App
1 - automatic check-in or check-out via geofence
2 - driver's action when prompted by the Driver App
4 - auto-corrected by client
5 - auto-corrected by server
6 - automated by activity trigger
7 - updated in the Bringg platform
8 - updated in the store app
9 - from run end
10 - updated by Bringg automation
tasks
array
An array of order (task) objects. Read more about the Order (Task) Object
team_id
Int32
Bringg's ID for the team assigned to this route.
Can be indicated in the task object or run object. If indicated in task object, team_id must be omitted or match in run object.
user
object
An object including the details of the driver assigned to this route.
user_id
Int32
Bringg's ID for the driver assigned to this route.
Can be indicated in the task object or run object. If indicated in task object, user_id must be omitted or match in run object.
vehicle_id
Int32
Bringg's ID for the vehicle assigned to a route.