Bing Ads - SubmitReportRequest -> InvalidReportTimeSelection

sachin gupta 376 Reputation points
2021-10-08T02:22:48.267+00:00

Hello,

I am trying to submit a report request for Bing Ads. I am stuck at the <Time> Attribute. Below is the scenario

<Time i:nil="false">
          <CustomDateRangeEnd i:nil="false">
            <Day>06</Day>
            <Month>10</Month>
            <Year>2021</Year>
          </CustomDateRangeEnd>
          <CustomDateRangeStart i:nil="false">
             <Day>06</Day>
            <Month>10</Month>
            <Year>2021</Year>
          </CustomDateRangeStart>
          <PredefinedTime i:nil="false">Yesterday</PredefinedTime>
          <ReportTimeZone i:nil="false">EasternTimeUSCanada</ReportTimeZone>
        </Time>

As per Microsoft documentation we can pass either the CustomDateRange or the PredefinedTime. In my case, If I omit one of them I get the error code 2003 AccountNotAuthorized and if I use both CustomDateRage and PredefinedTime then i get error code 2008 InvalidReortTimeSelection.

I don't understand what I am doing wrong here. I am following the documentation and still not able to figure this out. Can someone please help on this?

Thanks

Microsoft Advertising API
Microsoft Advertising API
A Microsoft API that provides programmatic access to Microsoft Advertising to manage large campaigns or to integrate your marketing with other in-house systems.
402 questions
{count} votes