Search Records

Purpose

To search records using field values.

Request URL

https://fsm.zoho.com/fsm/v1/<module_api_name>/search

module_api_name - The API name of the module whose record you want to search

Request Method

GET

Scope

scope=ZohoFSM.modules.<module_name>.READ

Parameters

NameData TypeDescriptionMandatory
api_nameStringAPI name of field to be searched onYes
valueStringField value with which to perform the searchYes
comparatorString

Use this parameter to determine how the search should be performed.

The values allowed are:

contains: will fetch records whose field value or a substring of the field value matches the search string

equal: will fetch records whose field value exactly matches the search string

Unless specified the contains operator will be considered. The comparator parameter is currently supported for the auto-generated field - Name

 
pageIntegerTo get the list of records from the respective pages. Default value for page is 1. 
per_pageIntegerTo get the list of records available per page. Default value for page is 200. 

Supported Modules and Fields

Module NameAPI NameField Name
ContactsContactsEmail, Last_Name, Mobile, Phone, ZBilling_Id, ZCRM_Id
CompaniesCompaniesCompany_Name, ZBilling_Id, ZCRM_Id
RequestsRequestsName
EstimatesEstimatesName
WorkOrdersWork_OrdersName, ZCRM_Deals_Id*
ServiceAppointmentsService_AppointmentsName
Service_And_PartsService_And_PartsName, ZBilling_Id, ZCRM_Id
AssetsAssetsName

*This is the ID of the Zoho CRM Deal from which the work order was created.

Sample Request

Copiedcurl --request GET 'https://fsm.zoho.com/fsm/v1/Companies/search?api_name=Company_Name&value=test' \
--header 'Authorization: Zoho-oauthtoken 1000.xxxx.xxxxxe'

Sample Success Response

Copied{
   "data": [
       {
           "Owner": {
               "name": "Harry",
               "id": "111112000000032788",
               "email": "harry@zohotest.com"
           },
           "Phone": "12",
           "Company_Type": "Analyst",
           "Website": "www.zoho.com",
           "Company_Name": "Test Company",
           "id": "111112000000038009"
       }
   ],
   "info": {
       "per_page": 200,
       "count": 1,
       "page": 1,
       "more_records": false
   }
}

Sample Failure Response

Copied{
       "code": "INVALID_DATA",
       "details": {
           "supported_values": [
               "Name"
           ]
       },
       "message": "Unsupported field for search",
       "status": "error"
   }

Sample Failure Response

Copied{
       "code": "INVALID_DATA",
       "details": {},
       "message": "Invalid module specified for search",
       "status": "error"
   }

Sample Failure Response

Copied{
       "code": "INVALID_REQUEST",
       "details": {},
       "message": "unable to process your request. please verify whether you have entered proper method name, parameter and parameter values.",
       "status": "error"
   }