Hi, I am attempting to download a report from Bing Ads, and am having issues with the level of nesting on the SOAP request for the date, (specifically 'Time' = >....) Definitely appreciate the help!
SOAP elements can be found at https://docs.microsoft.com/en-us/advertising/reporting-service/date?view=bingads-13 for date and https://docs.microsoft.com/en-us/advertising/reporting-service/reporttime?view=bingads-13 using CustomDateRangeStart and CustomDateRangeEnd
$request = [
'ReportRequest' => new SoapVar(
[
'Format' => 'Csv',
'ReportName' => 'Bing Keyword Performance Report',
'ReturnOnlyCompleteData' => false,
'Aggregation' => 'Daily',
'Sort' => ['SortColumn' => 'Clicks'],
'Sort' => ['SortOrder' => 'Ascending'],
'Scope' => [['AccountIds' => [...]],
['CampaignId' => null],
['AdGroupId' => [...]]],
'Time' => ['CustomDateRangeStart' =>
['Date' => ['Day' => $startDay],['Month' => $startMonth],['Year' => $startYear]]],
'Time' => ['CustomDateRangeEnd' =>
['Date' => ['Day' => $endDay],['Month' => $endMonth],['Year' => $endYear]]],
'Filter' => ['BidMatchType' => [$mt]],
'Keywords' => array($criteriaValue),
'Columns' => [
"TimePeriod",
"Spend",
"Clicks",
"CurrentMaxCpc",
"Impressions",
"AverageCpc",
"TopVsOther",
"QualityScore",
"CampaignStatus",
"AdGroupStatus",
"BidMatchType",
"AdGroupName"
]
],
SOAP_ENC_OBJECT,
'KeywordPerformanceReportRequest',
"https://bingads.microsoft.com/Reporting/v13"
)];