次の方法で共有


UpdateCampaignCriterions サービス操作 - キャンペーン管理

1 つ以上のキャンペーン条件をUpdatesします。

Request 要素

UpdateCampaignCriterionsRequest オブジェクトは、サービス操作要求の本文要素とヘッダー要素を定義します。 要素は、 要求 SOAP に示されている順序と同じ順序である必要があります。

注:

以下に特に記載がない限り、すべての要求要素が必要です。

要求本文要素

要素 説明 データ型
CampaignCriterions 更新するキャンペーン条件の一覧。

要求ごとに最大 100 個のキャンペーン条件を含めることができます。

CampaignCriterion オブジェクト内で、条件の ID と、それが属するキャンペーンの ID を指定する必要があります。
CampaignCriterion 配列
CriterionType 更新する条件の種類 (Web ページなど)。 呼び出しごとに指定できる条件の種類の値は 1 つだけです。

ターゲットの基準 (年齢、曜日、時刻、デバイス、性別、場所、場所の意図、半径の基準) を追加、削除、または更新するには、 CriterionType 値を Targets として指定する必要があります。 同じ操作で複数のターゲット条件の種類を追加、削除、更新できます。 GetCampaignCriterionsByIds を使用してこれらのターゲット条件を取得するには、特定の種類 (AgeDayTimeDeviceGenderLocation、LocationIntentRadius) を個別に要求する必要があります。
CampaignCriterionType

要求ヘッダー要素

要素 説明 データ型
AuthenticationToken Microsoft Advertising アカウントへのアクセス許可を持つユーザーの資格情報を表す OAuth アクセス トークン。

詳細については、「 OAuth による認証」を参照してください。
string
CustomerAccountId 要求のエンティティを所有または関連付けられている広告アカウントの識別子。 両方が必要な場合、このヘッダー要素の値は AccountId 本文要素と同じである必要があります。 この要素は、ほとんどのサービス操作に必要であり、ベスト プラクティスとして常に設定する必要があります。

詳細については、「 アカウントと顧客 ID を取得する」を参照してください。
string
Customerid ユーザーがアクセスまたは操作しているマネージャー アカウント (顧客) の識別子。 ユーザーは複数のマネージャー アカウントにアクセスできます。 この要素は、ほとんどのサービス操作に必要であり、ベスト プラクティスとして常に設定する必要があります。

詳細については、「 アカウントと顧客 ID を取得する」を参照してください。
string
DeveloperToken Bing Ads API へのアクセスに使用される開発者トークン。

詳細については、「 開発者トークンを取得する」を参照してください。
string
Password この要素は内部使用のために予約されており、今後のバージョンの API から削除されます。 ユーザー資格情報を設定するには、AuthenticationToken 要素を使用する必要があります。 string
UserName この要素は内部使用のために予約されており、今後のバージョンの API から削除されます。 ユーザー資格情報を設定するには、AuthenticationToken 要素を使用する必要があります。 string

Response 要素

UpdateCampaignCriterionsResponse オブジェクトは、サービス操作応答の本文要素とヘッダー要素を定義します。 要素は、 応答 SOAP に示されている順序と同じ順序で返されます。

応答本文の要素

要素 説明 データ型
NestedPartialErrors 正常に更新されなかった条件の詳細を含む BatchErrorCollection オブジェクトの配列。 各 BatchErrorCollection オブジェクト内の最上位のエラーは、潜在的な条件エラーに対応します。 BatchError オブジェクトの入れ子になったリストには、条件に含めることができる項目の一覧に固有のエラー (製品条件の一覧など) が含まれます。

エラーの一覧は、要求内の項目の一覧に直接対応していません。 エラーがない場合はリストを空にすることも、失敗したリスト 項目ごとに対応する 1 つ以上のエラー オブジェクトを要求に含めることもできます。
BatchErrorCollection 配列

応答ヘッダー要素

要素 説明 データ型
TrackingId 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">UpdateCampaignCriterions</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>
    <UpdateCampaignCriterionsRequest xmlns="https://bingads.microsoft.com/CampaignManagement/v13">
      <CampaignCriterions i:nil="false">
        <CampaignCriterion i:type="-- derived type specified here with the appropriate prefix --">
          <CampaignId>ValueHere</CampaignId>
          <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>
          </Criterion>
          <ForwardCompatibilityMap xmlns:e196="http://schemas.datacontract.org/2004/07/System.Collections.Generic" i:nil="false">
            <e196:KeyValuePairOfstringstring>
              <e196:key i:nil="false">ValueHere</e196:key>
              <e196:value i:nil="false">ValueHere</e196:value>
            </e196:KeyValuePairOfstringstring>
          </ForwardCompatibilityMap>
          <Id i:nil="false">ValueHere</Id>
          <Status i:nil="false">ValueHere</Status>
          <Type i:nil="false">ValueHere</Type>
          <!--No additional fields are applicable if the derived type attribute is set to NegativeCampaignCriterion-->
          <!--These fields are applicable if the derived type attribute is set to BiddableCampaignCriterion-->
          <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>
          <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>
        </CampaignCriterion>
      </CampaignCriterions>
      <CriterionType>ValueHere</CriterionType>
    </UpdateCampaignCriterionsRequest>
  </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>
    <UpdateCampaignCriterionsResponse 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:e197="http://schemas.datacontract.org/2004/07/System.Collections.Generic" d4p1:nil="false">
                <e197:KeyValuePairOfstringstring>
                  <e197:key d4p1:nil="false">ValueHere</e197:key>
                  <e197:value d4p1:nil="false">ValueHere</e197:value>
                </e197: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:e198="http://schemas.datacontract.org/2004/07/System.Collections.Generic" d4p1:nil="false">
            <e198:KeyValuePairOfstringstring>
              <e198:key d4p1:nil="false">ValueHere</e198:key>
              <e198:value d4p1:nil="false">ValueHere</e198:value>
            </e198: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>
    </UpdateCampaignCriterionsResponse>
  </s:Body>
</s:Envelope>

コード構文

構文の例は、 Bing広告 SDK で使用できます。 その他 の例については、「Bing広告 API コードの例 」を参照してください。

public async Task<UpdateCampaignCriterionsResponse> UpdateCampaignCriterionsAsync(
	IList<CampaignCriterion> campaignCriterions,
	CampaignCriterionType criterionType)
{
	var request = new UpdateCampaignCriterionsRequest
	{
		CampaignCriterions = campaignCriterions,
		CriterionType = criterionType
	};

	return (await CampaignManagementService.CallAsync((s, r) => s.UpdateCampaignCriterionsAsync(r), request));
}
static UpdateCampaignCriterionsResponse updateCampaignCriterions(
	ArrayOfCampaignCriterion campaignCriterions,
	ArrayList<CampaignCriterionType> criterionType) throws RemoteException, Exception
{
	UpdateCampaignCriterionsRequest request = new UpdateCampaignCriterionsRequest();

	request.setCampaignCriterions(campaignCriterions);
	request.setCriterionType(criterionType);

	return CampaignManagementService.getService().updateCampaignCriterions(request);
}
static function UpdateCampaignCriterions(
	$campaignCriterions,
	$criterionType)
{

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

	$request = new UpdateCampaignCriterionsRequest();

	$request->CampaignCriterions = $campaignCriterions;
	$request->CriterionType = $criterionType;

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

要件

サービス: CampaignManagementService.svc v13
名前 空間: https://bingads.microsoft.com/CampaignManagement/v13