Export Report
Raw data exports are created asynchronously. One first needs to create an export via POST Export Report, then fetch it using GETGet Report with the supplied reportId until it is generated. For sucessful requests (HTTP 200) the ReportingExportResult object is returned with reportId.
Authorization header
Impersonation header
Export Request resource
The timezone used to calculate and export the data. Start time and end time
Start time of the data to include in the export (total seconds after epoch)
End time of the data to include in the export (total seconds after epoch)
Export format
Possible Result Format Types
List of tag ids
List of team ids
List of teammate ids
List of customer ids
export
Bad request. Check fields message and error code from response body for additional information.
Unauthorized request. Check fields message and error code from response body for additional information.
Requested resource forbidden.Check fields message and error code from response body for additional information.
Too many requests. Check response header Retry-After indicating how long to wait before making a new request.
Unavailable because account is not verified.
POST /api/v1/report/export HTTP/1.1
Host: api.intheloop.io
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 142
{
"timezone": "text",
"start": 1,
"end": 1,
"resultFormat": "Json",
"tagIds": [
"text"
],
"teamIds": [
"text"
],
"teammateIds": [
"text"
],
"customerIds": [
"text"
]
}
{
"id": "text",
"status": "PendingOrExpired",
"url": "text"
}
Parameters
timezone: string;
IANA time zone string. Use this reference https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
start: integer
Time stamp in Epoch format: https://www.epochconverter.com
end: integer
Time stamp in Epoch format: https://www.epochconverter.com
resultFormat: enum [ Json, Xlsx ]
Format in which the exported file is provider. Either Json or Xlsx (Excel) format are supported
tagIds: set of tag IDs
If no tags are specified the export is not filtered. If tags are specified the export is filtered in a way to include data which includes at least one tag ID. One can get tag IDs in Loop web settings under Tag details as shown in the screenshot below.
teamIds: set of shared inbox IDs
Set of shared inbox IDs. If no IDs are specified the export is not filtered. If IDs are specified the export is filtered in a way to include data for all the specified shared inboxes. One can get shared inbox IDs in Loop web settings under Shared Inbox details as shown in the screenshot below.
teammateIds: set of teammate email addresses
Set of email addresses of Agents that one would like to include in the export
customerIds: set of customer email addresses
Set of customer email addresses that one would like to include in the export
Sample request payload
Example payload to generate a export for all shared inboxes without any tag or teammate filters. First data in the report ("start") is from September 1, 2023 12:00:00 AM GMT The last data in the report ("end") is from October 1, 2023 12:00:00 AM GMT. The export will be generated in JSON format ("resultFormat").
{
"timezone": "Europe/Ljubljana",
"start": 1693526400,
"end": 1696118400,
"resultFormat": "Json",
"tagIds": [],
"teamIds": [],
"teammateIds": [],
"customerIds": []
}
Sample response body
{
"id": "8fc7de5a-3f54-405b-8bad-714a56b189d3",
"status": "Processing"
}
Last updated