# Delivery Receipts

This endpoint can be used to retrieve Delivery Receipts (DLR) statistics for a specific chatbot. The data you can retrieve with this API endpoint is identical to the data available in live [dashboards](/analytics/dashboards.md).

{% hint style="info" %}
Bot Statistics calls are throttled at 1 call per bot every 30 minutes. 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/<GROUPMODE>/<DAYS>' \
--header 'Authorization: Bearer <BOT_AUTH_TOKEN>' \
--header 'Content-Type: application/json'
```

### Parameters

The following parameters are expected on the endpoint:

| Parameter             | Description                                                                              |
| --------------------- | ---------------------------------------------------------------------------------------- |
| 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.          |

Supported types are as follows:

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. |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.xenioo.com/xenioo-api/globa-platform-api/conversations/runtime-data.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
