Hosted Video is only available to clients on our Conversations PRR platform.
Refer to Conversations PRR Only Features for more information.

The Conversations API lets you programmatically retrieve and submit Bazaarvoice Conversations data for use in your applications. To learn more, go to the Conversations API documentation home page.

Contents

(+ show- hide)

Upload videos for a review, question, answer, story or comment.

Introduction

Video upload is a two step process:

  1. First the video file must be uploaded to Bazaarvoice.
  2. Then, the uploaded video must be associated with a review, question, answer, story, or comment during submission of that content.

This page describes the upload process. See the submission documentation for the appropriate content type to learn how to associate an uploaded video.

Examples

Demonstration purposes only. Do not reuse the API passkeys below in your application.

Preview

Perform a GET request to see information about available submission options:

http://stg.api.bazaarvoice.com/data/uploadvideo.json?apiversion=5.4&ContentType=review&UserId=craiggil&passkey=2cpdrhohmgmwfz8vqyo48f52g

Upload

Upload a video file using HTTP POST:

POST /data/uploadvideo.[json|xml]?productid=[ID]&apiversion=5.4&passkey=[YOUR_API_KEY]&contentype=[review|question|answer|story|review_comment|story_comment]&userid=[ID] HTTP/1.1
Host: [stg.]api.bazaarvoice.com
Content-Type: multipart/form-data; boundary=----ExampleFormBoundary7MA4YWxkTrZu0gW
...

----ExampleFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="Video"; filename="test_video.mp4"
Content-Type: video/mp4


----ExampleFormBoundary7MA4YWxkTrZu0gW

Ellipses (...) in above example indicate that your app may generate other headers.

Learn more about multipart/form-data.

Parameters

Name Description Additional Info
ApiVersion The API version, e.g. 5.4. API
ContentType The content type for which this media is being submitted. Valid values include: review, question, answer, story, review_comment and story_comment. API
[FORMAT] Response format (xml or json) API
PassKey API key is required to authenticate API user and check permission to access particular client's data. API
Video

The video file of less than 200 MB in 3GP/3G2, ASF, AVI, DV, FLV, MOV, MP4/F4V, MPEG/MPG, QT, or WMV format.

API
Locale Locale to display Labels, Configuration, Product Attributes and Category Attributes in. The default value is the locale defined in the display associated with the API key. Business
User Value of the encrypted user. This parameter demonstrates that a user has been authenticated. Note that the UserId parameter does not contain authentication information and should not be used for hosted authentication. See the Authenticate User method for more information. Configuration
UserId User's external ID. Do not use email addresses for this value. Configuration

Response format

The response to a successful video upload request will include a VideoUrl. The VideoUrl can then be included in a review, question, answer, story, comment submission which will associate the video with that content.

{
    "Video": {
        "VideoUrl":"http://api.bazaarvoice.com/stories/0001/vs_21/video.swf"
    },
    "Data": {
        "Field": {
            "video": {
                "Name":"video",
                "Type":"FileInput"
            }
        }
    },
    "Form":[
        {
            "Type":"Field",
            "ID":"video"
        }
    ]
}

Error codes

Value Description
ERROR_ACCESS_DENIED

Insufficient privileges to perform the operation

ERROR_FORM_DUPLICATE

The nickname is already in use.

ERROR_FORM_DUPLICATE_NICKNAME

The nickname is already in use.

ERROR_FORM_FILE_PARSE

The uploaded video could not be processed. Ensure that the video is a valid 3GP/3G2, ASF, AVI, DV, FLV, MOV, MP4/F4V, MPEG/MPG, QT, or WMV file.

 

ERROR_FORM_FILE_TOO_LARGE

The uploaded video is too large. Videos must be less than 200 MB.

 

ERROR_FORM_INVALID_EMAILADDRESS

Email address is not in the proper format.

ERROR_FORM_INVALID_IPADDRESS

The IP address is invalid.

ERROR_FORM_INVALID_OPTION

The selected option has been removed.

ERROR_FORM_PATTERN_MISMATCH

This field is not in the correct format.

ERROR_FORM_PROFANITY

The content contains inappropriate language.

ERROR_FORM_REJECTED

The submission was rejected.

ERROR_FORM_REQUIRED

A required field was not supplied.

ERROR_FORM_REQUIRED_EITHER

Both of the required hosted authentication parameters are missing.

ERROR_FORM_REQUIRED_NICKNAME

You must enter a nickname.

ERROR_FORM_REQUIRES_TRUE

A field requires a value of true. (e.g., "You must agree to the terms and conditions.")

ERROR_FORM_RESTRICTED

Content provider's age is too young. (e.g., "Content cannot be accepted from minors under age 13.")

ERROR_FORM_STORAGE_PROVIDER_FAILED

The uploaded file could not be stored. Try uploading again later.

ERROR_FORM_SUBMITTED_NICKNAME

This nickname has already been submitted.

ERROR_FORM_TOO_FEW

There must be a minimum number of items contributed for this field.

ERROR_FORM_TOO_HIGH

This field has too many items.

ERROR_FORM_TOO_LONG

The field has too many characters.

ERROR_FORM_TOO_LOW

This field has too few items.

ERROR_FORM_TOO_SHORT

The field doesn't have enough characters.

ERROR_FORM_UPLOAD_IO

The item could not be uploaded. Ensure that it is a valid file type.

ERROR_PARAM_INVALID_LOCALE

Invalid locale code

ERROR_PARAM_INVALID_API_KEY

Invalid API Key value

ERROR_PARAM_MISSING_USER_ID

This client does not allow unauthenticated submissions. A valid UserId is required.

ERROR_REQUEST_LIMIT_REACHED

Rate limiting error, i.e. too many requests per time interval

ERROR_UNKNOWN

Unknown error (internal server error, for instance)

ERROR_UNSUPPORTED

For unsupported features, clients etc.