Yahoo! Search Marketing

BulkService

BulkService provides operations to upload/download accounts and campaigns.

Download:
The general download process consists of requesting an account or campaign download, polling on the status of the download job id and finally, downloading the file using the download URL. The download file contains the downloaded objects and their complete hierarchy. The download is in the form of a file based on the YSM bulk template.

BulkService also has an operation that downloads the template with only the header information.

Upload:
The general upload process consists of requesting a URL to upload, uploading the file based on the YSM bulk template to the URL and polling on the status of the job id.

A successful upload would show status as Successful. An in-progress upload would show status as InProgress. Any other value of BulkUploadStatus, would mean an unsuccessful upload.

The user also gets a feedback file URL after the job is completed. Depending on the feedbackFileType parameter, the feedback file would contain either all data that changed or only the errors (if any).

For security reasons, the URLs for download or upload are valid for 15 minutes.


Operations

downloadAccount

Downloads the account specified in the request header.

Capability required: BatchRead
License command group: Bulk
Supported accounts: Web

Parameters

Parameter Data Type Description
fileType BulkFileType The bulk download file format.

Response

long - The bulk download ID, which can be used to query the download status.

Sample Code

downloadBulkTemplate

Downloads an empty file of the requested type, with only headers.

Capability required: BatchRead
License command group: Bulk
Supported accounts: Web

Parameters

Parameter Data Type Description
fileType BulkFileType The bulk download file format.

Response

string - A URL that can be used to download the bulk template file.

Sample Code

downloadCampaigns

Downloads the specified campaigns. The campaign IDs should belong to the account specified in the request header.

Capability required: BatchRead
License command group: Bulk
Supported accounts: Web

Parameters

Parameter Data Type Description
campaignIDs long[] List of campaign IDs.
fileType BulkFileType The bulk download file format.

Response

long - The bulk download ID, which can be used to query the download status.

getBulkDownloadStatus

Returns the status of the bulk download request.

Capability required: BatchRead
License command group: Marketing
Supported accounts: Web

Parameters

Parameter Data Type Description
bulkDownloadID long The bulk download ID.

Response

BulkDownloadStatusResponse - The status of the bulk download request.

getBulkDownloadStatusInfo

Returns the status of the bulk download request. This is similar to getBulkDownloadStatus except when applicable, any time remaining to process the download request is also reported.

Capability required: BatchRead
License command group: Marketing
Supported accounts: Web

Parameters

Parameter Data Type Description
bulkDownloadID long The bulk download ID.

Response

BulkDownloadStatusInfo - The status of the bulk download request with time remaining, if applicable.

getBulkUploadStatus

Allows the user to query for the status of a previously submitted bulk upload task .

Capability required: BatchRead
License command group: Marketing
Supported accounts: Web

Parameters

Parameter Data Type Description
bulkUploadID long The bulk upload ID.

Response

BulkUploadStatusResponse - The status of the bulk upload.

getBulkUploadTokenUrl

Allows the user to request an upload URL for a specific filetype.

Capability required: CampaignWrite
License command group: Bulk
Supported accounts: Web

Parameters

Parameter Data Type Description
fileType BulkFileType The type of bulk file the user wants to upload.
feedbackFileType BulkFeedbackFileType The format of feedback file.
enableFeedbackFileCompression boolean True if the user wants feedback file in compressed format.

Response

BulkUploadTokenUrlResponse - url and jobId

Sample Code