Media API Limitations
We do not support preview of the video file
We do not support preview of the video file
The upload media endpoint is used to create a location to upload a video asset and an optional closed caption file (recommended to provide if video has spoken words). This location is short lived and expires in 15 minutes.
URL: POST /api/v1/media/upload |
Parameter | Description | Type | Required | Possible Values |
advertiserId | Id of the advertiser, uploading video asset | integer | Y | Unique numeric identifier |
mediaType | The value of mediaType is “video” Note: • The file size must be ≤ 500mb • The file format must be .MP4 or .MOV • The aspect ratio should be 16:9 • The dimensions must be 1920 x 1080px – 3840 x 2160px • The duration must be 5-30 secondsvideo codec must be H.264 or H.265 audio codec must be AAC , MP3 , PCM • Caption file format should be .srt or .vtt • Number of media files associated with an advertiser account should not exceed the configurable limit owned by WMC. It is 200 currently. An error message will be returned if this number is exceeded. | string | Y | Relevant string value representing the media type |
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 further explanation on this |
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 (Getting Started Guide) to generate this value |
curl -X POST \
https://developer.api.stg.walmart.com/api-proxy/service/WPA/Api/v1/api/v1/media/upload \
--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"\
--header "Content-Type: application/json" \
--data
"{
"mediaType": "video",
"advertiserId": 500002
}"
curl -X POST \
https://developer.api.stg.walmart.com/api-proxy/service/WPA/Api/v1/api/v1/media/upload \
--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"\
--header "Content-Type: application/json" \
--data
"{
"mediaType": "foo",
"advertiserId": 500002
}"
curl -X POST \
https://developer.api.stg.walmart.com/api-proxy/service/WPA/Api/v1/api/v1/media/upload \
--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"\
--header "Content-Type: application/json" \
--data
"{
"mediaType": "video",
"advertiserId": 400001
}"
Element | Description | Type |
code | Possible values of response code: success , failure | string |
details | Details of the error if value of response code is failure | string |
mediaUploadRequestId | Id that is generated in response to receiving a request for uploading a video asset | integer |
uploadUrl | The URL to upload the media. Note: The URL expires in 15 minutes. The upload location only supports PUT HTTP method to upload the media content | string |
captionUrl | The URL to upload the closed caption file. Note: The URL expires in 15 minutes. The upload location only supports PUT HTTP method to upload the caption file | string |
[
{
"code": "success",
"details": "",
"mediaUploadRequestId": 600001,
"uploadUrl":
"https://b4e0184a3estg.blob.core.windows.net /video.mp4?sv=2021-08-06&se=2022-08-
19T05%3A05%3A23Z&sr=b&sp=rcwl&sig=DvVyinZhZo1gNahI%2BRobR4oxXMyXmQG8gD04ZraInoY%3D",
"captionUrl": "https://b4e0184a3estg.blob.core.windows.net/caption.srt?sv=2021-08-06&se=2022-08-
19T05%3A05%3A23Z&sr=b&sp=rcwl&sig=1aVWrnICQAQGV7lZ3JDuL1W8gOkPOqLYLim6JtRN6X0%3D"
}
]
[
{
"code": "failure",
"details": " Invalid Media Type /",
"mediaUploadRequestId": 0 ,
"uploadUrl": "",
"captionUrl": ""
}
]
[
{
"code": "failure",
"details": " Advertiser 400001 is not allowed to use this
feature",
"mediaUploadRequestId": 0,
"uploadUrl": "",
"captionUrl": ""
}
]
[
{
"code": "failure",
"details": "You have reached the limit of 200 videos, please
delete unwanted ones among 200 videos that you own.",
"mediaUploadRequestId": 0,
"uploadUrl": "",
"captionUrl": ""
}
]
Use this endpoint to:
uploadUrl
and captionUrl
in response of POST
operation 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 further explanation on this |
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 (Getting Started Guide) to generate this value |
curl -X PUT \
"https://advertising.walmart.com/media/assets/wmt-stg-media/105ef340-f967-4f65-8d9d-84d48e321130/video.mp4?sv=2021-08-06&se=2023-01-19T16%3A59%3A54Z&sr=b&sp=rcwl&sig=CZhXjnPvaoNPv%2BFTbRFG9Pa30QFUQFfSRzv5xo%2FMw5A%3D"\
--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: 1565309779"\
--header 'Content-Type: video/mp4' \
--data-binary '@/Users/600001/Downloads/video.mp4'
curl -X PUT \
'https://advertising.walmart.com/media/assets/wmt-prod-media/b1bb2a92-901b-469b-a485-efbd3fbd74c3/cc.srt?sv=2021-08-06&se=2023-01-18T02%3A49%3A00Z&sr=b&sp=rcwl&sig=ov0c8%2FqFo558WhVxdpH4ww15m49Zs3ZA%2FPO5dK9uyA4%3D' \
--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: 1565309779"\
--header 'Content-Type: application/x-subrip' \
--data-binary '@/Users/600002/Downloads/cc.srt'
You will receive response 201 if the video is uploaded successfully. You will receive a generic error message in case of video upload failure
You will receive response 201 if the closed caption file is uploaded successfully. You will receive a generic error message in case of caption file upload failure
Use this endpoint to accept video upload notification.
Call this endpoint once the media is uploaded to the location provided by the /api/v1/media/upload
API endpoint. This API creates a media resource for the video asset. The media resource is represented by a media identifier. The media identifier can be used to associate the media with the adGroup for Sponsored Videos.
Once the media is uploaded, the API internally kicks off a background process for validating the technical specifications of the media file. As a result, the media may not be immediately available for use in a Sponsored Video campaign. See GET/api/v1/media
endpoint to get details on when the media is available to be used in a campaign.
URL: PUT /api/v1/media/complete |
Parameter | Description | Type | Required | Possible Values |
advertiserId | The ID of the advertiser | integer | Y | Unique numeric identifier |
mediaName | The title of the video creative Maximum file name size is 45 characters and no special characters allowed | string | Y | Relevant string value representing the name of the video asset |
mediaUploadRequestId | Id generated after receiving a request for uploading a video asset. | integer | Y | Unique numeric identifier |
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 further explanation on this |
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 (Getting Started Guide) to generate this value |
curl -X PUT \
"https://developer.api.stg.walmart.com/api-proxy/service/WPA/Api/v1/api/v1/media/complete" \
--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"\
--header "Content-Type: application/json" \
--data
" {
"advertiserId": 500002,
"mediaName": "sample-video",
"mediaUploadRequestId": 600001
} "
Element | Description | Type |
code | Shows status of the ad group update operation Values: success , failure | string |
details | Details of the failure in case of video file/caption file validation error | string |
mediaId | The unique Id of the media file generated from the notify media upload complete call | integer |
errors | Error description in case of failure. It consists of: message (data type string) , type(data type string) , code(data type string) Please find video validation error codes and description in following table “Video Validation errors” | array |
Error Code | Error Description | Additional Information |
E_BAD_VIDEO | Failed to decode video. | No additional message |
E_EMPTY_VIDEO | Video file is empty. | |
E_VIDEO_STREAM_COUNT | There must be exactly one video stream. | “The provided video had ” + videoStreams.size() + ” video streams.” |
E_WIDTH_NOT_POSITIVE | Video width should be greater than zero. | |
E_HEIGHT_NOT_POSITIVE | Video height should be greater than zero. | |
E_VIDEO_DURATION_NOT_POSITIVE | Video duration should be greater than zero. | |
E_BITRATE_KBPS_NOT_POSITIVE | Video bitrate kbps should be greater than zero. | |
E_FRAME_RATE_FPS_NOT_POSITIVE | Video frame rate fps should be greater than zero. | |
E_TIMESTAMP_FORMAT_INVALID | ||
E_TIMESTAMP_DURATION_INVALID | Invalid Video Timestamp Duration | |
E_VIDEO_URL | The service was unable to retrieve the video from the URL provided. | String.format(“Received error %d from %s.”, code, url) |
E_CALLBACK_URL | String.format(“‘%s’ is not a valid HTTP URL”, callbackUrl) | |
E_CALLBACK_NOT_ALLOWED | String.format(“The callback URL ‘%s’ cannot be used as the request is not intended for”+ ” transcoding.”,callbackUrl) | |
E_BAD_SOURCE | Source is invalid. | String.format(“‘%s’ is not a valid HTTP URL or a GCS URI”, source) |
E_ASPECT_RATIO | Video does not match aspect ratio requirement. | String.format(“%d:%d”, numerator, denominator) |
E_MAX_DURATION_SECONDS | Video is longer than max duration requirement. | String.format(“Value %s is greater than upper bound %s.”, value, limit) |
E_MIN_DURATION_SECONDS | Video is shorter than minimum duration requirement. | String.format(“Value %s is less than lower bound %s.”, value, limit) |
E_MAX_HEIGHT_PIXELS | Video is taller than max height pixels. | String.format(“Value %s is greater than upper bound %s.”, value, limit) |
E_MIN_HEIGHT_PIXELS | Video is shorter than minimum pixel height requirement. | String.format(“Value %s is less than lower bound %s.”, value, limit) |
E_MAX_WIDTH_PIXELS | Video is wider than maximum pixel width requirement. | String.format(“Value %s is greater than upper bound %s.”, value, limit) |
E_MIN_WIDTH_PIXELS | Video is narrower than minimum pixel width requirement. | String.format(“Value %s is less than lower bound %s.”, value, limit) |
E_MAX_FILE_SIZE_MB | Video file size is greater than max file size requirement. | String.format(“Value %s is greater than upper bound %s.”, value, limit) |
E_MIN_FILE_SIZE_MB | Video file size is less than minimum file size requirement. | String.format(“Value %s is less than lower bound %s.”, value, limit) |
E_MIN_AUDIO_BITRATE_KBPS | Audio bit rate is less than minimum audio bitrate kbps requirement. | String.format(“Value %s is less than lower bound %s.”, value, limit) |
E_MIN_VIDEO_BITRATE_KBPS | Video bitrate is less than minimum video bitrate kbps requirement. | String.format(“Value %s is less than lower bound %s.”, value, limit) |
E_MIN_FRAME_RATE_PER_SECOND | Video frame rate is less than minimum frame rate per second requirement. | String.format(“Value %s is less than lower bound %s.”, value, limit) |
E_SUPPORTED_CONTAINERS | Unsupported container. | “None of the container formats “+ String.join(“, “, containerNames)+ ” were in the list of supported container formats: “+ String.join(“, “, SUPPORTED_CONTAINERS)) |
E_SUPPORTED_VIDEO_CODECS | Unsupported video codec. | “Unsupported video codec “+ videoStream.codec_name+ “. The supported video codecs are: “+ String.join(“, “, SUPPORTED_VIDEO_CODECS)) |
E_SUPPORTED_AUDIO_CODECS | Unsupported audio codec. | “Unsupported audio codec “+ codecName+ “. The supported audio codecs are PCM codecs and: “+ String.join(“, “, SUPPORTED_AUDIO_CODECS)) |
E_BAD_CAPTION | Closed caption data is invalid. | Empty Closed caption found. |
FFProbe identified it as bad closed caption data. | ||
E_VTT_CAPTION | VTT closed caption data is invalid. | Couldn’t find blank line between header and content or content is empty. |
E_VTT_CAPTION_HEADER | VTT closed caption header data is invalid. | VTT Closed caption must starts with WEBVTT. |
E_VTT_CAPTION_HEADER_METADATA | Metadata in VTT closed caption header is invalid. | String.format(“Unrecognized header metadata ‘%s’.”, curMetaLine) |
E_CAPTION_CUE | Closed caption cue data is invalid. | String.format(“No timestamps found in Closed Caption cue ‘%s’.”, ccContent) |
E_CAPTION_CUE_ARROW | Arrow between two timestamps in closed caption cue data is invalid. | String.format(“Invalid arrow ‘%s’ in ‘%s'”, realArrow, line) |
E_CAPTION_FORMAT_NOT_SUPPORTED | Closed caption format not supported. | String.format(“Only SRT and VTT are supported. Current format ‘%s’.”, fileFormat) |
E_CAPTION_URL | The service was unable to retrieve the caption file from the URL provided. | String.format(“Received error %d from %s.”, code, url) |
E_MAX_CAPTION_FILE_SIZE_MB | Closed caption file size greater than max cc file size requirement. | String.format(“Value %s is greater than upper bound %s.”, value, limit) |
[
{
"code": "success",
"details": "",
"mediaId": 600001,
"errors": [
{
"message": "message1",
"type": "VALIDATION",
"code": "E_ASPECT_RATIO"
},
{
"message": "message2",
"type": "VALIDATION",
"code": "E_MIN_PIXEL"
}
]
}
]
[
{
"code": "success",
"details": "",
"mediaId": 12620,
"errors": null
}
]
Use this endpoint to Update the media file name
URL: PUT /api/v1/media |
Parameter | Description | Type | Required | Possible Values |
advertiserId | The ID of the advertiser | integer | Y | Unique numeric identifier |
mediaName | The title of the video asset Note: The mediaName can have maximum size of 45 characters and no special characters allowed | string | Y | Relevant string value representing the name of the video asset |
mediaId | The unique Id of the media file | integer | Y | Unique numeric identifier |
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 further explanation on this |
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 (Getting Started Guide) to generate this value |
curl -X PUT \
"https://developer.api.stg.walmart.com/api-proxy/service/WPA/Api/v1/api/v1/media" \
--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"\
--header "Content-Type: application/json" \
--data
"[
{
"advertiserId": 600001,
"mediaName": "new media",
"mediaId": 700001
}
]"
Element | Description | Type |
code | Shows status of the ad group update operation Values: success , failure | string |
details | Details of the update | string |
mediaId | The unique Id of the media file whose title is changed successfully | integer |
[
{
"code": "success",
"details": "",
"mediaId": 700001
}
]
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 |
Parameter | Description | Type | Required | Possible Values |
advertiserId | The ID of the advertiser | integer | Y | Unique numeric identifier |
mediaId | The unique Id of the media file generated from the notify media upload complete call Note: When an advertiser id and multiple media ids are provided, the service shall return the media details qualifying for the first media id. | integer | N | Unique numeric identifier |
status | The 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. | string | N | Relevant 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 |
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 further explanation on this |
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 (Getting Started Guide) to generate this value |
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"\
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"\
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"\
Element | Description | Type |
mediaId | The unique Id of the media file generated from the notify media upload complete call | integer |
status | Status values: • PENDING • PROCESSING • AVAILABLE • FAILED • LIVED 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 |
details | Details 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. VALIDATION | string |
name | Name of the media | string |
thumbnail | URL for the image snapshot of video | string |
videoUrl | URL of the video file. This URL can be used to download the video file. | string |
captionUrl | URL of the caption file. This URL can be used to download the caption file | string |
attached | Indicator 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 |
confidenceLevel | Indicator 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 process | float |
autoGenerated | Indicator to signify if the closed caption is auto generated or not | boolean |
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)
[
{
"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
}
]
[
{
"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
}
]
[
{
"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
}
]
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/<mediaId>/cc |
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 |
Parameter | Description | Type | Required | Possible Values |
file | Closed caption file to be updated | file | Y | Caption files of .srt /.vtt format |
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 further explanation on this |
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 (Getting Started Guide) to generate this value |
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"'
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"'
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"'
Element | Description | Type |
code | Shows 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 |
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 |
[
{
"code": "success",
"details": "",
"mediaId": 600001,
"captionUrl": "Retrieved captionUrl"
}
]
[
{
"error": "MediaDetails not found."
}
]
[
{
"error": "You do not have write permission to this advertiser"
}
]
Use this endpoint to delete the media file not associated with any video campaigns
You can delete a video file only if it is in “AVAILABLE
” or “FAILED
” status.
Note: Any media file which has been associated with a campaign cannot be deleted
URL: DELETE /api/v1/media/<mediaId> |
Parameter | Description | Type | Required | Possible Values |
advertiserId | The unique id associated with advertiser account | integer | Y | Unique numeric identifier |
Parameter | Description | Type | Required | Possible Values |
mediaId | The unique Id of the media file | integer | Y | Unique numeric identifier |
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 further explanation on this |
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 (Getting Started Guide) to generate this value |
curl -X DELETE \
"https://developer.api.stg.walmart.com/api-proxy/service/WPA/Api/v1/api/v1/media/600001?advertiserId=500001"\
--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"\
curl -X DELETE \
"https://developer.api.stg.walmart.com/api-proxy/service/WPA/Api/v1/api/v1/media/600002?advertiserId=500001"\
--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"\
Element | Description | Type |
code | Possible values of response code: success, failure | string |
details | Details of the error if value of response code is failure. | string |
[
{
"code": "success",
"details": ""
}
]
[
{
"code": "failure",
"details": "The video 600002 cannot be deleted or edited. This
video is currently associated with a campaign."
}
]
There is a rate limit in place on the allowed number of API operations per hour.
Operations per hour are computed as the sum of number of changes requested across all API requests during the hour.
For example, 5 keyword bid changes, creation of an ad group, adding an item, and a snapshot report request in any given hour, would be counted as 8 operations.
You will receive an HTTP 429 status error code and an error message about rule enforced in case of breaking ops limit.
To learn more about current applicable limits specific to your integration, please reach out to the API Partner Enablement team.