Skip to main content

GET/promotion

This method returns a list of a seller's undeleted promotions.

The call returns up to 200 currently-available promotions on the specified marketplace. While the response body does not include the promotion's discountRules or inventoryCriterion containers, it does include the promotionHref (which you can use to retrieve the complete details of the promotion).

Use query parameters to sort and filter the results by the number of promotions to return, the promotion state or type, and the eBay marketplace. You can also supply keywords to limit the response to the promotions that contain that keywords in the title of the promotion.

Maximum returned: 200

Input

Resource URI

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

ParameterTypeDescription
qstringA string consisting of one or more keywords. eBay filters the response by returning only the promotions that contain the supplied keywords in the promotion title.

Example: "iPhone" or "Harry Potter."

Commas that separate keywords are ignored. For example, a keyword string of "iPhone, iPad" equals "iPhone iPad", and each results in a response that contains promotions with both "iPhone" and "iPad" in the title.

Occurrence: Optional

limitstringSpecifies the maximum number of promotions returned on a page from the result set.

Default: 200
Maximum: 200

Occurrence: Optional

offsetstringSpecifies the number of promotions to skip in the result set before returning the first promotion 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 0 and a limit of 10, the first page of the response contains the first 10 items from the complete list of items retrieved by the call. If offset is 10 and limit is 20, the first page of the response contains items 11-30 from the complete result set.

Default: 0

Occurrence: Optional

marketplace_idstringThis parameter specifies eBay marketplace ID of the site where the promotion is hosted.

See MarketplaceIdEnum for supported Marketplace ID values.

Occurrence: Required

sortarray of SortFieldSpecifies the order for how to sort the response. If you precede the supplied value with a dash, the response is sorted in reverse order.

Example:
   sort=END_DATE   Sorts the promotions in the response by their end dates in ascending order
   sort=-PROMOTION_NAME   Sorts the promotions by their promotion name in descending alphabetical order (Z-Az-a)

Valid values:
  • START_DATE
  • END_DATE
  • PROMOTION_NAME

Occurrence: Optional

promotion_statusstringThis parameter specifies the promotion state by which you want to filter the results. The response contains only those promotions that match the state you specify.

See PromotionStatusEnum for supported values.

Maximum number of input values: 1

Occurrence: Optional

promotion_typestringThis parameter specifies the campaign promotion type by which you want to filter the results.

See PromotionTypeEnum for supported values.

Occurrence: Optional

HTTP request headers

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

All other standard RESTful request headers are optional. For more information on standard RESTful request headers, see the HTTP request headers- opens rest request components page table.

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
hrefstring

The URI of the current page of results from the result set.

Occurrence: Always

limitinteger

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

nextstring

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.

Max length: 2048

Occurrence: Conditional

offsetinteger

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 0.

Occurrence: Always

prevstring

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.

Max length: 2048

Occurrence: Conditional

promotionsarray of PromotionDetail

A list containing the details of each returned promotion. This includes all the information about the promotions except for the listings that are part of the promotions.

Occurrence: Always

promotions.couponCodestring

A unique code that buyers can use during checkout to receive a discount. The code must be unique across eBay.

Occurrence: Always

promotions.descriptionstring

This is the seller-defined "tag line" for the offer, such as "Save on designer shoes." Tag lines appear under the "offer-type text" that is generated for a promotion and displayed under the offer tile that is shown on the seller's All Offers page and on the promotion's event page.

Note: Offer-type text is a teaser that's presented throughout the buyer's journey through the sales flow and is generated by eBay. This text is not editable by the seller—it's derived from the settings in the discountRules and discountSpecification fields—and can be, for example, "Extra 20% off when you buy 3+".


Maximum length: 50

Required if you are configuring ORDER_DISCOUNT or MARKDOWN_SALE promotions (and not valid for VOLUME_DISCOUNT promotions).

Occurrence: Conditional

promotions.endDatestring

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

Occurrence: Always

promotions.marketplaceIdMarketplaceIdEnum

The eBay marketplace ID of the site where the promotion is hosted. Threshold promotions are supported on a select set of marketplaces while markdown promotions are supported on all eBay marketplaces.

Valid values for threshold promotions are as follows:

  • EBAY_AU = Australia
  • EBAY_DE = Germany
  • EBAY_ES = Spain
  • EBAY_FR = France
  • EBAY_GB = Great Britain
  • EBAY_IT = Italy
  • EBAY_US = United States

Occurrence: Always

promotions.namestring

The seller-defined name or "title" of the promotion, such as "Buy 1 Get 1", that the seller can use to identify a promotion. This label is not displayed in end-user flows.

Maximum length: 90

Occurrence: Always

promotions.priorityPromotionPriorityEnum

Applicable for only ORDER_DISCOUNT promotions, this field indicates the precedence of the promotion, which is used to determine the position of a promotion on the seller's All Offers page. If an item is associated with multiple promotions, the promotion with the higher priority takes precedence.

Occurrence: Conditional

promotions.promotionHrefstring

The URI of the promotion details.

Occurrence: Always

promotions.promotionIdstring

A unique eBay-assigned ID for the promotion that's generated when the promotion is created.

Occurrence: Always

promotions.promotionImageUrlstring

Required for CODED_COUPON, MARKDOWN_SALE, and ORDER_DISCOUNT promotions, and not applicable for VOLUME_DISCOUNT promotions, this field is a URL that points to an image for the promotion. This image is displayed on the seller's All Offers page. The URL must point to either JPEG or PNG image and it must be a minimum of 500x500 pixels in dimension and cannot exceed 12Mb in size.

Occurrence: Always

promotions.promotionStatusPromotionStatusEnum

The current status of the promotion. When creating a new promotion, you must set this value to either DRAFT or SCHEDULED.

Occurrence: Always

promotions.promotionTypePromotionTypeEnum

Indicates type of the promotion, either CODED_COUPON, MARKDOWN_SALE, ORDER_DISCOUNT, or VOLUME_DISCOUNT.

Occurrence: Always

promotions.startDatestring

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

Occurrence: Always

totalinteger

The total number of items retrieved in the result set.

If no items are found, this field is returned with a value of 0.

Occurrence: Always

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
500Internal Server Error

Error codes

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

CodeDomainCategoryMeaning
38201API_MARKETINGAPPLICATIONInternal server error encountered. If this problem persists, contact the eBay Developers Program for support.
38204API_MARKETINGREQUESTThe seller is not eligible for promotions because they do not have an eBay Store or they have not accepted the terms and conditions for creating a promotion on this Marketplace, see the documentation for this call.
38211API_MARKETINGREQUESTThe offset value must be an integer value greater than or equal to zero.
38212API_MARKETINGREQUESTThe sort value was not valid. For the valid values, see the documentation for this call.
38213API_MARKETINGREQUESTYou can query a limit of between 0 and 200 promotion records at a time. Update the request and resubmit the call.
38240API_MARKETINGREQUESTInvalid input for the 'promotionStatus' field. For help, see the documentation for this call.
345141API_MARKETINGREQUESTInvalid input for the 'promotionType' field. For help, see the documentation for this call.

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: Get All Promotions

This sample retrieves all the seller's promotions for a specific eBay marketplace.

Input

Only the marketplace_id parameter is required, but there are several filters you can use to limit the response. This sample uses the limit, offset, promotion_status and sort filters.

GEThttps://api.ebay.com/sell/marketing/v1/promotion?limit=5&offset=0&promotion_status=DRAFT&sort=START_DATE&marketplace_id=EBAY_US

Output

The output is all the seller's draft promotions, sorted by start date. The response is paginated to return five promotions, starting with the first one retrieved.