Querying

Individual records can be retrieved from NeonCRM using one of the myriad of retrieval methods. For larger queries, the NeonCRM API has search methods for retrieving large numbers of records from the database. These search methods are based on NeonCRM Reports and use a very similar construction to building a report in the NeonCRM UI.

Search queries in the NeonCRM API are constructed in 3 parts:

  1. Search fields
  2. Output fields
  3. Pagination

Search Fields

Similar to building search criteria for a report in NeonCRM, search fields have 3 parts:

  1. Search field
  2. Operator
  3. Value
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:

  • EQUAL
  • NOT_EQUAL
  • BLANK
  • NOT_BLANK
  • LESS_THAN
  • GREATER_THAN
  • LESS_AND_EQUAL
  • GREATER_AND_EQUAL
  • IN_RANGE
  • NOT_IN_RANGE
  • CONTAIN
  • NOT_CONTAIN

Most operators accept a value, except for BLANK and NOT_BLANK, which should be used without a value. The operators IN_RANGE and 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

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.

Pagination

In order to manage the large amount of data that can be returned when querying, NeonCRM's search methods always include pagination. The pagination object in the NeonCRM API contains several properties for managing paginated results.

Use pageSize to specify the number of results per page.

Use currentPage to jump to a certain page in the results.

Use sortColumn and sortDirection to define how the results are sorted. The sortColumn takes a field name value from your list of output fields.

 

API Reference

API methods related to querying.