# Reports

Endpoint that provides method(s) for returning various types of reports. Reports could be either of standard type or could be individually configured for clients. 

Examples of reports:
* New customers last 24 hours
* Deleted customers last 24 hours
* Bonus transactions made by customer
* +++

Some reports that have a high volume response, may return the result in pages. This requires the client to iterate through each page to fetch the entire result.

In reports with paging functionality, a metaData object will contain paging information:

```
{
  "metaData": {
      "reportType": "customers",
      "totalRecords": 12,
      "totalPages": 1,
      "activePage": 1
    }  
}
```


* `totalRecords` = Number of records available through all pages
* `totalPages` = How many pages available containing data
* `activePage` = Which page the client is on

To control wich page to fetch data from and how many records that should be return on each page use querystring parameters.

* `page` = from wich page should the dataset be fetched from (default = 1)
* `rowsPage` = how many results per page that should be returned (default = 25)

Please contact us for further information on your possiblites.


## Get reports

 - [GET /reports/{reportType}](https://dev.triggloyalty.com/openapi/reports/report1.md): Method that returns different types of reports based on input parameters and/or querys.
Input parameters and/or querys are fully dynamic and can vary between clients. 

For a complete list of parameters and example of response in your implemenation, please contact our support team.

