Skip to main content
Routing webhooks are sent when route optimization finishes or when optimized routes are dispatched to field workers. The webhook payload contains the routing result: vehicle assignments, trip details and optimization summaries.
In the payload examples on this page, the routing configuration has 2 capacity constraints: weight and volume. Your actual payload includes the capacity constraints that you set.

Event Types

Payload Format

Routing webhooks come in two formats: the V3 format and the V4 format. Your organization receives one of them, and the V4 format is the default. The same format also decides whether your routing schedules run on the V3 or the V4 routing. It does not change the /api/v3 and /api/v4 endpoints: each one keeps its own request and response format. Your organization receives each routing webhook in one format only, either the V3 format or the V4 format, never both. If your routing webhook still sends the V3 format and you want to switch to the V4 format, contact the support team.

Summary Keys

The V4 format renames some summary and configuration keys of the routing result. See Summary and Configuration for the full list.

On Routing Finish

The onRoutingFinish event is sent when route optimization finishes processing. The tabs show the same onRoutingFinish payload and routing result in the V3 format and in the V4 format. Your organization receives only one of them.

On Routing Dispatched

The onRoutingDispatched event is sent when optimized routes are dispatched to field workers. Its payload has the same routing result as the onRoutingFinish payload, plus dispatch status fields. The result object has the same format as in On Routing Finish, in the format your organization receives. The onRoutingDispatched payload below is shortened. [...] and ... stand for the same fields as in the onRoutingFinish payload:

Dispatch-Specific Fields

The onRoutingDispatched payload adds these fields to the onRoutingFinish payload.

Payload Fields

The tables below describe the V3 format payload. For the V4 format, see Routing Result and Summary and Configuration.

Root Level

The fields at the top level of the payload.

Routing Array

Each item in result.routing is the optimized route of one vehicle.

Trip Object

Each item in result.routing[].trips is one stop in the route of that vehicle.

Dropped Array

Each item in result.dropped is a visit that could not be routed.

Summary Object

The routing result totals, for all routes together.

Configuration Object

The routing settings used for this routing result.

Response

Your webhook endpoint must return an HTTP 200 status code to acknowledge receipt of the webhook. Example response body: