Yahoo! Search Marketing

AdService

AdService provides operations for creating and managing ads. An ad is a message about your products or services and is associated with an ad group.

Operations

addAd

Create an ad.

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

Parameters

Parameter Data Type Description
ad Ad The new ad.

Response

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

addAds

Create one or more ads.

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

Parameters

Parameter Data Type Description
ads Ad[] A list of new ads to create.

Response

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

Sample Code

deleteAd

Delete an ad (specified by adID).

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

Parameters

Parameter Data Type Description
adID long The ad ID.

Response

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

deleteAds

Delete one or more ads (specified by the list of adIDs).

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

Parameters

Parameter Data Type Description
adIDs long[] A list of ads.

Response

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

getAd

Return an ad (specified by adID).

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

Parameters

Parameter Data Type Description
adID long The ad ID.

Response

Ad - The ad.

getAds

Return one or more ads (specified by the list of adIDs).

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

Parameters

Parameter Data Type Description
adIDs long[] A list of ad IDs.

Response

Ad[] - A list of ads.

getAdsByAdGroupByParticipatesInMarketplace

Return the ads for the ad group (specified by adGroupID) that are or are not participating in the marketplace.

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

Parameters

Parameter Data Type Description
adGroupID long The ad group ID.
participatesInMarketplace boolean If true, return the ads that are participating in the marketplace.
If false, return the ads that are not participating in the marketplace.

Response

Ad[] - A list of ads for the specified ad group.

getAdsByAdGroupID

Return the ads for the ad group (specified by adGroupID).

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

Parameters

Parameter Data Type Description
adGroupID long The ad group ID.
includeDeleted boolean If true, include deleted ads.

Response

Ad[] - A list of ads for the specified ad group.

getAdsByAdGroupIDByEditorialStatus

Return the ads with the indicated editorial status for the ad group (specified by adGroupID). Possible settings for "update" are:

update status Return
true Pending Return all updated ads that are waiting for editorial review.
true Rejected Return all updated ads that were rejected by editorial review.
false Pending Return all ads that are waiting for editorial review.
false Approved Return all ads that are approved.
false Rejected Return all ads that are rejected.
false Suspended Return all ads that are suspended.

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

Parameters

Parameter Data Type Description
adGroupID long The ad group ID.
update boolean True or false (see the table above).
status EditorialStatus The editorial status.
includeDeleted boolean If true, include deleted ads (see AdStatus).

Response

Ad[] - The list of ads with the indicated editorial status for the specified ad group.

getAdsByAdGroupIDByStatus

Return the ads with the indicated status for the ad group (specified by adGroupID).

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

Parameters

Parameter Data Type Description
adGroupID long The ad group ID.
status AdStatus The status of the ad.

Response

Ad[] - The list of ads with the indicated status for the specified ad group.

getEditorialReasonsForAd

Return the editorial reason code for the ad or updated ad (specified by adID). Once you have the code, use the getEditorialReasonText operation to return the corresponding text.

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

Parameters

Parameter Data Type Description
adID long The ad ID.

Response

AdEditorialReasons - The editorial reason codes.

getEditorialReasonText

Return the editorial reason text for the editorial reason code (specified by editorialReasonCode) in a given language (specified by locale). The editorial reason text provides reasons why an ad was rejected or suspended, and may also provide feedback to improve the quality of the ad.

See also: Editorial Reason Text and Editorial Suggestion Text

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

Parameters

Parameter Data Type Description
editorialReasonCode int The editorial reason code.
locale string The locale is the language code plus the country code, separated by an underscore. The default locale is en_US for US English (see Market-Specific Values). Note that translations for some locales may not be available.

Response

string - The editorial reason text.

getReasonsForAdNotParticipatingInMarketplace

Return the reasons why the ad (specified by adID) is not participating in the marketplace.

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

Parameters

Parameter Data Type Description
adID long The ad ID.

Response

NotParticipatingInMarketplaceReason[] - A list of one or more reasons.

getStatusForAd

Return the status of the ad (specified by adID).

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

Parameters

Parameter Data Type Description
adID long The ad ID.

Response

AdStatus - The status of the ad.

getUpdateForAd

Return the update for the ad (specified by adID).

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

Parameters

Parameter Data Type Description
adID long The ad ID.

Response

UpdateForAd - The update for the ad.

setAdUrl

Set the URL for the ad (specified by adID).

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

Parameters

Parameter Data Type Description
adID long The ad ID.
url string The ad URL.

Response

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

updateAd

Update an ad.

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

Parameters

Parameter Data Type Description
ad Ad The ad.
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

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

updateAds

Update one or more ads.

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

Parameters

Parameter Data Type Description
ads Ad[] A list of ads.
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

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

updateStatusForAd

Update the status of an ad (specified by adID).

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

Parameters

Parameter Data Type Description
adID long The ad ID.
status AdStatus The new ad status. You can set the status to On or Off, but not Deleted. (To delete an ad, use the deleteAd operation.)

Response

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

updateStatusForAds

Update the status of one or more ads (specified by the list of adIDs).

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

Parameters

Parameter Data Type Description
adIDs long[] A list of ad IDs.
status AdStatus The new ad status. You can set the status to On or Off, but not Deleted. (To delete one or more ads, use the deleteAds operation.)

Response

AdResponse[] - 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