Hi, I can see there is an update with the CM360 API to v4.0.
I am using the Google sheets and app sheet to bulk upload the advertisers and getting an error “Service not found: dfareporting v3.5”. Could you let me know what I need to change to get it working for the API?
/**
* Use DCM API to Create Advertisers in the specified floodlight configuration, print ID out on the sheet
*/
function bulkInsertAdvertisers() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getSheetByName(INSERT_ADVERTISERS);
// This represents ALL the data
var range = sheet.getDataRange();
var values = range.getValues();
const profile_id = _fetchProfileId();
// build request body resources
for (var i = 1; i < values.length; ++i) {
var currentRow = i + 1;
var currentPlacement = values[i];
var advertiser_name = currentPlacement[0];
var advertiserGroupId = currentPlacement[2]; //Changed by kam
var floodlightConfigId = currentPlacement[3];
var subaccountId = currentPlacement[4];
var resource = {
"name": advertiser_name,
"advertiserGroupId": advertiserGroupId, //Changed by kam
//"floodlightConfigurationId": floodlightConfigId,
"subaccountId": subaccountId
};
var newAdvertiser = dfareporting.advertisers
.insert(resource, profile_id);
sheet.getRange("B" + currentRow)
.setValue(newAdvertiser.id).setBackground(AUTO_POP_CELL_COLOR);
}
}
Thanks,
If you are facing any issues while using the CM360 API, you may share the below information:
![]() |
DCM API Team |