Skip to main content

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

GET https://api.ebay.com/sell/marketing/v1/promotion/{promotion_id}/get_listing_set?

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
promotion_idstringThis 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

qstringReserved for future use.

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

sortarray of SortFieldSpecifies 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:
  • AVAILABLE
  • PRICE
  • TITLE

Occurrence: Optional

statusItemMarkdownStatusEnumThis 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/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

listingsarray of ListingDetail

An array of the listings associated with a discount.

Occurrence: Always

listings.currentPriceAmount

The container that returns the current price of the listing.

Occurrence: Always

listings.currentPrice.currencyCurrencyCodeEnum

The base currency applied to the value field to establish a monetary amount.

The currency is represented as a 3-letter ISO 4217 currency code. For example, the code for the Canadian Dollar is CAD

Occurrence: Conditional

listings.currentPrice.valuestring

The monetary amount in the specified currency.

Required in the amount type.

Occurrence: Conditional

listings.freeShippingboolean

If set to true, the seller pays for the shipping (or that the item is marked for local pickup only) In this case, the listing does not have an associated shipping cost for the first listed domestic-shipping option (even if the first domestic-shipping option specifies a flat-rate or calculated shipping option). If false, the buyer is required to pay for a flat-rate or calculated cost shipping service.

Occurrence: Always

listings.inventoryReferenceIdstring

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

Indicates the type of the inventoryReferenceId, which can be either a single-SKU or a multi-SKU listing (INVENTORY_ITEM and INVENTORY_ITEM_GROUP, respectively).

Note: This value is not currently returned in the response.

Occurrence: Conditional

listings.listingCategoryIdstring

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

An eBay-assigned value that indicates condition of the associated item. For more information, see Item condition ID and name values.

Occurrence: Conditional

listings.listingConditionIdstring

The ID of the condition associated with the item. For more information, see Item condition ID and name values.

Note: This value is not currently returned in the response.

Occurrence: Conditional

listings.listingIdstring

A unique eBay-assigned ID that is generated when the item is listed.

Occurrence: Conditional

listings.listingPromotionStatusesarray 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.listingMarkdownStatusItemMarkdownStatusEnum

Indicates the state assigned to the markdown discount using one of the status values.

Occurrence: Conditional

listings.listingPromotionStatuses.statusChangedDatestring

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

An eBay-assigned text string that describes the status of the discount.

Occurrence: Conditional

listings.quantityinteger

The number of items being sold in the listing.

Occurrence: Conditional

listings.storeCategoryIdstring

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

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

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

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

warningsarray 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.categorystring

The category type for this error or warning. It takes an ErrorCategory object which can have one of three values:

  • Application: Indicates an exception or error occurred in the application code or at runtime. Examples include catching an exception in a service's business logic, system failures, or request errors from a dependency.
  • Business: Used when your service or a dependent service refused to continue processing on the resource because of a business rule violation such as "Seller does not ship item to Antarctica" or "Buyer ineligible to purchase an alcoholic item". Business errors are not syntactical input errors.
  • Request: Used when there is anything wrong with the request, such as authentication, syntactical errors, rate limiting or missing headers, bad HTTP header values, and so on.

Occurrence: Conditional

warnings.domainstring

Name of the domain containing the service or application.

Occurrence: Conditional

warnings.errorIdinteger

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.inputRefIdsarray 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.longMessagestring

An expanded version of message that should be around 100-200 characters long, but is not required to be such.

Occurrence: Conditional

warnings.messagestring

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.outputRefIdsarray of string

Identifies specific response elements associated with the error, if any. Path format is the same as inputRefId.

Occurrence: Conditional

warnings.parametersarray of ErrorParameterV3

This optional complex field type contains a list of one or more context-specific ErrorParameter objects, with each item in the list entry being a parameter (or input field name) that caused an error condition. Each ErrorParameter object consists of two fields, a name and a value.

Occurrence: Conditional

warnings.parameters.namestring

Name of the entity that threw the error.

Occurrence: Conditional

warnings.parameters.valuestring

A description of the error.

Occurrence: Conditional

warnings.subdomainstring

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.

StatusMeaning
200Success
400Bad Request
404Not Found
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.
38203API_MARKETINGREQUESTResource not found. Check the ID and try the call again.
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.

Warnings

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

CodeDomainCategoryMeaning
345062API_MARKETINGREQUESTSort is not supported for this promotion type. For help, see the documentation for this call.
345068API_MARKETINGREQUESTThe value of the 'Status' parameter is invalid. For help, see the documentation for this call.
345069API_MARKETINGREQUESTThe '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.