GetImportResults 服務作業 - 行銷活動管理
取得過去 90 天內完成的匯入作業結果。
您可以針對相同的匯入作業傳回多個結果,例如已執行多次之排程 GoogleImportJob 的結果。
提示
如需實作概觀,請參閱 Google Ads 匯入 技術指南。
要求專案
GetImportResultsRequest物件會定義服務作業要求的主體和標頭元素。 元素的順序必須與 要求 SOAP中所示的順序相同。
注意事項
除非下面另有說明,否則所有要求專案都是必要的。
要求本文專案
元素 | 說明 | 資料類型 |
---|---|---|
ImportJobIds | 要取得結果之匯入作業的識別碼。 您可以指定最多 100 個識別碼。 如果未指定此元素,作業會傳回過去 90 天內廣告帳戶中所有匯入作業的結果。 |
long 陣列 |
ImportType | 要取得結果的匯入作業類型。 若要取得 GoogleImportJob 結果,請將此元素設定為 「GoogleImportJob」。 |
string |
PageInfo | 決定每頁匯入結果的索引和大小。 此要求專案是選擇性的。 如果未指定此元素,則 Defaut 頁面 Index 為 0 ,預設的 Size 為 1,000。 |
分頁 |
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 元素
GetImportResultsResponse物件會定義服務作業回應的主體和標頭元素。 這些元素的傳回順序與 回應 SOAP中所示的順序相同。
回應本文專案
元素 | 說明 | 資料類型 |
---|---|---|
ImportResults | 包含已執行之每個匯入的狀態、執行時間和統計結果。 您可以針對相同的匯入作業傳回多個結果,例如已執行多次之排程 GoogleImportJob 的結果。 |
ImportResult 數 組 |
回應標頭元素
元素 | 說明 | 資料類型 |
---|---|---|
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">GetImportResults</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>
<GetImportResultsRequest xmlns="https://bingads.microsoft.com/CampaignManagement/v13">
<ImportType i:nil="false">ValueHere</ImportType>
<PageInfo i:nil="false">
<Index>ValueHere</Index>
<Size>ValueHere</Size>
</PageInfo>
<ImportJobIds i:nil="false" xmlns:a1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<a1:long>ValueHere</a1:long>
</ImportJobIds>
<ReturnAdditionalFields i:nil="false">ValueHere</ReturnAdditionalFields>
</GetImportResultsRequest>
</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>
<GetImportResultsResponse xmlns="https://bingads.microsoft.com/CampaignManagement/v13">
<ImportResults d4p1:nil="false" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">
<ImportResult>
<EntityStatistics d4p1:nil="false">
<ImportEntityStatistics>
<Additions d4p1:nil="false">ValueHere</Additions>
<Changes d4p1:nil="false">ValueHere</Changes>
<Deletions d4p1:nil="false">ValueHere</Deletions>
<EntityType d4p1:nil="false">ValueHere</EntityType>
<Errors d4p1:nil="false">ValueHere</Errors>
<Total d4p1:nil="false">ValueHere</Total>
</ImportEntityStatistics>
</EntityStatistics>
<ErrorLogUrl d4p1:nil="false">ValueHere</ErrorLogUrl>
<ForwardCompatibilityMap xmlns:e149="http://schemas.datacontract.org/2004/07/System.Collections.Generic" d4p1:nil="false">
<e149:KeyValuePairOfstringstring>
<e149:key d4p1:nil="false">ValueHere</e149:key>
<e149:value d4p1:nil="false">ValueHere</e149:value>
</e149:KeyValuePairOfstringstring>
</ForwardCompatibilityMap>
<Id d4p1:nil="false">ValueHere</Id>
<ImportJob d4p1:nil="false" 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:e150="http://schemas.datacontract.org/2004/07/System.Collections.Generic" d4p1:nil="false">
<e150:KeyValuePairOfstringstring>
<e150:key d4p1:nil="false">ValueHere</e150:key>
<e150:value d4p1:nil="false">ValueHere</e150:value>
</e150: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>
<StartTimeInUTC>ValueHere</StartTimeInUTC>
<Status d4p1:nil="false">ValueHere</Status>
</ImportResult>
</ImportResults>
</GetImportResultsResponse>
</s:Body>
</s:Envelope>
程式碼語法
範例語法可以與 Bing 廣告 SDK搭配使用。 如需更多範例,請參閱 Bing 廣告 API 程式碼范 例。
public async Task<GetImportResultsResponse> GetImportResultsAsync(
string importType,
Paging pageInfo,
IList<long> importJobIds,
ImportAdditionalField? returnAdditionalFields)
{
var request = new GetImportResultsRequest
{
ImportType = importType,
PageInfo = pageInfo,
ImportJobIds = importJobIds,
ReturnAdditionalFields = returnAdditionalFields
};
return (await CampaignManagementService.CallAsync((s, r) => s.GetImportResultsAsync(r), request));
}
static GetImportResultsResponse getImportResults(
java.lang.String importType,
Paging pageInfo,
ArrayOflong importJobIds,
ArrayList<ImportAdditionalField> returnAdditionalFields) throws RemoteException, Exception
{
GetImportResultsRequest request = new GetImportResultsRequest();
request.setImportType(importType);
request.setPageInfo(pageInfo);
request.setImportJobIds(importJobIds);
request.setReturnAdditionalFields(returnAdditionalFields);
return CampaignManagementService.getService().getImportResults(request);
}
static function GetImportResults(
$importType,
$pageInfo,
$importJobIds,
$returnAdditionalFields)
{
$GLOBALS['Proxy'] = $GLOBALS['CampaignManagementProxy'];
$request = new GetImportResultsRequest();
$request->ImportType = $importType;
$request->PageInfo = $pageInfo;
$request->ImportJobIds = $importJobIds;
$request->ReturnAdditionalFields = $returnAdditionalFields;
return $GLOBALS['CampaignManagementProxy']->GetService()->GetImportResults($request);
}
response=campaignmanagement_service.GetImportResults(
ImportType=ImportType,
PageInfo=PageInfo,
ImportJobIds=ImportJobIds,
ReturnAdditionalFields=ReturnAdditionalFields)
需求
服務: CampaignManagementService.svc v13
命名 空間: https://bingads.microsoft.com/CampaignManagement/v13