Home
GET/ad_campaign
This method retrieves the details for all the campaigns of a seller, including the campaign's the selection rules.
Note that this method does not return the listing IDs or inventory reference IDs of the items included in the ad campaign. Call getAds to retrieve these IDs.
You can filter the result set by a campaign name, end date range, start date range, or campaign status. You can also paginate the records returned from the result set using the limit query parameter, and control which records to return using the offset parameter.
Parameter | Type | Description |
---|---|---|
campaign_status | string | Specifies the campaign status. The results are filtered to include only campaigns that are in the specified states. Note: The results might not include all the campaigns with this status if other filters exclude them. Valid values: See CampaignStatusEnum Maximum: 1 status Occurrence: Optional |
start_date_range | string | Specifies the range of a campaign's start date in which to filter the results. The results are filtered to include only campaigns with a start date that is equal to this date or is within specified range. Valid format (UTC): yyyy-MM-ddThh:mm:ssZ..yyyy-MM-ddThh:mm:ssZ (starts within this range)yyyy-MM-ddThh:mm:ssZ.. (campaign starts on or after this date)..yyyy-MM-ddThh:mm:ssZ (campaign starts on or before this date)2016-09-08T00:00.00.000Z..2016-09-09T00:00:00Z (campaign starts on September 8, 2016) Note: The results might not include all the campaigns with this start date if other filters exclude them. Occurrence: Optional |
end_date_range | string | Specifies the range of a campaign's end date. The results are filtered to include only campaigns with an end date that is within specified range. Valid format (UTC): yyyy-MM-ddThh:mm:ssZ..yyyy-MM-ddThh:mm:ssZ (campaign ends within this range) yyyy-MM-ddThh:mm:ssZ.. (campaign ends on or after this date)..yyyy-MM-ddThh:mm:ssZ (campaign ends on or before this date)2016-09-08T00:00:00Z..2016-09-09T00:00:00Z (campaign ends on September 8, 2016) Note: The results might not include all the campaigns ending on this date if other filters exclude them. Occurrence: Optional |
campaign_name | string | Specifies the campaign name. The results are filtered to include only the campaign by the specified name. Note: The results might be null if other filters exclude the campaign with this name. Maximum: 1 campaign name Occurrence: Optional |
limit | string | Specifies the maximum number of campaigns to return on a page in the paginated response. Default: 10Maximum: 500 Occurrence: Optional |
offset | string | Specifies the number of campaigns to skip in the result set before returning the first report in the paginated response. Combine offset with the limit query parameter to control the items returned in the response. For example, if you supply an offset of Default: 0 Occurrence: Optional |
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.
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.
This call has no payload.
This call has no field definitions.
This call has no response headers.
Output container/field | Type | Description |
---|---|---|
campaigns | array of Campaign | A list of campaigns contained on this page from the paginated response. Occurrence: Conditional |
campaigns.campaignCriterion | CampaignCriterion | The selection rules (criterion) used to select the listings for a campaign. Occurrence: Conditional |
campaigns.campaignCriterion.autoSelectFutureInventory | boolean | 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. Occurrence: Conditional |
campaigns.campaignCriterion.criterionType | CriterionTypeEnum | An enumerated value that defines the criterion (selection rule) types. Currently, the only criterion type supported is Occurrence: Conditional |
campaigns.campaignCriterion.selectionRules | array of SelectionRule | A set of rules that selects the listings to include in the campaign. The following rules apply to the selection rules:
Note: If an item matches multiple sets of rules or multiple rules within a selection rule set, the item is considered only once. Occurrence: Conditional |
campaigns.campaignCriterion.selectionRules.brands | array of string | A list of the brands of the items to be included in the campaign. Occurrence: Conditional |
campaigns.campaignCriterion.selectionRules.categoryIds | array 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
Seller store category IDs
Occurrence: Conditional |
campaigns.campaignCriterion.selectionRules.categoryScope | CategoryScopeEnum | Indicates the source of the category ID; eBay or seller's store. Occurrence: Conditional |
campaigns.campaignCriterion.selectionRules.listingConditionIds | array 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.
Occurrence: Conditional |
campaigns.campaignCriterion.selectionRules.maxPrice | Amount | The maximum price of the listings included in the campaign. Occurrence: Conditional |
campaigns.campaignCriterion.selectionRules.maxPrice.currency | CurrencyCodeEnum | The base currency applied to the value field to establish a monetary amount. Occurrence: Conditional |
campaigns.campaignCriterion.selectionRules.maxPrice.value | string | The monetary amount in the specified currency. Occurrence: Conditional |
campaigns.campaignCriterion.selectionRules.minPrice | Amount | The minimum price of the listings included in the campaign. Occurrence: Conditional |
campaigns.campaignCriterion.selectionRules.minPrice.currency | CurrencyCodeEnum | The base currency applied to the value field to establish a monetary amount. Occurrence: Conditional |
campaigns.campaignCriterion.selectionRules.minPrice.value | string | The monetary amount in the specified currency. Occurrence: Conditional |
campaigns.campaignId | string | A unique eBay-assigned ID for a campaign. This ID is generated when a campaign is created. Occurrence: Conditional |
campaigns.campaignName | string | 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 charactersOccurrence: Conditional |
campaigns.campaignStatus | CampaignStatusEnum | Indicates the status of the campaign, such as Occurrence: Conditional |
campaigns.endDate | string | The date and time the campaign ends, in UTC format ( Occurrence: Conditional |
campaigns.fundingStrategy | FundingStrategy | 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 Occurrence: Conditional |
campaigns.fundingStrategy.bidPercentage | string | 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.
If a bid percentage is not provided for an ad, eBay uses the default bid percentage of the associated campaign. Minimum value: 1.0Maximum value: 100.0 Occurrence: Conditional |
campaigns.fundingStrategy.fundingModel | FundingModelEnum | Indicates the model that eBay uses to calculate the Promoted Listings fee. Currently, only Occurrence: Conditional |
campaigns.marketplaceId | MarketplaceIdEnum | The ID of the eBay marketplace where the campaign is hosted. Occurrence: Conditional |
campaigns.startDate | string | The date and time the campaign starts, in UTC format ( 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 |
href | string | The URI of the current page of results from the result set. Occurrence: Conditional |
limit | integer | The number of items returned on a single page from the result set. This value can be set in the request with the limit query parameter. Occurrence: Conditional |
next | string | The URI for the following page of results. This value is returned only if there is an additional page of results to display from the result set. Occurrence: Conditional |
offset | integer | The number of results skipped in the result set before listing the first returned result. This value can be set in the request with the offset query parameter. Note: The items in a paginated result set use a zero-based list where the first item in the list has an offset of Occurrence: Conditional |
prev | string | The URI for the preceding page of results. This value is returned only if there is a previous page of results to display from the result set. Occurrence: Conditional |
total | integer | The total number of items retrieved in the result set. Occurrence: Conditional |
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.
Status | Meaning |
---|---|
200 | Success |
400 | Bad Request |
409 | Business error |
500 | Internal Server error |
For more on errors, plus the codes of other common errors, see Handling errors.
Code | Domain | Category | Meaning |
---|---|---|---|
35001 | API_MARKETING | APPLICATION | There was a problem with an eBay internal system or process. Contact eBay Developer Technical Support for assistance. |
35002 | API_MARKETING | APPLICATION | Internal error. Please wait a few minutes and try the call again. |
35020 | API_MARKETING | REQUEST | The campaign name cannot be more than {maxCampaignNameLength} characters. |
35023 | API_MARKETING | REQUEST | The request contains invalid characters. {notAllowedCharacters} are not allowed. |
35027 | API_MARKETING | REQUEST | The date range {dateRange} is not valid. Ensure the beginning of the range is before the end of the range. |
35028 | API_MARKETING | REQUEST | The format of the date range {dateRange} is invalid. The format for a date range is yyyy-MM-ddThh:mm:ss.sssZ..yyyy-MM-ddThh:mm:ss.sssZ or yyyy-MM-ddThh:mm:ss.sssZ.. or ..yyyy-MM-ddThh:mm:ss.sssZ. |
35029 | API_MARKETING | REQUEST | The 'limit' has to be greater than zero and less than {maxLimitValue}. |
35030 | API_MARKETING | REQUEST | The 'offset' cannot be less than zero. |
35043 | API_MARKETING | REQUEST | The campaign status of {campaignStatus} is either invalid or not supported for this operation. |
This call has no warnings.
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.
This sample returns the details of the seller's campaign.
There are no required inputs for this call. Optionally, you can use the campaign_name, campaign_status, end_date_range, limit, offset, and start_date_range fields to filter and control the size of the result set.
GEThttps://api.ebay.com/sell/marketing/v1/ad_campaign
The output is a list of all the seller's campaigns.