[Beta] RouteStopArrival Event Schema
[Beta] RouteStopArrival Webhook Payload
This webhook works for routes assigned to either vehicles or drivers.
Example
{
"eventId": "017db07f-6e95-470e-8cc0-a371f9deed2b",
"eventTime": "1970-01-20T06:39:05.683Z",
"eventType": "RouteStopArrival",
"orgId": 20936,
"webhookId": "1411751028848270",
"data": {
"driver": {
"externalIds": {
"payrollId": "ABFS18600"
},
"id": "45646",
"name": "Driver Bob"
},
"operation": "stop arrived",
"route": {
"actualRouteEndTime": "2019-06-13T19:08:25Z",
"actualRouteStartTime": "2019-06-13T19:08:25Z",
"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"
},
"stops": [
{
"actualArrivalTime": "2006-01-02T15:04:05+07:00",
"actualDepartureTime": "2006-01-02T15:04:05+07:00",
"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"
},
"id": "324231",
"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"
}
],
"name": "Stop #1",
"notes": "These are my notes",
"ontimeWindowAfterArrivalMs": 300000,
"ontimeWindowBeforeArrivalMs": 300000,
"scheduledArrivalTime": "2019-06-13T19:08:25Z",
"scheduledDepartureTime": "2019-06-13T19:08:25Z",
"singleUseLocation": {
"address": "1234 Main St, San Jose, CA",
"latitude": 123.456,
"longitude": 37.459
},
"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",
"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"
},
"id": "324231",
"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"
}
],
"name": "Stop #1",
"notes": "These are my notes",
"ontimeWindowAfterArrivalMs": 300000,
"ontimeWindowBeforeArrivalMs": 300000,
"scheduledArrivalTime": "2019-06-13T19:08:25Z",
"scheduledDepartureTime": "2019-06-13T19:08:25Z",
"singleUseLocation": {
"address": "1234 Main St, San Jose, CA",
"latitude": 123.456,
"longitude": 37.459
},
"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",
"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"
},
"id": "324231",
"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"
}
],
"name": "Stop #1",
"notes": "These are my notes",
"ontimeWindowAfterArrivalMs": 300000,
"ontimeWindowBeforeArrivalMs": 300000,
"scheduledArrivalTime": "2019-06-13T19:08:25Z",
"scheduledDepartureTime": "2019-06-13T19:08:25Z",
"singleUseLocation": {
"address": "1234 Main St, San Jose, CA",
"latitude": 123.456,
"longitude": 37.459
},
"skippedTime": "2006-01-02T15:04:05+07:00",
"state": "scheduled"
}
]
},
"routeStopDetails": {
"actualArrivalTime": "2006-01-02T15:04:05+07:00",
"actualDepartureTime": "2006-01-02T15:04:05+07:00",
"enRouteTime": "2006-01-02T15:04:05+07:00",
"eta": "2006-01-02T15:04:05+07:00",
"externalIds": {
"siteId": "54"
},
"id": "141414",
"liveSharingUrl": "https://cloud.samsara.com/fleet/viewer/job/fleet_viewer_token",
"skippedTime": "2006-01-02T15:04:05+07:00",
"state": "scheduled"
},
"time": "2020-01-27T07:06:25Z",
"type": "route tracking",
"vehicle": {
"assetType": "vehicle",
"externalIds": {
"maintenanceId": "250020"
},
"gateway": {
"model": "VG34",
"serial": "GFRV-43N-VGX"
},
"id": "494123",
"licensePlate": "6SAM123",
"name": "Fleet Truck #1",
"vin": "1GBJ6P1B2HV112765"
}
}
}
Reference
Property Name | Description |
---|---|
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 |
operation string | The operation that was performed as part of this route update. Valid values: stop arrived , stop departed . |
route object | |
    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. |
    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 . |
    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. |
        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 |
        id         string | Id of the stop |
        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'. |
        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. |
        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 |
        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 . |
routeStopDetails object | A single route stop for a 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. |
    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 |
    id     string | Unique identifier for the route stop. |
    liveSharingUrl     string | The shareable url of the stop's current status. |
    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 . |
time string | The timestamp of the route in RFC 3339 format. |
type string | The type of route update. The route tracking updates occur as a route is completed and stops transition from one state to another. Currently only Route Tracking updates are supported, but this will change in the future when additional types are added. Valid values: route tracking . |
vehicle object | A minified vehicle object. This object is only returned if the route is assigned to the vehicle. |
    assetType     string | The type of the asset. Valid values: uncategorized , trailer , equipment , unpowered , vehicle . |
    externalIds     object | A map of external ids |
    gateway     object | A minified gateway object |
        model         string | The model of the gateway installed on the asset. Valid values: AG15 , AG24 , AG24EU , AG26 , AG26EU , AG41 , AG41EU , AG45 , AG45EU , AG46 , AG46EU , AG46P , AG46PEU , AG51 , AG51EU , AG52 , AG52EU , AG53 , AG53EU , IG15 , IG21 , IG41 , IG61 , SG1 , SG1B , SG1G , SG1G32 , SG1x , VG32 , VG33 , VG34 , VG34EU , VG34FN , VG34M , VG54ATT , VG54EU , VG54FN , VG54NA , VG54NAE , VG54NAH , VG55EU , VG55FN , VG55NA . |
        serial         string | The serial number of the gateway installed on the asset. |
    id     string | ID of the vehicle |
    licensePlate     string | The license plate of the vehicle. |
    name     string | Name of the vehicle |
    vin     string | The VIN of the vehicle. |
Updated 5 days ago