ApplyHotelGroupActions 服务操作 - 市场活动管理
将添加、更新或删除操作应用于每个指定的 BiddableAdGroupCriterion 或 NegativeAdGroupCriterion,其中每个都包含 一个 HotelGroup。
提示
有关Microsoft住宿市场活动的概述和详细信息,请参阅 酒店广告 指南。
请注意以下验证规则。
至少必须为酒店列表组树结构指定根节点。 酒店列表组的根节点必须将其 “酒店属性” 字段设置为“全部”,并将 “酒店属性值 ”设置为 null 或空。 如果对目录中所有酒店进行平均竞价,请将“ 子类型” 字段设置为 “单位”。 如果要根据更具体的酒店属性对出价进行分区,请将“ 子类型” 字段设置为 “细分”,将 “父条件 ID ”设置为 null 或空,并将 “ID ”设置为负值。 你将使用负值作为任何子节点的 父条件 ID 。
根节点被视为级别 0,树最多可以有 7 个级别深的分支。
每个上传请求,每个广告组最多可以包含 20,000 个酒店列表组树节点。 广告组的整个酒店列表组树节点计数不能超过 20,000。
同一树 (同一广告组) 的酒店列表组树节点必须在文件中组合在一起。
在下载期间无法保证酒店列表组节点的顺序,父节点可能在子节点之后提供:但是,同一广告组的所有节点都将在 文件中组合在一起。
如果要创建或修改树结构,则必须在子酒店列表组树节点之前对父酒店列表组树节点进行排序;但是,订单对于非结构性更改(如更新出价)无关紧要。 例如,如果要在不添加、删除或更新树结构的情况下更新出价,则只需上传 ID、 父 ID 和 出价 字段。
若要更新 “酒店属性”、“ 酒店属性值 ”或 “排除 ”字段,必须删除现有的酒店列表组树节点,并上传一个新的酒店列表组树节点,该节点将获取新的标识符。
如果任何操作失败,则可能已成功的所有剩余操作也将失败。
所有酒店列表组节点添加和删除操作都必须生成完整的树结构。
从根节点到分支末尾的每个路径都必须以叶节点 (Sub Type=Unit) 终止。 每个单元都必须有出价,除非“ 排除 ”字段 为 true ,这意味着该节点是负广告组条件。
每个细分必须至少有一个叶节点,用于对细分条件的其余部分进行出价,即使用与其同级单位相同的操作数 () ,并将其 Hotel 属性值 设置为 null 或为空。
如果要添加具有多个级别的分区,其中父级或子级尚不存在,请使用负 int 值作为引用来标识父级。 例如,将父级的 Id 和子级的“ 父条件 ID ”字段设置为同一负值。 负 ID 仅在调用期间有效。 上传结果文件中返回每个成功添加的广告组条件的唯一系统标识符。
仅当“排除”字段为 false 时,“出价”字段才适用,这意味着节点是可出价的广告组条件。 但是,对于细分分区节点,将忽略 Bid。 这些元素仅与 单元 (叶) 分区节点相关。
对于 “已删除” 操作,只需指定 ID 和 父 ID。
如果删除父酒店列表组,也会删除其所有子级和后代。
不能在分支中指定重复的酒店属性。
请求元素
ApplyHotelGroupActionsRequest 对象定义服务操作请求的正文和标头元素。 元素的顺序必须与 请求 SOAP 中所示的顺序相同。
注意
除非下面另有说明,否则需要所有请求元素。
请求正文元素
元素 | 说明 | 数据类型 |
---|---|---|
CriterionActions | 最多包含 5,000 个 AdGroupCriterionAction 对象的列表,每个对象都包含 一个 Action 元素和一个 BiddableAdGroupCriterion。 所有广告组条件操作都必须针对同一广告组。 有关详细信息,包括验证规则,请参阅 使用市场活动管理服务创建Microsoft购物市场活动。 |
AdGroupCriterionAction 数组 |
请求标头元素
元素 | 说明 | 数据类型 |
---|---|---|
AuthenticationToken | OAuth 访问令牌,表示有权Microsoft广告帐户的用户的凭据。 有关详细信息,请参阅 使用 OAuth 进行身份验证。 |
string |
CustomerAccountId | 拥有或与请求中的实体关联的广告帐户的标识符。 如果需要这两个元素,此标头元素必须与 AccountId 正文元素具有相同的值。 此元素是大多数服务操作所必需的,作为最佳做法,应始终设置它。 有关详细信息,请参阅 获取帐户和客户 ID。 |
string |
CustomerId | 用户正在访问或操作的客户) 经理帐户 (标识符。 用户可以访问多个经理帐户。 此元素是大多数服务操作所必需的,作为最佳做法,应始终设置它。 有关详细信息,请参阅 获取帐户和客户 ID。 |
string |
DeveloperToken | 用于访问必应广告 API 的开发人员令牌。 有关详细信息,请参阅 获取开发人员令牌。 |
string |
Password | 此元素保留供内部使用,将从 API 的未来版本中删除。 必须使用 AuthenticationToken 元素来设置用户凭据。 | string |
UserName | 此元素保留供内部使用,将从 API 的未来版本中删除。 必须使用 AuthenticationToken 元素来设置用户凭据。 | string |
响应元素
ApplyHotelGroupActionsResponse 对象定义服务操作响应的正文和标头元素。 元素的返回顺序与 响应 SOAP 中所示的顺序相同。
响应正文元素
元素 | 说明 | 数据类型 |
---|---|---|
AdGroupCriterionIds | 标识已应用操作的条件的标识符列表。 标识符列表直接对应于请求中的条件列表。 如果任何条件操作失败,则所有剩余的条件操作都将失败,并且此列表中的所有元素都将为 null。 |
long 数组 |
PartialErrors |
BatchError 对象的数组,其中包含未成功的任何请求项的详细信息。 错误列表与请求中的项列表不直接对应。 如果没有错误,列表可以为空,也可以包含与请求中每个不成功的列表项对应的一个或多个错误对象。 对于由于用户错误而失败的条件,将返回可操作的错误代码。 如果任何条件操作失败,则所有剩余的条件操作都将失败,并且此列表中的任何元素都不会为 null。 对于本来可能成功的条件,将返回一个通用错误,说明相关实体失败。 |
BatchError 数组 |
响应标头元素
元素 | 说明 | 数据类型 |
---|---|---|
跟踪 ID | 包含 API 调用详细信息的日志条目的标识符。 | string |
请求 SOAP
此模板由一个工具生成,用于显示 SOAP 请求的正文和标头元素的顺序。 有关可用于此服务操作的支持类型,请参阅上面的 请求正文元素 参考。
<s:Envelope xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header xmlns="https://bingads.microsoft.com/CampaignManagement/v13">
<Action mustUnderstand="1">ApplyHotelGroupActions</Action>
<AuthenticationToken i:nil="false">ValueHere</AuthenticationToken>
<CustomerAccountId i:nil="false">ValueHere</CustomerAccountId>
<CustomerId i:nil="false">ValueHere</CustomerId>
<DeveloperToken i:nil="false">ValueHere</DeveloperToken>
</s:Header>
<s:Body>
<ApplyHotelGroupActionsRequest xmlns="https://bingads.microsoft.com/CampaignManagement/v13">
<CriterionActions i:nil="false">
<AdGroupCriterionAction>
<Action>ValueHere</Action>
<AdGroupCriterion i:nil="false" i:type="-- derived type specified here with the appropriate prefix --">
<AdGroupId>ValueHere</AdGroupId>
<Criterion i:nil="false" i:type="-- derived type specified here with the appropriate prefix --">
<Type i:nil="false">ValueHere</Type>
<!--These fields are applicable if the derived type attribute is set to ProductPartition-->
<Condition i:nil="false">
<Attribute i:nil="false">ValueHere</Attribute>
<Operand i:nil="false">ValueHere</Operand>
<Operator i:nil="false">ValueHere</Operator>
</Condition>
<ParentCriterionId i:nil="false">ValueHere</ParentCriterionId>
<PartitionType>ValueHere</PartitionType>
<!--These fields are applicable if the derived type attribute is set to HotelGroup-->
<Listing i:nil="false">
<Attribute i:nil="false">ValueHere</Attribute>
<Operand i:nil="false">ValueHere</Operand>
</Listing>
<ListingType>ValueHere</ListingType>
<ParentCriterionId i:nil="false">ValueHere</ParentCriterionId>
<!--These fields are applicable if the derived type attribute is set to HotelAdvanceBookingWindowCriterion-->
<MaxDays i:nil="false">ValueHere</MaxDays>
<MinDays i:nil="false">ValueHere</MinDays>
<!--These fields are applicable if the derived type attribute is set to HotelCheckInDateCriterion-->
<EndDate i:nil="false">ValueHere</EndDate>
<StartDate i:nil="false">ValueHere</StartDate>
<!--This field is applicable if the derived type attribute is set to HotelCheckInDayCriterion-->
<CheckInDay i:nil="false">ValueHere</CheckInDay>
<!--This field is applicable if the derived type attribute is set to HotelDateSelectionTypeCriterion-->
<HotelDateSelectionType i:nil="false">ValueHere</HotelDateSelectionType>
<!--These fields are applicable if the derived type attribute is set to HotelLengthOfStayCriterion-->
<MaxNights i:nil="false">ValueHere</MaxNights>
<MinNights i:nil="false">ValueHere</MinNights>
<!--This field is applicable if the derived type attribute is set to ProductScope-->
<Conditions i:nil="false">
<ProductCondition>
<Attribute i:nil="false">ValueHere</Attribute>
<Operand i:nil="false">ValueHere</Operand>
<Operator i:nil="false">ValueHere</Operator>
</ProductCondition>
</Conditions>
<!--This field is applicable if the derived type attribute is set to Webpage-->
<Parameter i:nil="false">
<Conditions i:nil="false">
<WebpageCondition>
<Argument i:nil="false">ValueHere</Argument>
<Operand>ValueHere</Operand>
<Operator i:nil="false">ValueHere</Operator>
</WebpageCondition>
</Conditions>
<CriterionName i:nil="false">ValueHere</CriterionName>
</Parameter>
<!--This field is applicable if the derived type attribute is set to AgeCriterion-->
<AgeRange i:nil="false">ValueHere</AgeRange>
<!--These fields are applicable if the derived type attribute is set to DeviceCriterion-->
<DeviceName i:nil="false">ValueHere</DeviceName>
<OSName i:nil="false">ValueHere</OSName>
<!--These fields are applicable if the derived type attribute is set to DayTimeCriterion-->
<Day i:nil="false">ValueHere</Day>
<FromHour i:nil="false">ValueHere</FromHour>
<FromMinute i:nil="false">ValueHere</FromMinute>
<ToHour i:nil="false">ValueHere</ToHour>
<ToMinute i:nil="false">ValueHere</ToMinute>
<!--This field is applicable if the derived type attribute is set to GenderCriterion-->
<GenderType i:nil="false">ValueHere</GenderType>
<!--These fields are applicable if the derived type attribute is set to RadiusCriterion-->
<LatitudeDegrees i:nil="false">ValueHere</LatitudeDegrees>
<LongitudeDegrees i:nil="false">ValueHere</LongitudeDegrees>
<Name i:nil="false">ValueHere</Name>
<Radius i:nil="false">ValueHere</Radius>
<RadiusUnit i:nil="false">ValueHere</RadiusUnit>
<!--These fields are applicable if the derived type attribute is set to LocationCriterion-->
<DisplayName i:nil="false">ValueHere</DisplayName>
<EnclosedLocationIds i:nil="false" xmlns:a1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<a1:long>ValueHere</a1:long>
</EnclosedLocationIds>
<LocationId i:nil="false">ValueHere</LocationId>
<LocationType i:nil="false">ValueHere</LocationType>
<!--This field is applicable if the derived type attribute is set to LocationIntentCriterion-->
<IntentOption i:nil="false">ValueHere</IntentOption>
<!--These fields are applicable if the derived type attribute is set to AudienceCriterion-->
<AudienceId i:nil="false">ValueHere</AudienceId>
<AudienceType i:nil="false">ValueHere</AudienceType>
<!--These fields are applicable if the derived type attribute is set to ProfileCriterion-->
<ProfileId>ValueHere</ProfileId>
<ProfileType>ValueHere</ProfileType>
<!--This field is applicable if the derived type attribute is set to StoreCriterion-->
<StoreId i:nil="false">ValueHere</StoreId>
<!--This field is applicable if the derived type attribute is set to DealCriterion-->
<DealId>ValueHere</DealId>
<!--This field is applicable if the derived type attribute is set to GenreCriterion-->
<GenreId>ValueHere</GenreId>
<!--These fields are applicable if the derived type attribute is set to PlacementCriterion-->
<PlacementId>ValueHere</PlacementId>
<PlacementName i:nil="false">ValueHere</PlacementName>
</Criterion>
<Id i:nil="false">ValueHere</Id>
<Status i:nil="false">ValueHere</Status>
<Type i:nil="false">ValueHere</Type>
<!--These fields are applicable if the derived type attribute is set to BiddableAdGroupCriterion-->
<CriterionBid i:nil="false" i:type="-- derived type specified here with the appropriate prefix --">
<Type i:nil="false">ValueHere</Type>
<!--This field is applicable if the derived type attribute is set to RateBid-->
<RateAmount i:nil="false">
<Amount i:nil="false">ValueHere</Amount>
</RateAmount>
<!--This field is applicable if the derived type attribute is set to FixedBid-->
<Amount>ValueHere</Amount>
<!--This field is applicable if the derived type attribute is set to BidMultiplier-->
<Multiplier>ValueHere</Multiplier>
</CriterionBid>
<DestinationUrl i:nil="false">ValueHere</DestinationUrl>
<EditorialStatus i:nil="false">ValueHere</EditorialStatus>
<FinalAppUrls i:nil="false">
<AppUrl>
<OsType i:nil="false">ValueHere</OsType>
<Url i:nil="false">ValueHere</Url>
</AppUrl>
</FinalAppUrls>
<FinalMobileUrls i:nil="false" xmlns:a1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<a1:string>ValueHere</a1:string>
</FinalMobileUrls>
<FinalUrlSuffix i:nil="false">ValueHere</FinalUrlSuffix>
<FinalUrls i:nil="false" xmlns:a1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<a1:string>ValueHere</a1:string>
</FinalUrls>
<TrackingUrlTemplate i:nil="false">ValueHere</TrackingUrlTemplate>
<UrlCustomParameters i:nil="false">
<Parameters i:nil="false">
<CustomParameter>
<Key i:nil="false">ValueHere</Key>
<Value i:nil="false">ValueHere</Value>
</CustomParameter>
</Parameters>
</UrlCustomParameters>
<CriterionCashback i:nil="false" i:type="-- derived type specified here with the appropriate prefix --">
<Type i:nil="false">ValueHere</Type>
<!--This field is applicable if the derived type attribute is set to CashbackAdjustment-->
<CashbackPercent i:nil="false">ValueHere</CashbackPercent>
</CriterionCashback>
<!--No additional fields are applicable if the derived type attribute is set to NegativeAdGroupCriterion-->
</AdGroupCriterion>
</AdGroupCriterionAction>
</CriterionActions>
</ApplyHotelGroupActionsRequest>
</s:Body>
</s:Envelope>
响应 SOAP
此模板由一个工具生成,用于显示 SOAP 响应的 正文 和 标头 元素的顺序。
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header xmlns="https://bingads.microsoft.com/CampaignManagement/v13">
<TrackingId d3p1:nil="false" xmlns:d3p1="http://www.w3.org/2001/XMLSchema-instance">ValueHere</TrackingId>
</s:Header>
<s:Body>
<ApplyHotelGroupActionsResponse xmlns="https://bingads.microsoft.com/CampaignManagement/v13">
<AdGroupCriterionIds d4p1:nil="false" xmlns:a1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">
<a1:long>ValueHere</a1:long>
</AdGroupCriterionIds>
<PartialErrors d4p1:nil="false" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">
<BatchError d4p1:type="-- derived type specified here with the appropriate prefix --">
<Code>ValueHere</Code>
<Details d4p1:nil="false">ValueHere</Details>
<ErrorCode d4p1:nil="false">ValueHere</ErrorCode>
<FieldPath d4p1:nil="false">ValueHere</FieldPath>
<ForwardCompatibilityMap xmlns:e283="http://schemas.datacontract.org/2004/07/System.Collections.Generic" d4p1:nil="false">
<e283:KeyValuePairOfstringstring>
<e283:key d4p1:nil="false">ValueHere</e283:key>
<e283:value d4p1:nil="false">ValueHere</e283:value>
</e283:KeyValuePairOfstringstring>
</ForwardCompatibilityMap>
<Index>ValueHere</Index>
<Message d4p1:nil="false">ValueHere</Message>
<Type d4p1:nil="false">ValueHere</Type>
<!--These fields are applicable if the derived type attribute is set to EditorialError-->
<Appealable d4p1:nil="false">ValueHere</Appealable>
<DisapprovedText d4p1:nil="false">ValueHere</DisapprovedText>
<Location d4p1:nil="false">ValueHere</Location>
<PublisherCountry d4p1:nil="false">ValueHere</PublisherCountry>
<ReasonCode>ValueHere</ReasonCode>
</BatchError>
</PartialErrors>
</ApplyHotelGroupActionsResponse>
</s:Body>
</s:Envelope>
代码语法
示例语法可用于 必应广告 SDK。 有关更多示例,请参阅 必应广告 API 代码示例 。
public async Task<ApplyHotelGroupActionsResponse> ApplyHotelGroupActionsAsync(
IList<AdGroupCriterionAction> criterionActions)
{
var request = new ApplyHotelGroupActionsRequest
{
CriterionActions = criterionActions
};
return (await CampaignManagementService.CallAsync((s, r) => s.ApplyHotelGroupActionsAsync(r), request));
}
static ApplyHotelGroupActionsResponse applyHotelGroupActions(
ArrayOfAdGroupCriterionAction criterionActions) throws RemoteException, Exception
{
ApplyHotelGroupActionsRequest request = new ApplyHotelGroupActionsRequest();
request.setCriterionActions(criterionActions);
return CampaignManagementService.getService().applyHotelGroupActions(request);
}
static function ApplyHotelGroupActions(
$criterionActions)
{
$GLOBALS['Proxy'] = $GLOBALS['CampaignManagementProxy'];
$request = new ApplyHotelGroupActionsRequest();
$request->CriterionActions = $criterionActions;
return $GLOBALS['CampaignManagementProxy']->GetService()->ApplyHotelGroupActions($request);
}
response=campaignmanagement_service.ApplyHotelGroupActions(
CriterionActions=CriterionActions)
要求
服务: CampaignManagementService.svc v13
命名空间: https://bingads.microsoft.com/CampaignManagement/v13
请求 URL
https://campaign.api.bingads.microsoft.com/CampaignManagement/v13/HotelGroupActions/Apply
请求元素
ApplyHotelGroupActionsRequest 对象定义服务操作请求的正文和标头元素。
注意
除非下面另有说明,否则需要所有请求元素。
请求正文元素
元素 | 说明 | 数据类型 |
---|---|---|
CriterionActions | 最多包含 5,000 个 AdGroupCriterionAction 对象的列表,每个对象都包含 一个 Action 元素和一个 BiddableAdGroupCriterion。 所有广告组条件操作都必须针对同一广告组。 有关详细信息,包括验证规则,请参阅 使用市场活动管理服务创建Microsoft购物市场活动。 |
AdGroupCriterionAction 数组 |
请求标头元素
元素 | 说明 | 数据类型 |
---|---|---|
Authorization | OAuth 访问令牌,表示有权Microsoft广告帐户的用户的凭据。 请确保令牌的前缀为“持有者”,这是正确身份验证所必需的。 有关详细信息,请参阅 使用 OAuth 进行身份验证。 |
string |
CustomerAccountId | 拥有或与请求中的实体关联的广告帐户的标识符。 如果需要这两个元素,此标头元素必须与 AccountId 正文元素具有相同的值。 此元素是大多数服务操作所必需的,作为最佳做法,应始终设置它。 有关详细信息,请参阅 获取帐户和客户 ID。 |
string |
CustomerId | 用户正在访问或操作的客户) 经理帐户 (标识符。 用户可以访问多个经理帐户。 此元素是大多数服务操作所必需的,作为最佳做法,应始终设置它。 有关详细信息,请参阅 获取帐户和客户 ID。 |
string |
DeveloperToken | 用于访问必应广告 API 的开发人员令牌。 有关详细信息,请参阅 获取开发人员令牌。 |
string |
Password | 此元素保留供内部使用,将从 API 的未来版本中删除。 必须使用 AuthenticationToken 元素来设置用户凭据。 | string |
UserName | 此元素保留供内部使用,将从 API 的未来版本中删除。 必须使用 AuthenticationToken 元素来设置用户凭据。 | string |
响应元素
ApplyHotelGroupActionsResponse 对象定义服务操作响应的正文和标头元素。 元素的返回顺序与 响应 JSON 中所示的顺序相同。
响应正文元素
元素 | 说明 | 数据类型 |
---|---|---|
AdGroupCriterionIds | 标识已应用操作的条件的标识符列表。 标识符列表直接对应于请求中的条件列表。 如果任何条件操作失败,则所有剩余的条件操作都将失败,并且此列表中的所有元素都将为 null。 |
long 数组 |
PartialErrors |
BatchError 对象的数组,其中包含未成功的任何请求项的详细信息。 错误列表与请求中的项列表不直接对应。 如果没有错误,列表可以为空,也可以包含与请求中每个不成功的列表项对应的一个或多个错误对象。 对于由于用户错误而失败的条件,将返回可操作的错误代码。 如果任何条件操作失败,则所有剩余的条件操作都将失败,并且此列表中的任何元素都不会为 null。 对于本来可能成功的条件,将返回一个通用错误,说明相关实体失败。 |
BatchError 数组 |
响应标头元素
元素 | 说明 | 数据类型 |
---|---|---|
跟踪 ID | 包含 API 调用详细信息的日志条目的标识符。 | string |
请求 JSON
此模板由显示 JSON 请求的 正文 和 标头 元素的工具生成。 有关可用于此服务操作的支持类型,请参阅上面的 请求正文元素 参考。
下面是一个示例,如果 AdGroupCriterion 的类型为 BiddableAdGroupCriterion,Criterion 为 AgeCriterion,CriterionBid 为 BidMultiplier,CriterionCashback 为 CashbackAdjustment,则适用。
{
"CriterionActions": [
{
"Action": "ValueHere",
"AdGroupCriterion": {
"AdGroupId": "LongValueHere",
"Criterion": {
"Type": "AgeCriterion",
"AgeRange": "ValueHere"
},
"Id": "LongValueHere",
"Status": "ValueHere",
"Type": "BiddableAdGroupCriterion",
"CriterionBid": {
"Type": "BidMultiplier",
"Multiplier": DoubleValueHere
},
"CriterionCashback": {
"Type": "CashbackAdjustment",
"CashbackPercent": DoubleValueHere
},
"DestinationUrl": "ValueHere",
"EditorialStatus": "ValueHere",
"FinalAppUrls": [
{
"OsType": "ValueHere",
"Url": "ValueHere"
}
],
"FinalMobileUrls": [
"ValueHere"
],
"FinalUrls": [
"ValueHere"
],
"FinalUrlSuffix": "ValueHere",
"TrackingUrlTemplate": "ValueHere",
"UrlCustomParameters": {
"Parameters": [
{
"Key": "ValueHere",
"Value": "ValueHere"
}
]
}
}
}
]
}
响应 JSON
此模板由一个工具生成,用于显示 JSON 响应的 正文 和 标头 元素。
以下示例适用于 BatchError 的类型为 EditorialError。
{
"AdGroupCriterionIds": [
"LongValueHere"
],
"PartialErrors": [
{
"Code": IntValueHere,
"Details": "ValueHere",
"ErrorCode": "ValueHere",
"FieldPath": "ValueHere",
"ForwardCompatibilityMap": [
{
"key": "ValueHere",
"value": "ValueHere"
}
],
"Index": IntValueHere,
"Message": "ValueHere",
"Type": "EditorialError",
"Appealable": "ValueHere",
"DisapprovedText": "ValueHere",
"Location": "ValueHere",
"PublisherCountry": "ValueHere",
"ReasonCode": IntValueHere
}
]
}
代码语法
若要通过 SDK 调用 REST API,需要将 SDK 升级到特定版本并配置系统参数。示例语法可用于 必应广告 SDK。 有关更多示例,请参阅 必应广告 API 代码示例 。
public async Task<ApplyHotelGroupActionsResponse> ApplyHotelGroupActionsAsync(
IList<AdGroupCriterionAction> criterionActions)
{
var request = new ApplyHotelGroupActionsRequest
{
CriterionActions = criterionActions
};
return (await CampaignManagementService.CallAsync((s, r) => s.ApplyHotelGroupActionsAsync(r), request));
}
static ApplyHotelGroupActionsResponse applyHotelGroupActions(
ArrayOfAdGroupCriterionAction criterionActions) throws RemoteException, Exception
{
ApplyHotelGroupActionsRequest request = new ApplyHotelGroupActionsRequest();
request.setCriterionActions(criterionActions);
return CampaignManagementService.getService().applyHotelGroupActions(request);
}
static function ApplyHotelGroupActions(
$criterionActions)
{
$GLOBALS['Proxy'] = $GLOBALS['CampaignManagementProxy'];
$request = new ApplyHotelGroupActionsRequest();
$request->CriterionActions = $criterionActions;
return $GLOBALS['CampaignManagementProxy']->GetService()->ApplyHotelGroupActions($request);
}
response=campaignmanagement_service.ApplyHotelGroupActions(
CriterionActions=CriterionActions)