GET/promotion/{promotion_id}/get_listing_set
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 the set of listings associated with the promotion_id specified in the path parameter. Call getPromotions to retrieve the IDs of a seller's discounts.
The listing details are returned in a paginated set and you can control and results returned using the following query parameters: limit, offset, q, sort, and status.
- Maximum associated listings returned: 200
- Default number of listings 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 |
---|---|---|
promotion_id | string | This path parameter takes a concatenation of the ID of the discount associated with the listing set plus the marketplace ID on which the discount is hosted. Concatenate the two values by separating them with an "at sign" (@). The ID of the discount (promotionId) is a unique eBay-assigned value that's generated when the discount is created. The Marketplace ID is the ENUM value of eBay marketplace where the discount is hosted. Use the getPromotions method to retrieve promotion Ids. See MarketplaceIdEnum for supported Marketplace ID values. Example: 1********5@EBAY_US Occurrence: Required |
q | string | Reserved for future use. Occurrence: Optional |
limit | string | Specifies the maximum number of discounts returned on a page from the result set. Default: 200 Maximum: 200 Occurrence: Optional |
offset | string | Specifies 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 Default: 0 Occurrence: Optional |
sort | array of SortField | Specifies the order in which to sort the associated listings in the response. If you precede the supplied value with a dash, the response is sorted in reverse order. Example: sort=PRICE - Sorts the associated listings by their current price in ascending order sort=-TITLE - Sorts the associated listings by their title in descending alphabetical order (Z-Az-a) Valid values:
Occurrence: Optional |
status | ItemMarkdownStatusEnum | This query parameter applies only to markdown discounts. It filters the response based on the indicated status of the discount. Note: Currently, the only supported value for this parameter is MARKED_DOWN , which indicates active markdown discounts. 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
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 |
listings | array of ListingDetail | An array of the listings associated with a discount. Occurrence: Always |
listings.currentPrice | Amount | The container that returns the current price of the listing. Occurrence: Always |
listings.currentPrice.currency | CurrencyCodeEnum | The base currency applied to the value field to establish a monetary amount. Occurrence: Conditional |
listings.currentPrice.value | string | The monetary amount in the specified currency. Occurrence: Conditional |
listings.freeShipping | boolean | If set to Occurrence: Always |
listings.inventoryReferenceId | string | The seller's inventory reference ID for a listing. Also known as the "SKU" or "custom label," an inventory reference ID is either the ID of the listing or, if the listing has variations (such as a shirt that's available in multiple sizes and colors), the ID of the parent listing. Occurrence: Conditional |
listings.inventoryReferenceType | string | Indicates the type of the inventoryReferenceId, which can be either a single-SKU or a multi-SKU listing ( Occurrence: Conditional |
listings.listingCategoryId | string | The ID of the category that listing belongs to. The ID is a numeric and unique identifier for the category that is assigned by eBay. Occurrence: Conditional |
listings.listingCondition | string | An eBay-assigned value that indicates condition of the associated item. For more information, see Item condition ID and name values. Occurrence: Conditional |
listings.listingConditionId | string | The ID of the condition associated with the item. For more information, see Item condition ID and name values. Occurrence: Conditional |
listings.listingId | string | A unique eBay-assigned ID that is generated when the item is listed. Occurrence: Conditional |
listings.listingPromotionStatuses | array of ItemMarkdownStatus | A list of the status values assigned to the item and the date that each new status was assigned. Occurrence: Conditional |
listings.listingPromotionStatuses.listingMarkdownStatus | ItemMarkdownStatusEnum | Indicates the state assigned to the markdown discount using one of the status values. Occurrence: Conditional |
listings.listingPromotionStatuses.statusChangedDate | string | Identifies the date the last time the state of the discount changed. Both both markdown and markup events can trigger a status change. Occurrence: Conditional |
listings.listingPromotionStatuses.statusMessage | string | An eBay-assigned text string that describes the status of the discount. Occurrence: Conditional |
listings.quantity | integer | The number of items being sold in the listing. Occurrence: Conditional |
listings.storeCategoryId | string | Store CategoryId (if any) that to which the listing belongs. This field is blank if there is no seller Store category ID. Occurrence: Conditional |
listings.title | string | The seller-defined title of the listing that a seller can use to identify the item. This label is not displayed in end-user flows. 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 |
total | integer | The total number of items retrieved in the result set. Occurrence: Always |
warnings | array of ErrorDetailV3 | A list of warnings that were generated by the request. Warning do not stop processing, but should be checked to ensure that the response contains the correct information. Occurrence: Conditional |
warnings.category | string | The category type for this error or warning. It takes an ErrorCategory object which can have one of three values:
Occurrence: Conditional |
warnings.domain | string | Name of the domain containing the service or application. Occurrence: Conditional |
warnings.errorId | integer | A positive integer that uniquely identifies the specific error condition that occurred. Your application can use error codes as identifiers in your customized error-handling algorithms. Occurrence: Conditional |
warnings.inputRefIds | array of string | Identifies specific request elements associated with the error, if any. inputRefId's response is format specific. For JSON, use JSONPath notation. Occurrence: Conditional |
warnings.longMessage | string | An expanded version of message that should be around 100-200 characters long, but is not required to be such. Occurrence: Conditional |
warnings.message | string | An end user and app developer friendly device agnostic message. It explains what the error or warning is, and how to fix it (in a general sense). Its value is at most 50 characters long. If applicable, the value is localized in the end user's requested locale. Occurrence: Conditional |
warnings.outputRefIds | array of string | Identifies specific response elements associated with the error, if any. Path format is the same as Occurrence: Conditional |
warnings.parameters | array of ErrorParameterV3 | This optional complex field type contains a list of one or more context-specific Occurrence: Conditional |
warnings.parameters.name | string | Name of the entity that threw the error. Occurrence: Conditional |
warnings.parameters.value | string | A description of the error. Occurrence: Conditional |
warnings.subdomain | string | Name of the domain's subsystem or subdivision. For example, checkout is a subdomain in the buying domain. Occurrence: Conditional |
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 |
404 | Not Found |
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. |
38203 | API_MARKETING | REQUEST | Resource not found. Check the ID and try the call again. |
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. |
Warnings
For more on warnings, plus the codes of other common warnings, see Handling errors.
Code | Domain | Category | Meaning |
---|---|---|---|
345062 | API_MARKETING | REQUEST | Sort is not supported for this promotion type. For help, see the documentation for this call. |
345068 | API_MARKETING | REQUEST | The value of the 'Status' parameter is invalid. For help, see the documentation for this call. |
345069 | API_MARKETING | REQUEST | The 'Status' parameter is only supported for itemPriceMarkdownPromotions. For help, see the documentation for this call. |
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 Listings for Specific Discount
This sample returns a paginated collection of the listings associated with a specific discount.
Input
Specify the markdown discount for which you want to retrieve the listing set using the promotion ID concatenated with the marketplace ENUM as a URI query parameter. See the endpoint below for an example.
GEThttps://api.ebay.com/sell/marketing/v1/promotion/1********3@EBAY_US/get_listing_set
Output
The output is an array of the listings.