younifyd
Menu

Create Referrals For Multiple Advocates

Create referral codes for multiple advocates

POST/v1/referrals_for_multiple_advocates

Use it in a workflow

  1. Add a step and choose the Talon.One connector.
  2. Pick the Create Referrals For Multiple Advocates action (under integration).
  3. Fill in the fields below, then reference the result from later steps as {{createReferralsForMultipleAdvocates.response.data}}.

Request

Query parameters

silentstring

Possible values: `yes` or `no`. - `yes`: Increases the performance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains the updated customer profiles.

Default "yes"

Request body

Enter the body as JSON in the step's Body field.

startDatestring (date-time)

Timestamp at which point the referral code becomes valid.

expiryDatestring (date-time)

Expiration date of the referral code. Referral never expires if this is omitted.

usageLimitinteger (int64)required

The number of times a referral code can be used. `0` means no limit but any campaign usage limits will still apply.

campaignIdinteger (int64)required

The ID of the campaign from which the referral received the referral code.

advocateProfileIntegrationIdsarray<string>required

An array containing all the respective advocate profiles.

attributesobject

Arbitrary properties associated with this referral code.

validCharactersarray<string>

List of characters used to generate the random parts of a code. By default, the list of characters is equivalent to the `[A-Z, 0-9]` regular expression.

referralPatternstring

The pattern used to generate referrals. The character `#` is a placeholder and is replaced by a random character from the `validCharacters` set.

json
{
  "usageLimit": 1,
  "campaignId": 45,
  "advocateProfileIntegrationIds": [
    "URNGV8294NV",
    "DRPVV9476AF"
  ],
  "startDate": {},
  "expiryDate": {},
  "attributes": {
    "channel": "web"
  },
  "validCharacters": [
    "A",
    "B",
    "C",
    "D",
    "E",
    "F",
    "G",
    "H",
    "I",
    "J",
    "K",
    "L",
    "M",
    "N",
    "O",
    "P",
    "Q",
    "R",
    "S",
    "T",
    "U",
    "V",
    "W",
    "X",
    "Y",
    "Z"
  ],
  "referralPattern": "REF-###-###"
}

Response

Returns 201 with an object. Read it in later steps with {{createReferralsForMultipleAdvocates.response.data.<field>}}.

totalResultSizeinteger (int64)
dataarray<object>
idinteger (int64)required

The internal ID of this entity.

createdstring (date-time)required

The time this entity was created.

startDatestring (date-time)

Timestamp at which point the referral code becomes valid.

expiryDatestring (date-time)

Expiration date of the referral code. Referral never expires if this is omitted.

usageLimitinteger (int64)required

The number of times a referral code can be used. `0` means no limit but any campaign usage limits will still apply.

campaignIdinteger (int64)required

ID of the campaign from which the referral received the referral code.

advocateProfileIntegrationIdstringrequired

The Integration ID of the Advocate's Profile.

friendProfileIntegrationIdstring

An optional Integration ID of the Friend's Profile.

attributesobject

Arbitrary properties associated with this item.

importIdinteger (int64)

The ID of the Import which created this referral.

codestringrequired

The referral code.

usageCounterinteger (int64)required

The number of times this referral code has been successfully used.

batchIdstring

The ID of the batch the referrals belong to.

json
{
  "totalResultSize": 1,
  "data": [
    {
      "code": "27G47Y54VH9L",
      "created": {},
      "usageLimit": 1,
      "campaignId": 78,
      "usageCounter": 1,
      "batchId": "tqyrgahe",
      "advocateProfileIntegrationId": "URNGV8294NV",
      "expiryDate": {},
      "importId": 4,
      "friendProfileIntegrationId": "BZGGC2454PA",
      "attributes": {
        "channel": "web"
      },
      "id": 6,
      "startDate": {}
    }
  ]
}

Need more? See the Talon.One guide for connection setup and behaviour shared by every action.