AddImportJobs Service Operation - Campaign Management

Creates a new import job.

A GoogleImportJob can be run once or scheduled on a recurring basis.

Tip

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

Request Elements

The AddImportJobsRequest 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
ImportJobs The import jobs to create.

Although this element is an array, you can include a maximum of one GoogleImportJob object per call.

You can set the Google account that you want to import from via the GoogleAccountId element in the GoogleImportJob object. The Microsoft Advertising ad account that you want to import to is determined by the required CustomerAccountId header element of this AddImportJobs service operation.
ImportJob array

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 AddImportJobsResponse 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
ImportJobIds A list of unique system identifiers corresponding to the import jobs that were added.

The list of identifiers corresponds directly to the list of import jobs in the request. Items of the list may be returned as null. For each list index where an import job was not added, the corresponding element will be null.
long array
PartialErrors A list of BatchError objects that contain details for any list item requests that were not successful.

The list of errors do not correspond directly to the list of items in the request. The list will be empty if there were no errors.
BatchError 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">AddImportJobs</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>
    <AddImportJobsRequest xmlns="https://bingads.microsoft.com/CampaignManagement/v13">
      <ImportJobs i:nil="false">
        <ImportJob i:type="-- derived type specified here with the appropriate prefix --">
          <CreatedByUserId i:nil="false">ValueHere</CreatedByUserId>
          <CreatedByUserName i:nil="false">ValueHere</CreatedByUserName>
          <CreatedDateTimeInUTC i:nil="false">ValueHere</CreatedDateTimeInUTC>
          <Frequency i:nil="false">
            <Cron i:nil="false">ValueHere</Cron>
            <TimeZone i:nil="false">ValueHere</TimeZone>
            <Type i:nil="false">ValueHere</Type>
          </Frequency>
          <Id i:nil="false">ValueHere</Id>
          <ImportOption i:nil="false" i:type="-- derived type specified here with the appropriate prefix --">
            <ForwardCompatibilityMap xmlns:e47="http://schemas.datacontract.org/2004/07/System.Collections.Generic" i:nil="false">
              <e47:KeyValuePairOfstringstring>
                <e47:key i:nil="false">ValueHere</e47:key>
                <e47:value i:nil="false">ValueHere</e47:value>
              </e47:KeyValuePairOfstringstring>
            </ForwardCompatibilityMap>
            <Type i:nil="false">ValueHere</Type>
            <!--These fields are applicable if the derived type attribute is set to GoogleImportOption-->
            <AccountUrlOptions i:nil="false">ValueHere</AccountUrlOptions>
            <AdScheduleUseSearcherTimezone i:nil="false">ValueHere</AdScheduleUseSearcherTimezone>
            <AdjustmentForBids i:nil="false">ValueHere</AdjustmentForBids>
            <AdjustmentForCampaignBudgets i:nil="false">ValueHere</AdjustmentForCampaignBudgets>
            <AssociatedStoreId i:nil="false">ValueHere</AssociatedStoreId>
            <AssociatedUetTagId i:nil="false">ValueHere</AssociatedUetTagId>
            <AutoDeviceBidOptimization i:nil="false">ValueHere</AutoDeviceBidOptimization>
            <DeleteRemovedEntities i:nil="false">ValueHere</DeleteRemovedEntities>
            <EnableAutoCurrencyConversion i:nil="false">ValueHere</EnableAutoCurrencyConversion>
            <EnableParentLocationMapping i:nil="false">ValueHere</EnableParentLocationMapping>
            <NewAccountNegativeKeywords i:nil="false">ValueHere</NewAccountNegativeKeywords>
            <NewActiveAdsForExistingAdGroups i:nil="false">ValueHere</NewActiveAdsForExistingAdGroups>
            <NewActiveCampaignsAndChildEntities i:nil="false">ValueHere</NewActiveCampaignsAndChildEntities>
            <NewAdCustomizerFeeds i:nil="false">ValueHere</NewAdCustomizerFeeds>
            <NewAdGroupsAndChildEntitiesForExistingCampaigns i:nil="false">ValueHere</NewAdGroupsAndChildEntitiesForExistingCampaigns>
            <NewAdSchedules i:nil="false">ValueHere</NewAdSchedules>
            <NewAppAdExtensions i:nil="false">ValueHere</NewAppAdExtensions>
            <NewAudienceTargets i:nil="false">ValueHere</NewAudienceTargets>
            <NewCallAdExtensions i:nil="false">ValueHere</NewCallAdExtensions>
            <NewCalloutAdExtensions i:nil="false">ValueHere</NewCalloutAdExtensions>
            <NewDemographicTargets i:nil="false">ValueHere</NewDemographicTargets>
            <NewDeviceTargets i:nil="false">ValueHere</NewDeviceTargets>
            <NewEntities i:nil="false">ValueHere</NewEntities>
            <NewImageAdExtensions i:nil="false">ValueHere</NewImageAdExtensions>
            <NewKeywordUrls i:nil="false">ValueHere</NewKeywordUrls>
            <NewKeywordsForExistingAdGroups i:nil="false">ValueHere</NewKeywordsForExistingAdGroups>
            <NewLabels i:nil="false">ValueHere</NewLabels>
            <NewLeadFormAdExtensions i:nil="false">ValueHere</NewLeadFormAdExtensions>
            <NewLocationAdExtensions i:nil="false">ValueHere</NewLocationAdExtensions>
            <NewLocationTargets i:nil="false">ValueHere</NewLocationTargets>
            <NewLogoAdExtensions i:nil="false">ValueHere</NewLogoAdExtensions>
            <NewNegativeKeywordLists i:nil="false">ValueHere</NewNegativeKeywordLists>
            <NewNegativeKeywordsForExistingParents i:nil="false">ValueHere</NewNegativeKeywordsForExistingParents>
            <NewNegativeSites i:nil="false">ValueHere</NewNegativeSites>
            <NewPageFeeds i:nil="false">ValueHere</NewPageFeeds>
            <NewPausedAdsForExistingAdGroups i:nil="false">ValueHere</NewPausedAdsForExistingAdGroups>
            <NewPausedCampaignsAndChildEntities i:nil="false">ValueHere</NewPausedCampaignsAndChildEntities>
            <NewPriceAdExtensions i:nil="false">ValueHere</NewPriceAdExtensions>
            <NewProductFilters i:nil="false">ValueHere</NewProductFilters>
            <NewPromotionAdExtensions i:nil="false">ValueHere</NewPromotionAdExtensions>
            <NewReviewAdExtensions i:nil="false">ValueHere</NewReviewAdExtensions>
            <NewSitelinkAdExtensions i:nil="false">ValueHere</NewSitelinkAdExtensions>
            <NewStructuredSnippetAdExtensions i:nil="false">ValueHere</NewStructuredSnippetAdExtensions>
            <NewUrlOptions i:nil="false">ValueHere</NewUrlOptions>
            <PauseAIMAdGroupIfAllAudienceCriterionNotImported i:nil="false">ValueHere</PauseAIMAdGroupIfAllAudienceCriterionNotImported>
            <PauseCampaignsWithoutSupportedLocations i:nil="false">ValueHere</PauseCampaignsWithoutSupportedLocations>
            <PauseNewCampaigns i:nil="false">ValueHere</PauseNewCampaigns>
            <RaiseBidsToMinimum i:nil="false">ValueHere</RaiseBidsToMinimum>
            <RaiseCampaignBudgetsToMinimum i:nil="false">ValueHere</RaiseCampaignBudgetsToMinimum>
            <RaiseProductGroupBidsToMinimum i:nil="false">ValueHere</RaiseProductGroupBidsToMinimum>
            <RenameCampaignNameWithSuffix i:nil="false">ValueHere</RenameCampaignNameWithSuffix>
            <SearchAndDsaMixedCampaignAsSearchCampaign i:nil="false">ValueHere</SearchAndDsaMixedCampaignAsSearchCampaign>
            <SearchAndReplaceForCampaignNames i:nil="false">
              <ReplaceString i:nil="false">ValueHere</ReplaceString>
              <SearchString i:nil="false">ValueHere</SearchString>
            </SearchAndReplaceForCampaignNames>
            <SearchAndReplaceForCustomParameters i:nil="false">
              <ReplaceString i:nil="false">ValueHere</ReplaceString>
              <SearchString i:nil="false">ValueHere</SearchString>
            </SearchAndReplaceForCustomParameters>
            <SearchAndReplaceForFinalURLSuffix i:nil="false">
              <ReplaceString i:nil="false">ValueHere</ReplaceString>
              <SearchString i:nil="false">ValueHere</SearchString>
            </SearchAndReplaceForFinalURLSuffix>
            <SearchAndReplaceForTrackingTemplates i:nil="false">
              <ReplaceString i:nil="false">ValueHere</ReplaceString>
              <SearchString i:nil="false">ValueHere</SearchString>
            </SearchAndReplaceForTrackingTemplates>
            <SearchAndReplaceForUrls i:nil="false">
              <ReplaceString i:nil="false">ValueHere</ReplaceString>
              <SearchString i:nil="false">ValueHere</SearchString>
            </SearchAndReplaceForUrls>
            <SuffixForCampaignNames i:nil="false">ValueHere</SuffixForCampaignNames>
            <SuffixForTrackingTemplates i:nil="false">ValueHere</SuffixForTrackingTemplates>
            <SuffixForUrls i:nil="false">ValueHere</SuffixForUrls>
            <UpdateAccountNegativeKeywords i:nil="false">ValueHere</UpdateAccountNegativeKeywords>
            <UpdateAdCustomizerAttributes i:nil="false">ValueHere</UpdateAdCustomizerAttributes>
            <UpdateAdCustomizerFeeds i:nil="false">ValueHere</UpdateAdCustomizerFeeds>
            <UpdateAdGroupNetwork i:nil="false">ValueHere</UpdateAdGroupNetwork>
            <UpdateAdSchedules i:nil="false">ValueHere</UpdateAdSchedules>
            <UpdateAdUrls i:nil="false">ValueHere</UpdateAdUrls>
            <UpdateAppAdExtensions i:nil="false">ValueHere</UpdateAppAdExtensions>
            <UpdateAudienceTargets i:nil="false">ValueHere</UpdateAudienceTargets>
            <UpdateBiddingStrategies i:nil="false">ValueHere</UpdateBiddingStrategies>
            <UpdateBids i:nil="false">ValueHere</UpdateBids>
            <UpdateCallAdExtensions i:nil="false">ValueHere</UpdateCallAdExtensions>
            <UpdateCalloutAdExtensions i:nil="false">ValueHere</UpdateCalloutAdExtensions>
            <UpdateCampaignAdGroupLanguages i:nil="false">ValueHere</UpdateCampaignAdGroupLanguages>
            <UpdateCampaignBudgets i:nil="false">ValueHere</UpdateCampaignBudgets>
            <UpdateCampaignNames i:nil="false">ValueHere</UpdateCampaignNames>
            <UpdateDemographicTargets i:nil="false">ValueHere</UpdateDemographicTargets>
            <UpdateDeviceTargets i:nil="false">ValueHere</UpdateDeviceTargets>
            <UpdateEntities i:nil="false">ValueHere</UpdateEntities>
            <UpdateImageAdExtensions i:nil="false">ValueHere</UpdateImageAdExtensions>
            <UpdateKeywordUrls i:nil="false">ValueHere</UpdateKeywordUrls>
            <UpdateLabels i:nil="false">ValueHere</UpdateLabels>
            <UpdateLeadFormAdExtensions i:nil="false">ValueHere</UpdateLeadFormAdExtensions>
            <UpdateLocationAdExtensions i:nil="false">ValueHere</UpdateLocationAdExtensions>
            <UpdateLocationTargets i:nil="false">ValueHere</UpdateLocationTargets>
            <UpdateLogoAdExtensions i:nil="false">ValueHere</UpdateLogoAdExtensions>
            <UpdateNegativeKeywordLists i:nil="false">ValueHere</UpdateNegativeKeywordLists>
            <UpdateNegativeSites i:nil="false">ValueHere</UpdateNegativeSites>
            <UpdatePageFeeds i:nil="false">ValueHere</UpdatePageFeeds>
            <UpdatePriceAdExtensions i:nil="false">ValueHere</UpdatePriceAdExtensions>
            <UpdateProductFilters i:nil="false">ValueHere</UpdateProductFilters>
            <UpdatePromotionAdExtensions i:nil="false">ValueHere</UpdatePromotionAdExtensions>
            <UpdateReviewAdExtensions i:nil="false">ValueHere</UpdateReviewAdExtensions>
            <UpdateSitelinkAdExtensions i:nil="false">ValueHere</UpdateSitelinkAdExtensions>
            <UpdateSitelinkUrls i:nil="false">ValueHere</UpdateSitelinkUrls>
            <UpdateStatusForAdGroups i:nil="false">ValueHere</UpdateStatusForAdGroups>
            <UpdateStatusForAds i:nil="false">ValueHere</UpdateStatusForAds>
            <UpdateStatusForCampaigns i:nil="false">ValueHere</UpdateStatusForCampaigns>
            <UpdateStatusForKeywords i:nil="false">ValueHere</UpdateStatusForKeywords>
            <UpdateStructuredSnippetAdExtensions i:nil="false">ValueHere</UpdateStructuredSnippetAdExtensions>
            <UpdateUrlOptions i:nil="false">ValueHere</UpdateUrlOptions>
            <!--No additional fields are applicable if the derived type attribute is set to FileImportOption-->
          </ImportOption>
          <LastRunTimeInUTC i:nil="false">ValueHere</LastRunTimeInUTC>
          <Name i:nil="false">ValueHere</Name>
          <NotificationEmail i:nil="false">ValueHere</NotificationEmail>
          <NotificationType i:nil="false">ValueHere</NotificationType>
          <Status i:nil="false">ValueHere</Status>
          <Type i:nil="false">ValueHere</Type>
          <!--These fields are applicable if the derived type attribute is set to GoogleImportJob-->
          <CampaignAdGroupIds i:nil="false">
            <CampaignAdGroupIds>
              <ActiveAdGroupsOnly i:nil="false">ValueHere</ActiveAdGroupsOnly>
              <AdGroupIds i:nil="false" xmlns:a1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
                <a1:long>ValueHere</a1:long>
              </AdGroupIds>
              <CampaignId>ValueHere</CampaignId>
            </CampaignAdGroupIds>
          </CampaignAdGroupIds>
          <CredentialId i:nil="false">ValueHere</CredentialId>
          <GoogleAccountId i:nil="false">ValueHere</GoogleAccountId>
          <GoogleUserName i:nil="false">ValueHere</GoogleUserName>
          <!--These fields are applicable if the derived type attribute is set to FileImportJob-->
          <FileSource i:nil="false">ValueHere</FileSource>
          <FileUrl i:nil="false">ValueHere</FileUrl>
        </ImportJob>
      </ImportJobs>
    </AddImportJobsRequest>
  </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>
    <AddImportJobsResponse xmlns="https://bingads.microsoft.com/CampaignManagement/v13">
      <ImportJobIds d4p1:nil="false" xmlns:a1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">
        <a1:long>ValueHere</a1:long>
      </ImportJobIds>
      <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:e48="http://schemas.datacontract.org/2004/07/System.Collections.Generic" d4p1:nil="false">
            <e48:KeyValuePairOfstringstring>
              <e48:key d4p1:nil="false">ValueHere</e48:key>
              <e48:value d4p1:nil="false">ValueHere</e48:value>
            </e48: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>
    </AddImportJobsResponse>
  </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<AddImportJobsResponse> AddImportJobsAsync(
	IList<ImportJob> importJobs)
{
	var request = new AddImportJobsRequest
	{
		ImportJobs = importJobs
	};

	return (await CampaignManagementService.CallAsync((s, r) => s.AddImportJobsAsync(r), request));
}
static AddImportJobsResponse addImportJobs(
	ArrayOfImportJob importJobs) throws RemoteException, Exception
{
	AddImportJobsRequest request = new AddImportJobsRequest();

	request.setImportJobs(importJobs);

	return CampaignManagementService.getService().addImportJobs(request);
}
static function AddImportJobs(
	$importJobs)
{

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

	$request = new AddImportJobsRequest();

	$request->ImportJobs = $importJobs;

	return $GLOBALS['CampaignManagementProxy']->GetService()->AddImportJobs($request);
}
response=campaignmanagement_service.AddImportJobs(
	ImportJobs=ImportJobs)

Requirements

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