POST api/PurchaseGiftMembership

Processes and bills a gift membership.

Request Information

URI Parameters

None.

Body Parameters

GiftMembershipRequest
NameDescriptionTypeAdditional information
SessionKey

string

Required

RecipientFirstName

string

Required

RecipientLastName

string

Required

RecipientAddress1

string
RecipientAddress2

string
RecipientCity

string
RecipientStateId

Two letter state value from CountriesStates method

string
RecipientCountryId

integer
RecipientPostalCode

string
RecipientEmail

string

Required

RecipientPhone

string
GiftMembershipMessage

string
MembershipLevel

Membership level value

string

Required

MembershipAmount

Amount of the membership donation

decimal number

Required

AdditionalDonationFundId

Tessitura fund for any additional donation

integer
AdditionalDonationAmount

Amount of the additional donation

decimal number
Email

string
Phone

string
AdditionalFirstName

For optional second person

string
AdditionalLastName

For optional second person

string
AdditionalEmail

For optional second person

string
FirstName

string
LastName

string
Address1

string
Address2

string
City

string
StateId

Two letter state value from CountriesStates method

string
CountryId

integer
PostalCode

string
SourceId

For optional source id that will be used for the membership purchase session

integer

Request Formats

application/json, text/json

Sample:
{
  "SessionKey": "sample string 1",
  "RecipientFirstName": "sample string 2",
  "RecipientLastName": "sample string 3",
  "RecipientAddress1": "sample string 4",
  "RecipientAddress2": "sample string 5",
  "RecipientCity": "sample string 6",
  "RecipientStateId": "sample string 7",
  "RecipientCountryId": 8,
  "RecipientPostalCode": "sample string 9",
  "RecipientEmail": "sample string 10",
  "RecipientPhone": "sample string 11",
  "GiftMembershipMessage": "sample string 12",
  "MembershipLevel": "sample string 13",
  "MembershipAmount": 14.0,
  "AdditionalDonationFundId": 15,
  "AdditionalDonationAmount": 16.0,
  "Email": "sample string 17",
  "Phone": "sample string 18",
  "AdditionalFirstName": "sample string 19",
  "AdditionalLastName": "sample string 20",
  "AdditionalEmail": "sample string 21",
  "FirstName": "sample string 22",
  "LastName": "sample string 23",
  "Address1": "sample string 24",
  "Address2": "sample string 25",
  "City": "sample string 26",
  "StateId": "sample string 27",
  "CountryId": 28,
  "PostalCode": "sample string 29",
  "SourceId": 30
}

application/xml, text/xml

Sample:
<GiftMembershipRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SFMOMA.Data.Entities.Contribution">
  <Address1>sample string 24</Address1>
  <Address2>sample string 25</Address2>
  <City>sample string 26</City>
  <CountryId>28</CountryId>
  <FirstName>sample string 22</FirstName>
  <LastName>sample string 23</LastName>
  <PostalCode>sample string 29</PostalCode>
  <SourceId>30</SourceId>
  <StateId>sample string 27</StateId>
  <AdditionalDonationAmount>16</AdditionalDonationAmount>
  <AdditionalDonationFundId>15</AdditionalDonationFundId>
  <AdditionalEmail>sample string 21</AdditionalEmail>
  <AdditionalFirstName>sample string 19</AdditionalFirstName>
  <AdditionalLastName>sample string 20</AdditionalLastName>
  <Email>sample string 17</Email>
  <MembershipAmount>14</MembershipAmount>
  <MembershipLevel>sample string 13</MembershipLevel>
  <Phone>sample string 18</Phone>
  <GiftMembershipMessage>sample string 12</GiftMembershipMessage>
  <RecipientAddress1>sample string 4</RecipientAddress1>
  <RecipientAddress2>sample string 5</RecipientAddress2>
  <RecipientCity>sample string 6</RecipientCity>
  <RecipientCountryId>8</RecipientCountryId>
  <RecipientEmail>sample string 10</RecipientEmail>
  <RecipientFirstName>sample string 2</RecipientFirstName>
  <RecipientLastName>sample string 3</RecipientLastName>
  <RecipientPhone>sample string 11</RecipientPhone>
  <RecipientPostalCode>sample string 9</RecipientPostalCode>
  <RecipientStateId>sample string 7</RecipientStateId>
  <SessionKey>sample string 1</SessionKey>
</GiftMembershipRequest>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'GiftMembershipRequest'.

Response Information

Resource Description

GiftMembershipResult object

ApiSuccessOfGiftMembershipResult
NameDescriptionTypeAdditional information
Success

boolean
Data

GiftMembershipResult

Response Formats

application/json

Sample:
{
  "Success": true,
  "Data": {
    "MembershipDonationAdded": true,
    "AdditionalDonationAdded": true,
    "MembershipPurchaseSessionKey": "kAqM+iLarMxLFxWmVrTWDmB82OK1CwLgw+r9QPAKPP/ZZhrhS3y50eQbUTMZ0GcVuCtRmGJ2nLfyDeiry1jYP7JY9NWRqXsSdMkqNq+RJR4=",
    "TotalAmountAddedToCart": 4.0,
    "PurchaseCompleted": true,
    "OrderEmailSent": true,
    "OrderNumber": 7,
    "PrimaryAddressError": true,
    "NewSessionKey": "94BIXlvCahl0s9G/ooGvErfuVr4sljCjI6U5qRM5ztBHCrzvI85bq/xq1cmGFgpSiKyydlAxm7DWKXo/a+RoJIWGUO1zFC1vAgsBVYcVcTI=",
    "Error": [
      "sample string 1",
      "sample string 2"
    ],
    "Status": "sample string 10",
    "Message": "sample string 11"
  }
}

text/json

Sample:
{
  "Success": true,
  "Data": {
    "MembershipDonationAdded": true,
    "AdditionalDonationAdded": true,
    "MembershipPurchaseSessionKey": "bM41/efglHwzwLk6RTcLWLbXuxzydDbX97I4UHHbQoeNLYzbVvJN2SAVnjea+kL4gssFGkSL2pAl3eLmK32u7aMIS+nGZjF55bSGbq6UBPg=",
    "TotalAmountAddedToCart": 4.0,
    "PurchaseCompleted": true,
    "OrderEmailSent": true,
    "OrderNumber": 7,
    "PrimaryAddressError": true,
    "NewSessionKey": "difCyCQuGjm+XhINz05kycENh5vFCSBJpRWwBlQA4gCdOpbwQ9sfBY1gWkP1/b3aUwWTN1lpd38cZUqZ8LX+IH5KSFlrAgAwSD/gfoS7PKk=",
    "Error": [
      "sample string 1",
      "sample string 2"
    ],
    "Status": "sample string 10",
    "Message": "sample string 11"
  }
}

application/xml, text/xml

Sample:
<ApiSuccessOfGiftMembershipResultyx5QZ_PAX xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SFMOMA.Data.Api">
  <Data xmlns:d2p1="http://schemas.datacontract.org/2004/07/SFMOMA.Data.Entities.Contribution">
    <Error xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns="http://schemas.datacontract.org/2004/07/SFMOMA.Data.Entities.Order">
      <d3p1:string>sample string 1</d3p1:string>
      <d3p1:string>sample string 2</d3p1:string>
    </Error>
    <Message xmlns="http://schemas.datacontract.org/2004/07/SFMOMA.Data.Entities.Order">sample string 11</Message>
    <NewSessionKey xmlns="http://schemas.datacontract.org/2004/07/SFMOMA.Data.Entities.Order">sample string 9</NewSessionKey>
    <OrderEmailSent xmlns="http://schemas.datacontract.org/2004/07/SFMOMA.Data.Entities.Order">true</OrderEmailSent>
    <OrderNumber xmlns="http://schemas.datacontract.org/2004/07/SFMOMA.Data.Entities.Order">7</OrderNumber>
    <PrimaryAddressError xmlns="http://schemas.datacontract.org/2004/07/SFMOMA.Data.Entities.Order">true</PrimaryAddressError>
    <PurchaseCompleted xmlns="http://schemas.datacontract.org/2004/07/SFMOMA.Data.Entities.Order">true</PurchaseCompleted>
    <Status xmlns="http://schemas.datacontract.org/2004/07/SFMOMA.Data.Entities.Order">sample string 10</Status>
    <d2p1:AdditionalDonationAdded>true</d2p1:AdditionalDonationAdded>
    <d2p1:MembershipDonationAdded>true</d2p1:MembershipDonationAdded>
    <d2p1:MembershipPurchaseSessionKey>sample string 3</d2p1:MembershipPurchaseSessionKey>
    <d2p1:TotalAmountAddedToCart>4</d2p1:TotalAmountAddedToCart>
  </Data>
</ApiSuccessOfGiftMembershipResultyx5QZ_PAX>