<a id="2c7f66a3c3314c02bcb7e0adb571fd70"></a><a id="2c7f66a3-c331-4c02-bcb7-e0adb571fd70"></a>

You can import PADMA control indices into your systems.

> The control indices are monthly per school.

# <strong>ENDPOINT</strong>:

```txt
GET https://crm.derose.app/statistics/accounts/ACCOUNT_ID/monthly_stats.csv
ou
GET https://crm.derose.app/statistics/monthly_stats.csv
```

# <a id="colunas-no-export" data-help-heading="true"></a>COLUMNS IN EXPORT

<em>staff note: see </em>[<em>views/statistics/monthly\_stats/index</em>](https://github.com/dwaynemac/crm-hub/blob/master/app/views/statistics/monthly_stats/index.csv.erb)

ref\_date : Date representing the validity of the data. Always the last day of the respective month.

account\_id : Internal identifier to [derose.app](http://derose.app) of the school

name : Name of the control index that identifies what the data represents.

value : Value of the control index. 

### <a id="ejemplo" data-help-heading="true"></a><strong>Example</strong>

<table>
<tr>
<td>
ref_date
</td>
<td>
account_id
</td>
<td>
name
</td>
<td>
value
</td>
</tr>
<tr>
<td>
2022-7-31
</td>
<td>
cervino
</td>
<td>
students
</td>
<td>
69
</td>
</tr>
</table>

This row indicates that the school ‘cervino’ closed July 2022 with 69 students.

# <a id="parametros-para-o-export" data-help-heading="true"></a><strong>PARAMETERS FOR EXPORT</strong>

<strong>report</strong> : (optional) request this value from our team [Contact](/support/new) 

<strong>secret\_key\_login</strong> : is the apikey for public access to the export from your system. To generate a school key, consult [How to generate and manage API keys for your school](/help/automatizaciones-e-integraciones-7cc61a2e/derose-app-api-keys-569af84e).

<strong>where\[since\_ref\_date\] </strong>: Date in YYYY-MM-DD format. will return only indices from this date onward.

<strong>where\[until\_ref\_date\] </strong>: Date in YYYY-MM-DD format. will return only indices up to this date.

<strong>where\[name\]\[\] </strong>: this field can appear multiple times. Indicates the indices you want to include in the report.

## <a id="indices-de-controle-disponíveis" data-help-heading="true"></a>Available control indices

<em>staff note: </em>[<em>Statistics::MonthlyStat::VALID\_NAMES</em>](https://github.com/dwaynemac/crm-hub/blob/1cc5de044108366560b83237a2ca6cba6934c2de/app/models/statistics/monthly_stat.rb#L59)<em> </em>

<a id="2173160bddf2803fb305e4e7f0e493c2"></a><a id="2173160b-ddf2-803f-b305-e4e7f0e493c2"></a>

<strong>demand</strong>: Searches

<strong>male\_demand</strong>: Search for men

<strong>interviews</strong>: Visits

<strong>male\_interviews</strong>: Visits of men

<strong>p\_interviews</strong>: Profile Visits

<strong>male\_p\_interviews</strong>: Profile Visits of men

<strong>enrollments</strong>: Enrollments 

<strong>students</strong>: Students

<strong>male\_students</strong>: Male students

<strong>standard\_students</strong>: Students with ‘standard’ payment, above the MP.

<strong>lite\_students</strong>: Students with ‘lite’ payment, below the MP.

<strong>aspirante\_students, sadhaka\_students, yogin\_students, chela\_students, graduado\_students, assistant\_students, professor\_students, master\_students: </strong>Students at aspirant, sadhaka, yogin levels, etc.

<strong>students\_average\_age: </strong>Average age of students

<strong>count\_students\_0\_25: </strong>Students aged between 0 and 25 years (inclusive)

<strong>count\_students\_0\_35: </strong>Students aged between 0 and 35 years (inclusive)

<strong>students\_cycle\_duration: </strong>How many days a student remains at the school on average.<strong> </strong>

<strong>dropouts</strong>: Dropouts

> There are many other control indices not included in this documentation. Consult our team if you need another index: [Contact](/support/new)

# <a id="ejemplo-1" data-help-heading="true"></a>Example

```txt
https://crm.derose.app/statistics/monthly_stats.csv?report=xx&where[since_ref_date]=2022-7-1&where[name][]=students&where[name][]=enrollments&where[name][]=dropouts&where[name][]=interviews&secret_key_login=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
```

# <a id="ejemplo-2---google-drive" data-help-heading="true"></a>Example 2 - Google Drive

combining the INDEX function and the IMPORTDATA function we can obtain a control index in a cell of GoogleDrive.

```txt
=index(importdata("https://crm.derose.app/statistics/accounts/cervino/monthly_stats.csv?ts=4&secret_key_login="&apikey&"&where[type]=Statistics::SchoolMonthlyStat&where[name][]=students_cycle_duration&where[since_ref_date]="&ref_date&"&where[until_ref_date]="&eomonth),2,4)
```