# getDashboardData(JSON dataDash)

Al invocar este método, se obtienen toda la información que se va a mostrar en el dashboard en formato JSON.

<div id="bkmrk-los-atributos%C2%A0-reque">Los atributos requeridos en el Json son que se recibe como parámetro son: - **current\_date\_ini:** Fecha de Inicio de rango para obtener los datos en formato AAAA-MM-DD
- **current\_date\_fin:** Fecha de Fin de rango para obtener los datos en formato AAAA-MM-DD

</div>##### Ejemplo de JSON:

```JavaScript
let dataDash = {
	 'current_date_ini':'2021-01-11',
  	 'current_date_fin':'2021-01-18',
}
```

<div id="bkmrk-ejemplo-de-solicitud"><span style="color: #bbbbbb; font-size: 1.4em; font-weight: 400;">Ejemplo de solicitud en JS:</span></div>```JavaScript
try {
      const dash  = await _gpsApiv2.getDashboardData(dataDash); 
 	} catch (error) {
	  console.error(error);
	}
```

<details class="mb-m" id="bkmrk-body-parametersparam"><summary class="text-muted">A continuación se describen los atributos que se reciben como respuesta de la solicitud en JSON:</summary>

<div></div><div><table class="table" style="height: 2149px; width: 621px;" width="811"><tbody><tr style="height: 41px;"><th style="width: 320px; height: 41px;">Atributos</th><th style="width: 301px; height: 41px;">Definición </th></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**clients**</td><td style="width: 301px; height: 41px;">Arreglo con los distintos estatus de los clientes</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**deliveries**</td><td style="width: 301px; height: 41px;">Arreglo con los distintos estatus de los repartidores

</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**in\_route**</td><td style="width: 301px; height: 41px;">Arreglo con los distintos estatus de los pedidos en ruta</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**orders**</td><td style="width: 301px; height: 41px;">Arreglo con información de las ordenes</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**vehicles**</td><td style="width: 301px; height: 41px;">Arreglo con los vehículos asignados</td></tr><tr style="height: 58px;"><td style="width: 320px; height: 58px;">**status**</td><td style="width: 301px; height: 58px;">Nombre del estatus en el que se encuentra el elemento</td></tr><tr style="height: 41px;"><td style="width: 320px; height: 41px;">**total**</td><td style="width: 301px; height: 41px;">Total de elementos en cada sección</td></tr></tbody></table>

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

```JSON
{
	 status:'200'
	 data: {
		 clients:[
			 0:{
				 status:'Con Pedido'
				 total:'0'
			 },
			 1:{
				 status:'Sin Pedido'
				 total:'20'
			 },
			 2:{
				 status:'Total'
				 total:'20'
			 },
		 ]
		 deliveries:[
		 ]
		 in_route:[
		 ]
		 orders:[
		 ]
		 vehicles:[
			 0:{
				 status:'Con Entregas'
				 total:'0'
			 },
			 1:{
				 status:'Sin Entregas'
				 total:'29'
			 },
			 2:{
				 status:'Total'
				 total:'29'
			 },
		 ]
	 }
}

```