Closed xHadie closed 3 months ago
I seem to have met the same issue on a different call
My code: $limite = $listingsRestrictionsApi->getListingsRestrictions( asin:$i['asin'], conditionType:$item_condition, sellerId:$amazon->prefs['amazon-MERCHANT_ID'], marketplaceIds:array($amazon->prefs['amazon-MARKETPLACE_ID']), reasonLocale:'it_IT' );
Parameters are cased exactly as shown in the Amazon docs at https://developer-docs.amazon.com/sp-api/docs/listings-restrictions-api-v2021-08-01-reference
Result is an error 400 "Request has missing or invalid parameters and cannot be parsed." GET https://sellingpartnerapi-eu.amazon.com/listings/2021-08-01/restrictions?asin=8804777427&sellerId=A1DNXQQ92EWNAP&marketplaceIds=APJ6JRA9NG5V4&conditionType=New&reasonLocale=it_IT
These issues appear to both be fixed in main
, and will be released in v7 shortly.
Released in v7.0.0
.
Problem description:
Error:
I noticed a weird issue with the SP-API endpoint for getItemOffersBatch Seems like there is an issue with the capitalization of the request paramters in the individual requests of the batch.
Amazon apparently expects the
itemCondition
andmarketplaceId
paramter to have an capitalized "I" and "M", namely"ItemCondition"
and"MarketplaceId"
. Using lowercase letters results in the 400 response below. Strangely enough,CustomerType
NEEDS to have a lowercase "c", namely"customerType"
- otherwise again the 400 response in thrown.I suppose this also causes the error further below when calling
->dto()
or->json()
. Would highly appreciate a fix. Not sure whether Amazon is going to change their implementaiton, since the ProductPricing API section has a newer version, but some people still rely on it.API Response on incorrect capitalizatoin:
Code