Whether you represent a merchant who has many items on eBay, or whether you are uploading inventory for the first time, you will eventually need to upload item data, revise item data, and download status or reports about your listings. This topic explains how to use the Sell Feed API with LMS feed types including upload flows, including how to create a data file to upload items and tracking inventory by SKU, and download flows.

Note: Request and response feeds are retained and available for a limited duration. See File retention for details.

Upload flows

Uploading Trading API-related files allow sellers to add, revise, relist, verify, or end listings in bulk. See the Inventory upload feed types flow for this use.

Additionally, you can upload a file to:

  • Acknowledge that an order, or orders, has been received and remove the order from the order report (LMS_ORDER_ACK | OrderAck)

  • Remove a single order line item from a multiple line item order (LMS_ORDER_ACK | OrderAck)

  • Specify the shipment tracking information associated with one package of an order, or to mark an order as paid or shipped (LMS_SET_SHIPMENT_TRACKING_INFO | SetShipmentTrackingInfo)

See the Fulfillment upload feed types flow for these uses.

When using the Sell Feed API with LMS feed types in this flow, prepare all objects within the same XML-based data file, and then upload the file using the uploadFile method. In this way, you can create, modify, or end listings in bulk, acknowledge order or order line items in bulk, or provide shipment tracking information in bulk.

Create the data file

The following steps outlines creation of the data file. For additional information, see the topic titled XML data files overview.

  1. Create an XML data file that includes the XML declaration.

  2. Add opening and closing tags for the BulkDataExchangeRequests root node.

    Important! long text/string values. Pretty-printing is one way of inserting the necessary line breaks to prevent excessive line lengths. There are many utilities or code libraries that support pretty-printing XML. After adding the needed line breaks, resubmit the failed uploadFile request.

    Important! Upload feed types that you can use are contained in Inventory upload feed types and Fulfillment upload feed types. You can use one or more instances of only one type of call in each file you upload. For instance, you cannot use the same file to add some items (using AddFixedPriceItem calls) and revise some items (using ReviseFixedPriceItem calls) in the same file. The Example data file call code snippet shows the format of a request to revise inventory using a XML data file with the ReviseInventoryStatusRequest feed type.

Example data file call

Make sure the input XML file is in the correct format. See XML data files overview for more information. The following example illustrates a ReviseInventoryStatusRequest data file with two request objects:

<?xml version="1.0" encoding="UTF-8"?>
<BulkDataExchangeRequests>
    <ReviseInventoryStatusRequest xmlns="urn:ebay:apis:eBLBaseComponents">
        <ErrorLanguage>en_US</ErrorLanguage>
        <WarningLevel>High</WarningLevel>
        <Version>1235</Version>
        <InventoryStatus>
            <ItemID>3**********3</ItemID>
            <StartPrice>190.00</StartPrice>
            <Quantity>15</Quantity>
        </InventoryStatus>
    </ReviseInventoryStatusRequest>
    <ReviseInventoryStatusRequest xmlns="urn:ebay:apis:eBLBaseComponents">
        <ErrorLanguage>en_US</ErrorLanguage>
        <WarningLevel>High</WarningLevel>
        <Version>1235</Version>
        <InventoryStatus>
            <ItemID>4**********4</ItemID>
            <StartPrice>200.00</StartPrice>
            <Quantity>20</Quantity>
        </InventoryStatus>
    </ReviseInventoryStatusRequest>
    <!-- ... More ReviseInventoryStatusRequest nodes here ... -->
</BulkDataExchangeRequests>

Refer to the Inventory upload feed types or the Fulfillment upload feed types for Feed Types API calls and the associated inputs and outputs for each. There is a Merchant Data XSD file that can be used to validate your data file payloads or to stub out code. See Data file schema for more information.

Upload the file

Upload your XML file using the uploadFile method. This method does not use a JSON payload, but uploads files using multipart form data with information about the form data provided by key-value pairs. The following table contains descriptions of the available keys.

Form data key and value description
Key Type Description
creationDate string The file creation date.
Format: UTC yyyy-MM-ddThh:mm:ss.SSSZ
For example, to indicate creation on March 8, 2024:
creationDate: "2024-03-08T00:00:00.000Z"
Occurrence: Optional
file string File data.
For example, to specify a local file:
file: @"/C:/Users/.../AddFixedPriceItem_Macbook.7z"
Occurrence: Required
fileName string The name of the file including its extension (for example, xml or csv) to be uploaded.
For example:
fileName: "AddFixedPriceItem_Macbook.xml"
Occurrence: Required
modificationDate string The file modified date.
Format: UTC yyyy-MM-ddThh:mm:ss.SSSZ
For example, to indicate modification on March 9, 2024:
modificationDate: "2024-03-09T00:00:00.000Z"
Occurrence: Optional
name string A content identifier. The only presently supported name is file.
For example:
name: file
Occurrence: Required
parameters object The parameters you want associated with the file.
Occurrence: Optional
readDate string The date you read the file.
Format: UTC yyyy-MM-ddThh:mm:ss.SSSZ
For example: to indicate read on March 10, 2024:
readDate: "2024-03-10T00:00:00.000Z"
Occurrence: Optional
size integer The size of the file.
Occurrence: Optional
type string The file type. The only presently supported type is form-data.
For example:
type: form-data
Occurrence: Required

Using other APIs to complete your selling solution

When preparing your data file, you may need to make API calls outside of the Sell Feed API. For example, you may need to use the Trading GeteBayDetails call to determine the available shipping methods, or the Taxonomy API to determine the category ID and aspects of items you are adding using a data file.

AddItem call family

Since AddFixedPriceItem, ReviseFixedPriceItem, and RelistFixedPriceItem requests, as well as AddItem, ReviseItem, and RelistItem requests, are based on the eBay Trading APIs. You may want to make some of these Trading API calls using the API Explorer on the eBay Developer Program website, especially if you are not familiar with these calls. This allows you to get more familiar with the request and response data for the calls. You can make all calls in the Inventory upload feed types flow using the API Explorer. See Use the API Explorer to try out APIs for more information.

Note: You cannot use the API Explorer to make calls in the Fulfillment upload feed types flow or the Report download feed types flow.

Download flows

This flow downloads a Merchant Data XML returning an Order report or an Active inventory report. See Report download feed types flow for this use.