Upload Caption File
Uploads or updates captions 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 | Optional field/Nullable? | Type | Possible values |
|---|---|---|---|---|
code | Code=succes, failure Click here for more information about Status Codes and Errors | N | string | success, failure |
| details | For code=success, this field populates success details.For code= failure, it returnslist of error codes associated with the request. Use these codes for programmatic error handling. | N | array<string> | |
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 | ||
createdAt | Timestamp when the job was created, in ISO 8601 format. | string | ||
status | Current status of the captioning job. Possible values: COMPLETED, IN_PROGRESS, SUBMITTED, FAILED. | string (enum) | ||
statusCode | Additional status information, e.g., "NO_SPEECH_DETECTED" or null. | string or null | ||
updatedAt | Timestamp when the job was last updated, in ISO 8601 format. | string | ||
profileName | Name of the profile used for captioning (e.g., "checkin"). | string | ||
| message | High-level summary of the error, when available. | Y | string | |
| errors | Detailed information about one or more errors, including the affected field (when applicable), error code, and a human-readable description. | Y | array<object> |
errors array object details
| Field | Description | Optional field/Nullable? | Type | Possible values |
|---|---|---|---|---|
| field | Omitted if the error applies to the request as a whole. | Y | string | |
| errorType | Machine-readable error code that uniquely identifies the error condition. Applications should use this value for error handling logic. | N | string | |
| description | Human-readable explanation of the error, including why the request failed and, when possible, how to resolve it | N | string |
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" } ] }
]Updated 3 days ago
Did this page help you?
