Issue with Campaign Management Report API

Karthik YR 0 Reputation points
2024-11-27T07:06:31.58+00:00

We are facing issue with microsoft advertising reporting api. I am trying to call campaign management reporting api with below request.

Request ::

{
    "reportRequest": {
        "type": "CampaignPerformanceReportRequest",
        "excludeColumnHeaders": false,
        "excludeReportFooter": false,
        "excludeReportHeader": false,
        "format": "Csv",
        "formatVersion": "2.0",
        "reportName": "My report",
        "returnOnlyCompleteData": true,
        "aggregation": "Daily",
        "columns": {
            "campaignPerformanceReportColumns": [
                "TimePeriod",
                "AccountName",
                "AccountId",
                "CampaignName",
                "CampaignId",
                "Impressions",
                "Clicks",
                "Conversions",
                "Spend"
            ]
        },
        "scope": {
            "accountIds": null,
            "campaigns": {
                "campaignReportScopes": [
                    {
                        "accountId": 176063935,
                        "campaignId": 518714578
                    }
                ]
            }
        },
        "time": {
            "customDateRangeEnd": {
                "day": 15,
                "month": 11,
                "year": 2024
            },
            "customDateRangeStart": {
                "day": 15,
                "month": 1,
                "year": 2024
            },
            "predefinedTime": "ChennaiKolkataMumbaiNewDelhi",
            "reportTimeZone": "ChennaiKolkataMumbaiNewDelhi"
        }
    },
    "resultFileDirectory": "/home/administrator/workspace/microsoft-ads-etl/abc.txt",
    "resultFileName": "abc.txt",
    "overwriteResultFile": true
}


Response ::

{
    "OperationErrors": [
        {
            "Code": 100,
            "ErrorCode": "NullRequest",
            "Details": null,
            "Message": "The request message is null."
        }
    ],
    "BatchErrors": [],
    "TrackingId": "85b5e9fb-355e-4960-86a5-0dae799b6734",
    "Type": "ApiFaultDetail"
}


Need help here, as the response received is not very clear about the error.
Thanks in advance.

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.
429 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.