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.

Create export.

post
Authorizations
Header parameters
Authorizationstring | nullableOptional

Authorization header

X-Impersonate-Userstring | nullableOptional

Impersonation header

Body

Export Request resource

timezonestring | nullableOptional

The timezone used to calculate and export the data. Start time and end time

startinteger · int64Required

Start time of the data to include in the export (total seconds after epoch)

endinteger · int64Required

End time of the data to include in the export (total seconds after epoch)

resultFormatone ofOptional

Export format

string · enumOptional

Possible Result Format Types

Possible values:
tagIdsstring[] | nullableOptional

List of tag ids

teamIdsstring[] | nullableOptional

List of team ids

teammateIdsstring[] | nullableOptional

List of teammate ids

customerIdsstring[] | nullableOptional

List of customer ids

Responses
200

export

application/json
post
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