[Beta] RouteStopResequence Event Schema
[Beta] RouteStopResequence Webhook Payload
Example
{
"eventId": "017db07f-6e95-470e-8cc0-a371f9deed2b",
"eventTime": "1970-01-20T06:39:05.683Z",
"eventType": "RouteStopResequence",
"orgId": 20936,
"webhookId": "1411751028848270",
"data": {
"route": {
"actualRouteEndTime": "2019-06-13T19:08:25Z",
"actualRouteStartTime": "2019-06-13T19:08:25Z",
"changes": {
"after": {
"stops": [
{
"id": "141414",
"scheduledArrivalTime": "2019-06-13T19:08:25Z",
"scheduledDepartureTime": "2019-06-13T19:08:25Z",
"state": "scheduled"
},
{
"id": "141414",
"scheduledArrivalTime": "2019-06-13T19:08:25Z",
"scheduledDepartureTime": "2019-06-13T19:08:25Z",
"state": "scheduled"
},
{
"id": "141414",
"scheduledArrivalTime": "2019-06-13T19:08:25Z",
"scheduledDepartureTime": "2019-06-13T19:08:25Z",
"state": "scheduled"
},
{
"id": "141414",
"scheduledArrivalTime": "2019-06-13T19:08:25Z",
"scheduledDepartureTime": "2019-06-13T19:08:25Z",
"state": "scheduled"
}
]
},
"before": {
"stops": [
{
"id": "141414",
"scheduledArrivalTime": "2019-06-13T19:08:25Z",
"scheduledDepartureTime": "2019-06-13T19:08:25Z",
"state": "scheduled"
},
{
"id": "141414",
"scheduledArrivalTime": "2019-06-13T19:08:25Z",
"scheduledDepartureTime": "2019-06-13T19:08:25Z",
"state": "scheduled"
},
{
"id": "141414",
"scheduledArrivalTime": "2019-06-13T19:08:25Z",
"scheduledDepartureTime": "2019-06-13T19:08:25Z",
"state": "scheduled"
},
{
"id": "141414",
"scheduledArrivalTime": "2019-06-13T19:08:25Z",
"scheduledDepartureTime": "2019-06-13T19:08:25Z",
"state": "scheduled"
}
]
}
},
"driver": {
"externalIds": {
"payrollId": "ABFS18600"
},
"id": "45646",
"name": "Driver Bob"
},
"externalIds": {
"myRouteId": "abc"
},
"id": "342341",
"name": "Bid 123",
"notes": "These are my notes",
"scheduledRouteEndTime": "2019-06-13T19:08:25Z",
"scheduledRouteStartTime": "2019-06-13T19:08:25Z",
"settings": {
"routeCompletionCondition": "arriveLastStop",
"routeStartingCondition": "departFirstStop",
"sequencingMethod": "scheduledArrivalTime"
},
"stops": [
{
"actualArrivalTime": "2006-01-02T15:04:05+07:00",
"actualDepartureTime": "2006-01-02T15:04:05+07:00",
"actualDistanceMeters": 5450,
"address": {
"externalIds": {
"siteId": "54"
},
"id": "494123",
"name": "Company Office #1"
},
"documents": [
{
"id": "494123",
"name": "Fuel Receipt Wichita"
},
{
"id": "494123",
"name": "Fuel Receipt Wichita"
}
],
"enRouteTime": "2006-01-02T15:04:05+07:00",
"eta": "2006-01-02T15:04:05+07:00",
"externalIds": {
"siteId": "54"
},
"forms": [
{
"id": "41234"
},
{
"id": "41234"
},
{
"id": "41234"
}
],
"id": "324231",
"issues": [
{
"id": "32812"
},
{
"id": "32812"
},
{
"id": "32812"
}
],
"liveSharingUrl": "https://cloud.samsara.com/fleet/viewer/job/fleet_viewer_token",
"locationLiveSharingLinks": [
{
"expiresAtTime": "2020-01-27T07:06:25Z",
"liveSharingUrl": "https://cloud.samsara.com/o/123456/fleet/viewer/address/gEAitEnnOwcv92cuPzcU",
"name": "Name"
},
{
"expiresAtTime": "2020-01-27T07:06:25Z",
"liveSharingUrl": "https://cloud.samsara.com/o/123456/fleet/viewer/address/gEAitEnnOwcv92cuPzcU",
"name": "Name"
},
{
"expiresAtTime": "2020-01-27T07:06:25Z",
"liveSharingUrl": "https://cloud.samsara.com/o/123456/fleet/viewer/address/gEAitEnnOwcv92cuPzcU",
"name": "Name"
},
{
"expiresAtTime": "2020-01-27T07:06:25Z",
"liveSharingUrl": "https://cloud.samsara.com/o/123456/fleet/viewer/address/gEAitEnnOwcv92cuPzcU",
"name": "Name"
}
],
"name": "Stop #1",
"notes": "These are my notes",
"ontimeWindowAfterArrivalMs": 300000,
"ontimeWindowBeforeArrivalMs": 300000,
"plannedDistanceMeters": 5200,
"scheduledArrivalTime": "2019-06-13T19:08:25Z",
"scheduledDepartureTime": "2019-06-13T19:08:25Z",
"sequenceNumber": 10,
"singleUseLocation": {
"address": "1234 Main St, San Jose, CA",
"latitude": 123.456,
"longitude": 37.459,
"radiusMeters": 100
},
"skippedTime": "2006-01-02T15:04:05+07:00",
"state": "scheduled"
},
{
"actualArrivalTime": "2006-01-02T15:04:05+07:00",
"actualDepartureTime": "2006-01-02T15:04:05+07:00",
"actualDistanceMeters": 5450,
"address": {
"externalIds": {
"siteId": "54"
},
"id": "494123",
"name": "Company Office #1"
},
"documents": [
{
"id": "494123",
"name": "Fuel Receipt Wichita"
},
{
"id": "494123",
"name": "Fuel Receipt Wichita"
}
],
"enRouteTime": "2006-01-02T15:04:05+07:00",
"eta": "2006-01-02T15:04:05+07:00",
"externalIds": {
"siteId": "54"
},
"forms": [
{
"id": "41234"
},
{
"id": "41234"
},
{
"id": "41234"
}
],
"id": "324231",
"issues": [
{
"id": "32812"
},
{
"id": "32812"
},
{
"id": "32812"
}
],
"liveSharingUrl": "https://cloud.samsara.com/fleet/viewer/job/fleet_viewer_token",
"locationLiveSharingLinks": [
{
"expiresAtTime": "2020-01-27T07:06:25Z",
"liveSharingUrl": "https://cloud.samsara.com/o/123456/fleet/viewer/address/gEAitEnnOwcv92cuPzcU",
"name": "Name"
},
{
"expiresAtTime": "2020-01-27T07:06:25Z",
"liveSharingUrl": "https://cloud.samsara.com/o/123456/fleet/viewer/address/gEAitEnnOwcv92cuPzcU",
"name": "Name"
},
{
"expiresAtTime": "2020-01-27T07:06:25Z",
"liveSharingUrl": "https://cloud.samsara.com/o/123456/fleet/viewer/address/gEAitEnnOwcv92cuPzcU",
"name": "Name"
},
{
"expiresAtTime": "2020-01-27T07:06:25Z",
"liveSharingUrl": "https://cloud.samsara.com/o/123456/fleet/viewer/address/gEAitEnnOwcv92cuPzcU",
"name": "Name"
}
],
"name": "Stop #1",
"notes": "These are my notes",
"ontimeWindowAfterArrivalMs": 300000,
"ontimeWindowBeforeArrivalMs": 300000,
"plannedDistanceMeters": 5200,
"scheduledArrivalTime": "2019-06-13T19:08:25Z",
"scheduledDepartureTime": "2019-06-13T19:08:25Z",
"sequenceNumber": 10,
"singleUseLocation": {
"address": "1234 Main St, San Jose, CA",
"latitude": 123.456,
"longitude": 37.459,
"radiusMeters": 100
},
"skippedTime": "2006-01-02T15:04:05+07:00",
"state": "scheduled"
},
{
"actualArrivalTime": "2006-01-02T15:04:05+07:00",
"actualDepartureTime": "2006-01-02T15:04:05+07:00",
"actualDistanceMeters": 5450,
"address": {
"externalIds": {
"siteId": "54"
},
"id": "494123",
"name": "Company Office #1"
},
"documents": [
{
"id": "494123",
"name": "Fuel Receipt Wichita"
},
{
"id": "494123",
"name": "Fuel Receipt Wichita"
}
],
"enRouteTime": "2006-01-02T15:04:05+07:00",
"eta": "2006-01-02T15:04:05+07:00",
"externalIds": {
"siteId": "54"
},
"forms": [
{
"id": "41234"
},
{
"id": "41234"
},
{
"id": "41234"
}
],
"id": "324231",
"issues": [
{
"id": "32812"
},
{
"id": "32812"
},
{
"id": "32812"
}
],
"liveSharingUrl": "https://cloud.samsara.com/fleet/viewer/job/fleet_viewer_token",
"locationLiveSharingLinks": [
{
"expiresAtTime": "2020-01-27T07:06:25Z",
"liveSharingUrl": "https://cloud.samsara.com/o/123456/fleet/viewer/address/gEAitEnnOwcv92cuPzcU",
"name": "Name"
},
{
"expiresAtTime": "2020-01-27T07:06:25Z",
"liveSharingUrl": "https://cloud.samsara.com/o/123456/fleet/viewer/address/gEAitEnnOwcv92cuPzcU",
"name": "Name"
},
{
"expiresAtTime": "2020-01-27T07:06:25Z",
"liveSharingUrl": "https://cloud.samsara.com/o/123456/fleet/viewer/address/gEAitEnnOwcv92cuPzcU",
"name": "Name"
},
{
"expiresAtTime": "2020-01-27T07:06:25Z",
"liveSharingUrl": "https://cloud.samsara.com/o/123456/fleet/viewer/address/gEAitEnnOwcv92cuPzcU",
"name": "Name"
}
],
"name": "Stop #1",
"notes": "These are my notes",
"ontimeWindowAfterArrivalMs": 300000,
"ontimeWindowBeforeArrivalMs": 300000,
"plannedDistanceMeters": 5200,
"scheduledArrivalTime": "2019-06-13T19:08:25Z",
"scheduledDepartureTime": "2019-06-13T19:08:25Z",
"sequenceNumber": 10,
"singleUseLocation": {
"address": "1234 Main St, San Jose, CA",
"latitude": 123.456,
"longitude": 37.459,
"radiusMeters": 100
},
"skippedTime": "2006-01-02T15:04:05+07:00",
"state": "scheduled"
}
],
"vehicle": {
"externalIds": {
"maintenanceId": "250020"
},
"id": "494123",
"name": "Fleet Truck #1"
}
}
}
}
##Reference
| Property Name | Description |
|---|---|
| route object | Details of route order changes, includes minimal details about the route and changes |
| actualRouteEndTime string | Actual end time, if it exists, for the route in RFC 3339 format. |
| actualRouteStartTime string | Actual start time, if it exists, for the route in RFC 3339 format. |
| changes object | A diff of the changes for a route update. |
| after object | Includes information about the stops that have changed in a single route. |
| stops object array | The route stops in the route. Only stops that have been updated will be included in the response. |
| id string | Unique identifier for the route stop. |
| scheduledArrivalTime string | Scheduled arrival time, if it exists, for the stop in RFC 3339 format. If it does not exist, and this field was changed in the update, it will be an empty string. |
| scheduledDepartureTime string | Scheduled departure time, if it exists, for the stop in RFC 3339 format. If it does not exist, and this field was changed in the update, it will be an empty string. |
| state string | The current state of the route stop. Valid values: unassigned, scheduled, en route, skipped, arrived, departed, unknown. |
| before object | Includes information about the stops that have changed in a single route. |
| stops object array | The route stops in the route. Only stops that have been updated will be included in the response. |
| id string | Unique identifier for the route stop. |
| scheduledArrivalTime string | Scheduled arrival time, if it exists, for the stop in RFC 3339 format. If it does not exist, and this field was changed in the update, it will be an empty string. |
| scheduledDepartureTime string | Scheduled departure time, if it exists, for the stop in RFC 3339 format. If it does not exist, and this field was changed in the update, it will be an empty string. |
| state string | The current state of the route stop. Valid values: unassigned, scheduled, en route, skipped, arrived, departed, unknown. |
| driver object | A minified driver object. This object is only returned if the route is assigned to the driver. |
| externalIds object | A map of external ids |
| id string | ID of the driver |
| name string | Name of the driver |
| externalIds object | A map of external ids |
| id string | ID of the route |
| name string | Route name |
| notes string | Notes for the route |
| scheduledRouteEndTime string | Scheduled end time, if it exists, for the route in RFC 3339 format. |
| scheduledRouteStartTime string | Scheduled start time, if it exists, for the route in RFC 3339 format. |
| settings object | An optional dictionary, only necessary to override the defaults for route start and end conditions. |
| routeCompletionCondition string | Defaults to 'arriveLastStop' which ends the route upon arriving at the final stop. The condition 'departLastStop' ends the route upon departing the last stop. If 'arriveLastStop' is set, then the departure time of the final stop should not be set. Valid values: arriveLastStop, departLastStop. |
| routeStartingCondition string | Defaults to 'departFirstStop' which starts the route upon departing the first stop in the route. The condition 'arriveFirstStop' starts the route upon arriving at the first stop in the route. If 'departFirstStop' is set, the arrival time of the first stop should not be set. Valid values: departFirstStop, arriveFirstStop. |
| sequencingMethod string | Determines how stops are sequenced on the route. 'scheduledArrivalTime' sequences stops by their scheduled arrival times (default). 'manual' allows custom sequencing via stop.sequenceNumber. 'unknown' indicates the method is not specified. Valid values: unknown, scheduledArrivalTime, manual. |
| stops object array | List of stops along the route |
| actualArrivalTime string | Actual arrival time, if it exists, for the route stop in RFC 3339 format. |
| actualDepartureTime string | Actual departure time, if it exists, for the route stop in RFC 3339 format. |
| actualDistanceMeters integer | Actual GPS-measured distance traveled from the previous stop's departure to this stop's arrival, in meters. Null for the first stop, skipped stops, or if GPS data is unavailable. |
| address object | A minified Address object |
| externalIds object | A map of external ids |
| id string | Id of the address |
| name string | Name of the address |
| documents object array | List of documents associated with the stop. |
| id string | Id of the document |
| name string | Name of the document |
| enRouteTime string | The time the stop became en-route, in RFC 3339 format. |
| eta string | Estimated time of arrival, if this stop is currently en-route, in RFC 3339 format. |
| externalIds object | A map of external ids |
| forms object array | List of forms associated with the stop. |
| id string | ID of the form |
| id string | Id of the stop |
| issues object array | List of issues associated with the stop. |
| id string | ID of the issue |
| liveSharingUrl string | The shareable url of the stop's current status. |
| locationLiveSharingLinks object array | List of shareable, non-expired 'By Location' Live Sharing Links. |
| expiresAtTime string | Date that this link expires, in RFC 3339 format. |
| liveSharingUrl string | The shareable URL of the vehicle's location. |
| name string | Name of the Live Sharing Link. |
| name string | Name of the stop |
| notes string | Notes for the stop |
| ontimeWindowAfterArrivalMs integer | Specifies the time window (in milliseconds) after a stop's scheduled arrival time during which the stop is considered 'on-time'. |
| ontimeWindowBeforeArrivalMs integer | Specifies the time window (in milliseconds) before a stop's scheduled arrival time during which the stop is considered 'on-time'. |
| plannedDistanceMeters integer | Planned driving distance from the previous stop in meters. Based on routing calculations at route creation time. Null for the first stop or if routing data is unavailable. |
| scheduledArrivalTime string | Scheduled arrival time, if it exists, for the stop in RFC 3339 format. |
| scheduledDepartureTime string | Scheduled departure time, if it exists, for the stop in RFC 3339 format. |
| sequenceNumber integer | Manual sequence position of this stop. Only used when route.settings.sequencingMethod=manual. |
| singleUseLocation object | This field is used to indicate stops along the route for which an address has not been persisted. This field is mutually exclusive with addressId. |
| address string | Address of the stop. |
| latitude number | The latitude of the location |
| longitude number | The longitude of the location |
| radiusMeters number | The radius in meters for the geofence around this location. Must be a positive value. |
| skippedTime string | Skipped time, if it exists, for the route stop in RFC 3339 format. |
| state string | The current state of the route stop. Valid values: unassigned, scheduled, en route, skipped, arrived, departed. |
| vehicle object | A minified vehicle object. This object is only returned if the route is assigned to the vehicle. |
| externalIds object | A map of external ids |
| id string | ID of the vehicle |
| name string | Name of the vehicle |
Updated about 22 hours ago
