List price - מחיר של רשימת מוצרים

Get total price of items list sored from low to high.

Request parameters: 

Required
"codes" : comma delimited list of item codes or array of codes (these codes refer to item_code  field in product entity)

Optional

"include_store_data" : set  "true" for provide store data such as store name, distance and position, 

Optional Geolocation parameters  - if provided the result is limited to the distance provided corresponding to longitude and latitude: 
"longitude"
"latitude"
"distance"

Sample code: 

<php

$params = array(
    "api_key" => "API_ID", // or "access_token" => "some-token"
    "codes" => "7290006704542,6928740700544", //or "codes" => array(7290006704542,6928740700544)

    //optional store fields 
    "include_store_data" => "true",

    //all three fields need to be provided if used
    "longitude" => "34.7681144",
    "latitude" => "32.0760787",
    "distance" =>5000
);
$url = "http://api.priceli.co.il/v1/priceli/list-price";
$response = curlGET($url, $params);
$data = json_decode($response);
echoResponse($response);

if ($data->status == 1) {
    //do something with product data
} elseif ($data->status == 2) {
    echo "No data";
} else {
    echo "Error occur: " . $data->message;
}

function echoResponse($response){
    echo '<html><head><meta charset="UTF-8"></head><body>';
    echo $response;
    echo '</body></html>';
}

function curlGET($url, $data, &$errorBuf = null) {
    if ($data == null) {
        $data = array();
    }
    $url = $url . "?" . http_build_query($data);

    $curl = curl_init();
    curl_setopt_array($curl, array(
        CURLOPT_RETURNTRANSFER => 1,
        CURLOPT_URL => $url,
    ));
    $response = curl_exec($curl);
    if (!$response) {
        $response = false;
        if ($errorBuf != null) {
            $errorBuf = curl_error($curl);
        }
    }
    curl_close($curl);
    return $response;
}


?>

Sample Response : 
{
  "status": 1,
  "count": 1,
  "total": 1,
  "pageLimit": -1,
  "pageNum": 1,
  "data": [
    {
      "chain_id": "7290492000005",
      "store_id": "501",
      "price": "16.60",
      "geolocation": "POINT(34.7681144 32.0760787)",
      "distance": "0"
    }
    .....
  ],
  
}