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:

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.

  1. 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
    
  2. Call the API with the required headers:

    • host: Your target endpoint
    • x-amz-access-token: Your access token
    • x-amz-date: Current timestamp
    • user-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.