共用方式為


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:e309="http://schemas.datacontract.org/2004/07/System.Collections.Generic" d4p1:nil="false">
              <e309:KeyValuePairOfstringstring>
                <e309:key d4p1:nil="false">ValueHere</e309:key>
                <e309:value d4p1:nil="false">ValueHere</e309:value>
              </e309: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:e310="http://schemas.datacontract.org/2004/07/System.Collections.Generic" d4p1:nil="false">
            <e310:KeyValuePairOfstringstring>
              <e310:key d4p1:nil="false">ValueHere</e310:key>
              <e310:value d4p1:nil="false">ValueHere</e310:value>
            </e310: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

要求 URL

https://campaign.api.bingads.microsoft.com/CampaignManagement/v13/ImportJobs/QueryByIds

要求專案

GetImportJobsByIdsRequest 物件會定義服務作業要求的主體標頭元素。

注意事項

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

要求本文專案

元素 描述 資料類型
ImportJobIds 要取得之匯入作業的標識碼。

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

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

此要求項目是選擇性的。
ImportAdditionalField

要求標頭元素

元素 描述 資料類型
授權 OAuth 存取令牌,代表有權Microsoft Advertising 帳戶之用戶的認證。 請確定令牌前面加上 「Bearer」 ,這是正確驗證的必要專案。

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

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

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

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

Response 元素

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

回應本文專案

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

錯誤清單不會直接對應至要求中的項目清單。 如果沒有錯誤,清單可以是空的,或者可以包含一或多個對應到要求中每個不成功清單項目的錯誤物件。
BatchError 陣

回應標頭元素

元素 描述 資料類型
TrackingId 包含 API 呼叫詳細數據的記錄項目識別碼。 string

要求 JSON

此範本是由工具所產生,用來顯示 JSON 要求的 主體標頭 元素。 如需可搭配此服務作業使用的支援類型,請參閱上述 的要求本文項目 參考。

{
  "ImportJobIds": [
    "LongValueHere"
  ],
  "ImportType": "ValueHere",
  "ReturnAdditionalFields": "ValueHere"
}

回應 JSON

此範本是由工具所產生,用來顯示 JSON 回應的 主體標頭 元素。

以下是 ImportJob 類型為 FileImportJobImportOptionGoogleImportOptionBatchError 為編輯 器時適用的範例。

{
  "ImportJobs": [
    {
      "CreatedByUserId": "LongValueHere",
      "CreatedByUserName": "ValueHere",
      "CreatedDateTimeInUTC": "ValueHere",
      "Frequency": {
        "Cron": "ValueHere",
        "TimeZone": "ValueHere",
        "Type": "ValueHere"
      },
      "Id": "LongValueHere",
      "ImportOption": {
        "ForwardCompatibilityMap": [
          {
            "key": "ValueHere",
            "value": "ValueHere"
          }
        ],
        "Type": "GoogleImportOption",
        "AccountUrlOptions": "ValueHere",
        "AdjustmentForBids": DoubleValueHere,
        "AdjustmentForCampaignBudgets": DoubleValueHere,
        "AdScheduleUseSearcherTimezone": "ValueHere",
        "AssociatedStoreId": "LongValueHere",
        "AssociatedUetTagId": "LongValueHere",
        "AutoDeviceBidOptimization": "ValueHere",
        "DeleteRemovedEntities": "ValueHere",
        "EnableAutoCurrencyConversion": "ValueHere",
        "EnableParentLocationMapping": "ValueHere",
        "NewAccountNegativeKeywords": "ValueHere",
        "NewActiveAdsForExistingAdGroups": "ValueHere",
        "NewActiveCampaignsAndChildEntities": "ValueHere",
        "NewAdCustomizerFeeds": "ValueHere",
        "NewAdGroupsAndChildEntitiesForExistingCampaigns": "ValueHere",
        "NewAdSchedules": "ValueHere",
        "NewAppAdExtensions": "ValueHere",
        "NewAudienceTargets": "ValueHere",
        "NewBrandSuitability": "ValueHere",
        "NewCallAdExtensions": "ValueHere",
        "NewCalloutAdExtensions": "ValueHere",
        "NewConversionGoals": "ValueHere",
        "NewDemographicTargets": "ValueHere",
        "NewDeviceTargets": "ValueHere",
        "NewEntities": "ValueHere",
        "NewImageAdExtensions": "ValueHere",
        "NewKeywordsForExistingAdGroups": "ValueHere",
        "NewKeywordUrls": "ValueHere",
        "NewLabels": "ValueHere",
        "NewLeadFormAdExtensions": "ValueHere",
        "NewLocationAdExtensions": "ValueHere",
        "NewLocationTargets": "ValueHere",
        "NewLogoAdExtensions": "ValueHere",
        "NewNegativeKeywordLists": "ValueHere",
        "NewNegativeKeywordsForExistingParents": "ValueHere",
        "NewNegativeSites": "ValueHere",
        "NewPageFeeds": "ValueHere",
        "NewPausedAdsForExistingAdGroups": "ValueHere",
        "NewPausedCampaignsAndChildEntities": "ValueHere",
        "NewPriceAdExtensions": "ValueHere",
        "NewProductFilters": "ValueHere",
        "NewPromotionAdExtensions": "ValueHere",
        "NewReviewAdExtensions": "ValueHere",
        "NewSitelinkAdExtensions": "ValueHere",
        "NewStructuredSnippetAdExtensions": "ValueHere",
        "NewUrlOptions": "ValueHere",
        "PauseAIMAdGroupIfAllAudienceCriterionNotImported": "ValueHere",
        "PauseCampaignsWithoutSupportedLocations": "ValueHere",
        "PauseNewCampaigns": "ValueHere",
        "RaiseBidsToMinimum": "ValueHere",
        "RaiseCampaignBudgetsToMinimum": "ValueHere",
        "RaiseProductGroupBidsToMinimum": "ValueHere",
        "RenameCampaignNameWithSuffix": "ValueHere",
        "SearchAndDsaMixedCampaignAsSearchCampaign": "ValueHere",
        "SearchAndReplaceForCampaignNames": {
          "ReplaceString": "ValueHere",
          "SearchString": "ValueHere"
        },
        "SearchAndReplaceForCustomParameters": {
          "ReplaceString": "ValueHere",
          "SearchString": "ValueHere"
        },
        "SearchAndReplaceForFinalURLSuffix": {
          "ReplaceString": "ValueHere",
          "SearchString": "ValueHere"
        },
        "SearchAndReplaceForTrackingTemplates": {
          "ReplaceString": "ValueHere",
          "SearchString": "ValueHere"
        },
        "SearchAndReplaceForUrls": {
          "ReplaceString": "ValueHere",
          "SearchString": "ValueHere"
        },
        "SuffixForCampaignNames": "ValueHere",
        "SuffixForTrackingTemplates": "ValueHere",
        "SuffixForUrls": "ValueHere",
        "UpdateAccountNegativeKeywords": "ValueHere",
        "UpdateAdCustomizerAttributes": "ValueHere",
        "UpdateAdCustomizerFeeds": "ValueHere",
        "UpdateAdGroupNetwork": "ValueHere",
        "UpdateAdSchedules": "ValueHere",
        "UpdateAdUrls": "ValueHere",
        "UpdateAppAdExtensions": "ValueHere",
        "UpdateAudienceTargets": "ValueHere",
        "UpdateBiddingStrategies": "ValueHere",
        "UpdateBids": "ValueHere",
        "UpdateBrandSuitability": "ValueHere",
        "UpdateCallAdExtensions": "ValueHere",
        "UpdateCalloutAdExtensions": "ValueHere",
        "UpdateCampaignAdGroupLanguages": "ValueHere",
        "UpdateCampaignBudgets": "ValueHere",
        "UpdateCampaignNames": "ValueHere",
        "UpdateConversionGoals": "ValueHere",
        "UpdateDemographicTargets": "ValueHere",
        "UpdateDeviceTargets": "ValueHere",
        "UpdateEntities": "ValueHere",
        "UpdateImageAdExtensions": "ValueHere",
        "UpdateKeywordUrls": "ValueHere",
        "UpdateLabels": "ValueHere",
        "UpdateLeadFormAdExtensions": "ValueHere",
        "UpdateLocationAdExtensions": "ValueHere",
        "UpdateLocationTargets": "ValueHere",
        "UpdateLogoAdExtensions": "ValueHere",
        "UpdateNegativeKeywordLists": "ValueHere",
        "UpdateNegativeSites": "ValueHere",
        "UpdatePageFeeds": "ValueHere",
        "UpdatePriceAdExtensions": "ValueHere",
        "UpdateProductFilters": "ValueHere",
        "UpdatePromotionAdExtensions": "ValueHere",
        "UpdateReviewAdExtensions": "ValueHere",
        "UpdateSitelinkAdExtensions": "ValueHere",
        "UpdateSitelinkUrls": "ValueHere",
        "UpdateStatusForAdGroups": "ValueHere",
        "UpdateStatusForAds": "ValueHere",
        "UpdateStatusForCampaigns": "ValueHere",
        "UpdateStatusForKeywords": "ValueHere",
        "UpdateStructuredSnippetAdExtensions": "ValueHere",
        "UpdateUrlOptions": "ValueHere"
      },
      "LastRunTimeInUTC": "ValueHere",
      "Name": "ValueHere",
      "NotificationEmail": "ValueHere",
      "NotificationType": "ValueHere",
      "Status": "ValueHere",
      "Type": "FileImportJob",
      "FileSource": "ValueHere",
      "FileUrl": "ValueHere"
    }
  ],
  "PartialErrors": [
    {
      "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
    }
  ]
}

程序代碼語法

若要透過 SDK 呼叫 REST API,您必須將 SDK 升級至特定版本並設定系統參數。範例語法可以與 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)