Zoho: Search Records by Criteria, Word, Email, or Phone
Zoho moduleSearch.searchRecords: arguments, response, policy and SDK examples.
← Module search operations · Get started
Operation zoho.searchrecords
Provider route: GET /crm/v8/{module}/search. Alter supplies the connection’s credentials and routing.
Call through Alter
Section titled “Call through Alter”Install @alter-ai/sdk @alter-ai/zoho with npm, or alter-sdk-zoho with pip. Supply your connected customer’s grant ID and the arguments described below.
import { App } from "@alter-ai/sdk";import { ZohoIntegration } from "@alter-ai/zoho";
async function execute(input: Parameters<ZohoIntegration["moduleSearch"]["searchRecords"]>[0]) { const app = new App({ apiKey: process.env.ALTER_API_KEY! }); try { const provider = new ZohoIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! }); const call = await provider.moduleSearch.searchRecords(input); const result = await call.wait(); return result.bodyJson(); } finally { await app.close(); }}import osfrom alter_sdk import Appfrom alter_sdk_zoho import ZohoIntegration
async def execute(arguments): async with App(api_key=os.environ["ALTER_API_KEY"]) as app: provider = ZohoIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]}) call = await provider.module_search.search_records(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
path | object | Required within parent | Additional keys: not allowed |
path.module | string | Required within parent | Maximum length: 100 |
query | object | Optional | Additional keys: not allowed |
query.approval_state | string | Optional | One of: approval_process_pending, webform_invalid, review_process_pending, webform_invalid_approval, zia_vision_validation, review_process_rejected, webform_unapproved, email_parser_waiting, approved, merge_pending, email_parser_rejected, zia_vision_rejected, zia_vision_pending, approval_process_rejected, webform_double_optin Maximum length: 50 |
query.criteria | string | Optional | Maximum length: 3000 |
query.converted | string | Optional | Default: false One of: true, false, both Maximum length: 10 |
query.word | string | Optional | Maximum length: 100 Minimum length: 2 |
query.email | string | Optional | Format: string Maximum length: 255 |
query.phone | string | Optional | Maximum length: 50 Minimum length: 3 Pattern: ^[+]?[0-9\s-().]+$ |
query.fields | string | Optional | Maximum length: 2000 |
query.page | integer | Optional | Default: 1 Format: int32 Minimum: 1 |
query.per_page | integer | Optional | Default: 200 Format: int32 Maximum: 200 Minimum: 1 |
query.sort_by | string | Optional | Default: id Maximum length: 100 |
query.sort_order | string | Optional | Default: desc One of: asc, desc Maximum length: 10 |
query.type | string | Optional | One of: ActiveAndDeactive, CurrentUser, DeletedUsers, ParentRoleUsers, ChildRoleUsers, DeactiveUsers, NotConfirmedUsers, ConfirmedUsers, ActiveUsers, AdminUsers, ActiveConfirmedAdmins, ActiveConfirmedUsers, DeveloperUsers, SubordinateRoleUsers, AllUsers, AllActiveUsers Maximum length: 50 |
query.include_lite_users | boolean | Optional | Default: false |
query.role_id | string | Optional | Format: int64 Maximum length: 20 |
Response
Section titled “Response”Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | JSON | Root | |
$ (anyOf 1) | object | Alternative | Represents the successful response returned by the search operation, containing the matched records and pagination metadata. Additional keys: not allowed |
$ (anyOf 1).data | array | Required within parent | Represents the list of records matching the search criteria. Maximum items: 200 |
$ (anyOf 1).data[] | object | Each item | Represents a record that matches the search criteria. Contains standard system fields and module-specific fields for the matched record. Additional keys: allowed |
$ (anyOf 1).data[].Created_By | object | Optional | Represents the user who created the record. Additional keys: not allowed |
$ (anyOf 1).data[].Created_By.email | string | Optional | Searches for records using an email address. The API searches across all email fields in the specified module and returns matching records. Format: email |
$ (anyOf 1).data[].Created_By.id | string | Required within parent | Represents the unique ID of the user who created the record. Maximum length: 50 |
$ (anyOf 1).data[].Created_By.name | string | Optional | Represents the name of the user who created the record. Maximum length: 255 |
$ (anyOf 1).data[].Created_Time | string | Optional | Represents the creation timestamp of the record. Format: date-time |
$ (anyOf 1).data[].Modified_By | object | Optional | Represents the user who last modified the record. Additional keys: not allowed |
$ (anyOf 1).data[].Modified_By.email | string | Optional | Searches for records using an email address. The API searches across all email fields in the specified module and returns matching records. Format: email |
$ (anyOf 1).data[].Modified_By.id | string | Optional | Represents the unique ID of the user who last modified the record. Maximum length: 50 |
$ (anyOf 1).data[].Modified_By.name | string | Optional | Represents the name of the user who last modified the record. Maximum length: 255 |
$ (anyOf 1).data[].Modified_Time | string | Optional | Represents the date and time when the record was last modified. Format: date-time |
$ (anyOf 1).data[].Owner | object | Optional | Represents the owner of the record. Additional keys: not allowed |
$ (anyOf 1).data[].Owner.email | string | Optional | Searches for records using an email address. The API searches across all email fields in the specified module and returns matching records. Format: email |
$ (anyOf 1).data[].Owner.id | string | Optional | Represents the unique ID of the record owner. Maximum length: 50 |
$ (anyOf 1).data[].Owner.name | string | Optional | Represents the name of the record owner. Maximum length: 255 |
$ (anyOf 1).data[].id | string | Required within parent | Represents the unique ID of the record. Maximum length: 50 |
$ (anyOf 1).info | object | Optional | Represents the pagination and sort metadata for the response. Additional keys: not allowed |
$ (anyOf 1).info.count | JSON | Optional | |
$ (anyOf 1).info.count (anyOf 1) | integer | Alternative | Represents the number of records returned in the current page. Format: int32 |
$ (anyOf 1).info.count (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
$ (anyOf 1).info.more_records | boolean | Optional | Indicates whether more records are available beyond the current page. Possible values: true - More records are available. false - No more records are available. |
$ (anyOf 1).info.page | JSON | Optional | |
$ (anyOf 1).info.page (anyOf 1) | integer | Alternative | Represents the current page number of the response. Format: int32 |
$ (anyOf 1).info.page (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
$ (anyOf 1).info.per_page | JSON | Optional | |
$ (anyOf 1).info.per_page (anyOf 1) | integer | Alternative | Specify how many records to return per page. The default and the maximum possible value is 200. Format: int32 |
$ (anyOf 1).info.per_page (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
$ (anyOf 1).info.sort_by | string | Optional | Represents the field used to sort the records in the response. Maximum length: 100 |
$ (anyOf 1).info.sort_order | string | Optional | Represents the sort direction applied to the records in the response. Possible values: asc - Ascending order. desc - Descending order. Known values: asc, desc |
$ (anyOf 2) | null | Alternative |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: zoho.searchrecords. Catalog operation: searchRecords. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.
Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.
No-content response statuses: [204]