Menu
Get Legacy Statistic
Retrieve a statistic
POST
/api/stats/{name}Use it in a workflow
- Add a step and choose the Gorgias connector.
- Pick the Get Legacy Statistic action (under Statistics).
- Fill in the fields below, then reference the result from later steps as
{{getLegacyStatistic.response.data}}.
Request
Path parameters
Request body
Enter the body as JSON in the step's Body field.
{
"filters": {
"period": {
"start_datetime": "2020-06-10T00:00:00-05:00",
"end_datetime": "2020-06-16T23:59:59-05:00"
},
"agents": [
12345,
67890
],
"channels": [
"chat",
"email"
],
"campaigns": [
"123",
"234"
],
"tags": [
321,
654,
987
],
"integrations": [
555,
777
],
"score": [
3,
4
]
}
}
Response
Returns 201 with an object. Read it in later steps with {{getLegacyStatistic.response.data.<field>}}.
{
"data": {
"data": {
"axes": {
"x": [
1591765200
],
"y": []
},
"lines": [
{
"data": [
1829,
1498,
1611
],
"name": "created"
}
]
},
"label": "Support volume",
"legend": {
"axes": {
"x": "Creation date",
"y": "Number of tickets"
}
}
},
"meta": {
"start_datetime": "2020-06-10T00:00:00-05:00",
"end_datetime": "2020-06-16T23:59:59-05:00",
"previous_start_datetime": "2020-06-03T00:00:01-05:00",
"previous_end_datetime": "2020-06-10T00:00:00-05:00",
"next_cursor": "WyJuZXh0IiwgZmFsc2UsICJBbGV4IFBsdWdhcnUiLCAyXQ==",
"prev_cursor": "WyJwcmV2IiwgZmFsc2UsICJCb2IgU21pdGgiLCAzXQ=="
}
}
Need more? See the Gorgias guide for connection setup and behaviour shared by every action.
Was this page helpful?