# Actualizar ruta - updateRoute

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

Permite actualizar la definición o puntos que conforman una ruta.

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

<div><table class="table" style="width: 809px; height: 946px;"><tbody><tr style="height: 41px;"><th style="width: 146px; height: 41px;">Parámetros</th><th style="width: 370px; height: 41px;">Descripción</th><th style="width: 293px; height: 41px;">Ejemplo</th></tr><tr style="height: 41px;"><td style="width: 146px; height: 41px;">apikey</td><td style="width: 370px; height: 41px;">Llave de autorización para uso de los Servicios Web.</td><td style="width: 293px; height: 41px;"><span role="presentation" style="padding-right: 0.1px; color: #3366ff;">25sdsd234234aa93sdsdsd37c70118e72</span></td></tr><tr style="height: 41px;"><td style="width: 146px; height: 41px;">token</td><td style="width: 370px; height: 41px;">Token devuelto por el método getToken.</td><td style="width: 293px; height: 41px;"><span role="presentation" style="padding-right: 0.1px; color: #3366ff;">wfszR/oPIQKjt5HT5NgjDnZ2SAZQ==</span></td></tr><tr style="height: 47px;"><td style="width: 146px; height: 47px;">id</td><td style="width: 370px; height: 47px;">Identificador único de la ruta en el sistema.

</td><td style="width: 293px; height: 47px;"><span role="presentation" style="padding-right: 0.1px;"><span style="color: #3366ff;"> 1382123</span></span></td></tr><tr style="height: 69px;"><td style="width: 146px; height: 69px;">nombre</td><td style="width: 370px; height: 69px;">Nombre con el que se identificará la ruta dentro de la plataforma.

</td><td style="width: 293px; height: 69px;"><span role="presentation" style="padding-right: 0.1px;"><span style="color: #3366ff;">Prueba nombre ruta</span></span></td></tr><tr style="height: 338px;"><td style="width: 146px; height: 338px;">definición

</td><td style="width: 370px; height: 338px;">Definición de puntos, geocercas lineales, distancia, etc.

</td><td style="width: 293px; height: 338px;"><span style="color: #3366ff;">{</span>

<span style="color: #3366ff;"> "distancia":80,</span>  
<span style="color: #3366ff;"> "lugares":</span><span style="color: #3366ff;">\[</span>

<span style="color: #3366ff;"> {</span>  
<span style="color: #3366ff;"> "id":"36589",</span>  
<span style="color: #3366ff;"> "tipo":1,</span>  
<span style="color: #3366ff;"> "orden":"1",</span>  
<span style="color: #3366ff;"> "nombre":"Departamento 1",</span>  
<span style="color: #3366ff;"> "dist\_pa":0,</span>  
<span style="color: #3366ff;"> "latLng":"18.900479,-98.435602",</span>  
<span style="color: #3366ff;"> "fEstimada":"",</span>  
<span style="color: #3366ff;"> "tolerancia":0,</span>  
<span style="color: #3366ff;"> "timeBetween":0,</span>  
<span style="color: #3366ff;"> "distLleg":0,</span>  
<span style="color: #3366ff;"> "orientacion":""</span>  
<span style="color: #3366ff;"> } \],</span>  
<span style="color: #3366ff;"> "waypoints":\[  
 \],</span>  
<span style="color: #3366ff;"> "puntos":\[  
 \],</span>  
<span style="color: #3366ff;"> "rutas":\[</span>  
<span style="color: #3366ff;"> \],</span>  
<span style="color: #3366ff;"> "sinoGarmin":0,</span>  
<span style="color: #3366ff;"> "useRoutePlaces":0</span>

<span style="color: #3366ff;">}</span>

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

</div></details><span style="color: #ff0000;">**Nota:** <span style="color: #ff0000;">La **definición** debe tener el mismo formato que el utilizado en el método </span> **createRoute**<span style="color: #ff0000;">.</span></span>

##### Solicitud de ejemplo:

```shell
curl --location --request POST 'https://api.service24gps.com/api/v1/updateRoute' \
--form 'apikey="25sdsd234234aa93sdsdsd37c70118e72"' \
--form 'token="wfszR/oPIQKjt5HT5NgjDnZ2SAZQ=="' \
--form 'id="1382123"' \
--form 'nombre="Prueba nombre ruta"' \
--form 'definicion="{"distancia":80,"lugares":[{"id":"36589","tipo":1,"orden":"1","nombre":"Departamento 1","dist_pa":0,"latLng":"18.900479,-98.435602","fEstimada":"","tolerancia":0,"timeBetween":0,"distLleg":0,"orientacion":""}],"waypoints":{},"puntos":{},"rutas":[],"sinoGarmin":0,"useRoutePlaces":0}"'

```

##### Respuesta de ejemplo:

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