Jump to content

Recommended Posts

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"
		)];

 

Edited by Mike1020
Added a link for ReportTime data object
Link to comment
https://forums.phpfreaks.com/topic/310226-nested-soap-request/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.