List All the Media

Description:

Use this endpoint to fetch the video validation outcome by passing the mediaId of the video asset. It polls Walmart’s system to check video validation status and returns the result.

For a video asset to be associated to a campaign, the corresponding media file should be in AVAILABLE status. The AVAILABLE status guarantees that the background process has completed the processing of the video asset and it is available for usage in a Sponsored Video campaign. The validated video asset represents the video profile.

The background process can approximately take ~30 minutes to complete the processing. We recommend polling the system to check for the video validation 30 minutes after uploading with a backoff timer of 15 minutes. The endpoint can also be used to list all the video files along with their status for a given advertiser. Optionally, you can also filter by the status of the media file (PENDING, PROCESSING, FAILED or AVAILABLE) to list only files matching the status for a given advertiser.

URL: GET /api/v1/media

Query Parameters

ParameterDescriptionTypeRequiredPossible Values
advertiserIdThe ID of the advertiserintegerYUnique numeric identifier
mediaIdThe unique Id of the media file generated from the notify media upload complete callNote: When an advertiser id and multiple media ids are provided, the service shall return the media details qualifying for the first media id.integerNUnique numeric identifier
statusThe value represents the status of the media file. Note: When an advertiser id and multiple status are provided, the service shall return the media details qualifying for the first status.   stringNRelevant string value representing the status (PENDING, PROCESSING, AVAILABLE, FAILED, LIVED) Note:  • PENDING and PROCESSING status signify that the video is being processed at the backend for technical specification• LIVED status means that the video was associated with a campaign which went live and cannot be deleted 

Headers

Header NameDescriptionRequiredValues
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 (Passing mediaId as query parameter)

curl -X GET \
'https://developer.api.stg.walmart.com/api-proxy/service/WPA/Api/v1/api/v1/media?mediaId=600001&advertiserId=500003'\
--header 'Authorization: Bearer <auth_token>' \ --header 'accept: application/json' \
--header 'WM_SEC.AUTH_SIGNATURE: ***********' \
--header 'WM_SEC.KEY_VERSION: 1' \
--header 'WM_CONSUMER.ID: adfwe-v23-faasd2r-afs-asdfqeff' \
--header 'WM_CONSUMER.intimestamp: 1565309779'\

Sample Request 2 (mediaId is not present as query parameter)

curl -X GET \
'https://developer.api.stg.walmart.com/api-proxy/service/WPA/Api/v1/api/v1/media?advertiserId=500003'\ --header 'Authorization: Bearer <auth_token>' \ --header 'accept: application/json' \ --header 'WM_SEC.AUTH_SIGNATURE: ***********' \ --header 'WM_SEC.KEY_VERSION: 1' \ --header 'WM_CONSUMER.ID: adfwe-v23-faasd2r-afs-asdfqeff' \ --header 'WM_CONSUMER.intimestamp: 1565309779' \

Sample Request 3 (mediaId is not present as query parameter and one of the media files fails validation)

curl -X GET \ 'https://developer.api.stg.walmart.com/api-proxy/service/WPA/Api/v1/api/v1/media?advertiserId=500003' \ --header 'Authorization: Bearer <auth_token>' \ --header 'accept: application/json' \ --header 'WM_SEC.AUTH_SIGNATURE: ***********' \ --header 'WM_SEC.KEY_VERSION: 1' \ --header 'WM_CONSUMER.ID: adfwe-v23-faasd2r-afs-asdfqeff' \ --header 'WM_CONSUMER.intimestamp: 1565309779' \

Response

ElementDescriptionType
mediaIdThe unique Id of the media file generated from the notify media upload complete call  integer
statusStatus values:• PENDING• PROCESSING• AVAILABLE• FAILED• LIVEDPENDING and PROCESSING status signifies that the video is being processed at the backend for technical specifications. AVAILABLE: This status signifies that the video is now available to be added to a campaignFAILED: This status signifies that the background process for video validation failed.LIVED: This status signifies that the video has been associated with a live campaign and cannot be deleted. string
detailsDetails of the error if media status is FAILED:  “validationReason” – Technical description of the error.   “meta” tag – This field is optional. This will signify additional details of the error e.g. if a minimum value is accepted and provides the actual value provided in request.   “message” – Generic error message   “type” – Signifies the type of error i.e. VALIDATIONstring
nameName of the mediastring
thumbnailURL for the image snapshot of videostring
videoUrlURL of the video file. This URL can be used to download the video file.string
captionUrlURL of the caption file. This URL can be used to download the caption filestring
attachedIndicator to signify if the media file has been associated with a campaign or not. If the media file is associated with a campaign, it cannot be deleted.boolean
confidenceLevelIndicator to signify the confidence level of the automatically generated closed caption file. Note: • “confidenceLevel” will only be provided for auto-generated closed caption files and will be set to 0 for manually uploaded ones. • If the “confidenceLevel” of auto-generated caption is less than 0.8 I.e. 80%, please generate and upload a new closed caption file (refer section Update Closed Caption by ID) and provide it with the video file to avoid rejections later during campaign review processfloat
autoGeneratedIndicator to signify if the closed caption is auto generated or notboolean

Note: Please verify the auto-generated closed caption file for all instances using the URL provided and upload a new one if required (refer section Update Closed Caption by ID)

Sample Response 1: the response is specific to mediaId provided in query parameters

[ { "mediaId": 500003, "status": "AVAILABLE", "details": "details abc", "name": "abc 4", "thumbnail": "Retrieved Thumbnail", "videoUrl": "Retrieved videoUrl", "captionUrl": "Retrieved captionUrl", "confidenceLevel": 0.96154004, "attached": false, "autoGenerated": true }
]

Sample Response 2: the response contains info about all the media files associated to this advertiser id provided in query parameters

[ { "mediaId": 12210, "status": "AVAILABLE", "details": null, "name": "test-video-stage-109",
"thumbnail": "Retrieved Thumbnail1",
"videoUrl": "Retrieved videoUrl1", "captionUrl": "Retrieved captionUrl1", "confidenceLevel": 0.96154004, "attached": false, "autoGenerated": true }, { "mediaId": 12209, "status": "AVAILABLE", "details": null, "name": "test-video-stage-105", "thumbnail": "Retrieved Thumbnail2", "videoUrl": "Retrieved videoUrl2", "captionUrl": "Retrieved captionUrl2", "confidenceLevel": 0.0, "attached": false, "autoGenerated": false }, { "mediaId": 12208, "status": "AVAILABLE", "details": null, "name": "test-video-stage-104", "thumbnail": "Retrieved Thumbnail2", "videoUrl": "Retrieved videoUrl2", "captionUrl": "Retrieved captionUrl2", "confidenceLevel": 0.0, "attached": false, "autoGenerated": false }, { "mediaId": 11193, "status": "AVAILABLE", "details": null, "name": "test-video-stage-103", "thumbnail": "Retrieved Thumbnail3", "videoUrl": "Retrieved videoUrl3", "captionUrl": "Retrieved captionUrl3", "captionUrl": null, "confidenceLevel": 0.0, "attached": false, "autoGenerated": false }, { "mediaId": 10724, "status": "AVAILABLE", "details": null, "name": "test-video-skai", "thumbnail": "Retrieved Thumbnail4", "videoUrl": "Retrieved videoUrl4", "captionUrl": "Retrieved captionUrl4", "captionUrl": null, "confidenceLevel": 0.0, "attached": false, "autoGenerated": false }, { "mediaId": 10639, "status": "AVAILABLE", "details": null, "name": "test-video-jan-17", "thumbnail": "Retrieved Thumbnail2", "videoUrl": "Retrieved videoUrl2", "captionUrl": null, "confidenceLevel": 0.0, "attached": true, "autoGenerated": false }, { "mediaId": 10575, "status": "AVAILABLE", "details": null, "name": "test-video-jan-3", "thumbnail": "Retrieved Thumbnail2", "videoUrl": "Retrieved videoUrl2", "captionUrl": null, "confidenceLevel": 0.0, "attached": true, "autoGenerated": false }, { "mediaId": 10574, "status": "AVAILABLE", "details": null, "name": "test-video-jan-2", "thumbnail": "Retrieved Thumbnail2", "videoUrl": "Retrieved videoUrl2", "captionUrl": null, "confidenceLevel": 0.0, "attached": true, "autoGenerated": false }, { "mediaId": 10503, "status": "AVAILABLE", "details": null, "name": "test-video-jan", "thumbnail": "Retrieved Thumbnail2", "videoUrl": "Retrieved videoUrl2", "captionUrl": null, "confidenceLevel": 0.0, "attached": true, "autoGenerated": false }, { "mediaId": 10383, "status": "AVAILABLE", "details": null, "name": "test-video-1p-new", "thumbnail": "Retrieved Thumbnail2", "videoUrl": "Retrieved videoUrl2", "captionUrl": null, "confidenceLevel": 0.0, "attached": true, "autoGenerated": false }, { "mediaId": 10372, "status": "AVAILABLE", "details": null, "name": "test-video-new", "thumbnail": "Retrieved Thumbnail2", "videoUrl": "Retrieved videoUrl2", "captionUrl": null, "confidenceLevel": 0.0, "attached": false, "autoGenerated": false }, { "mediaId": 10365, "status": "AVAILABLE", "details": null, "name": "test-video-test-2", "thumbnail": "Retrieved Thumbnail2", "videoUrl": "Retrieved videoUrl2", "captionUrl": "Retrieved captionUrl2", "confidenceLevel": 0.0, "attached": false, "autoGenerated": false }, { "mediaId": 10351, "status": "AVAILABLE", "details": null, "name": "test-video6", "thumbnail": "Retrieved Thumbnail2", "videoUrl": "Retrieved videoUrl2", "captionUrl": null, "confidenceLevel": 0.0, "attached": true, "autoGenerated": false }, { "mediaId": 10346, "status": "AVAILABLE", "details": null, "name": "video13", "thumbnail": "Retrieved Thumbnail2", "videoUrl": "Retrieved videoUrl2", "captionUrl": null, "confidenceLevel": 0.0, "attached": true, "autoGenerated": false } { "mediaId": 12560, "status": "FAILED", "details": "[{\"message\":\"Failed to decode video.\",\"type\":\"VALIDATION\",\"code\":\"E_BAD_VIDEO\"}]", "name": "sample video-6", "thumbnail": null, "videoUrl": null, "captionUrl": null, "confidenceLevel": 0.0, "attached": false, "autoGenerated": false }
]

Sample Response 3: the response is specific to mediaId provided in query parameters

[ { "mediaId": 10346, "status": "AVAILABLE", "details": null, "name": "video13", "thumbnail": "Retrieved Thumbnail2", "videoUrl": "Retrieved videoUrl2", "captionUrl": null, "confidenceLevel": 0.0, "attached": true, "autoGenerated": false }, { "mediaId": 39141, "status": "FAILED", "details": "[{\"validationReason\":\"Video bitrate is less than minimum video bitrate kbps requirement. Value 190 is less than lower bound 512.\",\"resourceType\":\"VIDEO\",\"code\":\"E_MIN_VIDEO_BITRATE_KBPS\",\"meta\":{\"minimumValue\":\"512\",\"actualValue\":\"190\"},\"message\":\"Video bitrate less than minVideoBitrateKbps. Value 190 is less than lower bound 512.\",\"type\":\"VALIDATION\"}]", "name": "test-video-error", "thumbnail": null, "videoUrl": null, "captionUrl": null, "confidenceLevel": 0.0, "attached": false, "autoGenerated": false } ]