POST api/PurchaseNewMembership
Processes and bills a new membership. If SessionKey is empty a new account will be created.
Request Information
URI Parameters
None.
Body Parameters
NewMembershipRequestName | Description | Type | Additional information |
---|---|---|---|
SessionKey |
If not provided all account data is required |
string | |
UserName |
Required if no session key is passed in |
string | |
Password |
Required if no session key is passed in |
string | |
InterestList |
List of interest Id values, set bool value to true |
Dictionary of integer [key] and boolean [value] | |
AutoRenewal | boolean | ||
AddOnMemberships |
Collection of add-on memberships |
Collection of AddOnMembership | |
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 | |
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", "UserName": "sample string 2", "Password": "sample string 3", "InterestList": { "1": true, "3": true }, "AutoRenewal": true, "AddOnMemberships": [ { "MembershipLevel": "sample string 1", "MembershipAmount": 2.0 }, { "MembershipLevel": "sample string 1", "MembershipAmount": 2.0 } ], "MembershipLevel": "sample string 5", "MembershipAmount": 6.0, "AdditionalDonationFundId": 7, "AdditionalDonationAmount": 8.0, "Email": "sample string 9", "Phone": "sample string 10", "AdditionalFirstName": "sample string 11", "AdditionalLastName": "sample string 12", "AdditionalEmail": "sample string 13", "FirstName": "sample string 14", "LastName": "sample string 15", "Address1": "sample string 16", "Address2": "sample string 17", "City": "sample string 18", "StateId": "sample string 19", "CountryId": 20, "PostalCode": "sample string 21", "SourceId": 22 }
application/xml, text/xml
Sample:
<NewMembershipRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SFMOMA.Data.Entities.Contribution"> <Address1>sample string 16</Address1> <Address2>sample string 17</Address2> <City>sample string 18</City> <CountryId>20</CountryId> <FirstName>sample string 14</FirstName> <LastName>sample string 15</LastName> <PostalCode>sample string 21</PostalCode> <SourceId>22</SourceId> <StateId>sample string 19</StateId> <AdditionalDonationAmount>8</AdditionalDonationAmount> <AdditionalDonationFundId>7</AdditionalDonationFundId> <AdditionalEmail>sample string 13</AdditionalEmail> <AdditionalFirstName>sample string 11</AdditionalFirstName> <AdditionalLastName>sample string 12</AdditionalLastName> <Email>sample string 9</Email> <MembershipAmount>6</MembershipAmount> <MembershipLevel>sample string 5</MembershipLevel> <Phone>sample string 10</Phone> <AddOnMemberships> <AddOnMembership> <MembershipAmount>2</MembershipAmount> <MembershipLevel>sample string 1</MembershipLevel> </AddOnMembership> <AddOnMembership> <MembershipAmount>2</MembershipAmount> <MembershipLevel>sample string 1</MembershipLevel> </AddOnMembership> </AddOnMemberships> <AutoRenewal>true</AutoRenewal> <InterestList xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d2p1:KeyValueOfintboolean> <d2p1:Key>1</d2p1:Key> <d2p1:Value>true</d2p1:Value> </d2p1:KeyValueOfintboolean> <d2p1:KeyValueOfintboolean> <d2p1:Key>3</d2p1:Key> <d2p1:Value>true</d2p1:Value> </d2p1:KeyValueOfintboolean> </InterestList> <Password>sample string 3</Password> <SessionKey>sample string 1</SessionKey> <UserName>sample string 2</UserName> </NewMembershipRequest>
application/x-www-form-urlencoded
Sample:
Response Information
Resource Description
NewMembershipResult object
ApiSuccessOfNewMembershipResultName | Description | Type | Additional information |
---|---|---|---|
Success | boolean | ||
Data | NewMembershipResult |
Response Formats
application/json
Sample:
{ "Success": true, "Data": { "SessionKey": "w3BS35gtcQcQ/c7+WHHRYueNIY1nkUEzYgwk+EtXMiJ4BJrtbVv237JqwBzuD7xhXtKzwHKjCYhnyLwRdyXA7fl3rerSMOZNnmJvzDS1FkM=", "AccountRegistered": true, "MembershipDonationAdded": true, "AdditionalDonationAdded": true, "AutoRenewalPaymentSaved": true, "AddOnMembershipsAdded": [ { "MembershipLevel": "sample string 1", "MembershipAmount": 2.0 }, { "MembershipLevel": "sample string 1", "MembershipAmount": 2.0 } ], "MembershipPurchaseSessionKey": "5NSWVkZj1oKfJPaOsCrFODnJSlOMDuT1Yyn42D7eVPIcrNv12hpRhS8i5NJu+hB+3ol+nUdWNtkzbNUVCfwCpx7pUE9gVUafI6WOnIbMhhY=", "TotalAmountAddedToCart": 7.0, "PurchaseCompleted": true, "OrderEmailSent": true, "OrderNumber": 10, "PrimaryAddressError": true, "NewSessionKey": "V8FYbAPjijuKoEXkV3FgrXU0H54Ad1kP8mOZEnLBEC4A6Bp7YY3S+gSHOwa+Q9x/WzYoCdD1Dp/WZoqt+t0T6FmTSy+3YALobpANtTA7mfhEnUL1QnJiyxpZCuXo/3gZ", "Error": [ "sample string 1", "sample string 2" ], "Status": "sample string 13", "Message": "sample string 14" } }
text/json
Sample:
{ "Success": true, "Data": { "SessionKey": "p1YANCUoCV/7JDpiW8gwxRoEodEgPIBEflKV+DXLjjXuejpmE4eGkIO+pXVNQsdtyB4BGbldKNmLNLBgLU4by9TUZ5L7ggvT7bHiKLWqrmc=", "AccountRegistered": true, "MembershipDonationAdded": true, "AdditionalDonationAdded": true, "AutoRenewalPaymentSaved": true, "AddOnMembershipsAdded": [ { "MembershipLevel": "sample string 1", "MembershipAmount": 2.0 }, { "MembershipLevel": "sample string 1", "MembershipAmount": 2.0 } ], "MembershipPurchaseSessionKey": "iiVKEMH2W4gw6RHe+deZIWzSHmjsQuLN4JePe9vn1tf+bUIdAJpNX64demaWtJ1EKig5Xj4SQNYG3mB0kunNZT8pUwNdwbCrtlzh+1gYxdA=", "TotalAmountAddedToCart": 7.0, "PurchaseCompleted": true, "OrderEmailSent": true, "OrderNumber": 10, "PrimaryAddressError": true, "NewSessionKey": "1VPA1X18XebX4kCxcz7OPQP6+LbncZYJjM55FzlMPsAwxTmFANzP67jowfWvn5O3PR34SbcAZxn5M6ks4P20bKM8uvpQV01n5N8zXAcW3L5gAdObTRanaXwGFu9LDab+", "Error": [ "sample string 1", "sample string 2" ], "Status": "sample string 13", "Message": "sample string 14" } }
application/xml, text/xml
Sample:
<ApiSuccessOfNewMembershipResultyx5QZ_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 14</Message> <NewSessionKey xmlns="http://schemas.datacontract.org/2004/07/SFMOMA.Data.Entities.Order">sample string 12</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">10</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 13</Status> <d2p1:AccountRegistered>true</d2p1:AccountRegistered> <d2p1:AddOnMembershipsAdded> <d2p1:AddOnMembership> <d2p1:MembershipAmount>2</d2p1:MembershipAmount> <d2p1:MembershipLevel>sample string 1</d2p1:MembershipLevel> </d2p1:AddOnMembership> <d2p1:AddOnMembership> <d2p1:MembershipAmount>2</d2p1:MembershipAmount> <d2p1:MembershipLevel>sample string 1</d2p1:MembershipLevel> </d2p1:AddOnMembership> </d2p1:AddOnMembershipsAdded> <d2p1:AdditionalDonationAdded>true</d2p1:AdditionalDonationAdded> <d2p1:AutoRenewalPaymentSaved>true</d2p1:AutoRenewalPaymentSaved> <d2p1:MembershipDonationAdded>true</d2p1:MembershipDonationAdded> <d2p1:MembershipPurchaseSessionKey>sample string 6</d2p1:MembershipPurchaseSessionKey> <d2p1:SessionKey>sample string 1</d2p1:SessionKey> <d2p1:TotalAmountAddedToCart>7</d2p1:TotalAmountAddedToCart> </Data> </ApiSuccessOfNewMembershipResultyx5QZ_PAX>