Exports

Download exported CSV file

This endpoint lets you generate a URL, using fileId, from which you can download the exported CSV file. The generated URL expires in five mins.

post/api-offers/offers-exports/actions/download-export-file

Request

Headers

x-site-contextstring required
Example:{"date": "2023-01-01T00:00:00.000Z", "channel": 12, "account": "1234abcd5678efgh9ijklmno","stage":"production"}

The x-site-context header is a JSON object that contains information about the source you wish to pull from. The mandatory account is the 24 character identifier found in Copilot. The channel (Sales channel ID), stage (environment name), and date attributes can be used to further narrow the scope of your data source.

Request body

fileIdstring required

The fileId value retrieved from the get export request by ID endpoint. This is used to download the exported CSV.

Example request

{
  "fileId": "redemption/tenantId/1687472972-redemption-export.csv"
}

Response

OK

urlstring required

The AWS S3 URL to download the exported CSV.

fileIdstring required

The S3 fileId value to generate a downloadable CSV.

Example response

{
  "url": "https://bucket-name.s3.amazonaws.com/redemption/tenantId/1687472972-redemption-export.csv?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA26KLJWUAPER5A",
  "fileId": "redemption/tenantId/1687472972-redemption-export.csv"
}

Changes

No recorded changes to this operation across all 2 revisions of this API.