Ir para o conteúdo principal

API call to pull ExceptionTripDistance as shown on Advanced Zone Visit Report.

JBa-2021
Pôster original

Hello,

 

I am trying to use API call to pull or calculate the distances for a selected device. The end result should match with the totals shown on GeoTab's Advanced Zone Visit Report (see below).

The GeoTab report shows 6mi as 'Distance to Arrival' on 4/26/2025.

imageI've tried to pull multiple data points (including ExceptionEvent.Distance and Trip.Distance) but none have matched. Included below is payload for ExceptionEvent:

api.call("Get", {

  "typeName": "ExceptionEvent",

  "resultsLimit": 10, 

  "search":{ 

    "fromDate": "2025-04-26T00:00:00.000Z" ,

    "toDate": "2025-04-26T23:59:59.000Z",

    "devicesearch":{

      "id": "bFB"

    },  

  }

}, function(result) {

  console.log("Done: ", result);

}, function(e) {

  console.error("Failed:", e);

});

What is the correct/best way to pull this data? Any suggestion will be greatly appreciated.

Participar na conversa

Você precisa estar conectado para responder a esta publicação e participar das discussões da Comunidade Geotab.

2 Respostas

EishiFUN
Administrador da Comunidade

Hello @JBa-2021​ ,

 

Thank you for asking your question in our community. I wanted to let you know I am asking our SDK team if they have any suggestions for you here. I will let you know what I hear from them as soon as I do.

 

Please reach out if you have any other questions in the meantime. We are here to help.

 

Have a great day!

Eishi FUN

JBa-2021
Pôster original

Thank you, Eishi! I think I've figured it out - When I looked at the Zone Visit report, the 'Distance to arrival' is actually the last trip's distance (in km) for a device on a day. All I need to do is pulling a list of the trips, then get the latest route and it's distance ( convert km to mile). Please confirm if this is correct. Thank you!

Ainda tem dúvidas?