> For the complete documentation index, see [llms.txt](https://docs.xenioo.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.xenioo.com/xenioo-api/globa-platform-api/statistics/runtime-data-1.md).

# Account Delivery Receipts Statistics

This endpoint can be used to retrieve Delivery Receipts (DLR) statistics for your account or a specific chatbot. It differs from the specific bot DLR statistics endpoint as it can be used to obtain data for all of the bots associated to an account.

The data you can retrieve with this API endpoint is identical to the data available in live [dashboards](/analytics/dashboards.md).

{% hint style="info" %}
Account Statistics calls are throttled at 1 call per account per hour. Trying to access this endpoint before the expired hour will result in an error.
{% endhint %}

### Request

The following request will retrieve statistics data:

```bash
curl --location --request GET 
'https://publicapi.xenioo.com/analytics/statistics/dlr/account/<APIKEY>/<GROUPMODE>/<DAYS>' \
--header 'Authorization: Bearer <ACCOUNT_AUTH_TOKEN>' \
--header 'Content-Type: application/json'
```

### Parameters

The following parameters are expected on the endpoint:

| Parameter             | Description                                                                                                                                |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| APIKEY                | The API key of the bot for which you would like to filter the data. If you want the data of all of the bots, use a \* (wildcard) as value. |
| GROUPMODE             | The time group mode for the returned values. Sett below table for possible values                                                          |
| DAYS                  | The amount of history days to return. Acceptable values go from 1 to 30 days of history.                                                   |
| FROM                  | <p>The start date for returned values.<br>Template of date is YYYY-MM-dd.</p>                                                              |
| TO                    | <p>The end date for returned values.<br>Template of date is YYYY-MM-dd.</p>                                                                |
| CHANNELID             | The channel for returned values                                                                                                            |
| BROADCASTID           | The broadcast for returned values.                                                                                                         |
| INCLUDEPREVIOUSPERIOD | If true, it returns also the data of the same amount of days requested doubled.                                                            |

Time grouping modes can be instead one of the following:

| Value  | Description                    |
| ------ | ------------------------------ |
| hour   | Group entries by hours         |
| day    | Group entries by days          |
| month  | Group entries by months        |
| year   | Group entries by years         |
| minute | Group entries every 10 minutes |

### Response

If successful, the response will contain a detailed array of statistical data.

```javascript
[
   {
      "GroupLabel":"...",
      "GroupMode":"...",
      "EventLabel":"...",
      "ParentAPIKey":"...",
      "ChannelName":"...",
      "ChannelProviderId":"...",
      "Date":"...",
      "Value":1,
      "Count":1
   } 
]
```

### Response Codes

This endpoint will reply with the following standard HTTP codes.

| Code | Meaning                                                      |
| ---- | ------------------------------------------------------------ |
| 200  | Ok. The request has been successfully fulfilled.             |
| 404  | Not Found. The specified  account or bot has not been found. |
