List Accounts
This is the general-purpose account search request. Use this to formulate a search request by defining the search terms and the output columns. Results are paginated, but the page size can be defined in your request. Also, a combination of search parameters uses AND logic. You cannot search [parameter 1 = this] OR [parameter 2 = this] using this request.
This sample request searches for any accounts that match the specified email address. It returns the columns Account ID, First Name, Last Name, and Email Address.
REST
Request
https://api.neoncrm.com/neonws/services/api/account/listAccounts?responseType=json&userSessionId=[session id]&outputfields.idnamepair.id=&outputfields.idnamepair.name=Account%20ID&outputfields.idnamepair.id=&outputfields.idnamepair.name=First%20Name&outputfields.idnamepair.id=&outputfields.idnamepair.name=Last%20Name&outputfields.idnamepair.id=&outputfields.idnamepair.name=Email%201&searches.search.key=Email&searches.search.searchOperator=EQUAL&searches.search.value=test@test.net
Response
{
"listAccountsResponse":{
"operationResult":"SUCCESS",
"responseDateTime":"2013-01-24T09:54:14.142-06:00",
"page":{
"currentPage":1,
"pageSize":10,
"totalPage":1,
"totalResults":4},
"searchResults":{
"nameValuePairs":[
{"nameValuePair":[
{"name":"Account Id","value":5643},
{"name":"First Name","value":"Michelle"},
{"name":"Last Name","value":"Abraham"},
{"name":"Email","value":"test@test.net"}
]},
{"nameValuePair":[
{"name":"Account Id","value":5691},
{"name":"First Name","value":"Diego"},
{"name":"Last Name","value":"Arambula"},
{"name":"Email","value":"test@test.net"}
]},
{"nameValuePair":[
{"name":"Account Id","value":5722},
{"name":"First Name","value":"Elizabeth"},
{"name":"Last Name","value":"Bachrad"},
{"name":"Email","value":"test@test.net"}
]},
{"nameValuePair":[
{"name":"Account Id","value":5791},
{"name":"First Name","value":"alex"},
{"name":"Last Name","value":"baillard"},
{"name":"Email","value":"test@test.net"}
]},
]}
}
}
}
Valid Fields
Search Fields
Output Columns
Radius Searching
Location-based searching can be enabled for a NeonCRM system as a paid premium feature. If enabled, you may retrieve accounts whose primary address is within a radius of a specific point. To do this, use the Address Distance field as a search criterion. The value provided must follow a specific format. Here’s an example of the query parameters to execute this search:
&searches.search.key=Address%20Distance&searches.search.searchOperator=EQUAL&searches.search.value={"longitude":"-87.6768733","latitude":"41.9566948","distance":"50M"}
Latitude and longitude of the center of the search radius must be provided. The distance is also required and can use either “M” for miles or “K” for kilometers.