Import referrals
[!note] Management API endpoints are not meant to be used in real-time integrations that directly serve your end users. Rate limit: 3 requests per second.
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, enclosed with double quotation marks.<br /> For example, if you created a custom attribute called category associated with the referral entity, the object in the CSV file, when opened in a text editor, must be: "{"category": "10_off"}".
You can use the time zone of your choice. It is converted to UTC internally by Talon.One.
[!important] When you import a CSV file with referrals, a customer profile is not automatically created for each advocateprofileintegrationid column value. Use the Update customer profile endpoint or the Update multiple customer profiles endpoint to create the customer profiles.
[!note] We recommend limiting your file size to 500 MB.
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
- Base URLhttps://yourbaseurl.talon.one
- Auth
- API key in header Authorization
- or API key in header Authorization
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
The ID of the Application. It is displayed in your Talon.One deployment URL.
The ID of the campaign. It is displayed in your Talon.One deployment URL.
Request body multipart/form-data
Response
OK
Example response
{
"id": 6,
"created": "2020-06-10T09:05:27.993483Z",
"accountId": 3886,
"userId": 388,
"entity": "AttributeAllowedList",
"amount": 10
}Changes
No recorded changes to this operation across all 2 revisions of this API.