Reject recommendations API

Overview

The Reject recommendations API lets you reject items Walmart recommends. If you reject a recommended item, you won’t see it again.

Endpoint

PUT https://marketplace.walmartapis.com/v3/growth/assortment/recommendations/rejections 

Functionality

This API helps to:

  • Remove items from brands and categories that are no longer relevant
  • Eliminate duplicate and unwanted opportunities
  • Clean up recommendation dashboards

Request sample Reject item recommendations based on filters

curl --request PUT \ --url https://marketplace.walmartapis.com/v3/growth/assortment/recommendations/rejections \ --header 'accept: application/json' \ --header 'content-type: application/json' \ --data '
{ "recommendationType": "ITEM", "filterCriteria": { "multiValueFilter": [ { "parameter": "BRAND", "values": [ "Disney", "NINTENDO" ] }, { "parameter": "CATEGORY", "values": [ "Toys" ] }, { "parameter": "PRODUCT_TYPE", "values": [ "Action Figure Sets", "Power Tool Batteries", "Action Figures" ] } ], "enumFilter": [ { "parameter": "ITEM_AVAILABILITY_STATUS", "values": [ "NEW_TO_WALMART", "EXISTING_IN_WALMART" ] }, { "parameter": "SHOPPING_TRENDS", "values": [ "MOST_SEARCHED_FOR", "BEST_SELLERS", "DEAL_ITEMS" ] }, { "parameter": "DEMAND_SALES_TRENDS", "values": [ "DEC", "APR", "NOV", "MAR" ] } ], "rangeFilter": [ { "parameter": "PRICE", "to": 3 } ] }, "rejectionCodes": [ "NOT_SELLING_THESE_ITEMS", "OTHER_REASON" ], "customRejectionMessage": "Removal of this item from other marketplace is in progress"
}
'
import requests url = "https://marketplace.walmartapis.com/v3/growth/assortment/recommendations" headers = { "accept": "application/json", "content-type": "application/json", # Include your auth + required Walmart headers as applicable in your integration.
} payload = { "recommendationType": "ITEM", "meta": {"limit": 2}
} resp = requests.post(url, headers=headers, json=payload, timeout=30)
resp.raise_for_status()
print(resp.json())

Request sample Reject item recommendations based on unique identifier

curl --request PUT \ --url https://marketplace.walmartapis.com/v3/growth/assortment/recommendations/rejections \ --header 'accept: application/json' \ --header 'content-type: application/json' \ --data '
{ "recommendationType": "ITEM", "itemRecommendationUniqueIds": [ "000166eb-7e67-4a20-96f0-9242db499q1c", "47044c4f-ccb0-4b4e-8f05-20d34209fd13" ], "rejectionCodes": [ "NOT_SELLING_THESE_ITEMS" ]
}
'
import requests url = "https://marketplace.walmartapis.com/v3/growth/assortment/recommendations" headers = { "WM_GLOBAL_VERSION": "3.1", "WM_MARKET": "us", "accept": "application/json", "content-type": "application/json", # Include your auth + required Walmart headers as applicable in your integration.
} payload = { "recommendationType": "ITEM", "meta": { "limit": 4, "nextCursor": "AoRYPgVANXFt6AeR8QUAAAAAAAAAADkxMDEwMDMwNTZBTkRBTkRCMDg3WVYxOU05" }, "filterCriteria": { "searchText": "and", "multiValueFilter": [ {"parameter": "BRAND", "values": ["Disney", "NINTENDO"]}, {"parameter": "CATEGORY", "values": ["Toys"]}, {"parameter": "PRODUCT_TYPE", "values": ["Action Figure Sets", "Power Tool Batteries", "Action Figures"]}, ], "enumFilter": [ {"parameter": "ITEM_AVAILABILITY_STATUS", "values": ["NEW_TO_WALMART", "EXISTING_IN_WALMART"]}, {"parameter": "SHOPPING_TRENDS", "values": ["MOST_SEARCHED_FOR", "BEST_SELLERS", "DEAL_ITEMS"]}, {"parameter": "DEMAND_SALES_TRENDS", "values": ["DEC", "APR", "NOV", "MAR"]}, ], "rangeFilter": [ {"parameter": "PRICE", "from": "1.0", "to": "3.5"} ], "isTopGoGetItem": True, "isNewRecommendation": True, },
} resp = requests.post(url, headers=headers, json=payload, timeout=30)
resp.raise_for_status()
print(resp.json())

Modify your code

1️. Add authentication headers

Include required Walmart Marketplace authentication headers:

\--header 'Authorization: Bearer \<ACCESS_TOKEN>' \\ \--header 'WM_CONSUMER.ID: \<CONSUMER_ID>' \\ \--header 'WM_QOS.CORRELATION_ID: <unique-id>'

2️. Choose your rejection strategy

You can reject recommendations using:

  • Filter rejection: Bulk remove recommendations with filter criterion
  • ID rejection: Removing specific IDs from your recommendation records

Response sample

{ "payload": { "message": "The selected items will be removed shortly from the recommendations." }
}

Result

  • The specified recommendations are removed.
  • theThe API confirms processing was successful.
  • Rejected recommendations aren't in future recommendation retrieval calls.
  • You can use the rejection filter on multiple items at once.

Next steps