Update Closed Caption by ID

Description:

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

ParameterDescriptionTypeRequiredPossible Values
mediaIdThe unique Id of the media file associated to the closed caption file  IntegerYUnique numeric identifier
advertiserIdThe unique id associated with advertiser accountIntegerYUnique numeric identifier

Form Parameters

ParameterDescriptionTypeRequiredPossible Values
fileClosed caption file to be updatedfileYCaption files of .srt/.vtt format

Headers

Header NameDescriptionRequired
Values
AuthorizationThe token will provide you the access to the API. It is same for all advertisers you access through the API.   YPlease utilize the generated auth_token shared with you at the time of partner onboarding from the Getting Started Guide  
WM_CONSUMER.IDWe will provide you the consumer ID to access the API. It is same for all advertisers you access through the API.   YPlease use the generated ConsumerId shared with you at the time of partner onboarding. Refer to the Getting Started Guide for further explanation on this
WM_SEC.AUTH_SIGNATUREAuth signature as an API keyYUse the signature generator code from Getting Started Guide to generate this value
WM_SEC.KEY_VERSIONWe will provide you with the KEY VERSION to access the API. It is same for all advertisers you access through the APIY1
WM_CONSUMER.intimestampTimestamp for which the auth signature is generated. Use Unix epoch format for the timestampYUse the signature generator code (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

ElementDescriptionType
codeShows status of the ad group update operation Values:   • success – indicates that the closed caption file is uploaded successfully and submitted for background processing. Please wait for 30 minutes to retrieve the status of the media file. You can retrieve status by calling Get Media API after updating the closed caption file.          • failure: indicates that the new closed caption file could not be uploaded. The media will be marked as “FAILED” in this case as retrieved by Get Media API call and cannot be used in a campaign.Note: If the background process of UPDATING closed caption file succeeds for the media: 1. The media will be marked as “AVAILABLE“ 2. The new media file will be available to be used in the campaign.             If the background process fails, the media will be marked as "FAILED".Any interim state till background processing is completed for closed caption file will be shown as “PROCESSING“string
detailsDetails of the updatestring
mediaIdThe unique Id of the media fileinteger
captionUrlThe URL of the uploaded closed caption filestring

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" }
]