Import referrals

POST {{baseUrl}}/v1/applications/:applicationId/campaigns/:campaignId/import_referrals

Upload a CSV file containing the referrals that should be created. The file should be sent as multipart data.

The CSV file contains the following columns:

  • code (required): The referral code.
  • advocateprofileintegrationid (required): The profile ID of the advocate.
  • startdate: The start date in RFC3339 of the code redemption period.
  • expirydate: The end date in RFC3339 of the code redemption period.
  • limitval: The maximum number of redemptions of this code. Defaults to 1 when left blank.
  • attributes: A json object describing custom referral attribute names and their values. Double the double-quotes in the object.

For example, if you created a custom attribute called category associated to the referral entity, set it with "{""category"": ""10_off""}".

You can use the time zone of your choice. It is converted to UTC internally by Talon.One.

Note: We recommend limiting your file size to 500MB.

Example:

code,startdate,expirydate,advocateprofileintegrationid,limitval,attributes
REFERRAL_CODE1,2020-11-10T23:00:00Z,2021-11-11T23:00:00Z,integid_4,1,"{""my_attribute"": ""10_off""}"
REFERRAL_CODE2,2020-11-10T23:00:00Z,2021-11-11T23:00:00Z,integid1,1,"{""my_attribute"": ""20_off""}"

Request Body

[{"name"=>"upFile", "value"=>"velit", "datatype"=>"string"}]

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring
Acceptstring