Skip to content

Review

Overview

Review API is used for fetching reviews for a specific advertiser.

Usage:

  • To retrieve and update the list of all the advertising items added to the campaign catalog
  • Helps in streamlining the campaign creation process and makes it easier to optimize campaigns

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

Fetch Reviews for Advertisers

Description: Fetch reviews that have been submitted for an advertiser

End Point: /api/v1/review

HTTP Method: GET

Query Parameters

Parameter Description Type Required Possible Values
advertiserId The ID of the advertiser for whom the review(s) should be returned Integer N Unique numeric identifier
adGroupId ID of the ad group for whom the review(s) should be returned. Can fetch only reviews for a specific adgroup within the advertiser by specifying this parameter Integer N Unique numeric identifier

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/review'
--header 'Authorization: Bearer **************' 
--header 'accept: application/json'
--header 'WM_SEC.AUTH_SIGNATURE: ***********' 
--header 'WM_SEC.KEY_VERSION: 2' 
--header 'WM_CONSUMER.ID:***********' 
--header 'wm_qos.correlation_id: 12345' 
--header 'wm_consumer.intimestamp: 1707205605000' 
 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/review") 
 .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", "1707205605000") 
 .build(); 
 Response response = client.newCall(request).execute(); 
const axios = require('axios'); 
let config = { 
method: 'get', 
maxBodyLength: Infinity, 

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

headers: {  
    'wm_consumer.id': '****************',  
    'wm_sec.key_version': '2',  
    'wm_sec.auth_signature': '******************',  
    'wm_qos.correlation_id': '12345',  
    'wm_consumer.intimestamp': '******************',  
    'Authorization': 'Bearer ****************' 
} 
}; 
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/review" 
payload = {}
headers = {
'Authorization': 'Bearer ***************' 
'wm_consumer.id': '************',
'wm_sec.key_version': '2',
'wm_sec.auth_signature': '************',
'wm_qos.correlation_id': '12345',
'wm_consumer.intimestamp': '1707205605000'
    }
 response = requests.request("GET", url, headers=headers, data=payload)
 print(response.text)

Response

Element Description Type
reviewId ID of the review Integer
campaignId ID of the campaign Integer
adGroupId ID of the ad group Integer
reviewStatus State of the review; "pending", "in progress", or "complete" String
reviewComments Feedback comments from AdOps on invalid content.
Contains the "commentType"(attribute that comment is for) and "comment"(reason that attribute was rejected)
Dictionary of string

Sample Response

[
    {
        "reviewId": 20019,
        "campaignId": 26539,
        "adGroupId": 27694,
        "reviewStatus": "complete",
        "reviewComments":
        [
            {
                "commentType": "content",
                "comments": "P03017048 Item no longer in stock"
            },
            {
                "commentType": "keyword",
                "comments": "\"dumb\" inappropriate language"
            }
        ]
    }
]

HTTP Status Code

Status Code Description Possible Error Messages
400 Bad Request advertiserId not found in request
403 Not Found
  • User not Authenticated
  • You do not have access to view this advertiser
429 Too Many Requests <Exception Message>
500 Internal Server Error There was an error processing the request

Submit a Review for AdGroup

Description: Submit a review for a newly created AdGroup or for changes to an existing AdGroup

URL: /api/v1/review

HTTP Method: POST

Body Parameters

Parameter Description Type Required Possible Values
campaignId ID of the campaign this ad group belongs to Integer Y Unique numeric identifier
adGroupId ID of the adgroup Integer Y A valid adgroup ID

Sample Request

 curl --location  
'https://developer.api.us.stg.walmart.com/api-proxy/service/sp/api-sams/v1/api/v1/review'
--header 'Authorization: Bearer **************' 
--header 'Content-Type: application/json'
--header 'accept: application/json' 
--header 'WM_SEC.AUTH_SIGNATURE: **************' 
--header 'WM_SEC.KEY_VERSION: 2' 
--header 'WM_CONSUMER.ID: **************' 
--header 'wm_qos.correlation_id: 12345'  
--header 'wm_consumer.intimestamp: 1707205605000'  
--data '[{
            "campaignId": 1234,
            "adGroupId": 1234
        }]'
OkHttpClient client = new OkHttpClient().newBuilder().build(); 
MediaType mediaType = MediaType.parse("application/json"); 
RequestBody body = RequestBody.create(mediaType, 
"[{
    "campaignId": 1234,
    "adGroupId": 1234
}]"); 
Request request = new Request.Builder() 
 .url("https://developer.api.us.stg.walmart.com/api-proxy/service/sp/api-sams/v1/api/v1/review") 
 .method("POST", body)
 .addHeader("Authorization", "Bearer ***********")
 .addHeader("Content-Type", "application/json")  
 .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", "1707205605000") 
 .build();  
 Response response = client.newCall(request).execute(); 
const axios = require('axios'); 
let data = JSON.stringify([ 
{ 
    "campaignId": 1234, 
    "adGroupId": 1234 
} 
]); 
let config = { 
method: 'post', 
maxBodyLength: Infinity, 

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

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

url = "https://developer.api.us.stg.walmart.com/api-proxy/service/sp/api-sams/v1/api/v1/review" 
payload = json.dumps([
{
    "campaignId": 1234,
    "adGroupId": 1234
}]) 

headers = {
'Authorization': 'Bearer ***************',
'Content-Type': 'application/json',
'wm_consumer.id': '************',
'wm_sec.key_version': '2',
'wm_sec.auth_signature': '************',
'wm_qos.correlation_id': '12345',
'wm_consumer.intimestamp': '1707205605000'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)

Response

Element Description Type
code Possible values of response code: success, failure String
details Details of the response code.
Response message for success: ""
Response message for failure: "Another Review is in pending or in progress state"
String
reviewId ID of the review Integer

Sample Response

[
    {
        "code": "success",
        "details": "",
        "reviewId": 12345
    }
]

HTTP Status Code

Status Code Description Possible Error Messages
400 Bad Request
  • Maximum allowed size in batch is 50
  • Campaign Id validation failed
  • AdGroup Id validation failed
  • Multiple request for same item id within ad group is not allowed
  • Another Review is in pending or inProgress state
  • No Entity in pending state
403 Not Found
  • User not Authenticated
  • You do not have access to view this advertiser
  • You are not authorized to submit review for this ad group
404 Not Found
  • AdGroup not found
  • Campaign not found
429 Too Many Requests <Exception Message>
500 Internal Server Error
  • There was an error processing the request

Cancel Review

Description: Review can only be canceled if it is in a 'Pending' state

URL: /api/v1/review

HTTP Method: PUT

Body Parameters

Parameter Description Type Required Possible Values
adGroupId ID of the adgroup the review belongs to Integer Y Unique numeric identifier
campaignId ID of the campaign the adgroup belongs to Integer Y Unique numeric identifier
reviewId ID of the review that is to be cancelled 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/review' 
 --header 'Authorization: Bearer **************' 
 --header 'Content-Type: application/json' 
 --header 'accept: application/json' 
 --header 'WM_SEC.AUTH_SIGNATURE: ***********' 
 --header 'WM_SEC.KEY_VERSION: 2' 
 --header 'wm_sec.auth_signature: ******************' 
 --header 'wm_qos.correlation_id: 12345' 
 --header 'wm_consumer.intimestamp: 1707205605000' 
 --data '[{
        "campaignId": 1234,
        "adGroupId": 1234,
        "reviewId": 1234
    }]'
OkHttpClient client = new OkHttpClient().newBuilder().build(); 
MediaType mediaType = MediaType.parse("application/json"); 
RequestBody body = RequestBody.create(mediaType, 
"[{
    "campaignId": 1234,
    "adGroupId": 1234,
    "reviewId": 1234
}]"); 
Request request = new Request.Builder() 
  .url("https://developer.api.us.stg.walmart.com/api-proxy/service/sp/api-sams/v1/api/v1/review")    
 .method("PUT", body) 
 .addHeader("Authorization", "Bearer ***********")  
 .addHeader("Content-Type", "application/json")
 .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", "1707205605000") 
 .build(); 
Response response = client.newCall(request).execute(); 
const axios = require('axios'); 
let data = JSON.stringify([ 
{ 
    "campaignId": 1234, 
    "adGroupId": 1234, 
    "reviewId": 1234 
} 
]); 
let config = { 
method: 'put', 
maxBodyLength: Infinity, 

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

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

url = "https://developer.api.us.stg.walmart.com/api-proxy/service/sp/api-sams/v1/api/v1/review" 
payload = json.dumps([
{
    "campaignId": 1234,
    "adGroupId": 1234,
    "reviewId": 1234
}])

headers = {
'Authorization': 'Bearer ***************',
'Content-Type': 'application/json',
'wm_consumer.id': '************',
'wm_sec.key_version': '2',
'wm_sec.auth_signature': '************',
'wm_qos.correlation_id': '12345',
'wm_consumer.intimestamp': '1707205605000'
}
response = requests.request("PUT", url, headers=headers, data=payload)
print(response.text)

Response

Element Description Type
code Status of the request to cancel the review,Expected values: success, failure String
details Details of the action to cancel. Expected values: Success String
reviewId ID of the review that is to be cancelled Integer

Sample Response

[
    {
        "code": "success",
        "details": "", 
        "reviewId": 12345
    },
    {
        "code": "failure",
        "details": "AdGroupReview not found", 
        "adGroupId": 54321
    }
]

HTTP Status Code

Status Code Description Possible Error Messages
400 Bad Request
  • Maximum allowed size in batch is 50
  • Campaign Id validation failed
  • AdGroup Id validation failed
  • Multiple request for same item id within ad group is not allowed
  • Another Review is in pending or inProgress state
  • No Entity in pending state
403 Not Found
  • User not Authenticated
  • You do not have access to view this advertiser
  • You are not authorized to submit review for this ad group
404 Not Found
  • AdGroup not found
  • Campaign not found
429 Too Many Requests <Exception Message>
500 Internal Server Error
  • There was an error processing the request