# Equipos



# Datos históricos de eventos del equipo - historyGetEvents

##### <span class="api-method" data-method="POST">POST</span> https://api.service24gps.com/api/v1/historyGetEvents

Este método permite consultar los datos históricos de los eventos de un equipo para un rango de fechas y horas especificados.

<details class="mb-m" id="bkmrk-body-parametersparam"><summary class="text-muted">Ver parámetros de solicitud:</summary>

<div><table class="table" style="width: 876px;"><tbody><tr><th style="width: 113px;">Parámetros</th><th style="width: 349px;">Descripción</th><th style="width: 93px;">Longitud</th><th style="width: 321px;">Ejemplo</th></tr><tr><td style="width: 113px;">apikey</td><td style="width: 349px;">Llave de autorización para uso de los Servicios Web.</td><td style="width: 93px;"><span role="presentation" style="padding-right: 0.1px;"><span style="color: #3366ff;">50</span></span></td><td style="width: 321px;"><span role="presentation" style="padding-right: 0.1px; color: #3366ff;">25sdsd234234aa93sdsdsd37c70118e72</span></td></tr><tr><td style="width: 113px;">token</td><td style="width: 349px;">Token devuelto por el método [**getToken**](https://docs.redgps.com/books/webservice/page/metodo-de-autenticacion-gettoken-7ef).</td><td style="width: 93px;"><span role="presentation" style="padding-right: 0.1px;"><span style="color: #3366ff;">500</span></span></td><td style="width: 321px;"><span role="presentation" style="padding-right: 0.1px; color: #3366ff;">wfszR/oPIQKjt5HT5NgjDnZ2SAZQ==</span></td></tr><tr><td style="width: 113px;">equipo</td><td style="width: 349px;">IMEI o Identificador único del dispositivo configurado en la plataforma.

</td><td style="width: 93px;"><span role="presentation" style="padding-right: 0.1px;"><span style="color: #3366ff;">200</span></span>

</td><td style="width: 321px;"><span role="presentation" style="padding-right: 0.1px;"><span style="color: #3366ff;">0580012342332337</span></span></td></tr><tr><td style="width: 113px;">fechaIni

</td><td style="width: 349px;">Fecha Inicial de los datos.</td><td style="width: 93px;"><span role="presentation" style="padding-right: 0.1px;"><span style="color: #3366ff;">19</span></span></td><td style="width: 321px;"><span role="presentation" style="padding-right: 0.1px;"><span style="color: #3366ff;">2021-04-27 00:00:00</span></span></td></tr><tr><td style="width: 113px;">fechaFin

</td><td style="width: 349px;">Fecha Final de los datos.

</td><td style="width: 93px;"><span role="presentation" style="padding-right: 0.1px;"><span style="color: #3366ff;">19</span></span>

</td><td style="width: 321px;"><span role="presentation" style="padding-right: 0.1px;"><span style="color: #3366ff;">2021-04-27 23:59:59</span></span></td></tr><tr><td style="width: 113px;">format

</td><td style="width: 349px;">Si se pasan horas en **fechaIni** y **fechaFin** debe enviar “**DateTime**”, de lo contrario utilice “**Date**”.

</td><td style="width: 93px;"><span role="presentation" style="padding-right: 0.1px;"><span style="color: #3366ff;">8</span></span>

</td><td style="width: 321px;"><span role="presentation" style="padding-right: 0.1px;"><span style="color: #3366ff;">DateTime</span></span></td></tr><tr><td style="width: 113px;">idsEvents

</td><td style="width: 349px;">Se específica un o muchos Id de los eventos a consultar, separados por coma sin espacios. Si no se especifican se obtienen todos los eventos que no sean ubicación.

</td><td style="width: 93px;"></td><td style="width: 321px;"><span style="color: #3366ff;">1321,1322,1323,1324,1325,1326,1336,  
1337,1338,1339</span></td></tr></tbody></table>

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

```shell
curl --location --request POST 'https://api.service24gps.com/api/v1/historygetevents' \
--form 'apikey="25sdsd234234aa93sdsdsd37c70118e72"' \
--form 'token="wfszR/oPIQKjt5HT5NgjDnZ2SAZQ=="' \
--form 'equipo="0580012342332337"' \
--form 'fechaIni="2021-04-27 00:00:00"' \
--form 'fechaFin="2021-04-27 23:59:59"' \
--form 'format="DateTime"' \
--form 'idsEvents="1321,1322,1323,1324,1325,1326,1336,1337,1338,1339"'
```

```JSON
{
	"status": 200,
	"data": {
            "equipo": "0580012342332337",
            "latitud": "19.528530",
            "longitud": "--99.171165",
            "idstatus": "1",
            "gmt": "-6",
            "fecha": "2024-01-04",
            "hora": "10:14:18",
            "fecha_reporte": "20240104101418",
            "idevento": "348",
            "velocidad": "0",
            "orientacion": "0",
            "senal": "0",
            "satelites": "0",
            "inputs": "0|0|0|0|0|0|0|0|0|0|0|0|0|0|0",
            "odometro": "0",
            "bateria_gps": "86",
            "bateria_veh": "0",
            "ignicion": "1",
            "idconductor": "34110",
            "domicilio": "Camino a San Juan Ixtacala 479, San Juan, Gustavo A. Madero, Mexico City, Mexico",
            "de_buffer": "0",
            "datos_extras": "{\"parameters\":{\"out_1\":\"0\",\"out_2\":\"0\",\"out_3\":\"0\",\"out_4\":\"0\",\"out_5\":\"0\",\"out_6\":\"0\",\"out_7\":\"0\",\"out_8\":\"0\"},\"outputs\":\"0|0|0|0|0|0|0|0\",\"Time_stamp_insert\":\"20210427201542\",\"tipo_dato\":{\"1\":\"2021-04-28 01:15:42\",\"13\":\"2021-04-27 21:04:29\",\"55\":\"2021-04-27 21:04:30\",\"14\":\"2021-04-27 21:05:42\",\"3\":\"2021-04-27 21:03:42\"},\"gw\":\"Escuchar-ST4340-TCP.php\",\"ip\":\"107.170.254.11\",\"kp\":\"6088b73e3a7f5\"}",
            "grupo": "CONDUCTORES MX",
            "conductor": "CONDUCTOR1",
            "patente": "ABC123",
            "activo": "ACTIVO 1"
	}
}


```

##### Respuesta de ejemplo:

<details class="mb-m" id="bkmrk-ver-par%C3%A1metros%3A-par%C3%A1"><summary class="text-muted">Ver campos de respuesta:</summary>

<div><table class="table" id="bkmrk-campo-descripci%C3%B3n-fo" style="width: 809px; height: 1559px;"><tbody><tr style="height: 47px;"><th style="width: 210.99px; height: 47px;">Campo</th><th style="width: 366.997px; height: 47px;">Descripción

</th><th style="width: 230.99px; height: 47px;">Formato</th></tr><tr style="height: 69px;"><td style="width: 210.99px; height: 69px;">equipo

</td><td style="width: 366.997px; height: 69px;">Número de serie o IMEI que permite identificar el dispositivo.

</td><td style="width: 230.99px; height: 69px;">Entero

</td></tr><tr style="height: 47px;"><td style="width: 210.99px; height: 47px;">latitud

</td><td style="width: 366.997px; height: 47px;">Latitud de la posición del vehículo.

</td><td style="width: 230.99px; height: 47px;">Grados decimales

</td></tr><tr style="height: 47px;"><td style="width: 210.99px; height: 47px;">longitud

</td><td style="width: 366.997px; height: 47px;">Longitud de la posición del vehículo.

</td><td style="width: 230.99px; height: 47px;">Grados decimales

</td></tr><tr style="height: 92px;"><td style="width: 210.99px; height: 92px;">idstatus

</td><td style="width: 366.997px; height: 92px;">Status de la información que reportó el equipo:

1 = Información actual

2 = Información a futuro.

</td><td style="width: 230.99px; height: 92px;">Entero

</td></tr><tr style="height: 47px;"><td style="width: 210.99px; height: 47px;">gmt

</td><td style="width: 366.997px; height: 47px;">Greenwich Mean Time.

</td><td style="width: 230.99px; height: 47px;">Cadena de texto

</td></tr><tr style="height: 47px;"><td style="width: 210.99px; height: 47px;">fecha

</td><td style="width: 366.997px; height: 47px;">Fecha de la posición del vehículo.

</td><td style="width: 230.99px; height: 47px;">DateTime

</td></tr><tr style="height: 47px;"><td style="width: 210.99px; height: 47px;">hora

</td><td style="width: 366.997px; height: 47px;">Hora de la posición del vehículo.

</td><td style="width: 230.99px; height: 47px;">HH::MM:SS

</td></tr><tr style="height: 47px;"><td style="width: 210.99px; height: 47px;">fecha\_reporte

</td><td style="width: 366.997px; height: 47px;">Fecha y hora de la posición del vehículo.

</td><td style="width: 230.99px; height: 47px;">Timestamp

</td></tr><tr style="height: 47px;"><td style="width: 210.99px; height: 47px;">idevento

</td><td style="width: 366.997px; height: 47px;">Identificador del evento que reportó el equipo GPS.

</td><td style="width: 230.99px; height: 47px;">Entero

</td></tr><tr style="height: 47px;"><td style="width: 210.99px; height: 47px;">velocidad

</td><td style="width: 366.997px; height: 47px;">Velocidad en km/h que detecta el equipo GPS.

</td><td style="width: 230.99px; height: 47px;">Entero

</td></tr><tr style="height: 69px;"><td style="width: 210.99px; height: 69px;">orientacion

</td><td style="width: 366.997px; height: 69px;">Orientación en grados en la que reportó el equipo GPS.

</td><td style="width: 230.99px; height: 69px;">Entero

</td></tr><tr style="height: 47px;"><td style="width: 210.99px; height: 47px;">senal

</td><td style="width: 366.997px; height: 47px;">Señal GSM del equipo GPS.

</td><td style="width: 230.99px; height: 47px;">Entero

</td></tr><tr style="height: 47px;"><td style="width: 210.99px; height: 47px;">satelites

</td><td style="width: 366.997px; height: 47px;">Cantidad de satélites.

</td><td style="width: 230.99px; height: 47px;">Entero

</td></tr><tr style="height: 92px;"><td style="width: 210.99px; height: 92px;">inputs

</td><td style="width: 366.997px; height: 92px;">Estados de cada entrada del equipo:

0 = Desactivada

1 = Activada

</td><td style="width: 230.99px; height: 92px;">Cadena de texto

</td></tr><tr style="height: 69px;"><td style="width: 210.99px; height: 69px;">odometro

</td><td style="width: 366.997px; height: 69px;">Metros (mts) que ha recorrido el vehículo, detectado por el GPS.

</td><td style="width: 230.99px; height: 69px;">Entero

</td></tr><tr style="height: 69px;"><td style="width: 210.99px; height: 69px;">bateria\_gps

</td><td style="width: 366.997px; height: 69px;">Porcentaje o voltaje del nivel de la batería interna del GPS.

</td><td style="width: 230.99px; height: 69px;">Entero | Decimales

</td></tr><tr style="height: 47px;"><td style="width: 210.99px; height: 47px;">bateria\_veh

</td><td style="width: 366.997px; height: 47px;">Voltaje (v) de la batería del vehículo.

</td><td style="width: 230.99px; height: 47px;">Decimales

</td></tr><tr style="height: 114px;"><td style="width: 210.99px; height: 114px;">ignicion

</td><td style="width: 366.997px; height: 114px;">Status Ignición:

0 = OFF

1 = ON

2 = Desconocida

</td><td style="width: 230.99px; height: 114px;">Entero

</td></tr><tr style="height: 47px;"><td style="width: 210.99px; height: 47px;">IdConductor

</td><td style="width: 366.997px; height: 47px;">Id del conductor autentificado, Ibutton

</td><td style="width: 230.99px; height: 47px;">Entero

</td></tr><tr style="height: 47px;"><td style="width: 210.99px; height: 47px;">domicilio

</td><td style="width: 366.997px; height: 47px;">Domicilio.

</td><td style="width: 230.99px; height: 47px;">Cadena de texto

</td></tr><tr style="height: 92px;"><td style="width: 210.99px; height: 92px;">de\_buffer

</td><td style="width: 366.997px; height: 92px;">Status del tipo de reporte:

0 = Sin Buffer

1 = Buffer

</td><td style="width: 230.99px; height: 92px;">Entero

</td></tr><tr style="height: 47px;"><td style="width: 210.99px; height: 47px;">datos\_extras

</td><td style="width: 366.997px; height: 47px;">Valores que son obtenidos del protocolo OBDII.

</td><td style="width: 230.99px; height: 47px;">JSON

</td></tr><tr style="height: 47px;"><td style="width: 210.99px; height: 47px;">grupo

</td><td style="width: 366.997px; height: 47px;">Nombre del grupo que pertenece.

</td><td style="width: 230.99px; height: 47px;">Cadena de texto

</td></tr><tr style="height: 47px;"><td style="width: 210.99px; height: 47px;">conductor

</td><td style="width: 366.997px; height: 47px;">Nombre del conductor.

</td><td style="width: 230.99px; height: 47px;">Cadena de texto

</td></tr><tr style="height: 47px;"><td style="width: 210.99px; height: 47px;">patente

</td><td style="width: 366.997px; height: 47px;">Nombre de la patente.

</td><td style="width: 230.99px; height: 47px;">Cadena de texto

</td></tr><tr style="height: 47px;"><td style="width: 210.99px; height: 47px;">activo

</td><td style="width: 366.997px; height: 47px;">Nombre del activo.

</td><td style="width: 230.99px; height: 47px;">Cadena de texto

</td></tr></tbody></table>

</div></details>

# Datos históricos equipo - history/get

##### <span class="api-method" data-method="POST">POST</span> https://api.service24gps.com/api/v1/history/get 

Este método permite consultar los datos históricos de un equipo para un rango de fechas y horas especificados.

<details class="mb-m" id="bkmrk-body-parametersparam"><summary class="text-muted">Ver parámetros de solicitud:</summary>

<div><table class="table" style="width: 819px;"><tbody><tr><th style="width: 103px;">Parámetros</th><th style="width: 316px;">Descripción</th><th style="width: 131px;">Longitud</th><th style="width: 269px;">Ejemplo</th></tr><tr><td style="width: 103px;">apikey</td><td style="width: 316px;">**(Requerido)** Llave de autorización para uso de los Servicios Web.</td><td style="width: 131px;"><span role="presentation" style="padding-right: 0.1px; color: #3366ff;">50</span></td><td style="width: 269px;"><span role="presentation" style="padding-right: 0.1px; color: #3366ff;">25sdsd234234aa93sdsdsd37c70118e72</span></td></tr><tr><td style="width: 103px;">token</td><td style="width: 316px;">**(Requerido)** Token devuelto por el método getToken.</td><td style="width: 131px;"><span role="presentation" style="padding-right: 0.1px; color: #3366ff;">500</span></td><td style="width: 269px;"><span role="presentation" style="padding-right: 0.1px; color: #3366ff;">wfszR/oPIQKjt5HT5NgjDnZ2SAZQ==</span></td></tr><tr><td style="width: 103px;">equipo</td><td style="width: 316px;">**(Requerido)** IMEI o Identificador único del dispositivo configurado en la plataforma.

</td><td style="width: 131px;"><span role="presentation" style="padding-right: 0.1px; color: #3366ff;">200</span>

</td><td style="width: 269px;"><span role="presentation" style="padding-right: 0.1px;"><span style="color: #3366ff;">0580012342332337</span></span></td></tr><tr><td style="width: 103px;">fechaIni

</td><td style="width: 316px;">**(Requerido)** Fecha Inicial de los datos.</td><td style="width: 131px;"><span role="presentation" style="padding-right: 0.1px; color: #3366ff;">19</span></td><td style="width: 269px;"><span role="presentation" style="padding-right: 0.1px;"><span style="color: #3366ff;">2023-03-08 00:00:00</span></span></td></tr><tr><td style="width: 103px;">fechaFin

</td><td style="width: 316px;">**(Requerido)** Fecha Final de los datos.

</td><td style="width: 131px;"><span role="presentation" style="padding-right: 0.1px; color: #3366ff;">19</span>

</td><td style="width: 269px;"><span role="presentation" style="padding-right: 0.1px;"><span style="color: #3366ff;">2023-03-08 23:59:59</span></span></td></tr><tr><td style="width: 103px;">format

</td><td style="width: 316px;">**(Requerido)** Si se pasan horas en **fechaIni** y **fechaFin** debe enviar “DateTime”, de lo contrario utilice “Date”.

</td><td style="width: 131px;"><span role="presentation" style="padding-right: 0.1px; color: #3366ff;">8</span>

</td><td style="width: 269px;"><span role="presentation" style="padding-right: 0.1px;"><span style="color: #3366ff;">DateTime</span></span></td></tr><tr><td style="width: 103px;">limite

</td><td style="width: 316px;">**(Opcional)** Permite establecer un límite de filas de datos a recibir del WS, si no especifica un límite se regresan todos los datos.

</td><td style="width: 131px;"> </td><td style="width: 269px;"><span style="color: #3366ff;">1</span></td></tr></tbody></table>

</div></details><p class="callout info">**Nota:** El limite máximo para consultar datos históricos es de 15 días por equipo.</p>

##### Solicitud de ejemplo:

```shell
curl --location --request POST 'https://api.service24gps.com/api/v1/history/get' \
--form 'apikey="25sdsd234234aa93sdsdsd37c70118e72"' \
--form 'token="wfszR/oPIQKjt5HT5NgjDnZ2SAZQ=="' \
--form 'equipo="0580012342332337"' \
--form 'fechaIni="2023-03-08 00:00:00"' \
--form 'fechaFin="2023-03-08 23:59:59"' \
--form 'format="DateTime"' \
--form 'limite="1"'
```

##### Respuesta de ejemplo:

```JSON
{
	"status": 200,
	"data": {
		"equipo": "0580012342332337",
		"latitud": "+19.528530",
		"longitud": "-99.171165",
		"iporigen": "",
		"puerto": "",
		"idstatus": "1",
		"gmt": "-5",
        "fecha": "2023-03-08",
        "hora": "23:59:39",
		"fecha_reporte": "20230308235939",
		"idevento": "1",
		"velocidad": "0",
		"orientacion": "0",
		"senal": "65",
		"satelites": "20",
		"inputs": "0|0|0|0|0|0|0|0|0|0|0|0|0|0|0",
		"odometro": "57373562",
		"bateria_gps": "100",
		"bateria_veh": "13.83",
		"ignicion": "1",
		"idconductor": "0",
		"domicilio": "Camino a San Juan Ixtacala 479, San Juan, Gustavo A. Madero, Mexico City, Mexico",
		"de_buffer": "0",
		"datos_extras": "{\"parameters\":{\"out_1\":\"0\",\"out_2\":\"0\",\"out_3\":\"0\",\"out_4\":\"0\",\"out_5\":\"0\",\"out_6\":\"0\",\"out_7\":\"0\",\"out_8\":\"0\"},\"outputs\":\"0|0|0|0|0|0|0|0\",\"Time_stamp_insert\":\"20210427201542\",\"tipo_dato\":{\"1\":\"2021-04-28 01:15:42\",\"13\":\"2021-04-27 21:04:29\",\"55\":\"2021-04-27 21:04:30\",\"14\":\"2021-04-27 21:05:42\",\"3\":\"2021-04-27 21:03:42\"},\"gw\":\"Escuchar-ST4340-TCP.php\",\"ip\":\"107.170.254.11\",\"kp\":\"6088b73e3a7f5\"}",
        "grupo": "Flota 1",
        "conductor": "",
        "patente": "ABC-813",
        "activo": "Activo-01"
	}
}


```

<details class="mb-m" id="bkmrk-ver-par%C3%A1metros%3A-par%C3%A1"><summary class="text-muted">Ver campos de respuesta:</summary>

<div><div><table class="table" id="bkmrk-campo-descripci%C3%B3n-fo" style="width: 1040px;"><tbody><tr><th style="width: 211px;">Campo</th><th style="width: 367px;">Descripción

</th><th style="width: 231px;">Formato</th><th style="width: 231px;"> </th></tr><tr><td style="width: 211px;">equipo

</td><td style="width: 367px;">Número de serie o IMEI que permite identificar el dispositivo.

</td><td style="width: 231px;">Entero

</td><td style="width: 231px;"></td></tr><tr><td style="width: 211px;">latitud

</td><td style="width: 367px;">Latitud de la posición del vehículo.

</td><td style="width: 231px;">Grados decimales

</td><td style="width: 231px;"></td></tr><tr><td style="width: 211px;">longitud

</td><td style="width: 367px;">Longitud de la posición del vehículo.

</td><td style="width: 231px;">Grados decimales

</td><td style="width: 231px;"></td></tr><tr><td style="width: 211px;">iporigen

</td><td style="width: 367px;">Ip de origen de reporte del equipo GPS.

</td><td style="width: 231px;">Cadena de texto

</td><td style="width: 231px;"></td></tr><tr><td style="width: 211px;">puerto

</td><td style="width: 367px;">Puerto de origen de reporte del equipo GPS.

</td><td style="width: 231px;">Entero

</td><td style="width: 231px;"></td></tr><tr><td style="width: 211px;">idstatus

</td><td style="width: 367px;">Status de la información que reportó el equipo:

1 = Información actual

2 = Información a futuro.

</td><td style="width: 231px;">Entero

</td><td style="width: 231px;"></td></tr><tr><td style="width: 211px;">gmt

</td><td style="width: 367px;">Greenwich Mean Time.

</td><td style="width: 231px;">Cadena de texto

</td><td style="width: 231px;"></td></tr><tr><td style="width: 211px;">fecha

</td><td style="width: 367px;">Fecha

</td><td style="width: 231px;">aaaa-mm-dd

</td><td style="width: 231px;"></td></tr><tr><td style="width: 211px;">hora

</td><td style="width: 367px;">Hora

</td><td style="width: 231px;">hh:mm:ss

</td><td style="width: 231px;"></td></tr><tr><td style="width: 211px;">fecha\_reporte

</td><td style="width: 367px;">Fecha hora de la posición del vehículo.

</td><td style="width: 231px;">DateTime

</td><td style="width: 231px;"></td></tr><tr><td style="width: 211px;">idevento

</td><td style="width: 367px;">Identificador del evento que reportó el equipo GPS.

</td><td style="width: 231px;">Entero

</td><td style="width: 231px;"></td></tr><tr><td style="width: 211px;">velocidad

</td><td style="width: 367px;">Velocidad en km/h que detecta el equipo GPS.

</td><td style="width: 231px;">Entero

</td><td style="width: 231px;"></td></tr><tr><td style="width: 211px;">orientacion

</td><td style="width: 367px;">Orientación en grados en la que reportó el equipo GPS.

</td><td style="width: 231px;">Entero

</td><td style="width: 231px;"></td></tr><tr><td style="width: 211px;">senal

</td><td style="width: 367px;">Señal GSM del equipo GPS.

</td><td style="width: 231px;">Entero

</td><td style="width: 231px;"></td></tr><tr><td style="width: 211px;">satelites

</td><td style="width: 367px;">Cantidad de satélites.

</td><td style="width: 231px;">Entero

</td><td style="width: 231px;"></td></tr><tr><td style="width: 211px;">inputs

</td><td style="width: 367px;">Estados de cada entrada del equipo:

0 = Desactivada

1 = Activada

</td><td style="width: 231px;">Cadena de texto

</td><td style="width: 231px;"></td></tr><tr><td style="width: 211px;">odometro

</td><td style="width: 367px;">Metros (mts) que ha recorrido el vehículo, detectado por el GPS.

</td><td style="width: 231px;">Entero

</td><td style="width: 231px;"></td></tr><tr><td style="width: 211px;">bateria\_gps

</td><td style="width: 367px;">Porcentaje o voltaje del nivel de la batería interna del GPS.

</td><td style="width: 231px;">Entero | Decimales

</td><td style="width: 231px;"></td></tr><tr><td style="width: 211px;">bateria\_veh

</td><td style="width: 367px;">Voltaje (v) de la batería del vehículo.

</td><td style="width: 231px;">Decimales

</td><td style="width: 231px;"></td></tr><tr><td style="width: 211px;">ignicion

</td><td style="width: 367px;">Status Ignición:

0 = OFF

1 = ON

2 = Desconocida

</td><td style="width: 231px;">Entero

</td><td style="width: 231px;"></td></tr><tr><td style="width: 211px;">IdConductor

</td><td style="width: 367px;">Id del conductor autentificado, Ibutton

</td><td style="width: 231px;">Entero

</td><td style="width: 231px;"></td></tr><tr><td style="width: 211px;">de\_buffer

</td><td style="width: 367px;">Status del tipo de reporte:

0 = Sin Buffer

1 = Buffer

</td><td style="width: 231px;">Entero

</td><td style="width: 231px;"></td></tr><tr><td style="width: 211px;">datos\_extras

</td><td style="width: 367px;">Valores que son obtenidos del protocolo OBDII.

</td><td style="width: 231px;">JSON

</td><td style="width: 231px;"></td></tr><tr><td style="width: 211px;">grupo

</td><td style="width: 367px;">Nombre del grupo

</td><td style="width: 231px;">Cadena de texto

</td><td style="width: 231px;"></td></tr><tr><td style="width: 211px;">conductor

</td><td style="width: 367px;">Nombre del conductor

</td><td style="width: 231px;">Cadena de texto

</td><td style="width: 231px;"></td></tr><tr><td style="width: 211px;">patente

</td><td style="width: 367px;">Patente del activo

</td><td style="width: 231px;">Cadena de texto

</td><td style="width: 231px;"></td></tr><tr><td style="width: 211px;">activo

</td><td style="width: 367px;">Nombre del activo

</td><td style="width: 231px;">Cadena de texto

</td><td style="width: 231px;"></td></tr></tbody></table>

</div></div></details>

# Obtener listado de marcas y modelos - getBrandsAndModels

##### <span class="api-method" data-method="POST">POST</span> https://api.service24gps.com/api/v1/getBrandsAndModels

Obtiene el listado completo de marcas y modelos de dispositivos disponibles en la plataforma.

<details class="mb-m" id="bkmrk-body-parametersparam"><summary class="text-muted">Ver parámetros de solicitud:</summary>

<div><table class="table" style="height: 269px;"><tbody><tr><td style="width: 188px;">**Parámetros**</td><td style="width: 320px;">**Descripción**</td><td style="width: 301px;"><span role="presentation" style="padding-right: 0.1px;">**<span role="presentation">Ejemplo</span>**</span></td></tr><tr style="height: 57px;"><td style="width: 188px; height: 57px;">apikey</td><td style="width: 320px; height: 57px;">Llave de autorización para uso de los Servicios Web.</td><td style="width: 301px; height: 57px;"><span role="presentation" style="padding-right: 0.1px; color: #3366ff;">25sdsd234234aa93sdsdsd37c70118e72</span></td></tr><tr style="height: 41px;"><td style="width: 188px; height: 41px;">token</td><td style="width: 320px; height: 41px;">Token devuelto por el método getToken.</td><td style="width: 301px; height: 41px;"><span style="color: #3366ff;">wfszR/oPIQKjt5HT5NgjDnZ2SAZQ==</span></td></tr></tbody></table>

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

```shell
curl --location --request POST 'https://api.service24gps.com/api/v1/getBrandsAndModels' \
--form 'apikey="25sdsd234234aa93sdsdsd37c70118e72"' \
--form 'token="wfszR/oPIQKjt5HT5NgjDnZ2SAZQ=="'
```

##### Respuesta de ejemplo:

```JSON
{
  
    "status": 200,
    "data": [
        {
            "id": "299",
            "marca": "Zenda",
            "modelos": [
                {
                    "id": "77",
                    "modelo": " ZD-VT2"
                },
                {
                    "id": "1006",
                    "modelo": "ZD-VT1"
                }
            ]
        },
        {
            "id": "150",
            "marca": "Yulongda technology limited",
            "modelos": [
                {
                    "id": "1474",
                    "modelo": "GT06H"
                },
                {
                    "id": "371",
                    "modelo": "YuLongDa GT06"
                }
            ]
        },
        {
            "id": "384",
            "marca": "Accurate Technology",
            "modelos": [
                {
                    "id": "1533",
                    "modelo": "TK100"
                }
            ]
        }
    ]
}
```

# Obtener alertas por día - getAlerts

##### <span class="api-method" data-method="POST">POST</span> https://api.service24gps.com/api/v1/getAlerts

Obtiene las alertas generadas en el rango de fechas indicado para un equipo específico, un grupo de Activos o todos los equipos asociados al usuario.

<details class="mb-m" id="bkmrk-body-parametersparam"><summary class="text-muted">Ver parámetros de solicitud:</summary>

<table class="table" style="height: 437.531px; width: 810px;" width="804"><tbody><tr style="height: 75.375px;"><th style="width: 109.219px; height: 75.375px;">Parámetros</th><th style="width: 396.844px; height: 75.375px;">Descripción</th><th style="width: 302.938px; height: 75.375px;">Ejemplo</th></tr><tr style="height: 58.5938px;"><td style="width: 109.219px; height: 58.5938px;">apikey</td><td style="width: 396.844px; height: 58.5938px;">**(Requerido)** Llave de autorización para uso de los Servicios Web.</td><td style="width: 302.938px; height: 58.5938px;"><span role="presentation" style="padding-right: 0.1px; color: #3366ff;">25sdsd234234aa93sdsdsd37c70118e72</span></td></tr><tr style="height: 47.3906px;"><td style="width: 109.219px; height: 47.3906px;">token</td><td style="width: 396.844px; height: 47.3906px;">**(Requerido)** Token devuelto por el método [**getToken**](https://docs.redgps.com/books/webservice/page/metodo-de-autenticacion-gettoken/es).</td><td style="width: 302.938px; height: 47.3906px;"><span style="color: #3366ff;">wfszR/oPIQKjt5HT5NgjDnZ2SAZQ==</span> </td></tr><tr style="height: 80.9844px;"><td style="width: 109.219px; height: 80.9844px;">idgrupo</td><td style="width: 396.844px; height: 80.9844px;">**(Opcional)** Identificador único del grupo de Activos. Este parámetro tiene prioridad sobre **equipo;** si se especifica, la consulta se realizará para los Activos pertenecientes al grupo indicado. Para obtener los identificadores disponibles, consulte el método **[getAssetGroups.](https://docs.redgps.com/books/webservice/page/listado-de-grupo-de-activos-getassetgroups/es)**   
  
**Nota:** Si se desea realizar la consulta únicamente para un equipo, este parámetro debe enviarse vacío.   
</td><td style="width: 302.938px; height: 80.9844px;"><span style="color: #3366ff;">45665</span></td></tr><tr style="height: 75.3906px;"><td style="width: 109.219px; height: 75.3906px;">equipo</td><td style="width: 396.844px; height: 75.3906px;">**(Requerido)** IMEI del equipo del cual se desean obtener las alertas. Este parámetro será considerado únicamente cuando **idgrupo** no se especifique.  
</td><td style="width: 302.938px; height: 75.3906px;"><div><div><span style="color: #3366ff;">354148072188807</span></div></div></td></tr><tr style="height: 58px;"><td style="width: 109.219px; height: 58px;">fecha\_inicio</td><td style="width: 396.844px; height: 58px;">**(Requerido)** Fecha de inicio del rango para la consulta de alertas.</td><td style="width: 302.938px; height: 58px;"><div><div><span style="color: #3366ff;">2026-08-01</span></div></div></td></tr><tr style="height: 41.7969px;"><td style="width: 109.219px; height: 41.7969px;">fecha\_fin</td><td style="width: 396.844px; height: 41.7969px;">**(Requerido)** Fecha de fin del rango para la consulta de alertas.</td><td style="width: 302.938px; height: 41.7969px;"><div><div><span style="color: #3366ff;">2026-08-14</span></div></div></td></tr></tbody></table>

</details><p class="callout info">Si los parámetros **idgrupo** y **equipo** se envían vacíos, la consulta devolverá las alertas de todos los Activos asociados al usuario.</p>

<p class="callout info">Si ambos campos de fecha se dejan vacíos, la consulta se realizará para el día actual.</p>

<p class="callout info">Solo es posible consultar rangos de hasta **14 días**.</p>

##### Solicitud de ejemplo:

```shell
curl --location 'https://api.service24gps.com/api/v1/getAlerts' \
--form 'apikey="25sdsd234234aa93sdsdsd37c70118e72"' \
--form 'token="wfszR/oPIQKjt5HT5NgjDnZ2SAZQ=="' \
--form 'idgrupo="45665"' \
--form 'equipo="354148072188807"' \
--form 'fecha_inicio="2026-08-01"' \
--form 'fecha_fin="2026-08-14"'
```

##### Respuesta de ejemplo:

```JSON
{
	"status": 200,
	"data": {
    	"Equipo": "354148072188807",
        "Fecha": "2026-08-10",
      	"Hora": "08:16:16",
      	"Descripcion": "Unidad   Gener&oacute; BOTON DE PANICO el 2022/02/24 08:16:16<br /><br>",
        "Latitud": "18.98043888996881",
        "Longitud": "-98.22312211997996",
        "Domicilio": "Boulevard Perif&eacute;rico Ecol&oacute;gico, Constituci&oacute;n Loma Bella, 72474 Puebla, Puebla",
        "StatusAlerta": "FUERA DE LA GEOCERCA",
      	"TipoAlerta": "Geocerca E/S"
    }
}
```

<details class="mb-m" id="bkmrk-ver-par%C3%A1metros%3A-par%C3%A1"><summary class="text-muted">Ver campos de respuesta:</summary>

<div><table class="table" id="bkmrk-campo-descripci%C3%B3n-fo" style="width: 1052px; height: 339px;"><tbody><tr style="height: 46px;"><th style="width: 174px; height: 46px;">Campo</th><th style="width: 392px; height: 46px;">Descripción

</th><th style="width: 243px; height: 46px;">Formato</th><th style="width: 243px;"> </th></tr><tr style="height: 41px;"><td style="width: 174px; height: 41px;">Equipo</td><td style="width: 392px; height: 41px;">Equipo asignado al vehículo que ejecutó la alerta.</td><td style="width: 243px; height: 41px;">Cadena de Texto</td><td style="width: 243px;"> </td></tr><tr style="height: 41px;"><td style="width: 174px; height: 41px;">Fecha</td><td style="width: 392px; height: 41px;">Fecha en la que la alerta se ejecutó.</td><td style="width: 243px; height: 41px;">DateTime</td><td style="width: 243px;"> </td></tr><tr style="height: 47px;"><td style="width: 174px; height: 47px;">Hora</td><td style="width: 392px; height: 47px;">Hora de la alerta (se maneja en formato de 24 hrs.)

</td><td style="width: 243px; height: 47px;">DateTime</td><td style="width: 243px;"> </td></tr><tr style="height: 47px;"><td style="width: 174px; height: 47px;">Descripción

</td><td style="width: 392px; height: 47px;">Texto descriptivo de la alerta.

</td><td style="width: 243px; height: 47px;">Cadena de Texto</td><td style="width: 243px;"> </td></tr><tr style="height: 35px;"><td style="height: 35px; width: 174px;">Latitud

</td><td style="height: 35px; width: 392px;">Latitud correspondiente al punto en que se originó la alerta.

</td><td style="height: 35px; width: 243px;">Cadena de Texto

</td><td style="width: 243px;"></td></tr><tr style="height: 35px;"><td style="height: 35px; width: 174px;">Longitud

</td><td style="height: 35px; width: 392px;">Longitud correspondiente al punto en que se originó  
la alerta.

</td><td style="height: 35px; width: 243px;">Cadena de Texto

</td><td style="width: 243px;"></td></tr><tr style="height: 47px;"><td style="width: 174px; height: 47px;">Domicilio

</td><td style="width: 392px; height: 47px;">Dirección correspondiente a la latitud y longitud  
reportada por el equipo.

</td><td style="width: 243px; height: 47px;">Cadena de Texto

</td><td style="width: 243px;"></td></tr><tr><td style="width: 174px;">StatusAlerta

</td><td style="width: 392px;">Nombre del estado del alerta, puede ser los siguientes:

- IGNICIÓN ON
- IGNICIÓN OFF
- DENTRO DE LA GEOCERCA
- FUERA DE LA GEOCERCA
- TEMPERATURA LIMITE INFERIOR
- TEMPERATURA LIMITE SUPERIOR

</td><td style="width: 243px;">Cadena de Texto

</td><td style="width: 243px;"></td></tr><tr><td style="width: 174px;">TipoAlerta

</td><td style="width: 392px;">Nombre del tipo de alerta que se generó.

</td><td style="width: 243px;">Cadena de Texto

</td><td style="width: 243px;"></td></tr></tbody></table>

</div></details>

# Lista de eventos - getEventTypes

##### <span class="api-method" data-method="POST">POST</span> https://api.service24gps.com/api/v1/getEventTypes

Obtiene el listado de todos los eventos disponibles en la plataforma.

<details class="mb-m" id="bkmrk-body-parametersparam"><summary class="text-muted">Ver parámetros de solicitud:</summary>

<div><table class="table" style="height: 257px; width: 829px;" width="804"><tbody><tr style="height: 42px;"><th style="width: 104px; height: 42px;">Parámetros</th><th style="width: 340px; height: 42px;">Descripción</th><th style="width: 100px; height: 42px;">Longitud</th><th style="width: 285px; height: 42px;">Ejemplo</th></tr><tr style="height: 58px;"><td style="width: 104px; height: 58px;">apikey</td><td style="width: 340px; height: 58px;">Llave de autorización para uso de los Servicios Web.</td><td style="width: 100px; height: 58px;"><span style="color: #3366ff;">50</span></td><td style="width: 285px; height: 58px;"><span role="presentation" style="padding-right: 0.1px; color: #3366ff;">25sdsd234234aa93sdsdsd37c70118e72</span></td></tr><tr style="height: 41px;"><td style="width: 104px; height: 41px;">token</td><td style="width: 340px; height: 41px;">Token devuelto por el método getToken.</td><td style="width: 100px; height: 41px;"><span style="color: #3366ff;">500</span></td><td style="width: 285px; height: 41px;"><span style="color: #3366ff;">wfszR/oPIQKjt5HT5NgjDnZ2SAZQ==</span> </td></tr></tbody></table>

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

```shell
curl --location --request POST 'https://api.service24gps.com/api/v1/getEventTypes' \
--header 'Cookie: PHPSESSID=0ab8djc97ouk13tev2t9epf1l2' \
--form 'apikey="25sdsd234234aa93sdsdsd37c70118e72"' \
--form 'token="wfszR/oPIQKjt5HT5NgjDnZ2SAZQ=="'
```

##### Respuesta de ejemplo:

```JSON
{
    "status": 200,
    "data": {
        "1": "Ubicación",
        "2": "Botón SigMen",
        "3": "Activo Detenido",
        "4": "Botón de Pánico ON",
        "5": "Puerta Conductor",
		...
    }
}
```

<details class="mb-m" id="bkmrk-ver-par%C3%A1metros%3A-par%C3%A1"><summary class="text-muted">Ver campos de respuesta:</summary>

<div><table class="table" id="bkmrk-campo-descripci%C3%B3n-fo" style="width: 809px; height: 558px;"><tbody><tr style="height: 47px;"><th style="width: 174px; height: 47px;">Campo</th><th style="width: 392px; height: 47px;">Descripción

</th><th style="width: 243px; height: 47px;">Formato</th></tr><tr style="height: 41px;"><td style="width: 174px; height: 41px;">id</td><td style="width: 392px;" width="351">Identificador único del evento en el sistema.

</td><td style="width: 243px; height: 41px;">Entero</td></tr><tr><td style="width: 174px;">nombre</td><td style="width: 392px;">Nombre del evento

</td><td style="width: 243px;">Texto</td></tr></tbody></table>

</div></details>

# Lista de sensores - GetSensors

##### <span class="api-method" data-method="POST">POST</span> https://api.service24gps.com/api/v1/getSensors

Obtiene el listado de todos los sensores disponibles en la plataforma.

<details class="mb-m" id="bkmrk-body-parametersparam"><summary class="text-muted">Ver parámetros de solicitud:</summary>

<div><table class="table" style="height: 257px; width: 829px;" width="804"><tbody><tr style="height: 42px;"><th style="width: 104px; height: 42px;">Parámetros</th><th style="width: 340px; height: 42px;">Descripción</th><th style="width: 100px; height: 42px;">Longitud</th><th style="width: 285px; height: 42px;">Ejemplo</th></tr><tr style="height: 58px;"><td style="width: 104px; height: 58px;">apikey</td><td style="width: 340px; height: 58px;">Llave de autorización para uso de los Servicios Web.</td><td style="width: 100px; height: 58px;"><span style="color: #3366ff;">50</span></td><td style="width: 285px; height: 58px;"><span role="presentation" style="padding-right: 0.1px; color: #3366ff;">25sdsd234234aa93sdsdsd37c70118e72</span></td></tr><tr style="height: 41px;"><td style="width: 104px; height: 41px;">token</td><td style="width: 340px; height: 41px;">Token devuelto por el método **[getToken](https://docs.redgps.com/books/webservice/page/metodo-de-autenticacion-gettoken-7ef)**.</td><td style="width: 100px; height: 41px;"><span style="color: #3366ff;">500</span></td><td style="width: 285px; height: 41px;"><span style="color: #3366ff;">wfszR/oPIQKjt5HT5NgjDnZ2SAZQ==</span> </td></tr></tbody></table>

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

```shell
curl --location --request POST 'https://api.service24gps.com/api/v1/getSensors' \
--header 'Cookie: PHPSESSID=0ab8djc97ouk13tev2t9epf1l2' \
--form 'apikey="25sdsd234234aa93sdsdsd37c70118e72"' \
--form 'token="wfszR/oPIQKjt5HT5NgjDnZ2SAZQ=="'
```

##### Respuesta de ejemplo:

```JSON
{
    "status": 200,
    "data": {
        "1": "Ignición ON / OFF",
        "2": "Desconexión de Batería Principal",
        "3": "Botón de Pánico",
        "4": "Corte Remoto de Combustible",
        "5": "Apertura / Cierre de puertas",
        ...
    }
}
```

<details class="mb-m" id="bkmrk-ver-par%C3%A1metros%3A-par%C3%A1" open="open"><summary class="text-muted">Ver campos de respuesta:</summary>

<div><table class="table" id="bkmrk-campo-descripci%C3%B3n-fo" style="width: 809px; height: 558px;"><tbody><tr style="height: 47px;"><th style="width: 174px; height: 47px;">Campo</th><th style="width: 392px; height: 47px;">Descripción

</th><th style="width: 243px; height: 47px;">Formato</th></tr><tr style="height: 41px;"><td style="width: 174px; height: 41px;">id</td><td style="width: 392px;" width="351">Identificador único del sensor.

</td><td style="width: 243px; height: 41px;">Entero</td></tr><tr><td style="width: 174px;">nombre</td><td style="width: 392px;">Nombre del sensor

</td><td style="width: 243px;">Texto</td></tr></tbody></table>

</div></details>