Home
POST/task/{task_id}/upload_file
This method associates the specified file with the specified task ID and uploads the input file. After the file has been uploaded, the processing of the file begins.
Reports often take time to generate and it's common for this method to return an HTTP status of 202, which indicates the report is being generated. Use the getTask with the task ID or getTasks to determine the status of a report.
The status flow is QUEUED
> IN_PROCESS
> COMPLETED
or COMPLETED_WITH_ERROR
. When the status is COMPLETED
or COMPLETED_WITH_ERROR
, this indicates the file has been processed and the order report can be downloaded. If there are errors, they will be indicated in the report file.
For details of how this method is used in the upload flow, see Working with Order Feeds in the Selling Integration Guide.
Note: This method applies to all Seller Hub feed types and LMS feed types except LMS_ORDER_REPORT
and LMS_ACTIVE_INVENTORY_REPORT
. See LMS feed types and Seller Hub feed types.
Note: You must use a Content-Type header with its value set to "multipart/form-data". See Samples for information.
This method is supported in Sandbox environment. To access the endpoint, just replace the api.ebay.com
root URI with api.sandbox.ebay.com
All requests made to eBay REST operations require you to provide the Authorization
HTTP header for authentication authorization.
In addition, this method requires you to include the Content-Type header and its value should be set to "multipart/form-data". See HTTP request headers- opens rest request components page for details.
This request requires an access token created with the authorization code 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/sell.inventory
https://api.ebay.com/oauth/api_scope/sell.fulfillment
https://api.ebay.com/oauth/api_scope/sell.marketing
https://api.ebay.com/oauth/api_scope/commerce.catalog.readonly
https://api.ebay.com/oauth/api_scope/sell.analytics.readonly
See OAuth access tokens for more information.
This call does not have a Request payload.
This call does not have Request fields (no payload).
Input container/field | Type | Description |
---|---|---|
creationDate | string | The file creation date. For example: Created on September 8, 2019
Occurrence: Optional |
fileName | string | The name of the file including its extension (for example, xml or csv) to be uploaded. Occurrence: Required |
modificationDate | string | The file modified date. For example: Created on September 9, 2019
Occurrence: Optional |
name | string | A content identifier. The only presently supported name is Occurrence: Required |
parameters | object | The parameters you want associated with the file. Occurrence: Optional |
readDate | string | The date you read the file. For example: Created on September 10, 2019
Occurrence: Optional |
size | integer | The size of the file. Occurrence: Optional |
type | string | The file type. The only presently supported type is Occurrence: Required |
This call has no response headers.
This call has no payload.
This call has no field definitions.
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.
Status | Meaning |
---|---|
200 | Success |
400 | Bad Request |
403 | Forbidden |
404 | Not Found |
500 | Internal Server Error |
Note: Error Code 160001 may indicate that the payload was not found. Make sure your file is uploaded with the form data key-value pair name: "file". For additional information, see name.
For more on errors, plus the codes of other common errors, see Handling errors.
Code | Domain | Category | Meaning |
---|---|---|---|
160001 | API_FEED | APPLICATION | There was a problem with an eBay internal system or process. Contact eBay Developer Technical Support for assistance. |
160002 | API_FEED | REQUEST | The authentication scope {scope} is incorrect for 'feed_type' {feedType}. Refer to documentation for details about the scopes. |
160003 | API_FEED | REQUEST | Task {taskID} does not exist. |
160020 | API_FEED | REQUEST | The format of the file to be uploaded is invalid. {additionalInfo} |
160023 | API_FEED | REQUEST | Task {taskID} cannot upload a file. |
160026 | API_FEED | REQUEST | This task has expired and you cannot use it to upload a file. You must upload a file within a hour of creating the task. |
160028 | API_FEED | REQUEST | The file you tried to upload is too large. Please try using a smaller file. For more information, see the documentation for this API. |
160100 | API_FEED | REQUEST | Payload not found. Make sure your file is uploaded inside the Request Body under the key name 'file'. |
This call has no warnings.
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.
This call uploads the file associated with the specified task passed in as a path parameter. Upload the file using a Content-Type header with its value set to "multipart/form-data".
There is no request payload. The input is the task ID task-1******9
as a URI parameter.
POSThttps://api.ebay.com/sell/feed/v1/task/task-1******9/upload_file
A successful call returns an HTTP status code of 200 OK
. This method has no response payload.