# Crear Activo  - createAsset

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

Crea un activo.

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

<div><table class="table" style="height: 717px; width: 822px;"><tbody><tr style="height: 41px;"><td style="width: 233.281px; height: 41px;">**Parámetros**</td><td style="width: 305.375px; height: 41px;">**Descripción**</td><td style="width: 270.344px; height: 41px;"><span style="color: #000000;">**<span role="presentation" style="padding-right: 0.1px;">Ejemplo</span>**</span></td></tr><tr style="height: 57px;"><td style="width: 233.281px; height: 57px;">apikey</td><td style="width: 305.375px; height: 57px;">**(Requerido)** Llave de autorización para uso de los Servicios Web.</td><td style="width: 270.344px; height: 57px;"><span role="presentation" style="padding-right: 0.1px; color: #3366ff;">25sdsd234234aa93sdsdsd37c70118e7</span></td></tr><tr style="height: 41px;"><td style="width: 233.281px; height: 41px;">token</td><td style="width: 305.375px; height: 41px;">**(Requerido)** Token devuelto por el método getToken.</td><td style="width: 270.344px; height: 41px;"><span style="color: #3366ff;">wfszR/oPIQKjt5HT5NgjDnZ2SAZQ==</span></td></tr><tr style="height: 41px;"><td style="width: 233.281px; height: 41px;"><div><div><div><div>nombre</div></div></div></div></td><td style="width: 305.375px; height: 41px;">**(Requerido)** Nombre que va tener el activo.</td><td style="width: 270.344px; height: 41px;"><span style="color: #3366ff;">Test nombre</span></td></tr><tr style="height: 80px;"><td style="width: 233.281px; height: 80px;">tipo\_vehiculo</td><td style="width: 305.375px; height: 80px;">**(Requerido)** Identificador único del tipo del activo.  
- Obtener los tipos en el método **[getVehiclesType](https://docs.redgps.com/books/webservice/page/obtiene-el-listado-tipo-de-vehiculos-getvehiclestype)[.](https://docs.redgps.com/books/webservice/page/obtiene-el-listado-tipo-de-vehiculos-getvehicletype)**</td><td style="width: 270.344px; height: 80px;"><span style="color: #3366ff;">1</span></td></tr><tr style="height: 41px;"><td style="width: 233.281px; height: 41px;">marca</td><td style="width: 305.375px; height: 41px;">**(Opcional)** Identificador único de marca del activo.  
- Obtener los tipos en el método **[getVehiclesBrands](https://docs.redgps.com/books/webservice/page/obtiene-el-listado-marcas-de-activos-getvehiclesbrands)**[**.**](https://docs.redgps.com/books/webservice/page/obtiene-el-listado-marcas-de-activos-getbrandtype)</td><td style="width: 270.344px; height: 41px;"><span style="color: #3366ff;">1</span></td></tr><tr style="height: 41px;"><td style="width: 233.281px; height: 41px;">modelo</td><td style="width: 305.375px; height: 41px;">**(Requerido)** Modelo del activo.</td><td style="width: 270.344px; height: 41px;"><span style="color: #3366ff;">Mazda</span></td></tr><tr style="height: 47px;"><td style="width: 233.281px; height: 47px;">anio</td><td style="width: 305.375px; height: 47px;">**(Opcional)** Año del activo.

</td><td style="width: 270.344px; height: 47px;"><span style="color: #3366ff;">2017</span></td></tr><tr style="height: 41px;"><td style="width: 233.281px; height: 41px;">patente</td><td style="width: 305.375px; height: 41px;">**(Opcional)** Patente del activo.</td><td style="width: 270.344px; height: 41px;"><span style="color: #3366ff;">test123</span></td></tr><tr style="height: 41px;"><td style="width: 233.281px; height: 41px;">idcliente</td><td style="width: 305.375px; height: 41px;">**(Opcional)** Identificador único del cliente.</td><td style="width: 270.344px; height: 41px;"><span style="color: #3366ff;">11</span></td></tr><tr style="height: 41px;"><td style="width: 233.281px; height: 41px;">equipo\_gps</td><td style="width: 305.375px; height: 41px;">**(Requerido)** Equipo GPS del activo.</td><td style="width: 270.344px; height: 41px;"><span style="color: #3366ff;">123456789</span></td></tr><tr style="height: 41px;"><td style="width: 233.281px; height: 41px;">color</td><td style="width: 305.375px; height: 41px;">**(Opcional)** Color del activo.</td><td style="width: 270.344px; height: 41px;"><span style="color: #3366ff;">Negro</span></td></tr><tr style="height: 41px;"><td style="width: 233.281px; height: 41px;">numero\_serie</td><td style="width: 305.375px; height: 41px;">**(Opcional)** Número de serie del activo.</td><td style="width: 270.344px; height: 41px;"><span style="color: #3366ff;">55500056544</span></td></tr><tr style="height: 41px;"><td style="width: 233.281px; height: 41px;">numero\_motor</td><td style="width: 305.375px; height: 41px;">**(Opcional)** Número de motor del activo.</td><td style="width: 270.344px; height: 41px;"><span style="color: #3366ff;">M211</span></td></tr><tr style="height: 41px;"><td style="width: 233.281px; height: 41px;">numero\_economico</td><td style="width: 305.375px; height: 41px;">**(Opcional)** Número económico del activo.</td><td style="width: 270.344px; height: 41px;"><span style="color: #3366ff;">0227</span></td></tr><tr style="height: 41px;"><td style="width: 233.281px; height: 41px;">rendimiento\_combustible</td><td style="width: 305.375px; height: 41px;">**(Opcional)** Rendimiento del combustible.</td><td style="width: 270.344px; height: 41px;"><span style="color: #3366ff;">0</span></td></tr></tbody></table>

</div></details>##### Solicitud de ejemplo crear un activo:

```shell
curl --location --request POST 'https://api.service24gps.com/api/v1/createAsset' \
--form 'apikey="25sdsd234234aa93sdsdsd37c70118e72"' \
--form 'token="wfszR/oPIQKjt5HT5NgjDnZ2SAZQ=="' \
--form 'nombre="Test nombre"' \
--form 'tipo_vehiculo="1"' \
--form 'marca="1"' \
--form 'modelo="Mazda"' \
--form 'anio="2017"' \
--form 'patente="test123"' \
--form 'idcliente="11"' \
--form 'equipo_gps="123456789"' \
--form 'color="Negro"' \
--form 'numero_serie="55500056544"' \
--form 'numero_motor="M211"' \
--form 'numero_economico="0227"' \
--form 'rendimiento_combustible="0"'
```

##### Respuesta de ejemplo:

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

<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: 94px;"><tbody><tr><td style="width: 174px;">**Campo**</td><td style="width: 392px;">**Descripción**

</td><td style="width: 243px;">**Formato**</td></tr><tr style="height: 47px;"><td style="width: 174px; height: 47px;">id</td><td style="width: 392px; height: 47px;">Identificador único del activo.

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

</div></details>