Sending request with filters

When searching for lists of itmes (products or promotions) it is possible to construct a filter on the client side and send this filter to the server. This provide more flexability then just using query by example by sending parameters with given value. To send a filter the "filters" field need to be sent in a way thatr is cistructed as an associative array (in terms of PHP) or multilevel HashMap (in terms of Java).

A syntax for setting a single condition is:

$filters[ column-name ] => array("conditional" => [ condition-name ] ,  values => [either single value or array])

Condition-Name is one of the below values:




Sample code: 
$filter = array(
    "chain_id" => array("conditional" => "EQUAL_TO",  "values" =>  "7290492000005"),
    "store_id" => array("conditional" => "IN",  "values" =>  array(501, 502)),
    "item_code" => array("conditional" => "EQUAL_TO",  "values" =>  "4014400901191"),

$params = array(
    "api_key" => "YOUR_API_KEY", // or "access_token" => "some-token"
    "filter" => $filter
$url = "" ;
$response = curlGET($url, $params);
$data = json_decode($response);
echo $response;

if ($data->status == 1) {
    //do something with product data

} else {
    echo "Error occur: " . $data->message;