Searching Item from Walmart Catalog Error 406 Not Acceptable "code": "INVALID_ACCEPT_TYPE.GMP_ITEM_QUERY_API" "info": "Accept type is invalid."
The Walmart Item Search API allows us to query the Walmart.com global product catalog by item keyword, UPC or GTIN.
API CALL
GET https://marketplace.walmartapis.com/v3/items/walmart/search?query=ipad WM_SVC.NAME: 4PSite WM_QOS.CORRELATION_ID: {{$guid}} Authorization: Basic NDdmNzA4MY0LdfgfgdfghMThlNDQwOkRQZFRRYTdpZ3GDFGDFRFDGDFGETmRsVEZPOHZPRCYUw0RHRXM296VGlsVXFaZFZmTHpTdVNsdfdsafadfgesgdfg0.... WM_SEC.ACCESS_TOKEN: eyJraWQiOiI3NGU2ODE4Mi1iMzJkLTQ4ZDEtYThjOS03YjMyNDljMTk1NmQiLCJlbmMiOiJBMjU2R0NNIiwiYWxnIjoiZGlyIn0..EzxhCQ9QIKhWMvdI._uvEAJGZtvfjX7AbwGd.....
API CALL ERROR
"error": [
{
"code": "INVALID_ACCEPT_TYPE.GMP_ITEM_QUERY_API",
"info": "Accept type is invalid.",
"severity": "ERROR",
"category": "DATA",
"causes": [],
"identify": {
"entry": []
}
}
Need help...
Image: Error Result of Postman call
CodePudding user response:
As mentioned in my comment, try adding the header "Accept" as "application/json" and it should work.
For more context, it is a GET call and "Accept" is more relevant than the Content-Type which is mostly associated with POST/PUT calls that take body as well.