Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions documentation/guides/csv-export.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,18 @@ Voucherify enables programmable export of:

4. To [download the export file](/api-reference/exports/download-export), use the provided URL together with authentication headers.

<Note>
**Download URL base differs by region.** The `result.url` returned by [Get Export](/api-reference/exports/get-export) points at a region-specific host, not the standard API host:

- Europe: `https://download.voucherify.io`
- US: `https://us1.download.voucherify.io`
- Asia: `https://as1.download.voucherify.io`

**Authentication headers are still required.** The `token` query parameter embedded in `result.url` identifies the export — it does **not** replace your API credentials. Every download request must also include your `X-App-Id` and `X-App-Token` headers (or an OAuth token). Without them, the download responds with `401 Unauthorized`.

**The download token is short-lived.** If you receive a `401 Unauthorized` even though your headers are correct, the token in `result.url` has likely expired. Call [Get Export](/api-reference/exports/get-export) again to obtain a fresh `result.url` and download immediately.
</Note>

## Filters

Voucherify allows you to specify the time frame for the records you want to retrieve. Thanks to this mechanism, it should be easy to implement a pagination mechanism. See the example of a request body:
Expand Down
2 changes: 1 addition & 1 deletion documentation/openapi/exports.json
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@
"Exports"
],
"summary": "Download Export",
"description": "Download the contents of the exported CSV file. \n\n\n\n> 📘 Important notes\n>\n> **Base URL:** \n> - `https://download.voucherify.io` (Europe) \n> - `https://us1.download.voucherify.io` (US) \n> - `https://as1.download.voucherify.io` (Asia) \n>\n> **Token:** Can be found within the `result` parameter of the [Get Export](/api-reference/exports/get-export) method response.",
"description": "Download the contents of the exported CSV file. \n\n\n\n> 📘 Important notes\n>\n> **Base URL:** \n> - `https://download.voucherify.io` (Europe) \n> - `https://us1.download.voucherify.io` (US) \n> - `https://as1.download.voucherify.io` (Asia) \n>\n> **Token:** Can be found within the `result` parameter of the [Get Export](/api-reference/exports/get-export) method response.\n>\n> **Authentication headers are still required.** The `token` query parameter identifies the export — it does not replace your API credentials. Every download request must also send your `X-App-Id` and `X-App-Token` headers (or an OAuth token).\n>\n> **The token is short-lived.** If a `401 Unauthorized` is returned even with correct credentials, call [Get Export](/api-reference/exports/get-export) again to obtain a fresh `result.url` and download immediately.",
"parameters": [],
"security": [
{
Expand Down
Loading