Yahoo! Search Marketing

CampaignService

CampaignService provides operations for creating and managing campaigns. A campaign is a collection of one or more ad groups and is associated with an account.

Operations

addCampaign

Create a campaign.

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

Parameters

Parameter Data Type Description
campaign Campaign The new campaign.

Response

CampaignResponse - The response, which indicates if the operation succeeded or failed.

Sample Code

addCampaigns

Create one or more campaigns.

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

Parameters

Parameter Data Type Description
campaigns Campaign[] A list of campaigns.

Response

CampaignResponse[] - A list of responses, which indicate if the operations succeeded or failed.

deleteCampaign

Delete the campaign (specified by campaignID).

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

Parameters

Parameter Data Type Description
campaignID long The campaign ID.

Response

BasicResponse - The response, which indicates if the operation succeeded or failed.

deleteCampaigns

Delete one or more campaigns (specified by the list of campaignIDs).

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

Parameters

Parameter Data Type Description
campaignIDs long[] A list of campaign IDs.

Response

BasicResponse[] - A list of responses, which indicate if the operations succeeded or failed.

getCampaign

Return the campaign (specified by campaignID).

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

Parameters

Parameter Data Type Description
campaignID long The campaign ID.

Response

Campaign - The campaign.

getCampaignAdGroupCount

Return the number of ad groups for the campaign (specified by campaignID).

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

Parameters

Parameter Data Type Description
campaignID long The campaign ID.
includeDeleted boolean If true, include deleted ad groups in the count.

Response

long - The number of ad groups for the campaign.

getCampaignKeywordCount

Return the number of keywords for the campaign (specified by campaignID).

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

Parameters

Parameter Data Type Description
campaignID long The campaign ID.
includeDeleted boolean If true, include deleted keywords in the count.

Response

long - The number of keywords for the campaign.

getCampaigns

Return one or more campaigns (specified by a list of campaignIDs).

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

Parameters

Parameter Data Type Description
campaignIDs long[] A list of campaign IDs.

Response

Campaign[] - A list of campaigns.

getCampaignsByAccountID

Return the campaigns for the account (specified by accountID).

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

Parameters

Parameter Data Type Description
accountID string The account ID.
includeDeleted boolean If true, include deleted campaigns.

Response

Campaign[] - A list of all campaigns for the account.

getCampaignsByAccountIDByCampaignStatus

Return the campaigns with the indicated status for the account (specified by accountID).

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

Parameters

Parameter Data Type Description
accountID string The account ID.
status CampaignStatus The campaign status.

Response

Campaign[] - A list of campaigns with the indicated status for the specified account.

getMinBidForCampaignOptimizationGuidelines

Return the minimum bid for the optimization guidelines and the campaign (specified by campaignID).

Capability required: CampaignRead
License command group: CampaignOptimization
Supported accounts: Web

Parameters

Parameter Data Type Description
campaignID long The campaign ID.

Response

double - The minimum bid.

getOptimizationGuidelinesForCampaign

Return the optimization guidelines for the campaign (specified by campaignID).

Capability required: CampaignRead
License command group: CampaignOptimization
Supported accounts: Web

Parameters

Parameter Data Type Description
campaignID long The campaign ID.

Response

CampaignOptimizationGuidelines - The optimization guidelines for the campaign.

getStatusForCampaign

Return the status of the campaign (specified by campaignID).

Capability required: CampaignRead
License command group: AdvancedTools
Supported accounts: Web

Parameters

Parameter Data Type Description
campaignID long The campaign ID.

Response

CampaignStatus - The status of the campaign.

setCampaignOptimizationON

Enable or disable optimization for the campaign (specified by campaignID).

Before you can enable campaign optimization, you must create a campaign and set up the campaign optimization guidelines. Optionally, you may also set up the ad group and keyword optimization guidelines (see Campaign Optimization).

To set up the optimization guidelines, use setOptimizationGuidelinesForCampaign, setOptimizationGuidelinesForAdGroup, and setOptimizationGuidelinesForKeyword.

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

Parameters

Parameter Data Type Description
campaignID long The campaign ID.
campaignOptimizationON boolean If true, campaign optimization is enabled.

Response

BasicResponse - The response, which indicates if the operation succeeded or failed.

setOptimizationGuidelinesForCampaign

Set the optimization guidelines for the campaign.

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

Parameters

Parameter Data Type Description
optimizationGuidelines CampaignOptimizationGuidelines The optimization guidelines for the campaign.

Response

CampaignOptimizationGuidelinesResponse - The response, which indicates if the operation succeeded or failed.

updateCampaign

Update a campaign.

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

Parameters

Parameter Data Type Description
campaign Campaign A campaign.
updateAll boolean If true, the system performs a full update. All elements are updated. If you pass in the null value or omit an element, the current value is cleared.
If false, the system performs a partial update. Only those elements you specify are updated. If you pass in the null value or omit an element, the current value is not changed.

Response

CampaignResponse - The response, which indicates if the operation succeeded or failed.

updateCampaigns

Update one or more campaigns.

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

Parameters

Parameter Data Type Description
campaigns Campaign[] A list of campaigns.
updateAll boolean If true, the system performs a full update. All elements are updated. If you pass in the null value or omit an element, the current value is cleared.
If false, the system performs a partial update. Only those elements you specify are updated. If you pass in the null value or omit an element, the current value is not changed.

Response

CampaignResponse[] - A list of responses, which indicate if the operations succeeded or failed.

updateStatusForCampaign

Update the status of the campaign (specified by campaignID).

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

Parameters

Parameter Data Type Description
campaignID long The campaign ID.
status CampaignStatus The new campaign status. You can set the status to On or Off, but not Deleted. (To delete a campaign, use the deleteCampaign operation.)

Response

CampaignResponse - The response, which indicates if the operation succeeded or failed.

updateStatusForCampaigns

Update the status of one or more campaigns (specified by a list of campaignIDs).

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

Parameters

Parameter Data Type Description
campaignIDs long[] A list of campaign IDs.
status CampaignStatus The new campaign status. You can set the status to On or Off, but not Deleted. (To delete a campaign, use the deleteCampaigns operation.)

Response

CampaignResponse[] - A list of responses, which indicate if the operations succeeded or failed.

Related Data Objects

Related Links

Sample Code for APIs

YSM Yahoo! Group Discussions

Re: Reports Stuck in Pending
Mon, 08 Feb 2010 18:53:43 GMT

Reports Stuck in Pending
Mon, 08 Feb 2010 16:34:31 GMT

Re: SANDBOX LICENSE
Mon, 07 Dec 2009 20:45:00 GMT

SANDBOX LICENSE
Tue, 01 Dec 2009 18:09:58 GMT

Systems Maintenance on 10/14
Wed, 14 Oct 2009 22:41:52 GMT

View All

YSM Blog Posts

Yahoo! Network Distribution and Import Campaigns Webinar
Wed, 03 Feb 2010 21:22:26 +0000

Ad News and Views from Around the Web
Wed, 03 Feb 2010 20:49:00 +0000

Don’t Set it and Forget it
Mon, 01 Feb 2010 22:04:51 +0000

Ad News and Views from Around the Web
Sat, 30 Jan 2010 01:38:53 +0000

You’re in Control
Wed, 20 Jan 2010 00:05:37 +0000

View All