API v1 Reference

Update Individual Account

Use this request to edit standard and custom field data for a particular individual account.

REST

Request

https://api.neoncrm.com/neonws/services/api/account/updateIndividualAccount?userSessionId=[session id]&individualAccount.accountId=123814&individualAccount.primaryContact.contactId=125443&individualAccount.primaryContact.firstName=Jennifer&individualAccount.primaryContact.lastName=Example

Danger!

If you include a blank parameter:

&individualAccount.primaryContact.phone1=

Any existing data will be deleted.

Also, if you fail to include a field parameter in your request, any existing data in that field will be deleted. In practical terms, to use this method to update data from an existing account, you'll want to:

  1. Retrieve the complete account data using Retrieve Individual Account
  2. Populate all of that data into the parameters specified in this method
  3. Submit this request to the server.

Updating Addresses

When updating individual accounts, if your request includes an existing address, you must include individualAccount.primaryContact.addresses.address.addressId in order to avoid creating duplicate addresses. Passing data to address fields without an address ID will create a new address on the account, which can result in many unwanted addresses on the account.

Custom Fields

Through this API method, you can create Account Custom Field data. You cannot add data to Individual custom fields.

Custom fields have three parameters: .fieldId, .fieldOptionId, and .fieldValue. Text/textarea fields do not need any data supplied in the .OptionId field but you must include the parameter, left blank. In the same vein, select/radio fields will not need any data in the .fieldValue parameter, but you must include it (blank).

These parameters may be repeated as many times as desired to add data to multiple custom fields.

Text/Textarea Example:

&individualAccount.customFieldDataList.customFieldData.fieldId=22
&individualAccount.customFieldDataList.customFieldData.fieldOptionId=
&individualAccount.customFieldDataList.customFieldData.fieldValue=EXAMPLETEXT

Select Menu/Radio Example:

&individualAccount.customFieldDataList.customFieldData.fieldId=45
&individualAccount.customFieldDataList.customFieldData.fieldOptionId=47
&individualAccount.customFieldDataList.customFieldData.fieldValue=

Response

{ "updateIndividualAccountResponse": { 
    "operationResult": "SUCCESS", 
    "responseMessage": "Account updated.", 
    "responseDateTime": "2012-12-25T20:41:10.989-06:00", 
    "accountId": 123814 } 
}

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:updateindividualaccountrequest>
             <usersessionid>T1397099757687</usersessionid>
             <individualaccount>
                <accountid>5643</accountid>
                <primarycontact>
                   <contactid>5712</contactid>
                   <firstname>xiao</firstname>
                   <lastname>ma</lastname>
                   <middlename></middlename>
                   <preferredname>Michelle</preferredname>
                   <gender>
                      <code>F</code>
                      <name>Female</name>
                   </gender>
                   <email1>michelle_a03@yahoo.com.z2</email1>
                   <email2>.z2</email2>
                   <deceased>false</deceased>
                   <addresses></addresses>
                </primarycontact>
             </individualaccount>
          </neon:updateindividualaccountrequest>
       </soapenv:body>
    </soapenv:header>
</soapenv:envelope>

Response

<soap:envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:body>
      <ns2:updateindividualaccountresponse xmlns:ns2="http://www.z2systems.com/schemas/neonws/">
         <operationresult>SUCCESS</operationresult>
         <responsemessage>Account updated.</responsemessage>
         <responsedatetime>2014-04-09T22:19:39.745-05:00</responsedatetime>
         <accountid>5643</accountid>
      </ns2:updateindividualaccountresponse>
   </soap:body>
</soap:envelope>

Request Parameters

Name Required Description
individualAccount.accountId Yes Account ID to be updated.
individualAccount.primaryContact.contactId Yes Contact ID to be updated. This can be retrieved from the Retrieve Individual Account method.
individualAccount.primaryContact.firstName Yes
individualAccount.primaryContact.lastName Yes
individualAccount.primaryContact.middleName
individualAccount.primaryContact.prefix Possible values come from the List Prefixes request.
individualAccount.primaryContact.suffix
individualAccount.primaryContact.preferredName
individualAccount.primaryContact.salutation
individualAccount.primaryContact.email1
individualAccount.primaryContact.email2
individualAccount.primaryContact.email3
individualAccount.primaryContact.phone1
individualAccount.primaryContact.phone1Type Possible values: Home, Work, Mobile
individualAccount.primaryContact.phone2
individualAccount.primaryContact.phone2Type Possible values: Home, Work, Mobile
individualAccount.primaryContact.phone3
individualAccount.primaryContact.phone3Type Possible values: Home, Work, Mobile
individualAccount.primaryContact.fax
individualAccount.primaryContact.dob Date format: YYYY-MM-DD
individualAccount.primaryContact.gender.code Possible values can be retrieved using the List Genders method. You must submit either code or name.
individualAccount.primaryContact.gender.name Possible values can be retrieved using the List Genders method. You must submit either code or name.
individualAccount.primaryContact.deceased Possible values: true, false
individualAccount.primaryContact.title
individualAccount.primaryContact.department
individualAccount.primaryContact.addresses.address.addressId The address ID representing an existing address attached to the account.

This address ID should be used instead of the address fields below when updating accounts in order to avoid creating duplicate addresses!

individualAccount.primaryContact.addresses.address.isPrimaryAddress Whether this address is the primary address. Possible values: true, false
individualAccount.primaryContact.addresses.address.addressType.id Possible values can be retrieved from the List Address Types method. You must submit either id or name.
individualAccount.primaryContact.addresses.address.addressType.Name Possible values can be retrieved from the List Address Types method. You must submit either id or name.
individualAccount.primaryContact.addresses.address.addressLine1
individualAccount.primaryContact.addresses.address.addressLine2
individualAccount.primaryContact.addresses.address.addressLine3
individualAccount.primaryContact.addresses.address.addressLine4
individualAccount.primaryContact.addresses.address.city
individualAccount.primaryContact.addresses.address.state.code Possible values can be retrieved from the List States method. You must submit either code or name.
individualAccount.primaryContact.addresses.address.state.name Possible values can be retrieved from the List States method. You must submit either code or name.
individualAccount.primaryContact.addresses.address.province Only used for countries other than US and Canada. Canadian provinces can be found in the States field. Note: If you send a value for either state.code or state.name, the value in the province field will be ignored.
individualAccount.primaryContact.addresses.address.county
individualAccount.primaryContact.addresses.address.country.id Possible values can be retrieved from the List Countries method. You must submit either id or name.
individualAccount.primaryContact.addresses.address.country.name Possible values can be retrieved from the List Countries method. You must submit either id or name.
individualAccount.primaryContact.addresses.address.zipCode
individualAccount.primaryContact.addresses.address.zipCodeSuffix
individualAccount.primaryContact.addresses.address.startDate Format: YYYY-MM-DD
individualAccount.primaryContact.addresses.address.endDate Format: YYYY-MM-DD
individualAccount.noSolicitation This corresponds to the Do Not Contact field. Possible values: true, false.
individualAccount.url
individualAccount.login.username If username is provided, password must also be provided.
individualAccount.login.password If password is provided, username must also be provided.
individualAccount.login.orgId
individualAccount.customFieldDataList.customFieldData.fieldId Retrieve possible account custom fields from the List Custom Fields request.
individualAccount.customFieldDataList.customFieldData.fieldValue Required if the custom field type is a text field.
individualAccount.customFieldDataList.customFieldData.fieldOptionId Required if the custom field type is not a text field. Possible values can be retrieved from the List Custom Fields request.
individualAccount.source.id Possible values can be retrieved from the List Sources method. You must submit either ID or name.
individualAccount.source.name Possible values can be retrieved from the List Sources method. You must submit either ID or name.
individualAccount.existingOrganizationId Include the Account ID of an organization account to link this individual as a company contact.
individualAccount.organizationName If not linked to an organization account, a name can be used. This will not link to an existing organization account.
individualAccount.individualTypes.individualType.id Possible values can be retrieved from the List Individual Types method. You must submit either ID or name.
individualAccount.individualTypes.individualType.name Possible values can be retrieved from the List Individual Types method. You must submit either ID or name.
individualAccount.twitterPage
individualAccount.facebookPage
consentInformation.emailConsentStatus Possible values: GIVEN, DECLINED, NOT_ASKED. Default value is NOT_ASKED.
consentInformation.phoneConsentStatus Possible values: GIVEN, DECLINED, NOT_ASKED. Default value is NOT_ASKED.
consentInformation.mailConsentStatus Possible values: GIVEN, DECLINED, NOT_ASKED. Default value is NOT_ASKED.
consentInformation.smsConsentStatus Possible values: GIVEN, DECLINED, NOT_ASKED. Default value is NOT_ASKED.
consentInformation.dataSharingConsentStatus Possible values: GIVEN, DECLINED, NOT_ASKED. Default value is NOT_ASKED.

Response Parameters

Name Required Description
accountId Yes Account ID

Error Codes

Code Text Description
10001 Contact first name is required.
10002 Contact last name is required.
10003 ExistingOrganizationId is invalid organization cannot be found.
10004 Only one of the field can be provided existingOrganizationId or organizationName.
10005 IndividualType id or name is required.
10006 IndividualType id or name is invalid.
10007 Contact gender code or name is invalid.
10008 Address addressType id or name is invalid.
10009 Address country id or name is invalid.
10010 Address state id or name is invalid.
10011 Login username is required.
10012 Login username is already exist.
10013 Login password is required.
10014 Source id or name is invalid.
10015 CustomField id is required.
10016 CustomField id is invalid.
10017 CustomField option value is required.
10018 CustomField optionId is required.
10019 CustomField optionId is invalid.
10020 CustomField duplicated optionIds are found.
10021 CustomField duplicated fieldIds are found.
10022 IndividualType duplicated ids are found.
10023 One and only one of the addresses can be primary address.
10024 Contact id is required.
10025 Contact id is invalid.
10030 Individual account id is required.
10031 Individual account id is invalid.
10036 Address id is invalid
10037 Address id is invalid given address id does not belong to this primary contact.