List Households

Use this request to retrieve households associated with a given account, or retrieve a specific household.

REST

Request

https://api.neoncrm.com/neonws/services/api/account/listHouseHolds?&userSessionId=[session id]&accountId=7

Response

{ "listHouseHoldsResponse": { 
    "operationResult": "SUCCESS", 
    "responseMessage": "1 records was found.", 
    "responseDateTime": "2012-12-27T01:57:15.857-06:00", 
    "houseHolds": { 
        "houseHold": { 
            "houseHoldId": 1, 
            "houseHoldContacts": { 
                "houseHoldContact": { 
                    "accountId": 7, 
                    "isPrimaryHouseHoldContact": true 
                    } 
                }
            }
        }
    }
}

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:listhouseholdsrequest>
             <usersessionid>T1357624094982</usersessionid>
             <householdid>28</householdid>
          </neon:listhouseholdsrequest>
       </soapenv:body>
    </soapenv:header>
</soapenv:envelope>

Response

<soap:envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:body>
      <ns2:listhouseholdsresponse xmlns:ns2="http://www.z2systems.com/schemas/neonws/">
         <operationresult>SUCCESS</operationresult>
         <responsemessage>1 records were found.</responsemessage>
         <responsedatetime>2013-01-08T00:46:00.995-06:00</responsedatetime>
         <households>
            <household>
               <householdid>28</householdid>
               <name>test house hold 234</name>
               <salutation>sister</salutation>
               <householdcontacts>
                  <householdcontact>
                     <accountid>5787</accountid>
                     <relationtype>
                        <id>1</id>
                        <name>Spouse</name>
                     </relationtype>
                     <isprimaryhouseholdcontact>true</isprimaryhouseholdcontact>
                  </householdcontact>
                  <householdcontact>
                     <accountid>5788</accountid>
                     <relationtype>
                        <id>1</id>
                        <name>Spouse</name>
                     </relationtype>
                     <isprimaryhouseholdcontact>false</isprimaryhouseholdcontact>
                  </householdcontact>
               </householdcontacts>
            </household>
         </households>
      </ns2:listhouseholdsresponse>
   </soap:body>
</soap:envelope>

Request Parameters

Name Required Description
accountId Yes * Account ID. Either this or Household ID are required.
houseHoldId Yes * Household ID. Either this or Account ID are required.

Response Parameters

Name Required Description
household.householdId Yes The ID of the household to be updated.
household.householdContacts.householdContact.accountId Yes This is the account ID for a household contact.
household.householdContacts.househouldContact.isPrimaryHouseHoldContact Yes Indicates this account is the primary contact. Possible values: true, false.
household.householdContacts.householdContact.relationType.id Yes The relation type ID can be retrieved from the List Relation Types method.
household.householdContacts.househouldContact.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 Household Name
household.salutation Household Salutation

Error Codes

Code Text Description
10220 Household id or account id is required.
10221 Household id is required.
10222 Account id is invalid.
10223 Household id and account id do not match.