amzn / selling-partner-api-models

This repository contains OpenAPI models for developers to use when developing software to call Selling Partner APIs.
Apache License 2.0
575 stars 730 forks source link

Product Type Definitions API not working with marketplaces in Europe and Far East #4094

Closed alexisbellido closed 1 month ago

alexisbellido commented 1 month ago

Hello,

I'm using the Product Type Definitions API and the getDefinitionsProductType operation (https://developer-docs.amazon.com/sp-api/docs/product-type-definitions-api-v2020-09-01-reference#getdefinitionsproducttype) and it works as expected when I pass the marketplace ID for United States, Canada, Mexico or Brazil and use the corresponding "na" region.

But when I try with any other marketplaces and regions (say, Germany with marketplaceID "A1PA6795UKMFR9" and region "eu") I get "Error: Access to requested resource is denied" (I'm using https://github.com/amz-tools/amazon-sp-api). I have tried with all the marketplaces in Europe and Far East, passing the corresponding region value, and I always get that error.

I know my application is registered correctly with SP-API as I've been working with it for almost two years and I don't think there's anything specific to marketplace or region in the application registration. I have sellers in European marketplaces who have authorized my app with Amazon and my app can make calls to operations from the Listings API normally.

I saw @chapmanjw said on https://github.com/amzn/selling-partner-api-models/issues/1711#issuecomment-2129192461 that the "search definitions operation returns the list of migrated product types per marketplace" so I tried calling searchDefinitionsProductTypes with the marketplaceId for Germany with region "eu" (and every other marketplace different than US, CA, MX and BR) and I also got the requested resource error.

Does this mean that the Product Type Definitions API does not support any of the marketplaces in the eu and fe regions?

If not, am I missing something obvious here?

@chapmanjw , @mafge or anybody else on the SP-API team, any hints will be greatly appreciated.

Cheers.

jawheral commented 1 month ago

Hi @alexisbellido,

When calling the Product Type Definitions API, did you make sure you are calling the right endpoint for the right region? Please double-check this sp-api-endpoints page.

Additionally, when calling getDefinitionsProductType endpoint, there's an optional sellerId parameter. You need to make sure that in case you are passing this parameter, that this sellerId is for the right marketplace you are requesting. Also make sure that you are using the right refresh_token and access_token for that sellerId you are providing.

Also make sure that the sp-api client you are using is working as you expect. The client is a third-party and we are unable to provide support on it. You can however check clients that we offer here: https://github.com/amzn/selling-partner-api-models/tree/main/clients and follow this guide on how they can be used.

If you require further support, please provide a log for the actual request to SP-API or contact our Developer Support.

Best, Jawher Selling Partner API Solutions Architect

alexisbellido commented 1 month ago

Thank you, @jawheral .

And can you please confirm that the Product Type Definitions API should work for all marketplaces, including those in Europe and the Far East?

jawheral commented 1 month ago

Hi @alexisbellido,

Yes I do confirm that the API should work for marketplaces including EU and FE. I also tested the API now on multiple EU and US marketplaces and it works as expected.

Again, double check the refresh_token/access_token and for which marketplace/seller they are granting access.

Best, Jawher Selling Partner API Solutions Architect