feed APIv1.1.0

uploadFile

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.

Note: This method only applies to LMS_ORDER_ACK.

For details of how this method is used in the upload flow, see Working with Order Feeds in the Selling Integration Guide.

Input

Resource URI (production)

POST https://api.ebay.com/sell/feed/v1/task/{task_id}/upload_file

URI parameters

ParameterTypeDescription
task_idstringThe task_id associated with the file that will be uploaded. This ID was generated when the specified task was created.

Occurrence: Required

HTTP request headers

All requests made to eBay REST operations require you to provide the Authorization HTTP header for authentication authorization.

OAuth scope

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.

Input container/fieldTypeDescription
creationDatestringThe file creation date.

Format: UTC yyyy-MM-ddThh:mm:ss.SSSZ

For example:

Created on September 8, 2019

2019-09-08T00:00:00.000Z

Occurrence: Optional

fileNamestringThe name of the file including its extension (for example, xml or csv) to be uploaded.

Occurrence: Required

modificationDatestringThe file modified date.

Format: UTC yyyy-MM-ddThh:mm:ss.SSSZ

For example:

Created on September 9, 2019

2019-09-09T00:00:00.000Z

Occurrence: Optional

namestringA content identifier. The only presently supported name is file.

Occurrence: Required

parametersobjectThe parameters you want associated with the file.

Occurrence: Optional

readDatestringThe date you read the file.

Format: UTC yyyy-MM-ddThh:mm:ss.SSSZ

For example:

Created on September 10, 2019

2019-09-10T00:00:00.000Z

Occurrence: Optional

sizeintegerThe size of the file.

Occurrence: Optional

typestringThe file type. The only presently supported type is form-data.

Occurrence: Required

Output

HTTP response headers

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
200Success
400Bad Request
403Forbidden
404Not Found
500Internal Server Error

Error codes

For more on errors, plus the codes of other common errors, see Handling errors.

CodeDomainCategoryMeaning
160001API_FEEDAPPLICATIONThere was a problem with an eBay internal system or process. Contact eBay Developer Technical Support for assistance.
160002API_FEEDREQUESTThe authentication scope {scope} is incorrect for 'feed_type' {feedType}. Refer to documentation for details about the scopes.
160003API_FEEDREQUESTTask {taskID} does not exist.
160020API_FEEDREQUESTThe format of the file to be uploaded is invalid. {additionalInfo}
160023API_FEEDREQUESTTask {taskID} cannot upload a file.
160026API_FEEDREQUESTThis task has expired and you cannot use it to upload a file. You must upload a file within a hour of creating the task.
160028API_FEEDREQUESTThe file you tried to upload is too large. Please try using a smaller file. For more information, see the documentation for this API.

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: Upload a File

This call uploads the file associated with the specified task.

Input

The input is the task ID as a URI parameter.
POST
https://api.ebay.com/sell/feed/v1/task/task-16481199/upload_file

Output

The output is an HTTP status.