Upload closed captions

Uploads or updates caption file 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

ElementDescriptionType
codeIndicates the overall result or status of the operation.string
detailsList containing additional details or messages about the result.array
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

Sample Response

{ "code": "success", "details": ["success"], "type": "CLOSED_CAPTIONS", "assetId": "123e4567-e89b-12d3-a456-426614174000", "name": "uploaded_captions", "extension": "vtt", "captioningJobId": "987e6543-e21b-45d3-a123-456789abcdef", "origin": "UPLOAD", "autoGenerated": false, "content": "WEBVTT\n\n00:00:00.000 --> 00:00:02.000\nThis is a sample caption.\n\n00:00:02.500 --> 00:00:04.000\nUploaded manually."
}