Skip to main content

POST/ad_campaign

This method can be used to create a Promoted Listings Standard (PLS), Promoted Listings Advanced (PLA), or Offsite Ads campaign.

A Promoted Listings campaign is the structure into which you place the ads or ad group for the listings you want to promote.

For Promoted Listings Standard and Promoted Listings Advanced campaigns, you can identify the items you want to place into a campaign either by "key" or by "rule" as follows:

  • Rules-based campaigns (PLS Only) – A rules-based campaign adds items to the campaign according to the criteria you specify in your call to createCampaign. You can set the autoSelectFutureInventory request field to true so that after your campaign launches, eBay will regularly assess your new, revised, or newly-eligible listings to determine whether any should be added or removed from your campaign according to the rules you set. If there are, eBay will add or remove them automatically on a daily basis.
  • Key-based campaigns (PLS and PLA only) – Add items to an existing campaign using either listing ID values or Inventory Reference values:
    • Add listingId values to an existing campaign by calling either createAdByListingID or bulkCreateAdsByListingId.
    • Add inventoryReference values to an existing campaign by calling either createAdByInventoryReference or bulkCreateAdsByInventoryReference.
    • Add an ad group to an existing campaign by calling createAdGroup.

    Note: No matter how you add items to a Promoted Listings Standard or Promoted Listings Advanced campaign, each campaign can only contain ads for a maximum of 50,000 items.

    If a rules-based campaign identifies more than 50,000 items, ads are created for only the first 50,000 items identified by the specified criteria, and ads are not created for the remaining items.

    For Offsite Ads campaigns, sellers must set the channels array of the request body to OFF_SITE. If no value is entered, the campaign will default to ON_SITE. Only one Offsite Ads campaign can be created per seller.

    Sellers can use the sugestBudget method to retrieve the suggested budget for an Offsite Ads campaign. If the budget is not provided for an Offsite Ads campaign, the suggested budget will be set as the budget.

    Note: The Channels array is only applicable for campaigns that use the Cost Per click (CPC) funding model. Sellers can use the getAdvertisingEligibility method of the Account API v1 to determine their eligibility status for eBay advertising programs.

    Creating a campaign

    To create a basic campaign, supply:

    • The user-defined campaign name
    • The start date (and optionally the end date) of the campaign
    • The eBay marketplace on which the campaign is hosted
    • Details on the campaign funding model

    The campaign funding model specifies how the Promoted Listings fee is calculated. Currently, the supported funding models are COST_PER_SALE and COST_PER_CLICK. For complete information on how the fee is calculated and when it applies, see Promoted Listings fees.

    If you populate the campaignCriterion object in your createCampaign request, campaign "ads" are created by "rule" for the listings that meet the criteria you specify, and these ads are associated with the newly created campaign.

    For details on creating Promoted Listings campaigns and how to select the items to be included in your campaigns, see Promoted Listings campaign creation.

    For recommendations on which listings are prime for a Promoted Listings ad campaign and to get guidance on how to set the bidPercentage field, see Using the Recommendation API to help configure campaigns.

    Note: The Recommendation API is not applicable for Offsite Ads campaigns.

    Tip: See Promoted Listings requirements and restrictions for the details on the marketplaces that support Promoted Listings via the API. See Promoted Listings restrictions for details about campaign limitations and restrictions.

Input

Resource URI

POST https://api.ebay.com/sell/marketing/v1/ad_campaign

This method is supported in Sandbox environment. To access the endpoint, just replace the api.ebay.com root URI with api.sandbox.ebay.com

URI parameters

This method has no URI parameters.

HTTP request headers

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

The table below shows additional HTTP request headers that are either required, conditionally required, or strongly recommended for this method. Other standard HTTP request headers- opens rest request components page (not in this table) can also be used, but they are optional.

HeaderTypeDescription
Content-TypestringThis header indicates the format of the request body provided by the client. Its value should be set to application/json.

For more information, refer to HTTP request headers.

Occurrence: Required

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

See OAuth access tokens for more information.

Request payload

Copy complete valid JSON to clipboard

Request fields

Input container/fieldTypeDescription
budgetCampaignBudgetRequest

The allocated daily budget for the Cost Per Click (CPC) Promoted Listings campaign.

Required if the campaign funding model is CPC.

Occurrence: Conditional

budget.dailyBudgetRequest

The daily budget limit for a CPC Promoted Listings campaign.

When running an Offsite Ads campaign, eBay may spend more or less than the seller's daily budget to capitalize on interested buyers, but will not exceed 2x the daily budget. The average over the course of the campaign will not exceed the provided daily budget. This value is used to calculate a total monthly budget by multiplying 30.4 by the provided daily budget. Over the course of the campaign, eBay will not charge more than this total budget per month.

If a campaign ends prematurely, however, the seller may be charged up to 2x their daily budget on a daily basis, as the campaign may have not had the chance to average the budget out over time.

Occurrence: Required

budget.daily.amountAmount

The allocated budget amount for a CPC Promoted Listings campaign. Both the currency and value must be specified.

Occurrence: Required

budget.daily.amount.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

budget.daily.amount.valuestring

The monetary amount in the specified currency.

Required in the amount type.

Occurrence: Conditional

campaignCriterionCampaignCriterion

This container is used if the seller wishes to create one or more rules for a rules-based campaign. If you populate the campaignCriterion object in your createCampaign request, ads for the campaign are created by rule for the listings that meet the criteria you specify, and these ads are associated with the campaign to be created.

Occurrence: Optional

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: Optional

campaignCriterion.criterionTypeCriterionTypeEnum

This enum 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.

Do not include this field if you manage your listings with Trading API/legacy model.

Occurrence: Conditional

campaignCriterion.selectionRulesarray of SelectionRule

This container shows all of the rules/inclusion filters used to add listings to the campaign. For information on using the contained fields, see Promoted Listing campaigns.

Occurrence: Conditional

campaignCriterion.selectionRules.brandsarray of string

An array of product brands. For more details, see Using the selectionRules container.

Occurrence: Optional

campaignCriterion.selectionRules.categoryIdsarray of string

This field contains an array of the associated category ID(s).

For Item promotions, a single-item array containing the category ID associated with the promotion. Required when used in an Item promotion and either specifying a selectionRules container or when inventoryCriterionType is set to INVENTORY_BY_RULE.

For Promoted Listing campaigns, an array of category ID(s) associated with the campaign.

For information on how to get category IDs, see eBay Marketplace category IDs and Seller store category IDs

Occurrence: Conditional

campaignCriterion.selectionRules.categoryScopeCategoryScopeEnum

This enumerated value indicates if the category ID for the item is an identifier for eBay categories or for a seller's eBay store categories.

For Promoted Listing campaigns, this field includes the type of the category ID for the item(s) to be included in the campaign.

For Item promotions, this field identifies the scope for the corresponding array as eBay categories or for a seller's eBay store categories. Required when used in an Item promotion and inventoryCriterionType is set to INVENTORY_BY_RULE.

Occurrence: Conditional

campaignCriterion.selectionRules.listingConditionIdsarray of string

A comma-separated list of unique identifiers for the conditions of listings to be included

For Promoted Listing campaigns, refer to Add items to the PLS campaign. Up to four IDs can be specified.

For Item promotions, refer to Item condition ID and name values.

Occurrence: Optional

campaignCriterion.selectionRules.maxPriceAmount

This container sets the maximum price threshold. For more details, see Using the selectionRules container.

Occurrence: Optional

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

This container sets the minimum price threshold. For more details, see Using the selectionRules container.

Occurrence: Optional

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

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: Required

channelsarray of ChannelEnum

The channel for the campaign. This value indicates whether the advertising campaign is an Onsite or Offsite.

If no value is entered, this field will default to ON_SITE. Multiple channels are not supported.

Note: Channels is only applicable for campaigns that use the Cost Per click (CPC) funding model.
Valid Values:

  • ON_SITE
  • OFF_SITE
This field is required and must be set to OFF_SITE for an Offsite Ads campaign.

Occurrence: Conditional

endDatestring

The date and time the campaign ends, in UTC format (yyyy-MM-ddThh:mm:ssZ). If this field is omitted, the campaign will have no defined end date, and will not end until the seller makes a decision to end the campaign with an endCampaign call, or if they update the campaign at a later time with an end date.

Occurrence: Optional

fundingStrategyFundingStrategy

This container includes parameters that define an ad campaign funding strategy. The set of seller-configurable parameters depends on the selected fundingModel value.

Occurrence: Required

fundingStrategy.adRateStrategyAdRateStrategyEnum

This field is used to set the ad rate strategy for a Cost Per Sale (CPS) campaign.

The default value for this field is FIXED. If this field is omitted, the default value will be used.

Note: This field is not applicable for Cost Per Click (CPC) or Offsite Ads campaigns.

Occurrence: Conditional

fundingStrategy.biddingStrategyBiddingStrategyEnum

Indicates the bidding strategy for an onsite Cost Per Click (CPC) campaign.

Note: This field is applicable only to onsite Cost Per Click (CPC) campaigns.
Valid values are:

  • FIXED

    When using a fixed bidding strategy, sellers manually assign and adjust keyword bids for the CPC campaign.
  • DYNAMIC

    When using a dynamic bidding strategy, eBay manages the campaign's keyword bids and automatically updates them daily to the suggested bid.

    Note: For a CPC campaign using dynamic bidding, sellers can continue to manually add keywords for the campaign, but they are no longer able to manually adjust their associated bid values. In order to manually adjust bid values, sellers must use the FIXED bidding strategy.


Default value: FIXED

Occurrence: Optional

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.

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

  • These values are valid:
       4.1,    5.0,    5.5, ...
  • These values are not valid:
       0.01,    10.75,    99.99,
       and so on.
This is the default bid percentage for the campaigns using the Cost Per Sale (CPS) funding model, and this value will be overridden by any ads in the campaign that have their own set bid percentages.

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

Note:This field is only relevant for campaigns that use the CPS funding model and a fixed ad rate. It is not used for campaigns that use the Cost Per Click (CPC) funding model and should not be provided when the selected adRateStrategy for the campaign is dynamic.

Note: This field has a minimum value of 2.0 and a maximum value of 100.0.

Occurrence: Conditional

fundingStrategy.dynamicAdRatePreferencesarray of DynamicAdRatePreference

A field that indicates whether a single, user-defined bid percentage (also known as the ad rate) should be used, or whether eBay should automatically adjust listings to maintain the daily suggested bid percentage.

Note: Dynamic adjustment is only applicable when the adRateStrategy is set to DYNAMIC This field is not applicable for Offsite Ads campaigns.
Default: FIXED

Occurrence: Optional

fundingStrategy.dynamicAdRatePreferences.adRateAdjustmentPercentstring

The percentage above or below (-) the eBay suggested ad rate that a seller is willing to pay.

This specifies the maximum and minimum values to which an ad rate can be dynamically adjusted.

Occurrence: Optional

fundingStrategy.dynamicAdRatePreferences.adRateCapPercentstring

The maximum value (specified as a percentage) to which the eBay suggested ad rate can be adjusted. The adjusted ad rate will never exceed this percentage.

Occurrence: Optional

fundingStrategy.fundingModelFundingModelEnum

Indicates the model that eBay uses to calculate the Promoted Listings fee.

For a description of the funding model types, refer to FundingModelTypeEnum.

Occurrence: Required

marketplaceIdMarketplaceIdEnum

The ID of the eBay marketplace where the campaign is hosted. See the MarketplaceIdEnum type to get the appropriate enumeration value for the listing marketplace.

Occurrence: Required

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: Required

Output

HTTP response headers

See HTTP response headers for details.

HeaderMeaning
LocationThe location response header contains the getCampaign URI to the newly created campaign. The URL includes the eBay-assigned campaignId, which you can use to reference the campaign.

Response payload

This call has no payload.

Response fields

This call has no field definitions.

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
201Created
400Bad Request
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 Developer Technical Support for assistance.
35002API_MARKETINGAPPLICATIONInternal error. Please wait a few minutes and try the call again.
35003API_MARKETINGREQUEST'campaignCriterion' is required for a criterion based campaign.
35004API_MARKETINGREQUESTOne of the selectionRule containers is empty. You must specify at least one rule in each selectionRule container. Note: 'categoryScope' is not a rule.
35005API_MARKETINGREQUEST'selectionRules' is required for criterion based campaigns.
35006API_MARKETINGREQUEST'fundingStrategy' is required for this call.
35007API_MARKETINGREQUESTThe 'bidPercentage' {bidPercentage} is not valid. The bid percentage should be a single precision value. Minimum value: {minBidPercent} , Maximum value:{maxBidPercent}.
35008API_MARKETINGREQUESTThe category ID {categoryId} is not valid.
35009API_MARKETINGREQUESTThe listing Condition ID {listingConditionId} is not valid. Refer to the API call documentation for a list of valid values.
35015API_MARKETINGREQUESTThe 'maxPrice' or 'minPrice' value is missing or invalid. The value cannot be less than or equal to zero.
35016API_MARKETINGREQUESTThe 'minPrice' {minPrice} cannot be greater than the 'maxPrice' {maxPrice}.
35017API_MARKETINGREQUEST'currency' is not valid or missing.
35019API_MARKETINGREQUESTCampaign name is required for this call.
35020API_MARKETINGREQUESTThe campaign name cannot be more than {maxCampaignNameLength} characters.
35021API_MARKETINGREQUESTA campaign with the name of {campaignName} already exists. Please provide a different name.
35022API_MARKETINGREQUESTThe brand name {brandName} is not valid.
35023API_MARKETINGREQUESTThe request contains invalid characters. {notAllowedCharacters} are not allowed.
35024API_MARKETINGREQUESTThe campaign start date {startDate} cannot be after the end date {endDate}.
35025API_MARKETINGREQUESTA campaign start date is required.
35026API_MARKETINGREQUESTA campaign start or end date {date} cannot be in the past.
35038API_MARKETINGREQUESTThe funding model is required. Valid values for 'fundingModel' are: {fundingModelValues}.
35039API_MARKETINGREQUESTThe 'categoryScope' is required for criterion based campaigns using category based listing selection rules. Valid values are: {categoryScopeValues}
35041API_MARKETINGREQUESTThe 'marketplaceId' is required.
35042API_MARKETINGREQUESTThe criterion type is required for criterion based campaigns. Valid values are: {criterionTypeValues}.
35051API_MARKETINGBUSINESS'marketplaceId' {marketplaceId} is not supported. Promoted Listings is supported only on these marketplaces: {supportedMarketplaces}.
35052API_MARKETINGBUSINESSThe category {categoryId} is not supported by the Promoted Listing service for multi-quantity listings.
35053API_MARKETINGBUSINESSMarketplaceId: {marketplaceId} and Currency: {currency} for the listing selection rule do not match.
35067API_MARKETINGBUSINESSThe seller must accept the Promoted Listing terms and conditions. For the requirements to use the Promoted Listing API, refer to the documentation.
35069API_MARKETINGBUSINESSNo more than {maxNumberOfSelectionRules} listing selection rules are allowed in a campaign.
35072API_MARKETINGBUSINESSThe number of listings that result from the rules exceeds the maximum number of listings allowed in a campaign, which is {maxSupportedNumber}. Refine the rules and submit the call again.
35074API_MARKETINGBUSINESSThere were no eligible listings found for the selection rules provided. Please check the rules and submit the call again.
35075API_MARKETINGBUSINESSThe category {categoryId} is not supported by the Promoted Listing service for single-quantity listings.
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.
35089API_MARKETINGBUSINESSWe are currently testing a premium ads product with a small invite-only group. We will share more information when we are ready to expand.
35094API_MARKETINGBUSINESSMaximum number of campaigns allowed with the 'channels' value {channel} is exceeded.
35095API_MARKETINGBUSINESS'marketplaceId' {marketplaceId} is not supported. Offsite Ads is supported only on these marketplaces: {supportedMarketplaces}.
35104API_MARKETINGBUSINESS'categoryScope' STORE can not be found. Please define the store categories first or use 'categoryScope' MARKETPLACE to select categories.
35106API_MARKETINGBUSINESS'BidPercentage' should be provided when selected 'adRateStrategy' is 'FIXED'.
35107API_MARKETINGBUSINESS'dynamicAdRatePreferences' can be provided only when selected 'adRateStrategy' is 'DYNAMIC'.
35108API_MARKETINGBUSINESSThe 'adRateAdjustmentPercent' {adRateAdjustmentPercent} is not valid. Please set 'adRateAdjustmentPercent' {adRateAdjustmentPercent} between {minAllowedAdRateAdjustmentPercent}% - {maxAllowedAdRateAdjustmentPercent}%.
35109API_MARKETINGBUSINESSThe 'adRateCapPercent' {adRateCapPercent} is not valid. Please set 'adRateCapPercent' between {minAllowedAdRateCapPercent}% - {maxAllowedAdRateCapPercent}%.
35110API_MARKETINGBUSINESSThe 'adRateStrategy' is not supported for CPC funding model.
35111API_MARKETINGBUSINESSThe 'dynamicAdRatePreferences' is not supported for CPC funding model.
35114API_MARKETINGBUSINESSThe 'dynamicAdRatePreferences' list currently can only support one element containing dynamicAdRatePreference. Please remove additional elements and try again.
35132API_MARKETINGBUSINESSThe 'biddingStrategy' field is not supported for CPS funding model.
36101API_MARKETINGREQUESTThe daily budget value format is a maximum of two decimal points.
36151API_MARKETINGBUSINESS'campaignCriterion' {campaignCriterion} is not supported for CPC funding model.
36152API_MARKETINGBUSINESSThe 'bidPercentage' is not supported for CPC funding model.
36153API_MARKETINGBUSINESSThe daily budget currency {currency} is not supported for {fieldName}. The supported currency for the {marketplaceId} marketplace is {supportedCurrencyCode}.
36154API_MARKETINGBUSINESSThe daily budget below minimum allowed {minAllowed}.
36155API_MARKETINGBUSINESSThe daily budget above maximum allowed {maxAllowed}.
36156API_MARKETINGBUSINESScampaignBudget is not supported for CPS funding model.
36157API_MARKETINGBUSINESSThe daily budget is required for campaigns with CPC funding model.
36158API_MARKETINGBUSINESSThe daily budget value format {dailyBudgetValue} cannot have more than 2 decimal places.
36159API_MARKETINGBUSINESS'marketplaceId' {marketPlaceId} is not supported. Promoted Listings with CPC funding model is supported only on these marketplaces: {supportedMarketplaces}.
36406API_MARKETINGREQUESTThe 'channels' value {channel} can only be used with the {funding_model} fundingModel.
36407API_MARKETINGREQUESTThe 'channels' value is invalid.

Warnings

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

CodeDomainCategoryMeaning
35103API_MARKETINGBUSINESSThis campaign has reached maximum capacity of {maxSupportedNumber} listings. To continue promoting listings, create a new campaign.
36410API_MARKETINGBUSINESSThis campaign has been created with the suggested budget.

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: Create a campaign for an inventory campaign

This sample creates a campaign named "Fall Sale," and sets the start date and bid percentage values, which will be used for all the ads in the campaign.

Input

The inputs for this sample are campaignName, startDate, fundingStrategy.bidPercentage, fundingStrategy.fundingModel and marketplaceId.

POSThttps://api.ebay.com/sell/marketing/v1/ad_campaign

Output

A successful call returns the HTTP status code 201 Created.

In addition, the response includes a location response header that contains the URI to the newly created campaign. This method has no response payload.

Sample 2: Create an Offsite Ads Campaign

This sample creates an Offsite Ads campaign and sets the start date, funding strategy, and budget for the campaign.

Input

The inputs for this sample are campaignName, startDate, fundingStrategy, channels, budget and marketplaceId.

In this sample, the seller has created an Offsite Ads campaign with a daily budget of 5 USD.

POSThttps://api.ebay.com/sell/marketing/v1/ad_campaign

Output

A successful call returns the HTTP status code 201 Created.

In addition, the response includes a location response header that contains the URI to the newly created Offsite Ads campaign. This method has no response payload.

Sample 3: Create a Cost per Click (CPC) campaign with a dynamic bidding strategy.

This sample creates a CPC campaign that incorporates a dynamic bidding strategy.

Input

This sample creates a CPC campaign that incorporates a dynamic bidding strategy. When a campaign uses dynamic bidding sellers can manually update keywords for the campaign, but they are not able to manually adjust the associated bid values.

In order to manually adjust bid values, sellers must call updateBiddingStrategy to set biddingStrategy to FIXED to use a fixed bidding strategy.

POSThttps://api.ebay.com/sell/marketing/v1/ad_campaign

Output

A successful call returns the HTTP status code 201 Created.

In addition, the response includes a location response header that provides the URI to the newly created campaign. This method has no response payload.