DELETE api/members/remove

Deletes members of a referral program. For each member, a query object is specified to identiy the member to delete. 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 member will only be deleted if it can be uniquely identifier by the query.

Request Information

URI Parameters

Query String:

None.

Body Parameters

Type: Collection of RemoveMemberInfo

NameDescriptionTypeAdditional information
query

A structure containing details to identify a member to update.

MemberQuery

Required

Request Formats

application/json, text/json

Sample:
[
  {
    "query": {
      "primaryInfo": {
        "memberId": "sample string 1",
        "referralCode": "sample string 2"
      },
      "secondaryInfo": {
        "externalIdentifier": "sample string 1",
        "email": "sample string 2"
      },
      "tertiaryInfo": {
        "programId": "sample string 1",
        "programName": "sample string 2",
        "programTitle": "sample string 3"
      }
    }
  },
  {
    "query": {
      "primaryInfo": {
        "memberId": "sample string 1",
        "referralCode": "sample string 2"
      },
      "secondaryInfo": {
        "externalIdentifier": "sample string 1",
        "email": "sample string 2"
      },
      "tertiaryInfo": {
        "programId": "sample string 1",
        "programName": "sample string 2",
        "programTitle": "sample string 3"
      }
    }
  }
]

application/xml, text/xml

Sample:
<ArrayOfremoveMember xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <removeMember>
    <query>
      <primaryInfo>
        <memberId>sample string 1</memberId>
        <referralCode>sample string 2</referralCode>
      </primaryInfo>
      <secondaryInfo>
        <email>sample string 2</email>
        <externalIdentifier>sample string 1</externalIdentifier>
      </secondaryInfo>
      <tertiaryInfo>
        <programId>sample string 1</programId>
        <programName>sample string 2</programName>
        <programTitle>sample string 3</programTitle>
      </tertiaryInfo>
    </query>
  </removeMember>
  <removeMember>
    <query>
      <primaryInfo>
        <memberId>sample string 1</memberId>
        <referralCode>sample string 2</referralCode>
      </primaryInfo>
      <secondaryInfo>
        <email>sample string 2</email>
        <externalIdentifier>sample string 1</externalIdentifier>
      </secondaryInfo>
      <tertiaryInfo>
        <programId>sample string 1</programId>
        <programName>sample string 2</programName>
        <programTitle>sample string 3</programTitle>
      </tertiaryInfo>
    </query>
  </removeMember>
</ArrayOfremoveMember>

Response Information

Resource Description

[HTTP Status 200 - OK]

Type: Collection of RemoveMemberResult

NameDescriptionTypeAdditional information
query

Echos the query sent in the request.

MemberQuery

None.

resultInfo

Details about the results of the request.

ResultInfo

None.

Response Formats

application/json, text/json

Sample:
[
  {
    "query": {
      "primaryInfo": {
        "memberId": "sample string 1",
        "referralCode": "sample string 2"
      },
      "secondaryInfo": {
        "externalIdentifier": "sample string 1",
        "email": "sample string 2"
      },
      "tertiaryInfo": {
        "programId": "sample string 1",
        "programName": "sample string 2",
        "programTitle": "sample string 3"
      }
    },
    "resultInfo": {
      "Status": "sample string 1",
      "Message": "sample string 2"
    }
  },
  {
    "query": {
      "primaryInfo": {
        "memberId": "sample string 1",
        "referralCode": "sample string 2"
      },
      "secondaryInfo": {
        "externalIdentifier": "sample string 1",
        "email": "sample string 2"
      },
      "tertiaryInfo": {
        "programId": "sample string 1",
        "programName": "sample string 2",
        "programTitle": "sample string 3"
      }
    },
    "resultInfo": {
      "Status": "sample string 1",
      "Message": "sample string 2"
    }
  }
]

application/xml, text/xml

Sample:
<ArrayOfremoveMemberResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <removeMemberResult>
    <query>
      <primaryInfo>
        <memberId>sample string 1</memberId>
        <referralCode>sample string 2</referralCode>
      </primaryInfo>
      <secondaryInfo>
        <email>sample string 2</email>
        <externalIdentifier>sample string 1</externalIdentifier>
      </secondaryInfo>
      <tertiaryInfo>
        <programId>sample string 1</programId>
        <programName>sample string 2</programName>
        <programTitle>sample string 3</programTitle>
      </tertiaryInfo>
    </query>
    <resultInfo xmlns:d3p1="http://schemas.datacontract.org/2004/07/ReferralRock.Api.Models.Response">
      <d3p1:Message>sample string 2</d3p1:Message>
      <d3p1:Status>sample string 1</d3p1:Status>
    </resultInfo>
  </removeMemberResult>
  <removeMemberResult>
    <query>
      <primaryInfo>
        <memberId>sample string 1</memberId>
        <referralCode>sample string 2</referralCode>
      </primaryInfo>
      <secondaryInfo>
        <email>sample string 2</email>
        <externalIdentifier>sample string 1</externalIdentifier>
      </secondaryInfo>
      <tertiaryInfo>
        <programId>sample string 1</programId>
        <programName>sample string 2</programName>
        <programTitle>sample string 3</programTitle>
      </tertiaryInfo>
    </query>
    <resultInfo xmlns:d3p1="http://schemas.datacontract.org/2004/07/ReferralRock.Api.Models.Response">
      <d3p1:Message>sample string 2</d3p1:Message>
      <d3p1:Status>sample string 1</d3p1:Status>
    </resultInfo>
  </removeMemberResult>
</ArrayOfremoveMemberResult>