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/TEST-CAMPAIGN/importCSV \ -F [email protected]/path/to/campaigns.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 a gift cards import, you can also include the current card balance using the
Gift Amount header. In a loyalty cards import, you can also include the current loyalty card score in points using the
Loyalty Points header. Remaining CSV columns will be mapped to metadata properties.
Discount type, time limits, and validation rules will be taken from the campaign object settings.
|Active||Code||Loyalty Points||Gift Amount||Category||Custom_metadata_property|
|Use ||The unique voucher code.||The number of points to be added to the loyalty card. If you leave this undefined, then the initial number of points will be set according to the campaign settings.|
|The initial gift card balance.|
|A custom tag for the voucher to help you filter codes; you can either import the category name or a unique Voucherify-assigned category ID.||Any additional data that you would like to store for the given loyalty card as a Custom attribute. Remember to define the metadata schema in the Dashboard prior to importing codes.|
The CSV file is allowed in two versions; either with or without a column titled
Active. It indicates whether the voucher is enabled after the import event.
This API request starts a process that affects Voucherify data in bulk.
In case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the
IN_PROGRESS status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window.
The result will return the async ID. You can verify the status of your request via this API request.