Skip to main content

GET/file/{file_id}/download

Use the downloadFile method to download a selected TSV_gzip feed file.

Use the getFiles methods to obtain the file_id of the specific feed file you require.

Downloading feed files

The feed files are binary gzip files. If the file is larger than 200 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 Retrieving a GZIP feed file.

Input

Resource URI (production)

GET https://api.ebay.com/buy/feed/v1/file/{file_id}/download

URI parameters

ParameterTypeDescription
file_idstringThe unique identifier of the feed file that you wish to download. Use the getFiles method to obtain the fileId value for the desired feed file.

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
X-EBAY-C-MARKETPLACE-IDstringThis is the ID of the eBay marketplace that the feed file belongs to.

Example:X-EBAY-C-MARKETPLACE-ID: EBAY_US.

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

Occurrence: Required

RangestringIndicates where in the full resource this partial chunk of data belongs and the total number of bytes in the file.

Example: bytes=0-102400.

For more information about using this header, see Retrieving a gzip feed file.

Occurrence: Strongly Recommended

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

This call has no response headers.

Response payload

Important: The successful response of this call is always a TSV_GZIP file. There is no JSON response payload.

The fields returned in the file will vary according to the feed type. Refer to Supported feed types to learn about the feed fields that are included in each supported feed type.

This call has no payload.

Response fields

This call has no field definitions.

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
200OK
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
13006API_FEEDAPPLICATIONThere was a problem with an eBay internal system or process. Contact eBay developer support for assistance.
13014API_FEEDREQUESTInvalid or missing header X-EBAY-C-MARKETPLACE-ID.
13015API_FEEDREQUESTRange header is required for file size greater than {allowedLength} bytes.
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, 'range start-range end' does not exceed the allowed maximum of {allowedLength} bytes and is consistent with the file size.
14004API_FEEDREQUESTThe specified file Id does not exist for marketplace specified or may have expired. Please check the maximum allowed look back for the feed type and scope.
14007API_FEEDREQUESTInsufficient permissions to download this file. Please check oauth scopes required for this feed type and buy/feed/v1/access for access constraints.
14009API_FEEDREQUESTInsufficient permissions for the feed type for the specified marketplace. 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 Feed File

Returns a specified TSV_GZIP file.

Input

The desired file, test_feedapi_file.gzip, is specified in the URI. The file name is obtained using the getFiles method.

GEThttps://api.ebay.com/buy/feed/v1/file/test_feedapi_file.gzip/download

Output

There is no payload, but a successful call will return an HTTP status code of 200, OK along with the downloaded TSV_GZIP file corresponding to the provided file_id. The contents of the GZIP file will vary according to feed type.

Note: Refer to Supported feed types to learn about the feed fields that are included in each supported feed type.