Skip to main content
Voucherify enables programmable export of:

How to export data to CSV

  1. Trigger the export with Create Export and store the id of the export object you’ll get in the response from Voucherify.
  2. Get the export’s status providing the id and take a look at the status field from the response. If it’s still SCHEDULED, this means that the export is still in progress and you should ask later.
  3. When the status is finally DONE, the result will store the URL as in the example below:
{
  "id": "export_lhZvHKphiMESVdIncRKvoaZh",
  "object": "export",
  "created_at": "2017-02-24T14:03:00.196Z",
  "status": "DONE",
  "channel": "API",
  "exported_object": "voucher",
  "parameters": {
    "fields": [
      "code",
      "voucher_type"
    ],
    "filter": {
      "categories": {
        "conditions": {
          "$in": [
            "postman"
          ]
        }
      }
    }
  },
  "result": {
    "url": "https://download.voucherify.io/v1/exports/export_lhZvHKphiMESVdIncRKvoaZh?token=TOKEN"
  }
}
  1. To download the export file, use the provided URL together with authentication headers.
Download URL base differs by region. The result.url returned by 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 again to obtain a fresh result.url and download immediately.

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:
{
   "exported_object":"redemption",
   "parameters":{
      "order":"-created_at",
      "fields":[
         "id",
         "object",
         "date",
         "voucher_code",
         "customer_id",
         "result"
      ],
      "filters":{
         "junction":"and",
         "created_at":{
            "conditions":{
               "$after":[
                  "2018-05-30T22:00:00.000Z"
               ],
               "$before":[
                  "2018-06-29T22:00:00.000Z"
               ]
            }
         }
      }
   }
}
The export request will result in a single file being generated by the system.
Last modified on June 8, 2026