Reputation: 13
Kind of stuck with this. I was able to request for a report using "SubmitGenerateReport" API for GeographicalPerformanceReportRequest and it responded with a report ID. Attached the response I got from the API call using Postman.
Attaching the API request as well.
<s:Envelope xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header xmlns="https://bingads.microsoft.com/Reporting/v13">
<AuthenticationToken i:nil="false">tokenhere</AuthenticationToken>
<Action mustUnderstand="1">SubmitGenerateReport</Action>
<CustomerAccountId i:nil="false">accountID here</CustomerAccountId>
<CustomerId i:nil="false">customerId here</CustomerId>
<DeveloperToken i:nil="false">Developer token here</DeveloperToken>
</s:Header>
<s:Body>
<SubmitGenerateReportRequest xmlns="https://bingads.microsoft.com/Reporting/v13">
<ReportRequest i:nil="false" i:type="GeographicPerformanceReportRequest">
<Format i:nil="false">Csv</Format>
<ReportName i:nil="false">reportName1</ReportName>
<!--These fields are applicable if the derived type attribute is set to AccountPerformanceReportRequest-->
<Aggregation>Summary</Aggregation>
<Columns i:nil="false">
<GeographicPerformanceReportColumn>CampaignName</GeographicPerformanceReportColumn>
<GeographicPerformanceReportColumn>Ctr</GeographicPerformanceReportColumn>
<GeographicPerformanceReportColumn>Spend</GeographicPerformanceReportColumn>
</Columns>
<Scope i:nil="false">
<AccountIds i:nil="false" xmlns:a1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<a1:long>accountID here</a1:long>
</AccountIds>
</Scope>
<Time i:nil="false">
<PredefinedTime i:nil="false">Last30Days</PredefinedTime>
<ReportTimeZone i:nil="false">EasternTimeUSCanada</ReportTimeZone>
</Time>
</ReportRequest>
</SubmitGenerateReportRequest>
</s:Body>
</s:Envelope>
I got the download URL like the this from the PollGenerateReport API when I passed the report ID I got from SubmitGenerateReport API.
Response from PollGenerateReport
Payload for PollGenerateReport
<s:Envelope xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header xmlns="https://bingads.microsoft.com/Reporting/v13">
<Action mustUnderstand="1">PollGenerateReport</Action>
<AuthenticationToken i:nil="false">token here</AuthenticationToken>
<CustomerAccountId i:nil="false">accountId here</CustomerAccountId>
<CustomerId i:nil="false">customer Id here</CustomerId>
<DeveloperToken i:nil="false">Developer token here</DeveloperToken>
</s:Header>
<s:Body>
<PollGenerateReportRequest xmlns="https://bingads.microsoft.com/Reporting/v13">
<ReportRequestId i:nil="false">1171543907220_1694422237806</ReportRequestId>
</PollGenerateReportRequest>
</s:Body>
</s:Envelope>
But, when I try to download the report using the URL provided, it says Resource not found error and throws the following.
The specified resource does not exist
Am I missing anything? Any leads appreciated. TIA.
Upvotes: 1
Views: 315
Reputation: 452
I just had a same response, it may help someone in the future.
When you get ReportDownloadUrl value, you need to replace &
with &
first. Then use the URL to download the zip file.
Upvotes: 2