Community
Is it possible to get a vehicle's fuel type?
As the title states, is it possible to query for the fuel type consumed by the vehicle (diesel, cng, unleaded, etc.)?
Posted by Isaac almost 4 years ago
Obtaining Vehicle / Trailer info for a Route
Hi all,
Trying to figure out how to link these pieces together. If you create a route and assign a driver to it, the route API does not display the vehicle/trailer that are picked by the driver. You need to use the vehicle-assignment API call to get that info.
As an example, the route API For a given route returns (non-relevant info stripped out):
{
"id": ####,
"dispatch_jobs": [
{
"id": ####
}
]
}
The vehicle assignment history for that same time period displays:
"vehicleAssignments": [
{
"isPassenger": false,
"vehicle": {
"id": "####"
},
"startTime": "2021-03-24T19:56:01.302Z",
"endTime": "2021-03-24T19:56:44.000Z",
"assignmentType": "driverApp"
},
{
"isPassenger": false,
"vehicle": {
"id": "####"
},
"startTime": "2021-03-24T20:41:35.352Z",
"endTime": "2021-03-24T21:00:23.717Z",
"assignmentType": "driverApp"
},
{
"isPassenger": false,
"vehicle": {
"id": "####"
},
"startTime": "2021-03-24T21:00:23.717Z",
"endTime": "2021-03-24T21:30:09.000Z",
"assignmentType": "driverApp"
},
{
"isPassenger": false,
"vehicle": {
"id": "####"
},
"startTime": "2021-03-24T21:40:40.191Z",
"endTime": "2021-03-24T23:23:28.000Z",
"assignmentType": "driverApp"
},
{
"isPassenger": false,
"vehicle": {
"id": "####"
},
"startTime": "2021-03-24T23:23:33.743Z",
"endTime": "2021-03-24T23:59:41.000Z",
"assignmentType": "driverApp"
}
]
As it stands, the only way I can think of to get the vehicle assignment, is to basically take the millisecond start/end time from the route, convert it to a UTC timestamp (side note - please be consistent on this. for example, start/end times in vehicle assignment are in UTC timestamps, whereas start/end times for routes are in milliseconds), and then query the vehicle assignment for the driver on the route and for that time range.
But that approach seems very prone to error. Seems like the vehicle assignment should just be part of the route instead?
Posted by Kiran Ramaswamy over 3 years ago
Document API
Hey all,
Document API contains a list of questions and their answers. Each question has the format { "value", "label", "type" }, and in the case of a multiple-choice question, the "value" detail is in the format { "multipleChoiceValue": [ { "selected": true/false }, "value": text ] }.
However, there is no way of being able to identify specific questions for querying at a later point.
Would it be possible to add a property to the questions, that would allow us to tag the question with a descriptor? Ideally we'd be able to tag each question with ExternalIds, but short of that, even being able to just manually write in a descriptor when designing the document template would suffice, or, if that's not possible, even simply auto-setting an incremental number to each question would probably work.
As it stands, we have to rely on the order of the questions from the API being in the same order as we had written them in, and that feels risky.
Posted by Kiran Ramaswamy over 3 years ago
Duty Exemptions
Does your API support returning duty exemptions such as the 100/150 Air Mile, Adverse Conditions, or 16Hour/Big Day/Short Haul?
I've looked at the response documentation and didn't see anything in there. I do see that the driver object has eldExempt(true/false) and eldExemptReason(string).
Thanks!
Posted by Nate Owen almost 4 years ago
Trailer Park and Hook
A question regarding Trailer park and hook. Can we get the Trailer park/unLink and hook/Link events through the API? If so, will the Tractor being linked and unlinked be in the event?
Posted by David Gudat almost 4 years ago
Trailer Assignment API
Hi,
I noticed that the trailer assignment API seems to only exist under v1. Beta has a GET for listing all trailers, as well as fetching a specific trailer, however, it does not contain anything for querying trailer assignments.
Are there plans to upgrade the existing trailer assignment API in the next version? If not, will the existing one remain functional, and for how long?
Thanks!
Posted by Kiran Ramaswamy over 3 years ago
Updating a Driver on a Route mid trip
Question regarding if a route is updated to another driver in the middle of the Route. Is there a way through the API to know? For example, if a dispatch goes into Samara and switches the Driver is there a way to know this through an API endpoint?
Posted by David Gudat almost 4 years ago
Importing fuel purchases
Is there currently a way, through an API, to import fuel purchases?
Our fuel cards can't be linked directly, but I manage to scrape the data using nodejs & puppeteer, saved it to a csv file. Now it would be great if there was a way for us to automate the import of that csv file into Samsara.
https://kb.samsara.com/hc/en-us/articles/360062457371-Import-Fuel-Purchases
Posted by Eric over 2 years ago