Skip to main content

GET/ad_campaign/{campaign_id}

This method retrieves the details of a single campaign, as specified with the campaign_id query parameter.

This method returns all the details of a campaign (including the campaign's the selection rules), except the for the listing IDs or inventory reference IDs included in the campaign. These IDs are returned by getAds.

Call getCampaigns to retrieve a list of the seller's campaign IDs.

Input

Resource URI (production)

GET https://api.ebay.com/sell/marketing/v1/ad_campaign/{campaign_id}

URI parameters

ParameterTypeDescription
campaign_idstringA unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get a seller's campaign IDs by calling getCampaigns.

Occurrence: Required

HTTP request headers

All requests made to eBay REST operations require you to provide the Authorization HTTP header for authentication authorization.

This method has no additional required headers. See HTTP request headers- opens rest request components page for details.

OAuth scope

This request requires an access token created with the authorization code grant flow, using one or more scopes from the following list (please check your Application Keys page for a list of OAuth scopes available to your application):

https://api.ebay.com/oauth/api_scope/sell.marketing.readonly

https://api.ebay.com/oauth/api_scope/sell.marketing

See OAuth access tokens for more information.

Request payload

This call has no payload.

Request fields

This call has no field definitions.

Output

HTTP response headers

This call has no response headers.

Response payload

Response fields

Output container/fieldTypeDescription
campaignCriterionCampaignCriterion

The selection rules (criterion) used to select the listings for a campaign.

Occurrence: Conditional

campaignCriterion.autoSelectFutureInventoryboolean

A field used to indicate whether listings shall be automatically added to, or removed from, a Promoted Listings campaign based on the rules that have been configured for the campaign.

If set to true, eBay adds all listings matching the campaign criterion to the campaign, including any new listings created from the items in a seller's inventory.

Default: false

Occurrence: Conditional

campaignCriterion.criterionTypeCriterionTypeEnum

An enumerated value that defines the criterion (selection rule) types. Currently, the only criterion type supported is INVENTORY_PARTITION, and you must specify this value if you manage your items with the Inventory API and you want to include items based on their inventory reference IDs.

Leave this field blank if you want to create campaign ads based on listing IDs.

Occurrence: Conditional

campaignCriterion.selectionRulesarray of SelectionRule

A set of rules that selects the listings to include in the campaign.

The following rules apply to the selection rules:

  • Each set of selection rules are ORed with each other.
  • Individual rules within a selection rule set are ANDed with each other. If a rule has a list of values (such a list of category IDs), the item need match only one of the values of the rule in order to be included in the campaign.
  • Note: If an item matches multiple sets of rules or multiple rules within a selection rule set, the item is considered only once.

Maximum number of rules: 10

Occurrence: Conditional

campaignCriterion.selectionRules.brandsarray of string

A list of the brands of the items to be included in the campaign.

Occurrence: Conditional

campaignCriterion.selectionRules.categoryIdsarray of string

A list of category IDs associated with the listings to be included in the campaign. Ads are created for all the seller's items listed in the specified categories, up to a maximum of 50,000 items. The IDs can be either a list of eBay category IDs (from the site where the item is hosted), or a list of category IDs defined and used by the seller's store.

eBay Marketplace category IDs
To get a list of marketplace category IDs, do one of the following:

  • Get a list of category IDs for a marketplace by adding /sch/allcategories/all-categories to the marketplace URL when browsing the site.
    For example: http://www.ebay.com.au/sch/allcategories/all-categories
  • Navigate to the desired category on the host site and copy the category ID from the URL.
  • These options are also available for the US marketplace:

Seller store category IDs
Because store category IDs are uniquely defined and maintained by each seller, this service cannot provide a list of a seller's IDs. However, sellers can retrieve their store category IDs as follows:

  1. Go to Seller Hub > Marketing.
  2. Click Manage store categories.
    A list of your store categories displays.
  3. Click the All categories link displayed at the bottom of the list.
    A complete list of your store categories and their associated store category IDs displays.

Occurrence: Conditional

campaignCriterion.selectionRules.categoryScopeCategoryScopeEnum

Indicates the source of the category ID; eBay or seller's store.

Occurrence: Conditional

campaignCriterion.selectionRules.listingConditionIdsarray of string

A comma-separated list of unique identifiers for the conditions of listings to be included in the campaign. Up to four IDs can be specified.

This array is only returned if one or more item condition values are used as a filter.

Note: Multiple listing condition IDs are mapped to the four valid values listed below. Refer to Creating a Promoted Listings campaign for more details.

Valid Values:

  • 1000 = New
  • 2000 = Certified Refurbished
  • 2500 = Seller Refurbished
  • 3000 = Used

Occurrence: Conditional

campaignCriterion.selectionRules.maxPriceAmount

The maximum price of the listings included in the campaign.

Occurrence: Conditional

campaignCriterion.selectionRules.maxPrice.currencyCurrencyCodeEnum

The base currency applied to the value field to establish a monetary amount.

The currency is represented as a 3-letter ISO 4217 currency code. For example, the code for the Canadian Dollar is CAD.

Default: The default currency of the eBay marketplace that hosts the listing.

Occurrence: Conditional

campaignCriterion.selectionRules.maxPrice.valuestring

The monetary amount in the specified currency.

Required in the amount type.

Occurrence: Conditional

campaignCriterion.selectionRules.minPriceAmount

The minimum price of the listings included in the campaign.

Occurrence: Conditional

campaignCriterion.selectionRules.minPrice.currencyCurrencyCodeEnum

The base currency applied to the value field to establish a monetary amount.

The currency is represented as a 3-letter ISO 4217 currency code. For example, the code for the Canadian Dollar is CAD.

Default: The default currency of the eBay marketplace that hosts the listing.

Occurrence: Conditional

campaignCriterion.selectionRules.minPrice.valuestring

The monetary amount in the specified currency.

Required in the amount type.

Occurrence: Conditional

campaignIdstring

A unique eBay-assigned ID for a campaign. This ID is generated when a campaign is created.

Occurrence: Conditional

campaignNamestring

A seller-defined name for the campaign. This value must be unique for the seller.

You can use any alphanumeric characters in the name, except the less than (<) or greater than (>) characters.

Max length: 80 characters

Occurrence: Conditional

campaignStatusCampaignStatusEnum

Indicates the status of the campaign, such as RUNNING, PAUSED, and ENDED.

Occurrence: Conditional

endDatestring

The date and time the campaign ends, in UTC format (yyyy-MM-ddThh:mm:ssZ). If this field is blank (code>null), it indicates a campaign that has no end date. For display purposes, convert this time into the local time of the seller.

Occurrence: Conditional

fundingStrategyFundingStrategy

This field specifies the funding model that defines how the Promoted Listing fee is calculated. The seller is assessed the fee if an item sells via a Promoted Listings action (such as buyer clicking on a Promoted Listings ad).

currently, the only funding model supported is COST_PER_SALE.

Occurrence: Conditional

fundingStrategy.bidPercentagestring

The user-defined bid percentage (also known as the ad rate) sets the level that eBay increases the visibility in search results for the associated listing. The higher the bidPercentage value, the more eBay promotes the listing.

The value specified here is also used to calculate the Promoted Listings fee. This percentage value is multiplied by the final sales price to determine the fee.

The Promoted Listings fee is determined at the time the transaction completes and the seller is assessed the fee only when an item sells through a Promoted Listings ad campaign.

bidPercentage is a single precision value that is guided by the following rules:

  • These values are valid:
       1,    1.0,    4.1,
       5.0,    5.5, ...
  • These values are not valid:
       0.01,    10.75,    99.99,
       and so on.

If a bid percentage is not provided for an ad, eBay uses the default bid percentage of the associated campaign.

Minimum value: 1.0
Maximum value: 100.0

Occurrence: Conditional

fundingStrategy.fundingModelFundingModelEnum

Indicates the model that eBay uses to calculate the Promoted Listings fee. Currently, only COST_PER_SALE is supported.

Default: COST_PER_SALE

Occurrence: Conditional

marketplaceIdMarketplaceIdEnum

The ID of the eBay marketplace where the campaign is hosted.

Occurrence: Conditional

startDatestring

The date and time the campaign starts, in UTC format (yyyy-MM-ddThh:mm:ssZ). For display purposes, convert this time into the local time of the seller.

On the date specified, the service derives the keywords for each listing in the campaign, creates an ad for each listing, and associates each new ad with the campaign. The campaign starts after this process is completed. The amount of time it takes the service to start the campaign depends on the number of listings in the campaign. Call getCampaign to check the status of the campaign.

Occurrence: Conditional

HTTP status codes

This call can return one of the following HTTP status codes. For an overview of the status codes, see HTTP status codes in Using eBay RESTful APIs.

StatusMeaning
200Success
400Bad Request
404Not Found
409Business error
500Internal Server error

Error codes

For more on errors, plus the codes of other common errors, see Handling errors.

CodeDomainCategoryMeaning
35001API_MARKETINGAPPLICATIONThere was a problem with an eBay internal system or process. Contact eBay Developers support for assistance.
35002API_MARKETINGAPPLICATIONInternal error. Please wait a few minutes and try the call again.
35045API_MARKETINGREQUESTNo campaign found for 'campaign_id' {campaign_id}.
35077API_MARKETINGBUSINESSTo use Promoted Listings, you need to improve your seller level to Top Rated or Above Standard and have enough recent sales activity.
35078API_MARKETINGBUSINESSTo gain access to Promoted Listings, you must be in good standing with recent sales activity.

Warnings

This call has no warnings.

Samples

New to making API calls? Please see Making a Call.

Note: Identifiers, such as order IDs or user IDs, and personal data in these samples might be anonymized or may no longer be active on eBay. If necessary, substitute current, relevant eBay data in your requests.

Sample 1: Retrieve a Specific Campaign by ID

This sample returns the details for the specified campaign.

Input

The input for this call is the campaign_id as a URI parameter.

GEThttps://api.ebay.com/sell/marketing/v1/ad_campaign/1********2

Output

The output is just the basic information about this campaign because there are no ads associated with the campaign.