- Import new referral codes into a campaign.
- Update selected attributes of existing referral codes.
When importing codes to a campaign, the system applies two simultaneous limits for the import file:
- Code count limit: Up to 100,000 codes.
- File size limit: Up to 10 MB CSV file size.
Important
- The start and expiration dates in the CSV file should be provided in compliance with the ISO 8601 standard, for example,
2020-03-11T09:00:00.000Z. - CSV columns mapped to custom attributes will be added as code metadata. The number of custom attributes you can import as metadata is unlimited.
- You cannot import two identical codes to a single Voucherify project.
- When importing existing incentives (discount coupons, referral codes, loyalty cards, or gift cards) into a campaign, only two fields can be updated: the active status (
true/false) and the category. All other attributes remain unchanged.
Preparing CSV file for referral codes
Referral campaign prerequisiteBefore importing, create a referral campaign in Voucherify.
Required fields
- Code: A unique referral code value. You cannot import two identical codes into a single Voucherify project.
Optional fields
-
Active
Enables or disables the referral code.
Accepted values:TRUEorFALSE. Import behavior:- If the campaign is Active and the
activefield is omitted, imported codes are set toTRUE. - If the campaign is Expired and the
activefield is omitted, imported codes are set toFALSE.
- If the campaign is Active and the
-
Category
A custom tag assigned to the referral code for filtering and organization. -
Redeemed quantity
The number of times the referral code has already been redeemed. If omitted, the value defaults to0. This works only for new codes. -
Start date
The date and time when the referral code becomes active.
Accepted format: ISO 8601 (e.g.,
YYYY-MM-DDorYYYY-MM-DDTHH:mm:ssZ). If omitted, the referral code is active immediately upon creation. -
Expiration date
The date and time when the referral code is no longer valid for redemption.
Accepted format: ISO 8601. Once this date passes, the referral code status automatically changes to
Expired. -
Metadata (custom attributes)
Metadata allows you to add custom information to Voucherify objects. There are two ways to handle it:
- Metadata (Schema): These are fields you define in Project settings > Metadata schema. You choose the data type (like string or number) and if the field is mandatory. This ensures your metadata is consistent.
- Metadata (Unknown): These are fields sent to Voucherify without being defined first (through the API, imports, or manual entry). They are always treated as simple text strings. They are useful for one-time metadata, but they do not support advanced filtering or strict validation.
- If metadata columns are omitted, the referral code inherits the campaign’s metadata.
- If metadata columns are added and mapped, only those specific fields are overridden.
- Metadata that is not mapped remains unchanged.
Fields other than the ones listed above will not be imported. Even if you provide them, they will be skipped.
Updating existing referral codes
You can re-import existing referral codes to update them. When importing existing referral codes:- Only Active status and Category can be updated.
- Other attributes remain unchanged.
Import referral codes to a campaign
In Campaign hub > Campaigns, open your referral campaign. In the top-right corner, use the three-dot menu to Import CSV file.Upload CSV file
Upload your prepared CSV file.Once uploaded, you’ll see an overview of first rows and columns of the file.
Map fields
In Map Fields, select for each CSV column:
- Do not map to skip that column.
- Voucherify fields to Select Voucherify properties, like Code, Voucher type, and so on.
- Metadata (Schema) to map a given column to custom attributes that are defined for vouchers.
- Metadata (Unknown) to map to an undefined custom attribute key.
For large imports, the process can take a significant amount of time.

