Upload closed captions
Uploads or updates caption file for a video asset
URL: POST /api/v1/assets/video/cc
Request Parameters
| Parameter | Description | Type | Required | Possible Values |
|---|---|---|---|---|
| advertiserId | The ID of the specific advertiser | integer | Y | A valid advertiser ID |
| assetId | The ID of the video asset | string (UUID) | Y | A valid asset ID |
| file | File path to .vtt file | file | Y |
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
| Element | Description | Type |
|---|---|---|
code | Indicates the overall result or status of the operation. | string |
details | List containing additional details or messages about the result. | array |
type | Specifies the type of captioning resource; typically "CLOSED_CAPTIONS". | string |
assetId | Unique identifier of the associated media asset. | string (UUID) |
name | Name assigned to the uploaded caption file. | string |
extension | File extension of the caption file, typically "vtt". | string |
captioningJobId | Unique identifier for the captioning job. | string (UUID) |
origin | Source of the caption file upload, typically "UPLOAD". | string |
autoGenerated | Indicates whether the caption file was generated automatically. | boolean |
content | VTT 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."
} Updated 2 days ago
