POST api/referral/update

Updates referrals in a referral program. For each referral, a query object is specified to identify the referral to update and a referral object is specified to identify the elements to update. At a minimum, a query object requires either a valid value in primaryInfo or a valid element in both the secondaryInfo and tertiaryInfo elements. A referral will only be updated if it can be uniquely identifier by the query.

Request Information

URI Parameters

Query String:

None.

Body Parameters

A list of required structures containing details about the referral to update.

Type: Collection of UpdateReferralInfo

NameDescriptionTypeAdditional information
query

A structure containing details to indentify a referral to update.

ReferralQuery

Required

referral

A structure containing the elements of a referral to update.

UpdateReferral

Required

Request Formats

application/json, text/json

Sample:
[
  {
    "query": {
      "primaryInfo": {
        "referralId": "sample string 1"
      },
      "secondaryInfo": {
        "externalIdentifier": "sample string 1",
        "email": "sample string 2",
        "phoneNumber": "sample string 3"
      },
      "tertiaryInfo": {
        "ProgramId": "sample string 1",
        "ProgramName": "sample string 2",
        "ProgramTitle": "sample string 3"
      },
      "fuzzyInfo": {
        "Identifier": "sample string 1"
      }
    },
    "referral": {
      "firstName": "sample string 1",
      "lastName": "sample string 2",
      "email": "sample string 3",
      "phoneNumber": "sample string 4",
      "preferredContact": "sample string 5",
      "externalIdentifier": "sample string 6",
      "amount": 1.0,
      "companyName": "sample string 7",
      "note": "sample string 8",
      "publicNote": "sample string 9",
      "customOption1Name": "sample string 10",
      "customOption2Name": "sample string 11",
      "customText1Name": "sample string 12",
      "customText2Name": "sample string 13",
      "customText3Name": "sample string 14",
      "customOption1Value": "sample string 15",
      "customOption2Value": "sample string 16",
      "customText1Value": "sample string 17",
      "customText2Value": "sample string 18",
      "customText3Value": "sample string 19",
      "status": "sample string 20"
    }
  },
  {
    "query": {
      "primaryInfo": {
        "referralId": "sample string 1"
      },
      "secondaryInfo": {
        "externalIdentifier": "sample string 1",
        "email": "sample string 2",
        "phoneNumber": "sample string 3"
      },
      "tertiaryInfo": {
        "ProgramId": "sample string 1",
        "ProgramName": "sample string 2",
        "ProgramTitle": "sample string 3"
      },
      "fuzzyInfo": {
        "Identifier": "sample string 1"
      }
    },
    "referral": {
      "firstName": "sample string 1",
      "lastName": "sample string 2",
      "email": "sample string 3",
      "phoneNumber": "sample string 4",
      "preferredContact": "sample string 5",
      "externalIdentifier": "sample string 6",
      "amount": 1.0,
      "companyName": "sample string 7",
      "note": "sample string 8",
      "publicNote": "sample string 9",
      "customOption1Name": "sample string 10",
      "customOption2Name": "sample string 11",
      "customText1Name": "sample string 12",
      "customText2Name": "sample string 13",
      "customText3Name": "sample string 14",
      "customOption1Value": "sample string 15",
      "customOption2Value": "sample string 16",
      "customText1Value": "sample string 17",
      "customText2Value": "sample string 18",
      "customText3Value": "sample string 19",
      "status": "sample string 20"
    }
  }
]

application/xml, text/xml

Sample:
<ArrayOfupdateReferral xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <updateReferral>
    <query>
      <fuzzyInfo xmlns:d4p1="http://schemas.datacontract.org/2004/07/ReferralRock.Api.Models">
        <d4p1:Identifier>sample string 1</d4p1:Identifier>
      </fuzzyInfo>
      <primaryInfo>
        <referralId>sample string 1</referralId>
      </primaryInfo>
      <secondaryInfo>
        <email>sample string 2</email>
        <externalIdentifier>sample string 1</externalIdentifier>
        <phoneNumber>sample string 3</phoneNumber>
      </secondaryInfo>
      <tertiaryInfo xmlns:d4p1="http://schemas.datacontract.org/2004/07/ReferralRock.Api.Models">
        <d4p1:ProgramId>sample string 1</d4p1:ProgramId>
        <d4p1:ProgramName>sample string 2</d4p1:ProgramName>
        <d4p1:ProgramTitle>sample string 3</d4p1:ProgramTitle>
      </tertiaryInfo>
    </query>
    <referral>
      <firstName>sample string 1</firstName>
      <lastName>sample string 2</lastName>
      <email>sample string 3</email>
      <phoneNumber>sample string 4</phoneNumber>
      <preferredContact>sample string 5</preferredContact>
      <externalIdentifier>sample string 6</externalIdentifier>
      <amount>1</amount>
      <companyName>sample string 7</companyName>
      <note>sample string 8</note>
      <publicNote>sample string 9</publicNote>
      <customOption1Name>sample string 10</customOption1Name>
      <customOption2Name>sample string 11</customOption2Name>
      <customText1Name>sample string 12</customText1Name>
      <customText2Name>sample string 13</customText2Name>
      <customText3Name>sample string 14</customText3Name>
      <customOption1Value>sample string 15</customOption1Value>
      <customOption2Value>sample string 16</customOption2Value>
      <customText1Value>sample string 17</customText1Value>
      <customText2Value>sample string 18</customText2Value>
      <customText3Value>sample string 19</customText3Value>
      <status>sample string 20</status>
    </referral>
  </updateReferral>
  <updateReferral>
    <query>
      <fuzzyInfo xmlns:d4p1="http://schemas.datacontract.org/2004/07/ReferralRock.Api.Models">
        <d4p1:Identifier>sample string 1</d4p1:Identifier>
      </fuzzyInfo>
      <primaryInfo>
        <referralId>sample string 1</referralId>
      </primaryInfo>
      <secondaryInfo>
        <email>sample string 2</email>
        <externalIdentifier>sample string 1</externalIdentifier>
        <phoneNumber>sample string 3</phoneNumber>
      </secondaryInfo>
      <tertiaryInfo xmlns:d4p1="http://schemas.datacontract.org/2004/07/ReferralRock.Api.Models">
        <d4p1:ProgramId>sample string 1</d4p1:ProgramId>
        <d4p1:ProgramName>sample string 2</d4p1:ProgramName>
        <d4p1:ProgramTitle>sample string 3</d4p1:ProgramTitle>
      </tertiaryInfo>
    </query>
    <referral>
      <firstName>sample string 1</firstName>
      <lastName>sample string 2</lastName>
      <email>sample string 3</email>
      <phoneNumber>sample string 4</phoneNumber>
      <preferredContact>sample string 5</preferredContact>
      <externalIdentifier>sample string 6</externalIdentifier>
      <amount>1</amount>
      <companyName>sample string 7</companyName>
      <note>sample string 8</note>
      <publicNote>sample string 9</publicNote>
      <customOption1Name>sample string 10</customOption1Name>
      <customOption2Name>sample string 11</customOption2Name>
      <customText1Name>sample string 12</customText1Name>
      <customText2Name>sample string 13</customText2Name>
      <customText3Name>sample string 14</customText3Name>
      <customOption1Value>sample string 15</customOption1Value>
      <customOption2Value>sample string 16</customOption2Value>
      <customText1Value>sample string 17</customText1Value>
      <customText2Value>sample string 18</customText2Value>
      <customText3Value>sample string 19</customText3Value>
      <status>sample string 20</status>
    </referral>
  </updateReferral>
</ArrayOfupdateReferral>

Response Information

Resource Description

[HTTP Status 200 - OK]

Type: Collection of UpdateReferralInfo

NameDescriptionTypeAdditional information
query

A structure containing details to indentify a referral to update.

ReferralQuery

Required

referral

A structure containing the elements of a referral to update.

UpdateReferral

Required

Response Formats

application/json, text/json

Sample:
[
  {
    "query": {
      "primaryInfo": {
        "referralId": "sample string 1"
      },
      "secondaryInfo": {
        "externalIdentifier": "sample string 1",
        "email": "sample string 2",
        "phoneNumber": "sample string 3"
      },
      "tertiaryInfo": {
        "ProgramId": "sample string 1",
        "ProgramName": "sample string 2",
        "ProgramTitle": "sample string 3"
      },
      "fuzzyInfo": {
        "Identifier": "sample string 1"
      }
    },
    "referral": {
      "firstName": "sample string 1",
      "lastName": "sample string 2",
      "email": "sample string 3",
      "phoneNumber": "sample string 4",
      "preferredContact": "sample string 5",
      "externalIdentifier": "sample string 6",
      "amount": 1.0,
      "companyName": "sample string 7",
      "note": "sample string 8",
      "publicNote": "sample string 9",
      "customOption1Name": "sample string 10",
      "customOption2Name": "sample string 11",
      "customText1Name": "sample string 12",
      "customText2Name": "sample string 13",
      "customText3Name": "sample string 14",
      "customOption1Value": "sample string 15",
      "customOption2Value": "sample string 16",
      "customText1Value": "sample string 17",
      "customText2Value": "sample string 18",
      "customText3Value": "sample string 19",
      "status": "sample string 20"
    }
  },
  {
    "query": {
      "primaryInfo": {
        "referralId": "sample string 1"
      },
      "secondaryInfo": {
        "externalIdentifier": "sample string 1",
        "email": "sample string 2",
        "phoneNumber": "sample string 3"
      },
      "tertiaryInfo": {
        "ProgramId": "sample string 1",
        "ProgramName": "sample string 2",
        "ProgramTitle": "sample string 3"
      },
      "fuzzyInfo": {
        "Identifier": "sample string 1"
      }
    },
    "referral": {
      "firstName": "sample string 1",
      "lastName": "sample string 2",
      "email": "sample string 3",
      "phoneNumber": "sample string 4",
      "preferredContact": "sample string 5",
      "externalIdentifier": "sample string 6",
      "amount": 1.0,
      "companyName": "sample string 7",
      "note": "sample string 8",
      "publicNote": "sample string 9",
      "customOption1Name": "sample string 10",
      "customOption2Name": "sample string 11",
      "customText1Name": "sample string 12",
      "customText2Name": "sample string 13",
      "customText3Name": "sample string 14",
      "customOption1Value": "sample string 15",
      "customOption2Value": "sample string 16",
      "customText1Value": "sample string 17",
      "customText2Value": "sample string 18",
      "customText3Value": "sample string 19",
      "status": "sample string 20"
    }
  }
]

application/xml, text/xml

Sample:
<ArrayOfupdateReferral xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <updateReferral>
    <query>
      <fuzzyInfo xmlns:d4p1="http://schemas.datacontract.org/2004/07/ReferralRock.Api.Models">
        <d4p1:Identifier>sample string 1</d4p1:Identifier>
      </fuzzyInfo>
      <primaryInfo>
        <referralId>sample string 1</referralId>
      </primaryInfo>
      <secondaryInfo>
        <email>sample string 2</email>
        <externalIdentifier>sample string 1</externalIdentifier>
        <phoneNumber>sample string 3</phoneNumber>
      </secondaryInfo>
      <tertiaryInfo xmlns:d4p1="http://schemas.datacontract.org/2004/07/ReferralRock.Api.Models">
        <d4p1:ProgramId>sample string 1</d4p1:ProgramId>
        <d4p1:ProgramName>sample string 2</d4p1:ProgramName>
        <d4p1:ProgramTitle>sample string 3</d4p1:ProgramTitle>
      </tertiaryInfo>
    </query>
    <referral>
      <firstName>sample string 1</firstName>
      <lastName>sample string 2</lastName>
      <email>sample string 3</email>
      <phoneNumber>sample string 4</phoneNumber>
      <preferredContact>sample string 5</preferredContact>
      <externalIdentifier>sample string 6</externalIdentifier>
      <amount>1</amount>
      <companyName>sample string 7</companyName>
      <note>sample string 8</note>
      <publicNote>sample string 9</publicNote>
      <customOption1Name>sample string 10</customOption1Name>
      <customOption2Name>sample string 11</customOption2Name>
      <customText1Name>sample string 12</customText1Name>
      <customText2Name>sample string 13</customText2Name>
      <customText3Name>sample string 14</customText3Name>
      <customOption1Value>sample string 15</customOption1Value>
      <customOption2Value>sample string 16</customOption2Value>
      <customText1Value>sample string 17</customText1Value>
      <customText2Value>sample string 18</customText2Value>
      <customText3Value>sample string 19</customText3Value>
      <status>sample string 20</status>
    </referral>
  </updateReferral>
  <updateReferral>
    <query>
      <fuzzyInfo xmlns:d4p1="http://schemas.datacontract.org/2004/07/ReferralRock.Api.Models">
        <d4p1:Identifier>sample string 1</d4p1:Identifier>
      </fuzzyInfo>
      <primaryInfo>
        <referralId>sample string 1</referralId>
      </primaryInfo>
      <secondaryInfo>
        <email>sample string 2</email>
        <externalIdentifier>sample string 1</externalIdentifier>
        <phoneNumber>sample string 3</phoneNumber>
      </secondaryInfo>
      <tertiaryInfo xmlns:d4p1="http://schemas.datacontract.org/2004/07/ReferralRock.Api.Models">
        <d4p1:ProgramId>sample string 1</d4p1:ProgramId>
        <d4p1:ProgramName>sample string 2</d4p1:ProgramName>
        <d4p1:ProgramTitle>sample string 3</d4p1:ProgramTitle>
      </tertiaryInfo>
    </query>
    <referral>
      <firstName>sample string 1</firstName>
      <lastName>sample string 2</lastName>
      <email>sample string 3</email>
      <phoneNumber>sample string 4</phoneNumber>
      <preferredContact>sample string 5</preferredContact>
      <externalIdentifier>sample string 6</externalIdentifier>
      <amount>1</amount>
      <companyName>sample string 7</companyName>
      <note>sample string 8</note>
      <publicNote>sample string 9</publicNote>
      <customOption1Name>sample string 10</customOption1Name>
      <customOption2Name>sample string 11</customOption2Name>
      <customText1Name>sample string 12</customText1Name>
      <customText2Name>sample string 13</customText2Name>
      <customText3Name>sample string 14</customText3Name>
      <customOption1Value>sample string 15</customOption1Value>
      <customOption2Value>sample string 16</customOption2Value>
      <customText1Value>sample string 17</customText1Value>
      <customText2Value>sample string 18</customText2Value>
      <customText3Value>sample string 19</customText3Value>
      <status>sample string 20</status>
    </referral>
  </updateReferral>
</ArrayOfupdateReferral>