Step 8: Call the SP-API in Production
Connect to the SP-API by using manual HTTP requests or an SDK.
After you test your application in the sandbox as much as possible, connect to the Selling Partner API (SP-API) production endpoint by making direct HTTP requests or by using an SDK.
For code samples for common use cases, refer to the Selling Partner API samples on GitHub.
Prerequisites
Before you connect to the SP-API production endpoint, you must have the following prerequisites:
- The production endpoint for your target marketplace:
- North America:
https://sellingpartnerapi-na.amazon.com
- Europe:
https://sellingpartnerapi-eu.amazon.com
- Far East:
https://sellingpartnerapi-fe.amazon.com
- North America:
- Your production credentials, which include:
- Client ID: The client ID that appeared after you registered your app in Step 7: Register Your Production Application. To get this value, refer to View your Application Information and Credentials.
- Client secret: The client secret that appeared after you registered your app. To get this value, refer to View your Application Information and Credentials.
- Refresh token: The Login with Amazon (LWA) refresh token that you got when the selling partner authorized your application in Step 6: Set up the Authorization Workflow.
Steps to connect to SP-API
Choose your connection method and perform the following steps.
Method 1: Make HTTPS requests
You can make direct HTTPS requests when you want complete control over API calls. This example shows a basic request.
Depending on your needs, you might also need to know about:
- Restricted operations (when you access customer data like shipping addresses)
- Grantless operations (when you don't need seller authorization, such as when you create or modify notification destinations)
For details about these scenarios, refer to Connecting to the Selling Partner API.
-
Get an access token:
POST https://api.amazon.com/auth/o2/token Content-Type: application/x-www-form-urlencoded grant_type=refresh_token &refresh_token=YOUR_REFRESH_TOKEN &client_id=YOUR_CLIENT_ID &client_secret=YOUR_CLIENT_SECRET
-
Call the API with the required headers:
host
: Your target endpointx-amz-access-token
: Your access tokenx-amz-date
: Current timestampuser-agent
: Your application name and version
GET https://sellingpartnerapi-na.amazon.com/sellers/v1/marketplaceParticipations host: sellingpartnerapi-na.amazon.com x-amz-access-token: YOUR_ACCESS_TOKEN x-amz-date: 20250130T120000Z
Method 2: Generate and use an SDK
SP-API offers SDKs for C#, Java, JavaScript (Node.js), and Python. These SDKs simplify integration by bundling multiple steps together, such as requesting access tokens and making API calls. For SDK documentation, refer to SP-API SDKs.
Next steps
Proceed to Step 9: Test Your Application.
Updated about 2 months ago