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:
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.
The CSV file is allowed in two versions - either with or without
Activecolumn. It indicates if voucher is enabled after import event.
202 HTTP status code on success. It informs that your request has been accepted and vouchers will be added to the repository asynchronously.
400 HTTP error status code when the CSV file includes incorrect data e.g. wrong data type or duplicated codes.