次の方法で共有


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

識別子と種類別の広告グループの条件を取得します。

Request 要素

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

注:

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

要求本文要素

要素 説明 データ型
AdGroupCriterionIds 取得する条件を識別する一意の識別子の一覧。

要求ごとに最大 1,000 個の広告グループ条件識別子を含めることができます。

この要素が null の場合、指定した AdGroupId のすべての条件が取得されます。
long 配列
AdGroupId 取得する条件を所有する広告グループの識別子。 long
CriterionType 取得する条件の種類 (Web ページなど)。 指定できる型は 1 つだけです。 この操作では 、[ターゲット][対象ユーザー ] の値は使用できません。 AdGroupCriterionType
ReturnAdditionalFields 返される各広告グループの条件に含める追加のプロパティの一覧。 追加のフィールド値を使用すると、現在のバージョンの Campaign Management API を使用して最新の機能を取得できます。次のバージョンでは、対応する要素が既定で含まれます。

この要求要素は省略可能です。
CriterionAdditionalField

要求ヘッダー要素

要素 説明 データ型
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 要素

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

応答本文の要素

要素 説明 データ型
AdGroupCriterions 要求で指定された識別子に直接対応する条件の一覧。 リスト内の識別子が無効な場合、応答内の対応する項目は null に設定されます。 AdGroupCriterion 配列

応答ヘッダー要素

要素 説明 データ型
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">GetAdGroupCriterionsByIds</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>
    <GetAdGroupCriterionsByIdsRequest xmlns="https://bingads.microsoft.com/CampaignManagement/v13">
      <AdGroupCriterionIds i:nil="false" xmlns:a1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <a1:long>ValueHere</a1:long>
      </AdGroupCriterionIds>
      <AdGroupId>ValueHere</AdGroupId>
      <CriterionType>ValueHere</CriterionType>
      <ReturnAdditionalFields i:nil="false">ValueHere</ReturnAdditionalFields>
    </GetAdGroupCriterionsByIdsRequest>
  </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>
    <GetAdGroupCriterionsByIdsResponse xmlns="https://bingads.microsoft.com/CampaignManagement/v13">
      <AdGroupCriterions d4p1:nil="false" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">
        <AdGroupCriterion d4p1:type="-- derived type specified here with the appropriate prefix --">
          <AdGroupId>ValueHere</AdGroupId>
          <Criterion d4p1:nil="false" d4p1:type="-- derived type specified here with the appropriate prefix --">
            <Type d4p1:nil="false">ValueHere</Type>
            <!--These fields are applicable if the derived type attribute is set to ProductPartition-->
            <Condition d4p1:nil="false">
              <Attribute d4p1:nil="false">ValueHere</Attribute>
              <Operand d4p1:nil="false">ValueHere</Operand>
              <Operator d4p1:nil="false">ValueHere</Operator>
            </Condition>
            <ParentCriterionId d4p1:nil="false">ValueHere</ParentCriterionId>
            <PartitionType>ValueHere</PartitionType>
            <!--These fields are applicable if the derived type attribute is set to HotelGroup-->
            <Listing d4p1:nil="false">
              <Attribute d4p1:nil="false">ValueHere</Attribute>
              <Operand d4p1:nil="false">ValueHere</Operand>
            </Listing>
            <ListingType>ValueHere</ListingType>
            <ParentCriterionId d4p1:nil="false">ValueHere</ParentCriterionId>
            <!--These fields are applicable if the derived type attribute is set to HotelAdvanceBookingWindowCriterion-->
            <MaxDays d4p1:nil="false">ValueHere</MaxDays>
            <MinDays d4p1:nil="false">ValueHere</MinDays>
            <!--These fields are applicable if the derived type attribute is set to HotelCheckInDateCriterion-->
            <EndDate d4p1:nil="false">ValueHere</EndDate>
            <StartDate d4p1:nil="false">ValueHere</StartDate>
            <!--This field is applicable if the derived type attribute is set to HotelCheckInDayCriterion-->
            <CheckInDay d4p1:nil="false">ValueHere</CheckInDay>
            <!--This field is applicable if the derived type attribute is set to HotelDateSelectionTypeCriterion-->
            <HotelDateSelectionType d4p1:nil="false">ValueHere</HotelDateSelectionType>
            <!--These fields are applicable if the derived type attribute is set to HotelLengthOfStayCriterion-->
            <MaxNights d4p1:nil="false">ValueHere</MaxNights>
            <MinNights d4p1:nil="false">ValueHere</MinNights>
            <!--This field is applicable if the derived type attribute is set to ProductScope-->
            <Conditions d4p1:nil="false">
              <ProductCondition>
                <Attribute d4p1:nil="false">ValueHere</Attribute>
                <Operand d4p1:nil="false">ValueHere</Operand>
                <Operator d4p1:nil="false">ValueHere</Operator>
              </ProductCondition>
            </Conditions>
            <!--This field is applicable if the derived type attribute is set to Webpage-->
            <Parameter d4p1:nil="false">
              <Conditions d4p1:nil="false">
                <WebpageCondition>
                  <Argument d4p1:nil="false">ValueHere</Argument>
                  <Operand>ValueHere</Operand>
                  <Operator d4p1:nil="false">ValueHere</Operator>
                </WebpageCondition>
              </Conditions>
              <CriterionName d4p1:nil="false">ValueHere</CriterionName>
            </Parameter>
            <!--This field is applicable if the derived type attribute is set to AgeCriterion-->
            <AgeRange d4p1:nil="false">ValueHere</AgeRange>
            <!--These fields are applicable if the derived type attribute is set to DeviceCriterion-->
            <DeviceName d4p1:nil="false">ValueHere</DeviceName>
            <OSName d4p1:nil="false">ValueHere</OSName>
            <!--These fields are applicable if the derived type attribute is set to DayTimeCriterion-->
            <Day d4p1:nil="false">ValueHere</Day>
            <FromHour d4p1:nil="false">ValueHere</FromHour>
            <FromMinute d4p1:nil="false">ValueHere</FromMinute>
            <ToHour d4p1:nil="false">ValueHere</ToHour>
            <ToMinute d4p1:nil="false">ValueHere</ToMinute>
            <!--This field is applicable if the derived type attribute is set to GenderCriterion-->
            <GenderType d4p1:nil="false">ValueHere</GenderType>
            <!--These fields are applicable if the derived type attribute is set to RadiusCriterion-->
            <LatitudeDegrees d4p1:nil="false">ValueHere</LatitudeDegrees>
            <LongitudeDegrees d4p1:nil="false">ValueHere</LongitudeDegrees>
            <Name d4p1:nil="false">ValueHere</Name>
            <Radius d4p1:nil="false">ValueHere</Radius>
            <RadiusUnit d4p1:nil="false">ValueHere</RadiusUnit>
            <!--These fields are applicable if the derived type attribute is set to LocationCriterion-->
            <DisplayName d4p1:nil="false">ValueHere</DisplayName>
            <EnclosedLocationIds d4p1:nil="false" xmlns:a1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
              <a1:long>ValueHere</a1:long>
            </EnclosedLocationIds>
            <LocationId d4p1:nil="false">ValueHere</LocationId>
            <LocationType d4p1:nil="false">ValueHere</LocationType>
            <!--This field is applicable if the derived type attribute is set to LocationIntentCriterion-->
            <IntentOption d4p1:nil="false">ValueHere</IntentOption>
            <!--These fields are applicable if the derived type attribute is set to AudienceCriterion-->
            <AudienceId d4p1:nil="false">ValueHere</AudienceId>
            <AudienceType d4p1: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 d4p1: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>
          <Id d4p1:nil="false">ValueHere</Id>
          <Status d4p1:nil="false">ValueHere</Status>
          <Type d4p1:nil="false">ValueHere</Type>
          <!--These fields are applicable if the derived type attribute is set to BiddableAdGroupCriterion-->
          <CriterionBid d4p1:nil="false" d4p1:type="-- derived type specified here with the appropriate prefix --">
            <Type d4p1:nil="false">ValueHere</Type>
            <!--This field is applicable if the derived type attribute is set to RateBid-->
            <RateAmount d4p1:nil="false">
              <Amount d4p1: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 d4p1:nil="false">ValueHere</DestinationUrl>
          <EditorialStatus d4p1:nil="false">ValueHere</EditorialStatus>
          <FinalAppUrls d4p1:nil="false">
            <AppUrl>
              <OsType d4p1:nil="false">ValueHere</OsType>
              <Url d4p1:nil="false">ValueHere</Url>
            </AppUrl>
          </FinalAppUrls>
          <FinalMobileUrls d4p1:nil="false" xmlns:a1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
            <a1:string>ValueHere</a1:string>
          </FinalMobileUrls>
          <FinalUrlSuffix d4p1:nil="false">ValueHere</FinalUrlSuffix>
          <FinalUrls d4p1:nil="false" xmlns:a1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
            <a1:string>ValueHere</a1:string>
          </FinalUrls>
          <TrackingUrlTemplate d4p1:nil="false">ValueHere</TrackingUrlTemplate>
          <UrlCustomParameters d4p1:nil="false">
            <Parameters d4p1:nil="false">
              <CustomParameter>
                <Key d4p1:nil="false">ValueHere</Key>
                <Value d4p1:nil="false">ValueHere</Value>
              </CustomParameter>
            </Parameters>
          </UrlCustomParameters>
          <CriterionCashback d4p1:nil="false" d4p1:type="-- derived type specified here with the appropriate prefix --">
            <Type d4p1:nil="false">ValueHere</Type>
            <!--This field is applicable if the derived type attribute is set to CashbackAdjustment-->
            <CashbackPercent d4p1:nil="false">ValueHere</CashbackPercent>
          </CriterionCashback>
          <!--No additional fields are applicable if the derived type attribute is set to NegativeAdGroupCriterion-->
        </AdGroupCriterion>
      </AdGroupCriterions>
    </GetAdGroupCriterionsByIdsResponse>
  </s:Body>
</s:Envelope>

コード構文

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

public async Task<GetAdGroupCriterionsByIdsResponse> GetAdGroupCriterionsByIdsAsync(
	IList<long> adGroupCriterionIds,
	long adGroupId,
	AdGroupCriterionType criterionType,
	CriterionAdditionalField? returnAdditionalFields)
{
	var request = new GetAdGroupCriterionsByIdsRequest
	{
		AdGroupCriterionIds = adGroupCriterionIds,
		AdGroupId = adGroupId,
		CriterionType = criterionType,
		ReturnAdditionalFields = returnAdditionalFields
	};

	return (await CampaignManagementService.CallAsync((s, r) => s.GetAdGroupCriterionsByIdsAsync(r), request));
}
static GetAdGroupCriterionsByIdsResponse getAdGroupCriterionsByIds(
	ArrayOflong adGroupCriterionIds,
	java.lang.Long adGroupId,
	ArrayList<AdGroupCriterionType> criterionType,
	ArrayList<CriterionAdditionalField> returnAdditionalFields) throws RemoteException, Exception
{
	GetAdGroupCriterionsByIdsRequest request = new GetAdGroupCriterionsByIdsRequest();

	request.setAdGroupCriterionIds(adGroupCriterionIds);
	request.setAdGroupId(adGroupId);
	request.setCriterionType(criterionType);
	request.setReturnAdditionalFields(returnAdditionalFields);

	return CampaignManagementService.getService().getAdGroupCriterionsByIds(request);
}
static function GetAdGroupCriterionsByIds(
	$adGroupCriterionIds,
	$adGroupId,
	$criterionType,
	$returnAdditionalFields)
{

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

	$request = new GetAdGroupCriterionsByIdsRequest();

	$request->AdGroupCriterionIds = $adGroupCriterionIds;
	$request->AdGroupId = $adGroupId;
	$request->CriterionType = $criterionType;
	$request->ReturnAdditionalFields = $returnAdditionalFields;

	return $GLOBALS['CampaignManagementProxy']->GetService()->GetAdGroupCriterionsByIds($request);
}
response=campaignmanagement_service.GetAdGroupCriterionsByIds(
	AdGroupCriterionIds=AdGroupCriterionIds,
	AdGroupId=AdGroupId,
	CriterionType=CriterionType,
	ReturnAdditionalFields=ReturnAdditionalFields)

要件

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