Historial de ruta
curl --request GET \
--url https://api.locatebyteli.com/devices/{id}/history/route \
--header 'Authorization: <authorization>'{
"points": [
{
"latitude": 19.4326,
"longitude": -99.1332,
"speed": 45,
"timestamp": 1710756000
},
{
"latitude": 19.4330,
"longitude": -99.1340,
"speed": 50,
"timestamp": 1710756060
}
],
"stops": [
{
"latitude": 19.4350,
"longitude": -99.1360,
"duration": 1800,
"start": 1710757000,
"end": 1710758800
}
],
"total_distance": 15.5,
"total_duration": 3600
}
Historial
Historial de ruta
Obtiene la ruta recorrida por el dispositivo en un rango de tiempo
GET
/
devices
/
{id}
/
history
/
route
Historial de ruta
curl --request GET \
--url https://api.locatebyteli.com/devices/{id}/history/route \
--header 'Authorization: <authorization>'{
"points": [
{
"latitude": 19.4326,
"longitude": -99.1332,
"speed": 45,
"timestamp": 1710756000
},
{
"latitude": 19.4330,
"longitude": -99.1340,
"speed": 50,
"timestamp": 1710756060
}
],
"stops": [
{
"latitude": 19.4350,
"longitude": -99.1360,
"duration": 1800,
"start": 1710757000,
"end": 1710758800
}
],
"total_distance": 15.5,
"total_duration": 3600
}
Authorization
API Key. Formato:
Bearer lbt_•••Path Parameters
ID del dispositivo
Query Parameters
Timestamp Unix de inicio
Timestamp Unix de fin
Duración mínima de parada (segundos)
También disponible en
GET /devices/{id}/routeRespuesta
Puntos de ruta, paradas y resumen del recorrido.{
"points": [
{
"latitude": 19.4326,
"longitude": -99.1332,
"speed": 45,
"timestamp": 1710756000
},
{
"latitude": 19.4330,
"longitude": -99.1340,
"speed": 50,
"timestamp": 1710756060
}
],
"stops": [
{
"latitude": 19.4350,
"longitude": -99.1360,
"duration": 1800,
"start": 1710757000,
"end": 1710758800
}
],
"total_distance": 15.5,
"total_duration": 3600
}
Errores
| Código | Descripción |
|---|---|
400 | Parámetros inválidos |
404 | Dispositivo no encontrado |
500 | Error interno del servidor |
⌘I