Accept type is invalid , INVALID_ACCEPT_TYPE.GMP_ITEM_QUERY_API ( Walmart ItemSearch API Error ) - api

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

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.

Related

Sharing debuger from Graph API not working

I am sending a POST request to the API with data as on this page https://developers.facebook.com/docs/sharing/opengraph/using-objects
"id" : <domain>,
"scrape": True,
"access_token" : <token>
But in response I get an error
{
"error": {
"message": "Unsupported post request. Object with ID '<domain>' does not exist,
cannot be loaded due to missing permissions, or does not support this
operation. Please read the Graph API documentation at ...",
"type": "GraphMethodException",
"code": 100,
"error_subcode": 33,
"fbtrace_id": "A4szfMq_LpEo8ne_xipo3ky"
},
"__fb_trace_id__":"An9T1FjDJD2",
"__www_request_id__":"A4szfMq_LpEo8ne_xipo3ky"
}

Shopware Product API response with no content and error 204 (No Content) Error

So while trying to test how to create a product, with as minimal data as possible, using the Shopware 6 API i get a Status 204 (No Content) response with an empty response.
When i press "Send" again i get a Status 400 error with this message:
{
"errors": [{
"status": "400",
"code": "CONTENT__DUPLICATE_PRODUCT_NUMBER",
"title": "Bad Request",
"detail": "Product with number \u002212345667891\u0022 already exists.",
"meta": {
"parameters": {
"number": "12345667891"
}
}
}]
}
When i check the Shopware Backend and search for the product, i get no result.
When i try searching the MySQL Product-Tables i get no result aswell.
Iam using this site: https://reqbin.com/
And I call the URL: https://www.my-url.de/api/product via POST Request.
As authorization i use a bearer token i grab from the getToken GET-Request.
My Request-Content looks like the following:
{
"name": "Aarons Testartikel of Doom",
"taxId": "f68a9c3c86864c2ea7597062fc457cf7",
"price": 3,
"productNumber": "12345667891",
"stock": 5,
"active": true
}
The 204 status code you get on your first request indicates that the request was handled successful. According to the HTTP-Standard all 2xx status codes can be considered successful. Shopware by default returns a 204 - No Content with en empty response body to all write requests over the API, but you can provide a _response query parameter to your POST-Request and Shopware will return a 200 response with the same data you'll get if you make a GET-Request to read the data of the added product.
In your case the URL would be https://www.my-url.de/api/product?_response=1.
The reason for the Error on the second request is that the product number needs to be unique, so you can't add another product with the same product number. Changing the product number before you do the second request should work again.
The Error also indicates that the first Write-Request was indeed successful, to make sure that your shopware installation is connected to the Database you think it is, you can check the .env file in the root folder of your installation, there should be a DATABASE_URL variable defined.

Walmart API Error: WM_CONSUMER.CHANNEL.TYPE set null or invalid

My client has a Walmart marketplace store and we are trying figure out how to successfully make the Walmart API's Multiple Item Inventory for All Ship Nodes API call.
The API production URL is :
https://marketplace.walmartapis.com/v3/inventories
The purpose of this call is getting the inventory of the store using the API.
Unfortunately, we are stuck because we don't know what value to put for WM_CONSUMER.CHANNEL.TYPE.
As a result, the API response is unsuccessful and gives this error:
{
"error": [
{
"code": "INVALID_REQUEST_HEADER.GMP_GATEWAY_API",
"field": "WM_CONSUMER.CHANNEL.TYPE",
"description": "WM_CONSUMER.CHANNEL.TYPE set null or invalid",
"info": "One or more request headers are invalid.",
"severity": "ERROR",
"category": "DATA",
"causes": [],
"errorIdentifiers": {}
}
]
}
Where can the value of WM_CONSUMER.CHANNEL.TYPE be found?
I had the same exact issue. I had to open a ticket with support to get the WM_CONSUMER.CHANNEL.TYPE.
Just an FYI, this didn't solve the problem as the value they gave us still resulted in the API returning the same error code.

HTTP 500 on Podio GET item

When fetching GET https://api.podio.com/item/1259778758 (other items work fine), I get the following error:
HTTP 500
with response body:
{
"error_parameters": {},
"error_detail": null,
"error_propagate": false,
"request": {
"url": "http://api.podio.com/item/1259778758",
"query_string": "",
"method": "GET"
},
"error_description": "An unexpected error occured during execution",
"error": "unexpected"
}
I assume this is due to some field value, but cannot figure this out. Can you please check an fix this?
Additional notes:
It is not possible to open this item in the browser as well
The filter operation in the API fails as well when this item is in the result.
It sounds like this should be escalated with Podio technical support.

Foursquare API - Tastes

When I try to send a GET request to Foursquare API below, I get "No matching endpoint." error.
I have validated my tokens and everything seems normal. Any advices?
REQUEST URL
https://api.foursquare.com/v2/users/USER_ID/tastes
RESPONSE MESSAGE
{
"meta": {
"code": 404,
"errorType": "endpoint_error",
"errorDetail": "No matching endpoint"
},
"notifications": [
{
"type": "notificationTray",
"item": {
"unreadCount": 0
}
}
],
"response": {}
}
FoursquareAPI twitter account has told me that I needed to pass m=foursquare in addition to version information.
The correct endpoint information is like
https://api.foursquare.com/v2/users/USER_ID/tastes?oauth_token=TOKEN&v=20150420&m=foursquare
The detailed information about v and m parameters are below.
https://developer.foursquare.com/overview/versioning