Skip to main content

Note: The sandbox environment is not available for the upload method specifying either Seller Hub feedTypes. Use care when using the production environment. To test input files without sending them to eBay as active listings, use the Draft Action (Create new drafts template).

Before you start using the Sell Feed API, make sure to:

  • Create an eBay developer account (if you haven’t already). You will also need to Create the eBay API keysets.

  • Set up OAuth access tokens. All eBay REST APIs use the OAuth 2.0 protocol for application and user authorization. Before you can begin to use the Feed API, you must generate these OAuth tokens. This authorization stays active for two hours but can be regenerated using Refresh Token. This is a Bearer Token and is needed for all the operations in the Feed API.

  • Prepare your input file. Use a template applicable for your task. See the Learning Resources link on your Seller Hub Reports page: https://www.ebay.com/sh/resources/reports

    Templates are configured and downloaded using the Seller Hub Reports Uploads section. Videos and documentation on using these templates is covered in the Seller Hub Reports Learning Resources section.

There are four basic steps in uploading a Seller Hub feed type data file to eBay:

  1. Create an upload task.

    Use the createTask method to create an upload task. When creating the task for the Seller Hub feed types, keep the following in mind:

    • OAuth tokens are passed in through the Authorization header: Authorization:Bearer <token>

    • See the MarketplaceIdEnum for marketplaces supported by Seller Hub feed types.

    • Request payload:

      • feedType (FX_LISTING and FX_FULFILLMENT) are described in Available feed types

      • schemaVersion: Use the schema version value of "1.0".

    • Sellers can create multiple tasks at a time.

    • The taskId returned in the createTask call is used in the in the uploadfile call.

  2. Upload a data file.

    Use the uploadFile method to upload an input Seller Hub feed file. When uploading the Seller Hub feed file, keep the following in mind:

    • The input file can be a compressed or an uncompressed CSV file (both are allowed). For templates, see the Learning Resources link on your Seller Hub Reports page: https://www.ebay.com/sh/resources/reports

    • Use the file's fileName including extension, set name to file, and type to form‑data

  3. Check the task status.

    Use the getTask or getTasks methods to find out the status of one or more jobs. Keep the following in mind:

    • The Feed API does not provide the input file/output file information, but does provide the task's status.

    • The Feed API response provides a detail that contains the number of records successfully processed and the number of failed. It is available under uploadSummary. For failed requests, proceed to the next step and download the results file (the file contains any issues or errors).

    • Iterate until a response of COMPLETED or COMPLETED_WITH_ERROR is returned.

    • Use the getTasks endpoint to retrieve information about multiple jobs within a given time span.

    • When checking the status of a task, refer to FeedStatusEnum for the possible status values.

  4. Download the result file.

    When the task status is complete, download the result file using taskId and the getResultFile method. Only taskId is required for this operation.

    The task can either be completely successful, partially successful (for example, some listings were created and others failed), or the task can completely fail.

    Failed tasks include error messages and codes. If any issues or errors are present, learn about them from the downloaded results file from the getResultFile call. Refer to Errors for information about errors. Make edits to your request's failed objects, remove any successful objects, and then re-upload.

    Note: Separate endpoints for input and output files are used. Use the getInputFile method to return the file that was uploaded.

     

    Note: The number of records successfully processed and the number of failed is available under uploadSummary of the associated getTask call.

Reusing a data file

Use the Feed API getInputFile method to download a file previously uploaded using uploadFile (useful if you want to revise a group of listings that were previously added or revised).