Target Data Object

 

Defines the types of targeting that you can use to target your ads to users. For example, you can target your ads based on the geographic location of the user, the day of the week, or the time of the day.

When adding or updating a target, at least one target type must be specified. When attempting to retrieve targets for a campaign or ad group, the Target element could be nil. For more information, see Show Ads to Your Target Audience.

System_CAPS_ICON_important.jpg Important

When you update a target using UpdateTargetsInLibrary, the Target object that you specify overwrites any existing sub target (e.g. location) and intent option settings. In order to retain any existing target types 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 as appropriate and leave unchanged values intact before using the UpdateTargetsInLibrary operation. In other words, you should re-specify every target type and bid that you want to keep at the same time you make the changes or updates. For more information, see Updating Targets.

<xs:complexType name="Target">
  <xs:sequence>
    <xs:element minOccurs="0" name="Age" nillable="true" type="tns:AgeTarget" />
    <xs:element minOccurs="0" name="DayTime" nillable="true" type="tns:DayTimeTarget" />
    <xs:element minOccurs="0" name="Device" nillable="true" type="tns:DeviceTarget" />
    <xs:element minOccurs="0" name="ForwardCompatibilityMap" nillable="true" type="q26:ArrayOfKeyValuePairOfstringstring" xmlns:q26="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
    <xs:element minOccurs="0" name="Gender" nillable="true" type="tns:GenderTarget" />
    <xs:element minOccurs="0" name="Id" nillable="true" type="xs:long" />
    <xs:element minOccurs="0" name="IsLibraryTarget" nillable="true" type="xs:boolean" />
    <xs:element minOccurs="0" name="Location" nillable="true" type="tns:LocationTarget" />
    <xs:element minOccurs="0" name="Name" nillable="true" type="xs:string" />
  </xs:sequence>
</xs:complexType>

ElementDescriptionData TypeAddUpdate
AgeTargets ads to users within one or more age ranges.AgeTargetOptionalOptional

Important: The UpdateTargetsInLibrary operation will not fail if you do not specify this element; however, it is required if you want to keep the most recent settings. Any optional elements which are not sent with the update request will in effect be deleted from the target. For more information, see Updating Targets.
DayTimeTargets ads to run on specific days and hours of the week.DayTimeTargetOptionalOptional

Important: The UpdateTargetsInLibrary operation will not fail if you do not specify this element; however, it is required if you want to keep the most recent settings. Any optional elements which are not sent with the update request will in effect be deleted from the target. For more information, see Updating Targets.
DeviceTargets ads to serve on specific devices.DeviceOSTargetOptionalOptional

Important: The UpdateTargetsInLibrary operation will not fail if you do not specify this element; however, it is required if you want to keep the most recent settings. Any optional elements which are not sent with the update request will in effect be deleted from the target. For more information, see Updating Targets.
ForwardCompatibilityMapThe list of key and value strings for forward compatibility. This element can be used to avoid otherwise breaking changes when new elements are added in future releases.

Note: Forward compatibility changes will be noted here in future releases. There are currently no forward compatibility changes for the Target object.
KeyValuePairOfstringstring arrayOptionalOptional

Important: The UpdateTargetsInLibrary operation will not fail if you do not specify this element; however, it is required if you want to keep the most recent settings. Any optional elements which are not sent with the update request will in effect be deleted from the target. For more information, see Updating Targets.
GenderTargets ads to men only or women only.GenderTargetOptionalOptional

Important: The UpdateTargetsInLibrary operation will not fail if you do not specify this element; however, it is required if you want to keep the most recent settings. Any optional elements which are not sent with the update request will in effect be deleted from the target. For more information, see Updating Targets.
IdA system-generated identifier that identifies this target object.longRead-onlyRequired
IsLibraryTargetDetermines whether the target library contains this target object.booleanRead-onlyRead-only
LocationTargets ads to users within a specific location; for example, users within a certain radius of your business or within a specific state.LocationTargetOptionalOptional

Important: The UpdateTargetsInLibrary operation will not fail if you do not specify this element; however, it is required if you want to keep the most recent settings. Any optional elements which are not sent with the update request will in effect be deleted from the target. For more information, see Updating Targets.
NameThe name of the target. The name can contain a maximum of 50 characters.

If you do not specify a target name, the operation generates one for you. However, you should always provide a name so you can easily identify the target if you call the GetTargetsInfoFromLibrary operation, which returns a list of target identifiers and names.
stringOptionalOptional

Important: The UpdateTargetsInLibrary operation will not fail if you do not specify this element; however, it is required if you want to keep the most recent settings. Any optional elements which are not sent with the update request will in effect be deleted from the target. For more information, see Updating Targets.

CampaignManagementService.svc v10

Namespace: https://bingads.microsoft.com/CampaignManagement/v10

AddTargetsToLibrary
GetTargetsByAdGroupIds
GetTargetsByCampaignIds
GetTargetsByIds
UpdateTargetsInLibrary

Show: