# Get Data Mikrowisp

<figure><img src="https://imgr.whimsical.com/object/V5BivNat9tp77KRNdDAon" alt=""><figcaption></figcaption></figure>

## Detalle del API

<mark style="color:green;">`POST`</mark> <https://interredes.suricata-mikrowisp.com.ar/api/ws2?token={token}&{tipo}={id}>

\<Description of the endpoint>

**Headers**

| Name         | Value              |
| ------------ | ------------------ |
| Content-Type | `application/json` |

**Body**

| Name    | Type   | Description                       |
| ------- | ------ | --------------------------------- |
| `Token` | string | Token de usuario                  |
| `Tipo`  | string | <p>D= Documento<br>C= Cliente</p> |
| Id      | number | numero de cliente o documento     |

## Get por Numero de cliente (C)

Se realiza el llamado del get al usuario unico y devuelve la información.

```json
// 20241219103922
// https://interredes.suricata-mikrowisp.com.ar/api/ws2?token=015098523054a11ac7188db523e9da77&c=3196

{
  "status": "exito",
  "usuario": {
    "codigo": "2Ar2lsie5DI2EkB",
    "estadogeneral": "ACTIVO",
    "direcionservicio": "Calle Torino 583 Oeste J5425 Villa Krause",
    "perfil": "Plan G 7 MB",
    "cbu": "",
    "alias": "",
    "client_id": 3196,
    "national_id": "33500355609",
    "tax_id": "",
    "tax_type": "",
    "first_name": "Imp. Internac. de Valores SAIC (002300)",
    "last_name": "Imp. Internac. de Valores SAIC (002300)",
    "full_name": "Imp. Internac. de Valores SAIC (002300)",
    "client_country": "mex",
    "client_state": "",
    "client_city": "",
    "client_address": "Casino Chimbas Benavidez antes de salta ",
    "phone": "",
    "phone_mobile": "2645012947",
    "email": "mrosello@hoteldelbono.com.ar / mbarrera@hoteldelbono.com.ar"
  },
  "cuenta": {
    "0": {
      "qty": 1
    },
    "a_status": "",
    "total_debt": "92360.00",
    "due_debt": "",
    "nodue_debt": "",
    "due_date1": "",
    "due_date2": "",
    "payments_url": "",
    "payments_url_method": "",
    "payments_url_link": "",
    "invoices_qty": 4,
    "invoices": ""
  },
  "servicio": {
    "Routers": {
      "estado": "exito",
      "routers": [
        {
          "id": 94,
          "nombre": "Nodo Villa Krause",
          "ip": "200.114.101.38",
          "coordenadas": "",
          "version": "6.48.1 (stable)",
          "estado": "CONECTADO",
          "modelo": "RB3011UiAS",
          "serial": "B88F0B6C388C"
        }
      ]
    },
    "address": "E0:63:DA:94:42:6F",
    "ip": "172.30.54.120",
    "webpass": "",
    "webpassc": "",
    "lat": "-31.537899, -68.525718",
    "lng": "-31.537899, -68.525718",
    "node": 94,
    "access_point": "",
    "s_status": "ONLINE",
    "extra_info": "internet",
    "open_ticket_qty_suricata": "",
    "open_ticket_qty_erp": ""
  }
}
```

## Get Por Documento (D)

### Documento con 1 Cliente

```json
// 20241219103324
// https://interredes.suricata-mikrowisp.com.ar/api/ws2?token=015098523054a11ac7188db523e9da77&d=12408207

{
  "status": "exito",
  "usuario": {
    "codigo": "y1k4br",
    "estadogeneral": "SUSPENDIDO",
    "direcionservicio": "Lote hogar número 9 C19 Mza D ; -31.4896867883387, -68.52014864127477",
    "perfil": "Plan G 7 MB",
    "cbu": "",
    "alias": "",
    "client_id": 47050,
    "national_id": "12408207",
    "tax_id": "",
    "tax_type": "",
    "first_name": "Chavez Ramona ",
    "last_name": "Chavez Ramona ",
    "full_name": "Chavez Ramona ",
    "client_country": "mex",
    "client_state": "",
    "client_city": "",
    "client_address": "Lote hogar número 9 C19 Mza D ; -31.4896867883387, -68.52014864127477",
    "phone": "2645532855",
    "phone_mobile": "2643217196",
    "email": "bautistachavez9876@gmail.com"
  },
  "cuenta": {
    "0": {
      "qty": 1
    },
    "a_status": "",
    "total_debt": "6600.00",
    "due_debt": "",
    "nodue_debt": "",
    "due_date1": "",
    "due_date2": "",
    "payments_url": "",
    "payments_url_method": "",
    "payments_url_link": "",
    "invoices_qty": 2,
    "invoices": ""
  },
  "servicio": {
    "Routers": {
      "estado": "exito",
      "routers": [
        {
          "id": 81,
          "nombre": "Nodo 1 de Noviembre",
          "ip": "200.114.101.51",
          "coordenadas": "",
          "version": "6.45.3 (stable)",
          "estado": "CONECTADO",
          "modelo": "RB4011iGS+",
          "serial": "B8FE0B44BAE8"
        }
      ]
    },
    "address": "B4:FB:E4:0E:AF:54",
    "ip": "172.30.44.220",
    "webpass": "",
    "webpassc": "",
    "lat": "-31.4896867883387, -68.52014864127477",
    "lng": "-31.4896867883387, -68.52014864127477",
    "node": 81,
    "access_point": "",
    "s_status": "OFFLINE",
    "extra_info": "internet",
    "open_ticket_qty_suricata": "",
    "open_ticket_qty_erp": ""
  }
}
```

### Documento con más de 1 Cliente

```json
// 20241219103856
// https://interredes.suricata-mikrowisp.com.ar/api/ws2?token=015098523054a11ac7188db523e9da77&d=33500355609

{
  "clientes": 2,
  "total_servicios": 10,
  "detalles_clientes": [
    {
      "id_cliente": 3186,
      "direccion_principal": "Libertador del Av 6570 Piso:11 1428-Ciudad d Bs As",
      "servicios_direccion": [
        "Libertador del Av 6570 Piso:11 1428-Ciudad d Bs As"
      ],
      "cantidad_servicios": 1
    },
    {
      "id_cliente": 3196,
      "direccion_principal": "Casino Chimbas Benavidez antes de salta",
      "servicios_direccion": [
        "Libertador del Av 6570 Piso:11 1428-Ciudad d Bs As",
        "Casino Chimbas; -31.510946, -68.538999",
        "Casino Central",
        "Casino Gral.Acha",
        "Calle laprida",
        "Calle Mendoza",
        "Mendoza y Mitre",
        "Casino Caucete",
        "Calle Torino 583 Oeste J5425 Villa Krause"
      ],
      "cantidad_servicios": 9
    }
  ]
}
```

### Documento cno más de 10 Clientes

Devuelve lo mismo que un get con multiples clientes. \
Pero se creará ticket con TOPIC especial al primer o principal usuario por ser cliente corporativo.
