Media API Limitations
- Currently, we do not have the capability to delete the media file for an advertiser
- 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 |
auth_token | The token will provide you the access to the API. It is same for all advertisers you access through the API. | string | Y | Please utilize the generated auth_token shared with you at the time of partner onboarding from the Getting Started Guide |
advertiserId | Id of the advertiser, uploading video asset | integer | Y | Unique numeric identifier |
mediaType | The value of mediaType is “video” Note: 1. The file size must be ≤ 500mb 2. The file format must be .MP4 or .MOV 3. The aspect ratio should be 16:9 4. The dimensions must be 1920 x 1080px – 3840 x 2160px 5. The duration must be 5-30 seconds 6. Video codec must be H.264 or H.265 7. Audio codec must be AAC, MP3, PCM 8. Caption file format should be .srt or .vtt 9. Currently, there is no restriction on number of videos that an advertiser can upload for an advertiser account | string | Y | Relevant string value representing the media type |
Header Name | Description | Required | Values |
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_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?auth_token=1234 \
-H "accept: application/json”\
-H "WM_SEC.AUTH_SIGNATURE: ***********" \
-H "WM_CONSUMER.ID: adfwe-v23-faasd2r-afs-asdfqeff" \
-H "WM_CONSUMER.intimestamp: 1565309779" \
-H "Content-Type: application/json" \
-d
"{
"mediaType": "video",
"advertiserId": 500002
}"
curl -X POST \
https://developer.api.stg.walmart.com/api-proxy/service/WPA/Api/v1/api/v1/media/upload?auth_token=1234 \
-H "accept: application/json”\
-H "WM_SEC.AUTH_SIGNATURE: ***********" \
-H "WM_CONSUMER.ID: adfwe-v23-faasd2r-afs-asdfqeff" \
-H "WM_CONSUMER.intimestamp: 1565309779" \
-H "Content-Type: application/json" \
-d
"{
"mediaType": "foo",
"advertiserId": 500002
}"
curl -X POST \
https://developer.api.stg.walmart.com/api-proxy/service/WPA/Api/v1/api/v1/media/upload?auth_token=1234 \
-H "accept: application/json”\
-H "WM_SEC.AUTH_SIGNATURE: ***********" \
-H "WM_CONSUMER.ID: adfwe-v23-faasd2r-afs-asdfqeff" \
-H "WM_CONSUMER.intimestamp: 1565309779" \
-H "Content-Type: application/json" \
-d
"{
"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": ""
}
]
Use this endpoint to:
uploadUrl
and captionUrl
in response of POST
operation Header Name | Description | Required | Values |
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_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"\
-H 'WM_CONSUMER.ID: adfwe-v23-faasd2r-afs-asdfqeff' \
-H 'WM_SEC.KEY_VERSION: 1' \
-H 'WM_SEC.AUTH_SIGNATURE: ***********' \
-H 'WM_CONSUMER.INTIMESTAMP: 1565309779' \
-H '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' \
-H 'WM_CONSUMER.ID: adfwe-v23-faasd2r-afs-asdfqeff' \
-H 'WM_SEC.KEY_VERSION: 1' \
-H 'WM_SEC.AUTH_SIGNATURE: ***********' \
-H 'Content-Type: application/x-subrip' \
-H 'WM_CONSUMER.INTIMESTAMP: 1565309779' \
--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 ad group. Required only if updating existing ad group | 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 that is generated in response to receiving a request for uploading a video asset. | integer | Y | Unique numeric identifier |
Header Name | Description | Required | Values |
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_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?auth_token=1234" \
-H "accept: application/json" \
-H "WM_SEC.AUTH_SIGNATURE: ***********" \
-H "WM_CONSUMER.ID: adfwe-v23-faasd2r-afs-asdfqeff" \
-H "WM_CONSUMER.intimestamp: 1565309779"\
-H "Content-Type: application/json" \
-d
" {
"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) | array |
[
{
"code": "success",
"details": "",
"mediaId": 600001,
"errors": [
{
"message": "message1",
"type": "VALIDATION",
"code": "E_ASPECT_RATIO"
},
{
"message": "message2",
"type": "VALIDATION",
"code": "E_MIN_PIXEL"
}
]
}
]
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 |
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_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?auth_token=1234" \
-H "accept: application/json" \
-H "WM_SEC.AUTH_SIGNATURE: ***********" \
-H "WM_CONSUMER.ID: adfwe-v23-faasd2r-afs-asdfqeff" \
-H "WM_CONSUMER.intimestamp: 1565309779"\
-H "Content-Type: application/json" \
-d
"[
{
"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
, 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 , FAILED , AVAILABLE ) |
Header Name | Description | Required | Values |
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_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?auth_token=1234"\
-H "accept: application/json" \
-H "WM_SEC.AUTH_SIGNATURE: **************"\
-H "WM_CONSUMER.ID: adfwe-v23-faasd2r-afs-asdfqeff" \
-H "WM_CONSUMER.intimestamp: 1565309779"\
-d
"[
{
"mediaId": "600001",
"advertiserId": "500003",
"status": "PENDING"
}
]"
Element | Description | Type |
mediaId | The unique Id of the media file generated from the notify media upload complete call | integer |
status | Status values: PENDING , AVAILABLE , FAILED | string |
details | Details of the media | string |
name | Name of the media | string |
thumbnail | URL for the image snapshot of video | string |
[
{
"mediaId": 500003,
"status": "AVAILABLE",
"details": "details abc",
"name": "abc 4",
"thumbnail": "https://advertising.com"
}
]
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.