Messaging Statistics¶
Info
- To get messaging statistics, WebSDK must be configured.
- Messaging statistics are generated based on a data transferred from the DevinoOrderEvent.
General statistics¶
To get general messaging statistics it is required to call GET /statistics/sales/by-event-time, sending message parameters and authorization data in the header.
Request parameters¶
Parameter | Data type | Description |
---|---|---|
dateTimeFrom | datetime | Search start date. |
dateTimeTo | datetime | Search end date. |
groupBy | string | Grouping by time interval. Possible values: |
zoneOffset (optional) |
integer | Time offset for the contact from UTC+0 in minutes. |
cartId (optional) |
string | Cart ID. |
contactId (optional) |
string | Contact ID. |
contactGroup (optional) |
string | Contact list. |
contactPhone (optional) |
string | Contact's phone number. |
contactEmail (optional) |
string | Contact's email. |
userId (optional) |
string | User ID. |
utmSource (optional) |
string | Label utmSource data. |
webSdkSettingsId (optional) |
string | Web SDK settings ID. |
Request example¶
curl -X GET "https://api.devino.online/statistics/sales/by-event-time?dateTimeFrom=2021-01-01T00%3A00%3A00Z&dateTimeTo=2021-03-01T00%3A00%3A00Z&groupBy=DAY" \
-H "Authorization: Key QWxhZGRpbjpvcGVuIHNlc2FtZQ=="
Response parameters¶
Parameter | Data type | Description |
---|---|---|
{date} | object | The date on which statistics are collected. |
{Date}¶
Parameter | Data type | Description |
---|---|---|
totalCount | integer | The number of orders. |
totalSum | number | Revenue. |
averageCheck | number | The average receipt for the orders. |
Response example¶
{
"result": {
"2021-02-04T00:00": {
"totalCount": 9,
"totalSum": 33456.451,
"averageCheck": 3717.3834444444446
},
"2021-02-03T00:00": {
"totalCount": 1,
"totalSum": 120.52,
"averageCheck": 120.52
}
}
}
Campaigns statistics¶
To get messaging statistics in terms of the campaigns it is required to call GET /statistics/sales/by-task, sending statistics parameters and authorization data in the header.
Request parameters¶
Parameter | Data type | Description |
---|---|---|
taskIds | array[integer] | Campaign IDs. |
dateTimeFrom (optional) |
datetime | Search start date. |
dateTimeTo (optional) |
datetime | Search end date. |
zoneOffset (optional) |
integer | Time offset for the contact from UTC+0 in minutes. |
cartId (optional) |
string | Cart ID. |
contactId (optional) |
string | Contact ID. |
contactGroup (optional) |
string | Contact list. |
contactPhone (optional) |
string | Contact's phone number. |
contactEmail (optional) |
string | Contact's email. |
userId (optional) |
string | User ID. |
utmSource (optional) |
string | utmSource data. |
webSdkSettingsId (optional) |
string | Web SDK settings ID. |
Request example¶
curl -X GET "https://api.devino.online/statistics/sales/by-event-time?dateTimeFrom=2021-02-01%2000:00:00&dateTimeTo=2021-02-05%2000:00:00" \
-H "Authorization: Key QWxhZGRpbjpvcGVuIHNlc2FtZQ==" \
-H "Content-Type: application/json"
Response parameters¶
Parameter | Data type | Description |
---|---|---|
taskId | integer | Campaign ID. |
totalCount | integer | The number of orders. |
totalSum | number | Revenue. |
averageCheck | number | Average check for the orders. |
Response example¶
{
"result": [
{
"taskId": 384,
"totalCount": 10,
"totalSum": 33576.971,
"averageCheck": 3357.6971
},
{
"taskId": 385,
"totalCount": 8,
"totalSum": 12581.54,
"averageCheck": 1572.6925
}
]
}