# Actualizar ruta programada OnBus - updateRouteOnBus

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

Actualiza la información de salida de una ruta para el sistema OnBus.

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

<div><table class="table" style="height: 877px;"><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; color: #000000;">Ejemplo</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><tr style="height: 69px;"><td style="width: 188px; height: 69px;">id

</td><td style="width: 320px; height: 69px;">Identificador único de la ruta programada en el sistema.

</td><td style="width: 301px; height: 69px;"><div><div><span style="color: #3366ff;">2080129</span></div></div></td></tr><tr style="height: 47px;"><td style="width: 188px; height: 47px;">nombre

</td><td style="width: 320px; height: 47px;">Nombre asignado a la ruta programada

</td><td style="width: 301px; height: 47px;"><span style="color: #3366ff;">OnBus APII </span></td></tr><tr style="height: 249px;"><td style="width: 188px; height: 249px;">definicion

</td><td style="width: 320px; height: 249px;">Definición de los puntos

</td><td style="width: 301px; height: 249px;"><span style="color: #3366ff;">{</span>  
<span style="color: #3366ff;"> "distancia":"80",</span>  
<span style="color: #3366ff;"> "frecuenciaSalida":"10",</span>  
<span style="color: #3366ff;"> "lugares":\[</span>  
<span style="color: #3366ff;"> {</span>  
<span style="color: #3366ff;"> "id":"11789",</span>  
<span style="color: #3366ff;"> "tipo":"2",</span>  
<span style="color: #3366ff;"> "orden":"1",</span>  
<span style="color: #3366ff;"> "nombre":"TERMINAL BOGOTA",</span>  
<span style="color: #3366ff;"> "dist\_pa":"0",</span>  
<span style="color: #3366ff;"> "latLng":"4.611841,-74.17858",</span>  
<span style="color: #3366ff;"> "fEstimada":"",</span>  
<span style="color: #3366ff;"> "timeBetween":"0",</span>  
<span style="color: #3366ff;"> "distLleg":"500",</span>  
<span style="color: #3366ff;"> "orientacion":"",</span>  
<span style="color: #3366ff;"> "salidaEstimada":"2018-05-05 18:01:18"</span>  
<span style="color: #3366ff;"> }</span>  
<span style="color: #3366ff;">\],</span>  
<span style="color: #3366ff;">"conductor1":\[</span>  
<span style="color: #3366ff;"> {</span>  
<span style="color: #3366ff;"> "id":2300,</span>  
<span style="color: #3366ff;"> "codigo":"KS8374",</span>  
<span style="color: #3366ff;"> "nombre":"Karla Segovia"</span>  
<span style="color: #3366ff;"> }</span>  
<span style="color: #3366ff;">\],</span>  
<span style="color: #3366ff;">"conductor2":\[</span>  
<span style="color: #3366ff;"> {</span>  
<span style="color: #3366ff;"> "id":2297,</span>  
<span style="color: #3366ff;"> "codigo":"CM5732",</span>  
<span style="color: #3366ff;"> "nombre":"Luis Morales"</span>  
<span style="color: #3366ff;"> }</span>  
<span style="color: #3366ff;">\],</span>  
<span style="color: #3366ff;">"creado":"2021-05-05 18:01:18"</span>  
<span style="color: #3366ff;">}</span></td></tr></tbody></table>

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

```shell
curl --location --request POST 'https://api.service24gps.com/api/v1/updateRouteOnBus' \
--header 'Cookie: PHPSESSID=0ab8djc97ouk13tev2t9epf1l2' \
--form 'apikey="f77c31ce81907cc5f0ecffeda60fb4f6"' \
--form 'token="SJx5eXC7PtRJwHcSY8O8DYbTUZGQCSkTRD9VvriKevvpsCpxC49cJQ=="' \
--form 'id="2080129"' \
--form 'nombre="Prueba update OnBusAPII 1"' \
--form 'definicion="{\"distancia\":\"80\",\"frecuenciaSalida\":\"10\",\"lugares\":[{\"id\":\"11789\",\"tipo\":\"2\",\"orden\":\"1\",\"nombre\":\"TERMINAL BOGOTA\",\"dist_pa\":\"0\",\"latLng\":\"4.653657365711841,-74.1157141327858\",\"fEstimada\":\"\",\"timeBetween\":\"0\",\"distLleg\":\"500\",\"orientacion\":\"\",\"salidaEstimada\":\"2018-05-17 18:01:18\"}],\"conductor1\":[{\"id\":2300,\"codigo\":\"KS8374\",\"nombre\":\"Karla Segovia\"}],\"conductor2\":[{\"id\":2297,\"codigo\":\"CM5732\",\"nombre\":\"Luis Morales\"}],\"creado\":\"2021-05-17 18:01:18\"}"'
```

##### Respuesta de ejemplo:

```JSON
{
    "status": 200,
    "data": {
        "id": "2080129"
    }
}
```