GetImportResults Service Operation - Campaign Management

Gets results for import jobs completed within the last 90 days.

Multiple results can be returned for the same import job e.g., results for a scheduled GoogleImportJob that has run more than once.

Tip

For an implementation overview, see the Google Ads Import technical guide.

Request Elements

The GetImportResultsRequest object defines the body and header elements of the service operation request. The elements must be in the same order as shown in the Request SOAP.

Note

Unless otherwise noted below, all request elements are required.

Request Body Elements

Element Description Data Type
ImportJobIds The identifiers of the import jobs to get results.

You can specify a maximum of 100 identifiers. If this element is not specified, the operation will return results for all import jobs in the ad account within the last 90 days.
long array
ImportType The type of import job to get results.

To get GoogleImportJob results, set this element to "GoogleImportJob".
string
PageInfo Determines the index and size of import results per page.

This request element is optional. If this element is not specified, the defaut page Index is 0 and the default Size is 1,000.
Paging
ReturnAdditionalFields The additional field values enable you to get the latest features using the current version of Campaign Management API, and in the next version the corresponding elements will be included by default.

This request element is optional.
ImportAdditionalField

Request Header Elements

Element Description Data Type
AuthenticationToken The OAuth access token that represents the credentials of a user who has permissions to Microsoft Advertising accounts.

For more information see Authentication with OAuth.
string
CustomerAccountId The identifier of the ad account that owns or is associated with the entities in the request. This header element must have the same value as the AccountId body element when both are required. This element is required for most service operations, and as a best practice you should always set it.

For more information see Get Your Account and Customer IDs.
string
CustomerId The identifier of the manager account (customer) the user is accessing or operating from. A user can have access to multiple manager accounts. This element is required for most service operations, and as a best practice you should always set it.

For more information see Get Your Account and Customer IDs.
string
DeveloperToken The developer token used to access the Bing Ads API.

For more information see Get a Developer Token.
string
Password This element is reserved for internal use and will be removed from a future version of the API. You must use the AuthenticationToken element to set user credentials. string
UserName This element is reserved for internal use and will be removed from a future version of the API. You must use the AuthenticationToken element to set user credentials. string

Response Elements

The GetImportResultsResponse object defines the body and header elements of the service operation response. The elements are returned in the same order as shown in the Response SOAP.

Response Body Elements

Element Description Data Type
ImportResults Contains the status, run time, and statistical results for each import that has run.

Multiple results can be returned for the same import job e.g., results for a scheduled GoogleImportJob that has run more than once.
ImportResult array

Response Header Elements

Element Description Data Type
TrackingId The identifier of the log entry that contains the details of the API call. string

Request SOAP

This template was generated by a tool to show the order of the body and header elements for the SOAP request. For supported types that you can use with this service operation, see the Request Body Elements reference above.

<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>

Response SOAP

This template was generated by a tool to show the order of the body and header elements for the SOAP response.

<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>
              <NewCallAdExtensions d4p1:nil="false">ValueHere</NewCallAdExtensions>
              <NewCalloutAdExtensions d4p1:nil="false">ValueHere</NewCalloutAdExtensions>
              <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>
              <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>
              <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>

Code Syntax

The example syntax can be used with Bing Ads SDKs. See Bing Ads API Code Examples for more examples.

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)

Requirements

Service: CampaignManagementService.svc v13
Namespace: https://bingads.microsoft.com/CampaignManagement/v13