This adds a household record to an account. The account will become the primary contact by default.
REST
Request
https://api.neoncrm.com/neonws/services/api/account/createHouseHold?&userSessionId=[session id]&houseHold.name=test1&houseHold.houseHoldContacts.houseHoldContact.accountId=3481&houseHold.houseHoldContacts.houseHoldContact.relationType.id=20&houseHold.houseHoldContacts.houseHoldContact.isPrimaryHouseHoldContact=true
Response
{ "createHouseHoldResponse": {
"operationResult": "SUCCESS",
"responseMessage": "Household created.",
"responseDateTime": "2012-12-27T02:09:44.388-06:00",
"houseHoldId": 13 }
}
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:createhouseholdrequest>
<usersessionid>T1357624094982</usersessionid>
<household>
<name>test house hold 234</name>
<salutation>sister</salutation>
<householdcontacts>
<householdcontact>
<accountid>5787</accountid>
<relationtype>
<id>1</id>
</relationtype>
<isprimaryhouseholdcontact>true</isprimaryhouseholdcontact>
</householdcontact>
<householdcontact>
<accountid>5788</accountid>
<relationtype>
<id>1</id>
</relationtype>
<isprimaryhouseholdcontact>false</isprimaryhouseholdcontact>
</householdcontact>
</householdcontacts>
</household>
</neon:createhouseholdrequest>
</soapenv:body>
</soapenv:header>
</soapenv:envelope>
Response
<soap:envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:body>
<ns2:createhouseholdresponse xmlns:ns2="http://www.z2systems.com/schemas/neonws/">
<operationresult>SUCCESS</operationresult>
<responsemessage>Household created.</responsemessage>
<responsedatetime>2013-01-08T00:15:46.868-06:00</responsedatetime>
<householdid>27</householdid>
</ns2:createhouseholdresponse>
</soap:body>
</soap:envelope>
Request Parameters
Name |
Required |
Description |
houseHold.houseHoldContacts.houseHoldContact.accountId |
Yes |
This is the account ID for a household contact. |
houseHold.houseHoldContacts.houseHoldContact.relationType.id |
Yes |
The relation type ID can be retrieved from the List Relation Types method. |
houseHold.houseHoldContacts.houseHoldContact.relationType.name |
|
The relation type ID can be retrieved from the List Relation Types method. This is only required when an ID is not provided. |
houseHold.name |
Yes |
Household Name |
houseHold.salutation |
|
Household Salutation |
houseHold.houseHoldContacts.houseHoldContact.isPrimaryHouseHoldContact |
Yes |
Indicates this account is the primary contact. Possible values: true, false. |
Response Parameters
Name |
Required |
Description |
houseHoldId |
Yes |
Household ID |
Error Codes
Code |
Text |
Description |
10151 |
Household name is required. |
|
10152 |
Household contact is required. |
|
10153 |
One and only One of the Household contact can be primary contact. |
|
10154 |
Household relation type is required. |
|
10155 |
Household relation type is invalid. |
|
10156 |
Household contact accountId is required. |
|
10157 |
Household contact accountId is invalid. |
|
10158 |
Given Household account is already a primary contact in another household. |
|