广告数据对象 - 市场活动管理

定义广告的基对象。

不要尝试实例化 广告。 可以创建派生自它的一个或多个以下对象。

语法

<xs:complexType name="Ad" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:sequence>
    <xs:element minOccurs="0" name="AdFormatPreference" nillable="true" type="xs:string" />
    <xs:element minOccurs="0" name="DevicePreference" nillable="true" type="xs:long" />
    <xs:element minOccurs="0" name="EditorialStatus" nillable="true" type="tns:AdEditorialStatus" />
    <xs:element minOccurs="0" name="FinalAppUrls" nillable="true" type="tns:ArrayOfAppUrl" />
    <xs:element xmlns:q1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" minOccurs="0" name="FinalMobileUrls" nillable="true" type="q1:ArrayOfstring" />
    <xs:element minOccurs="0" name="FinalUrlSuffix" nillable="true" type="xs:string" />
    <xs:element xmlns:q2="http://schemas.microsoft.com/2003/10/Serialization/Arrays" minOccurs="0" name="FinalUrls" nillable="true" type="q2:ArrayOfstring" />
    <xs:element xmlns:q3="http://schemas.datacontract.org/2004/07/System.Collections.Generic" minOccurs="0" name="ForwardCompatibilityMap" nillable="true" type="q3:ArrayOfKeyValuePairOfstringstring" />
    <xs:element minOccurs="0" name="Id" nillable="true" type="xs:long" />
    <xs:element minOccurs="0" name="Status" nillable="true" type="tns:AdStatus" />
    <xs:element minOccurs="0" name="TrackingUrlTemplate" nillable="true" type="xs:string" />
    <xs:element minOccurs="0" name="Type" nillable="true" type="tns:AdType" />
    <xs:element minOccurs="0" name="UrlCustomParameters" nillable="true" type="tns:CustomParameters" />
  </xs:sequence>
</xs:complexType>

元素

Ad 对象具有以下元素:AdFormatPreferenceDevicePreferenceEditorialStatusFinalAppUrlsFinalMobileUrlsFinalUrlsFinalUrlSuffixForwardCompatibilityMapIdStatusTrackingUrlTemplateTypeUrlCustomParameters

元素 说明 数据类型
AdFormatPreference 广告格式首选项用于指示你是否希望将广告副本作为搜索广告或受众广告显示给用户。 搜索广告倾向于编写为行动号召,而受众广告应以更多的信息风格编写。 虽然可以选择将搜索广告用作受众广告,但将广告指定为受众广告首选格式可让你优化其消息传送,实现本机传递。

可能的值为 AudienceAdAll。 如果设置为 “全部”,则广告将符合搜索和受众广告格式的条件。 如果设置为 AudienceAd,则广告将仅符合受众广告格式的条件。

ExpandedTextAdTextAd 对象支持广告格式首选项。
string
DevicePreference 确定用于显示广告的设备首选项。

AppInstallAdTextAd 对象支持设备首选项。
long
编辑状态 广告的编辑评审状态,指示广告是等待评审、已批准还是已遭拒批。 AdEditorialStatus
FinalAppUrls 供将来使用。 AppUrl 数组
FinalMobileUrls 移动登陆页 URL。

ExpandedTextAdResponsiveAdResponsiveSearchAdTextAd 对象支持此元素。 AppInstallAdDynamicSearchAdProductAd 对象不支持它。
字符串 数组
FinalUrls 最终获取用户的最后一个或最终 URL,无论单击到最终 URL 路径是否包含任何重定向。

AppInstallAdExpandedTextAdResponsiveAdResponsiveSearchAdTextAd 对象支持此元素。 DynamicSearchAdProductAd 对象不支持它。
字符串 数组
FinalUrlSuffix 最终 URL 后缀可以包括跟踪参数,这些参数将追加到登陆页 URL 的末尾。 建议将登陆页面所需的跟踪参数放在最终 URL 后缀中,以便始终将客户发送到登陆页面。 有关更多详细信息和验证规则,请参阅技术指南中的 最终 URL 后缀

AppInstallAdDynamicSearchAdExpandedTextAdResponsiveAdResponsiveSearchAd 对象支持此元素。 ProductAd 和 和 TextAd 对象不支持它。
string
ForwardCompatibilityMap 用于向前兼容性的键和值字符串列表,以避免在当前 API 版本中添加新元素时发生重大更改。

将来的版本中将在此处记录向前兼容性更改。 此对象当前没有向前兼容性更改。
KeyValuePairOfstringstring 数组
Id 广告的唯一Microsoft广告标识符。 long
状态 广告的状态。

可以将广告状态设置为“活动”或“已暂停”。
AdStatus
TrackingUrlTemplate 要用作所有登陆页 URL 的默认值的跟踪模板。

AppInstallAdDynamicSearchAdExpandedTextAdResponsiveAdResponsiveSearchAdTextAd 对象支持此元素。 ProductAd 对象不支持它。
string
类型 广告的类型。

有关广告类型的详细信息,请参阅 备注
AdType
UrlCustomParameters 用于 URL 跟踪的键和值参数的自定义集合。

AppInstallAdDynamicSearchAdExpandedTextAdResponsiveAdResponsiveSearchAdTextAd 对象支持此元素。 ProductAd 对象不支持它。
CustomParameters

备注

对于 Java 和 .NET 语言,请勿设置 Type 元素,因为该值取决于是实例化扩展的文本广告还是另一种广告类型。

如果手动生成 SOAP,请使用节点 (的 <Ad>type 属性,如以下示例所示) 指定广告的类型。

<Ads xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <Ad i:type="ExpandedTextAd">
    <DevicePreference i:nil="true" />
    <EditorialStatus i:nil="true" />
    <ForwardCompatibilityMap i:nil="true" />
    <Id i:nil="true" />
    <Status i:nil="true" />
    <FinalUrls xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <a:string>https://www.contoso.com/womenshoesale</a:string>
    </FinalUrls>
    <Path1>seattle</Path1>
    <Path2>shoe sale</Path2>
    <Text>Find New Customers & Increase Sales!</Text>
    <TextPart2>Start Advertising on Contoso Today.</TextPart2>
    <TitlePart1>Contoso</TitlePart1>
    <TitlePart2>Fast & Easy Setup</TitlePart2>
    <TitlePart3>Top Rated</TitlePart3>
  </Ad>
</Ads>

要求

服务: CampaignManagementService.svc v13
Namespace: https://bingads.microsoft.com/CampaignManagement/v13

使用者

AddAds
GetAdsByAdGroupId
GetAdsByEditorialStatus
GetAdsByIds
UpdateAds