can we get the deals against the organization using api?
If you mean the deals linked to an organization, yes: https://developers.pipedrive.com/docs/api/v1/#!/Organizations/get_organizations_id_deals
I don’t think that library allows you to that.
You can make a normal CURL or Guzzle request.
ok if i am making simple curl request on (https://api.pipedrive.com/v1/organizations/$orgid/deals) on this
and if i am sending the accesstoken of my current authorized user will it return that particular user’s deals etc or there is other way to approach it @dani?
$url = “https://api.pipedrive.com/v1/organizations/2/deals”;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch,CURLOPT_CUSTOMREQUEST, "GET"); //curl_setopt($ch, CURLOPT_GET, true); curl_setopt($ch, CURLOPT_HTTPHEADER, array("Authorization:Bearer ".$token, "Content-type: application/json")); //echo 'Sending request...' . PHP_EOL; $output = curl_exec($ch); curl_close($ch);
This return un authorize access, @dani