Update Closed Caption by ID
Use this endpoint to upload the updated closed caption file. Caption file format should be .srt or .vtt
Note: You cannot update a closed caption file for a media which associated with a campaign
URL: POST /api/v1//cc
Query Parameters
Parameter | Description | Type | Required | Possible Values |
---|---|---|---|---|
mediaId | The unique Id of the media file associated to the closed caption file | Integer | Y | Unique numeric identifier |
advertiserId | The unique id associated with advertiser account | Integer | Y | Unique numeric identifier |
Form Parameters
Parameter | Description | Type | Required | Possible Values |
---|---|---|---|---|
file | Closed caption file to be updated | file | Y | Caption files of .srt/.vtt format |
Headers
Header Name | Description | Required | Values |
---|---|---|---|
Authorization | The token will provide you the access to the API. It is same for all advertisers you access through the API. | Y | Please utilize the generated auth_token shared with you at the time of partner onboarding from the Getting Started Guide |
WM_CONSUMER.ID | We will provide you the consumer ID to access the API. It is same for all advertisers you access through the API. | Y | Please use the generated ConsumerId shared with you at the time of partner onboarding. Refer to the Getting Started Guide for more information |
WM_SEC.AUTH_SIGNATURE | Auth signature as an API key. | Y | Use the signature generator code from Getting Started Guide to generate this value |
WM_SEC.KEY_VERSION | We will provide you with the KEY VERSION to access the API. It is same for all advertisers you access through the API. | Y | 1 |
WM_CONSUMER.intimestamp | Timestamp for which the auth signature is generated. Use Unix epoch format for the timestamp. | Y | Use the signature generator code from Getting Started Guide to generate this value |
Sample Request 1
curl -X POST \ 'https://developer.api.stg.walmart.com/api-proxy/service/WPA/Api/v1/api/v1/media/600001/cc?advertiserId=160007' \
--header 'Authorization: Bearer <auth_token>' \ --header 'WM_SEC.AUTH_SIGNATURE: ***********' \
--header 'WM_SEC.KEY_VERSION: 1' \
--header 'WM_CONSUMER.ID: adfwe-v23-faasd2r-afs-asdfqeff' \
--header 'WM_CONSUMER.INTIMESTAMP: 1683149348993' \
--header 'Content-Type: multipart/form-data' \ --form 'file=@"98hbO7z/cc.srt"'
Sample Request 2
curl -X POST \ 'https://developer.api.stg.walmart.com/api-proxy/service/WPA/Api/v1/api/v1/media/600002/cc?advertiserId=160097' \
--header 'Authorization: Bearer <auth_token>' \ --header 'WM_SEC.AUTH_SIGNATURE: ***********' \
--header 'WM_SEC.KEY_VERSION: 1' \
--header 'WM_CONSUMER.ID: adfwe-v23-faasd2r-afs-asdfqeff' \
--header 'WM_CONSUMER.INTIMESTAMP: 1683149348993' \
--header 'Content-Type: multipart/form-data' \ --form 'file=@"98bO7z/cc2.srt"'
Sample Request 3
curl -X POST \ 'https://developer.api.stg.walmart.com/api-proxy/service/WPA/Api/v1/api/v1/media/600003/cc?advertiserId=165007' \
--header 'Authorization: Bearer <auth_token>' \ --header 'WM_SEC.AUTH_SIGNATURE: ***********' \
--header 'WM_SEC.KEY_VERSION: 1' \
--header 'WM_CONSUMER.ID: adfwe-v23-faasd2r-afs-asdfqeff' \
--header 'WM_CONSUMER.INTIMESTAMP: 1683149348993' \
--header 'Content-Type: multipart/form-data' \ --form 'file=@"95hbO7z/cc1.srt"'
Response
Element | Description | Type |
---|---|---|
code | Shows status of the ad group update operation Values:
Note: If the background process of UPDATING closed caption file succeeds for the media:
| string |
details | Details of the update | string |
mediaId | The unique Id of the media file | integer |
captionUrl | The URL of the uploaded closed caption file | string |
Sample Response 1
[ { "code": "success", "details": "", "mediaId": 600001, "captionUrl": "Retrieved captionUrl" }
]
Sample Response 2
[ { "error": "MediaDetails not found." }
]
Sample Response 3
[ { "error": "You do not have write permission to this advertiser" }
]
Updated 15 days ago