Using Postman for Selling Partner API models

Using Postman for Selling Partner API models

Import an SP-API model into Postman

  1. Go to the Selling Partner API Model’s page.
  2. Navigate to the API you want to download, then click on the clipboard icon to copy the model.
  3. Open a text editor (such as Notepad) and paste the model text. Then save the file.
  4. Open Postman and import your saved .json file.

Importing video thumbnail


Generate an LWA Access Token using Postman

  • Make a POST call to https://api.amazon.com/auth/o2/token.
  • Click the Body tab, select x-www-form-urlencoded and add the grant type, refresh token, client_id and client_secret values. You can get the client_id and client_secret after you register your app.
  • Click Send.

The response returns the Access Token that you can use to authenticate yourself for SP-API.

LWA Access Token thumbnail


Request AWS STS and generate temporary credentials using Postman

Security Token Service (STS) is a web service that allows you to request temporary, limited-privilege credentials for AWS Identity and Access Management (AWS IAM) users or for users that you authenticate (federated users).

This step is required if your application ID is associated with an IAM role.

Generate temp credentials thumbnail

GET AWS STS request

  1. Sign in to Postman.
  2. Choose New.
  3. Select HTTP Request.
  4. On the left drop-down, choose GET.
  5. Copy and paste the following link into the textbox.
    https://sts.amazonaws.com/?Version=2011-06-15&Action=AssumeRole&RoleSessionName=Test&RoleArn=arn:aws:iam::XXXXXXXXXXXX:role/SellingParSellingPart&DurationSeconds=3600
    Replace arn:aws:iam::XXXXXXXXXXXX:role/SellingParSellingPart with your account ARN.
  6. On the Authorization tab, in the Type section, choose AWS Signature.
  7. Add your AWS AccessKey and SecretKey.
  8. Add the Service name as sts.
  9. Choose Send.

Post AccessToken

  1. Select the POST tab and from the left drop-down, select POST.
  2. Copy and paste the following link into the textbox:
    https://api.amazon.com/auth/O2/token
  3. On the Authorization tab, in the Type section, choose No Auth.
  4. On the Body tab, select x-www-form-urlencoded and then enter your credentials.
  5. Choose Send.

Make a call to an SP-API endpoint

For example: you can make a GET call to https://sellingpartnerapi-na.amazon.com/sellers/v1/marketplaceParticipations from the Seller API.

  1. Import sellers.json to create the Sellers API postman collection.
  2. Choose get Marketplace Participations.
  3. On the Authorization tab, add the AccessKey, Secretkey, and AWS Region.
  4. Add the ServiceName as execute-api.
  5. On the Headers tab, add the x-amz-access-token value that you received from the step "Generate an LWA Access Token using Postman" or "Request AWS STS and generate temporary credentials using Postman" to successfully make the call.

Make a call to endpoint thumbnail


Make a call to a Sandbox endpoint

  • See the SP-API Sandbox endpoints in the Selling Partner API Developer Guide.
  • Calling the SP-API Sandbox endpoints are similar to making an SP-API call. The endpoint is different for Sandbox and data will be returned matching the response of sandbox object for that API if all required parameters are added and the request is valid.

Make a call to sandbox thumbnail