Freigeben über


UpdateTargetsInLibrary API: Null Targets are Deleted

When updating data objects via the Microsoft Advertising adCenter API, null values are typically ignored by the Web service. For example, during a call to UpdateKeywords you may pass a null value or simply not specify the PhraseMatchBid element, and any previously designated bids on phrase match for the keyword will remain untouched.

Targeting proves to be an exception to the standard behavior. In order to retain any existing target types (e.g. AgeTarget or DayTarget) upon update to an existing Target, you would retrieve the current targeting settings via GetTargetsInfoFromLibrary and then call the GetTargetsByIds service operation. Make the changes to the existing Target or Target array as appropriate and leave unchanged values intact before using the UpdateTargetsInLibrary API. In other words, you should literally re-specify every target type and bid that you want to keep at the same time you make the changes or updates.

Please feel free to ask targeting questions here or within the forum.

Comments

  • Anonymous
    February 22, 2011
    From the documentation, it says that you can only have up to 255 target combinations in the library per account, and each target combination can only have up to 255 targets.  That means we can only have up to 255 campaigns (each campaign has different target combination) and each campaign can only have up to 255 targets (e.g. city targets). Is this soft limit or a hard limit? What's your advice that we should do if we hit this limit?Thanks,Kevin