Edit

Share via


GetBulkDownloadStatus Service Operation - Bulk

Gets the status of a bulk download request.

Note

You must use the same user credentials for the download request operation (either DownloadCampaignsByAccountIds or DownloadCampaignsByCampaignIds) and the GetBulkDownloadStatus polling operation.

Request Elements

The GetBulkDownloadStatusRequest 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
RequestId The identifier of the download request.

The DownloadCampaignsByAccountIds and DownloadCampaignsByCampaignIds operations return this element as the DownloadRequestId.

The identifier is valid for a maximum of two days. If you have not successfully downloaded the file within this period, it is removed from the download site and you will need to get a new download request identifier.

The string has a length up to 40 and can contain any character.
string

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 GetBulkDownloadStatusResponse 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
Errors An array of OperationError objects corresponding to errors encountered during the system processing of the bulk file after your download request was submitted. OperationError array
ForwardCompatibilityMap The list of key and value strings for forward compatibility to avoid otherwise breaking changes when new elements are added in the current API version.

Forward compatibility changes will be noted here in future releases. There are currently no forward compatibility changes for this operation.
KeyValuePairOfstringstring array
PercentComplete The progress completion percentage for system processing of the bulk download file. int
RequestStatus The status of the download. The possible values are as follows.

Completed - The download completed successfully.

InProgress - The download is in progress.

Failed - The download failed. You may submit a new download with fewer entities, without quality score and bid suggestions data, or try again to submit the same download later.

FailedFullSyncRequired - The request's LastSyncTimeInUTC element must be set to null, for example if the specified account was included in a data migration. After requesting a full download, you may begin requesting delta downloads again.
string
ResultFileUrl The URL that contains the download data when the RequestStatus value is Completed.

You have five minutes from the time this URL is returned to download the file. If you do not start the download within this time period, you will need to call GetBulkDownloadStatus again to get a new URL. You should not take a dependency on the domain of the download URL, as it is subject to change.

The download file is compressed (in zip format), so you must unzip the file to access the data.

For information about the bulk file format, see Bulk File Schema.
string

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">GetBulkDownloadStatus</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>
    <GetBulkDownloadStatusRequest xmlns="https://bingads.microsoft.com/CampaignManagement/v13">
      <RequestId i:nil="false">ValueHere</RequestId>
    </GetBulkDownloadStatusRequest>
  </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>
    <GetBulkDownloadStatusResponse xmlns="https://bingads.microsoft.com/CampaignManagement/v13">
      <Errors d4p1:nil="false" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">
        <OperationError>
          <Code>ValueHere</Code>
          <Details d4p1:nil="false">ValueHere</Details>
          <ErrorCode d4p1:nil="false">ValueHere</ErrorCode>
          <Message d4p1:nil="false">ValueHere</Message>
        </OperationError>
      </Errors>
      <ForwardCompatibilityMap xmlns:e215="http://schemas.datacontract.org/2004/07/System.Collections.Generic" d4p1:nil="false" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">
        <e215:KeyValuePairOfstringstring>
          <e215:key d4p1:nil="false">ValueHere</e215:key>
          <e215:value d4p1:nil="false">ValueHere</e215:value>
        </e215:KeyValuePairOfstringstring>
      </ForwardCompatibilityMap>
      <PercentComplete>ValueHere</PercentComplete>
      <RequestStatus d4p1:nil="false" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">ValueHere</RequestStatus>
      <ResultFileUrl d4p1:nil="false" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">ValueHere</ResultFileUrl>
    </GetBulkDownloadStatusResponse>
  </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<GetBulkDownloadStatusResponse> GetBulkDownloadStatusAsync(
	string requestId)
{
	var request = new GetBulkDownloadStatusRequest
	{
		RequestId = requestId
	};

	return (await BulkService.CallAsync((s, r) => s.GetBulkDownloadStatusAsync(r), request));
}
static GetBulkDownloadStatusResponse getBulkDownloadStatus(
	java.lang.String requestId) throws RemoteException, Exception
{
	GetBulkDownloadStatusRequest request = new GetBulkDownloadStatusRequest();

	request.setRequestId(requestId);

	return BulkService.getService().getBulkDownloadStatus(request);
}
static function GetBulkDownloadStatus(
	$requestId)
{

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

	$request = new GetBulkDownloadStatusRequest();

	$request->RequestId = $requestId;

	return $GLOBALS['BulkProxy']->GetService()->GetBulkDownloadStatus($request);
}
response=bulk_service.GetBulkDownloadStatus(
	RequestId=RequestId)

Requirements

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