Import Vouchers to Campaign by CSV

Imports vouchers to an existing campaign.

The CSV file has to include headers in the first line.

curl -X POST \
  https://api.voucherify.io/v1/campaigns/TESTING-CAMPAIGN/importCSV \
  -F [email protected]/path/to/vouchers.csv \
  -H "X-App-Id: c70a6f00-cf91-4756-9df5-47628850002b" \
  -H "X-App-Token: 3266b9f8-e246-4f79-bdf0-833929b1380c"

You can import values for the following fields: Code (required), Category, and Active. In gift cards import, you can also include the current card balance using the Gift Amount header. In loyalty cards import, you can also include the current loyalty card score in points using the Loyalty Points header. Other CSV columns will be mapped to metadata properties.

Go to the description of Import Vouchers to Campaign ] to see the detailed description of supported code attributes that you can include in CSV.

Discount type, time limits, and validation rules will be taken from the campaign object settings.

📘

Active

The CSV file is allowed in two versions - either with or without Active column. It indicates if voucher is enabled after import event.

Returns

Returns 202 HTTP status code on success. It informs that your request has been accepted and vouchers will be added to the repository asynchronously.

Returns 400 HTTP error status code when the CSV file includes incorrect data e.g. wrong data type or duplicated codes.

Language
Response
Click Try It! to start a request and see the response here!