younifyd
Menu

Create Referral

Create referral code for an advocate

POST/v1/referrals

Use it in a workflow

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

Request

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)

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.

json
{
  "campaignId": 78,
  "advocateProfileIntegrationId": "URNGV8294NV",
  "startDate": {},
  "expiryDate": {},
  "usageLimit": 1,
  "friendProfileIntegrationId": "BZGGC2454PA",
  "attributes": {
    "channel": "web"
  }
}

Response

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

idinteger (int64)

The internal ID of this entity.

createdstring (date-time)

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)

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

campaignIdinteger (int64)

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

advocateProfileIntegrationIdstring

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.

codestring

The referral code.

usageCounterinteger (int64)

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

batchIdstring

The ID of the batch the referrals belong to.

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

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