Skip to main content

POST/video/{video_id}/upload

This method associates the specified file with the specified video ID and uploads the input file. After the file has been uploaded the processing of the file begins.

Note: The size of the video to be uploaded must exactly match the size of the video's input stream that was set in the createVideo method. If the sizes do not match, the video will not upload successfully.

When a video is successfully uploaded, it returns the HTTP Status Code 200 OK.

The status flow is PENDING_UPLOAD > PROCESSING > LIVE, PROCESSING_FAILED, or BLOCKED. After a video upload is successfully completed, the status will show as PROCESSING until the video reaches one of the terminal states of LIVE, BLOCKED, or PROCESSING_FAILED. If the size information (in bytes) provided is incorrect, the API will throw an error.

Tip: See Adding a video to your listing in the eBay Seller Center for details about video formatting requirements and restrictions, or visit the relevant eBay site help pages for the region in which the listings will be posted.

To retrieve an uploaded video, use the getVideo method.

Input

Resource URI

POST https://apim.ebay.com/commerce/media/v1_beta/video/{video_id}/upload

This method is supported in Sandbox environment. To access the endpoint, just replace the apim.ebay.com root URI with apim.sandbox.ebay.com

URI parameters

ParameterTypeDescription
video_idstringThe unique identifier of the video to be uploaded.

Occurrence: Required

HTTP request headers

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

The table below shows additional HTTP request headers that are either required, conditionally required, or strongly recommended for this method. Other standard HTTP request headers- opens rest request components page (not in this table) can also be used, but they are optional.

HeaderTypeDescription
Content-LengthstringUse this header to specify the content length for the upload. Use Content-Range: bytes {1}-{2}/{3} and Content-Length:{4} headers.

Note: This header is optional and is only required for resumable uploads (when an upload is interrupted and must be resumed from a certain point).

Occurrence: Strongly Recommended

Content-RangestringUse this header to specify the content range for the upload. The Content-Range should be of the following bytes ((?:[0-9]+-[0-9]+)|\\\\*)/([0-9]+|\\\\*) pattern.

Note: This header is optional and is only required for resumable uploads (when an upload is interrupted and must be resumed from a certain point).

Occurrence: Strongly Recommended

Content-TypestringUse this header to specify the content type for the upload. The Content-Type should be set to application/octet-stream.

Occurrence: Required

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

See OAuth access tokens for more information.

Request payload

Note: This method has no request payload. Instead, a video file is uploaded to the endpoint. The input stream source must be an .mp4 file of the type MPEG-4 Part 10 or Advanced Video Coding (MPEG-4 AVC).

This call has no payload.

Request fields

This call has no field definitions.

Output

HTTP response headers

This call has no response headers.

Response payload

This call has no payload.

Response fields

This call has no field definitions.

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
200OK
400Bad Request
404Not Found
409Conflict
411Content Length Required
416Range Not Satisfiable
500Internal Server Error

Error codes

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

CodeDomainCategoryMeaning
190000API_MEDIAAPPLICATIONThere was a problem with an eBay internal system or process. Contact eBay developer support for assistance.
190001API_MEDIAREQUESTThe specified video_Id does not exist.
190007API_MEDIAREQUESTThe content length does not match the content size specified.
190008API_MEDIAREQUESTThe content length is required.
190009API_MEDIAREQUESTThe Content-Range specified is incorrect. Use Content-Range: bytes {1}}-{2}/{3} and Content-Length:{4} headers.
190010API_MEDIAREQUESTThe video's Content-Range is invalid. The Content-Range should be of the following bytes ((?:[0-9]+-[0-9]+)|\\\\*)/([0-9]+|\\\\*) pattern.
190011API_MEDIAREQUESTThe video is already uploaded.
190012API_MEDIAREQUESTThe content length of the video is invalid.
190013API_MEDIAREQUESTUnauthorized access.
190015API_MEDIAREQUESTThe uploaded content must match the video size.

Warnings

This call has no 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 Video

This sample uploads a selected video file using a created video ID.

Input

The inputs are the video_id and a specified video file.

POSThttps://apim.ebay.com/commerce/media/v1_beta/video/f******************************a/upload

Output

The output is an HTTP status. If the call is successful, the video will be uploaded.