POST api/Referrals

Adds referral to a referral program based on a referral code from a member.

Request Information

URI Parameters

Query String: shouldSendEmail={shouldSendEmail}

NameDescriptionTypeAdditional information
shouldSendEmail

Does nothing at this time. Optional.

boolean

Default value is False

Body Parameters

Type: NewReferral

NameDescriptionTypeAdditional information
referralCode

The referral code from the member that introduced the referral.

string

None.

firstName

string

None.

lastName

string

None.

email

string

None.

phoneNumber

string

None.

preferredContact

The preferred means to contact the referral. The values an be 'email', 'callMorning', 'callAfternoon', or 'callEvening'.

string

None.

externalIdentifier

Unique external identifier you can use to later reference the referral. (i.e. another system's unique identifier, like a order number or customer ID). Not required.

string

None.

amount

Amount Not required.

decimal number

None.

companyName

string

None.

Request Formats

application/json, text/json

Sample:
{
  "referralCode": "sample string 1",
  "firstName": "sample string 2",
  "lastName": "sample string 3",
  "email": "sample string 4",
  "phoneNumber": "sample string 5",
  "preferredContact": "sample string 6",
  "externalIdentifier": "sample string 7",
  "amount": 1.0,
  "companyName": "sample string 8"
}

application/xml, text/xml

Sample:
<newReferral xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <firstName>sample string 2</firstName>
  <lastName>sample string 3</lastName>
  <email>sample string 4</email>
  <phoneNumber>sample string 5</phoneNumber>
  <preferredContact>sample string 6</preferredContact>
  <externalIdentifier>sample string 7</externalIdentifier>
  <amount>1</amount>
  <companyName>sample string 8</companyName>
  <referralCode>sample string 1</referralCode>
</newReferral>

Response Information

Resource Description

[HTTP Status 201 - Created]

Type: ReferralConfirmation

NameDescriptionTypeAdditional information
referral

Structure containing details about the referral.

Referral

None.

message

The message provides more information about the results of the client's request. Review this field for error information.

string

None.

Response Formats

application/json, text/json

Sample:
{
  "message": "sample string 1",
  "referral": {
    "id": "06daf6d5-0ce3-4948-9855-bf64f28051dc",
    "firstName": "sample string 2",
    "lastName": "sample string 3",
    "email": "sample string 4",
    "externalIdentifier": "sample string 5",
    "phoneNumber": "sample string 6",
    "amount": 7.0,
    "preferredContact": "sample string 8",
    "createDate": "2018-01-23T07:55:13.4787758Z",
    "programId": "1a12d070-1911-4bb8-9237-3809b5757d2e",
    "programName": "sample string 11",
    "programTitle": "sample string 12",
    "referringMemberId": "ad1861e9-b0f7-484f-ba03-c50a6b37f002",
    "referringMemberName": "sample string 14",
    "approvedDate": "2018-01-23T07:55:13.4787758Z",
    "qualifiedDate": "2018-01-23T07:55:13.4787758Z",
    "status": "sample string 15",
    "companyName": "sample string 16"
  }
}

application/xml, text/xml

Sample:
<referralConfirmation xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <message>sample string 1</message>
  <referral>
    <id>06daf6d5-0ce3-4948-9855-bf64f28051dc</id>
    <firstName>sample string 2</firstName>
    <lastName>sample string 3</lastName>
    <email>sample string 4</email>
    <externalIdentifier>sample string 5</externalIdentifier>
    <phoneNumber>sample string 6</phoneNumber>
    <amount>7</amount>
    <preferredContact>sample string 8</preferredContact>
    <createDate>2018-01-23T02:55:13.4787758-05:00</createDate>
    <programId>1a12d070-1911-4bb8-9237-3809b5757d2e</programId>
    <programName>sample string 11</programName>
    <programTitle>sample string 12</programTitle>
    <referringMemberId>ad1861e9-b0f7-484f-ba03-c50a6b37f002</referringMemberId>
    <referringMemberName>sample string 14</referringMemberName>
    <approvedDate>2018-01-23T02:55:13.4787758-05:00</approvedDate>
    <qualifiedDate>2018-01-23T02:55:13.4787758-05:00</qualifiedDate>
    <status>sample string 15</status>
    <companyName>sample string 16</companyName>
  </referral>
</referralConfirmation>