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

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.

Related

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.

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

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.

Mimecast API authentication issue

trying to connect to endpoint with all needed headers defined:
https://us-api.mimecast.com/api/login/login.
Error message receieved : 0018 Client update required
Did anyone encounter/solve this issue?
{
"meta": {
"status": 401
},
"data": [],
"fail": [
{
"key": {
"username": "datadash#itprosusa.com",
"tokenType": "key",
"verifyOnly": false
},
"errors": [
{
"code": "err_xdk_client_update_required",
"message": "0018 Client update required",
"retryable": false
}
]
}
]
}
I came across the same error message when trying to get Access key and Secret Key. You can actually get these in the Mimecast portal UI by going to: Administration | Services | APIĀ Applications, then Add API Application fill in the details and wait 30 minutes. After 30 minutes click on your newly created API application and select Create Keys, fill in the required information and it will provide you with your Access key and Secret key used for API calls.
If this doesn't answer your question or help you I would suggest getting in contact with Mimecast Support, they are usually pretty good!

Amadeus API returns Internal error with all requests (Production Key)

{
"errors": [
{
"code": "38189",
"title": "Internal error",
"detail": "An internal error occured, please contact your administrator",
"status": "500"
}
]
}
I get this error when I use production key to send requests to AMADEUS API, this error returns just with production key but not with test key. Despite I updated header to " Accept application/vnd.amadeus+json" the error still returns.
Here one of the requests:
https://api.amadeus.com/v1/shopping/flight-offers?origin=MAD&destination=PAR&departureDate=2019-08-01&adults=1&nonStop=false&max=6
We had a configuration issue on our side. Everything has been fixed, You should be able to use all the APIs in production.
Sorry for the inconvenience.

Can we add multiple labelId in history.list API for gmail?

I want to get the result of all INBOX mails and all SENT mails in one API call using the historyID and the history.list Gmail-API.
Refer:
https://developers.google.com/gmail/api/v1/reference/users/history/list
When I am hitting the following GET request :
https://www.googleapis.com/gmail/v1/users/{userID}/history?startHistoryId={historyID}&labelId=SENT&labelId=INBOX
I only get the SENT label messages.
Seems like the API only accepts single & first query param for labelId.
Is there a way to get multiple labelIds' response in a single API call?
I think it would not be possible, I tried making a multiple request and it this response:
{
"error": {
"errors": [
{
"domain": "global",
"reason": "invalidArgument",
"message": "Invalid label value in query"
}
],
"code": 400,
"message": "Invalid label value in query"
}
}
I would suggest to call it separately for each labelID but you can try filing a feature request for this.
Hope this helps.