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
580 stars 730 forks source link

Are you a vendor who needs help calling the Selling Partner API using Python? #1700

Closed Guerri114 closed 2 years ago

Guerri114 commented 3 years ago

If you are a vendor who wants to use the Selling Partner API, the attached Python scripts should help you get started once you register for access in Vendor Central and have the necessary credentials.

The attached code samples are examples of how to exchange your refresh token for an access token, sign your request, and call the API. There are two files in the .zip: one file is for if you set up your Selling Partner API application with an AWS IAM Role and need to sign the request by assuming that role. The other file is for if you set up your Selling Partner API application with an AWS IAM User, which doesn't involve the added step of assuming a role.

Both files call the getCatalogItem API operation, one of many APIs and API operations in the Selling Partner API. I struggled for a while to get things to work in Python, so I hope this helps someone else out.

SPAPI-getCatalogItem.zip

teddy-codes commented 3 years ago

Just so that you know, you could use the aws-sdk lib and use the provided signer. That's what I use in go.

rugved1991 commented 3 years ago

You can also check out the new Selling Partner API on AWS QuickStart for a quick setup of SP APIs. https://aws.amazon.com/quickstart/architecture/amazon-selling-partner-api/

Feel free to open issues or provide feedback on the issues page of the QuickStart.

Thanks, Rugved Solutions Architect, SP API.

paulabirocchi commented 2 years ago

Hi @Guerri114 , I'm trying to get Orders , Reports and Returns from Amazon API through Python. I opened this issue https://github.com/amzn/selling-partner-api-models/issues/1891 could you help me?

github-actions[bot] commented 2 years ago

This is a very old issue that is probably not getting as much attention as it deserves. We encourage you to check if this is still an issue after the latest release and if you find that this is still a problem, please feel free to open a new issue and make a reference to this one.