Download a Report

Recent endpoint update

This endpoint was recently updated to version 2 (see “V2” in the URL). Version 1 has been deprecated, we recommend switching to V2 as soon as possible.

To retrieve the file content, use your API credentials to access the file specified by the report object id.

Downloading reports

The API response will include a link with to download the report. Open the link through your browser to access the data.

Explore the following links to access various report examples:

GET/reports/{report_id}/download

Header Parameters

X-Organization-Codestringrequired

Organization code associated to the request.

Path Parameters

report_idstringrequired

The report unique identifier.

Response

200

typestring
download_linkstring
statusstring

400

codestring
messagesstring[]

401

codestring
messagesstring[]

403

codestring
messagesstring[]
Request
curl -X GET "https://api-sandbox.whitelabel.com/v2/reports/<report_id>/download" \
  -H "X-Organization-Code: <X-Organization-Code>" \
  -H "public-api-key: <public-api-key>" \
  -H "private-secret-key: <private-secret-key>"
Response
{
  "type": "TRANSACTIONS",
  "download_link": "https://s3.amazonaws.com/.../report.csv",
  "status": "AVAILABLE"
}