# getOdometer(JSON dataOdometer)

Al invocar este método, se obtiene la información el odómetro de un activo en una fecha determinada.

<div id="bkmrk-"></div><div id="bkmrk--0"></div><details class="mb-m" id="bkmrk-body-parametersparam" open="open"><summary class="text-muted">Definición de atributos que deben ser incluidos en el objeto JSON que se recibe como parámetro al realizar la solicitud:</summary>

<div></div><div><table class="table" style="height: 164px; width: 619px;" width="811"><tbody><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**Atributos**</td><td style="width: 301px; height: 41px;">Definición </td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;"><div><div>equipo</div></div></td><td style="width: 301px; height: 41px;">ID del equipo</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;"><div><div>fecha</div></div></td><td style="width: 301px; height: 41px;">FORMATO: aaaa-mm-dd -&gt; Fecha en la que se calculará el odómetro del activo</td></tr><tr><td style="width: 320px;"><div><div><div><div>odometro_gps</div></div></div></div></td><td style="width: 301px;">(1 ó 0) Indica si se debe devolver el odómetro reportado por el GPS o el calculado por la plataforma</td></tr></tbody></table>

</div><div><span style="color: #bbbbbb; font-size: 1.4em; font-weight: 400;">Ejemplo de JSON:</span></div></details>```JavaScript
let dataOdometer = {
  equipo : 19567,
  fecha : '2021-01-12',
  odometro_gps : '0',
};
```

<div id="bkmrk-ejemplo-de-solicitud"><span style="color: #bbbbbb; font-size: 1.4em; font-weight: 400;">Ejemplo de solicitud en JS:</span></div>```JavaScript
try {
      const odometer  = await _gpsApiv2.getOdometer(dataOdometer); 
 	} catch (error) {
	  console.error(error);
	}
```

<details class="mb-m" id="bkmrk-definici%C3%B3n-de-atribu"><summary class="text-muted">Definición de atributos de la respuesta:</summary>

<div></div><div><table class="table" style="height: 656px; width: 619px;" width="811"><tbody><tr style="height: 41px;"><th style="width: 320px; height: 41px;">Atributos</th><th style="width: 301px; height: 41px;">Definición </th></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">fecha</td><td style="width: 301px; height: 41px;">Fecha a la que pertenece el odómetro</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">kilometros</td><td style="width: 301px; height: 41px;">Distancia recorrida por el activo en la fecha indicada</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">odometro</td><td style="width: 301px; height: 41px;"> Odómetro del activo a la fecha consultada</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">horas</td><td style="width: 301px; height: 41px;">Horas de uso de motor correspondientes a la fecha</td></tr></tbody></table>

</div></details>##### Respuesta de ejemplo:

```JSON
[0:{
		 19566:{
			 fecha:'2021-01-12'
			 kilometros:'79.89'
			 odometro:'70,235.98'
			 horas:'0.00
		 }
}]

```