API v1 Reference

Create Pledge

The Create Pledge request creates a pledge record on the account of an individual or organization. The account must exist before the pledge can be created. A pledge initially has no payments associated with it. Use the Create Pledge Payment request to make a payment towards a pledge.

REST

Request

https://api.neoncrm.com/neonws/services/api/donation/createPledge?userSessionId=T1361502539704&pledge.accountId=123942&pledge.amount=49&pledge.purpose.id=26&pledge.campaign.id=243&pledge.fund.id=11&pledge.donorName=xiao ma&pledge.date=2012-12-12&pledge.acknowledgee.name=Andrew Jones&pledge.acknowledgee.email=ajones@z2systems.com&pledge.acknowledgee.address.addressLine1=14/284 Sussex Street&pledge.acknowledgee.address.city=Chicago&pledge..acknowledgee.address.state.code=IL&pledge..acknowledgee.address.country.id=1&pledge..acknowledgee.address.zipCode=503947&pledge.honorMemory.name=xiao&pledge.honorMemory.type=Memory&pledge.customFieldDataList.customFieldData.fieldId=603&pledge.customFieldDataList.customFieldData.fieldOptionId=2295&pledge.source.id=12&pledge.solicitation.id=6&pledge.anonymousType=DonorNameAnonymous

Response

{
    "createPledge": {
        "operationResult": "SUCCESS",
        "responseDateTime": "2013-02-21T21:15:26.131-06:00",
        "pledgeId": 41727
    }
}

SOAP

Request

<soapenv:envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:neon="http://www.z2systems.com/schemas/neonws/">
   <soapenv:header>
       <soapenv:body>
          <neon:createpledgerequest>
             <usersessionid>T1361753723533</usersessionid>
             <pledge>
               <accountid>123941</accountid>
                <amount>41</amount>
                <purpose>
                   <id>26</id>
                </purpose>
               <campaign>
                   <id>243</id>
                </campaign>
               <fund>
                   <id>11</id>
                </fund>
               <donorname>Xiao Ma</donorname>
                <date>2012-02-24</date>
                <acknowledgee>
                  <name>Andrew Jones</name>
                   <email>ajones@z2systems.com</email>
                   <address>
                     <addressline1>14/284 Sussex Street</addressline1>
                      <addressline2></addressline2>
                      <addressline3></addressline3>
                      <addressline4></addressline4>
                      <city>Chicago</city>
                      <state>
                         <code>IL</code>
                      </state>
                      <country>
                         <id>1</id>
                      </country>
                      <zipcode>610000</zipcode>
                      <zipcodesuffix>235</zipcodesuffix>
                   </address>
                </acknowledgee>
                <honormemory>
                   <name>xiao</name>
                   <hmtype>Memory</hmtype>
                </honormemory>
                <customfielddatalist>
                   <customfielddata>
                      <fieldid>603</fieldid>
                      <fieldoptionid>2295</fieldoptionid>
                   </customfielddata>
                </customfielddatalist>
                <source>
                   <id>12</id>

                <solicitation>
                   <id>6</id>
                </solicitation>
                <anonymoustype>DonorNameAnonymous</anonymoustype>
             </pledge>
          </neon:createpledgerequest>
       </soapenv:body>
    </soapenv:header>
</soapenv:envelope>

Response

<soap:envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:body>
      <ns2:createpledgeresponse xmlns:ns2="http://www.z2systems.com/schemas/neonws/">
         <operationresult>SUCCESS</operationresult>
         <responsedatetime>2013-02-24T19:16:05.468-06:00</responsedatetime>
         <pledgeid>41735</pledgeid>
      </ns2:createpledgeresponse>
   </soap:body>
</soap:envelope>

Request Parameters

Name Required Description
pledge.accountId Yes Account ID of constituent to whom this pledge will be credited
pledge.amount Yes Dollar amount of pledge
pledge.date Yes Pledge date. Format: 2012-12-30
pledge.anonymousType Possible values: No, DonorNameAnonymous, pledgeAmountAnonymous
pledge.donorName Specify the donor name if it is different from the account being credited for the pledge.
pledge.campaign.id Possible values can be retrieved from List Campaigns method. Required if campaign.name is not provided.
pledge.campaign.name Possible values can be retrieved from List Campaigns method. Required if campaign.id is not provided.
pledge.purpose.id Possible values can be retrieved from List Purposes method. Required if purpose.name is not provided.
pledge.purpose.name Possible values can be retrieved from List Purposes method. Required if purpose.id is not provided.
pledge.fund.id Possible values can be retrieved from List Funds method. Required if fund.name is not provided.
pledge.fund.name Possible values can be retrieved from List Funds method. Required if fund.id is not provided.
pledge.source.id Possible values can be retrieved from List Sources method. Required if source.name is not provided.
pledge.source.name Possible values can be retrieved from List Sources method. Required if source.id is not provided.
pledge.solicitation.id
pledge.solicitation.name
Acknowledgee
If you specify the acknowledgee fields, a new account will be created and credited as the acknowledgee for this pledge.
pledge.acknowledgee.name
pledge.acknowledgee.email
pledge.acknowledgee.address.shippingAddress
pledge.acknowledgee.address.addressType.id
pledge.acknowledgee.address.addressType.name
pledge.acknowledgee.address. addressLine1
pledge.acknowledgee.address. addressLine2
pledge.acknowledgee.address. addressLine3
pledge.acknowledgee.address. addressLine4
pledge.acknowledgee.address. city
pledge.acknowledgee.address.state.code
pledge.acknowledgee.address.state.name
pledge.acknowledgee.address.province
pledge.acknowledgee.address.county
pledge.acknowledgee.address.country.id
pledge.acknowledgee.address.country.name
pledge.acknowledgee.address.zipCode
pledge.acknowledgee.address.zipCodeSuffix
pledge.acknowledgee.address.startDate
pledge.acknowledgee.address.endDate
Honor / Memory
pledge.honorMemory.name
pledge.honorMemory.hmType
Donation Custom Fields
pledge.customFieldDataList.fieldId Donation custom fields can be retrieved from the List Custom Fields method.
pledge.customFieldDataList.fieldValue Donation custom fields can be retrieved from the List Custom Fields method.
pledge.customFieldDataList.fieldOptionId Donation custom fields can be retrieved from the List Custom Fields method.

Response Parameters

Name Required Description
pledgeId Yes The ID of the pledge record.

Error Codes

Code Text Description
51 CustomField id is invalid.
52 CustomField option value is required.
53 CustomField option id is required.
54 CustomField option id is invalid.
55 CustomField option id is duplicated.
56 CustomField id is duplicated.
10014 Source id or name is invalid.
10130 Address Type is invalid.
10133 Address country is invalid
10134 Address state is invalid
11003 Amount is required
11004 Donation date is required.
11005 Fund ID or Name is invalid
11006 Campaign ID or Name is invalid
11007 Purpose ID or Name is invalid