UpdateAdGroupCriterions 服务操作 - 市场活动管理

汇报一个或多个广告组条件。

请求元素

UpdateAdGroupCriterionsRequest 对象定义服务操作请求的正文标头元素。 元素的顺序必须与 请求 SOAP 中所示的顺序相同。

注意

除非下面另有说明,否则需要所有请求元素。

请求正文元素

元素 说明 数据类型
AdGroupCriterions 要更新的条件列表。

每个请求最多可以包含 1,000 个广告组条件。

在每个 AdGroupCriterion 对象中,必须指定条件的 ID 及其所属广告组的 ID。
AdGroupCriterion 数组
CriterionType 要更新的条件类型,例如 网页。 每次调用只能指定一个条件类型值。

若要添加、删除或更新目标条件,即年龄、公司名称、日期和时间、设备、性别、行业、工作职能、位置、位置意向和半径条件,必须将 CriterionType 值指定为 Targets。 可以在同一操作中添加、删除和更新多个目标条件类型。 若要通过 GetAdGroupCriterionsByIds 检索这些目标条件,必须单独请求特定类型,即 AgeCompanyNameDayTimeDeviceGenderIndustryJobFunctionLocationLocationIntentRadius

若要添加、删除或更新受众条件(即自定义受众、市场内受众和再营销列表),必须将 CriterionType 值指定为 “受众”。 可以在同一操作中添加、删除和更新多个目标条件类型。 若要通过 GetAdGroupCriterionsByIds 检索这些受众条件,必须单独请求特定类型,即 CustomAudienceInMarketAudienceProductAudienceRemarketingList

无法通过此操作更新 ProductPartition 。 相反,应使用 ApplyProductPartitionActions
AdGroupCriterionType

请求标头元素

元素 说明 数据类型
AuthenticationToken OAuth 访问令牌,表示有权Microsoft广告帐户的用户的凭据。

有关详细信息,请参阅 使用 OAuth 进行身份验证
string
CustomerAccountId 拥有或与请求中的实体关联的广告帐户的标识符。 如果需要这两个元素,此标头元素必须与 AccountId 正文元素具有相同的值。 此元素是大多数服务操作所必需的,作为最佳做法,应始终设置它。

有关详细信息,请参阅 获取帐户和客户 ID
string
CustomerId 用户正在访问或操作的客户) 经理帐户 (标识符。 用户可以访问多个经理帐户。 此元素是大多数服务操作所必需的,作为最佳做法,应始终设置它。

有关详细信息,请参阅 获取帐户和客户 ID
string
DeveloperToken 用于访问必应广告 API 的开发人员令牌。

有关详细信息,请参阅 获取开发人员令牌
string
Password 此元素保留供内部使用,将从 API 的未来版本中删除。 必须使用 AuthenticationToken 元素来设置用户凭据。 string
UserName 此元素保留供内部使用,将从 API 的未来版本中删除。 必须使用 AuthenticationToken 元素来设置用户凭据。 string

响应元素

UpdateAdGroupCriterionsResponse 对象定义服务操作响应的正文标头元素。 元素的返回顺序与 响应 SOAP 中所示的顺序相同。

响应正文元素

元素 说明 数据类型
NestedPartialErrors BatchErrorCollection 对象的数组,其中包含未成功更新的任何条件的详细信息。 每个 BatchErrorCollection 对象中的顶级错误对应于潜在的条件错误。 BatchError 对象的嵌套列表将包含特定于条件可能具有的项列表的任何错误。

错误列表与请求中的项列表不直接对应。 如果没有错误,列表可以为空,也可以包含与请求中每个不成功的列表项对应的一个或多个错误对象。
BatchErrorCollection 数组

响应标头元素

元素 说明 数据类型
跟踪 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">UpdateAdGroupCriterions</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>
    <UpdateAdGroupCriterionsRequest xmlns="https://bingads.microsoft.com/CampaignManagement/v13">
      <AdGroupCriterions i:nil="false">
        <AdGroupCriterion 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>
      </AdGroupCriterions>
      <CriterionType>ValueHere</CriterionType>
    </UpdateAdGroupCriterionsRequest>
  </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>
    <UpdateAdGroupCriterionsResponse xmlns="https://bingads.microsoft.com/CampaignManagement/v13">
      <NestedPartialErrors d4p1:nil="false" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">
        <BatchErrorCollection d4p1:type="-- derived type specified here with the appropriate prefix --">
          <BatchErrors d4p1:nil="false">
            <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:e531="http://schemas.datacontract.org/2004/07/System.Collections.Generic" d4p1:nil="false">
                <e531:KeyValuePairOfstringstring>
                  <e531:key d4p1:nil="false">ValueHere</e531:key>
                  <e531:value d4p1:nil="false">ValueHere</e531:value>
                </e531: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>
          </BatchErrors>
          <Code d4p1:nil="false">ValueHere</Code>
          <Details d4p1:nil="false">ValueHere</Details>
          <ErrorCode d4p1:nil="false">ValueHere</ErrorCode>
          <FieldPath d4p1:nil="false">ValueHere</FieldPath>
          <ForwardCompatibilityMap xmlns:e532="http://schemas.datacontract.org/2004/07/System.Collections.Generic" d4p1:nil="false">
            <e532:KeyValuePairOfstringstring>
              <e532:key d4p1:nil="false">ValueHere</e532:key>
              <e532:value d4p1:nil="false">ValueHere</e532:value>
            </e532: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 EditorialErrorCollection-->
          <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>
        </BatchErrorCollection>
      </NestedPartialErrors>
    </UpdateAdGroupCriterionsResponse>
  </s:Body>
</s:Envelope>

代码语法

示例语法可用于 必应广告 SDK。 有关更多示例,请参阅 必应广告 API 代码示例

public async Task<UpdateAdGroupCriterionsResponse> UpdateAdGroupCriterionsAsync(
	IList<AdGroupCriterion> adGroupCriterions,
	AdGroupCriterionType criterionType)
{
	var request = new UpdateAdGroupCriterionsRequest
	{
		AdGroupCriterions = adGroupCriterions,
		CriterionType = criterionType
	};

	return (await CampaignManagementService.CallAsync((s, r) => s.UpdateAdGroupCriterionsAsync(r), request));
}
static UpdateAdGroupCriterionsResponse updateAdGroupCriterions(
	ArrayOfAdGroupCriterion adGroupCriterions,
	ArrayList<AdGroupCriterionType> criterionType) throws RemoteException, Exception
{
	UpdateAdGroupCriterionsRequest request = new UpdateAdGroupCriterionsRequest();

	request.setAdGroupCriterions(adGroupCriterions);
	request.setCriterionType(criterionType);

	return CampaignManagementService.getService().updateAdGroupCriterions(request);
}
static function UpdateAdGroupCriterions(
	$adGroupCriterions,
	$criterionType)
{

	$GLOBALS['Proxy'] = $GLOBALS['CampaignManagementProxy'];

	$request = new UpdateAdGroupCriterionsRequest();

	$request->AdGroupCriterions = $adGroupCriterions;
	$request->CriterionType = $criterionType;

	return $GLOBALS['CampaignManagementProxy']->GetService()->UpdateAdGroupCriterions($request);
}
response=campaignmanagement_service.UpdateAdGroupCriterions(
	AdGroupCriterions=AdGroupCriterions,
	CriterionType=CriterionType)

要求

服务: CampaignManagementService.svc v13
命名空间: https://bingads.microsoft.com/CampaignManagement/v13

请求 URL

https://campaign.api.bingads.microsoft.com/CampaignManagement/v13/AdGroupCriterions

请求元素

UpdateAdGroupCriterionsRequest 对象定义服务操作请求的正文标头元素。

注意

除非下面另有说明,否则需要所有请求元素。

请求正文元素

元素 说明 数据类型
AdGroupCriterions 要更新的条件列表。

每个请求最多可以包含 1,000 个广告组条件。

在每个 AdGroupCriterion 对象中,必须指定条件的 ID 及其所属广告组的 ID。
AdGroupCriterion 数组
CriterionType 要更新的条件类型,例如 网页。 每次调用只能指定一个条件类型值。

若要添加、删除或更新目标条件,即年龄、公司名称、日期和时间、设备、性别、行业、工作职能、位置、位置意向和半径条件,必须将 CriterionType 值指定为 Targets。 可以在同一操作中添加、删除和更新多个目标条件类型。 若要通过 GetAdGroupCriterionsByIds 检索这些目标条件,必须单独请求特定类型,即 AgeCompanyNameDayTimeDeviceGenderIndustryJobFunctionLocationLocationIntentRadius

若要添加、删除或更新受众条件(即自定义受众、市场内受众和再营销列表),必须将 CriterionType 值指定为 “受众”。 可以在同一操作中添加、删除和更新多个目标条件类型。 若要通过 GetAdGroupCriterionsByIds 检索这些受众条件,必须单独请求特定类型,即 CustomAudienceInMarketAudienceProductAudienceRemarketingList

无法通过此操作更新 ProductPartition 。 相反,应使用 ApplyProductPartitionActions
AdGroupCriterionType

请求标头元素

元素 说明 数据类型
Authorization OAuth 访问令牌,表示有权Microsoft广告帐户的用户的凭据。 请确保令牌的前缀为“持有者”,这是正确身份验证所必需的。

有关详细信息,请参阅 使用 OAuth 进行身份验证
string
CustomerAccountId 拥有或与请求中的实体关联的广告帐户的标识符。 如果需要这两个元素,此标头元素必须与 AccountId 正文元素具有相同的值。 此元素是大多数服务操作所必需的,作为最佳做法,应始终设置它。

有关详细信息,请参阅 获取帐户和客户 ID
string
CustomerId 用户正在访问或操作的客户) 经理帐户 (标识符。 用户可以访问多个经理帐户。 此元素是大多数服务操作所必需的,作为最佳做法,应始终设置它。

有关详细信息,请参阅 获取帐户和客户 ID
string
DeveloperToken 用于访问必应广告 API 的开发人员令牌。

有关详细信息,请参阅 获取开发人员令牌
string
Password 此元素保留供内部使用,将从 API 的未来版本中删除。 必须使用 AuthenticationToken 元素来设置用户凭据。 string
UserName 此元素保留供内部使用,将从 API 的未来版本中删除。 必须使用 AuthenticationToken 元素来设置用户凭据。 string

响应元素

UpdateAdGroupCriterionsResponse 对象定义服务操作响应的正文标头元素。 元素的返回顺序与 响应 JSON 中所示的顺序相同。

响应正文元素

元素 说明 数据类型
NestedPartialErrors BatchErrorCollection 对象的数组,其中包含未成功更新的任何条件的详细信息。 每个 BatchErrorCollection 对象中的顶级错误对应于潜在的条件错误。 BatchError 对象的嵌套列表将包含特定于条件可能具有的项列表的任何错误。

错误列表与请求中的项列表不直接对应。 如果没有错误,列表可以为空,也可以包含与请求中每个不成功的列表项对应的一个或多个错误对象。
BatchErrorCollection 数组

响应标头元素

元素 说明 数据类型
跟踪 ID 包含 API 调用详细信息的日志条目的标识符。 string

请求 JSON

此模板由显示 JSON 请求的 正文标头 元素的工具生成。 有关可用于此服务操作的支持类型,请参阅上面的 请求正文元素 参考。

下面是一个示例,如果 AdGroupCriterion 的类型为 BiddableAdGroupCriterion,CriterionAgeCriterion,CriterionBidBidMultiplier,CriterionCashbackCashbackAdjustment,则适用。

{
  "AdGroupCriterions": [
    {
      "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"
          }
        ]
      }
    }
  ],
  "CriterionType": "ValueHere"
}

响应 JSON

此模板由一个工具生成,用于显示 JSON 响应的 正文标头 元素。

以下示例适用于 BatchErrorCollection 的类型为 EditorialErrorCollection,BatchErrorEditorialError

{
  "NestedPartialErrors": [
    {
      "BatchErrors": [
        {
          "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
        }
      ],
      "Code": IntValueHere,
      "Details": "ValueHere",
      "ErrorCode": "ValueHere",
      "FieldPath": "ValueHere",
      "ForwardCompatibilityMap": [
        {
          "key": "ValueHere",
          "value": "ValueHere"
        }
      ],
      "Index": IntValueHere,
      "Message": "ValueHere",
      "Type": "EditorialErrorCollection",
      "Appealable": "ValueHere",
      "DisapprovedText": "ValueHere",
      "Location": "ValueHere",
      "PublisherCountry": "ValueHere",
      "ReasonCode": IntValueHere
    }
  ]
}

代码语法

若要通过 SDK 调用 REST API,需要将 SDK 升级到特定版本并配置系统参数。示例语法可用于 必应广告 SDK。 有关更多示例,请参阅 必应广告 API 代码示例

public async Task<UpdateAdGroupCriterionsResponse> UpdateAdGroupCriterionsAsync(
	IList<AdGroupCriterion> adGroupCriterions,
	AdGroupCriterionType criterionType)
{
	var request = new UpdateAdGroupCriterionsRequest
	{
		AdGroupCriterions = adGroupCriterions,
		CriterionType = criterionType
	};

	return (await CampaignManagementService.CallAsync((s, r) => s.UpdateAdGroupCriterionsAsync(r), request));
}
static UpdateAdGroupCriterionsResponse updateAdGroupCriterions(
	ArrayOfAdGroupCriterion adGroupCriterions,
	ArrayList<AdGroupCriterionType> criterionType) throws RemoteException, Exception
{
	UpdateAdGroupCriterionsRequest request = new UpdateAdGroupCriterionsRequest();

	request.setAdGroupCriterions(adGroupCriterions);
	request.setCriterionType(criterionType);

	return CampaignManagementService.getService().updateAdGroupCriterions(request);
}
static function UpdateAdGroupCriterions(
	$adGroupCriterions,
	$criterionType)
{

	$GLOBALS['Proxy'] = $GLOBALS['CampaignManagementProxy'];

	$request = new UpdateAdGroupCriterionsRequest();

	$request->AdGroupCriterions = $adGroupCriterions;
	$request->CriterionType = $criterionType;

	return $GLOBALS['CampaignManagementProxy']->GetService()->UpdateAdGroupCriterions($request);
}
response=campaignmanagement_service.UpdateAdGroupCriterions(
	AdGroupCriterions=AdGroupCriterions,
	CriterionType=CriterionType)