Skip to main content

GET/promotion

Note: As of July 8th 2024, promotions are now being referred to as discounts on Seller Hub and eBay help pages. Sell Marketing API documentation has been updated to reflect this product name change, but note that no API interface changes have been made.
This method returns a list of a seller's undeleted discounts.

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

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

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 discounts that contain the supplied keywords in the 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 discounts with both "iPhone" and "iPad" in the title.

Occurrence: Optional

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

Default: 200
Maximum: 200

Occurrence: Optional

offsetstringSpecifies the number of discounts to skip in the result set before returning the first discount 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 discount 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 discounts in the response by their end dates in ascending order
   sort=-PROMOTION_NAME   Sorts the discounts by their name in descending alphabetical order (Z-Az-a)

Valid values:
  • START_DATE
  • END_DATE
  • PROMOTION_NAME

Occurrence: Optional

promotion_statusstringThis parameter specifies the discount state by which you want to filter the results. The response contains only those discounts 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 discounts 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 discount. This includes all the information about the discounts except for the listings that are discounted.

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 discount and displayed under the offer tile that is shown on the seller's All Offers page and on the discount'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 discoutns (and not valid for VOLUME_DISCOUNT discounts).

Occurrence: Conditional

promotions.endDatestring

The date and time the discount 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 discount is hosted. Threshold discounts are supported on a select set of marketplaces while markdown discounts are supported on all eBay marketplaces.

Valid values for threshold discounts 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 discount, such as "Buy 1 Get 1", that the seller can use to identify a discount. This label is not displayed in end-user flows.

Maximum length: 90

Occurrence: Always

promotions.priorityPromotionPriorityEnum

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

Occurrence: Conditional

promotions.promotionHrefstring

The URI of the discount details.

Occurrence: Always

promotions.promotionIdstring

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

Occurrence: Always

promotions.promotionImageUrlstring

Required for CODED_COUPON, MARKDOWN_SALE, and ORDER_DISCOUNT discount, and not applicable for VOLUME_DISCOUNT discounts, this field is a URL that points to an image for the discount. 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 discount. When creating a new discount, you must set this value to either DRAFT or SCHEDULED.

Occurrence: Always

promotions.promotionTypePromotionTypeEnum

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

Occurrence: Always

promotions.startDatestring

The date and time the discount 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 Discounts

This sample retrieves all the seller's discounts 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 discounts, sorted by start date. The response is paginated to return five discounts, starting with the first one retrieved.

Got thoughts? Click the feedback button – your insights help us improve!