Upload Caption File

Uploads or updates captions for a video asset

📘

URL: POST /api/v1/assets/video/cc

Request Parameters

ParameterDescriptionTypeRequiredPossible Values
advertiserIdThe ID of the specific advertiserintegerYA valid advertiser ID
assetIdThe ID of the video assetstring (UUID)YA valid asset ID
fileFile path to .vtt filefileY

Sample Request

curl -X POST \ 'https://developer.api.us.stg.walmart.com/api-proxy/service/display/api/v1/api/v1/assets/video/cc' \ --header 'Content-Type: multipart/form-data' \ --header 'Authorization: Bearer <auth_token>' \ --header 'WM_SEC.AUTH_SIGNATURE: **************' \ --header 'WM_SEC.KEY_VERSION: 1' \ --header 'WM_CONSUMER.ID: adfwe-v00-faasd2r-afs-asdfqeff' \ --header 'WM_CONSUMER.INTIMESTAMP: 1565309779' \ --form "advertiserId=00000" \ --form "assetId=00000" \ --form "file=@/path/to/caption.vtt"

Response

ElementDescriptionOptional field/Nullable?TypePossible values
codeCode=succes, failure
Click here for more information about Status Codes and Errors
Nstringsuccess, failure
detailsFor code=success, this field populates success details.
For code=failure, it returns
list of error codes associated with the request. Use these codes for programmatic error handling.
Narray<string>
typeSpecifies the type of captioning resource; typically "CLOSED_CAPTIONS".string
assetIdUnique identifier of the associated media asset.string (UUID)
nameName assigned to the uploaded caption file.string
extensionFile extension of the caption file, typically "vtt".string
captioningJobIdUnique identifier for the captioning job.string (UUID)
originSource of the caption file upload, typically "UPLOAD".string
autoGeneratedIndicates whether the caption file was generated automatically.boolean
contentVTT file content containing caption text.string
createdAtTimestamp when the job was created, in ISO 8601 format.string
statusCurrent status of the captioning job. Possible values: COMPLETED, IN_PROGRESS, SUBMITTED, FAILED.string (enum)
statusCodeAdditional status information, e.g., "NO_SPEECH_DETECTED" or null.string or null
updatedAtTimestamp when the job was last updated, in ISO 8601 format.string
profileNameName of the profile used for captioning (e.g., "checkin").string
messageHigh-level summary of the error, when available. Ystring 
errorsDetailed information about one or more errors, including the affected field (when applicable), error code, and a human-readable description.Yarray<object> 

errors array object details

FieldDescriptionOptional field/Nullable?TypePossible values
fieldOmitted if the error applies to the request as a whole.Ystring 
errorTypeMachine-readable error code that uniquely identifies the error condition. Applications should use this value for error handling logic.Nstring 
descriptionHuman-readable explanation of the error, including why the request failed and, when possible, how to resolve itNstring 

Sample Response

{ "type": "CLOSED_CAPTIONS", "assetId": "4eb7e35e-2081-4bf9-85da-0a005994f6c5", "name": "dooh-test", "extension": "vtt", "createdAt": null, "origin": "UPLOAD", "autoGenerated": false, "content": "WEBVTT\n\n00:00:00.500 --> 00:00:02.000 \nThe Web is always changing \n\n00:00:02.500 --> 00:00:04.300\nand the way we access it is changing\n", "status": null, "statusCode": null, "updatedAt": null, "profileName": null, "captioningJobId": null, "errorMessage": null, "code": "success", "details": [ "SUCCESS" ]
}

Sample Response - Failure

[ { "code": "failure", "details": [ "string" ],    "message": "string",
    "errors": [ { "field": "string", "errorType": "string", "description": "string" } ] }
]

Did this page help you?