The basic use of the Sell Feed API includes creating tasks, getting task status and information, uploading files, and getting files or reports. The following outlines the basic General Sell API Tasks to use these methods. For detailed information, see Working with Order Feeds and Customer Service Metrics Report.
Note: The location response header for the create task contains the URL to the task. Use this URL to call methods associated with the applicable create task call.
Note: Request and response feeds are retained and available for a limited duration. See File retention for details.
Creating tasks
Use a POST call to create a task using the method associated with the resource. Some create tasks require you to specify filter criteria (like createCustomerServiceMetricTask or createOrderTask), and some do not (like createTask). The POST call to createSchedule has filter criteria specified from the schedule template sent in its request payload.
The location response header contains the GET call URI used to retrieve the created task with the applicable method (such as getTask, getOrderTask, getCustomerServiceMetricTask, or getSchedule). The eBay-assigned task ID is passed in as a path parameter to identify the task to retrieve. Depending on the type of feed/report that will be uploaded/downloaded, you can also provide filter criteria in the request payload of the method to customize the report.
Retrieving tasks
Use a GET call to check the status of a created task. For example, call the getTask method to return the status of a tasks created with the createTask method. When a status of COMPLETED
or
COMPLETED_WITH_ERROR
is returned, the file has been processed and you can proceed with the next task (the file can be uploaded or downloaded). Send the created eBay-assigned task ID when calling the method.
To check the status of multiple tasks, use a getTasks method with date filters and/or tasks associated with a specific feed type. You can limit the tasks returned by using or adjusting URI filters such as date_range or look_back_days.
In similar fashions, retrieve the status of createCustomerServiceMetricTask/s or createOrderTask/s calls using their associated get methods. For example, to check the status of a created Order Task, call the getOrderTasks method with the task ID returned from the createOrderTask method passed in as a path parameter.
Downloading a report
To download a report, use a GET call. Download a report by calling the getResultFile method with the task ID passed in as a path parameter.
Uploading an input file
You can acknowledge the orders that you have already fulfilled by uploading a file. To upload a file, use POST calls. First, create an upload task using the createTask method for the feedType LMS_ORDER_ACK
. After this task has been created (when the returned status is CREATED
), you can upload the acknowledgment file. Upload the acknowledgment file by calling the uploadFile method with the task ID passed in as a path parameter.
Retrieving an input file
Use a GET call to retrieve a file that has been uploaded using uploadFile. Download the file by calling the getResultFile method with the task ID passed in as a path parameter.