Skip to content

Media

Overview

The Media API provides capabilities to upload, modify and fetch video assets.

Usage:

  • To create an allocation to upload a video asset and an optional closed caption file
  • To upload the video asset and closed Caption File to the uploadUrl
  • To accept the video upload notification
  • To fetch the video validation outcome by passing the mediaId of the video asset
  • To update the media file name

Limitations

  • Currently, we do not have the capability to delete the media file for an advertiser
  • We do not support previewing the video file

To understand details about ‘Request Header' or 'Authorization’, please refer to the Authorization Guide

Upload Media

Description: The upload media endpoint is used to create a location to upload a video asset and an optional closed caption file (recommended if the video has spoken words). This location is short-lived and expires in 15 minutes.

End Point: /api/v1/media/upload

HTTP Method: POST

Query Parameters

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”. String Y Relevant string value representing the media type

Note: mediaType paramerter should be follow:

  • The file size must be less than 500 MB.
  • 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 seconds.
  • Video codec must be H.264 or H.265.
  • The audio codec must be AAC, MP3, PC.
  • Caption file format should be .srt or .vtt.
  • Currently, there is no restriction on the number of videos that an advertiser can upload for an advertiser account

Sample Request

curl --location  
 'https://developer.api.us.stg.walmart.com/api-proxy/service/sp/api-sams/v1/api/v1/media/upload?advertiserId={advertiserId}' 
--header 'Authorization: Bearer ************************' 
--header 'Content-Type: application/json' 
--header 'wm_consumer.id: *************' 
--header 'wm_sec.key_version: 2' 
--header 'wm_sec.auth_signature: *************' 
--header 'wm_qos.correlation_id: 12345' 
--header 'wm_consumer.intimestamp: 1702298601000' 
--data '{
    "mediaType": "video",
    "advertiserId": 1234
}'
OkHttpClient client = new OkHttpClient().newBuilder().build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{
    "mediaType": "video",
    "advertiserId": 1234
}");
Request request = new Request.Builder()
  .url("https://developer.api.us.stg.walmart.com/api-proxy/service/sp/api-sams/v1/api/v1/media/upload?advertiserId={advertiserId}")
  .method("POST", body)
  .addHeader("Authorization", "Bearer *********************")
  .addHeader("wm_consumer.id", "*************")
  .addHeader("wm_sec.key_version", "2")
  .addHeader("wm_sec.auth_signature", "*************")
  .addHeader("wm_qos.correlation_id", "12345")
  .addHeader("wm_consumer.intimestamp", "1702298601000")
  .addHeader("Content-Type", "application/json").build();
Response response = client.newCall(request).execute();
const axios = require('axios'); 
let data = JSON.stringify({ 
"mediaType": "video", 
"advertiserId": 1234 
}); 
let config = { 
method: 'post', 
maxBodyLength: Infinity, 

url: 'https://developer.api.us.stg.walmart.com/api-proxy/service/sp/api-sams/v1/api/v1/media/upload?advertiserId={advertiserId}', 

headers: {  
    'wm_consumer.id': '****************',  
    'wm_sec.key_version': '2',  
    'wm_sec.auth_signature': '*************',  
    'wm_qos.correlation_id': '12345',  
    'wm_consumer.intimestamp': '*************',  
    'Content-Type': 'application/json',  
    'Authorization': 'Bearer ****************' 
    }, 
    data : data 
    }; 



axios.request(config) 
.then((response) => { 
console.log(JSON.stringify(response.data)); 
}) 
.catch((error) => { 
console.log(error); 
}); 
import requests 
import json 
url = "https://developer.api.us.stg.walmart.com/api-proxy/service/sp/api-sams/v1/api/v1/media/upload??advertiserId={advertiserId}" 
payload = json.dumps({ 
    "mediaType": "video", 
    "advertiserId": 1234 
})
headers = { 
    'Authorization': 'Bearer *********************************',
    'wm_consumer.id': '************', 
    'wm_sec.key_version': '2', 
    'wm_sec.auth_signature': '************', 
    'wm_qos.correlation_id': '12345', 
    'wm_consumer.intimestamp': '1706708199000', 
    'Content-Type': 'application/json'
} 
response = requests.request("POST", url, headers=headers, data=payload) 
print(response.text) 

Response

Element Description Type
code Possible values of the response code: success or failure String
details Details of the error if 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

Sample Response

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

HTTP Status Code

Status Code Description Possible Error Messages
400 Bad Request
  • Advertiser Id validation failed
  • Invalid media Type
  • Advertiser <advertiserId> is not allowed to use this feature
  • Advertiser Id: <advertiserId> is not eligible for this type of campaign. Please ensure that your brand is registered as an approved brand with brandportal.walmart.com before submitting this campaign create request.
  • You have exceeded the maximum number of 10 media upload requests per account. Please try again later.
  • You have reached the limit of 200 videos, please delete unwanted ones among videos that you own
403 Forbidden
  • User not authenticated
  • AdOps role does not access to any campaigns
  • You do not have write permission to this advertiser
  • Video ads feature is not enabled
429 Too Many Requests <Exception Message>
500 Internal Server Error There was an error processing the request

Upload the Media File to Upload Location

Description

Use this endpoint to

  • Upload the video asset to the uploadUrl
  • Upload the closed caption file to captionUrl. Upload of caption file is optional
  • Request body to include binary data of mp4 or .mov video file

    Note: You receive the uploadUrl and captionUrl in response of POST operation

Sample Request

curl --location --request PUT 
'https://developer.api.us.stg.walmart.com/api-proxy/service/sp/api-sams/v1/api/v1/media/complete' 
--header 'Authorization: Bearer *********************' 
--header 'accept: application/json' 
--header 'WM_SEC.AUTH_SIGNATURE: ***********'
--header 'WM_CONSUMER.ID: ************' 
--header 'WM_CONSUMER.intimestamp: 1565309779'
--header 'Content-Type: application/json' 
--data '{
    "advertiserId": 1234,
    "mediaName": "Sample Video",
    "mediaUploadRequestId": 1234
}'
OkHttpClient client = new OkHttpClient().newBuilder().build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, 
"{
    "advertiserId": 1234,
    "mediaName": "Sample Video",
    "mediaUploadRequestId": 1234
}");
Request request = new Request.Builder()
  .url("https://developer.api.us.stg.walmart.com/api-proxy/service/sp/api-sams/v1/api/v1/media/complete")
  .method("PUT", body)
  .addHeader("Authorization", "Bearer *********************")
  .addHeader("accept", "application/json")
  .addHeader("WM_SEC.AUTH_SIGNATURE", "***********")
  .addHeader("WM_CONSUMER.ID", "************")
  .addHeader("WM_CONSUMER.intimestamp", "1565309779")
  .addHeader("Content-Type", "application/json").build();
Response response = client.newCall(request).execute();
const axios = require('axios'); 
let data = JSON.stringify({ 
"advertiserId": 1234, 
"mediaUploadRequestId": 1234 
"mediaName": "Sample Video" 
    }); 
let config = { 
method: 'put', 
maxBodyLength: Infinity, 

url: 'https://developer.api.us.stg.walmart.com/api-proxy/service/sp/api-sams/v1/api/v1/media/complete', 

headers: {  

    'wm_consumer.id': '****************',  
    'wm_sec.key_version': '2',  
    'wm_sec.auth_signature': '*************',  
    'wm_qos.correlation_id': '12345',  
    'wm_consumer.intimestamp': '*************',  
    'Content-Type': 'application/json',  
    'Authorization': 'Bearer ****************' 
}, 
data : data 
}; 
axios.request(config) 
.then((response) => { 
console.log(JSON.stringify(response.data)); 
}) 
.catch((error) => { 
console.log(error); 

}); 
import requests 
import json 
url = "https://developer.api.us.stg.walmart.com/api-proxy/service/sp/api-sams/v1/api/v1/media/complete" 
payload = json.dumps({ 
    "advertiserId": 1234, 
    "mediaUploadRequestId": 1234, 
    "mediaName": "Sample Video" 
}) 
headers = { 
    'Authorization': 'Bearer ******************',
    'wm_consumer.id': '************', 
    'wm_sec.key_version': '2', 
    'wm_sec.auth_signature': '************', 
    'wm_qos.correlation_id': '12345', 
    'wm_consumer.intimestamp': '1706708199000', 
    'Content-Type': 'application/json',
} 
response = requests.request("PUT", url, headers=headers, data=payload) 
print(response.text) 

Sample Response 1

  • If the video upload is successful - response 201
  • If video upload failure – generic error message

Sample Response 2

  • If closed caption file upload successful – response 201
  • If closed caption file upload failure - generic error message


Complete Media Upload

Description

  • Use this endpoint to accept video upload notification
  • This endpoint is called 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 /api/v1/media endpoint to get details on when the media is available to be used in a campaign.  

End Point: /api/v1/media/complete

HTTP Method: PUT

Query Parameters

Parameter Description Type Required Possible Values
advertiserId The ID of the ad group. Required only if updating an existing ad group. Integer Y Unique numeric identifier
mediaName The title of the video is creative. The maximum file name size is 45 characters and no special characters are 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

Sample Request

curl --location --request PUT 
'https://developer.api.us.stg.walmart.com/api-proxy/service/sp/api-sams/v1/api/v1/media/complete' 
--header 'Authorization: Bearer *********************' 
--header 'wm_consumer.id: *************' 
--header 'wm_sec.key_version: 2' 
--header 'wm_sec.auth_signature: *************' 
--header 'wm_qos.correlation_id: 1235' 
--header 'wm_consumer.intimestamp: 1702298601000' 
--header 'Content-Type: application/json' 
--data '{
    "advertiserId": 1234,
    "mediaName": "Sample Video",
    "mediaUploadRequestId": 1234
}'
OkHttpClient client = new OkHttpClient().newBuilder().build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, 
"{
    "advertiserId": 1234,
    "mediaName": "Sample Video",
    "mediaUploadRequestId": 1234
}");
Request request = new Request.Builder()
  .url("https://developer.api.us.stg.walmart.com/api-proxy/service/sp/api-sams/v1/api/v1/media/complete")
  .method("PUT", body)
  .addHeader("Authorization", "Bearer *********************")
  .addHeader("wm_consumer.id", "*************")
  .addHeader("wm_sec.key_version", "2")
  .addHeader("wm_sec.auth_signature", "*************")
  .addHeader("wm_qos.correlation_id", "12345")
  .addHeader("wm_consumer.intimestamp", "1702298601000")
  .addHeader("Content-Type", "application/json").build();
Response response = client.newCall(request).execute();
const axios = require('axios'); 
let data = JSON.stringify({ 
"advertiserId": 1234,
"mediaUploadRequestId": 1234, 
"mediaName": "Sample Video" 
}); 
let config = { 
method: 'put', 
maxBodyLength: Infinity, 

url: 'https://developer.api.us.stg.walmart.com/api-proxy/service/sp/api-sams/v1/api/v1/media/complete', 

headers: {  
    'wm_consumer.id': '****************',  
    'wm_sec.key_version': '2',  
    'wm_sec.auth_signature': '*************',  
    'wm_qos.correlation_id': '12345',  
    'wm_consumer.intimestamp': '*************',  
    'Content-Type': 'application/json',  
    'Authorization': 'Bearer ****************' 
}, 
data : data 
}; 
axios.request(config) 
.then((response) => { 
console.log(JSON.stringify(response.data)); 
}) 
.catch((error) => { 
console.log(error); 
}); 
import requests 
import json 
url = "https://developer.api.us.stg.walmart.com/api-proxy/service/sp/api-sams/v1/api/v1/media/complete" 
payload = json.dumps({ 
    "advertiserId": 1234, 
    "mediaUploadRequestId": 1234, 
    "mediaName": "Sample Video" 
}) 
headers = { 
    'Authorization': 'Bearer ******************',
    'wm_consumer.id': '************', 
    'wm_sec.key_version': '2', 
    'wm_sec.auth_signature': '************', 
    'wm_qos.correlation_id': '12345', 
    'wm_consumer.intimestamp': '1706708199000', 
    'Content-Type': 'application/json',
} 
response = requests.request("PUT", url, headers=headers, data=payload) 
print(response.text) 

Response

Element Description Type
code Status of the ad group update operation Values: Success or Failure String
details Details of the failure in case of video file/caption file validation error String
mediaId Details of the failure in case of video file/caption file validation error Integer
errors Error description in case of failure. It consists of the following with string datatype: message, type, code Array

Sample Response

[
  {
    "code": "success",
    "details": "",
    "mediaId": 600001,
    "errors": [
      {
        "message": "message1",
        "type": "VALIDATION",
        "code": "E_ASPECT_RATIO"
      },
      {
        "message": "message2",
        "type": "VALIDATION",
        "code": "E_MIN_PIXEL"
      }
    ]
  }
]

HTTP Status Code

Status Code Description Possible Error Messages
200 OK
  • Invalid MediaUploadRequest status
  • Failed to complete the media
400 Bad Request
  • Advertiser Id validation failed
  • mediaUploadRequestId validation failed
  • mediaName validation failed
403 Forbidden
  • User not authenticated
  • AdOps role does not access to any campaigns
  • You do not have write permission to this advertiser
  • Video ads feature is not enabled
  • You don't have access to this advertiser
404 Not Found MediaUploadRequest not found
429 Too Many Requests <Exception Message>
500 Internal Server Error There was an error processing the request

Update the Media Details

Description: Use this endpoint to Update the media file name

End Point: /api/v1/media

HTTP Method: PUT

Query Parameters

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 a maximum size of 45 characters, with 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

Sample Request

curl --location --request PUT  
'https://developer.api.us.stg.walmart.com/api-proxy/service/sp/api-sams/v1/api/v1/media'
--header 'Authorization: Bearer *********************'
--header 'Content-Type: application/json'
--header 'wm_consumer.id: *************'
--header 'wm_sec.key_version: 2'
--header 'wm_sec.auth_signature: *************'
--header 'wm_qos.correlation_id: 12345'
--header 'wm_consumer.intimestamp: 1702298601000'
--data '{
    "advertiserId": 1234,
    "mediaName": "Updated Sample Video",
    "mediaId": 1234
}'
OkHttpClient client = new OkHttpClient().newBuilder().build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, 
"{
    "advertiserId": 1234,
    "mediaName": "Updated Sample Video",
    "mediaId": 1234
}");
Request request = new Request.Builder()
  .url("https://developer.api.us.stg.walmart.com/api-proxy/service/sp/api-sams/v1/api/v1/media")
  .method("PUT", body)
  .addHeader("Authorization", "Bearer *********************")
  .addHeader("wm_consumer.id", "*************")
  .addHeader("wm_sec.key_version", "2")
  .addHeader("wm_sec.auth_signature", "*************")
  .addHeader("wm_qos.correlation_id", "12345")
  .addHeader("wm_consumer.intimestamp", "1702298601000")
  .addHeader("Content-Type", "application/json").build();
Response response = client.newCall(request).execute();
const axios = require('axios'); 
let data = JSON.stringify({ 
"advertiserId": 1234, 
"mediaName": "Updated Sample Video", 
"mediaId": 1234 
}); 
let config = { 
method: 'put', 
maxBodyLength: Infinity, 

url: 'https://developer.api.us.stg.walmart.com/api-proxy/service/sp/api-sams/v1/api/v1/media', 

headers: {  
    'wm_consumer.id': '****************',  
    'wm_sec.key_version': '2',  
    'wm_sec.auth_signature': '*************',  
    'wm_qos.correlation_id': '12345',  
    'wm_consumer.intimestamp': '*************',  
    'Content-Type': 'application/json',  
    'Authorization': 'Bearer ****************' 
}, 
data : data 
}; 
axios.request(config) 
.then((response) => { 
console.log(JSON.stringify(response.data)); 
}) 
.catch((error) => { 
console.log(error); 

}); 
import requests 
import json 
url = "https://developer.api.us.stg.walmart.com/api-proxy/service/sp/api-sams/v1/api/v1/media" 
payload = json.dumps({ 
    "advertiserId": 1234, 
    "mediaName": "Updated Sample Video", 
    "mediaId": 1234 
}) 
headers = { 
    'Authorization': 'Bearer ******************',
    'wm_consumer.id': '************', 
    'wm_sec.key_version': '2', 
    'wm_sec.auth_signature': '************', 
    'wm_qos.correlation_id': '12345', 
    'wm_consumer.intimestamp': '1706708199000', 
    'Content-Type': 'application/json'
} 
response = requests.request("PUT", url, headers=headers, data=payload) 
print(response.text) 

Response

Element Description Type
code Status of the ad group update operation Values: success or Failure String
details Details of the update String
mediaId The unique Id of the media file whose title is changed successfully Integer

Sample Response

[
  {
     "code": "success",
     "details": "",
     "mediaId": 700001
  }
]

HTTP Status Code

Status Code Description Possible Error Messages
400 Bad Request
  • Advertiser Id validation failed
  • mediaId validation failed
  • mediaName validation failed
403 Forbidden
  • User not Authenticated
  • Video ads feature is not enabled
  • AdOps role does not access to any campaigns
  • You do not have write permission to this advertiser
  • You don't have access to this advertiser
404 Not Found MediaDetails not found
429 Too Many Requests <Exception Message>
500 Internal Server Error There was an error processing the request

List All the Media

Description:

  • This endpoint is used to fetch the video validation outcome by passing the mediaId of the video asset. It polls Sam's Club system to check the video validation status and returns the result.
  • For a video asset to be associated with 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 that it is available for usage in a Sponsored Video campaign. The validated video asset represents the video profile.
  • The background processing can take approximately take ~30 minutes to complete. 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.

End Point: /api/v1/media

HTTP Method: GET

Query Parameters

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)

Sample Request

1
2
3
4
5
6
7
8
9
curl --location 
'https://developer.api.us.stg.walmart.com/api-proxy/service/sp/api-sams/v1/api/v1/media?advertiserId={advertiserId}' 
--header 'Authorization: Bearer *********************'
--header 'wm_consumer.id: ***********'
--header 'wm_sec.key_version: 2' 
--header 'wm_sec.auth_signature: ***********'
--header 'wm_qos.correlation_id: 12345' 
--header 'wm_consumer.intimestamp: 1703583174000'
--data '' 
OkHttpClient client = new OkHttpClient().newBuilder().build(); 
MediaType mediaType = MediaType.parse("text/plain"); 
RequestBody body = RequestBody.create(mediaType, ""); 
Request request = new Request.Builder() 
 .url("https://developer.api.us.stg.walmart.com/api-proxy/service/sp/api-sams/v1/api/v1/media?advertiserId={advertiserId}") 
 .method("GET", body)
 .addHeader("Authorization", "Bearer *********************")
 .addHeader("wm_consumer.id", "***********") 
 .addHeader("wm_sec.key_version", "2") 
 .addHeader("wm_sec.auth_signature", "***********") 
 .addHeader("wm_qos.correlation_id", "12345") 
 .addHeader("wm_consumer.intimestamp", "1703583174000").build(); 
Response response = client.newCall(request).execute(); 
const axios = require('axios'); 
let data = ''; 
let config = { 
method: 'get', 
maxBodyLength: Infinity, 

url: 'https://developer.api.us.stg.walmart.com/api-proxy/service/sp/api-sams/v1/api/v1/media?advertiserId={advertiserId}', 

headers: {  
    'wm_consumer.id': '****************',  
    'wm_sec.key_version': '2',  
    'wm_sec.auth_signature': '*************',  
    'wm_qos.correlation_id': '12345',  
    'wm_consumer.intimestamp': '*************',  
    'Authorization': 'Bearer ****************' 
}, 
data : data 
}; 
axios.request(config) 
.then((response) => { 
console.log(JSON.stringify(response.data)); 
}) 
.catch((error) => { 
console.log(error); 
}); 
import requests 
url = "https://developer.api.us.stg.walmart.com/api-proxy/service/sp/api-sams/v1/api/v1/media?advertiserId={advertiserId}" 
payload = {}
headers = { 
    'Authorization': 'Bearer *********************************',
    'wm_consumer.id': '************', 
    'wm_sec.key_version': '2', 
    'wm_sec.auth_signature': '************', 
    'wm_qos.correlation_id': '12345', 
    'wm_consumer.intimestamp': '1706708199000'
} 
response = requests.request("GET", url, headers=headers, data=payload) 
print(response.text) 

Response

Element Description Type
mediaId The unique Id of the media file generated from the notify media upload complete call Integer
status Expected 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

Sample Response

[
   {
      "mediaId": 500003,
      "status": "AVAILABLE",
      "details": "details abc",
      "name": "abc 4",
      "thumbnail": "https://advertising.com"
   }
]

Sample Response - Validation Failure

[
  {
      "mediaId": 123456,
      "status": "FAILED",
      "details": "[{\"validationReason\":\"Video file is empty.\",\"resourceType\":\"VIDEO\",\"code\":\"E_EMPTY_VIDEO\",\"message\":\"Video file is empty.\",\"type\":\"VALIDATION\"}]",
      "name": "sample",
      "thumbnail": "https://advertising.com",
      "videoUrl": "{media-url}",
      "captionUrl": "{cc-url}",
      "confidenceLevel": 0.0,
      "attached": false,
      "autoGenerated": false
  }
]

Additional Validation Error Codes

Status Code Validation Error Description
E_BITRATE_KBPS_NOT_POSITIVE [{"validationReason": "Video bitrate kbps should be greater than zero.","resourceType": "VIDEO","code": "E_BITRATE_KBPS_NOT_POSITIVE", "message": "Video bitrate kbps should be greater than 0.", "type": "VALIDATION"}]
E_BAD_CAPTION [{"validationReason": "Closed caption data is invalid. FFProbe identified it as bad closed caption data.","resourceType": "CAPTION","code": "E_BAD_CAPTION","message": "Closed caption data is invalid. FFProbe identified it as bad closed caption data.","type": "VALIDATION"}]
E_MAX_DURATION_SECONDS [{"validationReason": "Video is longer than max duration requirement. Value x is greater than upper bound 45.","resourceType": "VIDEO","code": "E_MAX_DURATION_SECONDS","meta": {"maximumValue": "45","actualValue": "x"},"message": "Video longer than maxDurationSeconds. Value x is greater than upper bound 45.","type": "VALIDATION"}]
E_MIN_FRAME_RATE_PER_SECOND [{"validationReason": "Video frame rate is less than minimum frame rate per second requirement. Value x is less than lower bound 15.0.","resourceType": "VIDEO","code": "E_MIN_FRAME_RATE_PER_SECOND","meta": {"minimumValue": "15.0","actualValue": "x"},"message": "Video frame rate less than minFrameRatePerSecond. Value x is less than lower bound 15.0.","type": "VALIDATION"}]
E_SUPPORTED_CONTAINERS [{"validationReason": "Unsupported container. None of the container formats jpeg_pipe were in the list of supported container formats: matroska, mp3, mp4, wav, avi, webm, mov.","resourceType": "VIDEO","code": "E_SUPPORTED_CONTAINERS","meta": {"actualValues": ["jpeg_pipe"],"expectedValues": ["matroska","mp3","mp4","wav","avi","webm","mov"]},"message": "Unsupported container. None of the container formats jpeg_pipe were in the list of supported container formats: matroska, mp3, mp4, wav, avi, webm, mov","type": "VALIDATION"}]
E_MIN_VIDEO_BITRATE_KBPS [{"validationReason": "Video bitrate is less than minimum video bitrate kbps requirement. Value x is less than lower bound 512.","resourceType": "VIDEO","code": "E_MIN_VIDEO_BITRATE_KBPS","meta": {"minimumValue": "512","actualValue": "x"},"message": "Video bitrate less than minVideoBitrateKbps. Value x is less than lower bound 512.","type": "VALIDATION"}]
E_MIN_WIDTH_PIXELS [{"validationReason": "Video is narrower than minimum pixel width requirement. Value x is less than lower bound 1280.","resourceType": "VIDEO","code": "E_MIN_WIDTH_PIXELS","meta": {"minimumValue": "1280","actualValue": "x"},"message": "Video narrower than minWidthPixels. Value x is less than lower bound 1280.","type": "VALIDATION"}]
E_MIN_DURATION_SECONDS [{"validationReason": "Video is shorter than minimum duration requirement. Value x is less than lower bound 5.","resourceType": "VIDEO","code": "E_MIN_DURATION_SECONDS","meta": {"actualValue": "x","minimumValue": "5"},"message": "Video shorter than minDurationSeconds. Value x is less than lower bound 5.","type": "VALIDATION"}]
E_CAPTION_CUE [{"validationReason": "Closed caption cue data is invalid. Cue identifier cannot be standalone: 'npm ERR! A complete log of this run can be found in: debug.log'.","resourceType": "CAPTION","code": "E_CAPTION_CUE","message": "Closed caption cue data is invalid. Cue identifier cannot be standalone: 'npm ERR! A complete log of this run can be found in: debug.log'.","type": "VALIDATION"}]
E_SUPPORTED_VIDEO_CODECS [{"validationReason": "Unsupported video codec. Unsupported video codec mjpeg. The supported video codecs are: dnxhd, mpeg1video, mpeg4, h261, hevc, h263, h264, vp8, vp9, dvvideo, mpeg2video, prores, theora, vc1.","resourceType": "VIDEO","code": "E_SUPPORTED_VIDEO_CODECS","meta": {"actualValue": "mjpeg","expectedValues": ["dnxhd","mpeg1video","mpeg4","h261","hevc","h263","h264","vp8","vp9","dvvideo","mpeg2video","prores","theora","vc1"]},"message": "Unsupported video codec. Unsupported video codec mjpeg. The supported video codecs are: dnxhd, mpeg1video, mpeg4, h261, hevc, h263, h264, vp8, vp9, dvvideo, mpeg2video, prores, theora, vc1","type": "VALIDATION"}]
E_ASPECT_RATIO [{"validationReason": "Video does not match aspect ratio requirement. m:n is not 16:9.","resourceType": "VIDEO","code": "E_ASPECT_RATIO","meta": {"expectedValue": "16:9","actualValue": "m:n"},"message": "Video does not match aspectRatio. m:n is not 16:9.","type": "VALIDATION"}]
E_VIDEO_STREAM_COUNT [{"message": "There must be exactly one video stream. The provided video had 0 video streams.","type": "VALIDATION","code": "E_VIDEO_STREAM_COUNT"}]
E_EMPTY_VIDEO {[{"validationReason": "Video file is empty.","resourceType": "VIDEO","code": "E_EMPTY_VIDEO","message": "Video file is empty.","type": "VALIDATION"}]
E_MIN_HEIGHT_PIXELS [{"validationReason": "Video is shorter than minimum pixel height requirement. Value x is less than lower bound 720.","resourceType": "VIDEO","code": "E_MIN_HEIGHT_PIXELS","meta": {"minimumValue": "720","actualValue": "x"},"message": "Video shorter than minHeightPixels. Value x is less than lower bound 720.","type": "VALIDATION"}]
E_MIN_AUDIO_BITRATE_KBPS [{"validationReason": "Audio bit rate is less than minimum audio bitrate kbps requirement. Value x is less than lower bound 64.","resourceType": "VIDEO","code": "E_MIN_AUDIO_BITRATE_KBPS","meta": {"minimumValue": "64","actualValue": "x"},"message": "Audio bitrate less than minAudioBitrateKbps. Value x is less than lower bound 64.","type": "VALIDATION"}]
E_VIDEO_DURATION_NOT_POSITIVE [{"validationReason": "Video duration should be greater than zero.","resourceType": "VIDEO","code": "E_VIDEO_DURATION_NOT_POSITIVE","message": "Video duration should be greater than 0.","type": "VALIDATION"}]
E_BAD_VIDEO [{"validationReason": "Failed to decode video.","resourceType": "VIDEO","code": "E_BAD_VIDEO","message": "Failed to decode video.","type": "VALIDATION"}]
E_SUPPORTED_AUDIO_CODECS [{"validationReason": "Unsupported audio codec. The audio codec xyz is Unsupported. The supported audio codecs are: mp3, ac3, aac, vorbis, wmav1, wmav2, eac3, opus.","resourceType": "VIDEO","code": "E_SUPPORTED_AUDIO_CODECS","meta": {"expectedValues": ["mp3","ac3","aac","vorbis","wmav1","wmav2","eac3","opus"],"actualValue": "xyz"},"message": "Unsupported audio codec. The audio codec xyz is Unsupported. The supported audio codecs are: mp3, ac3, aac, vorbis, wmav1, wmav2, eac3, opus","type": "VALIDATION"}]
E_MAX_FILE_SIZE_MB [{"validationReason": "Video file size is greater than max file size requirement. Value x is greater than upper bound 500.","resourceType": "VIDEO","code": "E_MAX_FILE_SIZE_MB","meta": {"maximumValue": "500","actualValue": "x"},"message": "Video file size greater than maxFileSizeMB. Value x is greater than upper bound 500.","type": "VALIDATION"}]
E_VTT_CAPTION [{"validationReason": "VTT closed caption data is invalid. Couldn't find blank line between header and content or content is empty.","resourceType": "CAPTION","code": "E_VTT_CAPTION","message": "VTT closed caption data is invalid. Couldn't find blank line between header and content or content is empty.","type": "VALIDATION"}]

HTTP Status Code

Status Code Description Possible Error Messages
400 Bad Request advertiserId not found in request
403 Forbidden
  • User not authenticated
  • AdOps role does not access to any campaigns
  • You do not have write permission to this advertiser
  • Video ads feature is not enabled
404 Not Found MediaDetails not found
429 Too Many Requests <Exception Message>
500 Internal Server Error There was an error processing the request