共用方式為


GetImportJobsByIds 服務作業 - 行銷活動管理

依其類型和識別碼取得匯入作業。

提示

如需實作概觀,請參閱 Google Ads 匯入 技術指南。

要求專案

GetImportJobsByIdsRequest物件會定義服務作業要求的主體標頭元素。 元素的順序必須與 要求 SOAP中所示的順序相同。

注意事項

除非下面另有說明,否則所有要求專案都是必要的。

要求本文專案

元素 說明 資料類型
ImportJobIds 要取得之匯入作業的識別碼。

您可以指定最多 100 個匯入作業識別碼。 如果未指定此元素,則作業會在廣告帳戶中傳回最多 500 個匯入作業。
long 陣列
ImportType 要取得的匯入作業類型。

若要取得 GoogleImportJob 物件,請將此元素設定為 「GoogleImportJob」。
string
ReturnAdditionalFields 其他域值可讓您使用目前版本的行銷活動管理 API 取得最新功能,而在下一個版本中,預設會包含對應的元素。

此要求專案是選擇性的。
ImportAdditionalField

要求標頭元素

元素 說明 資料類型
AuthenticationToken OAuth 存取權杖,代表具有 Microsoft Advertising 帳戶許可權之使用者的認證。

如需詳細資訊,請 參閱使用 OAuth 進行驗證
string
CustomerAccountId 擁有或與要求中實體相關聯之廣告帳戶的識別碼。 當兩者都需要時,此標頭元素必須具有與 AccountId body 元素相同的值。 此元素是大部分服務作業的必要專案,最佳做法是一律加以設定。

如需詳細資訊, 請參閱取得您的帳戶和客戶識別碼
string
CustomerId (使用者存取或操作之使用者) 客戶的管理員帳戶識別碼。 使用者可以存取多個管理員帳戶。 此元素是大部分服務作業的必要專案,最佳做法是一律加以設定。

如需詳細資訊, 請參閱取得您的帳戶和客戶識別碼
string
DeveloperToken 用來存取 Bing 廣告 API 的開發人員權杖。

如需詳細資訊 ,請參閱取得開發人員權杖
string
密碼 此元素會保留供內部使用,並會從未來的 API 版本中移除。 您必須使用 AuthenticationToken 元素來設定使用者認證。 string
UserName 此元素會保留供內部使用,並會從未來的 API 版本中移除。 您必須使用 AuthenticationToken 元素來設定使用者認證。 string

Response 元素

GetImportJobsByIdsResponse物件會定義服務作業回應的主體標頭元素。 這些元素的傳回順序與 回應 SOAP中所示的順序相同。

回應本文專案

元素 說明 資料類型
ImportJobs 符合要求準則的匯入作業。 ImportJob 數
PartialErrors BatchError物件的陣列,其中包含任何未成功要求專案的詳細資料。

錯誤清單不會直接對應至要求中的專案清單。 如果沒有錯誤,清單可以是空的,或者可以包含一或多個對應到要求中每個不成功清單專案的錯誤物件。
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">GetImportJobsByIds</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>
    <GetImportJobsByIdsRequest xmlns="https://bingads.microsoft.com/CampaignManagement/v13">
      <ImportJobIds i:nil="false" xmlns:a1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <a1:long>ValueHere</a1:long>
      </ImportJobIds>
      <ImportType i:nil="false">ValueHere</ImportType>
      <ReturnAdditionalFields i:nil="false">ValueHere</ReturnAdditionalFields>
    </GetImportJobsByIdsRequest>
  </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>
    <GetImportJobsByIdsResponse xmlns="https://bingads.microsoft.com/CampaignManagement/v13">
      <ImportJobs d4p1:nil="false" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">
        <ImportJob d4p1:type="-- derived type specified here with the appropriate prefix --">
          <CreatedByUserId d4p1:nil="false">ValueHere</CreatedByUserId>
          <CreatedByUserName d4p1:nil="false">ValueHere</CreatedByUserName>
          <CreatedDateTimeInUTC d4p1:nil="false">ValueHere</CreatedDateTimeInUTC>
          <Frequency d4p1:nil="false">
            <Cron d4p1:nil="false">ValueHere</Cron>
            <TimeZone d4p1:nil="false">ValueHere</TimeZone>
            <Type d4p1:nil="false">ValueHere</Type>
          </Frequency>
          <Id d4p1:nil="false">ValueHere</Id>
          <ImportOption d4p1:nil="false" d4p1:type="-- derived type specified here with the appropriate prefix --">
            <ForwardCompatibilityMap xmlns:e147="http://schemas.datacontract.org/2004/07/System.Collections.Generic" d4p1:nil="false">
              <e147:KeyValuePairOfstringstring>
                <e147:key d4p1:nil="false">ValueHere</e147:key>
                <e147:value d4p1:nil="false">ValueHere</e147:value>
              </e147:KeyValuePairOfstringstring>
            </ForwardCompatibilityMap>
            <Type d4p1:nil="false">ValueHere</Type>
            <!--These fields are applicable if the derived type attribute is set to GoogleImportOption-->
            <AccountUrlOptions d4p1:nil="false">ValueHere</AccountUrlOptions>
            <AdScheduleUseSearcherTimezone d4p1:nil="false">ValueHere</AdScheduleUseSearcherTimezone>
            <AdjustmentForBids d4p1:nil="false">ValueHere</AdjustmentForBids>
            <AdjustmentForCampaignBudgets d4p1:nil="false">ValueHere</AdjustmentForCampaignBudgets>
            <AssociatedStoreId d4p1:nil="false">ValueHere</AssociatedStoreId>
            <AssociatedUetTagId d4p1:nil="false">ValueHere</AssociatedUetTagId>
            <AutoDeviceBidOptimization d4p1:nil="false">ValueHere</AutoDeviceBidOptimization>
            <DeleteRemovedEntities d4p1:nil="false">ValueHere</DeleteRemovedEntities>
            <EnableAutoCurrencyConversion d4p1:nil="false">ValueHere</EnableAutoCurrencyConversion>
            <EnableParentLocationMapping d4p1:nil="false">ValueHere</EnableParentLocationMapping>
            <NewAccountNegativeKeywords d4p1:nil="false">ValueHere</NewAccountNegativeKeywords>
            <NewActiveAdsForExistingAdGroups d4p1:nil="false">ValueHere</NewActiveAdsForExistingAdGroups>
            <NewActiveCampaignsAndChildEntities d4p1:nil="false">ValueHere</NewActiveCampaignsAndChildEntities>
            <NewAdCustomizerFeeds d4p1:nil="false">ValueHere</NewAdCustomizerFeeds>
            <NewAdGroupsAndChildEntitiesForExistingCampaigns d4p1:nil="false">ValueHere</NewAdGroupsAndChildEntitiesForExistingCampaigns>
            <NewAdSchedules d4p1:nil="false">ValueHere</NewAdSchedules>
            <NewAppAdExtensions d4p1:nil="false">ValueHere</NewAppAdExtensions>
            <NewAudienceTargets d4p1:nil="false">ValueHere</NewAudienceTargets>
            <NewBrandSuitability d4p1:nil="false">ValueHere</NewBrandSuitability>
            <NewCallAdExtensions d4p1:nil="false">ValueHere</NewCallAdExtensions>
            <NewCalloutAdExtensions d4p1:nil="false">ValueHere</NewCalloutAdExtensions>
            <NewConversionGoals d4p1:nil="false">ValueHere</NewConversionGoals>
            <NewDemographicTargets d4p1:nil="false">ValueHere</NewDemographicTargets>
            <NewDeviceTargets d4p1:nil="false">ValueHere</NewDeviceTargets>
            <NewEntities d4p1:nil="false">ValueHere</NewEntities>
            <NewImageAdExtensions d4p1:nil="false">ValueHere</NewImageAdExtensions>
            <NewKeywordUrls d4p1:nil="false">ValueHere</NewKeywordUrls>
            <NewKeywordsForExistingAdGroups d4p1:nil="false">ValueHere</NewKeywordsForExistingAdGroups>
            <NewLabels d4p1:nil="false">ValueHere</NewLabels>
            <NewLeadFormAdExtensions d4p1:nil="false">ValueHere</NewLeadFormAdExtensions>
            <NewLocationAdExtensions d4p1:nil="false">ValueHere</NewLocationAdExtensions>
            <NewLocationTargets d4p1:nil="false">ValueHere</NewLocationTargets>
            <NewLogoAdExtensions d4p1:nil="false">ValueHere</NewLogoAdExtensions>
            <NewNegativeKeywordLists d4p1:nil="false">ValueHere</NewNegativeKeywordLists>
            <NewNegativeKeywordsForExistingParents d4p1:nil="false">ValueHere</NewNegativeKeywordsForExistingParents>
            <NewNegativeSites d4p1:nil="false">ValueHere</NewNegativeSites>
            <NewPageFeeds d4p1:nil="false">ValueHere</NewPageFeeds>
            <NewPausedAdsForExistingAdGroups d4p1:nil="false">ValueHere</NewPausedAdsForExistingAdGroups>
            <NewPausedCampaignsAndChildEntities d4p1:nil="false">ValueHere</NewPausedCampaignsAndChildEntities>
            <NewPriceAdExtensions d4p1:nil="false">ValueHere</NewPriceAdExtensions>
            <NewProductFilters d4p1:nil="false">ValueHere</NewProductFilters>
            <NewPromotionAdExtensions d4p1:nil="false">ValueHere</NewPromotionAdExtensions>
            <NewReviewAdExtensions d4p1:nil="false">ValueHere</NewReviewAdExtensions>
            <NewSitelinkAdExtensions d4p1:nil="false">ValueHere</NewSitelinkAdExtensions>
            <NewStructuredSnippetAdExtensions d4p1:nil="false">ValueHere</NewStructuredSnippetAdExtensions>
            <NewUrlOptions d4p1:nil="false">ValueHere</NewUrlOptions>
            <PauseAIMAdGroupIfAllAudienceCriterionNotImported d4p1:nil="false">ValueHere</PauseAIMAdGroupIfAllAudienceCriterionNotImported>
            <PauseCampaignsWithoutSupportedLocations d4p1:nil="false">ValueHere</PauseCampaignsWithoutSupportedLocations>
            <PauseNewCampaigns d4p1:nil="false">ValueHere</PauseNewCampaigns>
            <RaiseBidsToMinimum d4p1:nil="false">ValueHere</RaiseBidsToMinimum>
            <RaiseCampaignBudgetsToMinimum d4p1:nil="false">ValueHere</RaiseCampaignBudgetsToMinimum>
            <RaiseProductGroupBidsToMinimum d4p1:nil="false">ValueHere</RaiseProductGroupBidsToMinimum>
            <RenameCampaignNameWithSuffix d4p1:nil="false">ValueHere</RenameCampaignNameWithSuffix>
            <SearchAndDsaMixedCampaignAsSearchCampaign d4p1:nil="false">ValueHere</SearchAndDsaMixedCampaignAsSearchCampaign>
            <SearchAndReplaceForCampaignNames d4p1:nil="false">
              <ReplaceString d4p1:nil="false">ValueHere</ReplaceString>
              <SearchString d4p1:nil="false">ValueHere</SearchString>
            </SearchAndReplaceForCampaignNames>
            <SearchAndReplaceForCustomParameters d4p1:nil="false">
              <ReplaceString d4p1:nil="false">ValueHere</ReplaceString>
              <SearchString d4p1:nil="false">ValueHere</SearchString>
            </SearchAndReplaceForCustomParameters>
            <SearchAndReplaceForFinalURLSuffix d4p1:nil="false">
              <ReplaceString d4p1:nil="false">ValueHere</ReplaceString>
              <SearchString d4p1:nil="false">ValueHere</SearchString>
            </SearchAndReplaceForFinalURLSuffix>
            <SearchAndReplaceForTrackingTemplates d4p1:nil="false">
              <ReplaceString d4p1:nil="false">ValueHere</ReplaceString>
              <SearchString d4p1:nil="false">ValueHere</SearchString>
            </SearchAndReplaceForTrackingTemplates>
            <SearchAndReplaceForUrls d4p1:nil="false">
              <ReplaceString d4p1:nil="false">ValueHere</ReplaceString>
              <SearchString d4p1:nil="false">ValueHere</SearchString>
            </SearchAndReplaceForUrls>
            <SuffixForCampaignNames d4p1:nil="false">ValueHere</SuffixForCampaignNames>
            <SuffixForTrackingTemplates d4p1:nil="false">ValueHere</SuffixForTrackingTemplates>
            <SuffixForUrls d4p1:nil="false">ValueHere</SuffixForUrls>
            <UpdateAccountNegativeKeywords d4p1:nil="false">ValueHere</UpdateAccountNegativeKeywords>
            <UpdateAdCustomizerAttributes d4p1:nil="false">ValueHere</UpdateAdCustomizerAttributes>
            <UpdateAdCustomizerFeeds d4p1:nil="false">ValueHere</UpdateAdCustomizerFeeds>
            <UpdateAdGroupNetwork d4p1:nil="false">ValueHere</UpdateAdGroupNetwork>
            <UpdateAdSchedules d4p1:nil="false">ValueHere</UpdateAdSchedules>
            <UpdateAdUrls d4p1:nil="false">ValueHere</UpdateAdUrls>
            <UpdateAppAdExtensions d4p1:nil="false">ValueHere</UpdateAppAdExtensions>
            <UpdateAudienceTargets d4p1:nil="false">ValueHere</UpdateAudienceTargets>
            <UpdateBiddingStrategies d4p1:nil="false">ValueHere</UpdateBiddingStrategies>
            <UpdateBids d4p1:nil="false">ValueHere</UpdateBids>
            <UpdateBrandSuitability d4p1:nil="false">ValueHere</UpdateBrandSuitability>
            <UpdateCallAdExtensions d4p1:nil="false">ValueHere</UpdateCallAdExtensions>
            <UpdateCalloutAdExtensions d4p1:nil="false">ValueHere</UpdateCalloutAdExtensions>
            <UpdateCampaignAdGroupLanguages d4p1:nil="false">ValueHere</UpdateCampaignAdGroupLanguages>
            <UpdateCampaignBudgets d4p1:nil="false">ValueHere</UpdateCampaignBudgets>
            <UpdateCampaignNames d4p1:nil="false">ValueHere</UpdateCampaignNames>
            <UpdateConversionGoals d4p1:nil="false">ValueHere</UpdateConversionGoals>
            <UpdateDemographicTargets d4p1:nil="false">ValueHere</UpdateDemographicTargets>
            <UpdateDeviceTargets d4p1:nil="false">ValueHere</UpdateDeviceTargets>
            <UpdateEntities d4p1:nil="false">ValueHere</UpdateEntities>
            <UpdateImageAdExtensions d4p1:nil="false">ValueHere</UpdateImageAdExtensions>
            <UpdateKeywordUrls d4p1:nil="false">ValueHere</UpdateKeywordUrls>
            <UpdateLabels d4p1:nil="false">ValueHere</UpdateLabels>
            <UpdateLeadFormAdExtensions d4p1:nil="false">ValueHere</UpdateLeadFormAdExtensions>
            <UpdateLocationAdExtensions d4p1:nil="false">ValueHere</UpdateLocationAdExtensions>
            <UpdateLocationTargets d4p1:nil="false">ValueHere</UpdateLocationTargets>
            <UpdateLogoAdExtensions d4p1:nil="false">ValueHere</UpdateLogoAdExtensions>
            <UpdateNegativeKeywordLists d4p1:nil="false">ValueHere</UpdateNegativeKeywordLists>
            <UpdateNegativeSites d4p1:nil="false">ValueHere</UpdateNegativeSites>
            <UpdatePageFeeds d4p1:nil="false">ValueHere</UpdatePageFeeds>
            <UpdatePriceAdExtensions d4p1:nil="false">ValueHere</UpdatePriceAdExtensions>
            <UpdateProductFilters d4p1:nil="false">ValueHere</UpdateProductFilters>
            <UpdatePromotionAdExtensions d4p1:nil="false">ValueHere</UpdatePromotionAdExtensions>
            <UpdateReviewAdExtensions d4p1:nil="false">ValueHere</UpdateReviewAdExtensions>
            <UpdateSitelinkAdExtensions d4p1:nil="false">ValueHere</UpdateSitelinkAdExtensions>
            <UpdateSitelinkUrls d4p1:nil="false">ValueHere</UpdateSitelinkUrls>
            <UpdateStatusForAdGroups d4p1:nil="false">ValueHere</UpdateStatusForAdGroups>
            <UpdateStatusForAds d4p1:nil="false">ValueHere</UpdateStatusForAds>
            <UpdateStatusForCampaigns d4p1:nil="false">ValueHere</UpdateStatusForCampaigns>
            <UpdateStatusForKeywords d4p1:nil="false">ValueHere</UpdateStatusForKeywords>
            <UpdateStructuredSnippetAdExtensions d4p1:nil="false">ValueHere</UpdateStructuredSnippetAdExtensions>
            <UpdateUrlOptions d4p1:nil="false">ValueHere</UpdateUrlOptions>
            <!--No additional fields are applicable if the derived type attribute is set to FileImportOption-->
          </ImportOption>
          <LastRunTimeInUTC d4p1:nil="false">ValueHere</LastRunTimeInUTC>
          <Name d4p1:nil="false">ValueHere</Name>
          <NotificationEmail d4p1:nil="false">ValueHere</NotificationEmail>
          <NotificationType d4p1:nil="false">ValueHere</NotificationType>
          <Status d4p1:nil="false">ValueHere</Status>
          <Type d4p1:nil="false">ValueHere</Type>
          <!--These fields are applicable if the derived type attribute is set to GoogleImportJob-->
          <CampaignAdGroupIds d4p1:nil="false">
            <CampaignAdGroupIds>
              <ActiveAdGroupsOnly d4p1:nil="false">ValueHere</ActiveAdGroupsOnly>
              <AdGroupIds d4p1:nil="false" xmlns:a1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
                <a1:long>ValueHere</a1:long>
              </AdGroupIds>
              <CampaignId>ValueHere</CampaignId>
            </CampaignAdGroupIds>
          </CampaignAdGroupIds>
          <CredentialId d4p1:nil="false">ValueHere</CredentialId>
          <GoogleAccountId d4p1:nil="false">ValueHere</GoogleAccountId>
          <GoogleUserName d4p1:nil="false">ValueHere</GoogleUserName>
          <!--These fields are applicable if the derived type attribute is set to FileImportJob-->
          <FileSource d4p1:nil="false">ValueHere</FileSource>
          <FileUrl d4p1:nil="false">ValueHere</FileUrl>
        </ImportJob>
      </ImportJobs>
      <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:e148="http://schemas.datacontract.org/2004/07/System.Collections.Generic" d4p1:nil="false">
            <e148:KeyValuePairOfstringstring>
              <e148:key d4p1:nil="false">ValueHere</e148:key>
              <e148:value d4p1:nil="false">ValueHere</e148:value>
            </e148: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>
    </GetImportJobsByIdsResponse>
  </s:Body>
</s:Envelope>

程式碼語法

範例語法可以與 Bing 廣告 SDK搭配使用。 如需更多範例,請參閱 Bing 廣告 API 程式碼范 例。

public async Task<GetImportJobsByIdsResponse> GetImportJobsByIdsAsync(
	IList<long> importJobIds,
	string importType,
	ImportAdditionalField? returnAdditionalFields)
{
	var request = new GetImportJobsByIdsRequest
	{
		ImportJobIds = importJobIds,
		ImportType = importType,
		ReturnAdditionalFields = returnAdditionalFields
	};

	return (await CampaignManagementService.CallAsync((s, r) => s.GetImportJobsByIdsAsync(r), request));
}
static GetImportJobsByIdsResponse getImportJobsByIds(
	ArrayOflong importJobIds,
	java.lang.String importType,
	ArrayList<ImportAdditionalField> returnAdditionalFields) throws RemoteException, Exception
{
	GetImportJobsByIdsRequest request = new GetImportJobsByIdsRequest();

	request.setImportJobIds(importJobIds);
	request.setImportType(importType);
	request.setReturnAdditionalFields(returnAdditionalFields);

	return CampaignManagementService.getService().getImportJobsByIds(request);
}
static function GetImportJobsByIds(
	$importJobIds,
	$importType,
	$returnAdditionalFields)
{

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

	$request = new GetImportJobsByIdsRequest();

	$request->ImportJobIds = $importJobIds;
	$request->ImportType = $importType;
	$request->ReturnAdditionalFields = $returnAdditionalFields;

	return $GLOBALS['CampaignManagementProxy']->GetService()->GetImportJobsByIds($request);
}
response=campaignmanagement_service.GetImportJobsByIds(
	ImportJobIds=ImportJobIds,
	ImportType=ImportType,
	ReturnAdditionalFields=ReturnAdditionalFields)

需求

服務: CampaignManagementService.svc v13
命名 空間: https://bingads.microsoft.com/CampaignManagement/v13