次の方法で共有


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

指定したキャンペーン条件を取得します。

Request 要素

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

注:

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

要求本文要素

要素 説明 データ型
CampaignCriterionIds 取得するキャンペーンの基準を識別する一意の識別子の一覧。

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

この要素が null の場合、指定した CampaignId のすべての条件が取得されます。
long 配列
CampaignId 基準を取得するキャンペーンの一意識別子。 long
CriterionType 取得する条件の種類 (Web ページなど)。 指定できる型は 1 つだけです。 Targets 値は 、この操作では使用できません。 CampaignCriterionType
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 要素

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

応答本文の要素

要素 説明 データ型
CampaignCriterions 要求で指定された識別子に直接対応するキャンペーン条件の一覧。 リストの項目は null として返される場合があります。 条件が取得されなかったリスト インデックスごとに、対応する要素は null になります。 CampaignCriterion 配列
PartialErrors 成功しなかった要求項目の詳細を含む BatchError オブジェクトの配列。

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

応答ヘッダー要素

要素 説明 データ型
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">GetCampaignCriterionsByIds</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>
    <GetCampaignCriterionsByIdsRequest xmlns="https://bingads.microsoft.com/CampaignManagement/v13">
      <CampaignCriterionIds i:nil="false" xmlns:a1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <a1:long>ValueHere</a1:long>
      </CampaignCriterionIds>
      <CampaignId>ValueHere</CampaignId>
      <CriterionType>ValueHere</CriterionType>
      <ReturnAdditionalFields i:nil="false">ValueHere</ReturnAdditionalFields>
    </GetCampaignCriterionsByIdsRequest>
  </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>
    <GetCampaignCriterionsByIdsResponse xmlns="https://bingads.microsoft.com/CampaignManagement/v13">
      <CampaignCriterions d4p1:nil="false" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">
        <CampaignCriterion d4p1:type="-- derived type specified here with the appropriate prefix --">
          <CampaignId>ValueHere</CampaignId>
          <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>
          <ForwardCompatibilityMap xmlns:e130="http://schemas.datacontract.org/2004/07/System.Collections.Generic" d4p1:nil="false">
            <e130:KeyValuePairOfstringstring>
              <e130:key d4p1:nil="false">ValueHere</e130:key>
              <e130:value d4p1:nil="false">ValueHere</e130:value>
            </e130:KeyValuePairOfstringstring>
          </ForwardCompatibilityMap>
          <Id d4p1:nil="false">ValueHere</Id>
          <Status d4p1:nil="false">ValueHere</Status>
          <Type d4p1: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 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>
          <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>
        </CampaignCriterion>
      </CampaignCriterions>
      <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:e131="http://schemas.datacontract.org/2004/07/System.Collections.Generic" d4p1:nil="false">
            <e131:KeyValuePairOfstringstring>
              <e131:key d4p1:nil="false">ValueHere</e131:key>
              <e131:value d4p1:nil="false">ValueHere</e131:value>
            </e131: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>
    </GetCampaignCriterionsByIdsResponse>
  </s:Body>
</s:Envelope>

コード構文

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

public async Task<GetCampaignCriterionsByIdsResponse> GetCampaignCriterionsByIdsAsync(
	IList<long> campaignCriterionIds,
	long campaignId,
	CampaignCriterionType criterionType,
	CriterionAdditionalField? returnAdditionalFields)
{
	var request = new GetCampaignCriterionsByIdsRequest
	{
		CampaignCriterionIds = campaignCriterionIds,
		CampaignId = campaignId,
		CriterionType = criterionType,
		ReturnAdditionalFields = returnAdditionalFields
	};

	return (await CampaignManagementService.CallAsync((s, r) => s.GetCampaignCriterionsByIdsAsync(r), request));
}
static GetCampaignCriterionsByIdsResponse getCampaignCriterionsByIds(
	ArrayOflong campaignCriterionIds,
	java.lang.Long campaignId,
	ArrayList<CampaignCriterionType> criterionType,
	ArrayList<CriterionAdditionalField> returnAdditionalFields) throws RemoteException, Exception
{
	GetCampaignCriterionsByIdsRequest request = new GetCampaignCriterionsByIdsRequest();

	request.setCampaignCriterionIds(campaignCriterionIds);
	request.setCampaignId(campaignId);
	request.setCriterionType(criterionType);
	request.setReturnAdditionalFields(returnAdditionalFields);

	return CampaignManagementService.getService().getCampaignCriterionsByIds(request);
}
static function GetCampaignCriterionsByIds(
	$campaignCriterionIds,
	$campaignId,
	$criterionType,
	$returnAdditionalFields)
{

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

	$request = new GetCampaignCriterionsByIdsRequest();

	$request->CampaignCriterionIds = $campaignCriterionIds;
	$request->CampaignId = $campaignId;
	$request->CriterionType = $criterionType;
	$request->ReturnAdditionalFields = $returnAdditionalFields;

	return $GLOBALS['CampaignManagementProxy']->GetService()->GetCampaignCriterionsByIds($request);
}
response=campaignmanagement_service.GetCampaignCriterionsByIds(
	CampaignCriterionIds=CampaignCriterionIds,
	CampaignId=CampaignId,
	CriterionType=CriterionType,
	ReturnAdditionalFields=ReturnAdditionalFields)

要件

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