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.

If your search string contains a comma, you must escape it using a backslash and then encode it.

 
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 NameModule API NameField API Name
ContactsContactsEmail, Last_Name, Mobile, Phone, ZBilling_Id, ZCRM_Id
CompaniesCompaniesCompany_Name, ZBilling_Id, ZCRM_Id
RequestsRequestsCompany, Contact, Name, Status, Territory, ZCRM_Deals_Id*, ZCRM_Deals_Name*
EstimatesEstimatesCompany, Contact, Name, Status, Territory, ZCRM_Deals_Id*, ZCRM_Deals_Name*
WorkOrdersWork_OrdersCompany, Contact, Name, Status, Territory, ZCRM_Deals_Id*, ZCRM_Deals_Name*
ServiceAppointmentsService_AppointmentsCompany, Contact, Name, Status, Territory
Service_And_PartsService_And_PartsName, ZBilling_Id, ZCRM_Id
AssetsAssetsName
TerritoriesTerritoriesName, City, State, Country, Zip_Code

*This is the ID/Name of the Zoho CRM Deal from which the Zoho FSM record was created.

‡ If you search by the Completed status, then the records fetched will be in descending order of completed time (recently completed ones first).

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"
   }