ListItemIds is empty when AccountPlacementExclusionList is recreated

Radosław Pociecha 0 Reputation points
2025-08-08T09:14:54.2866667+00:00

Hello,

We are trying to use Ads API to manage AccountPlacementExclusionList in an account, we are able to call all needed methods with success, but there is one case when it does not work right, we do not get item id when we recreate item in a list:

  1. we add negative site to account placement exclusion lists using this parameters

<ns1:AddListItemsToSharedListRequest>

<ns1:ListItems>

<ns1:SharedListItem xsi:type="ns1:NegativeSite">

<ns1:Url>example11.com</ns1:Url>

</ns1:SharedListItem>

</ns1:ListItems>

<ns1:SharedList xsi:type="ns1:AccountPlacementExclusionList">

<ns1:Id>7696581394437</ns1:Id>

</ns1:SharedList>

<ns1:SharedEntityScope>Account</ns1:SharedEntityScope>

</ns1:AddListItemsToSharedListRequest>

  1. in response we get this response, this is ok:

<AddListItemsToSharedListResponse xmlns="https://bingads.microsoft.com/CampaignManagement/v13">

<ListItemIds xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">

<a:long>7696581400760</a:long>

</ListItemIds>

<PartialErrors xmlns:i="http://www.w3.org/2001/XMLSchema-instance"/>

</AddListItemsToSharedListResponse>

  1. then this placement is removed successfully from this list
  2. then we try to add the same placement to this list, but this time response does not contain ListItemIds (element is empty so we do not get id of just created item): <AddListItemsToSharedListResponse xmlns="https://bingads.microsoft.com/CampaignManagement/v13"> <ListItemIds xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"/> <PartialErrors xmlns:i="http://www.w3.org/2001/XMLSchema-instance"/> </AddListItemsToSharedListResponse>

After creating this placement second time we do not get list item id so we do not have a handle to remove it in the future

Is this expected behavior or is it a bug ?

Regards,

Radosław Pociecha

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 - Vahid 95 Reputation points Microsoft External Staff Moderator
    2025-08-08T12:08:38.07+00:00

    Hello Radosław,

    Thank you for using our Microsoft Advertising Learn Q&A Platform! 

    It seems that you are struggling with your API exclusion lists. I will be happy to escalate the matter further and relay everything from your side to our API experts for a thorough troubleshooting. Please respond to my private message at your earliest convenience. I also hope the information provided here can be of some use to you.

    When recreating an item in the AccountPlacementExclusionList, it’s important to ensure that the item is properly defined and that you are following the correct API procedures for adding items to the list. If you are not receiving an item ID after recreating an item, it could be due to a few reasons:

    Item Definition: Ensure that the item you are trying to recreate has all the required fields populated correctly. If any required fields are missing or incorrectly formatted, the API may not return a valid item ID.

    API Response Handling: Check how you are handling the API response. Sometimes the item ID might be included in a different part of the response than expected. Make sure to inspect the entire response object for any relevant information.

    Duplicate Items: If you are trying to recreate an item that already exists in the list, the API may not create a new entry and may return the existing item instead. In such cases, you might not receive a new item ID.

    API Limitations: Review the API documentation for any limitations regarding the number of items that can be added or any specific conditions that might affect the addition of items to the list.

    You can learn more here: AccountPlacementExclusionList Data Object - Campaign Management - Microsoft Advertising API | Microsoft Learn

    Our support teams are also 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! 

     

    I hope the information provided here will at least partly answer your question.  If you have any additional questions please do not hesitate to reach out to our support. I have also sent you a private message asking for further details. You are more than welcome to respond to me to that I can begin the investigation on my end.

     

    Kind regards, 

    Vahid | Microsoft Advertising Support Specialist | 800-518-5689

    0 comments No comments

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.