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
Parameter | Type | Description |
---|---|---|
q | string | A 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 |
limit | string | Specifies the maximum number of promotions returned on a page from the result set. Default: 200 Maximum: 200 Occurrence: Optional |
offset | string | Specifies 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 Default: 0 Occurrence: Optional |
marketplace_id | string | The eBay marketplace ID of the site where the promotion is hosted. Valid values:
Occurrence: Required |
sort | array of SortField | Specifies 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:
Occurrence: Optional |
promotion_status | string | Specifies the promotion state by which you want to filter the results. The response contains only those promotions that match the state you specify. Valid values:
Occurrence: Optional |
promotion_type | string | Filters the returned promotions based on their campaign promotion type. Specify one of the following values to indicate the promotion type you want returned:
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/field | Type | Description |
---|---|---|
href | string | The URI of the current page of results from the result set. Occurrence: Always |
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: Always |
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: Always |
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 |
promotions | array 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.couponCode | string | A unique code that buyers can use during checkout to receive a discount. The code must be unique across eBay. Occurrence: Always |
promotions.description | string | 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.endDate | string | The date and time the promotion ends in UTC format ( Occurrence: Always |
promotions.marketplaceId | MarketplaceIdEnum | 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:
Occurrence: Always |
promotions.name | string | 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. Occurrence: Always |
promotions.priority | PromotionPriorityEnum | 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.promotionHref | string | The URI of the promotion details. Occurrence: Always |
promotions.promotionId | string | A unique eBay-assigned ID for the promotion that's generated when the promotion is created. Occurrence: Always |
promotions.promotionImageUrl | string | 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.promotionStatus | PromotionStatusEnum | The current status of the promotion. When creating a new promotion, you must set this value to either Occurrence: Always |
promotions.promotionType | PromotionTypeEnum | Indicates type of the promotion, either Occurrence: Always |
promotions.startDate | string | The date and time the promotion starts in UTC format ( Occurrence: Always |
total | integer | The total number of items retrieved in the result set. 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.
Status | Meaning |
---|---|
200 | Success |
400 | Bad Request |
500 | Internal Server Error |
Error codes
For more on errors, plus the codes of other common errors, see Handling errors.
Code | Domain | Category | Meaning |
---|---|---|---|
38201 | API_MARKETING | APPLICATION | Internal server error encountered. If this problem persists, contact the eBay Developers Program for support. |
38204 | API_MARKETING | REQUEST | The 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. |
38211 | API_MARKETING | REQUEST | The offset value must be an integer value greater than or equal to zero. |
38212 | API_MARKETING | REQUEST | The sort value was not valid. For the valid values, see the documentation for this call. |
38213 | API_MARKETING | REQUEST | You can query a limit of between 0 and 200 promotion records at a time. Update the request and resubmit the call. |
38240 | API_MARKETING | REQUEST | Invalid input for the 'promotionStatus' field. For help, see the documentation for this call. |
345141 | API_MARKETING | REQUEST | Invalid 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.