# Crea o actualiza una tarjeta sim (chip telefónico) - setSim

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

Crea o actualiza una tarjeta sim. \* Campos requeridos.

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

<div><table class="table" style="height: 443px;"><tbody><tr><td style="width: 188px;"><span style="color: #000000;">**Parámetros**</span></td><td style="width: 314px;"><span style="color: #000000;">**Descripción**</span></td><td style="width: 307px;"><span style="color: #000000;">**<span role="presentation" style="padding-right: 0.1px;">Ejemplo</span>**</span></td></tr><tr style="height: 57px;"><td style="width: 188px; height: 57px;">apikey</td><td style="width: 314px; height: 57px;">Llave de autorización para uso de los Servicios Web.</td><td style="width: 307px; 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: 314px; height: 41px;">Token devuelto por el método getToken.</td><td style="width: 307px; height: 41px;"><span style="color: #3366ff;">wfszR/oPIQKjt5HT5NgjDnZ2SAZQ==</span></td></tr><tr style="height: 58px;"><td style="width: 188px; height: 58px;">idsim</td><td style="width: 314px; height: 58px;">Identificador único de la tarjeta sim.

**Sólo cuando se va actualizar.**

</td><td style="width: 307px; height: 58px;"><span style="color: #3366ff;">11</span></td></tr><tr style="height: 41px;"><td style="width: 188px; height: 41px;"><div><div><div><div>nombre</div></div></div></div></td><td style="width: 314px; height: 41px;">Nombre que va tener la tarjeta sim \*</td><td style="width: 307px; height: 41px;"><span style="color: #3366ff;">Sim 01</span></td></tr><tr style="height: 41px;"><td style="width: 188px; height: 41px;">nro\_tel</td><td style="width: 314px; height: 41px;">Número telefónico de la tarjeta sim \*</td><td style="width: 307px; height: 41px;"><span style="color: #3366ff;">2224567810</span></td></tr><tr style="height: 41px;"><td style="width: 188px; height: 41px;">nro\_nip</td><td style="width: 314px; height: 41px;">NIP de la tarjeta sim \*</td><td style="width: 307px; height: 41px;"><span style="color: #3366ff;">1120</span></td></tr><tr style="height: 41px;"><td style="width: 188px; height: 41px;"><div><div>id_compania</div></div></td><td style="width: 314px; height: 41px;">Identificado único de la compania (Se obtiene del endpoint: **getCompaniasCelular**)</td><td style="width: 307px; height: 41px;"><span style="color: #3366ff;">2</span></td></tr><tr style="height: 41px;"><td style="width: 188px; height: 41px;"><div><div>es_prepago</div></div></td><td style="width: 314px; height: 41px;">Bandera, para establecer si es prepago o no.

1 = Prepago

2 = No prepago

</td><td style="width: 307px; height: 41px;"><span style="color: #3366ff;">1</span></td></tr><tr style="height: 41px;"><td style="width: 188px; height: 41px;"><div><div>notas</div></div></td><td style="width: 314px; height: 41px;">Descripción o información extra de las notas</td><td style="width: 307px; height: 41px;"><span style="color: #3366ff;">Esta es mi sim 01</span></td></tr><tr style="height: 41px;"><td style="width: 188px; height: 41px;"><div><div>mb_plan</div></div></td><td style="width: 314px; height: 41px;">Cantidad de megabytes en el plan</td><td style="width: 307px; height: 41px;"><span style="color: #3366ff;">10</span></td></tr></tbody></table>

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

```shell
curl --location --request POST 'https://api.service24gps.com/api/v1/setSim' \
--header 'Cookie: PHPSESSID=0ab8djc97ouk13tev2t9epf1l2' \
--form 'apikey="25sdsd234234aa93sdsdsd37c70118e72"' \
--form 'token="wfszR/oPIQKjt5HT5NgjDnZ2SAZQ=="' \
--form 'nombre="Sim 01"' \
--form 'nro_tel="2224567810"' \
--form 'nro_nip="1120"'
```

##### Respuesta de ejemplo:

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

<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 de la tarjeta sim

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

</div></details>