marketing APIv1.10.0

getListingSet

GET
/promotion/{promotion_id}/get_listing_set

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

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 (production)

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

URI parameters

ParameterTypeDescription
promotion_idstringThis path parameter takes a concatenation of the ID of the promotion you want to get plus the marketplace ID on which the promotion is hosted. Concatenate the two values by separating them with an "at sign" (@).

The ID of the promotion (promotionId) is a unique eBay-assigned value that's generated when the promotion is created. The Marketplace ID is the ENUM value of eBay marketplace where the promotion is hosted.

Example: 1********5@EBAY_US

Occurrence: Required

qstringReserved for future use.

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

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 promotions. It filters the response based on the indicated status of the promotion. Currently, the only supported value for this parameter is MARKED_DOWN, which indicates active markdown promotions.

Occurrence: Optional

HTTP request headers

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

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.

Output

HTTP response headers

Output container/fieldTypeDescription
hrefstringThe URI of the current page of results from the result set.

Occurrence: Always

limitintegerThe 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 ListingDetailAn array of the listings associated with a promotion.

Occurrence: Always

listings.currentPriceAmountThe container that returns the current price of the listing.

Occurrence: Always

listings.currentPrice.currencyCurrencyCodeEnumThe 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.

Default: The default currency of the eBay marketplace that hosts the listing.

Occurrence: Conditional

listings.currentPrice.valuestringThe monetary amount in the specified currency.

Required in the amount type.

Occurrence: Conditional

listings.freeShippingbooleanIf 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.inventoryReferenceIdstringThe 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.inventoryReferenceTypestringIndicates the type of the inventoryReferenceId, which can be either an individual item or a multi-SKU item (INVENTORY_ITEM and INVENTORY_ITEM_GROUP, respectively).

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

Occurrence: Conditional

listings.listingCategoryIdstringThe 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.listingConditionstringAn eBay-assigned value that indicates condition of the associated item. For more information, see Item condition ID and name values.

Note: As of September 1, 2021, condition ID 2500 ('Seller Refurbished') is no longer a valid item condition in the Cell Phones & Smartphones category (category ID 9355) for the following marketplaces: US, Canada, UK, Germany, and Australia. This refurbished item condition has been replaced by three new refurbished values, which include 'Excellent - Refurbished' (condition ID 2010), 'Very Good - Refurbished' (condition ID 2020), and 'Good - Refurbished' (condition ID 2030).

Note: In all eBay marketplaces, Condition ID 2000 now maps to an item condition of 'Certified - Refurbished', and not 'Manufacturer Refurbished'. To list an item as 'Certified Refurbished', a seller must be pre-qualified by eBay for this feature.

Occurrence: Conditional

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

Note: As of September 1, 2021, condition ID 2500 ('Seller Refurbished') is no longer a valid item condition in the Cell Phones & Smartphones category (category ID 9355) for the following marketplaces: US, Canada, UK, Germany, and Australia. This refurbished item condition has been replaced by three new refurbished values, which include 'Excellent - Refurbished' (condition ID 2010), 'Very Good - Refurbished' (condition ID 2020), and 'Good - Refurbished' (condition ID 2030).

Note: In all eBay marketplaces, Condition ID 2000 now maps to an item condition of 'Certified - Refurbished', and not 'Manufacturer Refurbished'. To list an item as 'Certified Refurbished', a seller must be pre-qualified by eBay for this feature.
Note: This value is not currently returned in the response.

Occurrence: Conditional

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

Occurrence: Conditional

listings.listingPromotionStatusesarray of ItemMarkdownStatusA list of the status values assigned to the item and the date that each new status was assigned.

Occurrence: Conditional

listings.listingPromotionStatuses.listingMarkdownStatusItemMarkdownStatusEnumIndicates the state assigned to the markdown promotion using one of the status values.

Occurrence: Conditional

listings.listingPromotionStatuses.statusChangedDatestringIdentifies the date the last time the state of the promotion changed. Both both markdown and markup events can trigger a status change.

Occurrence: Conditional

listings.listingPromotionStatuses.statusMessagestringAn eBay-assigned text string that describes the status of the promotion.

Occurrence: Conditional

listings.quantityintegerThe number of items being sold in the listing.

Occurrence: Conditional

listings.storeCategoryIdstringStore CategoryId (if any) that to which the listing belongs. This field is blank if there is no seller Store category ID.

Occurrence: Conditional

listings.titlestringThe 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

nextstringThe 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

offsetintegerThe 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

prevstringThe 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

totalintegerThe 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 ErrorDetailV3A 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.categorystringThe category type for this error or warning. This field 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 items 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.domainstringThe name of the primary system where the error occurred. This is relevant for application errors.

Occurrence: Conditional

warnings.errorIdintegerA 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 stringAn array of reference IDs that identify the specific request elements most closely associated to the error or warning, if any. For JSON, use JSONPath notation.

Occurrence: Conditional

warnings.longMessagestringA detailed description of the condition that caused the error or warning and information on what to do to correct the problem. The string is normally 100-200 characters in length, but is not required to be such.

Occurrence: Conditional

warnings.messagestringA short description of the condition that caused the error or warning. This value is at most 50 characters long and, if applicable, is localized in the end user's requested locale.

Occurrence: Conditional

warnings.outputRefIdsarray of stringAn array of reference IDs that identify the specific response elements most closely associated to the error or warning, if any. The path format is the same as inputRefId.

Occurrence: Conditional

warnings.parametersarray of ErrorParameterV3An array that contains contextual information about the error or warning. The list often includes the parameter or input fields that triggered the warning or error condition.

Occurrence: Conditional

warnings.parameters.namestringName of the entity that threw the error.

Occurrence: Conditional

warnings.parameters.valuestringThe value that was set for the element specified in the name field.

Occurrence: Conditional

warnings.subdomainstringThe name of the subdomain in which the error or warning occurred. For example, checkout is a subdomain in the buying domain.

Occurrence: NA

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
204Success
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 Promotion

This sample returns a paginated collection of the listings associated with a specific promotion.

Input

Specify the markdown promotion 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.
GET
https://api.ebay.com/sell/marketing/v1/promotion/1********3@EBAY_US/get_listing_set

Output

The output is an array of the listings.