Here is the quickest example to search for a record in a module. Here we are considering accounts module to search for a particular column
$curl = curl_init(); $fields_array = array('first_name','last_name','phone_work'); $parameters = array( 'session' => 'q7eqra428itj506ipkei2fnfk4', //Session ID 'module_name' => 'Accounts', //Module name 'query' => " accounts_cstm.account_number = '01234567890' ", //Where condition without "where" keyword 'order_by' => " accounts.id ", //$order_by 'offset' => 0, //offset 'select_fields' => [], //select_fields 'link_name_to_fields_array' => array(array()),//optional 'max_results' => 5, //max results 'deleted' => 'false', //deleted ); $json = json_encode($parameters); $postArgs = array( 'method' => 'get_entry_list', 'input_type' => 'JSON', 'response_type' => 'JSON', 'rest_data' => $json, ); curl_setopt($curl, CURLOPT_POSTFIELDS, $postArgs); curl_setopt($curl, CURLOPT_URL, 'http://suitecrmtest.localhost/service/v4_1/rest.php'); //die; //die; $response = curl_exec($curl);
Code above will get records that matches account number. We can put more conditions in query value. with ‘AND’ & ‘OR’ with more columns & values.
Thank you.