Skip to main content

GET/item_priority

Using this method, you can download a TSV_GZIP (tab separated value gzip) Item Priority feed file, which allows you to track changes (deltas) in the status of your priority items, such as when an item is added or removed from a campaign. The delta feed tracks the changes to the status of items within a category you specify in the input URI. You can also specify a specific date for the feed you want returned.

Important! You must consume the daily feeds (Item, Item Group) before consuming the Item Priority feed. This ensures that your inventory is up to date.


Note: The downloaded file will be gzipped automatically, so there is no reason to supply Accept-Encoding:gzip as a header. If this header is supplied, the downloaded file will be compressed twice, and this has no extra benefit.

Downloading feed files

Note: Filters are applied to the feed files. For details, see Feed File Filters. When curating the items returned, be sure to code as if these filters are not applied as they can be changed or removed in the future.
Priority Item feed files are binary gzip files. If the file is larger than 100 MB, the download must be streamed in chunks. You specify the size of the chunks in bytes using the Range request header. The Content-range response header indicates where in the full resource this partial chunk of data belongs and the total number of bytes in the file. For more information about using these headers, see Retrieve a gzip feed file.

In addition to the API, there is an open source Feed SDK written in Java that downloads, combines files into a single file when needed, and unzips the entire feed file. It also lets you specify field filters to curate the items in the file.

Note: A successful call will always return a TSV.GZIP file; however, unsuccessful calls generate errors that are returned in JSON format. For documentation purposes, the successful call response is shown below as JSON fields so that the value returned in each column can be explained. The order of the response fields shows the order of the columns in the feed file.

Restrictions

For a list of supported sites and other restrictions, see API Restrictions.

Input

Resource URI

GET https://api.ebay.com/buy/feed/v1_beta/item_priority?

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
category_idstringThis query parameter specifies the eBay top-level category ID of the items to be returned in the feed file.

The list of eBay category IDs changes over time and category IDs are not the same across all the eBay marketplaces. To get a list of the top-level categories for a marketplaces, you can use the Taxonomy API getCategoryTree method. This method retrieves the complete category tree for the marketplace. The top-level categories are identified by the categoryTreeNodeLevel field.

For example:
  "categoryTreeNodeLevel": 1

For details see Get the eBay categories of a marketplace.

Restriction: Must be a top-level category other than Real Estate. Items listed under Real Estate L1 categories are excluded from all feeds in all marketplaces.

Occurrence: Required

datestringThis query parameter specifies the date of the feed you want returned.

This can be up to 14 days in the past but cannot be set to a date in the future.

Format: yyyyMMdd

Note: The daily Item feed files are available each day after 9AM MST (US Mountain Standard Time), which is -7 hours UTC time.

There is a 48 hour latency when generating the Item feed files. This means you can download the file for July 10th on July 12 after 9AM MST.

For categories with a large number of items, the latency can be up to 72 hours.

Occurrence: Required

HTTP request headers

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

The table below shows additional HTTP request headers that are either required, conditionally required, or strongly recommended for this method. Other standard HTTP request headers- opens rest request components page (not in this table) can also be used, but they are optional.

HeaderTypeDescription
AcceptstringThe formats that the client accepts for the response.

A successful call will always return a TSV.GZIP file; however, unsuccessful calls generate error codes that are returned in JSON format.

Default: application/json,text/tab-separated-values

Occurrence: Required

X-EBAY-C-MARKETPLACE-IDstringThe ID of the eBay marketplace where the item is hosted. This value is case sensitive.

For example:
  X-EBAY-C-MARKETPLACE-ID = EBAY_US

For a list of supported sites see, Buy API Support by Marketplace.

Occurrence: Required

RangestringHeader specifying content range to be retrieved. Only supported range is bytes.

Example : bytes = 0-102400.

Occurrence: Required

OAuth scope

This request requires an access token created with the client credentials 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/buy.item.feed

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

See HTTP response headers for details.

HeaderMeaning
Content-rangeThe content range for the current request. Typically in the format : 0-100/1000 where 0-100 is the content length of the current response and 1000 is the total content length. In case of a 416 status code, content-range would be */1000, which denotes an invalid range header.
Last-ModifiedSignifies the date when the files are generated. For example : Last-Modified: Wed, 21 Oct 2015 07:28:00 GMT.

Response payload

Important: The successful response of this call is always a TSV_GZIP file. However, the response is shown as JSON fields for each column so that the value returned in each column can be explained. The order in which the response fields are listed is the order of the columns in the feed file.

Response fields

Output container/fieldTypeDescription
itemDeltaarray of ItemPriority

The container for the array of items returned by the getItemPriorityFeed method. The data in the file is tab separated and the first row is the header, which labels the columns and indicates the order of the values on each line. The header labels match the fields that are described in the Response fields section.

Occurrence: Always

itemDelta.itemIdstring

The unique identifier of an item in eBay RESTful format. An example would be v1|1********2|4********2.

Occurrence: Always

itemDelta.priorityListingPayloadstring

EPN (eBay Partner Network) publishers append this value to their affiliate tracking URL when using an EPN tracking link to track changes that occur to Priority Listing items.

Example:_trkparms=ispr%3D1&amdata=enc%3AAQAFAAAAkB1DmsmXf%2BqZ%2BCEMGdebW6oR75GCMdBmc4MCQ%2FCEPqgKHbT0jdWhPwfY5LdUs6HTaP0eBlwKE7Smy2eDslewF7l3xjwWxjqwzNAnsYgxn2PiGkTKbiQSQytFUiymdtANpk1qOnBOoMGMK%2BWsji7jYlvySSs9o9s24TxD6RqWZpNrltzOU7mfnv3H40SZ3YESzg%3D%3D

See Creating an EPN Tracking Link for information on EPN tracking links.

Occurrence: Conditional

itemDelta.changeMetadatastring

Status change indicator of the listing.

Values:

  • ADDED_TO_CAMPAIGN
  • REMOVED_FROM_CAMPAIGN
  • TRACKING_PAYLOAD_REFRESHED
Note: When a listing is removed from the campaign, PriorityListingPayload will be empty.

When multiple status changes are returned for a listing, the changeMetadata value will be a pipe-separated string (e.g., ADDED_TO_CAMPAIGN|TRACKING_PAYLOAD_REFRESHED).

To use the returned value, you will need to separate the string by pipe (|).

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
204No Content
206Partial Content
400Bad request
403Forbidden
404Not found
416Range not satisfiable
500Internal server error

Error codes

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

CodeDomainCategoryMeaning
13000API_FEEDREQUESTThe request contains data that is invalid. Correct the request and submit the call again. For help, see the API Reference documentation for this call.
13004API_FEEDREQUESTThe 'category_id' {category_id} submitted is invalid. See the API documentation for help on how to find category IDs.
13005API_FEEDREQUESTThe 'date' {feedDate} submitted is invalid. Either the date format is wrong, or the files are not available for the specific date. Valid values: {earliestDate} to {latestDate} in the past. The format is yyyyMMdd.
13006API_FEEDAPPLICATIONThere was a problem with an eBay internal system or process. Wait a few minutes and retry the call. If that doesn't work, contact eBay Support.
13007API_FEEDREQUESTThe feed file requested cannot be found. It is possible the file requested is in the process of being generated. Either change the date or try the call again later.
13010API_FEEDREQUESTThe mandatory 'category_id' query parameter is missing.
13011API_FEEDREQUESTThe mandatory 'date' query parameter is missing. Valid values: {earliestDate} to {latestDate} days in the past. The format is yyyyMMdd.
13012API_FEEDREQUESTThe marketplace Id {marketplaceId} is invalid. Valid values: {allowedMarketplaces}
13013API_FEEDREQUESTThe mandatory 'X-EBAY-C-MARKETPLACE-ID' header is missing. Valid values: {allowedMarketplaces}
13014API_FEEDREQUESTThe marketplace Id {marketplaceId} is not supported. Valid values: {allowedMarketplaces}
13015API_FEEDREQUESTThe mandatory 'Range' request header is missing. For help, see the API Reference documentation for this call.
13016API_FEEDREQUESTThe 'Range' request header format is invalid. Format: 'bytes=start position-end position'. For help, see the API Reference documentation for this call.
13017API_FEEDREQUESTThe 'Range' header is invalid. Please verify that the start and end positions are correct. For help, see the API Reference documentation for this call.
13018API_FEEDREQUESTThe start position in the range header is invalid.
13019API_FEEDREQUESTThe end position in the range header is invalid.
13022API_FEEDREQUESTThe 'category_id' {category_id} submitted is not supported.
13023API_FEEDBUSINESSInsufficient permissions to access this API for the marketplace {marketplaceId}. Please contact eBay Technical support for further assistance.
13024API_FEEDBUSINESSInsufficient permissions to access this API for the category {category_id}. Please contact eBay Technical support for further assistance.

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: Download a Priority Item Feed File

This sample returns a GZIP file with the priority items in the Cameras & Photo category whose statuses changed on July 18, 2021. In this example, the size of the file being returned is 142MB (148897792 bytes) and the request Range header specifies to return the first 10MB (10485760 bytes).

Input

The inputs are a category_id of 625 (Cameras & Photo) and a date in the format yyyyMMdd.

The request parameters are: Range bytes=0-10485760 and X-EBAY-C-MARKETPLACE-ID EBAY_US. For more information about using these headers, see HTTP request headers.

GEThttps://api.ebay.com/buy/feed/v1_beta/item_priority?category_id=625&date=20210718

Output

If the call is successful, the portion of the Item Priority feed file specified by the Range header is returned.

The call returns a 206 HTTP status and the Content-range bytes=0-10485760/148897792 response header.

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