Individual records can be retrieved from Neon CRM using one of the myriad of retrieval methods. For larger queries, the Neon CRM API has search methods for retrieving large numbers of records from the database. These search methods are based on Neon CRM Reports and use a very similar construction to building a report in the Neon CRM UI.
Building a Search
Search queries in the Neon CRM API are constructed in 3 parts:
- Search fields
- Output fields
Similar to building search criteria for a report in Neon CRM, search fields have 3 parts:
- Search field
Valid search fields can be found in the API documentation for API v1 or by using the GET / … /searchFields methods in API v2.
Valid search operators include:
Most operators accept a value, except for
NOT_BLANK, which should be used without a value. The operators
NOT_IN_RANGE can be used to define a list of values. Check the documentation for how to format values in a list.
Output fields represent the data fields to be included in the results of your search. Valid output fields can be found in the API documentation for API v1 or by using the GET / … /outputFields methods in API v2.
In order to manage the large amount of data that can be returned when querying, Neon CRM's search methods always include pagination. The pagination object in the Neon CRM API contains several properties for managing paginated results.
pageSize to specify the number of results per page.
currentPage to jump to a certain page in the results.
sortDirection to define how the results are sorted. The
sortColumn takes a field name value from your list of output fields.
API methods related to querying.