Get all campaigns of all accounts

Alain Abraham 6 Reputation points

I try to retrieve all campaigns (not metrics) for all customers I manage.
Imagine, I have the following hierarchy:

As "Manager Account L1", I would like to retrieve all campaigns for "Ad Account 1A" and "Ad Account 1B".

With GetAccountsInfo, I retrieve (in my case) 2 accounts.
Running "GetCampaignsByAccountId" on those two accounts give me differents result. For one account, it's OK, for the second one, I got the following error:

Web service reported a SOAP processing fault using an unexpected HTTP status code 200. Reporting as an internal server error.
ErrorCode: CampaignServiceInvalidAccountId
Code: 1102
Details: None
Message: The account ID is invalid.
My both accounts are at the same level as "Ad Account 1A" and "Ad Account 1B".

Later, i want to be able to collect Campaigns informations for other levels. Is there a way of achieving that ?
Any idea ?

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
0 comments No comments
{count} vote