Hey everyone, i would like to get all the products attached to one deal using the deal ID but i don’t really know how to do it.
For now i have this script that give all and more that i want about deals, but i can’t find a way to get the products informations attached to the deal.
tfunction CallAPI(deal_id) {
var deal_id = sheet.getRange(2,3).getValue();
var token ='XXXXXX';
var url = "https://company.pipedrive.com/api/v1/deals/"+ deal_id +"/products?api_token="+token;
var response = UrlFetchApp.fetch(url);
var dataSet = JSON.parse(response.getContentText());
var data = dataSet.data;
sheet.appendRow([data]);
}
Appreciate any help