GetCampaignCriterionsByIds provides inconsistent result

DP 0 Reputation points
2025-10-01T20:48:43.88+00:00

All of a sudden GetCampaignCriterionsByIds request when pulling up Locations and Radiuses started to return different responses w/out indicating any errors.

Request is always the same. Requests tested with 10-15 seconds between them.

result = bing.request('CampaignManagement', 'GetCampaignCriterionsByIds', {
    'AccountID': campaign['bing_account_id'],
    'CustomerID': campaign['bing_customer_id'],
    'CampaignId': campaignId,
    'Criterions': 'Location Radius'
})

Sometime it returns a full set of related campaign criterions, sometime skips negative location criterions, sometime returns 'None' as CampaignCriterions. Responses always contains 'PartialErrors': {'nil': 'true'}.

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

1 answer

Sort by: Most helpful
  1. MS Advertising - John Mark 150 Reputation points Microsoft External Staff Moderator
    2025-10-03T19:05:24.6033333+00:00

    Hi DP,

    Thank you for reaching out to the Microsoft Advertising Learn Q&A Platform! My name is John, and I will be assisting you with this query.

    Given the description of the problem, it seems that you might be running into issues related to the handling of campaign criterions, especially with how the API structures return data. The intermittent behavior could stem from a few factors:

    1. Partial Errors: The response always contains details about 'PartialErrors', and these can indicate that certain requests within the API call failed or were incomplete. The presence of {'nil': 'true'} within PartialErrors suggests that possibly some criterions are being returned as null.
    2. Timing: You mentioned that you are making requests 10-15 seconds apart. Depending on the state of the data and how the API caching works, you might be hitting stale data.
    3. Rate Limits or Quotas: Ensure that you're not exceeding any API rate limits which might cause inconsistent responses.

    Here’s a troubleshooting approach you can try:

    • Check the Response Details: Make sure to log and inspect the entire response, especially the CampaignCriterions and PartialErrors elements. This might give you clues on what’s failing.
    • Review Criterions Configuration: Verify that all the criterions are correctly configured on the Bing Ads/Microsoft Ads side that you're trying to retrieve.
    • Examine Account and Customer IDs: Double-check if the AccountID and CustomerID are correct and belong to a valid and active campaign.
    • Test with Different IDs: If possible, perform tests using different campaign IDs or different criterions to see if the behavior is reproducible across different datasets.

    Official documentation:

    CampaignCriterion Data Object - Campaign Management

    GetCampaignCriterionsByIds Service Operation - Campaign Management

    I tried to check the Campaign Management API service operation status for any temporary service disruption via platform health blog but it's currently showing no issue. Microsoft Advertising platform health blog

    API

    For further assistance, I'll be confirming several information regarding this API call, for us to make sure that we are able to address the issue, I'll be sending a private message on your inbox, please check your private message for further assistance.

    Our support teams are happy to discuss your account in more detail via phone, chat or email to provide review assistance, please see our support page to reach out! 

    Kind regards,

    John | Microsoft Advertising Support Specialist | 1-800-518-5689

    0 comments No comments

Your answer

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