Skip to main content

Identifying trailer from DVIRLog record in the MyGeotab API

SDavi-1096
Original Poster

When using DVIRLog data retrieved via the SDK, how can I lookup the name of the vehicle if the DVIR was performed on a trailer? I have no problem looking up the name for a truck (by using DeviceID), but the value in the DVIRLog data for TrailerID is a longer alpha-numeric value. This number doesn't match any of our device IDs if I retrieve all of our devices. I was able to see that some of our devices have the 'TmpTrailerId' field populated with this field, but from what I see in the SDK, this field is marked as obsolete.

 

What's the best way to go about finding the trailer name for a DVIRLog record?

 

Thanks,

Sean

Join the conversation

You need to be logged in to reply to this post and participate in the Geotab Community discussions.

Top Answers

Hi @SDavi-1096​ ,

 

The trailers are also part of the Device entity.

The tmpTrailerId you see if you make a Get <Device> API call is the same value that is displayed under the trailer object in the DVIRLog.

A Get <Trailer> API call using this id as the search parameter will return the information of the trailer.

 

api.call("Get", { "typeName": "Trailer", "search":{ id:"a9akKu_LSUkKVHaRHIAOuIw" // id of trailer from the DVIRLog object }, }, function(result) { console.log("Done: ", result); }, function(e) { console.error("Failed:", e); });

I hope this helps.

 

Regards,

Ajay Srinivasan

Integrations Engineering Lead

Geotab

 

2 Replies

EishiFUN
Geotabber

Hello @SDavi-1096​ ,

 

Thank you for asking your question in our community. Last time I looked into this it was not very straight forward. I will consult with our SDK team and see if they can help here.

 

I will let you know what I hear as soon as I do.

 

Have a good one!

Eishi FUN

Hi @SDavi-1096​ ,

 

The trailers are also part of the Device entity.

The tmpTrailerId you see if you make a Get <Device> API call is the same value that is displayed under the trailer object in the DVIRLog.

A Get <Trailer> API call using this id as the search parameter will return the information of the trailer.

 

api.call("Get", { "typeName": "Trailer", "search":{ id:"a9akKu_LSUkKVHaRHIAOuIw" // id of trailer from the DVIRLog object }, }, function(result) { console.log("Done: ", result); }, function(e) { console.error("Failed:", e); });

I hope this helps.

 

Regards,

Ajay Srinivasan

Integrations Engineering Lead

Geotab

 

Still have questions?