Export referrals
GET {{baseUrl}}/v1/applications/:applicationId/export_referrals?campaignId={{campaignId}}&createdBefore=2022-11-08T00:11:22.082Z&createdAfter=2022-11-08T00:11:22.082Z&valid=expired&usable=false&batchId=value&dateFormat=excel
Download a CSV file containing the referrals that match the given parameters.
Tip: If the exported CSV file is too large to view, you can split it into multiple files.
The CSV file contains the following columns:
- code: The referral code.
- advocateprofileintegrationid: 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- 1when left blank.
- attributes: A json object describing custom referral attribute names and their values.
Request Params
| Key | Datatype | Required | Description | 
|---|---|---|---|
| campaignId | string | Filter results by campaign. | |
| createdBefore | string | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. | |
| createdAfter | string | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. | |
| valid | string | - expired: Matches referrals in which the expiration date is set and in the past. | 
- validNow: Matches referrals in which start date is null or in the past and expiration date is null or in the future.
- validFuture: Matches referrals in which start date is set and in the future. | |- usable| boolean | | -- true, only referrals where- usageCounter < usageLimitwill be returned.
- false, only referrals where- usageCounter >= usageLimitwill be returned. | |- batchId| string | | Filter results by batches of referrals | |- dateFormat| string | | Determines the format of dates in the export document. |
HEADERS
| Key | Datatype | Required | Description | 
|---|---|---|---|
| Accept | string |