0% found this document useful (0 votes)
11 views351 pages

Amazon Partner

The Selling Partner API (SP-API) enables Amazon selling partners to programmatically access and manage their data related to orders, shipments, and payments through a REST-based interface. It requires OAuth authorization for application access and provides SDKs for various programming languages to facilitate integration. The documentation includes guidelines for error handling, API endpoints, and usage strategies to enhance developer experience.

Uploaded by

Aditi Agarwal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views351 pages

Amazon Partner

The Selling Partner API (SP-API) enables Amazon selling partners to programmatically access and manage their data related to orders, shipments, and payments through a REST-based interface. It requires OAuth authorization for application access and provides SDKs for various programming languages to facilitate integration. The documentation includes guidelines for error handling, API endpoints, and usage strategies to enhance developer experience.

Uploaded by

Aditi Agarwal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 351

Summary of URL: https://developer-docs.amazon.

com/sp-api/docs/welcome:
# Summary of Amazon Selling Partner API (SP-API) Documentation

## Overview
The Selling Partner API (SP-API) is designed for developers to create applications
that interact with Amazon's selling partners (sellers and vendors). It facilitates
data retrieval and posting to a customer's selling account.

## Key Concepts
1. **SP-API Models**: Various models are available that align with specific selling
partner functionalities, categorized into seller and vendor applications.
2. **Authorization**: Applications must be authorized to access the SP-API, which
includes several workflows for authorization, including self-authorization and
token management.
3. **Endpoints and Requests**: SP-API utilizes RESTful services with specific
endpoints for different functionalities.

## Important Components

### Authorizing Applications


- **Self Authorization**: Authorize using a restricted data token.
- **Renewing Authorization**: Mechanisms to renew stored credentials and avoid
expired sessions.

### APIs
The SP-API provides a wide range of services, including but not limited to:
- **Product Listings API**: Manage and update product listings.
- **Orders API**: Access order details and manage order workflows.
- **Finances API**: Retrieve finance-related data.
- **Reports API**: Generate and manage various sales and operational reports.

### Key Methods


- **Getting Started**:
```python
import sp_api # Example package import for interaction
```
- **Call to an API**: To make API calls, use the respective function for the API
you are interacting with.

### Code Samples


#### Python SDK Example
```python
from sp_api.api import Order
from sp_api.base import SellingApiException

# Fetch order details


try:
order = Order().get_order(order_id='example_order_id')
print(order.payload)
except SellingApiException as e:
print(f"Error occurred: {e}")
```
This example illustrates how to fetch an order by its ID using the Python SDK.

## Usage Guidelines
- **Notifications**: Subscribe to RSS feeds for updates on API announcements and
changes.
- **Rate Limits**: Understand the usage plans and adhere to rate limits to prevent
throttling of API requests.
- **Error Handling**: Familiarize yourself with common errors (e.g., authorization
errors, HTTP errors) and their troubleshooting steps.

## Important Notes
- **Versions**: Check for the latest version of API references as they may
deprecate old versions over time.
- **SDKs**: Download only Python SDK if specifically required for your project, as
various SDKs exist for different programming languages.

## Additional Resources
- **GitHub Repository**: Access artifacts like client libraries, JSON schemas, and
other development tools.
- **Frequently Asked Questions (FAQ)**: Addresses common development queries and
offers additional insights into the use of SP-API.

## Conclusion
This documentation serves as a comprehensive guide for leveraging Amazon's SP-API
is critical for integrating seller applications and vendor solutions effectively.
Ensure to follow coding best practices, particularly regarding authorization and
error management, to foster a robust application interface.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/welcome#quick-links:


# Summary of Amazon Selling Partner API (SP-API) Documentation

## Overview of SP-API
The Selling Partner API (SP-API) provides developers with access to Amazon's tools
and services for integrating their applications with selling partner accounts. This
API enables data retrieval and posting functionalities to manage various aspects of
selling on Amazon.

### Key Concepts


- **Authorization**: Applications must be authorized to access SP-API
functionalities. Various authorization workflows exist, including OAuth2.
- **Applications**: There are two types of registered applications: Public SP-API
Developers and Private SP-API Developers.
- **Roles**: Different roles grant access to specific functionalities (e.g., Brand
Analytics Role, Product Listing Role).
- **API Calls**: Developers can make requests to retrieve data or perform actions,
often requiring specific parameters such as `Marketplace IDs`.

### Important Sections


- **Announcements**: Track the latest updates regarding API changes, releases, and
deprecations.
- **Release Notes**: Document changes across different APIs, including reports and
feeds.
- **Models**: Access the index of all SP-API models, including links to reference
documentation.
- **FAQ**: Insight into common issues, errors, and vendor-specific queries.
- **Code Samples**: Practical examples showcasing how to implement API
capabilities.

## Code Examples and API Snippets


### Sample Scheduler for Automated Requests (Python)
```python
import requests
def make_api_request(endpoint, payload):
url = f"https://sellingpartnerapi.example.com{endpoint}"
headers = {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
}
response = requests.post(url, json=payload, headers=headers)
return response.json()

order_payload = {
"marketplaceId": "ATVPDKIKX0DER",
"orderId": "123-1234567-1234567"
}
response = make_api_request("/orders/v0/orders", order_payload)
print(response)
```

### Common API Fields


- **endpoint**: Specifies the specific API method being called (e.g.,
`/orders/v0/orders`).
- **payload**: Contains the necessary parameters for the API call, such as
`marketplaceId` and `orderId`.

## Descriptions of Important Classes, Functions, and Methods


### Key API Functions
- **Authorization Flow**: Each application must implement OAuth2 to authenticate
users before API calls can be made.
- **SP-API Models**: Use predefined models for consistency across different
requests. Key models include:
- **Order Model**: Manages order information.
- **Product Listing Model**: Manages product listings.
- **Notification Model**: Handles notifications for different events (like order
changes).

### Usage Strategies


- **APIs for Sellers and Vendors**: Understand which APIs apply to your
application. Some endpoints are dedicated to either sellers or vendors.
- **Rate Limits**: Be aware of the set limits for API calls to avoid throttling.

## Important Notes and Caveats


- **Integration Requirements**: Ensure you follow the guidelines for building
robust applications, especially regarding handling errors and maintaining
compliance with Amazon policies.
- **Sandbox Environment**: Test API calls in a sandbox environment before going
live to ensure expected behavior.
- **Documentation Updates**: Always check for announcements and release notes as
APIs are updated frequently, which can affect functionality.

### Conclusion
The SP-API documentation provides extensive resources for developers to build and
integrate applications effectively. Pay attention to authorization requirements,
rate limits, and the provision of well-structured requests to ensure smooth
operation. Always consult the detailed models and code samples available for
clearer implementation strategies.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/welcome#content:


### Summary of Amazon Selling Partner API (SP-API) Documentation

---

#### Overview
The Selling Partner API (SP-API) is designed for developers creating applications
to facilitate data exchange with Amazon's selling partners (sellers and vendors).
This documentation provides comprehensive resources for integrating and migrating
to SP-API.

#### Quick Links


- **Announcements**: Updates on API releases, deprecations, and changes.
- **Release Notes**: Changes to APIs, reports, feeds, and notifications.
- **Models**: Index of all SP-API models with links to reference documents and
Swagger models.
- **FAQ**: Frequently asked questions related to SP-API and vendor-specific topics.
- **Code Samples**: Practical examples showcasing API capabilities and best
practices.
- **GitHub Repository**: Contains SP-API code artifacts including client libraries
and JSON schemas.
- **Videos**: Educational content for successful integration with SP-API.

---

#### Key Components of SP-API

1. **Authorization**:
- Applications must be authorized to access various resources. There are
multiple workflows including:
- **Self Authorization**
- **Application Authorization**
- Renewal procedures for authorization tokens.

2. **Integration**:
- Connecting to SP-API involves establishing a robust session through various
programming languages, notably Python (per user request).
- **Tutorials** available for integrating using different SDKs (Python SDK, Java
SDK, etc.).

3. **Error Handling**:
- Comprehensive guidelines for troubleshooting SP-API errors, including:
- **400 Errors**: How to diagnose and resolve.
- **Authorization Errors**: Common pitfalls and their resolutions.

4. **API Endpoints**:
- Information on various SP-API endpoints categorized into functional areas,
including but not limited to:
- Orders API
- Listings API
- Fulfillment API

5. **Response Format**:
- SP-API responses typically follow a JSON format. It's essential to include a
`User-Agent` header in all requests.

---

#### Important Classes & Functions


- **Authorization Flow**:
- **AuthorizeApplication**: Authorizes the API application to access resources.
- **RevokeApplicationAuth**: Revokes the authorization if necessary.

- **Data Handling**:
- **Data Kiosk API**: For processing and managing data queries.
- **Upload API**: Handles file uploads for documents related to various
operations (inventory, orders, etc.).

- **Reports API**:
- **RequestReport**: Initiates a report generation.
- **RetrieveReport**: Retrieves completed report data.

#### Code Examples

- **Authorization Example** (Python):


```python
import requests

response = requests.post('https://sellingpartnerapi.com/authorization',
headers={'Authorization': 'Bearer <YourToken>'})
```

- **Fetching Orders Example** (Python):


```python
response = requests.get('https://sellingpartnerapi.com/orders',
headers={'Authorization': 'Bearer <YourToken>'})
print(response.json())
```

#### Important Notes

- **Caveats**:
- Ensure compliance with Amazon's Acceptable Use Policy and Developer Policy to
avoid service disruptions.
- Be aware of the **Rate Limits** associated with each API call to optimize
application usage.

- **Data Protection**: Developers are responsible for implementing proper data


protection and security protocols when interacting with the SP-API.

- **Sandbox Environment**: Use the SP-API Sandbox for testing API calls before
going to production.

---

This summary captures essential information on using the Amazon Selling Partner
API, providing a foundational understanding and practical coding examples tailored
for developers. For detailed inquiries or further exploration, developers are
encouraged to refer to the respective sections of the API documentation.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/welcome#search:


# Amazon Selling Partner API (SP-API) Summary

## Overview
The Selling Partner API (SP-API) allows developers to create applications that
gather and post data from/to a customer's selling partner account on Amazon.
Designed for sellers and vendors, this documentation provides resources necessary
for integrating and migrating to SP-API.

## Key Features and Concepts


- **Applications for Sellers and Vendors**: Sections in the documentation are
marked to distinguish content applicable to either sellers or vendors.

- **Authorization**: Applications must be authorized to access vendor groups and


seller accounts. The following workflows are available:
- Authorize applications for access
- Renew authorization
- Self-authorization with a restricted data token

- **Connecting to the API**: Applications can connect to the SP-API using SDKs like
Python, Java, C#, and JavaScript.

- **API Endpoints**: Various endpoints are available for specific functionalities


(e.g., Orders, Listings, Reports).

- **Error Handling**: Developers are encouraged to implement robust error handling


for a seamless integration experience.

## Code Samples and API Snippets


While the documentation does not provide direct code snippets, it outlines
tutorials for various SDK integrations:

### Sample Integration in Python


To get started with Python SDK, follow one of the tutorials that guide you through
the automation of SP-API calls using Python.

**Usage Example**:
```python
# Basic structure for making an API call using the Python SDK
from sp_api.api import Products

# Create a products API client


products_api = Products()

# Example: Retrieve product information


response = products_api.get_product_details(asin='B000000001')
print(response)
```

## Important Classes and Methods


- **SP-API Models**: The models provide a structured format for requests and
responses. Developers should familiarize themselves with the relevant models for
their application to ensure they handle data correctly.

- **Endpoints and Their Uses**:


- **Listings API**: Manage product listings.
- **Orders API**: Retrieve and manage order information.
- **Reports API**: Generate various types of reports.

## Important Notes and Caveats


- **Rate Limits and Usage Plans**: Know the usage plans and rate limits applicable
to the API. Exceeding these limits may result in throttling or temporary bans from
making requests.
- **Security Considerations**: Implement security best practices to protect
sensitive credentials and personal data accessed via the API.

- **Submission and Update Protocols**: Follow specific protocols for submitting and
updating applications within the SP-API and understand the authorization workflows
to avoid errors or denied access.

- **Versioning**: Regularly check for updates or deprecations in the API versions


to maintain compatibility and take advantage of new features.

## Additional Resources
- **GitHub Repository**: Contains client libraries, Swagger models, and JSON
schemas for developers.
- **FAQ and Support**: Frequently asked questions and support are available for
common issues faced during implementation.

## Conclusion
The Amazon Selling Partner API facilitates a wide range of functionalities for
managing seller and vendor data on Amazon, providing essential tools and
documentation for developers. By utilizing SDKs and understanding the key concepts
outlined in the documentation, developers can integrate Amazon's services into
their applications effectively.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/what-is-the-selling-


partner-api:
### Selling Partner API (SP-API) Summary

**Overview**:
The Selling Partner API (SP-API) is a REST-based API that enables Amazon selling
partners to programmatically access their data related to orders, shipments,
payments, inventory, and more, thereby enhancing efficiency and customer response
time.

---

### Key Features

- **OAuth Authorization**: Selling partners can initiate an OAuth authorization


workflow through the Selling Partner Appstore or a custom website.
- **SDK Generation**: An SDK is provided to assist with LWA token exchange and
authentication.
- **Sandbox Environment**: Developers can test applications before going live by
making calls in a sandbox environment.

---

### Important Classes and Functions

While the detailed API classes, functions, and methods were not explicitly stated
in the provided content, key concepts associated with them include:

1. **OAuth Workflow**:
- Implementing OAuth 2.0 to authorize applications.
- Use the Selling Partner Appstore detail page for authorization.

2. **SDK Usage**:
- Generate an SDK tailored for the desired programming language (e.g., Python).
- Use this SDK to facilitate interactions with the SP-API endpoints.

3. **Endpoints**:
The SP-API contains various endpoints for accessing different sets of data. For
example:
- Orders API
- Product Listing API
- Reports API

Each of these would include request and response formats, likely in JSON.

---

### Key Concepts

- **RESTful API**: Understand the principles of REST APIs, including statelessness,


resource-oriented architecture, and standard HTTP methods (GET, POST, PUT, DELETE).
- **Sandbox Testing**: Essential for validating API calls without affecting live
data.
- **Global Applications:** Developers need to register once per region/marketplace,
allowing partner authorization across various regions, enhancing flexibility and
reach.

---

### Important Notes

- **Single Registration Point**: Once registered as a developer, you can create


applications that are eligible for any marketplace or region.
- **Data Protection and Policies**: Familiarize yourself with Amazon's Acceptable
Use Policy and Data Protection Policy when using the SP-API.
- **Error Handling**: Implement robust error handling to manage common errors that
could arise from SP-API interactions (e.g., authorization errors, 400 errors).

---

### Usage Guidelines

- **Language**: Focus on Python SDK for coding interactions with the SP-API.
- **API Documentation**: Refer to the specific API documentation for detailed
endpoint descriptions, request/response formats, and field specifications as they
relate to Python implementations.

---

This concise overview gives developers and system administrators essential insights
into using the Selling Partner API effectively. For more detailed code examples,
method implementations, and endpoint specifics, consult the full API documentation
at [Amazon SP API
Documentation](https://developer-docs.amazon.com/sp-api/docs/what-is-the-selling-
partner-api).
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/what-is-the-selling-


partner-api#key-features:
### Selling Partner API (SP-API) Summary
**What is the Selling Partner API?**
The Selling Partner API (SP-API) is a REST-based API that allows Amazon selling
partners to programmatically access their data, including orders, shipments,
payments, and more. It streamlines operations, allowing sellers to increase
efficiency and improve customer response times.

---

### Key Features


1. **OAuth Authorization Workflow:**
- Selling partners can initiate the OAuth authorization workflow from either the
Selling Partner Appstore detail page or the developer's website.

2. **SDK Generation:**
- The SP-API allows for the generation of SDKs to facilitate LWA (Login with
Amazon) token exchange and authentication.

3. **Sandbox Testing:**
- Applications can be tested in a sandbox environment before deployment.

4. **Global Applications:**
- Once registered as a developer in a specific region and marketplace, the
application can be authorized by selling partners globally across different regions
and marketplaces.

---

### Code Examples and API Snippets


- **OAuth Authorization Workflow Example**:
```python
# Sample Python code snippet to initiate an OAuth authorization
import requests

LOGIN_URL = 'https://api.amazon.com/auth/o2/token'
# Assuming client_id and client_secret are already defined
payload = {
'grant_type': 'client_credentials',
'client_id': client_id,
'client_secret': client_secret,
}
response = requests.post(LOGIN_URL, data=payload)
token = response.json().get('access_token')
```

- **Calling SP-API**:
```python
# Example of making a SP-API request
SP_API_URL = 'https://sellingpartnerapi-na.amazon.com/orders/v0/orders'
headers = {
'Authorization': f'Bearer {token}',
'Content-Type': 'application/json'
}
response = requests.get(SP_API_URL, headers=headers)
orders = response.json()
```

---
### Important Concepts
- **OAuth 2.0 Authorization**:
Ensures secure access to user data. Developers must implement OAuth to
authenticate and authorize requests.

- **SDK Usage**:
The SDK provided by SP-API simplifies the calling of the API, handling token
exchange and endpoint calls.

- **Global App Registration**:


Important for developers to understand that application registration is a one-
time setup for broader market access.

---

### Important Notes


- **API Rate Limits**:
Be aware that there are rate limits imposed by Amazon, so plan API calls
accordingly to avoid exceeding limits.

- **Testing in Sandbox**:
Always use the sandbox environment for extensive testing to ensure that
applications behave as expected before live deployment.

- **Regions and Marketplaces**:


When building applications, consider regional regulations and marketplace
specifics, as they may affect how the SP-API is utilized.

- **Documentation Updates**:
The key features and usage may evolve over time; keep an eye on the release
notes for any significant changes.

---

This summarizes the critical components needed to utilize the Selling Partner API
effectively. Always refer to the official documentation for the most current
information and detailed guidance on specific features.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/what-is-the-selling-


partner-api#content:
### Summary of the Selling Partner API (SP-API)

#### Overview
The Selling Partner API (SP-API) is a REST-based API that allows Amazon selling
partners to programmatically access their data, including orders, shipments,
payments, and other key business functions. This API is designed to enhance
efficiency, reduce labor, and improve customer response times.

#### Key Features


- **OAuth Authorization Workflow**: Initiate authorization from the Selling Partner
Appstore detail page or your website.
- **SDK Generation**: Generate an SDK for LWA token exchange and authentication.
- **Sandbox Testing**: Test applications by making calls to a sandbox environment.
- **Global Applications**: A single developer registration allows creation of an
SP-API application that can be used across different regions and marketplaces.
#### Important Classes and Functions
1. **Authorization**:
- Methods for authorizing access to vendor groups and self-authorization.

2. **Integration and SDKs**:


- **SDK Generation**: Functions for generating SDKs in multiple languages (e.g.,
Python, Java, C#).
- **Connecting to the API**: Initiate API calls and manage connections.

3. **API Calls**:
- The structure of API calls includes a user-agent header, response formats, and
expected request formats.

#### Important Concepts


- **OAuth and LWA (Login with Amazon)**: Understand the workflows for accessing
authorized data and managing permissions.
- **SP-API Endpoints**: Familiarize with different endpoints for various
functionalities such as orders, reports, and inventory management.
- **Rate Limits and Usage Plans**: Be aware of the limits on usage for API calls to
optimize performance and avoid downtime.

#### Code Snippets


- **Generating SDK for Python**:
```python
# Example to use Python SDK for calling SP-API
from sp_api.api import Orders
from sp_api.base import Marketplaces

orders_api = Orders(marketplace=Marketplaces.US)
response = orders_api.get_orders(CreatedAfter='2023-01-01')
print(response)
```

#### Important Notes/Caveats


- **Application Registration**: Registering as a public or private SP-API developer
is necessary before accessing API features.
- **Error Handling**: Familiarize with common SP-API errors, particularly
authorization errors and troubleshoot using provided FAQs.
- **Security Compliance**: Ensure compliance with Amazon’s data protection and
security policies throughout application development and deployment.

This summary provides essential information for developers looking to work with
Amazon's Selling Partner API effectively, highlighting its key features, important
concepts, and basic code usage.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/what-is-the-selling-


partner-api#global-applications:
### Summary of the Selling Partner API (SP-API)

#### Overview
The Selling Partner API (SP-API) is a REST-based API designed for Amazon selling
partners to programmatically access their data related to orders, shipments,
payments, and more. This API aims to enhance selling efficiency, reduce labor
requirements, and improve customer response times, thereby supporting business
growth.
#### Key Features
- **OAuth Authorization Workflow**: Selling partners can initiate the authorization
process from the Selling Partner Appstore or your website.
- **SDK Generation**: Generate an SDK to assist with LWA (Login with Amazon) token
exchange and authentication.
- **Sandbox Testing**: Test applications by making calls to a sandbox environment
before deploying.

#### Global Applications


- Register as a developer only once in your selected region and marketplace. This
registration allows the created SP-API applications to be authorized by selling
partners from any region or marketplace.

#### Important Concepts


- **Authorization**: Utilizes OAuth to allow applications to access selling partner
data securely. This process must be set up properly to interact with the SP-API.
- **Client Libraries**: Developers can generate SDKs for various languages (such as
Python, Java, and C#) to facilitate interactions with the API.
- **API Endpoints**: Different operations (like listing products, managing orders,
etc.) will involve specific endpoints that must be invoked correctly.

#### Notes for Developers


- **Single Developer Registration**: Only one registration is needed for SP-API
applications regardless of marketplace, streamlining the development process.
- **Testing and Sandbox**: Always test in a sandbox environment to avoid unintended
consequences in production.
- **Compliance**: Be aware of and comply with the acceptable use and data
protection policies as per Amazon's requirements.

#### Example API Usage


While the document does not provide direct code snippets, for Python SDK usage,
developers typically follow these steps:

1. **Authorization Code Flow**:


- Set up an authorization endpoint and redirect the user for authorization.
- Capture the authorization code once the user is redirected back.

2. **Token Exchange**:
- Use the captured authorization code with your client credentials to request an
access token from Amazon.

3. **Making API Requests**:


- Once authorized, use the access token to make requests to SP-API endpoints.
- Include necessary headers (e.g., `User-Agent`).

#### Important Considerations


- Proper error handling should be implemented to manage responses from the API,
particularly focusing on authorization errors and general request failures.
- Keep an eye on rate limits to avoid throttling and API access issues.
- Frequent updates to the API may introduce breaking changes; make sure to read the
release notes regularly.

### Conclusion
The Selling Partner API provides a powerful set of tools for Amazon sellers to
automate and optimize their operations, but it requires careful implementation of
authorization, testing, and adherence to Amazon's policies to ensure successful
integration.
_____________________________
Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-models:
# Summary of Amazon Selling Partner API (SP-API) Models Documentation

## Overview
The Amazon Selling Partner API (SP-API) provides various APIs, notifications, and
reports that allow users (sellers and vendors) to interact with Amazon's services.
This summary focuses on information relevant to gathering data from customers'
selling partners and posting data to their selling accounts, specifically for
Python SDK use.

## Key Concepts
- **SP-API Models**: Defines the available APIs for different use cases. Each API
comes with specific references, models, and descriptions of functionalities.
- **Authorization**: Before making API calls, developers must authorize their
applications to access specific data resources.
- **Rate Limits**: SP-API enforces rate limits on how often an API can be called.
Understanding these limits is crucial for robust application design.

## Important APIs and Their Usage

### 1. **A+ Content Management API**


- **Description**: Used to create and edit A+ content.
- **Current Version**: 2020-11-01
- **Availability**: Sellers and Vendors

### 2. **Catalog Items API**


- **Description**: Retrieve information about items in the Amazon catalog.
- **Current Version**: 2022-04-01
- **Availability**: Sellers and Vendors

### 3. **Feeds API**


- **Description**: Upload data to Amazon to manage the selling business.
- **Current Version**: 2021-06-30
- **Availability**: Sellers and Vendors
- **Usage**:
- **Endpoint**: POST `https://sellingpartnerapi-na.amazon.com/feeds/2021-06-
30/feeds`
- **Parameters**:
- `feedType`
- `marketplaceIds`
- `inputBlob`: Feed data as a base64-encoded string.

### 4. **Notifications API**


- **Description**: Subscribe to notifications that are relevant to your selling
business.
- **Current Version**: 2024-06-19
- **Availability**: Sellers and Vendors

### 5. **Orders API**


- **Description**: Retrieve information about orders.
- **Current Version**: 2020-09-01
- **Availability**: Sellers and Vendors
- **Usage**:
- **Endpoint**: GET `https://sellingpartnerapi-na.amazon.com/orders/v0/orders`
- **Parameters**:
- `marketplaceIds`
- `createdAfter`
- Filtering options.

## Important Classes and Functions


- **Authorization Class**: Manages API authorization, including generating tokens
and refreshing tokens.
- **Methods**:
- `authorize_application()`: Authorizes the application.
- `get_token()`: Retrieves an access token for communication.

- **SPAPI Client Class**: Central client for making requests to SP-API.


- **Methods**:
- `call_api()`: General method for calling API endpoints.
- `handle_response()`: Processes API responses and errors.

## Key Notes and Caveats


- **SDK Usage**: Official SDKs are available including Python. Refer to tutorials
specific to the Python SDK for practical automation with the SP-API.
- **Sandbox Environment**: Always test API calls in a sandbox environment before
going live to avoid issues with real data.
- **Error Management**: Implement error handling logic to manage common API errors
like RateLimitExceeded, NotAuthorized, etc.
- **Documentation Access**: For more detailed reference, API-specific
documentation, including release notes and any deprecation schedules, can be found
in the provided SP-API models directory.

Ensure you have the required credentials and appropriate authorizations before
using the APIs, and check the latest version of the API documentation for updates.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-models#a-


content-management-api:
# Summary of the Amazon Selling Partner API (SP-API) Documentation

## Overview
The Amazon Selling Partner API (SP-API) provides various APIs that allow developers
to gather and post data related to their selling accounts. This API enables
intricate interactions with Amazon's services, such as listing products, managing
inventory, processing orders, and fetching financial data.

### Key Concepts


- **APIs and Models**: Each API corresponds to a particular service, such as
inventory management, order processing, and reporting.
- **Sellers vs. Vendors**: APIs can be categorized as available for seller accounts
or vendor accounts; this distinction is essential when selecting which APIs to use.

## Important APIs and Their Usage

### 1. **A+ Content Management API**


- **Purpose**: Create and edit A+ content.
- **Current Version**: 2020-11-01
- **Availability**: Sellers and Vendors.

### 2. **Amazon Warehousing and Distribution API**


- **Purpose**: Retrieve and track AWD shipments.
- **Current Version**: 2024-05-09
- **Availability**: Sellers only.
### 3. **App Integrations API**
- **Purpose**: Send notifications to Amazon Selling Partners.
- **Current Version**: 2024-04-01
- **Availability**: Sellers only.

### 4. **Feeds API**


- **Purpose**: Upload data to manage your selling business.
- **Current Version**: 2021-06-30
- **Availability**: Sellers and Vendors.

### 5. **Finances API**


- **Purpose**: Retrieve financial events for orders.
- **Current Version**: 2024-06-19 (also has a v0 Model)
- **Availability**: Sellers only.

### 6. **Orders API**


- **Purpose**: Retrieve order information.
- **Current Version**: v0
- **Availability**: Sellers only.

### 7. **Product Pricing API**


- **Purpose**: Retrieve product pricing and offer information.
- **Current Version**: 2022-05-01
- **Availability**: Sellers and Vendors.

### 8. **Reports API**


- **Purpose**: Retrieve and manage business reports.
- **Current Version**: 2021-06-30
- **Availability**: Sellers and Vendors.

### 9. **Tokens API**


- **Purpose**: Retrieve a Restricted Data Token for accessing restricted resources.
- **Current Version**: 2021-03-01
- **Availability**: Sellers and Vendors.

## Example API Usages


**Fetching Order Information**:
```python
import requests

# This is a sample function to get order details


def get_order_details(order_id):
url = f"https://sellingpartnerapi-na.amazon.com/orders/v0/orders/{order_id}"
response = requests.get(url, headers={'Authorization': 'Bearer <token>'})
return response.json()
```

### Important Classes and Methods


- **Client**: A main class for handling requests to various SP-APIs. It would
likely manage authentication and the construction of HTTP requests.
- **Resource Endpoints**: Corresponding functions/methods to interact with specific
endpoints like `getOrder`, `getProductPricing`, etc.

## Important Notes
- **Authorization**: SP-API requires OAuth 2.0 authentication. A valid token must
be included in the Authorization header for API requests.
- **Rate Limits**: Each API has defined usage limits; exceeding these limits may
result in access restriction. Developers should implement backoff strategies for
handling rate limits.
- **Error Handling**: Common errors include authorization errors, invalid inputs,
and rate limit exceeded issues. Properly handling these errors is essential for
robust application behavior.

## Caveats
- **Versioning**: Keeping track of API versioning is crucial. Always refer to the
most recent documentation for the specific version being used.
- **Marketplace Specifics**: Some APIs like the Inventory API may have
functionalities only for certain marketplaces, thus always double-check regional
dependencies.

This summary encapsulates crucial aspects of the SP-API, helpful for developers
aiming to implement and utilize the API effectively in their applications.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-models#app-


integrations-api:
### Summary of Selling Partner API (SP-API) Models

The Amazon Selling Partner API (SP-API) provides a set of APIs to gather data from
a seller's account and post data to a customer's selling account. Below are key
components and functionalities extracted from the SP-API documentation relevant for
integrating with seller accounts, particularly using Python.

#### Key APIs

1. **A+ Content Management API**


- **Usage**: Create and edit A+ content.
- **Version**: 2020-11-01
- **Available For**: Sellers, Vendors.
- **Reference**: [Reference](#) | [Model](#)

2. **App Integrations API**


- **Usage**: Send notifications to Amazon Selling Partners and display them in
Seller Central.
- **Version**: 2024-04-01
- **Available For**: Sellers.
- **Reference**: [Reference](#) | [Model](#)

3. **Application Management API**


- **Usage**: Rotate the client secret on registered applications.
- **Version**: 2023-11-30
- **Available For**: Sellers, Vendors.
- **Reference**: [Reference](#) | [Model](#)

4. **Catalog Items API**


- **Usage**: Retrieve information about items in the Amazon catalog.
- **Version**: 2022-04-01
- **Available For**: Sellers, Vendors.
- **Reference**: [Reference](#) | [Model](#)

5. **Data Kiosk API**


- **Usage**: Submit GraphQL queries for various data schemas.
- **Version**: 2023-11-15
- **Available For**: Sellers, Vendors.
- **Reference**: [Reference](#) | [Model](#)
6. **Scripts for using APIs**
- Utilize sample code snippets to automate SP-API calls in Python:
```python
import requests

# Example of a GET request to the Seller API


url = 'https://sellingpartnerapi-na.amazon.com/sellers/v1/marketplaceInfo'
headers = {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'x-amz-date': 'DATE',
'Content-Type': 'application/json'
}

response = requests.get(url, headers=headers)


data = response.json()
print(data)
```

#### Important Concepts

- **Authorization**: Before accessing SP-API, your application must be authorized.


You can use the Restricted Data Token (RDT) for accessing restricted resources.

- **Integration**: Developers need to manage application credentials and endpoint


configurations through the Application Management API, ensuring secure API calls.

- **Response Format**: Understand the standard response format when using the API.
Typically, responses will be in JSON format.

- **Sandbox Environment**: Familiarize yourself with the sandbox for testing API
calls before going live.

#### Notes and Caveats

- **Rate Limits**: Each API has usage plans and limits that must be adhered to in
order to avoid throttling.

- **Deprecation Policies**: Stay updated with API release notes and deprecation
schedules to ensure your application runs with current supported methods.

- **Error Handling**: Pay attention to error codes and implement robust error
handling in your application to manage failed requests effectively.

- **Updates**: As of now, the SP-API has multiple version releases, which can
affect API contracts. Always refer to the latest documentation for any field
changes.

#### For Further Reference


- Refer to the [SP-API
documentation](https://developer-docs.amazon.com/sp-api/docs/sp-api-models#app-
integrations-api) for exhaustive details on each API, including code samples, field
definitions, and use case guides.

This summary provides a foundational understanding of the Amazon Selling Partner


API for effective usage in integration and development tasks. For best practices,
consider regularly checking for updates in the API release notes and documentation.
_____________________________
Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-
models#catalog-items-api:
### Summary of Amazon Selling Partner API (SP-API) - Catalog Items API

#### Overview
The Catalog Items API allows users to retrieve information about items in the
Amazon catalog, facilitating access to product details essential for sellers.

#### Key Concepts


- **API Use Case**: Retrieve item information from the Amazon catalog for various
applications such as listing management, inventory tracking, and pricing analysis.
- **Sellers & Vendors**: The API is available for both seller and vendor accounts.

#### Current Version


- **Version**: 2022-04-01
- Available Reference and Model: [Catalog Items API v2022-04-01](https://developer-
docs.amazon.com/sp-api/docs/catalog-items-api-reference)

#### Important Classes and Methods


1. **GetCatalogItem**
- **Description**: Retrieves detailed information about a specific item in the
Amazon catalog based on the provided item identifier (ASIN).
- **Input Parameters**:
- `MarketplaceId`: The ID of the marketplace.
- `ASIN`: The Amazon Standard Identification Number of the item.
- **Return**: A detailed view of the specified item including attributes such as
title, price, and availability.

2. **SearchCatalogItems**
- **Description**: Searches for items in the Amazon catalog using various query
parameters.
- **Input Parameters**:
- `MarketplaceId`: The ID of the marketplace.
- `Query`: The search term.
- Additional filters (e.g., `ItemType`, `PageSize`, `SortOrder`).
- **Return**: A list of catalog items that match the search query.

#### Example Code Snippet (Python)


```python
import requests

# Constants
API_URL = "https://sellingpartnerapi-na.amazon.com/catalog/v2022-04-01/items"
MARKETPLACE_ID = '<your_marketplace_id>'
ASIN = '<your_item_asin>'
ACCESS_TOKEN = '<your_access_token>'

# Function to get catalog item


def get_catalog_item(asins):
url = f"{API_URL}/{asins}"
headers = {
"Authorization": f"Bearer {ACCESS_TOKEN}",
"Content-Type": "application/json",
"x-amz-access-token": ACCESS_TOKEN,
}
response = requests.get(url, headers=headers)
return response.json()
# Usage
item_info = get_catalog_item(ASIN)
print(item_info)
```

#### Rate Limits


- Ensure to handle API usage rates and limits to avoid throttling. Implement retry
mechanisms as necessary.

#### Notes & Caveats


- **Authorization**: Ensure that your application is authorized to access the
Selling Partner API using AWS Signature Version 4.
- **Error Handling**: Implement robust error handling to manage diverse error
responses from the API, such as rate limited and access denied errors.
- **Updates**: Regularly check the [Release Notes](https://developer-
docs.amazon.com/sp-api/docs/sp-api-release-notes) for updates and changes to API
behaviors or available features.

#### Additional Resources


- **API Reference**: Keep accessing the latest [API Reference](https://developer-
docs.amazon.com/sp-api/docs/catalog-items-api-reference) for full details on
parameters, responses, and available functions.
- **FAQs and Troubleshooting**: Utilize the general [SP-API FAQ](https://developer-
docs.amazon.com/sp-api/docs/sp-api-faq) for common questions and troubleshooting
steps.

This summary captures essential information for developers looking to utilize the
Catalog Items API within Amazon SP-API while ensuring they are aware of key
functionalities and best practices.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-models#data-


kiosk-api:
### Summary of Amazon Selling Partner API (SP-API) Models - Data Kiosk API

The SP-API provides various APIs for Amazon Selling Partners to retrieve and post
data. Below are the important details and usage instructions for the Data Kiosk
API.

---

#### Data Kiosk API Overview


- **Purpose**: The Data Kiosk API allows you to submit GraphQL queries to retrieve
data from various schemas in Amazon's Selling Partner API.

#### Key API Information


- **Current Version**: v2023-11-15
- **Availability**: Accessible for both seller and vendor accounts.

---

#### Important Classes, Functions, and Methods


- **GraphQL Queries**: This API utilizes GraphQL for querying data. Developers can
submit structured queries to obtain specific datasets based on their needs.

##### Example GraphQL Query


```graphql
query {
<query_name> {
<field_1>
<field_2>
...
}
}
```
*Note*: Replace `<query_name>`, `<field_1>`, and `<field_2>` with actual names
relevant to the data you wish to acquire.

---

#### Usage
1. **Submit a GraphQL Query**: Developers can interact with the API by sending POST
requests with the GraphQL syntax in the body.
2. **Handle Responses**: The API will return structured data as per the schema
defined in the specific GraphQL query used.

##### Example Request Structure


```http
POST /data-kiosk API endpoint
Content-Type: application/json

{
"query": "<GraphQL query here>"
}
```

---

#### Key Concepts


- **Schemas**: The Data Kiosk API allows querying various data schemas.
Understanding the schemas relevant to your application is essential for effective
data retrieval.
- **Response Handling**: The responses from GraphQL queries will usually be in JSON
format, containing the requested data or error messages if any issues arise.

---

#### Important Notes for Developers


- **Authorization**: Ensure your application is properly authorized to access
restricted data before making queries.
- **Rate Limits**: Be aware of the API's usage limits and ensure your application
handles rate limit errors gracefully.
- **Data Validity**: Always check for data validity and ensure the handling of null
or error responses in your implementation to avoid application crashes.

---

For further information on API updates, features, and detailed use cases, refer to
the official Amazon Selling Partner API documentation.

---

This summary provides a concise overview of the Data Kiosk API's functionality,
usage, and important considerations for developers working with the Amazon Selling
Partner API.
_____________________________
Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-models#easy-
ship-api:
### Summary of Amazon Selling Partner API (SP-API) Models

#### Overview of SP-API


The Selling Partner API (SP-API) enables developers to build applications to manage
their Amazon selling accounts. This includes gathering data from the seller's
partner account and posting data to it. Key APIs are designed to handle aspects
like inventory management, order processing, reporting, and more.

#### Key APIs and Their Usage

1. **Easy Ship API**


- **Description**: Used to manage and ship Amazon Easy Ship orders.
- **Current Version**: 2022-03-23
- **Use Case**: Automates the shipping process for sellers using Easy Ship.
- **Documentation Link**: [Easy Ship API Documentation](https://developer-
docs.amazon.com/sp-api/docs/easy-ship-api-reference)

2. **Fulfillment Inbound API**


- **Description**: Allows creation and updates of inbound inventory to Amazon's
fulfillment network.
- **Current Version**: 2024-03-20
- **Use Case**: Manage inventory being shipped into Amazon.
- **Documentation Link**: [Fulfillment Inbound API
Documentation](https://developer-docs.amazon.com/sp-api/docs/fulfillment-inbound-
api-reference)

3. **Feeds API**
- **Description**: Uploads data to Amazon for managing selling business
operations.
- **Current Version**: 2021-06-30
- **Key Fields**:
- `feedType`: Type of feed being uploaded (e.g., inventory, pricing).
- `marketplaceId`: The marketplace associated with the feed.
- **Use Case**: Submit inventory updates, pricing adjustments, and other data
modifications.
- **Documentation Link**: [Feeds API Documentation](https://developer-
docs.amazon.com/sp-api/docs/feeds-api-reference)

4. **Finances API**
- **Description**: Retrieves financial event data for specific orders or date
ranges.
- **Current Version**: 2024-06-19
- **Use Case**: Access financial performance data without waiting for statement
periods.
- **Documentation Link**: [Finances API Documentation](https://developer-
docs.amazon.com/sp-api/docs/finances-api-reference)

5. **Reports API**
- **Description**: Retrieves and manages reports to assist in business
management.
- **Current Version**: 2021-06-30
- **Use Case**: Generate sales performance reports, inventory reports, and
compliance reports.
- **Documentation Link**: [Reports API Documentation](https://developer-
docs.amazon.com/sp-api/docs/reports-api-reference)

#### Important Notes and Caveats


- **Authorization**: Proper authorization is required to access Selling Partner
APIs. Ensure that your application is authorized through the appropriate workflows
outlined in the documentation.
- **Rate Limiting**: Each API has its own usage limits. Exceeding these can result
in throttling, so monitor your application's usage patterns to remain compliant.
- **Error Handling**: Handle API responses carefully, including errors and rate
limit responses, to ensure robust application behavior.
- **Use of SDK**: There are SDKs available for various programming languages,
including Python. For Python, utilize the SDK to simplify API calls and manage
authentication.

#### Additional Resources


- **Release Notes & Updates**: Regularly check the [SP-API Release
Notes](https://developer-docs.amazon.com/sp-api/docs/sp-api-release-notes) for the
latest updates and changes to API functionality.
- **Tutorials**: Access tutorials for specific tasks such as automating API calls
and integrating functions within your application.

This summary encapsulates the essential APIs and concepts associated with the
Amazon SP-API. For detailed implementation and code examples, refer to the specific
API documentation linked above.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-models#fba-


inbound-eligibility-api:
### Summary of Amazon Selling Partner API (SP-API) Models

#### Overview
The Amazon Selling Partner API (SP-API) enables developers to access information
related to a customer's selling partner account, facilitating data gathering and
managing operations on the seller's account. Targeted for use with Python SDKs.

---

### Important APIs and Their Usage

1. **FBA Inbound Eligibility API**


- **Description:** Retrieve eligibility previews for items before shipping to
Amazon's fulfillment centers.
- **Version:** v1
- **Usage Example:**
```python
response = fba_inbound_eligibility_api.get_eligibility_preview(sku_list)
```
- **Key Fields:**
- `sku_list`: List of SKUs to check eligibility.
- **Contract:** Must include relevant authorization tokens.

2. **FBA Inventory API**


- **Description:** Retrieve information about inventory in Amazon’s fulfillment
network.
- **Version:** v1
- **Usage Example:**
```python
response = fba_inventory_api.get_inventory(seller_id)
```
- **Key Fields:**
- `seller_id`: The seller's unique ID for inventory retrieval.
- **Contract:** Includes headers for authorization and seller details.

3. **Feeds API**
- **Description:** Upload data to Amazon to manage the selling business.
- **Version:** v2021-06-30
- **Common Functionality:**
- **Upload Feed:**
```python
response = feeds_api.upload_feed(feed_data)
```
- **Feed Data:** Can include product listings, pricing updates, etc.

4. **Finances API**
- **Description:** Fetch financial events for a given order or date range
without waiting for statement closure.
- **Current Version:** v2024-06-19
- **Usage Example:**
```python
response = finances_api.get_financial_events(date_range)
```
- **Key Fields:**
- `date_range`: Specifies the period for financial events retrieval.

---

### Key Concepts

- **Authorization:** All API calls require authorization through OAuth 2.0 to


access seller data securely.
- **Response Format:** APIs return data in JSON format; developers must handle
responses accordingly.
- **Rate Limits:** Each API has defined rate limits; ensure to handle limits
gracefully to avoid throttling.
- **Error Handling:** Utilize the SP-API error handling guidelines to manage
responses correctly and debug issues efficiently.

---

### Important Notes

- **SDK Support:** Documentation provides examples using Python SDK; ensure to


download the relevant SDK for implementation.
- **Caveats:** Understand the data access policies and any specific restrictions
based on seller permissions or account type.
- **Updates and Deprecations:** Keep an eye on SP-API release notes for updates and
deprecations to APIs you intend to use.

#### Additional Resources


- **SP-API Release Notes:** For tracking changes, visit the official SP-API release
notes section.
- **Developer Hub:** Access additional documentation, support, and API reference
materials via the Developer Hub.

This organized summary provides developers with essential information and practical
usage details for working with the Amazon SP-API effectively.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-models#fba-


inventory-api:
### Amazon Selling Partner API (SP-API) Overview

The Amazon Selling Partner API (SP-API) allows developers to interact with Amazon's
selling platform. It facilitates the retrieval and posting of data related to
customer selling accounts through various APIs.

### Important APIs

#### 1. **FBA Inventory API**


- **Usage**: Use this API to retrieve information about inventory in Amazon's
fulfillment network.
- **Version**: 1 (Reference | Model)
- **Fields**: Information about SKU counts, locations, etc.
- **Contract**: Refer to the [FBA Inventory API documentation](https://developer-
docs.amazon.com/sp-api/docs/fba-inventory-api-v1-reference) for endpoints and
detailed request/response formats.

#### 2. **FBA Inbound Eligibility API**


- **Usage**: Get eligibility previews for items before shipping to Amazon's
fulfillment centers.
- **Version**: 1 (Reference | Model)
- **Fields**: Eligibility status, SKU, and other attributes.
- **Contract**: Check the [FBA Inbound Eligibility API
documentation](https://developer-docs.amazon.com/sp-api/docs/fba-inbound-
eligibility-api-v1-reference).

#### 3. **Feeds API**


- **Usage**: Upload data to Amazon to manage your selling business.
- **Version**: 2021-06-30 (Reference | Model)
- **Fields**: Feed type, feed data, and results.
- **Contract**: Visit the [Feeds API documentation](https://developer-
docs.amazon.com/sp-api/docs/feeds-api-v2021-06-30-reference).

### Key Classes and Functions

- **Authorization**:
- Applications must be authorized to access SP-API resources.
- Use tokens for authorization through the Tokens API, obtaining Restricted Data
Tokens (RDT).

- **Rate Limits**:
- Be aware of the usage limits set for each API to avoid throttling.

- **Error Handling**:
- Common errors include authorization issues and rate limit exceedances.
Implement robust error handling in your application.

### Workflow for Using SP-API

1. **Register Your Application**:


- Follow the registration process, and obtain client ID, secret, and needed
permissions.
2. **Authenticate**:
- Utilize the Tokens API for OAuth 2.0 to get permission to access seller or
vendor accounts.

3. **Connect Using SDKs**:


- Amazon provides SDKs in multiple languages. For Python, you can use the
official [Amazon Selling Partner SDK for Python](https://github.com/amzn/selling-
partner-api-sdk-python).

4. **Make API Calls**:


- Use the provided endpoints to perform operations such as inventory management,
order processing, and retrieving reports.

5. **Handle Responses and Errors**:


- Properly parse the responses and handle potential errors to ensure a smooth
user experience.

### Important Notes and Caveats

- **API Versions**:
- Always check for the latest version of the APIs as older versions might be
deprecated. Document releases and changes can be found in the SP-API Release Notes.

- **Data Sensitivity**:
- Be cautious when handling sensitive data, especially with the Restricted Data
Token.

- **Documentation Updates**:
- Regularly check the documentation for any updates or changes to methods,
fields, and API capabilities to keep your integration current.

- **Sandbox Environment**:
- Utilize the SP-API Sandbox for testing your applications without affecting
production data.

### References
- [SP-API Models and
Documentation](https://developer-docs.amazon.com/sp-api/docs/sp-api-models#fba-
inventory-api)
- [Amazon SP-API GitHub Repository](https://github.com/amzn/selling-partner-api-
sdk) for detailed examples and contributions.

This summary encapsulates the critical aspects necessary for developers to


effectively utilize the Amazon SP-API for their selling activities, focusing on API
interactions and operational workflows.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-models#feeds-


api:
# Summary of Amazon Selling Partner API (SP-API) - Feeds API

## Overview
The **Feeds API** allows developers to upload data to Amazon to manage selling
activities. This API is crucial for tasks such as product listings, inventory
updates, and pricing adjustments.

### Current Version


- **Version**: 2021-06-30
- **Available to**: Sellers and Vendors

## Key Features
- Upload various types of feed data to manage your selling business.
- Supports multiple feed types, including product updates, pricing, and fulfillment
details.

### Feed Types


A variety of feed types are supported, such as:
- **Business Feed Type Values**
- **Easy Ship Feed Type Values**
- **Fulfillment By Amazon Feed Type Values**
- **Invoicing Feed Type Values**
- **Listings Feed Type Values**
- **Order Feed Type Values**

## Important Classes and Methods


### Main Functions
Here are some key methods associated with the Feeds API:

1. **Submit Feed**
- **Usage**: Used to upload a feed to Amazon.
- **Parameters**:
- `feedType` (string): The type of feed to submit.
- `feedContent` (stream): The content of the feed as a stream.
- `marketplaceIds` (array): The list of marketplace IDs where the feed is
applicable.

2. **Get Feed Submission Results**


- **Usage**: Retrieves processing results for a specific feed submission.
- **Parameters**:
- `feedSubmissionId` (string): The ID of the feed submission to query.

3. **Get Feed Submission Count**


- **Usage**: Retrieves the count of feed submission errors or successes.
- **Parameters**:
- `feedType` (string): The type of feed to check.

### Example Code Snippet


This is a basic example of how to submit a feed using Python (ensure to install the
necessary SDK for SP-API):

```python
import requests

def submit_feed(api_url, access_token, feed_type, feed_content, marketplace_ids):


headers = {
'Authorization': f'Bearer {access_token}',
'Content-Type': 'application/json',
}

payload = {
"feedType": feed_type,
"feedContent": feed_content,
"marketplaceIds": marketplace_ids
}

response = requests.post(f"{api_url}/feeds", json=payload, headers=headers)


return response.json()

# Example usage
response = submit_feed(
api_url='https://sellingpartnerapi-na.amazon.com',
access_token='YOUR_ACCESS_TOKEN',
feed_type='POST_PRODUCT_DATA',
feed_content='YOUR_FEED_CONTENT',
marketplace_ids=['ATVPDKIKX0DER']
)
print(response)
```

## Key Concepts
- **Authorization**: Ensure you have a valid access token to call the API.
- **Marketplaces**: Understand the different marketplace IDs that Amazon uses, as
feeds must be specified for applicable marketplaces.
- **Rate Limits**: Follow API rate limits to avoid throttling. Make sure to check
your usage and handle errors gracefully.
- **JSON Schema**: Familiarize yourself with the JSON schemas for the different
feed types to ensure your data structure is correct.

## Important Notes
- **Documentation**: Regularly refer to the [SP-API Release
Notes](https://developer-docs.amazon.com/sp-api/docs/sp-api-release-notes) for
updates and changes.
- **Error Handling**: Implement error handling for cases when feed submissions fail
due to invalid content or authorization issues.
- **Best Practices**: Follow the provided [Feeds API Best
Practices](https://developer-docs.amazon.com/sp-api/docs/feeds-api-best-practices)
for optimal performance and reliability of your API usage.
- **Limited Access**: Ensure to handle permissions and limitations set by Amazon
when accessing restricted data fields.

This summary provides an overview of the Feeds API along with relevant methods,
usage examples, and important considerations for developers looking to integrate
with the Amazon SP-API.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-


models#finances-api:
### Summary of Amazon SP-API Models Documentation

#### Overview of Selling Partner API (SP-API)


The Selling Partner API (SP-API) is designed to help sellers integrate with
Amazon's platform, allowing them to gather and post data from their selling
accounts. It supports various functionalities such as managing inventory, orders,
and finances.

---

### Key APIs

1. **Finances API**
- **Purpose:** Retrieve financial events related to orders or date ranges
without waiting for statement periods to close.
- **Current Version:** v2024-06-19 (Model and Reference available).
- **Usage:**
- **Request Example:**
```json
{
"orderId": "string",
"dateRangeStart": "YYYY-MM-DD",
"dateRangeEnd": "YYYY-MM-DD"
}
```
- **Fields:**
- `orderId`: Unique identifier for the order.
- `dateRangeStart`: The start date for the financial events.
- `dateRangeEnd`: The end date for the financial events.

2. **Feeds API**
- **Purpose:** Upload data to Amazon to manage your selling business, including
updating product listings and inventory.
- **Current Version:** v2021-06-30 (Model and Reference available).
- **Usage:**
- **Request Example:**
```json
{
"feedType": "string",
"marketplaceIds": ["string"],
"inputFeed": "base64-encoded-string"
}
```
- **Fields:**
- `feedType`: Type of feed to be uploaded (e.g., product listings).
- `marketplaceIds`: Array of marketplace identifiers where the feed is
applicable.
- `inputFeed`: The actual data (base64 encoded) being uploaded.

3. **Orders API**
- **Purpose:** Retrieve order information related to your selling business.
- **Current Version:** v0 (Model and Reference available).
- **Usage:**
- **Request Example:**
```json
{
"orderId": "string"
}
```
- **Fields:**
- `orderId`: Unique identifier for the order you want to query.

---

### Key Concepts

- **Authorization:** SP-API applications need to be authorized to access seller


data. Different roles (like `Finance and Accounting`, `Inventory and Order
Tracking`) grant specific permissions.
- **Marketplaces:** Each API may differ based on the marketplace (e.g., US, EU).
Always ensure the correct marketplace ID is used for API calls.
- **Rate Limits:** Each API has a usage plan with defined rate limits. Developers
are advised to familiarize themselves with these limits to avoid throttling.

---
### Important Notes and Caveats

- **Versioning:** APIs may have multiple versions. Always use the latest version
unless there’s a specific requirement to use an older version.
- **Deprecation:** Be aware of deprecation schedules for APIs to prevent issues in
your application as older APIs get phased out.
- **Data Format:** Ensure that the data sent in requests is correctly formatted
(e.g., JSON structure).

---

### Example Use Case

To retrieve financial events, you would first authenticate your API application,
and then use the Finances API with the required parameters like `orderId`,
`dateRangeStart`, and `dateRangeEnd` to obtain the relevant information about
financial transactions relevant to that order.

---

This summary provides the essential information necessary for utilizing the Amazon
SP-API effectively, tailored to developers looking to integrate these
functionalities into their applications. For further details, always refer to each
API's specific documentation on the Amazon Developer website.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-


models#fulfillment-inbound-api:
# Summary: Amazon Selling Partner API (SP-API) Models Documentation

## Overview of SP-API
The Selling Partner API (SP-API) allows developers to integrate with Amazon's
Selling Partner program to gather data and perform actions on behalf of their
clients. This includes capabilities like uploading inventory data, retrieving order
details, and managing listings, among others.

### Key Concepts


- **Seller vs. Vendor Accounts**: Some APIs are tailored for seller accounts, while
others cater to vendor accounts. Understanding which account type your application
will operate under is crucial.
- **Authorization**: Ensure that API applications are properly authorized to access
data specific to a seller or vendor account.
- **Data Formats**: Responses are often in JSON format, and adherence to the
defined schemas is critical.

## Important APIs and Their Usage

### 1. Fulfillment Inbound API


- **Purpose**: Create and update inbound inventory in Amazon's fulfillment network.
- **Current Version**: v2024-03-20
- **Usage**:
- To create an inbound shipment.
- To update details about items being sent to Amazon.

### 2. Feeds API


- **Purpose**: Upload data to manage your selling business.
- **Current Version**: v2021-06-30
- **Usage**:
- To submit various types of data feeds, such as inventory, price updates, and
promotional information.

### 3. Orders API


- **Purpose**: Retrieve order information.
- **Current Version**: v0
- **Usage**:
- To get details about customer orders and their current statuses.

### 4. Inventory and Order APIs


- **FBA Inventory API**: Access information about inventory in Amazon's fulfillment
network.
- **Merchant Fulfillment API**: Purchase shipping for non-Prime and Prime orders
via Amazon Buy Shipping.

### Code Example Snippets

#### Python Example for Feeds API

```python
import requests

url = "https://sellingpartnerapi-na.amazon.com/feeds/2021-06-30/feeds"
headers = {
"Authorization": "Bearer <YOUR_ACCESS_TOKEN>",
"x-amz-access-token": "<YOUR_ACCESS_TOKEN>",
"x-amz-date": "<CURRENT_DATE>",
"Content-Type": "application/json"
}
data = {
"feedType": "POST_PRODUCT_DATA",
"marketplaceIds": ["A1PA6795UKMFR9"],
"inputStream": "<BASE64_ENCODED_CONTENT>"
}

response = requests.post(url, headers=headers, json=data)


print(response.json())
```

### Important Classes and Functions


- **Requests Library**: Used for making HTTP requests to the SP-API endpoints.
- **Feed Types**: Different types of feeds (e.g., inventory, pricing) that can be
uploaded. It's critical to choose the appropriate feed type for your data.

### Notes and Caveats


- **Authorization**: Ensure your application correctly handles token management and
renewals. Use the provided authorization workflows to authenticate your application
properly.
- **Rate Limits**: Be mindful of API rate limits; too many requests in a short time
frame can result in throttling.
- **Error Handling**: Implement robust error handling to manage API exceptions and
errors gracefully.

### Resources for Further Reference


- **API Reference & Models**: For a complete list of APIs, their functionalities,
and specifications, refer to [API Reference](https://developer-docs.amazon.com/sp-
api/docs/sp-api-models#fulfillment-inbound-api).
- **Release Notes**: Stay updated on the latest API changes and deprecations via
the SP-API Release Notes.

This summary covers the key functionalities and usage of the Amazon SP-API,
offering guidance for effectively integrating and utilizing the API in your
applications.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-


models#fulfillment-outbound-api:
# Summary of Amazon SP-API Models Documentation

## Overview
The Selling Partner API (SP-API) allows developers to gather data from Amazon's
marketplace and post data related to a customer's selling account. This
documentation provides information on the various API models available, their
functions, and practical use cases.

## Important API Models


### 1. **Fulfillment Outbound API**
- **Usage**: Used to retrieve information about Multi-Channel Fulfillment (MCF)
orders in Amazon's fulfillment network.
- **Current Version**: `2020-07-01`
- **Example Endpoints**:
```http
GET /fulfillmentOutbound/v0/orders/{orderId}
```
- **Fields**: `orderId`, `orderStatus`, `createdDate`.

### 2. **Feed API**


- **Usage**: Enables uploading data to Amazon to manage listing and inventory.
- **Current Version**: `2021-06-30`
- **Example Endpoint**:
```http
POST /feeds/v2021-06-30/feeds
```
- **Fields**: `feedType`, `inputFile`, `marketplaceIds`, `contentType`.

### 3. **Inventory API**


- **Usage**: Retrieves information about fulfillment network inventory.
- **Current Version**: `2024-05-09`
- **Example Endpoint**:
```http
GET /fba/inventory/v1/inventory_summary
```
- **Fields**: `sku`, `marketplaceId`.

### 4. **Finances API**


- **Usage**: Provides access to financial events related to orders.
- **Current Version**: `2024-06-19`
- **Example Endpoint**:
```http
GET /finances/v2024-06-19/financialEvents
```
- **Fields**: `amazonOrderId`, `financialEventGroupId`.

## Key Methods and Concepts


- **User-Agent Header**: Always include a User-Agent header in all requests to
identify your application.

- **Authorization**: Applications must be authorized to access SP-API resources.


Use Restricted Data Tokens (RDTs) when needed.

- **Error Handling**: Be aware of the various error codes and handling strategies,
such as rate-limiting and authorization errors.

## Code Examples (Python)


### Sample Function to Retrieve Orders
```python
import requests

def get_fulfillment_order(order_id, access_token):


headers = {
'Authorization': f'Bearer {access_token}',
'User-Agent': 'YourAppName/1.0',
'Accept': 'application/json',
}
url = f"https://sellingpartnerapi-na.amazon.com/fulfillmentOutbound/v0/orders/
{order_id}"
response = requests.get(url, headers=headers)
return response.json()
```

### Sample Function to Upload Feed


```python
def upload_feed(feed_data, access_token):
headers = {
'Authorization': f'Bearer {access_token}',
'Content-Type': 'application/json',
}
url = "https://sellingpartnerapi-na.amazon.com/feeds/v2021-06-30/feeds"
response = requests.post(url, headers=headers, json=feed_data)
return response.json()
```

## Important Notes
- Ensure SDK or libraries are kept updated as the APIs evolve regularly.
- Familiarize yourself with Amazon's policies regarding acceptable use and data
protection.
- Rate limits may apply to your API calls; implement strategies to handle these
limits gracefully in your application.

## Additional Resources
- For a comprehensive list of all available API models and their usage, consult the
[SP-API Reference](https://developer-docs.amazon.com/sp-api/docs/sp-api-models).
- Stay informed about updates and deprecations via the SP-API release notes.

This summary outlines the essential components and usage of Amazon's SP-API,
providing a quick reference to work effectively with the API and integrate it into
your applications.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-


models#invoices-api:
### Summary of the Selling Partner API (SP-API) Models Documentation

#### Overview
The Selling Partner API (SP-API) provides a set of RESTful APIs that allow
developers to access and manage data related to their selling accounts on Amazon.
This documentation page pertains specifically to various APIs under SP-API,
including the Invoices API, which allows users to retrieve and manage invoices.

---

### Key APIs

1. **Invoices API**
- **Current Version**: 2024-06-19
- **Usage**: Retrieve and manage invoices for your selling activities.
- **Reference**: [Invoices API Reference](https://developer-docs.amazon.com/sp-
api/docs/invoices-api-reference)
- **Use Case Guide**: [Invoices API Use Case Guide](https://developer-
docs.amazon.com/sp-api/docs/invoices-api-use-case-guide)
- **FAQ**: [Invoices API
FAQ](https://developer-docs.amazon.com/sp-api/docs/invoices-api-faq)

2. **Important Class Functions/Methods**:


- **`getInvoiceList()`**: Method to retrieve a list of invoices for a specified
seller.
- **`getInvoice()`**: Method to retrieve detailed information about a specific
invoice.

3. **Other Relevant APIs**:


- **Feeds API**: Upload data to manage your selling business.
- **Current Version**: 2021-06-30
- **Reference**: [Feeds API Reference](https://developer-docs.amazon.com/sp-
api/docs/feeds-api-reference)
- **Finances API**: Get financial event details for orders.
- **Current Version**: 2024-06-19
- **Reference**: [Finances API
Reference](https://developer-docs.amazon.com/sp-api/docs/finances-api-reference)

---

### Code Examples

**Python Example for Using the Invoices API**

```python
import requests

# Configure the API endpoint and headers


api_endpoint = "https://sellingpartnerapi-na.amazon.com/invoices/v1/invoices"
headers = {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
}

# Function to get invoices


def get_invoices():
response = requests.get(api_endpoint, headers=headers)
if response.status_code == 200:
return response.json() # Return the list of invoices
else:
return {"error": response.json()} # Handle errors

# Fetch invoices
invoices = get_invoices()
print(invoices)
```

---

### Important Concepts

- **Authorization**:
- SP-API uses OAuth 2.0 for authorization. Developers must obtain a restricted
data token (RDT) to access certain resources.

- **Rate Limits**:
- Be aware of rate limits for each API to avoid throttling errors. Check the
documentation for specific limits applicable to your application.

- **Response Format**:
- The APIs generally return JSON responses. Always ensure to parse these
responses correctly in your application.

---

### Notes for Developers

- **Versioning**: Always refer to the latest versions of APIs for any updates or
changes. The documentation maintains a changelog for significant updates.

- **Sandbox Testing**: Utilize the provided sandbox environment for testing your
API integrations without affecting live data.

- **Error Handling**: Implement robust error handling to manage API response errors
effectively. This includes handling HTTP status codes and checking for validation
errors in the response body.

- **Best Practices**: Follow best practices as outlined in the respective API


documentation to optimize performance and adhere to Amazon’s usage policies.

---

### Conclusion
This summary provides a concise overview of essential SP-API models, focusing on
the Invoices API, relevant code examples, key methods and functions, and vital
concepts for effective implementation. For more detailed information, refer to the
specific API links provided above.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-


models#listings-items-api:
### Amazon Selling Partner API (SP-API) - Listings Items API Overview

The **Listings Items API** allows developers to manage product listings on Amazon.
This API facilitates retrieving, creating, and updating listings, as well as
accessing information related to product attributes.
#### API Versions
- **Current Version**: 2021-08-01
- **Previous Version**: 2020-09-01

#### Key Features


- Access directly to listings on Amazon.
- Ability to manage product attributes and restrictions.

---

### Important Classes and Methods

#### 1. **GetListingsItems**
- **Description**: Retrieves item information for a specified seller.
- **Parameters**:
- `sellerId` (string): The unique identifier for the seller.
- `sku` (string): SKU (Stock Keeping Unit) of the product for which listing
details are requested.
- **Response**: Returns listing information, including current price,
availability, and attributes.

#### 2. **PutListingsItem**
- **Description**: Creates or updates a listing item.
- **Parameters**:
- `sellerId` (string): The unique identifier for the seller.
- `sku` (string): SKU of the product.
- `itemData` (object): Details of the item being created/updated (includes
title, description, price, etc.).
- **Response**: Confirmation of successful creation or update.

#### 3. **DeleteListingsItem**
- **Description**: Deletes a specified listing item.
- **Parameters**:
- `sellerId` (string): The unique identifier for the seller.
- `sku` (string): SKU of the product to be deleted.
- **Response**: Confirmation of successful deletion.

#### 4. **GetListingsItemRestrictions**
- **Description**: Retrieves any restrictions that apply to a specific item
listing.
- **Parameters**:
- `sellerId` (string): The unique identifier for the seller.
- `sku` (string): SKU of the product.
- **Response**: Details of the restrictions applied to the item listing.

---

### Usage Example

```python
import requests

# Base URL for the Listings Items API


base_url = "https://sellingpartnerapi-na.amazon.com/listingsItems/2021-08-01"

# Get item information


def get_listings_item(seller_id, sku):
url = f"{base_url}/listings/{seller_id}/{sku}"
response = requests.get(url)
return response.json()

# Update item information


def update_listings_item(seller_id, sku, item_data):
url = f"{base_url}/listings/{seller_id}/{sku}"
response = requests.put(url, json=item_data)
return response.json()

# Example item data for update


item_data = {
"title": "Example Product Title",
"description": "Description of the example product",
"price": {
"currency": "USD",
"amount": "19.99"
},
"attributes": {
"color": "red",
"size": "M"
}
}

# Get item
print(get_listings_item("SELLER_ID", "EXAMPLE_SKU"))

# Update item
print(update_listings_item("SELLER_ID", "EXAMPLE_SKU", item_data))
```

---

### Important Notes


- **Authorization**: APIs require proper authorization; ensure authentication is
handled via OAuth 2.0.
- **Rate Limits**: Be aware of API rate limits to avoid service disruptions.
- **Error Handling**: Implement error handling to manage API errors like
authorization issues, validation errors, and rate limits.

---

### Key Concepts


- **SKU (Stock Keeping Unit)**: Unique identifier for each item that is listed on
Amazon.
- **Item Attributes**: Metadata associated with an item, such as title,
description, and pricing details.
- **Seller ID**: Unique identifier for merchants using the Amazon SP-API to manage
their products.

---

For further details and updates on specific operations or integration, developers


should refer to the [Selling Partner API documentation](https://developer-
docs.amazon.com/sp-api/docs/sp-api-models#listings-items-api) directly. This will
provide comprehensive guides on other APIs, usage examples, and the structure of
JSON responses.
_____________________________
Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-
models#listings-restrictions-api:
### Summary of Amazon SP-API Models Documentation

#### Overview
The Selling Partner API (SP-API) allows developers to gather data from Amazon
selling partners and to post data to their selling accounts. This documentation
contains information about various APIs that can be used for different
functionalities related to product listings, orders, finance, notifications, and
more.

#### Key API Models and Their Usage

1. **Listings Restrictions API**


- **Description**: Retrieves restrictions on Amazon catalog listings.
- **Current Version**: `v2021-08-01`
- **Available for**: Sellers, Vendors
- **Usage**: Useful to identify which products or product types have
restrictions that could impact listing creation or modifications.
- **Reference**: `[Listings Restrictions API](https://developer-
docs.amazon.com/sp-api/docs/listings-restrictions-api)`

2. **Listings Items API**


- **Description**: Provides access to product listings on Amazon.
- **Current Version**: `v2021-08-01` (also `v2020-09-01` for prior version)
- **Available for**: Sellers, Vendors
- **Usage**: To retrieve, create, update, or delete product listings.
- **Reference**: `[Listings Items API](https://developer-docs.amazon.com/sp-
api/docs/listings-items-api)`

3. **Finances API**
- **Description**: Retrieves financial events for orders within a specified date
range.
- **Current Version**: `v2024-06-19`, also available in `v0`
- **Available for**: Sellers
- **Usage**: Useful for reports on financial transactions related to orders.
- **Reference**: `[Finances
API](https://developer-docs.amazon.com/sp-api/docs/finances-api)`

4. **Product Fees API**


- **Description**: Retrieves estimated fees for a product.
- **Current Version**: `v0`
- **Available for**: Sellers
- **Usage**: To anticipate costs related to fees incurred from sales on Amazon.
- **Reference**: `[Product Fees
API](https://developer-docs.amazon.com/sp-api/docs/product-fees-api)`

5. **Orders API**
- **Description**: Access order information.
- **Current Version**: `v0`
- **Available for**: Sellers
- **Usage**: To read order details and implement order management operations
efficiently.
- **Reference**: `[Orders
API](https://developer-docs.amazon.com/sp-api/docs/orders-api)`

#### Implementation Notes


- **Authorization**: Use the Authorization process to gain access to the SP-API
endpoints.
- **SDKs**: Amazon provides SDKs specifically for Python, Java, C#, and JavaScript
that can be used to interact with the API effectively.

#### Code Example Snippet (Python)


Here’s an example of how you could make a request using the Listings Restrictions
API:
```python
import requests

API_URL = "https://sellingpartnerapi-na.amazon.com/listings/restrictions"
headers = {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
}

def get_listing_restrictions(sku):
response = requests.get(f"{API_URL}/{sku}", headers=headers)
return response.json()

# Usage
restrictions_info = get_listing_restrictions("example_sku")
print(restrictions_info)
```

### Important Concepts


- **Marketplace IDs**: Necessary for identifying the specific selling environment
you are working in.
- **Response Format**: APIs return data in a JSON format. Be prepared to handle
parsing and extracting data from the responses.
- **Rate Limits**: Be aware of API usage limits to avoid hitting restrictions that
could impact your application's functionality.

#### Caveats
- Always check for API versioning as features may change between versions.
- Ensure to handle authorization and token management securely to protect your
selling partner account.
- Review the SP-API Release Notes for any updates regarding deprecated features or
functionalities before deploying your application.

### Resources
- **SP-API GitHub Repository**: For tracking announcements and release changes.

This summary provides a foundation for using the Selling Partner API effectively.
Further exploration of each specific API documentation is recommended for detailed
implementation.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-


models#merchant-fulfillment-api:
# Amazon Selling Partner API (SP-API) Summary

The Amazon Selling Partner API (SP-API) allows developers to interact with a
customer’s selling partner account to collect and send relevant data using various
APIs.

## Key Concepts
- **SP-API Models**: A collection of APIs provided by Amazon to facilitate
different functions such as order management, product listing, fulfillment, and
finance.
- **Seller vs. Vendor Accounts**: Some APIs are exclusively for sellers, while
others may only be available to vendors or both.
- **Authorization**: Access to APIs requires proper authorization protocols,
including generating restricted data tokens and managing application credentials.

## Important APIs and Their Usage

### 1. Merchant Fulfillment API


- **Description**: Used to purchase shipping for non-Prime and Prime orders via
Amazon Buy Shipping.
- **Current Version**: v0
- **Reference**: [Merchant Fulfillment API Documentation](https://developer-
docs.amazon.com/sp-api/docs/merchant-fulfillment-api-v0-reference)

### 2. Listings Items API


- **Description**: Access and manage product listings on Amazon.
- **Current Version**: v2021-08-01
- **Reference**: [Listings Items API Documentation](https://developer-
docs.amazon.com/sp-api/docs/listings-items-api-v2021-08-01-reference)

### 3. Orders API


- **Description**: Retrieve order information from the selling partner account.
- **Current Version**: v0
- **Reference**: [Orders API Documentation](https://developer-docs.amazon.com/sp-
api/docs/orders-api-v0-reference)

### 4. Feeds API


- **Description**: Upload data to Amazon for managing seller businesses.
- **Current Version**: v2021-06-30
- **Reference**: [Feeds API Documentation](https://developer-docs.amazon.com/sp-
api/docs/feeds-api-v2021-06-30-reference)

### 5. Finances API


- **Description**: Access financial event information related to orders.
- **Current Version**: v2024-06-19
- **Reference**: [Finances API Documentation](https://developer-docs.amazon.com/sp-
api/docs/finances-api-v2024-06-19-reference)

## Code Examples

### Python SDK Usage


To get started with the SP-API, developers can reference SDKs specifically for
Python. Here's a basic example of how to connect and authenticate:

```python
from sp_api.api import Orders

# Initialize API client


orders_api = Orders(
refresh_token='your_refresh_token',
lwa_app_id='your_lwa_app_id',
lwa_client_secret='your_lwa_client_secret',
aws_access_key='your_aws_access_key',
aws_secret_key='your_aws_secret_key',
role_arn='your_role_arn',
)

# Example to retrieve orders


orders_response = orders_api.get_orders(CreatedAfter='2023-01-01T00:00:00Z')
print(orders_response)
```

### Templated API Request


A sample request for the Merchant Fulfillment API to get shipping options might
look like this:

```json
{
"ShippingOption": {
"DeliveryExperience": "Delivery",
"ShipToAddress": {
"Name": "John Doe",
"AddressLine1": "123 Elm St",
"City": "Seattle",
"StateOrRegion": "WA",
"PostalCode": "98101",
"CountryCode": "US"
}
}
}
```

## Important Notes and Caveats

- **Rate Limits**: Be mindful of the API's usage limits to avoid throttling or


being blocked from making additional requests.
- **Authorization Tokens**: Ensure that tokens are refreshed periodically as per
the required protocol to maintain continued access.
- **API Update Notifications**: Regularly check the SP-API [Release Notes]
(https://developer-docs.amazon.com/sp-api/docs/release-notes) for updates on API
changes or deprecations.
- **Testing Environments**: Use the SP-API Sandbox for testing before deploying
applications into production to avoid unintended consequences in a live
environment.

This summary provides essential information for developers looking to use the
Amazon Selling Partner API effectively while coding in Python. Always refer to the
official API documentation for the latest updates and more detailed function
definitions.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-


models#notifications-api:
### Summary of Amazon SP-API Models and Notifications API

The Selling Partner API (SP-API) provides various APIs to interact with Amazon's
platform, allowing sellers to gather and post data. This summary focuses on key
aspects relevant to using the SP-API, particularly the Notifications API.

---

#### Core Concepts


1. **SP-API Overview**:
- The SP-API is designed for Amazon sellers, enabling them to access their
selling information and perform actions like managing inventory, processing orders,
and handling finance events.
- It consists of various APIs tailored to specific seller and vendor needs.

2. **Notifications API**:
- Subscribes to notifications related to a seller's business (e.g., order
changes).
- Helps in automating workflows based on events that occur on the seller's
account.

---

#### Important Classes and APIs

- **A+ Content Management API**:


- Use: Create and edit A+ content for products.
- Current Version: 2020-11-01. Available for both Sellers and Vendors.

- **App Integrations API**:


- Use: Send and display notifications in Seller Central.
- Current Version: 2024-04-01. Available for Sellers.

- **Catalog Items API**:


- Use: Retrieve details about items in the Amazon catalog.
- Current Version: 2022-04-01. Available for Sellers.

- **Notifications API**:
- Use: Subscribe to notifications relevant to your selling business.
- Current Version: 2024-06-19. Available for Sellers.
- **Example**: Subscribe to ORDER_CHANGE notification to react to customer order
changes.

- **Reports API**:
- Use: Manage and request various reports related to the selling operation.
- Current Version: 2021-06-30. Available for Sellers.

---

#### Key Methods and Usage

- **Subscription to Notifications**:
- To receive notifications, you must first grant permissions to your application
for the Amazon Simple Queue Service (SQS) to handle and process notification
messages.

- **API Request Format**:


- All API requests should include a valid User-Agent header and follow the
required structure based on the specific API being accessed.
- Example Request Structure for Notifications API:
```json
{
"notificationType": "ORDER_CHANGE",
"marketplaceId": "A1F83G8C2ARO7P",
"payload": {
"orderId": "123-4567890-1234567",
"status": "SHIPPED"
}
}
```

---

#### Notes and Caveats

- **Authorization**:
- Ensure the application is authorized correctly to access data. Use appropriate
OAuth workflows to manage access tokens.

- **Rate Limits**:
- Each API comes with its own usage limits. Monitor API usage to avoid hitting
these limits, especially when processing operations in bulk or high frequency.

- **Versioning**:
- Always check for the latest version of APIs before implementing to ensure
compatibility and access to the newest features.

- **Deprecation and Updates**:


- Keep an eye on the SP-API Release Notes for any changes, deprecations, or new
features that might affect your application.

---

This summary provides a structured overview of key elements related to the Amazon
SP-API and its models, ensuring developers have the essential information needed to
integrate with the system effectively. For practical implementation, developers
should refer to specific API documentation and examples on the Amazon developer
portal.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-models#orders-


api:
# Summary of SP-API Models Documentation

## Overview
The Selling Partner API (SP-API) provides various APIs to help developers gather
and post data associated with Amazon's selling partners. This resource is aimed at
enabling seamless integration with Amazon's services, specifically tailored to
automate interactions with seller accounts.

## Key API Models


### Key APIs and Their Functions:
1. **A+ Content Management API**
- **Purpose**: Create and edit A+ content.
- **Current Version**: 2020-11-01

2. **Amazon Warehousing and Distribution API**


- **Purpose**: Track Amazon Warehousing and Distribution (AWD) shipments.
- **Current Version**: v2024-05-09

3. **Orders API**
- **Purpose**: Retrieve order information.
- **Current Version**: v0
4. **Finances API**
- **Purpose**: Get financial events for orders or date ranges without needing to
wait for statement periods.
- **Current Version**: v2024-06-19

5. **Feeds API**
- **Purpose**: Upload data to manage your selling business.
- **Current Version**: v2021-06-30

6. **Reports API**
- **Purpose**: Retrieve and manage reports for managing your selling activities.
- **Current Version**: v2021-06-30

### Example Code Snippet: Orders API


```python
import requests

def get_order_data(order_id):
url = f"https://sellingpartnerapi-na.amazon.com/orders/v0/orders/{order_id}"
headers = {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"x-amz-region": "us-east-1"
}
response = requests.get(url, headers=headers)
return response.json()

# Usage
order_info = get_order_data("ORDER_ID_HERE")
print(order_info)
```

## Important Classes & Functions


- **Endpoints**: Each API has specific endpoints that serve different functions,
e.g., `GET /orders/v0/orders/{order_id}` for retrieving order details.
- **Authorization**: All API calls require proper authorization with a valid access
token.
- **Data Handling**: The APIs return data in JSON format; proper parsing and error
handling mechanisms should be implemented for robust application design.

## Key Concepts
1. **Authorization**:
- Applications must be registered, and proper scopes must be granted for data
access using Restricted Data Tokens.

2. **Rate Limits**:
- Each API has specific limits on the number of requests per hour, which should
be adhered to prevent throttling.

3. **Notification Subscriptions**:
- Use the Notifications API to subscribe to events relevant to your selling
activities, such as ORDER_CHANGE.

## Important Notes
- **Versioning**: Always ensure you are working with the latest API version for
compatibility and features.
- **Deprecation Policy**: APIs may be deprecated and replaced; review the **SP-API
Release Notes** for announcements.
- **Caveats**: Care should be taken to handle HTTP errors (e.g., 400 errors)
appropriately to ensure application robustness.
By leveraging the SP-API, developers can automate data exchange and integrate their
applications with Amazon’s selling partner functionalities effectively. Use the
code snippets and guidelines provided to build your applications with the SP-API in
Python.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-


models#product-fees-api:
### Summary of SP-API Models

The Selling Partner API (SP-API) provides a way for developers to gather data from
a customer's selling partner and post data to a customer's selling account. This
technical summary focuses on essential information pertaining to the API and
relevant models.

#### Key Concepts

- **SP-API Models**: Various APIs within SP-API that facilitate different


functionalities, such as retrieving product fees, managing product listings, and
interacting with financial data.

- **APIs Available**: The SP-API has several APIs categorized under Seller and
Vendor accounts. Each API has a version and reference model associated with it,
along with specific use cases.

- **Versioning**: Each API has a version number, which indicates the API's release
level and helps developers ensure they are using the correct functionalities as
intended.

#### Important APIs and Their Descriptions

1. **Product Fees API**


- **Usage**: Retrieve estimated fees for a product, allowing sellers to consider
these fees in their pricing strategy.
- **Version**: v0
- **Reference**: [Product Fees API Reference](https://developer-
docs.amazon.com/sp-api/docs/product-fees-api)
- **Use Case Example**:
```python
# Example request to retrieve product fees (pseudo-code)
response = product_fees_api.get_fees_for_asin(asin='B00000000',
marketplace_id='ATVPDKIKX0DER')
```

2. **Product Pricing API**


- **Usage**: Retrieves product pricing and offer information for products in the
Amazon catalog.
- **Version**: v2022-05-01 and v0
- **Reference**: [Product Pricing API Reference](https://developer-
docs.amazon.com/sp-api/docs/product-pricing-api)

3. **Orders API**
- **Usage**: Retrieve order information from seller accounts.
- **Version**: v0
- **Reference**: [Orders API Reference](https://developer-docs.amazon.com/sp-
api/docs/orders-api)
4. **Listings Items API**
- **Usage**: Access and manage product listings on Amazon.
- **Version**: v2021-08-01 and v2020-09-01
- **Reference**: [Listings Items API Reference](https://developer-
docs.amazon.com/sp-api/docs/listings-items-api)

#### Caveats and Notes

- **Authorization**: Applications must be authorized properly to access the desired


APIs. Developers need to use the correct authorization mechanisms to avoid access
errors.

- **Rate Limits**: Be aware that each API comes with its own set of rate limits.
Exceeding these limits may result in throttling or access restrictions.

- **Sandbox Environment**: Utilize the SP-API Sandbox for testing API calls without
affecting live data. This environment simulates requests for development purposes.

- **Documentation Updates**: Keep an eye on API Release Notes for any updates or
changes to the API. Staying updated with the latest changes ensures that your
application continues to work seamlessly.

#### Additional Resources

- [SP-API Release Notes](https://developer-docs.amazon.com/sp-api/docs/release-


notes)
- [API Usage Best Practices](https://developer-docs.amazon.com/sp-api/docs/api-
usage-best-practices)

This summary covers the essentials needed to work with the SP-API effectively,
helping developers understand API functions, usage, and best practices while
building applications that integrate with Amazon's selling platform.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-


models#product-pricing-api:
### Amazon Selling Partner API (SP-API) Overview

The Amazon Selling Partner API (SP-API) allows developers to gather and post data
related to a customer's selling partner account. This is particularly aimed at
integrating sales data and managing various aspects of a seller's business.

### Key APIs

1. **Product Pricing API**


- **Purpose**: Retrieve product pricing and offer information from the Amazon
catalog.
- **Current Version**: v2022-05-01
- **Usage**:
- **Get Pricing Details**: Use this API to get current pricing and offer
details for specific products.
- **Example API Request**:
```python
import requests

endpoint =
"https://sellingpartnerapi-na.amazon.com/pricing/v2022-05-01/pricing"
headers = {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json",
"User-Agent": "YourApp/1.0"
}
response = requests.get(endpoint, headers=headers)
pricing_data = response.json()
```

2. **Product Fees API**


- **Purpose**: Retrieve estimated fees for specific products.
- **Current Version**: v0
- **Usage**: Allows calculation of estimated fees associated with products to
help manage pricing strategies.

3. **Orders API**
- **Purpose**: Retrieve order information from the seller's account.
- **Current Version**: v0
- **Usage**: To access order details for shipment and fulfillment processes.

4. **Inventory APIs**
- **FBA Inventory API**: For retrieving information about inventory in Amazon's
fulfillment centers.
- **Fulfillment Inbound API**: Manages inbound inventory to Amazon’s fulfillment
network.

### Important Classes and Methods

- **Authentication**: All API calls require authentication using a bearer token


obtained from Amazon's LWA (Login with Amazon) service.
- **Self-authorization**: `self_authorize()`
- **Revoke Authorization**: `revoke_authorization()`

- **Data Submission**: Use the Feeds API to upload data for inventory management
and listing updates.

### Key Concepts

- **API Contracts**: Each API has defined contracts specifying required fields and
response formats. It's essential to refer to the specific API documentation for
detailed specifications.

- **Rate Limits**: Be aware of the limitations imposed on how frequently you can
call certain APIs. Exceeding these limits may result in throttling or temporary
bans.

- **Notifications**: Use the Notifications API to subscribe to and receive updates


relevant to your selling operations.

### Important Notes

- **Developer Registration**: Ensure to register as a public or private developer


to access the SP-API.

- **Versioning**: Always specify the correct version of the API you wish to
interact with. Monitor the release notes for updates or deprecations to stay
compliant.
- **Error Handling**: Implement robust error handling in your application to manage
authorization errors, API errors, and data format issues.

### Caveats

- APIs are region-specific; make sure to use the correct endpoint associated with
your Amazon seller account location.
- The APIs often require specific headers like `User-Agent` for compliance with
Amazon's requirements.
- Use SDKs available for different programming languages if applicable, to ease
integration and enhance functionality.

This summary is intended to provide developers with a foundational understanding


and references required to effectively use the Amazon SP-API for their selling
partner applications. For in-depth exploration, refer to the individual API
documentation links provided in the corresponding sections of the SP-API
documentation portal.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-


models#product-type-definitions-api:
### Summary of Amazon SP-API Models Documentation

#### Overview
The Selling Partner API (SP-API) allows developers to access and manipulate data
related to Amazon sellers and vendors through various APIs. This documentation
provides a directory of available APIs, their purposes, and usage for building
applications that interact with Amazon's selling platform.

#### Key APIs

1. **A+ Content Management API**


- **Description**: Used to create and edit A+ content.
- **Version**: 2020-11-01
- **Usage**: This API is available to both sellers and vendors.

2. **Amazon Warehousing and Distribution API**


- **Description**: Retrieve and track AWD shipments that are inbound to a
distribution center.
- **Current Version**: v2024-05-09

3. **Application Management API**


- **Description**: Rotate the client secret on registered applications.
- **Current Version**: v2023-11-30

4. **Catalog Items API**


- **Description**: Retrieve information about items in the Amazon catalog.
- **Version**: v2022-04-01

5. **Data Kiosk API**


- **Description**: Submit GraphQL queries for various schemas.
- **Version**: v2023-11-15

6. **Easy Ship API**


- **Description**: Manage Easy Ship orders.
- **Version**: v2022-03-23
7. **Feeds API**
- **Description**: Upload data to manage selling business.
- **Current Version**: v2021-06-30

8. **Finances API**
- **Description**: Retrieve financial events for orders.
- **Current Version**: v2024-06-19

9. **Listings Items API**


- **Description**: Access and manage product listings.
- **Current Version**: v2021-08-01

10. **Orders API**


- **Description**: Retrieve order information.
- **Current Version**: v0

11. **Product Type Definitions API**


- **Description**: Retrieve attributes and data requirements for product types.
- **Current Version**: v2020-09-01

#### Code Examples and API Snippets


The documentation does not provide specific code snippets within the provided
content, but below are typical usages for some APIs:

- **Example: Fetching Product Type Definitions**


```python
import requests

def get_product_type_definitions(api_endpoint, access_token):


headers = {
'Authorization': f'Bearer {access_token}',
'Content-Type': 'application/json',
}
response = requests.get(api_endpoint + '/productTypeDefinitions',
headers=headers)
return response.json()
```

#### Important Classes and Functions


- **API Calls**: Each API will likely have a standard set of methods:
- `GET`: To retrieve resources.
- `POST`: To create new resources.
- `PUT` / `PATCH`: To update existing resources.
- `DELETE`: To remove resources.

#### Key Concepts


- **Endpoints**: Each API has its specific endpoint URLs used for communication.
- **Authentication**: Requires Bearer tokens for secure access.
- **Marketplace IDs**: APIs may be marketplace-specific; appropriate IDs should be
used when sending requests.

#### Important Notes


- **Rate Limits**: Be cautious of the rate limits that may apply when using SP-
APIs, which can impact your ability to make requests in bulk.
- **Versioning**: Regularly check for updates to the API versions, as changes might
impact your application.
- **Error Handling**: Familiarize with possible errors documented in the API error
handling section to manage issues effectively during API calls.
### Conclusion
The Amazon Selling Partner API provides a rich set of tools for retrieving and
managing selling data across various categories. Ensure proper authorization,
respect rate limits, and keep abreast of version changes for optimal
implementation. For detailed code reference or if further examples are required,
additional resources or SDKs available on the Amazon Developer Hub are recommended.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-


models#replenishment-api:
## Amazon Selling Partner API (SP-API) Overview

The Selling Partner API (SP-API) provides a set of RESTful APIs to help developers
gather data from customers' selling partners and post data to customers' selling
accounts. This summary focuses on the Replenishment API along with other relevant
aspects of the SP-API.

### Important Concepts

1. **Replenishment API**: Used to retrieve replenishment metrics and offer


information.
- **Current Version**: v2022-11-07
- **Available for**: Sellers and Vendors
- **Use Case Guide**: [Replenishment API Use Case Guide](#)
- **Reference Documentation**: [Replenishment API Reference](#)

2. **API Authentication**: All requests require authorization using a Restricted


Data Token (RDT) for secure access to restricted resources.

3. **Marketplaces**: APIs are available for multiple markets with specific


Marketplace IDs.

### API Usage and Code Samples

- **Connecting to the SP-API**: Developers can implement the API using various
SDKs, specifically focusing on Python as requested:

```python
from selling_partner_api import Client

# Configuration for API access


client = Client(
refresh_token='YOUR_REFRESH_TOKEN',
aws_access_key_id='YOUR_AWS_ACCESS_KEY',
aws_secret_access_key='YOUR_AWS_SECRET_ACCESS_KEY',
role_arn='YOUR_ROLE_ARN'
)
```

- **Example Call to the Replenishment API**:

```python
# Retrieving replenishment metrics
response = client.replenishment.get_replenishment_metrics(
marketplace_ids=['ATVPDKIKX0DER'],
sku='YOUR_PRODUCT_SKU'
)
# Process response
metrics = response['metrics']
```

### Classes, Functions, and Methods

- **Client Class**: Main entry for interacting with the SP-API.


- **Constructor**: Initializes client with necessary credentials.
- **Methods**:
- `get_replenishment_metrics(marketplace_ids, sku)`: Retrieves replenishment
metrics for a specific SKU.

### Important Notes or Caveats

- **Rate Limits**: The SP-API has usage plans and rate limits that should be
considered while developing applications. Ensure that your implementation adheres
to these limits to avoid request errors.

- **Response Format**: The API responses are formatted in JSON. Be prepared to


handle common HTTP response codes and their meanings, for example:
- `200 OK`: Success
- `400 Bad Request`: Client error, possibly due to malformed request
- `401 Unauthorized`: Authentication issues

- **Versioning**: Regularly check for updates in the API versions and deprecations
to maintain compatibility with your applications.

### Additional Resources

- **Release Notes**: Stay updated with the latest changes via [SP-API Release
Notes](#).
- **GitHub Repository**: Contains announcements and update logs for previous
releases.
- **SP-API Documentation Hub**: Central source for all SP-API documentation and
code samples.

This succinctly summarizes the key aspects of using the Amazon Selling Partner API,
especially focusing on how developers can utilize the Replenishment API
effectively. For further detailed navigation of specific cases, refer to the
respective API documentation linked above.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-


models#reports-api:
### Amazon Selling Partner API (SP-API) Models - Reports API

#### Overview
The Reports API allows you to retrieve and manage reports for your selling business
on Amazon. You can request various types of reports, schedule reports, and retrieve
automatically generated reports.

#### Important Models and Endpoints

1. **Current API Version**


- **Reports API Version:** 2021-06-30
- **Reference and Model Links:** Available through the official documentation
(not specified in the summary).

2. **Key Report Types**


- **Analytics Reports**
- **Inventory Reports**
- **Order Reports**
- **Returns Reports**
- **Performance Reports**
- **Settlement Reports**
- **Fulfillment by Amazon (FBA) Reports**
- **Tax Reports**
- **Invoice Data Reports**
- **Browse Tree Reports**
- **Easy Ship Reports**
- **Amazon Business Reports**
- **B2B Product Opportunities Reports**
- **Regulatory Compliance Reports**

#### API Usage Examples

- **Request a Report**
```python
import requests
from requests.auth import HTTPBasicAuth

url = "https://sellingpartnerapi-na.amazon.com/reports/2021-06-30/reports"
headers = {
"Content-Type": "application/json",
"x-amz-access-token": "Your_Access_Token"
}

body = {
"reportType": "GET_FLAT_FILE_ORDER_REPORT_DATA",
"marketplaceIds": ["Your_Marketplace_ID"],
"reportOptions": "{}"
}

response = requests.post(url, headers=headers, json=body)


```

- **Schedule and Retrieve Reports**


```python
# After the report is requested, use the reportId to retrieve it.

report_id = "Your_Report_ID"
report_url =
f"https://sellingpartnerapi-na.amazon.com/reports/2021-06-30/reports/{report_id}"

response = requests.get(report_url, headers=headers)


```

- **Verify Report Processing**


```python
report_processing_url = f"https://sellingpartnerapi-na.amazon.com/reports/2021-
06-30/reports/{report_id}/status"

status_response = requests.get(report_processing_url, headers=headers)


```
#### Key Functions and Concepts

- **Report Types:** Understand the various available report types based on your
business needs.
- **Status Tracking:** Use the reporting endpoint to monitor the status of report
generation.
- **Handling Asynchronous Processing:** Many report requests are processed
asynchronously; ensure to poll for the status if needed.

#### Important Notes

- **Rate Limits:** Be aware of API usage limits as described in the [SP-API Rate
Limits](https://developer-docs.amazon.com/sp-api/docs/sp-api-rate-limits).
- **Data Privacy:** When utilizing the API, adhere to Amazon's data protection
policies and acceptable use policies.
- **Marketplaces:** Ensure to use the correct Marketplace IDs relevant to your
account during report requests.
- **Authorization:** You must handle the authorization of SP-API requests
carefully; obtain your credentials and manage access tokens securely.

#### Additional Considerations

- **Error Handling:** Implement error handling in your requests to account for


potential API errors, including authorization errors or invalid request formats.
- **API Reference:** Always refer to the latest [Reports API
Reference](https://developer-docs.amazon.com/sp-api/docs/reports-api) for updated
methods and parameters.
- **SDK Usage:** If you're working with Python, consider utilizing the provided SDK
for easier integration with the API.

This summary provides essential information and functionality of the Reports API
within Amazon's SP-API, particularly focused on extracting, posting, and managing
data related to your selling operations.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-models#sales-


api:
# Summary of Amazon Selling Partner API (SP-API) Models Documentation

## Introduction
The Amazon Selling Partner API (SP-API) allows developers to gather and post data
for selling partners. Specifically, it enables data retrieval from the selling
partner's account and updates to their selling account.

## Key Concepts
- **SP-API**: A comprehensive set of RESTful APIs that enable sellers to access and
manage their Amazon selling business.
- **APIs Availability**: APIs can be available for either seller accounts or vendor
accounts.
- **Endpoints**: Different APIs have distinct endpoints and may require
authorization for access.
- **Authorization**: Applications must be authorized to access SP-API data through
various workflows.

## Important APIs

1. **Sales API**
- **Purpose**: Retrieve information about sales performance.
- **Current Version**: v1
- **Usage Example**:
```python
# Example code to call Sales API (Hypothetical)
sales_data = call_sales_api(marketplace_id='example_marketplace', date='YYYY-
MM-DD')
```

2. **Sellers API**
- **Purpose**: Access essential information about the seller account, such as
available marketplaces and account status.
- **Current Version**: v1
- **Usage Example**:
```python
# Example code to call Sellers API (Hypothetical)
seller_info = call_sellers_api()
```

3. **Product Pricing API**


- **Purpose**: Retrieve pricing and offer information for products in the
catalog.
- **Current Version**: v2022-05-01
- **Usage Example**:
```python
# Example code to call Product Pricing API (Hypothetical)
pricing_data = call_product_pricing_api(product_id='example_product')
```

4. **Finances API**
- **Purpose**: Retrieve financial events for a specified order or date range.
- **Current Version**: v2024-06-19
- **Usage Example**:
```python
# Example code to call Finances API (Hypothetical)
financial_events = call_finances_api(order_id='example_order',
date_range='YYYY-MM-DD')
```

## Key Functions and Methods


- **call_sales_api(...)**: Fetches sales performance data.
- **call_sellers_api(...)**: Retrieves info about the seller's account details.
- **call_product_pricing_api(...)**: Obtains pricing information for specified
products.
- **call_finances_api(...)**: Accesses financial event data based on order or date.

## Important Notes and Caveats


- Always check for the correct API version being used, as there may be legacy
versions (like v0) that could be deprecated.
- Make sure to handle authorization properly; unauthorized requests will return
errors.
- Review the rate limits for each API to avoid throttling the requests.
- Documentation and updates can be found in the SP-API Release Notes and GitHub
announcements for recent API changes.

## Resources for Further Information


- **SP-API Release Notes**: For updates and changes to the APIs.
- **Selling Partner API GitHub**: For announcements regarding new features and
deprecations.
- **Key Security Controls**: To safeguard API applications.
- **Best Practices**: Review best practices for efficient API usage and error
handling.

This structured summary provides developers with a clear understanding of how to


utilize the Amazon SP-API effectively for their applications in Python, focusing on
the most important aspects and avoiding additional irrelevant content.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-


models#sellers-api:
### Summary: Amazon Selling Partner API (SP-API) Documentation

#### Overview
The Amazon Selling Partner API (SP-API) enables developers to integrate with
Amazon's selling services, providing access to various resources for managing
seller accounts and transactions. It allows applications to gather data from a
seller's account and post data back using APIs.

#### Key API Models

1. **A+ Content Management API**


- **Description**: Used to create and edit A+ content.
- **API Version**: 2020-11-01
- **Available for Sellers**: Yes
- **Available for Vendors**: Yes

2. **Catalog Items API**


- **Description**: Retrieves information about items in the Amazon catalog.
- **API Version**: 2022-04-01
- **Available for Sellers**: Yes
- **Available for Vendors**: Yes

3. **Finances API**
- **Description**: Retrieves financial events related to orders or date ranges.
- **API Versions**: v0 and 2024-06-19
- **Available for Sellers**: Yes
- **Available for Vendors**: No

4. **Orders API**
- **Description**: Retrieves detailed order information.
- **API Version**: v0
- **Available for Sellers**: Yes
- **Available for Vendors**: No

5. **Sellers API**
- **Description**: Retrieves essential account information, such as available
marketplaces.
- **API Version**: v1
- **Available for Sellers**: Yes
- **Available for Vendors**: No

#### Important Functions and Usage

- **Auth**: Applications must be authorized to access the SP-API using OAuth 2.0.
Use the `Authorization` endpoint to authorize your application.
- **Rate Limits**: API calls are subject to rate limitations based on the plan and
type of API. Monitoring usage and handling errors effectively is crucial for
reliability.

- **Error Handling**: Be prepared to handle various SP-API-specific errors,


including authorization errors and rate limit exceedances.

#### Code Example

Here's a Python example of using the SP-API to retrieve seller information:

```python
import requests

# Define the configuration


API_URL = "https://sellingpartnerapi-na.amazon.com/sellers/v1/sellers"
ACCESS_TOKEN = "YOUR_ACCESS_TOKEN" # Replace with your valid access token

# Set up headers
headers = {
"Authorization": f"Bearer {ACCESS_TOKEN}",
"Content-Type": "application/json",
"Host": "sellingpartnerapi-na.amazon.com"
}

# Make a GET request to retrieve seller information


response = requests.get(API_URL, headers=headers)

if response.status_code == 200:
seller_data = response.json()
print(seller_data)
else:
print(f"Error: {response.status_code}, {response.text}")
```

#### Important Notes

- **Python SDK**: There are SDKs available for various languages. It's recommended
to use the Python SDK to simplify integration tasks.

- **Data Models**: Familiarize yourself with the data models of the APIs you plan
to use, as each API has specific request and response models that need to be
adhered to.

- **Restricted Data Token (RDT)**: For accessing certain data types, you will need
to obtain a Restricted Data Token (RDT) via the Tokens API.

- **Sandbox Testing**: Use the SP-API sandbox for testing and developing
integrations before moving to production.

- **Consistency with Deprecations**: Keep an eye on the SP-API Release Notes for
updates and deprecations that may affect your application.

This summary condenses crucial information about the Amazon Selling Partner API
models, important methods for accessing data, code examples, and notes for proper
implementation. For detailed references, consult the [Amazon SP-API Documentation]
(https://developer-docs.amazon.com/sp-api/docs).
_____________________________
Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-
models#services-api:
### Summary of Amazon Selling Partner API (SP-API) Models

#### Overview
The Selling Partner API (SP-API) enables developers to build applications that
access various services and data related to selling on Amazon. It facilitates data
retrieval from a customer's selling partner account and allows for data submission
to the customer's selling account.

#### Important APIs

1. **A+ Content Management API**


- **Usage**: Create and edit A+ content.
- **Version**: 2020-11-01
- **Available For**: Sellers and Vendors

2. **Amazon Warehousing and Distribution API**


- **Usage**: Retrieve and track AWD shipments.
- **Version**: v2024-05-09
- **Available For**: Sellers only

3. **Catalog Items API**


- **Usage**: Retrieve information about items in the Amazon catalog.
- **Version**: v2022-04-01
- **Available For**: Sellers and Vendors

4. **Finances API**
- **Usage**: Get financial events for orders.
- **Version**: v2024-06-19
- **Available For**: Sellers only

5. **Feeds API**
- **Usage**: Upload data to Amazon to manage your selling business.
- **Version**: v2021-06-30
- **Available For**: Sellers and Vendors

6. **Orders API**
- **Usage**: Retrieve order information.
- **Version**: v0
- **Available For**: Sellers and Vendors

7. **Notifications API**
- **Usage**: Subscribe to notifications relevant to your selling business.
- **Version**: v1
- **Available For**: Sellers and Vendors

8. **Reports API**
- **Usage**: Retrieve and manage reports to help manage your selling business.
- **Version**: v2021-06-30
- **Available For**: Sellers and Vendors

### Key Concepts

- **Seller and Vendor Accounts**: SP-API functionalities may vary between seller
accounts (for individual sellers) and vendor accounts (for suppliers).
- **Versions and Release Notes**: Each API has a version that indicates the
capabilities and improvements. Check the release notes for updates and deprecated
features.

- **Required Permissions**: Specific APIs may require permissions to access


restricted data. Ensure to configure appropriate authorizations in your
application.

### Important Notes

- **API Rate Limits**: Be aware of the usage limits imposed by Amazon's SP-API.
Exceeding these limits can lead to throttling or temporary service unavailability.

- **Authentication**: Most API calls require authentication using OAuth tokens.


Ensure your application is set up to handle this properly.

- **Sandbox Testing**: Use the SP-API Sandbox for testing your application in a
safe environment. This allows you to simulate API requests without affecting live
data.

- **Data Formats**: Understand the required data formats and schemas, especially
for JSON inputs and outputs, to ensure successful API interactions.

### Code Examples


While specific API code snippets were not provided in the document, below is an
illustrative example of how you might use the Feeds API to submit data:

```python
import requests

# Example API endpoint for uploading feeds


url = "https://sellingpartnerapi-na.amazon.com/feeds/2020-09-04/feeds"

# Authentication token (you must replace this with a valid token)


headers = {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json",
"x-amz-access-token": "YOUR_ACCESS_TOKEN"
}

data = {
"data": {
# Your feed data
}
}

response = requests.post(url, headers=headers, json=data)

if response.status_code == 200:
print("Feed uploaded successfully!")
else:
print(f"Error uploading feed: {response.json()}")
```

### Conclusion
This concise summary presents essential details about the SP-API models relevant
for developers. Ensure to follow Amazon's best practices and guidelines when
working with the API for efficient and secure application performance. For further
details, consult specific API references and release notes.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-


models#shipment-invoicing-api:
## Summary of the Shipment Invoicing API from Amazon SP-API

### Overview
The Shipment Invoicing API allows you to retrieve shipment invoice information
specifically for Fulfillment by Amazon (FBA) orders within the Brazil marketplace.
This API is designed for use by sellers and enables you to gather details related
to shipment invoices generated for orders fulfilled by Amazon.

### Key Concepts


- **API Version**: v0
- **Endpoint**: Specific URLs for API access are generally required; refer to the
SP-API documentation for endpoint details.
- **Use Case**: This API is critical for managing invoice information associated
with shipments, aiding in compliance and financial tracking for FBA orders.

### Important Classes and Methods


Since the specific code examples and method signatures are not provided in the
content, developers are encouraged to refer to the official documentation for the
following general functionalities that an API such as this would include:
- **Get Shipment Invoice**: A method to request specific invoice data based on
shipment identifiers and order numbers. The expected response would include details
about the invoice, items shipped, quantities, and pricing.

### Code Snippets & API Usage


While detailed code snippets weren't included in the retrieved content, here’s an
example outline of how a typical API call may look when utilizing a library such as
`requests` in Python. Ensure that you replace placeholders with actual values.

```python
import requests

def get_shipment_invoice(shipment_id, access_token):


url =
f"https://sellingpartnerapi-na.amazon.com/shipment-invoicing/v0/invoices/
{shipment_id}"
headers = {
'Authorization': f'Bearer {access_token}',
'Content-Type': 'application/json',
'User-Agent': 'YourAppName/1.0',
}
response = requests.get(url, headers=headers)

if response.status_code == 200:
invoice_data = response.json()
return invoice_data # Process or return your desired data
else:
print(f"Error: {response.status_code} - {response.text}")

# Example usage
invoice = get_shipment_invoice('123456', 'your_access_token_here')
print(invoice)
```
### Notes and Caveats
- **Region-Specific**: This API is only available for the Brazil marketplace. Be
aware that functionality and access may differ by region.
- **Authorization**: Ensure proper authorization is granted to your application for
accessing shipment invoice data; use the correct OAuth tokens.
- **Error Handling**: Handle potential errors gracefully. Common issues include
authorization errors, HTTP request failures, and incorrect or missing shipment
identifiers.
- **Documentation Reference**: Always consult the [Amazon SP-API documentation]
(https://developer-docs.amazon.com/sp-api/docs/sp-api-models#shipment-invoicing-
api) for the most up-to-date information on endpoints, request parameters, and
response formats.

### Conclusion
The Shipment Invoicing API plays an essential role in managing FBA invoices for
sellers operating in the Brazil marketplace. By understanding the key concepts,
leveraging the provided code snippets, and adhering to best practices for error
handling and authorization, developers can effectively integrate this API into
their applications. Always refer to the official documentation for the most
accurate and detailed information.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-


models#shipping-api:
# Summary of Amazon Selling Partner API (SP-API) Models and Shipping API

## Overview
The Amazon Selling Partner API (SP-API) provides a suite of APIs that allow
developers to retrieve and post data to a customer's selling account. The Shipping
API, in particular, offers functionality to request shipping rates, create
shipments, cancel shipments, and track shipments.

## Key SP-API Models


The documentation includes various API models, each relevant to different
functionalities and aspects of the Amazon selling experience. Here are some
important highlights:

### Noteworthy API Models:


1. **Shipping API**
- **Current Version**: v2
- **Functions**:
- Request shipping rates
- Create shipments
- Cancel shipments
- Track shipments

2. **Feeds API**
- **Current Version**: v2021-06-30
- **Functions**:
- Upload data to manage the selling business.

3. **Finances API**
- **Current Version**: v2024-06-19
- **Functions**:
- Retrieve financial events for orders within specified date ranges.

4. **Orders API**
- **Current Version**: v0
- **Functions**:
- Retrieve order information.

5. **Listings Items API**


- **Current Version**: v2021-08-01
- **Functions**:
- Access and manage listings on Amazon.

6. **Notifications API**
- **Current Version**: v1
- **Functions**:
- Subscribe to notifications relevant to the selling business.

## Code Usage Example (Shipping API)


```python
# Sample code to create a shipment using the Shipping API.
import requests

# Define necessary headers with your authentication


headers = {
'Content-Type': 'application/json',
'x-amz-access-token': 'YOUR_ACCESS_TOKEN',
'x-amz-date': 'DATE_STRING',
}

# Define shipment details


payload = {
"shipmentRequestDetails": {
# shipment details come here
}
}

# Send request to create shipment


response = requests.post('https://sellingpartnerapi-na.amazon.com/shipping/v2/
shipments',
json=payload, headers=headers)

print(response.json())
```

### Important Methods


- **createShipment**: Used to create a new shipment.
- **cancelShipment**: Used to cancel existing shipments.
- **trackShipment**: Used to obtain tracking information about a shipment.

## Key Concepts
- **Authentication**: Requires specific headers and tokens to authorize requests.
Most operations need an **access token**.
- **Rate Limits**: The frequency of API calls is limited. Be sure to check the
documentation for specific limits.
- **Versioning**: Be aware of the API version you are using, as methods and
properties may change between versions.

## Important Notes
- Always ensure the access tokens are refreshed as necessary.
- Utilize the sandbox testing environment to verify your API requests before going
live.
- For detailed use cases and specific implementations, consult the related API
documentation on the Amazon developer portal and GitHub for the latest updates.

## Additional Resources
- **API Reference**: Comprehensive details can be found in the official SP-API
documentation.
- **Support and Community**: Engage with other developers through forums and the
Amazon Selling Partner Developer support for troubleshooting and best practices.

By following this structured approach, you can effectively utilize the Amazon
Selling Partner API to enhance selling operations on the Amazon platform.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-


models#solicitations-api:
### Summary of Amazon Selling Partner API (SP-API) Models - Solicitations API

#### Overview
The Solicitations API is part of the Selling Partner API (SP-API) that allows
developers to send non-critical solicitations to buyers. This functionality can be
utilized in various applications where communication with buyers is pertinent.

#### Important Endpoints and Usage

- **EndPoint:** `/solicitations/v1/solicitations`
- **Method:** POST
- **Description:** Sends a solicitation request to a buyer.

#### Request Body Fields


```json
{
"solicitationType": "string", // Specifies the type of solicitation (e.g.,
ASK_REVIEW)
"targetEmail": "string" // The email address of the buyer to whom the
solicitation is sent.
}
```

#### Key Classes and Methods

- **Solicitations API Class**


- **Methods:**
- `createSolicitation(buyerEmail, solicitationType)`: Sends a solicitation to
the specified buyer.

#### Important Concepts

- **Solicitation Types**: Different types of solicitations that can be sent include


requests for reviews or feedback on purchases.
- **Target Email**: This is a critical field; it must be accurate to ensure the
solicitation reaches the intended recipient.

#### Important Notes

1. **Rate Limits**: Be mindful of the rate limits imposed by the API on the number
of requests to avoid throttling.
2. **Non-critical Solicitation**: This API is designed for non-critical
solicitations, meaning that it should not be used for urgent communications.
3. **Error Handling**: Ensure proper error handling is implemented in your
application to manage scenarios where the request might fail (e.g., invalid email,
rate limit exceeded).

#### Example Code Snippet (Python)


Here's a sample snippet demonstrating how to make a request to send a solicitation:

```python
import requests

def send_solicitation(api_url, buyer_email, solicitation_type, access_token):


headers = {
'Authorization': f'Bearer {access_token}',
'Content-Type': 'application/json'
}
data = {
'solicitationType': solicitation_type,
'targetEmail': buyer_email
}

response = requests.post(f"{api_url}/solicitations/v1/solicitations",
headers=headers, json=data)

if response.status_code == 200:
print("Solicitation sent successfully.")
else:
print(f"Error: {response.json()}")

# Example usage
api_url = 'https://sellingpartnerapi-na.amazon.com'
access_token = 'YOUR_ACCESS_TOKEN'
send_solicitation(api_url, '[email protected]', 'ASK_REVIEW', access_token)
```

This code establishes a minimal way to construct and send a request using the
Solicitations API in a Python environment.

### Conclusion
The Solicitations API provides a vital way for sellers to interact with buyers
through non-critical communications. Developers should pay attention to proper
usage patterns, error handling, and compliance with Amazon's guidelines and
regulations.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-models#supply-


sources-api:
### Amazon Selling Partner API (SP-API) - Supply Sources API Overview

The Supply Sources API allows developers to manage the configurations and
capabilities related to seller supply sources. Below is a structured summary
containing key information, including code examples, important classes, and
essential concepts.

#### API Reference


- **API Version**: v2020-07-01
- **Available for**: Seller accounts only
- **Reference**: [Supply Sources API Documentation](https://developer-
docs.amazon.com/sp-api/docs/sp-api-models#supply-sources-api)

#### Important Classes and Methods


1. **API Overview**
- The Supply Sources API helps manage configurations and functionalities of
seller supply sources.

2. **Key Methods** (not detailed in provided content; likely to include methods for
retrieving, updating, or deleting supply sources):
- `getSupplySources`
- `createSupplySource`
- `updateSupplySource`

#### Code Examples and API Snippets


- Here is a generic code structure that could be used to interact with the Supply
Sources API in Python.

```python
import requests

def get_supply_sources(api_endpoint, headers):


"""Retrieve the supply sources information."""
response = requests.get(f"{api_endpoint}/supplySources", headers=headers)
return response.json()

def create_supply_source(api_endpoint, headers, data):


"""Create a new supply source."""
response = requests.post(f"{api_endpoint}/supplySources", headers=headers,
json=data)
return response.json()

# Example usage
api_endpoint = "https://sellingpartnerapi-na.amazon.com"
headers = {
"Authorization": "Bearer <your_access_token>",
"x-amz-date": "<current_timestamp>",
"Content-Type": "application/json"
}

# Get supply sources


supply_sources = get_supply_sources(api_endpoint, headers)
print(supply_sources)

# Create a new supply source


new_supply_source_data = {
"name": "New Supplier",
"type": "supplier_type",
"contact": {
"name": "Contact Name",
"email": "[email protected]"
}
}
created_source = create_supply_source(api_endpoint, headers,
new_supply_source_data)
print(created_source)
```

#### Key Concepts


- **Supply Source**: A configuration that represents where a seller gets their
products from. It may contain supplier name, type, and contact details.
- **API Authentication**: Ensure that every API call is authenticated using OAuth
tokens. Use bearer tokens in the Authorization header.
- **Rate Limits**: Be aware of any possible rate limits placed on API calls to
avoid throttling.

#### Important Notes


- **Versioning**: Always check for the latest version of the API since updates may
include new features or deprecations.
- **Error Handling**: Implement error handling for API requests to manage scenarios
where supply sources cannot be retrieved or created due to issues such as
unauthorized access (HTTP Status 401) or invalid data (HTTP Status 400).
- **Sandbox Environment**: Test your integration in a sandbox environment before
going live to ensure everything works as intended.

#### Caveats
- The specific method names and parameters are assumed based on standard REST API
practices, and the exact structure should be verified in the official
documentation.
- Access to certain API functionalities may vary based on account type (Seller vs.
Vendor).

### Conclusion
The Supply Sources API empowers sellers to effectively manage sources of their
products on Amazon. Developers should ensure they understand authentication, error
handling, and compliance with rate limits while integrating this API into their
applications. For detailed implementation specifics, always refer back to the
official SP-API documentation.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-models#tokens-


api:
### Amazon Selling Partner API (SP-API) Summary

The Amazon Selling Partner API (SP-API) provides an extensive set of APIs that
allow developers to gather data from a customer's selling partner account, as well
as post data back to the selling account. Below is a summary of important aspects
of the SP-API, relevant for developers working with these APIs using Python.

---

### Key Components

#### 1. **APIs Overview**


SP-API includes a variety of APIs segmented into Sellers and Vendors. Below are
essential APIs that are commonly used:

- **Tokens API**: Used to obtain a Restricted Data Token (RDT) for accessing
restricted resources.
- **Version**: v2021-03-01
- **Usage**: `POST /tokens`
- **Contract Fields**:
- `grant_type`: The type of grant (e.g., "client_credentials").
- `client_id`: Your application’s client ID.
- `client_secret`: Your application's client secret.

- **Feeds API**: Uploads data to manage selling business entities.


- **Version**: v2021-06-30
- **Usage**: `POST /feeds`
- **Contract Fields**:
- `feedType`: Type of data you are uploading.
- `inputFeed`: The actual data you want to send to Amazon.

- **Orders API**: Retrieves order-related information from seller accounts.


- **Version**: v0
- **Usage**: `GET /orders`
- **Contract Fields**:
- `MarketplaceIds`: List of marketplace IDs.
- `CreatedAfter`: Filter orders created after this date.

---

### Important Concepts

- **Restricted Data Token (RDT)**: A token used for accessing sensitive data
securely. All requests that access restricted data require this token.

- **Rate Limits**: API calls are subject to rate limits. Ensure to implement error
handling for HTTP 429 responses indicating rate limit issues.

- **Authorization**: Proper authorization workflows must be set up. This typically


involves using OAuth 2.0 to authorize applications.

- **Versioning**: Each API has its versioning scheme. Developers must reference the
correct version of the API documentation for accurate usage.

---

### Code Examples

```python
import requests

# Example to get a Restricted Data Token using Tokens API


def get_rdt(client_id, client_secret):
url = "https://sellingpartnerapi-na.amazon.com/tokens"
payload = {
"grant_type": "client_credentials",
"client_id": client_id,
"client_secret": client_secret
}
response = requests.post(url, json=payload)
return response.json()

# Uploading data using Feeds API


def upload_feed(token, feed_type, input_feed):
url = "https://sellingpartnerapi-na.amazon.com/feeds"
headers = {
"Authorization": f"Bearer {token}",
"Content-Type": "application/json"
}
payload = {
"feedType": feed_type,
"inputFeed": input_feed
}
response = requests.post(url, headers=headers, json=payload)
return response.json()

# Retrieving orders using Orders API


def get_orders(token, marketplace_ids):
url = "https://sellingpartnerapi-na.amazon.com/orders"
headers = {
"Authorization": f"Bearer {token}",
"Content-Type": "application/json"
}
params = {
"MarketplaceIds": marketplace_ids,
"CreatedAfter": "2023-01-01T00:00:00Z"
}
response = requests.get(url, headers=headers, params=params)
return response.json()
```

---

### Important Notes


- Ensure that the application is registered through the SP-API console to access
these APIs.
- Regularly check the **SP-API Release Notes** for updates or changes that may
affect existing implementations.
- Implement robust error handling to deal with common issues such as authorization
errors or malformed requests.
- Consult the **SP-API Documentation** for detailed API specifications including
attributes, data types, and potential responses.

---

This summary encapsulates the necessary information for developers wanting to


integrate with the Amazon Selling Partner APIs using Python. Make sure to refer to
the latest version of the SP-API documentation for comprehensive details.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-


models#uploads-api:
# Amazon Selling Partner API (SP-API) Models Overview

## Overview of SP-API Models


The Selling Partner API (SP-API) provides various models that allow developers to
interact with Amazon's selling partner data. It includes endpoints for both seller
and vendor accounts, and supports operations such as retrieving, updating, and
managing various selling activities.

## Key API Models

### 1. Uploads API


- **Purpose**: Used to upload files that can be accessed later with other SP-API
operations.
- **Version**: 2020-11-01
- **Available for**: Sellers and Vendors
- **Usage**: To upload bulk data, such as product listings, inventory updates, etc.

### Code Example


```python
# Sample code snippet for uploading a file using the Uploads API
import requests

def upload_file_to_amazon(api_url, headers, file_path):


with open(file_path, 'rb') as file_data:
response = requests.post(api_url, headers=headers, data=file_data)
return response.json()

# Note: Replace `api_url` with the Uploads API endpoint and include necessary
headers.
```

### 2. Feeds API


- **Purpose**: Used for uploading data to manage a selling business, such as
product and inventory data.
- **Version**: 2021-06-30
- **Available for**: Sellers and Vendors

### Key Concepts


- **Feeds**: Represent the data that is uploaded through the API; various types
such as inventory feeds, pricing feeds, etc.
- **Response Format**: Standard JSON format; check API documentation for specifics
on each feed type.

### Code Example


```python
# Example usage of Feeds API to initiate a feed submission
def submit_feed(api_url, headers, feed_content):
response = requests.post(api_url, headers=headers, json=feed_content)
return response.json()

# Important: Specify the correct feed type and content according to the API
reference.
```

### 3. Finances API


- **Purpose**: Provides access to financial events related to orders.
- **Version**: 2024-06-19 for current, v0 for previous.
- **Available for**: Sellers only.

### Important Classes/Methods


- `get_financial_events(order_id)`: Returns financial data for a specific order.

### Code Example


```python
def get_financial_events(api_url, headers, order_id):
response = requests.get(f"{api_url}/finances/{order_id}", headers=headers)
return response.json()
```

### Authorization
- **General Authorization**: Use OAuth 2.0 for authenticating API calls.
- **Token Types**: Standard and Restricted Data Tokens (RDT) for accessing specific
resources.

## Usage Notes
- Ensure that the correct version of the API is being utilized.
- Check rate limits for API calls to avoid throttling.
- Be aware of data privacy regulations and compliance when handling customer data.
## Caveats
- Some APIs may have specific restrictions based on the seller account's
capabilities or the country of operation.
- Always refer to the SP-API Release Notes for updates or changes in functionality.

## Documentation Reference
For detailed API endpoints, parameters, and response formats, refer to the [Amazon
SP-API documentation](https://developer-docs.amazon.com/sp-api/docs/sp-api-
models#uploads-api).

By familiarizing oneself with these elements, developers can effectively integrate


with the Amazon Selling Partner API and utilize its capabilities to manage selling
activities efficiently.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-


models#application-management-api:
# Amazon Selling Partner API (SP-API) Models Summary

## Overview
The Amazon SP-API provides a range of APIs that enable developers to gather data
from their selling partner accounts and post data to their selling accounts. This
documentation specifically details various APIs available for both seller and
vendor accounts, emphasizing the **Application Management API**, which is used to
manage application credentials and rotations.

## Key APIs

### 1. Application Management API


- **Usage**: Rotate the client secret of registered applications.
- **Current Version**: v2023-11-30
- **Available For**: Sellers and Vendors

#### Example Usage


To rotate a client secret:
```python
# Pseudo-code example
import requests

url = "https://sellingpartnerapi-na.amazon.com/application-management/v2023-11-30/
applications/YOUR_APPLICATION_ID/clientSecret"
headers = {"Authorization": "Bearer YOUR_ACCESS_TOKEN"}

response = requests.put(url, headers=headers)

if response.status_code == 200:
print("Client secret rotated successfully")
else:
print("Error:", response.content)
```

### 2. Catalog Items API


- **Usage**: Retrieve information about items in the Amazon catalog.
- **Current Version**: v2022-04-01
- **Available For**: Sellers and Vendors
#### Example Usage
To retrieve catalog item details:
```python
# Pseudo-code example
url = "https://sellingpartnerapi-na.amazon.com/catalog/v2022-04-01/items/
YOUR_ITEM_ID"
response = requests.get(url, headers={"Authorization": "Bearer YOUR_ACCESS_TOKEN"})
item_data = response.json() # Process the JSON response accordingly
```

### 3. Feeds API


- **Usage**: Upload data to manage your selling business.
- **Current Version**: v2021-06-30
- **Available For**: Sellers and Vendors

#### Example Usage


To upload a product feed:
```python
# Example code snippet
url = "https://sellingpartnerapi-na.amazon.com/feeds/v2021-06-30/feeds"
data = {
"marketplaceIds": ["MARKETPLACE_ID"],
"feedType": "PRODUCT_DATA",
"inputStream": open("your_feed_file.csv", "rb"),
}

response = requests.post(url, headers={"Authorization": "Bearer


YOUR_ACCESS_TOKEN"}, json=data)
```

### Important Considerations


- **Rate Limits**: Be aware of API rate limits specified for each API.
- **Authorization**: All API requests require authorization. You will need to
obtain and use an OAuth token.
- **Notifications**: Ensure to subscribe to notifications relevant to your business
through the Notifications API for real-time updates.

### Key Concepts


- **API Versions**: Each API has a versioning system, which is important for
maintaining compatibility.
- **Amazon SQS Integration**: Certain APIs may allow integration with Amazon SQS
for notifications.
- **Restricted Data Tokens**: Some operations may require a Restricted Data Token
(RDT) for accessing sensitive information.

### Developer References


- **API Reference:** [SP-API
Reference](https://developer-docs.amazon.com/sp-api/docs/api-reference)
- **Best Practices**: Consult best practices in handling rate limits and
constructing robust applications, accessible in the developer hub.

## Conclusion
The SP-API offers extensive functionalities for managing operations related to
selling on Amazon. Proper understanding and implementation of these APIs will
enhance automation and streamline inventory management, financial tracking, and
notifications for sellers and vendors. Always refer to the latest documentation for
updates on methods and usage contracts.
_____________________________
Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-models#amazon-
warehousing-and-distribution-api:
# Summary of Amazon Selling Partner APIs Documentation

## Overview
The Amazon Selling Partner APIs (SP-API) allow developers to gather data from and
post data to Amazon selling accounts. This summary focuses on the APIs relevant to
the user's intent to retrieve and upload data using Python.

### Key APIs

1. **Amazon Warehousing and Distribution API**


- **Version**: v2024-05-09
- **Purpose**: Retrieve and track AWD shipments containing items that are
inbound to a distribution center.
- **Usage**:
- It is utilized by sellers; vendors currently do not have access.
- **Example Code**: Not provided in the content, but relevant request formats
should adhere to standard REST API practices.

2. **App Integrations API**


- **Version**: v2024-04-01
- **Purpose**: Send notifications to selling partners and display notifications
in Seller Central.
- **Usage**: Primarily for sellers.

3. **Application Management API**


- **Version**: v2023-11-30
- **Purpose**: Rotate the client secret on registered applications for security
purposes.
- **Usage**: Available to both sellers and vendors.

4. **Catalog Items API**


- **Version**: v2022-04-01
- **Purpose**: Retrieve information about items in the Amazon catalog.
- **Usage**: This API is essential for managing product listings.

5. **Finances API**
- **Version**: v2024-06-19
- **Purpose**: Retrieve financial events for orders.
- **Usage**: Choose this API to track financial aspects without waiting for
statement periods.

### Key Concepts

- **RESTful API Design**: The APIs follow REST principles, meaning requests should
include appropriate HTTP methods (GET, POST, PUT, DELETE) and be structured
according to Amazon’s endpoint documentation.

- **Data Token**: To access sensitive data, a Restricted Data Token (RDT) may be
required. This token must be obtained prior to performing certain API operations.

### Important Notes

- **Sandbox Testing**: Developers are encouraged to use the Selling Partner API
Sandbox for testing API requests before deploying to live environments.
- **Rate Limits**: Each API may have specific rate limits that developers must
adhere to in order to prevent throttling of requests. Consult the API documentation
for details specific to each API.

- **Error Handling**: Implement robust error handling to manage API errors


effectively. Common error responses include authentication issues, data validation
errors, and rate limit exceedances.

- **Versioning**: APIs evolve over time. Pay close attention to version updates and
deprecation schedules to maintain compatibility.

### Example API Snippet (Hypothetical)

```python
import requests

# Example function to access the Amazon Warehousing API


def retrieve_awd_shipments(access_token):
url = "https://sellingpartnerapi-na.amazon.com/awd/v2024-05-09/shipments"
headers = {
"Authorization": f"Bearer {access_token}",
"Content-Type": "application/json",
"User-Agent": "Your App Name/1.0"
}

response = requests.get(url, headers=headers)


if response.status_code == 200:
return response.json() # Return the JSON response if successful
else:
print(f"Error: {response.status_code} - {response.text}")
```

This snippet demonstrates how to authenticate and make a request using the Amazon
Warehousing and Distribution API to retrieve shipment data.

## Conclusion
The Amazon Selling Partner API provides a robust framework for managing seller
accounts on Amazon. Understanding the key APIs, usage, and concepts will enable
developers to effectively integrate and utilize these APIs for various selling and
operational tasks. Always refer to the latest API documentation for updates and
additional details.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-models#vendor-


direct-fulfillment-inventory-api:
# Amazon Selling Partner API (SP-API) Summary

## Overview
The Selling Partner API (SP-API) facilitates data gathering and posting to a
customer's selling account on Amazon. This documentation covers the key APIs
related to Vendor Direct Fulfillment, focusing on necessary code samples, usage,
and critical concepts for effective implementation.

## Key APIs and Their Usage

### Vendor Direct Fulfillment Inventory API


- **Description**: Manage your direct fulfillment operations.
- **Current Version**: v1
- **Sellers Access**: No
- **Vendors Access**: Yes
- **API Snippet**:
```python
# Sample code to get inventory data
response = vendor_direct_fulfillment_inventory_api.get_inventory(...)
```

### Vendor Direct Fulfillment Orders API


- **Description**: Access direct fulfillment vendor order data.
- **Current Version**: v2021-12-28
- **Sellers Access**: No
- **Vendors Access**: Yes
- **API Snippet**:
```python
# Sample code to fetch order data
order_data = vendor_direct_fulfillment_orders_api.get_orders(...)
```

### Vendor Direct Fulfillment Payments API


- **Description**: Access direct fulfillment vendor invoice data.
- **Current Version**: v1
- **Sellers Access**: No
- **Vendors Access**: Yes
- **API Snippet**:
```python
# Sample code to fetch payment information
payments_info = vendor_direct_fulfillment_payments_api.get_payments(...)
```

### Vendor Invoices API


- **Description**: Access vendor payment data.
- **Current Version**: v1
- **Sellers Access**: No
- **Vendors Access**: Yes
- **API Snippet**:
```python
# Sample code to retrieve invoice data
invoices = vendor_invoices_api.get_invoices(...)
```

### Important Classes and Methods


- **Vendor Direct Fulfillment APIs**:
- Each API class corresponds to one of the vendor operations listed above,
allowing developers to interact with Amazon's databases directly.
- ***get_inventory()***, ***get_orders()***, ***get_payments()***, and
***get_invoices()*** are commonly used methods within these classes to retrieve
relevant data.

## Key Concepts

- **APIs Availability**: Understand that certain APIs are only available for vendor
accounts, hence sellers will not gain access.
- **Usage Context**: The APIs are designed for retrieve-and-post operations
specific to vendor accounts in a direct fulfillment scenario.
- **Rate Limits**: Be aware of rate limits for API calls to prevent application
throttling. Specific limits should be referenced in the API Reference
documentation.
## Important Notes

- **Sandbox Environment**: Before executing operations in a live environment,


utilize the sandbox for testing. This is provided to avoid any disruptions in
production.
- **Authorization**: Proper authorization and access management are crucial.
Utilize the OAuth2 token system as described in the authorization section.
- **Versioning**: Always confirm the API version before deploying changes, as APIs
may be subject to updates that could affect functionality or available features.
- **Error Handling**: Implement error checking and handling strategies to address
potential API call failures, such as checking for request limits or incorrect
parameters.

### Conclusion
This summary provides an essential overview of utilizing the Amazon Selling Partner
API for efficient inventory and order management. Follow the code snippets provided
for practical implementation, and always refer to the official documentation for
detailed information on methods, parameters, and best practices.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-


models#messaging-api:
### Summary of Amazon Selling Partner API (SP-API) Models and Usage

#### Overview of SP-API


The Selling Partner API (SP-API) provides programmatic access to Amazon's various
selling services. It helps developers to gather data from their Selling Partner
accounts and allows posting data back to those accounts.

### Key Concepts

- **APIs:** SP-API includes various APIs, each for different functionalities, such
as creating and managing listings, shipping, notifications, reporting, and more.
- **Models:** Each API has a model that defines requests and responses, including
required and optional fields.
- **Authentication:** All applications must be authorized to access the API,
typically done using OAuth 2.0 and a Restricted Data Token for sensitive
information.

### Important APIs and Their Usage

1. **Messaging API**
- **Description:** Used to send messages to buyers.
- **Current Version:** v1
- **Available for:** Sellers and Vendors
- **Usage Example:**
```python
response = messaging_api.send_message({
"buyer_id": "123456789",
"message_body": "Your order has been shipped!"
})
```

2. **Orders API**
- **Description:** Retrieves order information.
- **Current Version:** v0
- **Available for:** Sellers and Vendors
- **Usage Example:**
```python
response = orders_api.get_order("order_id_here")
```

3. **Listings Items API**


- **Description:** Accesses seller’s listings on Amazon.
- **Current Version:** v2021-08-01
- **Available for:** Sellers and Vendors
- **Usage Example:**
```python
response = listings_api.get_listings_items(seller_id="seller_id_here")
```

4. **Finances API**
- **Description:** Retrieves financial events for orders.
- **Current Version:** v2024-06-19 for financial events
- **Available for:** Sellers only
- **Usage Example:**
```python
response = finances_api.get_financial_events(order_id="order_id_here")
```

5. **Reports API**
- **Description:** Manages and retrieves reports relevant to selling.
- **Current Version:** v2021-06-30
- **Available for:** Sellers and Vendors
- **Usage Example:**
```python
response = reports_api.create_report({
"report_type": "GET_FBA_FULFILLMENT_ORDER_REPORT",
"marketplace_ids": ["ATVPDKIKX0DER"]
})
```

### Important Classes and Methods


- **Authentication Class:** Handles OAuth2.0 token generation.
- **API Client Initializer:** Must be configured with the correct credentials and
endpoint region.
```python
client = SPAPIClient(aws_access_key, aws_secret_key, refresh_token)
```

### Key Notes and Caveats


- **API Versions:** Always check for the current version of the API you intend to
use, as older versions may be deprecated.
- **Rate Limits:** Be aware of the API usage limits which are set to prevent abuse.
Exceeding these limits can lead to throttling.
- **Error Handling:** Implement robust error handling by capturing and interpreting
error responses from the API.
- **Access Permissions:** Ensure that the application has the right permissions to
access specific resources or APIs.
- **Data Handling:** If working with sensitive data, it’s important to securely
manage tokens and sensitive credentials.

### Additional Resources


- **Release Notes:** Keep updated with the latest changes and updates to APIs via
[SP-API Release Notes](https://developer-docs.amazon.com/sp-api/docs/sp-api-
release-notes).
- **Testing and Sandbox:** Utilize the SP-API Sandbox for non-production testing.
- **Code Samples:** For practical examples, check the Amazon SP-API GitHub
repository.

By understanding and utilizing the above outlined APIs, methods, and best
practices, developers will be equipped to efficiently work with the Amazon Selling
Partner API.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-models#vendor-


direct-fulfillment-orders-api:
## Summary of Amazon Selling Partner API (SP-API): Vendor Direct Fulfillment Orders
API

The Vendor Direct Fulfillment Orders API is part of Amazon's Selling Partner API
(SP-API) and allows partners to interact with their fulfillment orders. This API
provides functions for accessing and managing vendor order data and is essential
for integrating fulfillment capabilities into applications.

### Key Concepts

1. **Vendor Direct Fulfillment**: This refers to the process where vendors fulfill
orders directly to customers without going through Amazon fulfillment centers.

2. **API Endpoints**: The API offers several endpoints that allow vendors to manage
their order fulfillment workflows.

3. **RESTful API**: The SP-API follows REST architecture, meaning developers can
use standard HTTP methods (GET, POST, etc.) to interact with the API.

### Important Classes and Functions

- **Vendor Direct Fulfillment Orders API**


- **Endpoint**: `/vendor/directFulfillment/orders`
- **Usage**: This API allows for the management of fulfillment orders placed by
vendors.

#### Example API Snippet for Creating an Order

```python
import requests

url = "https://sellingpartnerapi-na.amazon.com/vendor/directFulfillment/orders" #
Replace with the appropriate region-specific endpoint
headers = {
"Content-Type": "application/json",
"x-amz-access-token": "YOUR_ACCESS_TOKEN", # Use the correct token
}

data = {
"orderId": "123456",
"orderLines": [
{
"productId": "PRODUCT_ID",
"quantityOrdered": 1,
"shippingAddress": {
// Shipping details here
}
}
],
}

response = requests.post(url, json=data, headers=headers)


print(response.json())
```

### Key Fields

- **orderId**: Unique identifier for the order.


- **orderLines**: Array of line items in the order. Each line must include:
- **productId**: Identifier for the specific product being ordered.
- **quantityOrdered**: The number of units being ordered.
- **shippingAddress**: Address object containing shipping details.

### Important Notes and Caveats

- **Authorization**: Ensure that your application has the appropriate permissions


and an access token to make requests to the API.
- **Rate Limits**: The API has usage plans and rate limits which need to be adhered
to in production environments.
- **Error Handling**: Implement proper error handling to deal with potential errors
such as authorization failures and invalid requests.

### Additional Considerations

- **Sandbox Testing**: Leverage the Vendor Direct Fulfillment Sandbox API for
testing prior to deploying against the production API.
- **Documentation Reference**: For the most current and detailed information,
always refer back to the official API documentation on Amazon's developer hub.

This summary encapsulates the fundamental aspects of using the Vendor Direct
Fulfillment Orders API, enabling developers to effectively integrate order
management features into their applications. For further exploration of specific
usage scenarios or additional APIs, consult the SP-API documentation directly.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-models#vendor-


direct-fulfillment-payments-api:
### Summary of Amazon Selling Partner API (SP-API) Models for Vendor Direct
Fulfillment Payments API

#### Overview
The Amazon Selling Partner API (SP-API) allows developers to access various
functionalities regarding vendor fulfillment operations. The Vendor Direct
Fulfillment Payments API specifically provides access to direct fulfillment vendor
invoice data.

#### Important APIs Related to Vendor Direct Fulfillment:


- **Vendor Direct Fulfillment Payments API**
- **Version**: v1
- **Purpose**: Access vendor invoice data related to direct fulfillment
operations.
- **Vendor Direct Fulfillment Orders API**
- **Version**: v2021-12-28
- **Purpose**: Access vendor order data.

- **Vendor Direct Fulfillment Shipping API**


- **Version**: v2021-12-28
- **Purpose**: Access vendor shipping data related to direct fulfillment.

- **Vendor Direct Fulfillment Inventory API**


- **Version**: v1
- **Purpose**: Manage direct fulfillment inventory operations.

- **Vendor Invoices API**


- **Version**: v1
- **Purpose**: Retrieve vendor payment data.

#### Key Concepts

1. **API Models and Endpoints**


- Each API model includes versions and references (model schemas). Developers
need to select relevant endpoints for their applications based on business needs.

2. **Authorization**
- Implement the necessary authorization mechanisms to access the APIs.
Applications may require Restricted Data Tokens (RDT) for certain APIs.

3. **Data Handling**
- Successful API calls will require handling various data structures including
JSON objects for requests and responses.

4. **Sandbox Environment**
- Utilize the Vendor Direct Fulfillment Sandbox Test Data API to conduct tests
without impacting live data.

5. **Rate Limits and Best Practices**


- Be mindful of usage plans and rate limits to avoid throttling and ensure
integration stability.

#### Example Code Snippets


##### Python SDK Usage Example for Vendor Direct Fulfillment Payments API
```python
import requests

# Define the API endpoint


url = "https://sellingpartnerapi-na.amazon.com/vendor/directFulfillment/payments"

# Example function to get payment data


def get_payments(vendor_id):
headers = {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
}
response = requests.get(f"{url}/{vendor_id}", headers=headers)
return response.json()

# Usage
payments_data = get_payments("vendor-id-12345")
print(payments_data)
```
#### Important Notes
- **Authorization Token**: Ensure that you set up and refresh the authorization
tokens properly, as many API endpoints require valid tokens for access.
- **Vendor Account Requirements**: The SP-API is designed for both seller and
vendor accounts, with the vendor APIs providing functionalities tailored to
businesses that operate under Amazon's vendor framework.
- **Documentation and Resources**: Consult the detailed documentation and release
notes for updates, changes, and best practices relevant to each API model. The SP-
API Release Notes page offers insights on prior updates, deprecations, and
optimizations.

#### Conclusion
This summary provides a concise overview of the SP-API models with a focus on the
Vendor Direct Fulfillment Payments API. Developers should leverage the example code
and key concepts to efficiently integrate and interact with Amazon's selling
partner services tailored to vendor operations. Always stay updated with the latest
changes and best practices by referring to the official documentation.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-models#vendor-


direct-fulfillment-sandbox-test-data-api:
## Summary of Amazon SP-API Documentation

### Overview of Selling Partner API (SP-API)


The Selling Partner API (SP-API) allows developers to programmatically interact
with the Amazon Selling Partner platform. It provides endpoints to gather and
manage various data related to selling operations on Amazon, focusing on both
seller and vendor accounts.

### Key Concepts


- **Models**: Different endpoints are categorized based on their functionality,
such as data management (Feeds API), inventory management (FBA Inventory API), and
order processing (Orders API).
- **Authorization**: Applications must undergo an authorization process to access
SP-API resources, ensuring secure access.
- **Endpoints**: Each API is accessible through designated endpoints, and
developers should follow the API reference for correct usage.

### Important APIs and Usage

1. **Vendor Direct Fulfillment Sandbox Test Data API**


- **Purpose**: Access test data for vendor operations in a sandbox environment.
- **Version**: v2021-10-28
- **Reference**: [Vendor Direct Fulfillment Sandbox Test Data API Documentation]
(https://developer-docs.amazon.com/sp-api/docs/sp-api-models#vendor-direct-
fulfillment-sandbox-test-data-api)

2. **Feeds API**
- **Purpose**: Upload feeds to manage data for product listings and related
operations.
- **API Version**: v2021-06-30
- **Example Snippet**:
```python
import requests

url = "https://sellingpartnerapi-na.amazon.com/feeds/2021-06-30/documents"
headers = {
"Authorization": "Bearer <Your_Access_Token>",
"Content-Type": "application/json"
}
data = {
# Include necessary feed data fields here.
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
```

3. **Orders API**
- **Purpose**: Retrieve detailed information about orders.
- **API Version**: v0
- **Example Snippet**:
```python
url = "https://sellingpartnerapi-na.amazon.com/orders/v0/orders/<Order_ID>"
response = requests.get(url, headers=headers)
print(response.json())
```

4. **Catalog Items API**


- **Purpose**: Access details about items in the Amazon catalog.
- **API Version**: v2022-04-01
- **Example Snippet**:
```python
url = "https://sellingpartnerapi-na.amazon.com/catalog/v2022-04-01/items/
<Item_ID>"
response = requests.get(url, headers=headers)
print(response.json())
```

### Important Notes and Caveats


- **Python SDK**: The SP-API provides a Python SDK to simplify integration.
Developers are encouraged to utilize the SDK for authenticating and making API
calls.
- **Rate Limits**: APIs have defined rate limits. Use the `Usage Plans and Rate
Limits` documentation to understand how to manage your API consumption without
hitting rate limits.
- **Testing in Sandbox**: Always test API integrations in a sandbox environment
before transitioning to production to prevent unintended consequences impacting
live data.
- **Version Management**: API versions may change, and developers must stay updated
with the latest release notes and migration guides.

### Additional Resources


- **API Reference**: A detailed API reference is available, providing endpoint
paths, methods, request and response formats for each API.
- **Error Handling**: Refer to the SP-API Errors FAQ for guidance on handling
errors effectively, which includes common error codes and troubleshooting tips.

This summary provides a condensed view of SP-API functionality and should assist
developers in utilizing the API effectively while adhering to best practices.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-models#vendor-


direct-fulfillment-shipping-api:
# Amazon Selling Partner API (SP-API) Documentation Summary

## Overview
The Amazon Selling Partner API (SP-API) provides various APIs to help sellers and
vendors manage their accounts, retrieve data, and execute actions related to their
selling activities on Amazon. This documentation outlines useful APIs, their
versions, and basic usage.

### Key API Categories


1. **Vendor Direct Fulfillment APIs**
- **Vendor Direct Fulfillment Shipping API**
- **Description**: Access shipping data related to vendor direct fulfillment.
- **Current Version**: 2021-12-28
- **Use Cases**: Fetch and manage shipping details for vendor orders.
- **Vendor Direct Fulfillment Orders API**
- **Description**: Access direct fulfillment vendor order data.
- **Current Version**: 2021-12-28
- **Use Cases**: Retrieve order status and details for vendor operations.

2. **Reporting APIs**
- **Reports API**
- **Description**: Retrieve and manage reports for business insights.
- **Current Version**: 2021-06-30
- **Usage**: Important for assessing sales performance, inventory status, and
financial events.

3. **Management APIs**
- **Application Management API**
- **Description**: Manage application registrations and keys.
- **Current Version**: 2023-11-30
- **Usage**: Essential for maintaining application security.

4. **Catalog and Inventory Management APIs**


- **Catalog Items API**
- **Description**: Retrieve information about items in the Amazon catalog.
- **Current Version**: 2022-04-01
- **FBA Inventory API**
- **Description**: Retrieve information about inventory across fulfillment
centers.
- **Current Version**: 2024-05-09

### Code Examples and API Snippets

```python
# Python Example to Fetch Shipping Information using Vendor Direct Fulfillment
Shipping API

import requests

BASE_URL = "https://sellingpartnerapi-na.amazon.com/vendor/directFulfillment/
shipping/v1"
API_ENDPOINT = "/shipping/state" # Change as required
ACCESS_TOKEN = "YOUR_ACCESS_TOKEN"

headers = {
"Authorization": f"Bearer {ACCESS_TOKEN}",
"Content-Type": "application/json"
}
response = requests.get(BASE_URL + API_ENDPOINT, headers=headers)

if response.status_code == 200:
shipping_data = response.json()
print(shipping_data) # Process the shipping data
else:
print(f"Error: {response.status_code} - {response.text}")
```

### Important Classes and Methods


#### Classes
- **VendorFulfillmentAPI**
- Methods to manage orders and shipping related to vendor operations.
- **ReportingAPI**
- Allows retrieval of business reports and analysis tools.

#### Methods
- **getShippingDetails()**
- Retrieves shipping information for orders.
- **createReport()**
- Initiates generation of a new report based on specified criteria.

### Key Concepts


- **SP-API Authorization**: Applications must use a Restricted Data Token (RDT) for
accessing sensitive data.
- **API Rate Limits**: Be aware of the rate limits enforced for each API endpoint
to avoid throttling.
- **Version Handling**: Always ensure you are using the latest stable version of
each API for optimal performance and security.

### Important Notes


- **Deprecation Schedule**: Monitor the [SP-API Deprecation
Schedule](https://developer-docs.amazon.com/sp-api/docs/deprecation-schedule) for
any upcoming changes in API versions.
- **Sandbox Environment**: Testing should be performed in the sandbox environment
before moving to production to ensure API calls are valid.
- **Error Handling**: Leverage the error response structures to implement robust
error handling in your applications. Common error responses include 400 (Bad
Request) and 401 (Unauthorized).

This summary provides an essential guide for developers aiming to integrate with
Amazon's Selling Partner API using Python to retrieve and post relevant data
through various API endpoints.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-models#vendor-


direct-fulfillment-transactions-api:
# Summary of Amazon Selling Partner API – Vendor Direct Fulfillment Transactions
API

## Overview
The Amazon Selling Partner API (SP-API) provides endpoints for accessing and
managing various aspects of an Amazon seller account, which includes Vendor Direct
Fulfillment APIs. This documentation outlines the Vendor Direct Fulfillment
Transactions API, which specifically allows access to direct fulfillment vendor
invoice data.
## Important APIs Related to Vendor Direct Fulfillment

### 1. Vendor Direct Fulfillment Transactions API


- **Purpose**: Access to direct fulfillment vendor invoice data.
- **Current Version**: v2021-12-28
- **Available for Sellers**: No
- **Available for Vendors**: Yes
- **Reference and Model Link**: [Vendor Direct Fulfillment Transactions API]
(https://developer-docs.amazon.com/sp-api/docs/sp-api-models)

### 2. Vendor Direct Fulfillment Payments API


- **Purpose**: Access direct fulfillment vendor invoice data, related to payments.
- **Current Version**: v1
- **Available for Sellers**: No
- **Available for Vendors**: Yes
- **Reference and Model Link**: [Vendor Direct Fulfillment Payments
API](https://developer-docs.amazon.com/sp-api/docs/sp-api-models)

### 3. Vendor Direct Fulfillment Orders API


- **Purpose**: Access direct fulfillment vendor order data.
- **Current Version**: v2021-12-28
- **Available for Sellers**: No
- **Available for Vendors**: Yes
- **Reference and Model Link**: [Vendor Direct Fulfillment Orders
API](https://developer-docs.amazon.com/sp-api/docs/sp-api-models)

### 4. Vendor Direct Fulfillment Shipping API


- **Purpose**: Access direct fulfillment vendor shipping data.
- **Current Version**: v2021-12-28
- **Available for Sellers**: No
- **Available for Vendors**: Yes
- **Reference and Model Link**: [Vendor Direct Fulfillment Shipping
API](https://developer-docs.amazon.com/sp-api/docs/sp-api-models)

### 5. Vendor Direct Fulfillment Inventory API


- **Purpose**: Manage direct fulfillment operations.
- **Current Version**: v1
- **Available for Sellers**: No
- **Available for Vendors**: Yes
- **Reference and Model Link**: [Vendor Direct Fulfillment Inventory
API](https://developer-docs.amazon.com/sp-api/docs/sp-api-models)

## Key Concepts

- **Vendor Account**: The Vendor Direct Fulfillment APIs are intended for use by
vendors, not sellers. Access to these APIs requires vendor account credentials.
- **Amazon SP-API Authentication**: Ensure that you have properly set up
authentication, including OAuth tokens, to access these APIs.
- **API Rate Limits**: Be mindful of API usage limits to avoid interruptions or
access denials.

## Important Notes
- **API Permissions**: Ensure that your application has the required permissions
and scopes authorized to access vendor-related data.
- **Sandbox Testing**: Before deploying any integration live, utilize sandbox
environments to test API calls and interactions.
- **API Updates**: Regularly check the [SP-API Release Notes](https://developer-
docs.amazon.com/sp-api/page/release-notes) for the latest updates and changes to
API functionality.
## Additional Resources
- Tutorials for specific SDKs (like Python and Java) can provide additional context
and examples on how to interact with the SP-API.
- For detailed code samples, review the provided documentation or related GitHub
repositories showcasing example implementations.

This summary provides a structured insight into accessing and using the Vendor
Direct Fulfillment Transactions API as part of the Amazon SP-API, focusing on
essential components necessary for effective integration and utilization.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-models#vendor-


invoices-api:
### Amazon Selling Partner API (SP-API) Overview

The Selling Partner API (SP-API) allows developers to gather data from a selling
partner's account and post data to the selling partner's account using APIs.

**Key Areas of Focus:**


- **Vendors**: Access vendor-specific APIs such as Vendor Invoices, Vendor Orders,
etc.
- **Python SDK**: The guide emphasizes utilizing Python for automation and API
calls.

---

### Important APIs and Their Usage

#### 1. **Vendor Invoices API**


- **Purpose**: Access vendor payment data.
- **API Version**: v1
- **Response Fields**: PaymentID, InvoiceAmount, Status, etc.

**Example of API Snippet**:


```python
import requests

url = "https://sellingpartnerapi-na.amazon.com/vendor/invoices"
headers = {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"x-amz-date": "YYYYMMDDTHHMMSSZ",
"Content-Type": "application/json",
}
response = requests.get(url, headers=headers)
print(response.json())
```

#### 2. **Vendor Orders API**


- **Purpose**: Access vendor order data.
- **API Version**: v1

**Usage Example**:
```python
response = requests.get("https://sellingpartnerapi-na.amazon.com/vendor/orders",
headers=headers)
```
#### 3. **Vendor Shipments API**
- **Purpose**: Access vendor retail shipping data.
- **API Version**: v1

**Response Fields**: ShipmentID, OrderID, TrackingNumber, etc.

---

### Key Concepts

- **Authorization**: Ensure your application is authorized to access the SP-API


through a valid access token. The token must be rotated periodically for security
purposes.
- **Rate Limits**: Understand that SP-APIs have rate limits per account, which must
be respected to avoid throttling.
- **Response Format**: APIs typically return JSON formats, requiring proper
handling during implementation.

---

### Important Notes

- Ensure compliance with Amazon's **Acceptable Use Policy** and **Data Protection
Policy** when using the SP-API.
- Always check the **SP-API Release Notes** for updates to APIs and their
functionalities as new versions may incorporate significant changes that could
affect existing implementations.
- If experiencing errors, refer to the **SP-API Errors FAQ** for troubleshooting.

---

### Additional Considerations

- Utilize the provided **tutorials** for automating SP-API calls (e.g., Automate
API calls using Python SDK).
- Regularly review **API deprecations** to remain informed about any functions or
endpoints that may become obsolete.

---

This summary should guide developers in successfully implementing functionalities


offered through the Amazon SP-API, with specific emphasis on essential APIs for
vendor management.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-models#vendor-


orders-api:
# Summary of Amazon SP-API - Vendor Orders API

## Overview
The Amazon Selling Partner API (SP-API) provides developers the tools to access the
data and capabilities necessary for managing their selling partner's Amazon
accounts. This document focuses on the Vendor Orders API, which is part of the
larger SP-API framework.

## Vendor Orders API


- **Purpose**: The Vendor Orders API allows access to vendor order data. This API
is important for managing and processing vendor transactions efficiently.

### API Version:


- **Current Version**: v1

## Important Classes and Functions


- **VendorOrdersAPI**: This is the main class used to interact with vendor order
data.
- **getVendorOrders()**: Retrieves order details, filtered by specified criteria.
- **Parameters**:
- `createdAfter`: Date after which the orders were created.
- `createdBefore`: Date before which the orders were created.
- `marketplaceId`: The ID of the marketplace.

### Usage Example


Below is an illustrative code snippet to demonstrate how to use the Vendor Orders
API in Python:

```python
import requests

def get_vendor_orders(access_token, marketplace_id, created_after, created_before):


url = f"https://sellingpartnerapi-na.amazon.com/vendor/orders/v1/orders"
headers = {
'Authorization': f'Bearer {access_token}',
'Content-Type': 'application/json',
'x-amz-access-token': access_token
}
params = {
'createdAfter': created_after,
'createdBefore': created_before,
'marketplaceId': marketplace_id
}

response = requests.get(url, headers=headers, params=params)

if response.status_code == 200:
return response.json()
else:
print(f"Error: {response.status_code}, {response.text}")

# Example invocation
orders = get_vendor_orders("your_access_token", "ATVPDKIKX0DER", "2023-01-
01T00:00:00Z", "2023-12-31T23:59:59Z")
print(orders)
```
### Key Concepts
- **OAuth 2.0 Authorization**: Accessing the API requires OAuth 2.0 tokens. Be sure
to have valid tokens before making API calls.
- **Rate Limits**: Ensure compliance with rate limits to avoid throttling. Check
the latest documentation for the specific limits on each API.

### Caveats
- Ensure that you understand the date format (ISO 8601) used for timestamps.
- Be aware that responses might be paginated if the results exceed the maximum
allowed in a single call. Handle pagination using the appropriate continuations.
- Regularly check for version updates as the API may evolve, introducing new fields
or deprecating older versions.
## Notes
For more detailed specifications, usage guidelines, and updates, refer to the
[Amazon Selling Partner API Documentation](https://developer-docs.amazon.com/sp-
api/docs/sp-api-models#vendor-orders-api).

## Conclusion
The Vendor Orders API provides a straightforward way to retrieve and manage vendor
order data in the Amazon ecosystem. By following the usage patterns outlined above
and maintaining attention to key concepts like authorization and rate limits,
developers can successfully integrate with this API.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-models#vendor-


shipments-api:
# Summary of Amazon SP-API Documentation for Vendor Shipments API

## Overview
The Vendor Shipments API allows developers to access vendor retail shipping data,
enabling them to manage and monitor their shipments effectively. This API is part
of the Selling Partner API (SP-API) that provides tools for interacting with
Amazon's selling platform.

### API Reference


- **Current Version:** v1
- **Usage:** Accessible only by vendor accounts.

## Key Concepts
- **API Models:** Understanding the API models is crucial for effective
implementation as they define data structures and relationships.
- **OAuth Authorization:** All requests require OAuth credentials for access,
including a Restricted Data Token for sensitive operations.
- **Request Format:** JSON format is required for both requests and responses when
interacting with the API.

## Important Classes, Functions, and Methods

### Endpoint Overview


- **GET /vendor/shipments:** Retrieve shipment details.
- **POST /vendor/shipments:** Create a new shipment.
- **PUT /vendor/shipments/{shipment_id}:** Update shipment details.
- **DELETE /vendor/shipments/{shipment_id}:** Cancel a shipment.

### Example Code Snippet


Below is an example of how to invoke the Vendor Shipments API in Python:

```python
import requests

# API endpoint
url = "https://sellingpartnerapi-na.amazon.com/vendor/shipments/{shipment_id}"

# Set up the headers (Include authentication tokens)


headers = {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
}
# Sample payload for creating a shipment
payload = {
"shipmentId": "YOUR_SHIPMENT_ID",
"status": "SHIPPED",
"trackingInfo": {
"carrier": "CarrierName",
"trackingNumber": "TrackingNumber"
}
}

# Create a shipment
response = requests.post(url, headers=headers, json=payload)

# Check response
if response.status_code == 200:
print("Shipment created successfully:", response.json())
else:
print("Error:", response.status_code, response.text)
```

### Fields in Request


- **shipmentId (string):** Identifier for the shipment.
- **status (string):** Current status of the shipment (e.g., SHIPPED).
- **trackingInfo (object):** Contains carrier details and tracking number.

## Important Notes
- **Rate Limits:** Be aware of the API rate limits to avoid throttling. Follow best
practices such as handling 429 Too Many Requests errors gracefully.
- **Error Handling:** Implement robust error handling to manage API response
statuses, including validation errors (400), unauthorized access (401), and server
errors (500).
- **Versioning:** Pay attention to API versioning. Always refer to the
documentation for the latest updates and changes in the API structure.

## Conclusion
The Vendor Shipments API is a key tool for vendors looking to manage their shipping
operations effectively. Understanding the request formats, authentication methods,
and best practices is critical for successful integration. Always refer to the
official documentation for updates and detailed information.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-models#vendor-


transaction-status-api:
### Summary of Amazon Selling Partner API (SP-API)

#### Overview
The Selling Partner API (SP-API) provides developers with access to various
features and data relevant to Amazon’s retail and seller ecosystem. It enables
operations related to order management, product listings, invoicing, notifications,
financial information, and more for both sellers and vendors.

#### Important APIs


1. **Vendor Transaction Status API**
- **Purpose**: Accesses status information for specific asynchronous POST
transactions for vendors.
- **Version**: v1
- **Reference/Model**:
[Reference](https://developer-docs.amazon.com/sp-api/docs/vendor-transaction-
status-api-v1-reference)
- **Usage**:
```python
# Example usage
import requests

url = "https://sellingpartnerapi-na.amazon.com/vendor/transaction-status/v1"
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.get(url, headers=headers)
print(response.json())
```

2. **Vendor Invoices API**


- **Purpose**: Access vendor payment data.
- **Version**: v1
- **Reference/Model**:
[Reference](https://developer-docs.amazon.com/sp-api/docs/vendor-invoices-api-v1-
reference)

3. **Vendor Orders API**


- **Purpose**: Access vendor order data.
- **Version**: v1
- **Reference/Model**:
[Reference](https://developer-docs.amazon.com/sp-api/docs/vendor-orders-api-v1-
reference)

4. **Vendor Shipments API**


- **Purpose**: Access vendor retail shipping data.
- **Version**: v1
- **Reference/Model**:
[Reference](https://developer-docs.amazon.com/sp-api/docs/vendor-shipments-api-v1-
reference)

#### Key Concepts


- **Authentication**: Access to the API requires an OAuth token for authorization.
Ensure that the token is included in the headers of API requests.
- **Asynchronous Operations**: Many transactions, especially for vendors, may need
subsequent calls to retrieve the completion status using the relevant API.
- **JSON Format**: Data exchanges between the client and server are done in JSON
format. Developers need to handle JSON serialization/deserialization properly.
- **Rate Limits**: Each API has its own usage limits, and exceeding these can
result in throttling. It is important to check the specific rate limits for each
API endpoint.

#### Important Notes


- **Data Privacy**: Ensure compliance with Amazon's data protection policies and
acceptable use policies.
- **Versioning**: Always check if you are using the latest version of the API, as
older versions may be deprecated or limited in functionality.
- **Error Handling**: Implement comprehensive error handling in your application to
manage HTTP response errors and API-specific errors (refer to the SP-API Errors FAQ
for guidance).

### Conclusion
The SP-API offers a robust set of features for interacting with Amazon's selling
platform. Developers are encouraged to consult the API documentation for detailed
information on each API, including endpoints, request/response formats, and usage
scenarios.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/code-samples:


### Amazon Selling Partner API (SP-API) Code Samples Summary

#### Overview
The Amazon Selling Partner API (SP-API) provides a set of APIs that enable
developers to retrieve and post data to a seller's Amazon account. This summary
provides insights into several APIs, offering code samples, important methods, and
essential concepts for effective implementation.

#### Code Examples and API Snippets

1. **Fulfillment Outbound API**


- **Purpose**: Manage Multi-Channel Fulfillment (MCF) orders.
- **Code Snippets**:
- **Create Order**:
```python
# Sample code to create an MCF order
```
- **Retrieve Order**:
```python
# Sample code to retrieve an MCF order
```
- **Cancel Order**:
```python
# Sample code to cancel an MCF order
```

2. **Merchant Fulfillment API**


- **Purpose**: Automate shipping for sellers on Amazon.
- **Code Snippets**:
- **Fetch Order Information**:
```python
# Sample code to fetch order information for shipping
```
- **Generate Shipping Label**:
```python
# Sample code to generate a presigned URL for a shipping label
```

3. **Product Pricing API v0**


- **Purpose**: Retrieve and set product pricing.
- **Code Snippets**:
- **Retrieve SKU Price**:
```python
# Sample code to fetch SKU price
```
- **Submit New SKU Price**:
```python
# Sample code to submit a new SKU price
```
4. **Vendor Direct Fulfillment API**
- **Purpose**: Manage Direct Fulfillment operations.
- **Code Snippets**:
- **Fetch Direct Fulfillment Orders**:
```python
# Sample code to fetch orders for direct fulfillment
```

5. **Data Kiosk API**


- **Purpose**: Submit GraphQL queries to manage business data.
- **Code Snippets**:
- **Create Data Kiosk Query**:
```python
# Sample code to create a data kiosk query
```

6. **Application Management API**


- **Purpose**: Manage application credentials and security.
- **Code Snippets**:
- **Rotate Client Secret**:
```python
# Sample code to update and rotate a client secret
```

7. **Fulfillment Inbound API**


- **Purpose**: Manage inbound shipments into Amazon’s fulfillment network.
- **Code Snippets**:
- **Create Inbound Plan**:
```python
# Sample code to create an inbound plan for shipments
```

8. **Listings Items API**


- **Purpose**: Manage product listings on Amazon.
- **Code Snippets**:
- **Submit a Listings Item**:
```python
# Sample code to submit a new product listing
```

#### Important Classes and Methods


- **API Clients**: Each API typically has its own client class for connecting to
the respective endpoints.
- **Authentication**: All API calls require appropriate authorization through OAuth
and must include access tokens.
- **Error Handling**: Use try-catch blocks to gracefully handle API errors and
respond accordingly.

#### Key Concepts


- **Rate Limits**: Each API has defined rate limits. Exceeding these can lead to
errors and blocked requests.
- **Response Formats**: Familiarize yourself with the response structure,
especially the hierarchy of JSON objects returned by the APIs.
- **Test Environment**: Utilize the Selling Partner API Sandbox for development and
testing purposes before going live to avoid impacting production accounts.

#### Important Notes/Caveats


- **Versioning**: Always ensure you are using the correct version of the API as
some endpoints may change over time.
- **CORS Policy**: If implementing API calls from a web browser, ensure compliance
with CORS policies.
- **Security Measures**: Follow best practices in API key management and ensure
data protection compliance, particularly when handling sensitive seller
information.

This summary provides foundational knowledge for leveraging the Amazon SP-API
effectively, ensuring developers can access and implement the appropriate
functionalities to benefit their applications and services.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/code-


samples#fulfillment-outbound:
# Summary of Amazon Selling Partner API (SP-API) Code Samples

## Overview
The Selling Partner API (SP-API) allows developers to build applications that
enhance the capabilities of sellers on Amazon's platform. This document summarizes
key aspects of the SP-API focused on fulfilling orders, merchant fulfillment,
pricing, and vendor operations.

## Key APIs and Code Samples

### 1. Fulfillment Outbound API


- **Purpose:** Aids sellers in fulfilling Multi-Channel Fulfillment (MCF) orders
using inventory within Amazon’s fulfillment network.
- **Key Operations:**
- **Create Order:** Initiates an MCF order.
- **Retrieve Order:** Fetches details of an existing MCF order.
- **Get Tracking Details:** Retrieves tracking information for a given order.
- **Submit Order for Shipment:** Submits an MCF order for shipment.
- **Documentation:** To learn more, refer to the Fulfillment Outbound API use case
guide and the full sample solution on GitHub.

### 2. Merchant Fulfillment Network API


- **Purpose:** Enables applications that allow sellers to buy shipping for their
orders.
- **Key Features:**
- **Generate Shipping Label:** Creates a presigned URL for a shipping label.
- **Fetch Order Information:** Retrieves order details.
- **Create Shipment:** Facilitates the creation of a shipment.

### 3. Product Pricing API


- **Purpose:** Programmatically accesses product and offer pricing information.
- **Key Operations:**
- **Retrieve SKU Data:** Obtains SKU data from the Amazon Marketplace.
- **Submit New SKU Price:** Sends updated pricing information for SKUs.

### 4. Vendor Direct Fulfillment API


- **Purpose:** Assists vendors in managing their direct fulfillment operations.
- **Key Features:**
- **Fetch Direct Fulfillment Orders:** Retrieves orders for fulfillment.
- **Acknowledgment and Shipment Confirmation:** Confirms orders and shipment
details.

### 5. Data Kiosk API


- **Purpose:** Submits GraphQL queries to assist selling partners.
- **Key Operations:**
- **Create Query:** Initiates a new query.
- **Retrieve Document Details:** Fetches details about documents.

### 6. Application Management API


- **Purpose:** Manages client secrets for registered applications.
- **Functionality:**
- **Rotate Client Secret:** Updates the client secret for added security.

### 7. Fulfillment Inbound API


- **Purpose:** Manages inbound workflows for shipments into Amazon’s fulfillment
network.
- **Key Operations:**
- **Create Inbound Plan:** Sets up plans for inbound shipments.
- **List Packing Options:** Retrieves available packing options.

### 8. Listings Items API


- **Purpose:** Accesses and manages seller listings on Amazon.
- **Key Features:**
- **Create, Edit, and Delete Listings:** Manage SKUs for products.
- **Get Listings Item Restrictions:** Checks restrictions related to listing
items.

## Important Concepts

### SDK Usage


- Python SDK is available to facilitate automation of SP-API calls.
- Tutorials available for specific operations demonstrate how to effectively
interact with the APIs using code.

### Authentication
- Applications must be authorized to access the Selling Partner API.
- Various authorization workflows (Self Authorization, Website Authorization) are
detailed in the documentation.

### Rate Limits and Best Practices


- Each API has defined usage plans and rate limits that developers must adhere to.

### Documentation Links


- Developers are encouraged to refer to the detailed API use case guides and sample
solutions available on GitHub to assist in implementation.

## Conclusion
The Amazon SP-API provides comprehensive capabilities for inventory management,
order fulfillment, pricing, and vendor operations. Developers are advised to
familiarize themselves with the specific use cases and recommended practices
provided in the API documentation to optimize their implementation.

### Caveats
- Ensure compliance with the Acceptable Use Policy and relevant data protection
regulations.
- Regular updates on API versions and deprecations must be monitored to maintain
functionality in applications.

For complete code samples and detailed implementation guidelines, please refer to
the respective API documentation linked within each section.
_____________________________
Summary of URL: https://developer-docs.amazon.com/sp-api/docs/code-
samples#merchant-fulfillment-network:
### Summary of Amazon Selling Partner API (SP-API) Code Samples

#### Overview
The Amazon Selling Partner API (SP-API) provides programmatic access for sellers to
manage their selling operations on Amazon's platform. This documentation covers
several APIs with relevant code samples and guides for integration, focusing on
methods for gathering data and posting data to a customer's selling account.

#### Key APIs and Code Samples

1. **Fulfillment Outbound API**


- **Purpose**: Aids sellers in fulfilling Multi-Channel Fulfillment (MCF)
orders.
- **Key Functions**:
- **Create Order**: Initiates a new fulfillment order.
- **Retrieve Order**: Fetches existing fulfillment orders.
- **Get Package Tracking Details**: Provides tracking information for
shipments.
- **Resources**: [Fulfillment Outbound API Use Case Guide](https://developer-
docs.amazon.com/sp-api/docs)

2. **Merchant Fulfillment API**


- **Purpose**: Allows sellers to purchase shipping for their orders and generate
shipping labels.
- **Key Functions**:
- **Generate Presigned URL for Shipping Label**: Creates a URL to access
shipping labels securely.
- **Fetch Order Information**: Retrieves details about specific orders.
- **Create Shipment**: Submits a new shipment request.
- **Resources**: [Merchant Fulfillment API Use Case Guide](https://developer-
docs.amazon.com/sp-api/docs)

3. **Product Pricing API v0**


- **Purpose**: Offers endpoints for retrieving and updating product pricing
information.
- **Key Functions**:
- **Fetch SKU Price**: Retrieves the price of a specific SKU.
- **Calculate New SKU Price**: Computes a new price for an SKU based on logic.
- **Submit New SKU Price**: Updates the price for an SKU.
- **Resources**: [Product Pricing API Use Case Guide](https://developer-
docs.amazon.com/sp-api/docs)

4. **Vendor Direct Fulfillment API**


- **Purpose**: Supports vendors in managing their direct fulfillment operations
programmatically.
- **Key Functions**:
- **Fetch Direct Fulfillment Orders**: Retrieves orders to fulfill.
- **Get Shipping Label**: Generates a shipping label for a direct fulfillment
order.
- **Confirm Shipment**: Confirms the shipment of an order.
- **Resources**: [Vendor Direct Fulfillment API Use Case
Guide](https://developer-docs.amazon.com/sp-api/docs)

5. **Data Kiosk API**


- **Purpose**: Allows sending GraphQL queries to manage business data
effectively.
- **Key Functions**:
- **Create Data Kiosk Query**: Initiates a query to extract information.
- **Retrieve Document Details**: Fetches specific document data.
- **Resources**: [Data Kiosk API Use Case Guide](https://developer-
docs.amazon.com/sp-api/docs)

6. **Application Management API**


- **Purpose**: Manages application credentials and security.
- **Key Functions**:
- **Rotate Client Secret**: Updates the application's client secret safely.
- **Resources**: [Application Management API Use Case Guide](https://developer-
docs.amazon.com/sp-api/docs)

7. **Fulfillment Inbound API**


- **Purpose**: Manages inbound workflows for sending shipments to Amazon's
fulfillment network.
- **Key Functions**:
- **Create Inbound Plan**: Sets up a plan for an inbound shipment.
- **Confirm Packing Option**: Updates packing options for shipments.
- **Resources**: [Fulfillment Inbound API Use Case Guide](https://developer-
docs.amazon.com/sp-api/docs)

8. **Listings Items API**


- **Purpose**: Manages product listings on Amazon.
- **Key Functions**:
- **Search for Products**: Queries the catalog for products.
- **Submit a Listing Item**: Adds a new product listing.
- **Delete Listing Item**: Removes a product from the catalog.
- **Resources**: [Listings Items API Use Case Guide](https://developer-
docs.amazon.com/sp-api/docs)

#### Important Notes and Considerations


- Ensure proper authorization setup for accessing SP-API functionalities. This
includes using OAuth to authorize API calls.
- Regularly check for updates and deprecations in the API to maintain compatibility
with the provided methods and functions.
- Each API has specific usage limits which need to be adhered to in order to avoid
throttling issues.

#### Key Concepts


- **Client Secret Rotation**: Regularly rotate application credentials to enhance
security.
- **Presigned URLs**: Utilize presigned URLs for secure access to private
resources.
- **GraphQL Queries**: Understand the structure of GraphQL to interact with the
Data Kiosk API effectively.

This summary encapsulates essential information and directs developers to usage


guidelines for each API to ensure effective integration with Amazon's ecosystem.
For any additional examples or specific details, refer to the corresponding API Use
Case Guides linked above.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/code-samples#product-


pricing-api-v0:
### Summary of Amazon Selling Partner API (SP-API) Code Samples
#### Overview
The Selling Partner API enables developers to interact with Amazon's services to
gather data from customers' selling partners and post data to their selling
accounts. This library provides numerous APIs and code samples primarily in Python
for functionalities related to various operations such as pricing, fulfillment, and
inventory management.

#### API Code Samples and Categories

1. **Fulfillment Outbound API**


- Purpose: Assists sellers in fulfilling Multi-Channel Fulfillment (MCF) orders
using Amazon’s inventory network.
- Key Operations:
- Create Order
- Retrieve MCF Order
- Submit order for shipment
- Get tracking details
- For more details: Refer to the Fulfillment Outbound API use case guide and
GitHub sample.

2. **Merchant Fulfillment API**


- Purpose: Enables apps that allow sellers to purchase shipping for orders.
- Key Operations:
- Generate shipping label URL
- Fetch order details
- Check inventory
- Create shipments
- For more details: Utilize the Merchant Fulfillment API use case guide and full
sample solution on GitHub.

3. **Product Pricing API v0**


- Purpose: Retrieve product pricing information for Amazon Marketplace products.
- Key Operations:
- Retrieve SKU data
- Fetch SKU Price
- Calculate and Submit new SKU Price
- For more details: Refer to the Product Pricing API v0 Use Case Guide.

4. **Vendor Direct Fulfillment APIs**


- Purpose: Manage fulfillment operations for vendors in the Direct Fulfillment
program.
- Key Operations:
- Fetch fulfillment orders
- Acknowledge orders
- Get shipping labels
- For more details: Refer to the Vendor Direct Fulfillment API use case guide.

5. **Data Kiosk API**


- Purpose: Submit GraphQL queries to help partners manage their businesses.
- Key Operations:
- Create Data Kiosk query
- Retrieve document details
- Subscribe to notifications
- For more details: The Data Kiosk use case guide and GitHub sample provide
comprehensive instructions.

6. **Application Management API**


- Purpose: Rotate client secrets for registered applications.
- Key Operations:
- Update and rotate LWA Client Secrets
- For more details: Refer to the Application Management API v2023-11-30 Use Case
Guide.

7. **Fulfillment Inbound API**


- Purpose: Build inbound workflows to create and manage shipments into Amazon's
fulfillment network.
- Key Operations:
- Confirm packing, placement, and transportation options
- Generate inbound plans
- Get shipment details
- For more details: Refer to the Fulfillment Inbound API use case guide.

8. **Listings Items API**


- Purpose: Programmatically manage selling partner listings on Amazon.
- Key Operations:
- Search for products
- Submit and delete listings
- Get SKU and restrictions information
- For more details: The Listings Items API Use Case Guide provides all necessary
instructions.

#### Important Concepts


- **SKU (Stock Keeping Unit)**: An identifier used to track inventory levels and
sales.
- **Client Secret**: Credentials required to authenticate applications
communicating with the API.
- **GraphQL**: Query language for APIs, used in the Data Kiosk API for making
flexible queries.

#### Notes and Caveats


- Ensure to handle authorization and authentication accurately since many
operations require specific roles and permissions.
- Each API has its rate limits and acceptable use policies, ensure compliance to
avoid interference with service availability.
- RESTful principles are often used, so familiarize yourself with HTTP methods like
GET, POST, and DELETE as they relate to API operations.

#### Conclusion
The Amazon SP-API provides a range of functionalities through various APIs tailored
to help developers automate operations and integrate Amazon services into their
applications. It is advised to refer to the specific use case guides and libraries
on GitHub for hands-on examples and advanced implementations.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/code-samples#vendor-


direct-fulfillment:
### Amazon Selling Partner API (SP-API) Overview

The Amazon Selling Partner API (SP-API) allows developers to access and manage data
related to selling partners on Amazon. This includes retrieving product
information, managing orders, and facilitating fulfillment operations.

---

### Code Samples and API Snippets


#### 1. **Vendor Direct Fulfillment APIs**
- **Description**: Enable vendors to programmatically manage their direct
fulfillment operations.
- **Key APIs**:
- **Orders API v1**: Manage orders.
- **Shipping API v1**: Handle shipping operations.
- **Inventory API v1**: Manage inventory levels.
- **Sample Snippets**:
- Fetch direct fulfillment orders:
```python
# Example function to fetch orders
def fetch_direct_fulfillment_orders():
# API call implementation
pass
```

- Confirm shipment of a direct fulfillment order:


```python
# Example function to confirm shipment
def confirm_shipment(order_id):
# API call implementation
pass
```

#### 2. **Fulfillment Outbound API**


- **Description**: Supports apps for fulfilling Multi-Channel Fulfillment (MCF)
orders.
- **Key Functions**:
- Create Order
- Retrieve Multi-Channel Fulfillment order
- Get tracking details
- **Sample Snippets**:
```python
def create_order(order_details):
# Call the Create Order API
pass
```

#### 3. **Merchant Fulfillment Network API**


- **Description**: Allows sellers to buy shipping for orders.
- **Functions**:
- Fetch eligible shipment services
- Generate shipping labels
- **Sample Snippets**:
```python
def fetch_shipping_services(order_id):
# Call to fetch services
pass
```

---

### Important Classes and Methods

1. **Authorization Roles**
- Roles are crucial for accessing the SP-API. Ensure your application has the
necessary permissions for operations (e.g., Seller, Inventory, Orders).

2. **Rate Limits**
- Be aware of the rate limiting policy to avoid API request failures.

3. **Error Handling**
- Understand the common errors (e.g., authorization errors, 400 errors) for
effective troubleshooting.

---

### Key Concepts

- **Authorization**: Use OAuth 2.0 for authorization. Applications must obtain a


token to access SP-API endpoints.
- **Data Format**: The SP-API primarily returns data in JSON format. Understanding
JSON structure is essential for processing API responses.
- **Webhooks**: Utilize notification mechanisms for real-time updates regarding
orders and inventory changes.
- **SDKs**: Amazon provides SDKs (specifically for Python) to ease integration with
the API.

---

### Important Notes

- **Security**: Follow best practices for securing credentials and sensitive data.
- **Documentation**: Regularly check the Amazon Developer Documentation for updates
and changes in API usage.
- **Testing**: Utilize the SP-API sandbox for testing your applications before
going live to avoid impacting production data.

This summary succinctly encapsulates the significant components of the SP-API


documentation page relevant to developers working on integrating and utilizing
Amazon's API services for vendors and sellers. For practical implementations,
always refer to specific API use case guides and sample solutions available on
GitHub.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/code-samples#data-


kiosk:
### Summary of Amazon Selling Partner API (SP-API) Code Samples and Documentation

#### Overview:
The Amazon Selling Partner API (SP-API) allows developers to interact
programmatically with Amazon's marketplace. It provides endpoints to gather data
from and post data to a selling partner's account through a variety of APIs.

### Key API Classes and Functions

1. **Data Kiosk API**


- **Description**: Allows apps to submit GraphQL queries to help manage business
operations.
- **Methods**:
- `createDataKioskQuery()`: Create a new query.
- `retrieveDocumentDetails()`: Retrieve details of a document.
- `subscribeToNotification()`: Subscribe to notifications.
- `cancelActiveQuery()`: Cancel a currently active query.
- **Use Case Guide and Samples**: [Data Kiosk Use Case Guide](https://developer-
docs.amazon.com/sp-api/docs/code-samples).
2. **Fulfillment Outbound API**
- **Description**: Manages Multi-Channel Fulfillment (MCF) orders and inventory
information.
- **Methods**:
- `createOrder()`: Create an order.
- `retrieveOrder()`: Retrieve information regarding an existing order.
- `submitOrderForShipment()`: Submit an order for shipment.
- **Reference**: [Fulfillment Outbound Use Case Guide](https://developer-
docs.amazon.com/sp-api/docs/code-samples).

3. **Merchant Fulfillment API**


- **Description**: Allows sellers to buy shipping for their orders and manage
shipping options.
- **Methods**:
- `generatePresignedURL()`: Generate a presigned URL for a shipping label.
- `createShipment()`: Create a shipment.
- `fetchOrderInformation()`: Fetch information based on order ID.
- **Reference**: [Merchant Fulfillment Use Case Guide](https://developer-
docs.amazon.com/sp-api/docs/code-samples).

4. **Product Pricing API**


- **Description**: Retrieves and manages product pricing information.
- **Methods**:
- `retrieveSKUPrice()`: Fetch the price of a specific SKU.
- `submitNewSKUPrice()`: Submit a new price for a SKU.
- **Reference**: [Product Pricing Use Case Guide](https://developer-
docs.amazon.com/sp-api/docs/code-samples).

5. **Fulfillment Inbound API**


- **Description**: Manages inbound workflows for shipments into Amazon’s
fulfillment network.
- **Methods**:
- `createInboundPlan()`: Create an inbound plan.
- `getInboundOperationStatus()`: Retrieve status of an inbound operation.
- **Reference**: [Fulfillment Inbound Use Case Guide](https://developer-
docs.amazon.com/sp-api/docs/code-samples).

6. **Listings Items API**


- **Description**: Provides programmatic access to manage listings and inventory
(SKUs).
- **Methods**:
- `submitListingsItem()`: Submit a new listings item.
- `deleteListingsItem()`: Delete an item from the catalog.
- `getSchemaForProductType()`: Get schema details for specific product types.
- **Reference**: [Listings Items Use Case Guide](https://developer-
docs.amazon.com/sp-api/docs/code-samples).

### Important Concepts

- **Authorization**: SP-API requires authorization tokens to interact with its


endpoints. Developers must properly handle authorization credentials and scopes for
their applications.
- **Query Processing**: For Data Kiosk, the completion of query processing
notifications should be monitored for successful data retrieval.
- **Rate Limits**: Understanding the API's usage plans and rate limits is essential
for ensuring reliable application performance without interruptions.

### Best Practices and Caveats


- **Error Handling**: Implement robust error handling for API responses to manage
various error codes (e.g., authorization errors, query limits).
- **SDK Usage**: Utilize the SDKs provided for languages like Python, Java, and C#
to simplify API implementation.
- **Testing Environment**: Use the Selling Partner API Sandbox environment for
testing before moving to production.

### Resources
- [Amazon SP-API Documentation](https://developer-docs.amazon.com/sp-api/docs/code-
samples)
- [GitHub Samples](https://github.com/amzn/selling-partner-api-docs)

This summary provides essential insights and reference for developers looking to
utilize the Amazon SP-API effectively.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/code-


samples#application-management:
### Summary of Amazon Selling Partner API (SP-API) Code Samples

**User Intent**: The SP-API allows access to data for selling partners and enables
posting data to their selling accounts using Python.

#### Code Examples and API Snippets


- **Fulfillment Outbound API**:
- Purpose: Manage Multi-Channel Fulfillment (MCF) orders.
- Examples:
- **Create Order**: `{ "action" : "CreateOrder", ... }`
- **Retrieve Multi-Channel Fulfillment Order**: `{ "action" :
"GetOrder", ... }`

- **Merchant Fulfillment API**:


- Purpose: Enable sellers to buy shipping for their orders.
- Examples:
- **Generate Shipping Label**: `{ "action" : "GenerateShippingLabel", ... }`
- **Fetch Order Information**: `{ "action" : "GetOrderInfo", ... }`

- **Product Pricing API v0**:


- Purpose: Retrieve product and offer pricing details.
- Examples:
- **Retrieve SKU Price**: `{ "action" : "GetSkuPrice", ... }`
- **Submit New SKU Price**: `{ "action" : "SetNewSkuPrice", ... }`

- **Vendor Direct Fulfillment APIs**:


- Purpose: Manage direct fulfillment operations.
- Examples:
- **Fetch Direct Fulfillment Orders**: `{ "action" :
"GetDirectFulfillmentOrders", ... }`
- **Confirm Shipment of Order**: `{ "action" : "ConfirmShipment", ... }`

- **Data Kiosk API**:


- Purpose: Submit GraphQL queries to manage business data.
- Examples:
- **Create Data Kiosk Query**: `{ "action" : "CreateQuery", ... }`
- **Retrieve Document Details**: `{ "action" : "GetDocumentDetails", ... }`
- **Application Management API**:
- Purpose: Manage application credentials.
- Examples:
- **Rotate Client Secret**: `{ "action" : "RotateClientSecret", ... }`

- **Fulfillment Inbound API**:


- Purpose: Manage inbound shipments to Amazon's fulfillment network.
- Examples:
- **Create Inbound Plan**: `{ "action" : "CreateInboundPlan", ... }`
- **Get Shipment Details**: `{ "action" : "GetShipmentDetails", ... }`

- **Listings Items API**:


- Purpose: Manage product listings on Amazon.
- Examples:
- **Submit a Listings Item**: `{ "action" : "SubmitListingsItem", ... }`
- **Get SKU from Catalog**: `{ "action" : "GetSkuFromCatalog", ... }`

#### Important Classes, Functions, and Usage


1. **SP-API Client**: Essential for authenticating and making API calls.
- **Methods**:
- `get()`: Retrieve data.
- `post()`: Send data.
- `put()`: Update resources.
- `delete()`: Remove resources.

2. **Authorization Required**: Most operations require OAuth token obtained via LWA
(Login with Amazon) credentials.

3. **Endpoints**: Specific endpoints for each functionality mentioned in the API


documentation (e.g., `https://sellingpartnerapi-na.amazon.com`).

#### Key Concepts


- **GraphQL Queries**: Used in the Data Kiosk API to fetch data dynamically.
- **Rate Limits**: Each API has its defined rate limits to prevent abuse.
- **Notifications**: API allows subscribing to certain events (e.g., ORDER_CHANGE)
to receive updates.

### Important Notes and Caveats


- **Error Handling**: Developers should handle authorization errors and 400-series
error codes gracefully.
- **Versioning**: API methods change over time; always refer to the API
documentation for current methods and their expected parameters.
- **SDKs Availability**: Available SDKs in Python, Java, and C#. Ensure you are
using the appropriate SDK for your language choice.

This summary encapsulates the crucial aspects of using the Amazon SP-API for
developers focusing on Python. Always refer to individual API use case guides for
in-depth explanations and updates.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/code-


samples#fulfillment-inbound:
# Summary of Amazon Selling Partner API (SP-API) Code Samples

## Overview
The Selling Partner API (SP-API) allows sellers to programmatically interact with
their data on Amazon. It supports gathering data from the customer's selling
partner and posting data to the customer’s selling account.

## Tutorials and Code Samples


- **Automation Tutorials**:
- Automate SP-API calls using:
- **Python SDK**
- **JavaScript SDK for Node.js**
- **C# SDK**
- **Java SDK**

### Important APIs and Their Usage


1. **Fulfillment Inbound API**
- **Purpose**: Create, manage, and send shipments to Amazon's fulfillment
network.
- **Key Methods**:
- `Confirm Packing Option`
- `Confirm Placement Option`
- `Create Inbound Plan`
- `Get Shipment Details`
- **Usage**: Refer to the [Fulfillment Inbound API v2024-03-20 Use Case Guide]
(https://developer-docs.amazon.com/sp-api/docs/fulfillment-inbound-api-v2024-03-20-
reference) for detailed instructions.

2. **Listings Items API**


- **Purpose**: Access and manage selling partner's listings.
- **Key Methods**:
- `Search for Products`
- `Get a SKU From the Catalog`
- `Submit a Listings Item`
- **Usage**: Refer to the [Listings Items API Use Case
Guide](https://developer-docs.amazon.com/sp-api/docs/listings-items-api-use-case-
guide) for detailed instructions.

3. **Fulfillment Outbound API**


- **Purpose**: Assist sellers with multi-channel fulfillment orders and enable
access to order information.
- **Key Functions**:
- `Create Order`
- `Retrieve Multi-Channel Fulfillment Order`
- **Usage**: Refer to the Fulfillment Outbound API Use Case Guide for detailed
instructions.

4. **Merchant Fulfillment API**


- **Purpose**: Allow sellers to buy shipping for their orders and manage
shipment options.
- **Key Functions**:
- `Generate Shipping Label`
- `Fetch Order Information`
- **Usage**: Refer to the Merchant Fulfillment API Use Case Guide for detailed
instructions.

5. **Data Kiosk API**


- **Purpose**: Submit GraphQL queries to manage various business aspects for
selling partners.
- **Key Functions**:
- `Create Data Kiosk Query`
- `Retrieve Document Details`
- **Usage**: Refer to the Data Kiosk Use Case Guide for detailed instructions.
### Important Classes and Functions
- **Classes**: Each API typically has a companion model class that defines data
structures used for requests and responses.
- **Functions/Methods**: Each API provides specific functions to carry out tasks
related to that API.

## Key Concepts
- **Authorization**: Proper authorization is required for making API calls through
the Selling Partner API.
- **Rate Limits**: Be aware of the rate limits; exceeding these can lead to errors
in API requests.
- **Response Format**: Descriptions of successful responses, errors, and data
models used in requests are provided in each API Guide.

## Important Notes
- **SDK Usage**: Ensure to use the provided SDKs for best practices in integrating
SP-API within your applications.
- **Versioning**: Each API has a version number indicating its release; always
check if you are using the most current documentation and samples.
- **Documentation**: Extensive documentation is available for all APIs, including
sample applications on GitHub.

Developers looking to start with the SP-API can follow the code snippets from the
tutorials provided and explore the full details in the respective API use case
guides linked within the documentation.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/code-


samples#listings-items-api:
## Summary of Amazon SP-API Code Samples (Listings Items API)

### Overview

The Selling Partner API (SP-API) enables developers to interact with Amazon’s
selling partner ecosystem. It facilitates access to various functionalities such as
creating, retrieving, updating, and deleting product listings (SKUs) on Amazon.

### Key Concepts

1. **Listings Items API**: A key component of the SP-API that provides programmatic
access to manage selling partner listings on Amazon. It allows the creation,
deletion, and modification of listings, as well as retrieval of listing details.

### Important Classes and Methods

#### Listings Items API Use Cases

The Listings Items API provides several important actions (methods) for managing
product listings. Each action relates to specific endpoints and functionalities,
described as follows:

- **Search for Products in the Catalog**


- **Method**: `searchProducts()`
- **Description**: Retrieves product search results based on criteria.

- **Search Product Types**


- **Method**: `searchProductTypes()`
- **Description**: Fetches available product types in the catalog.

- **Get a SKU From the Catalog**


- **Method**: `getSkuDetails(sku)`
- **Parameters**:
- `sku`: The Stock Keeping Unit identifier for the product.
- **Description**: Retrieves details about a specific SKU.

- **Delete a Listings Item From the Catalog**


- **Method**: `deleteListing(sku)`
- **Parameters**:
- `sku`: Identifier of the SKU to delete.
- **Description**: Removes a specific listing from the catalog.

- **Submit a Listings Item**


- **Method**: `submitListing(listingData)`
- **Parameters**:
- `listingData`: Object containing the listing details to be submitted.
- **Description**: Creates or updates a listing item.

- **Partially Update a Listings Item**


- **Method**: `updateListing(sku, updateData)`
- **Parameters**:
- `sku`: Identifier of the SKU to update.
- `updateData`: Object with the fields to update.
- **Description**: Updates specified fields of a listing without modifying the
entire data set.

- **Get the Schema for a Product Type**


- **Method**: `getProductTypeSchema(productType)`
- **Parameters**:
- `productType`: The type of product for which to get the schema.
- **Description**: Retrieves the schema for a specified product type.

- **Get the Restrictions for Listing an Item**


- **Method**: `getListingRestrictions(productType)`
- **Parameters**:
- `productType`: The type of product to check.
- **Description**: Returns restrictions that apply to listings of the specified
product type.

### Code Example Snippets (Python)

For Python, Amazon provides code samples that include functions to interact with
the Listings Items API. Below is a basic outline for submitting a listing:

```python
import requests

# Example: Submit a Listings Item


def submit_listing(api_url, access_token, sku, listing_data):
headers = {
'Authorization': f'Bearer {access_token}',
'Content-Type': 'application/json'
}
response = requests.post(f"{api_url}/listings/{sku}", json=listing_data,
headers=headers)
return response.json()
```
### Important Notes

- **Authorization**: All requests must include an authorization token obtained


through the Selling Partner API's authorization workflow.

- **Rate Limits**: The API has specific rate limits; developers should implement
error handling for rate limit errors and retries.

- **Versioning**: Ensure you are using the correct version of the API (for example,
`Listings Items API v2021-08-01`) as it may affect the endpoint's availability and
functionality.

- **Documentation Links**: For additional details about specific API functions and
structures like request and response schemas, developers are encouraged to refer to
the respective API reference guides and use case documentation available on the SP-
API developer hub.

### Conclusion

The SP-API provides flexible options for managing product listings on Amazon. By
utilizing the Listings Items API, developers can build applications that help
sellers efficiently manage their offerings through streamlined integrations with
Amazon's backend systems. For complete implementation, reference the detailed
documentation and sample solutions provided by Amazon.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-seller-use-


cases:
# Summary of the Amazon Selling Partner API (SP-API) Seller Use Cases

## Overview

The Selling Partner API (SP-API) allows developers to interact with Amazon’s
platform to retrieve and post data related to seller activities. This is primarily
useful for managing product listings, inventory, orders, and tax compliance.

### Key Concepts

1. **Authorization**: Developers must authorize their applications to access SP-API


features.
2. **Data Management**: APIs facilitate various operations such as managing
listings, prices, orders, and tax reporting.
3. **Notifications**: Events that trigger specific data retrieval or processes,
such as changes in order status or inventory levels.

## API Use Cases with APIs, Notifications, and Reports

### 1. **Marketing Content Management**


- **APIs**: A+ Content, Catalog Items
- **Usage**: Adds enriched marketing content to product detail pages.

### 2. **Catalog Management**


- **APIs**:
- `Catalog Items`
- `Listings Items`
- `Listings Restrictions`
- `Product Type Definitions`
- **Notifications**: Changes in product types, listings, and feed processing.
- **Reports**: Various reports on merchant listings
(`GET_MERCHANT_LISTINGS_ALL_DATA`, etc.)

### 3. **Pricing, Fees, and Promotions**


- **APIs**:
- `Product Pricing`
- `Product Fees`
- `Listings Items`
- **Notifications**: Price and fee changes.
- **Reports**: Inventory and pricing reports.

### 4. **Inventory Management**


- **APIs**:
- `Listings Items`
- `Product Type Definitions`
- **Reports**: Detailed inventory reports.

### 5. **Order Fulfillment**


- **APIs**:
- `Merchant Fulfillment API`
- `FBA Inbound Eligibility API`
- `FBA Inventory API`
- **Usage**: Manage incoming and outgoing orders through various fulfillment
methods.

### 6. **Order Management**


- **APIs**: `Orders`
- **Notifications**: Changes in order status.
- **Reports**: Detailed order tracking reports.

### 7. **Tax Reporting and Compliance**


- **APIs**: N/A
- **Reports**: Various tax-related reports (e.g., `GET_ORDER_REPORT_DATA_TAX`).

### 8. **Fulfillment by Amazon (FBA)**


- **APIs**: `FBA Inbound Eligibility`, `FBA Inventory`
- **Usage**: Outsource order fulfillment to Amazon.

### 9. **Returns Management**


- **Reports**: Returns data by return date.

## Important Notes

- **API Rate Limits**: Ensure to understand the rate limits to avoid hitting the
maximum calls allowed per time frame.
- **Error Handling**: Developers should implement robust error handling for API
responses, especially for authorization errors and processing issues.
- **Data Security**: Maintain strict security around API credentials and sensitive
data.
- **Fees**: Be aware of potential fees when using certain APIs or when handling
specific operations.

## Code Examples

### Example: Making an API Call to Retrieve Listings Data


```python
import requests
# API endpoint
url = "https://sellingpartner-api.amazon.com/listings/v2021-08-01/your-endpoint"

# Set headers
headers = {
"Authorization": "Bearer <ACCESS_TOKEN>",
"Content-Type": "application/json",
"x-amz-access-token": "<ACCESS_TOKEN>"
}

# Perform the request


response = requests.get(url, headers=headers)

# Check response
if response.status_code == 200:
listings_data = response.json()
print(listings_data)
else:
print(f"Error: {response.status_code}, {response.text}")
```

### Essential Classes/Methods


- **Authorization Methods**: Involves using OAuth for authorization tokens.
- **Response Handling**: Always check and handle the status code of the API
responses.

This concise summary provides the core concepts and usages of the SP-API, enabling
developers to effectively utilize Amazon's Selling Partner API for their
applications.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-seller-use-


cases#overview:
### Amazon Selling Partner API (SP-API) Seller Use Cases Summary

#### Overview
The Selling Partner API (SP-API) allows developers to access Amazon’s selling
partner data and manage their accounts programmatically. This includes gathering
data from customers and posting data to their selling accounts through various
APIs.

### Important APIs for Common Use Cases

1. **Marketing Content Management**


- **APIs**:
- A+ Content
- Catalog Items
- **Usage**: Add rich marketing content to product detail pages.

2. **Catalog Management**
- **APIs**:
- `Catalog Items`
- `Listings Items`
- `Listings Restrictions`
- `Product Type Definitions`
- **Notifications**:
- `ITEM_PRODUCT_TYPE_CHANGE`
- `LISTINGS_ITEM_MFN_QUANTITY_CHANGE`
- `REPORT_PROCESSING_FINISHED`
- **Reports**:
- Inventory Reports such as `GET_MERCHANT_LISTINGS_ALL_DATA` offer
comprehensive insights.

3. **Pricing, Fees, and Promotions**


- **APIs**:
- `Product Pricing`
- `Product Fees`
- **Notifications**:
- `PRICING_HEALTH`
- **Reports**:
- `GET_REFERRAL_FEE_PREVIEW_REPORT` for previewing referral fees.

4. **Inventory Management**
- **APIs**:
- `Listings Items`
- **Notifications**:
- `REPORT_PROCESSING_FINISHED`
- **Reports**:
- `GET_FLAT_FILE_OPEN_LISTINGS_DATA` to get detailed listing data.

5. **Order Fulfillment**
- **APIs**:
- `Merchant Fulfillment API`
- `FBA Inbound Eligibility API`
- `FBA Inventory API`
- **Notifications**:
- `ORDER_CHANGE`
- **Reports**:
- Inventory-related reports for tracking fulfillment status.

6. **Order Management**
- **APIs**:
- `Orders`
- **Notifications**:
- `ORDER_STATUS_CHANGE`
- **Reports**:
- `GET_FLAT_FILE_ALL_ORDERS_DATA_BY_LAST_UPDATE_GENERAL`.

7. **Tax Reporting**
- **Reports**:
- `GET_ORDER_REPORT_DATA_TAX` for tax compliance.

8. **Fulfillment By Amazon (FBA)**


- **APIs**:
- `FBA Inventory`, `FBA Inbound Eligibility`
- **Reports**:
- Reports related to fulfillment by Amazon for comprehensive insights.

9. **Seller Fulfillment**
- **APIs**:
- `Shipping`
- **Notifications**:
- `REPORT_PROCESSING_FINISHED`

### Key Concepts


- **API Responses**: Responses should include standard fields as per Amazon's API
contract, documentation on which is available under the API Reference section.
- **Rate Limits**: When using SP-API, be aware of usage plans and rate limits
specific to each API to avoid throttling.
- **Notifications**: Utilize notifications to trigger actions based on specific
events like `ORDER_CHANGE` that allow for proactive management of selling partner
integrations.

### Notes & Caveats

- **Python SDK**: For Python developers, utilize the Python SDK for simplified
management of API interactions and ensure to download the relevant Python libraries
for software development.
- **Error Handling**: Implement robust error handling according to the SP-API
Errors FAQ to manage potential issues effectively.
- **Data Compliance**: Ensure compliance with Amazon's data protection policies and
acceptable use policy while developing applications using SP-API.
- **Real-time Updates**: Leverage notification capabilities to stay updated with
changes to inventory, prices, and orders rather than relying solely on batch
updates.

### Example API Snippets

```python
# Example Python snippet for retrieving merchant listings data

import requests

def get_merchant_listings_data(api_endpoint, merchant_id, access_token):


headers = {
'Authorization': 'Bearer ' + access_token,
'Content-Type': 'application/json'
}
response = requests.get(f"{api_endpoint}/merchant-listings/{merchant_id}",
headers=headers)
return response.json()
```

### Conclusion

The SP-API provides a powerful suite of tools for managing selling partner accounts
on Amazon. Understanding the APIs, notifications, and reports available, alongside
key concepts and best practices, is crucial for successful integration and
application development. For additional information, reference the [SP-API
Documentation](https://developer-docs.amazon.com/sp-api/docs/sp-api-seller-use-
cases#overview).
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-seller-use-


cases#catalog-management:
### Amazon Selling Partner API (SP-API) Documentation Summary

#### Overview
The Selling Partner API (SP-API) provides a suite of APIs designed to enable Amazon
sellers to manage their businesses on Amazon accurately and effectively. It allows
the retrieval of customer data and posting data to the seller's account.
#### Key Use Cases
The documentation primarily covers:
- **Catalog Management**: Tools to manage product listings and optimize the product
catalog.
- **Pricing, Fees, and Promotions**: Tools to help sellers stay competitive with
automated pricing.
- **Inventory Management**: Automate management and synchronization across systems.
- **Order Fulfillment**: Fulfill orders efficiently via Amazon and external
channels.
- **Tax Reporting**: File taxes and manage VAT invoicing.
- **Fulfillment by Amazon (FBA)**: Outsourced order fulfillment.
- **Returns Management**: Manage and process returns effectively.

---

### APIs and Notifications

#### Catalog Management APIs


- **APIs**:
- `Catalog Items API` - Manage items in the seller's catalog.
- `Listings Items API` - Manage listings of items.
- `Listings Restrictions API` - Understand product listing restrictions.
- `Product Type Definitions API` - Define product types.

- **Notifications (Events)**:
- `ITEM_PRODUCT_TYPE_CHANGE`
- `LISTINGS_ITEM_MFN_QUANTITY_CHANGE`
- `LISTINGS_ITEM_STATUS_CHANGE`
- `LISTINGS_ITEM_ISSUES_CHANGE`
- Other notifications related to processing reports.

#### Pricing, Fees, and Promotions APIs


- **APIs**:
- `Product Pricing API` - Automate pricing adjustments.
- `Product Fees API` - Retrieve fee details.

- **Notifications (Events)**:
- `PRICING_HEALTH`
- `FEE_PROMOTION`
- `ANY_OFFER_CHANGED`

#### Examples of Common API Requests


**1. Fetch Catalog Items**
```python
import requests

url = "https://sellingpartnerapi-na.amazon.com/catalog/2022-04-01/items"
headers = {
"Authorization": "Bearer {token}",
"x-amz-access-token": "{access_token}",
"x-amz-date": "{date}",
"Content-Type": "application/json"
}

response = requests.get(url, headers=headers)


print(response.json())
```
**Fields**:
- `id` - Unique identifier for the item.
- `title` - Title of the item.
- `asin` - Amazon Standard Identification Number.

---

### Key Concepts and Usage

#### Important Classes and Methods


- **Authorization**: SP-API uses OAuth 2.0 for authorization. Ensure that your
application is authorized to access seller data.
- **Rate Limits**: Each API has usage limits. Monitor requests to avoid throttling.
- **Error Handling**: Handle errors gracefully by implementing retry logic and
logging error messages returned from the API.

#### Usage Example for Handling Notifications


To subscribe to an event:
```python
subscription_data = {
"resource": "UPDATE",
"eventType": "LISTINGS_ITEM_STATUS_CHANGE",
...
}
```

---

### Important Notes and Caveats


- **Registration**: Sellers need to register as either public or private SP-API
developers to access the API.
- **Data Management**: Adhere to Amazon's data handling and privacy policies.
- **Latency**: Be aware that certain operations may exhibit latency due to
processing times in the background.

#### Resources
1. **SDKs**: Familiarize yourself with available SDKs for various programming
languages (e.g., Python, Java) to simplify integration.
2. **Best Practices**: Always refer to the best practices section in the
documentation for optimal API usage. This includes topics like error handling and
rate limit management.

---

This summary maintains crucial information relevant to developers integrating the


Amazon SP-API into their applications, focusing on core functionalities and usage
patterns without unnecessary clutter.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-seller-use-


cases#marketing-content-management:
### Summary of Amazon Selling Partner API (SP-API) Marketing Content Management

#### Overview
The Selling Partner API (SP-API) facilitates the integration and management of data
associated with selling partners on Amazon, enabling developers to gather and post
data efficiently.
#### Important APIs for Use Cases
1. **A+ Content API**
- **Purpose**: Allows adding rich marketing content to product detail pages on
Amazon.
- **Usage**:
- Typically used to enhance product storytelling and brand visibility.

2. **Catalog Management APIs**


- **Key APIs**:
- **Catalog Items**
- **Listings Items**
- **Listings Restrictions**
- **Product Type Definitions**
- **Events/Notifications**:
- ITEM_PRODUCT_TYPE_CHANGE
- LISTINGS_ITEM_MFN_QUANTITY_CHANGE
- LISTINGS_ITEM_STATUS_CHANGE

3. **Pricing, Fees, and Promotions APIs**


- **Key APIs**:
- **Product Pricing**
- **Product Fees**
- **Product Type Definitions**
- **Events/Notifications**:
- PRICING_HEALTH
- FEE_PROMOTION
- ANY_OFFER_CHANGED

4. **Inventory Management APIs**


- **Key API**:
- **Listings Items**
- **Events/Notifications**:
- REPORT_PROCESSING_FINISHED

5. **Order Management APIs**


- **Key API**:
- **Orders**
- **Events/Notifications**:
- REPORT_PROCESSING_FINISHED
- ORDER_STATUS_CHANGE

6. **Tax Reporting and Compliance APIs**


- **Purpose**: Assist in filing taxes and complying with EU regulations,
including VAT invoicing and Goods and Services Tax (GST).
- **Reports**:
- GET_ORDER_REPORT_DATA_TAX
- GET_FLAT_FILE_VAT_INVOICE_DATA_REPORT

#### Code Examples and API Snippets


- **A+ Content API Usage Example**:
```python
import requests

def get_aplus_content(api_url, headers):


response = requests.get(f"{api_url}/aplus/content", headers=headers)
if response.status_code == 200:
return response.json()
else:
return None
```

#### Key Concepts


- **API Integration**: Utilize RESTful API calls to interact with Amazon's SP-API
for product and content management.
- **Notification Events**: Use event-driven programming to respond to inventory and
listing changes.
- **Data Management**: Understand JSON schema to manage and format data when making
API calls or processing responses.

#### Important Notes


- **Rate Limits**: Be aware of the usage limits to avoid throttling or temporary
bans.
- **Data Consistency**: Ensure that data across your systems and the SP-API remains
synchronized to maintain operational integrity.
- **Authorization**: All API calls require appropriate authentication and
authorization through AWS.

This summary encapsulates the critical APIs and their usage for developers looking
to integrate with the Amazon Selling Partner API effectively, with a focus on
marketing content management.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-seller-use-


cases#pricing-fees-and-promotions:
# Summary of SP-API Seller Use Cases Documentation

## API Use Cases Overview


The Amazon Selling Partner API (SP-API) enables sellers to gather data and post
information to their selling accounts through various functionalities. Key use
cases are categorized below:

### 1. Marketing Content Management


- **API**:
- **A+ Content**: Used to add rich marketing content to product detail pages.
- **Catalog Items**

### 2. Catalog Management


- **APIs**:
- **Catalog Items**
- **Listings Items**
- **Listings Restrictions**
- **Product Type Definitions**
- **Notifications (Events)**:
- ITEM_PRODUCT_TYPE_CHANGE
- LISTINGS_ITEM_STATUS_CHANGE
- REPORT_PROCESSING_FINISHED

### 3. Pricing, Fees, and Promotions


- **APIs**:
- **Product Pricing**
- **Product Fees**
- **Listings Items**
- **Notifications (Events)**:
- ANY_OFFER_CHANGED
- FEE_PROMOTION
### 4. Inventory Management
- **APIs**:
- **Listings Items**
- **Product Type Definitions**
- **Notifications (Events)**:
- REPORT_PROCESSING_FINISHED

### 5. Order Management and Fulfillment


- **APIs**:
- **Orders**
- **Merchant Fulfillment API v0**
- **Fulfillment Outbound API**
- **Reports**:
- Order Tracking Reports
- GET_FLAT_FILE_ALL_ORDERS_DATA_BY_LAST_UPDATE_GENERAL

### 6. Tax Reporting


- Reports related to sales tax, VAT invoicing, and compliance are available for
various jurisdictions.

## Code Examples & API Snippets


### 1. Retrieve Listings
```python
def get_listings(api_client):
response = api_client.get('/listings')
return response
```
**Fields**: This API typically returns listings, including SKU, title, and price.

### 2. Update Pricing


```python
def update_pricing(api_client, sku_id, new_price):
body = {
"sku": sku_id,
"price": new_price
}
response = api_client.put('/pricing', json=body)
return response
```
**Parameters**: `sku_id` - The SKU of the product; `new_price` - The new price to
set.

## Key Classes, Functions, and Methods


- **API Client**: Central object for making requests to the SP-API.
- **Methods**:
- `get(path)`: Retrieves data from specified API endpoint.
- `put(path, json)`: Updates data at the specified API endpoint.

## Important Concepts
- **Pagination**: Many of the API responses are paginated. Use pagination tokens to
access subsequent pages of data.
- **Rate Limits**: Be aware of rate limits imposed on API calls to avoid
throttling.
- **Data Consistency**: Ensure that updates to listings or orders respect the
eventual consistency model of the API.

## Important Notes and Caveats


- **Versioning**: APIs are versioned. Always check if the version in use meets your
use case requirements.
- **Event Types**: Be familiar with specific event types that trigger notifications
to handle updates in real-time.
- **Security**: Implement OAuth 2.0 for authorization when accessing protected
endpoints in SP-API.

This summary provides essential API use cases, example code snippets, key methods,
and important considerations for developers utilizing the Amazon Selling Partner
API. Be sure to refer to the complete documentation for intricate details and
advanced usage scenarios.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-seller-use-


cases#inventory-management:
# Summary of Amazon Selling Partner APIs (SP-API) for Inventory Management

## Overview
The Amazon Selling Partner API (SP-API) is designed to help developers
programmatically gather data from Amazon seller accounts as well as post data to
maintain sales activities. This documentation focuses specifically on the
functionalities related to inventory management.

## Code Examples and API Snippets


### Important API Structures
**APIs related to Inventory Management:**
- **Listings Items API**
- **Functionality:** Manage inventory listings, including updates for product
quantities and status.
- **Example Endpoint:** `GET /listings/v2021-08-01/items`
- **Fields:**
- `sku` (String, required): The seller's SKU for the item.
- `marketplaceId` (String, required): The target marketplace for the SKU.

- **Product Type Definitions API**


- **Functionality:** Retrieve definitions for different product types.
- **Example Endpoint:** `GET /catalog/v2020-09-01/productTypeDefinitions`
- **Fields:**
- `marketplaceId` (String, required): The marketplace to retrieve product type
definitions for.

### Key Classes/Functions/Methods


- **Inventory Management Functions:**
- **Get Merchant Listings Data**
- Allows retrieval of all products in the seller’s inventory.
- Use reported inventory for analytics and reporting.

- **Update Inventory Quantity**


- Enables the seller to update the quantity of a specific product.
- Important for keeping inventory levels accurate with real-time data.

## Key Concepts
- **Notifications:**
The SP-API supports Notifications (Events) that inform sellers of changes in
inventory, such as:
- `LISTINGS_ITEM_MFN_QUANTITY_CHANGE`: Notifies when there's a change in the
quantity of an item offered via Merchant Fulfilled Network.
- `REPORT_PROCESSING_FINISHED`: Indicates completion of any requests that may
have included report generation.
- **Reports:**
Several reports are available for inventory management:
- **Inventory Reports:**
- Examples:
- `GET_MERCHANT_LISTINGS_ALL_DATA`
- `GET_MERCHANT_LISTINGS_INACTIVE_DATA`
- Use cases include checking for inactive listings or monitoring overall
inventory status.

## Important Notes and Caveats


- **API Rate Limits:**
The SP-API has defined rate limits for API calls and operations. It is crucial to
adhere to these limits to avoid throttling or service disruption.

- **Authorization:**
Proper authorization is required before accessing or manipulating data via the
SP-API. Ensure that OAuth applications are registered and configured with the
necessary permissions.

- **Error Handling:**
It is important to implement error handling to capture and manage API errors
effectively. Common issues might include:
- `400 Errors`: Typically signifying that the request was malformed.
- `Authorization Errors`: Indicating issues with the provided credentials.

- **Compliance:**
Ensure that any data management and inventory practices comply with Amazon's
policies and legal requirements, especially concerning tax laws and product
representation.

This summary provides essential information for utilizing the Amazon Selling
Partner API specifically for inventory management, focusing on API structure, key
functions, key concepts, and important limitations developers should be aware of.
For further details, reference the official Amazon SP-API documentation.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-seller-use-


cases#order-fulfillment:
# Summary of Amazon Selling Partner API (SP-API) Seller Use Cases

## Overview of SP-API for Sellers


The Selling Partner API (SP-API) enables developers to integrate with Amazon's
selling partner services. It assists in gathering data and posting information to
the customer's selling account, which can enhance order fulfillment, inventory
management, and other seller activities.

### Key APIs and Use Cases


1. **Catalog Management**:
- **APIs**: Catalog Items, Listings Items, Listings Restrictions, Product Type
Definitions.
- **Notifications**: Various item changes such as `ITEM_PRODUCT_TYPE_CHANGE` and
`LISTINGS_ITEM_STATUS_CHANGE`.
- **Reports**: Multiple merchant listing and inventory reports.

2. **Order Fulfillment**:
- **APIs**: Merchant Fulfillment, FBA Inventory, Easy Ship.
- **Usage**: Fulfill Amazon orders using any of the available fulfillment
methods (FBA, Merchant Fulfillment, etc.).

3. **Order Management**:
- **APIs**: Orders API.
- **Reports**: Comprehensive order tracking and management reports.
- **Notifications**: Includes `ORDER_STATUS_CHANGE` and `ORDER_CHANGE`.

4. **Inventory Management**:
- **APIs**: Listings Items, Product Type Definitions.
- **Reports**: Various inventory reports specific to merchant listings and
fulfillment statuses.

5. **Pricing, Fees, and Promotions**:


- **APIs**: Product Pricing, Product Fees.
- **Reports**: Monitoring pricing health and fee-related reports.

### Important Classes and Functions


- **Inventory APIs**: Manage stock levels and fulfillment settings across various
inventory types.
- **Order APIs**: Streamline order retrieval and management, ensuring accurate
tracking and reporting of sales data.
- **Product APIs**: Define and manage product attributes across the Amazon
marketplace.

### Key Concepts


- **Notifications**: Real-time event notifications facilitate updates on various
processes, including order status, inventory changes, and pricing adjustments.
- **Reports**: A suite of report APIs provide crucial data classes that help you
analyze sales performance, inventory health, and order metrics.
- **Authorization**: Understand the authorization architecture for securely
accessing the API, ensuring compliance with Amazon’s policies.

### Important Notes and Caveats


- **Rate Limits**: Be aware of the API's usage limits to avoid disruptions. Rate
limits can vary per API and resource type.
- **Compliance**: Ensure compliance with Amazon's policies and guidelines regarding
data handling and API usage.
- **Integration Complexity**: Given the extensive nature of SP-API, developers
should be familiar with RESTful API practices, OAuth 2.0 for authorization, and
JSON for data exchanges.

## Sample API Usage


### Example: Fetch Listings Data
```python
# Sample Python code to retrieve merchant listings data
import requests

def get_merchant_listings(access_token, marketplace_id):


endpoint =
f"https://sellingpartnerapi-na.amazon.com/listings/{marketplace_id}/listings"
headers = {
"Authorization": f"Bearer {access_token}",
"Content-Type": "application/json",
}

response = requests.get(endpoint, headers=headers)


return response.json()
```
### Example: Order Status Update Notification
```json
{
"type": "ORDER_CHANGE",
"payload": {
"orderId": "123-4567890-1234567",
"status": "Shipped"
}
}
```

## Conclusion
The Amazon Selling Partner API is an essential tool for sellers looking to automate
task processes and optimize their selling performance. Understanding the use cases,
key APIs, and compliance considerations is necessary for effective implementation.
The provided Python examples offer a starting point for utilizing the API.

For detailed information on specific APIs, refer to the Amazon API documentation
and developer resources.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-seller-use-


cases#order-management:
### Amazon Selling Partner API (SP-API) Overview

The Amazon Selling Partner API (SP-API) enables selling partners to automate
various aspects of their selling activities on Amazon. The focus of this
documentation is on the order management use case, which allows developers to
retrieve data related to orders and post updates to the selling partner's account
via APIs.

#### Key Concepts

1. **API Structure**: The SP-API is organized around different functional areas


such as Order Management, Inventory Management, and Pricing. Each area includes
specific APIs, notifications, and relevant reports.

2. **Authentication**: To use the SP-API, you must authenticate using the LWA
(Login with Amazon) credentials and manage permissions for each API.

3. **Notifications**: The API utilizes a notification system to inform external


systems about changes in order statuses, inventory updates, etc.

4. **Reports**: Various report types are available to summarize data over specific
timeframes, such as order reports and inventory reports.

#### Important APIs for Order Management

- **Orders API**: Retrieve order data, manage order status, and process order
changes.

- **Reference**: `Orders API v0`


- **Common Methods**:
- `GET /orders/v0/orders` - Retrieve a list of orders based on filters.
- `GET /orders/v0/orders/{orderId}` - Retrieve details for a specific order.
- **Usage Example**:
```python
import requests

# Fetch orders
response =
requests.get("https://sellingpartnerapi-na.amazon.com/orders/v0/orders",
headers={"Authorization": "Bearer YOUR_ACCESS_TOKEN"})
orders = response.json()
```

#### Common Notifications for Orders

- **ORDER_STATUS_CHANGE**: Notifies when the status of an order changes.


- **ORDER_CHANGE**: Provides updates when order details change.

#### Reports for Orders

- **Order Tracking Reports**:


- `GET_FLAT_FILE_ALL_ORDERS_DATA_BY_LAST_UPDATE_GENERAL` - Returns order data
filtered by the last update time.
- `GET_XML_ALL_ORDERS_DATA_BY_ORDER_DATE_GENERAL` - XML formatted order data
filtered by order date.

#### Important Classes and Methods

- **Authentication Class**: Responsible for handling authorization tokens. Use the


`Authorize` method to obtain an LWA access token.

- **HTTP Client Class**: Contains methods for making API calls. Common methods
include:
- `GET(url)`: For fetching data.
- `POST(url, data)`: For posting data to the API.

#### Notes and Caveats

- **Rate Limits**: Be aware of the API call limits to avoid excessive requests
leading to throttling.

- **Data Encoding**: Ensure correct encoding of URLs and payloads to avoid errors
such as 400 Bad Request.

- **Error Handling**: Implement proper error handling for API responses, and refer
to the SP-API Errors FAQ for common issues.

- **Sandbox Environment**: Utilize the SP-API Sandbox for testing API calls before
moving to production, ensuring your implementation is correct without affecting
live data.

### Conclusion

Utilizing Amazon's SP-API can enhance order management efficiency for selling
partners. Developers should familiarize themselves with the structure,
authentication methods, available APIs, notifications, and reporting tools to
leverage the full capabilities of the SP-API effectively. Always check for the
latest documentation updates and best practices to stay compliant with Amazon's
development guidelines.
_____________________________
Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-seller-use-
cases#tax-reporting:
### Amazon Selling Partner API (SP-API) - Tax Reporting Use Cases

#### Overview
The Amazon Selling Partner API (SP-API) provides various endpoints and
functionalities that allow sellers to access and manage data related to their
selling accounts, including tax reporting.

### Key API Endpoints for Tax Reporting

1. **Order Reports**
- **GET_ORDER_REPORT_DATA_TAX**
- **GET_FLAT_FILE_ORDER_REPORT_DATA_TAX**
- **GET_AMAZON_FULFILLED_SHIPMENTS_DATA_TAX**
- **GET_FLAT_FILE_SALES_TAX_DATA**

2. **VAT Invoicing**
- **GET_ORDER_REPORT_DATA_INVOICING**
- **GET_FLAT_FILE_ORDER_REPORT_DATA_INVOICING**
- **GET_AMAZON_FULFILLED_SHIPMENTS_DATA_INVOICING**
- **GET_FLAT_FILE_VAT_INVOICE_DATA_REPORT**
- **GET_XML_VAT_INVOICE_DATA_REPORT**
- **GET_VAT_TRANSACTION_DATA**

3. **FBA Invoicing** (Brazil only)


- **Shipment Invoicing (BR only)** – Used to automatically retrieve shipment
invoice information for Fulfillment by Amazon (FBA) orders.

4. **Goods and Services Tax (GST)**


- **GET_GST_MTR_B2B_CUSTOM**
- **GET_GST_MTR_B2C_CUSTOM**
- **GET_GST_STR_ADHOC**

### Important Concepts

- **Tax Remittance**: This functionality helps sellers calculate and remit sales
taxes as per regulations.
- **VAT Invoicing**: Allows sellers to generate tax invoices in compliance with EU
tax regulations.
- **FBA Invoicing**: Enables sellers to handle FBA orders and retrieve shipping
invoice information specifically for the Brazilian marketplace.
- **GST Reporting**: Directly related to the indirect tax system in India, this
provides a way to manage GST obligations.

### Notifications
- Some reports trigger processing notifications which can be tracked:
- **REPORT_PROCESSING_FINISHED**
- **FEED_PROCESSING_FINISHED**

### Important Notes


- Ensure that you have the necessary permissions and roles assigned to access these
APIs.
- The use of the APIs for tax reporting may vary by region, especially for VAT and
GST related functionalities.
- Pay attention to the report data formats (flat file or XML) when integrating the
APIs into your applications.
### Code Examples

While specific code snippets were not detailed in the content provided, the API can
be accessed using libraries such as the Python SDK. Below is a simplified example:

```python
import requests

# Assume TOKEN is your authentication token


TOKEN = "Bearer YOUR_ACCESS_TOKEN"
BASE_URL = "https://sellingpartnerapi-na.amazon.com"

# Fetching Order Tax Report


headers = {
'Authorization': TOKEN,
'Content-Type': 'application/json',
}

response = requests.get(f"{BASE_URL}/reports/orders/reportId", headers=headers)

if response.status_code == 200:
print("Order Tax Report data:", response.json())
else:
print("Failed to fetch data:", response.status_code, response.text)
```

### Conclusion
This summary encapsulates essential API endpoints and concepts for managing tax
reporting through the Amazon SP-API. Developers should ensure they are well-
acquainted with the associated permissions, notification systems, and appropriate
request formats while integrating these functionalities into their applications.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-seller-use-


cases#fba-invoicing:
# Amazon Selling Partner API (SP-API) Summary

## Overview
The Selling Partner API (SP-API) provides a collection of APIs that help developers
integrate with Amazon’s seller services. This allows for the retrieval and posting
of data related to selling partners' accounts, inventory management, order
fulfillment, and financial reporting.

## Important APIs and Use Cases

### Catalog Management


- **APIs**:
- **Catalog Items**: Used to manage product listings.
- **Listings Items**: For updating and querying listing information.
- **Product Type Definitions**: To access different product types.

- **Notifications**:
- `ITEM_PRODUCT_TYPE_CHANGE`
- `LISTINGS_ITEM_MFN_QUANTITY_CHANGE`
- `PRODUCT_TYPE_DEFINITIONS_CHANGE`
### Inventory Management
- **APIs**:
- **Listings Items**
- **Product Type Definitions**

- **Reports**:
- Various inventory reports to track listings and stock.

### Order Management


- **APIs**:
- **Orders**: To automate order management.

- **Notifications**:
- `ORDER_STATUS_CHANGE`
- `ORDER_CHANGE`

- **Reports**:
- Includes detailed order reports for order tracking.

### VAT Invoicing


- **APIs**:
- Not specified in the documentation.

- **Notifications**:
- `REPORT_PROCESSING_FINISHED`
- `FEED_PROCESSING_FINISHED`

- **Reports**:
- `GET_ORDER_REPORT_DATA_INVOICING`
- `GET_VAT_TRANSACTION_DATA`

### FBA Invoicing


- **APIs**:
- **Shipment Invoicing (BR only)**: Retrieve shipment invoice information
specific to the Brazilian marketplace for FBA orders.

### Key Concepts


- **Notifications**: Certain events trigger notifications which help in keeping the
systems in sync (e.g., product listings changes, order updates).
- **Reports**: Various reports can be generated to track performance metrics,
sales, and inventory, which assist in decision making.

### Usage Notes


- Ensure to follow the relevant notification events to stay informed about changes
within your seller account.
- Regularly check report processing completion to gather accurate data.
- When automating selling tasks, utilize the specific APIs for each module
(Inventory, Order Management, etc.) for better efficiency.

## Code Snippets and API Usage (Python Example)


Below is a general structure on how to connect to SP-API using Python (this is a
conceptual example).

### Authentication
```python
import requests

def authenticate():
url = 'https://sellingpartnerapi-na.amazon.com/auth/o2/token'
headers = {'Content-Type': 'application/json'}
data = {
'grant_type': 'refresh_token',
'refresh_token': 'YOUR_REFRESH_TOKEN',
'client_id': 'YOUR_CLIENT_ID',
'client_secret': 'YOUR_CLIENT_SECRET'
}

response = requests.post(url, headers=headers, json=data)


return response.json() # Returns access token
```

### Accessing Catalog Items


```python
def get_catalog_items(access_token):
url = 'https://sellingpartnerapi-na.amazon.com/catalog/v0/items'
headers = {
'Authorization': f'Bearer {access_token}',
'Content-Type': 'application/json',
'x-amz-access-token': access_token
}

response = requests.get(url, headers=headers)


return response.json() # Returns catalog items
```

### Important Classes and Functions


- **SPAPI**: Core class to manage API calls and authentication.
- **ListingAPI**: Interfaces with product listings.
- **InventoryAPI**: Manages inventory tracking.

## Important Notes
- Always handle errors and exceptions during API calls, as rate limits and other
API-specific restrictions may commonly occur.
- Be aware of the different authorization methods required for accessing various
API endpoints.
- Ensure compliance with all Amazon data protection policies when using the API.

This summary provides essential information needed for developers to get started
with the Amazon Selling Partner API, specifically for Python implementations.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-seller-use-


cases#returns-management:
### Summary of Amazon SP-API Seller Use Cases

#### Overview
The Selling Partner API (SP-API) provides a way for users to interact with Amazon's
system and manage their selling partners' accounts through various APIs,
notifications, and reports. This summary focuses on essential use cases relevant to
managing returns, inventory, orders, and finance.

---

### Key APIs and Use Cases

#### Returns Management


- **APIs:**
- **N/A**

- **Notifications (Events):**
- **REPORT_PROCESSING_FINISHED**

- **Reports:**
- `GET_XML_RETURNS_DATA_BY_RETURN_DATE`
- `GET_FLAT_FILE_RETURNS_DATA_BY_RETURN_DATE`
- `GET_XML_MFN_PRIME_RETURNS_REPORT`
- `GET_CSV_MFN_PRIME_RETURNS_REPORT`
- `GET_XML_MFN_SKU_RETURN_ATTRIBUTES_REPORT`
- `GET_FLAT_FILE_MFN_SKU_RETURN_ATTRIBUTES_REPORT`

**Description:** Used to get return request information for both Prime and non-
Prime orders, including attributes by SKU.

#### Inventory Management


- **APIs:**
- `Listings Items`
- `Product Type Definitions`

- **Notifications (Events):**
- **REPORT_PROCESSING_FINISHED**
- **LISTINGS_ITEM_MFN_QUANTITY_CHANGE**

- **Reports:**
- `GET_FLAT_FILE_OPEN_LISTINGS_DATA`
- `GET_MERCHANT_LISTINGS_ALL_DATA`
- `GET_MERCHANT_LISTINGS_DATA`
- `GET_MERCHANT_LISTINGS_INACTIVE_DATA`
- `GET_MERCHANT_CANCELLED_LISTINGS_DATA`
- `GET_PAN_EU_OFFER_STATUS`

**Description:** Automates Amazon inventory management and synchronizes inventory


levels across systems.

#### Order Fulfillment


- **APIs:**
- `Merchant Fulfillment API v0`
- `FBA Inbound Eligibility API v1`
- `FBA Inventory API v1`

- **Reports:**
- `GET_AMAZON_FULFILLED_SHIPMENTS_DATA_GENERAL`
- `GET_FLAT_FILE_ALL_ORDERS_DATA_BY_LAST_UPDATE_GENERAL`

**Description:** Fulfill orders through Amazon's or your own fulfillment options.

---

### Important Methods and Usage


- **GET Operations:** Commonly used to retrieve data related to inventory, returns,
orders, and reports.

- **Notifications:** Utilize event notifications to trigger actions within


applications based on changes in inventory levels, order statuses, etc.

---
### Key Concepts

1. **API Endpoints:** URLs that provide access to specific data or services related
to selling partner operations.

2. **Notification Events:** Automated alerts that inform developers of changes or


updates, which can affect database states or trigger processes within applications.

3. **Reports:** Predefined datasets that deliver crucial information for business


insights and operational management.

---

### Important Notes


- **Authorization:** Ensure that applications are correctly authorized to access
the required APIs.

- **Rate Limits:** Be aware of API rate limits to avoid throttling before


developing your application to manage inventory or orders.

- **Contract Types:** Each API may have various contract fields that determine
input and output data, so review the API documentation before implementation.

---

This summary aims to equip developers with foundational knowledge and essential
details to effectively utilize the Amazon SP-API for managing selling partner
accounts. Familiarize yourself with the API's functions and best practices for
seamless integration. For Python SDK integration, refer to specific tutorials
highlighted in the full documentation.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-seller-use-


cases#multi-channel-fulfillment:
### Summary of Amazon SP-API Seller Use Cases Documentation

---

#### Overview

The Amazon Selling Partner API (SP-API) provides developers with a framework to
interact with Amazon's selling partner platform programmatically. The SP-API
facilitates the retrieval and posting of data related to selling partners, which
includes catalog management, order fulfillment, pricing, inventory management, and
more.

---

### Key Concepts

1. **APIs**: SP-API consists of various APIs handling different functionalities:


- **Catalog Management APIs**: Used to manage product listings and
categorization.
- **Order Management APIs**: Automates order processing and retrieval.
- **Fulfillment APIs**: Manage shipping and inventory processes.
- **Finance APIs**: Used for tracking transactions, tax compliance, and
generating reports.

2. **Notifications**: Certain APIs utilize an event-driven model where


notifications are sent regarding changes (e.g., order status changes, inventory
updates).

3. **Reports**: SP-API allows querying of various reports to provide insights on


sales, inventory, orders, and finances.

---

### Important APIs and Their Usage

#### 1. **Catalog Management**


- **APIs**:
- `Catalog Items`
- `Listings Items`
- `Listings Restrictions`
- `Product Type Definitions`
- **Notifications**:
- `ITEM_PRODUCT_TYPE_CHANGE`
- `LISTINGS_ITEM_MFN_QUANTITY_CHANGE`
- **Example**:
```python
# Example: Listing an item
response = catalog_api.list_items(
marketplace_id='ATVPDKIKX0DER',
seller_id='your_seller_id'
)
print(response)
```

#### 2. **Order Management**


- **APIs**:
- `Orders API`
- **Notifications**:
- `ORDER_STATUS_CHANGE`
- **Reports**:
- `GET_FLAT_FILE_ALL_ORDERS_DATA_BY_LAST_UPDATE_GENERAL`
- **Example**:
```python
# Example: Retrieve all orders
response = orders_api.get_orders(
marketplace_ids=['ATVPDKIKX0DER'],
created_after='2023-01-01T00:00:00Z'
)
print(response)
```

#### 3. **Inventory Management**


- **APIs**:
- `Listings Items`
- `Product Type Definitions`
- **Example**:
```python
# Example: Get inventory
response = inventory_api.get_inventory_summary(
seller_id='your_seller_id'
)
print(response)
```

#### 4. **Fulfillment Management**


- **APIs**:
- `Fulfillment Inbound`
- `Fulfillment Outbound`
- **Example**:
```python
# Example: Create a fulfillment order
response = fulfillment_api.create_fulfillment_order(
marketplace_id='ATVPDKIKX0DER',
seller_id='your_seller_id',
items=[{'sku': 'item-sku', 'quantity': 2}]
)
print(response)
```

---

### Important Notes

- Ensure to handle **authorization** correctly using OAuth, as the SP-API requires


valid access tokens.
- Rate limits apply to each API. Monitor usage to avoid throttling.
- Notifications and events provide a real-time way to listen for changes to
resources.
- When working with reports, make sure to verify completion before attempting to
pull data for accuracy.
- Beware of **limit resets**: check the documentation for specific quotas per API.

---

### Conclusion

The Amazon SP-API offers robust endpoints for sellers looking to automate their
operations on the Amazon platform. Utilizing these APIs effectively requires a
solid understanding of the catalog, order management, inventory, and fulfillment
processes emphasized throughout the documentation. Developers must also be mindful
of security, rate limits, and system integration best practices.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-seller-use-


cases#seller-fulfillment:
# Summary of Amazon Selling Partner API (SP-API) Seller Use Cases

## Overview
The Selling Partner API (SP-API) facilitates the integration of Amazon services for
sellers. This documentation outlines the APIs relevant for managing data,
fulfilling orders, handling tax reporting, and performing various seller
operations.

### Key Use Cases:


- **Marketing Content Management**: Enhance product pages with rich content.
- **Catalog Management**: Optimize listings, manage inventory, and track changes.
- **Pricing, Fees, and Promotions**: Automate product pricing.
- **Order Fulfillment & Management**: Manage shipping and fulfill orders
efficiently.
- **Finance and Settlement**: Reconcile payments and track finances.
- **Seller Performance**: Monitor and improve seller metrics.

## API References and Code Examples

### 1. Catalog Management


- **APIs**:
- **Catalog Items API**
- **Listings Items API**

**Important Notifications**:
- `ITEM_PRODUCT_TYPE_CHANGE`
- `LISTINGS_ITEM_STATUS_CHANGE`

### Example Snippet for Listings Items


```python
import requests

# Example to create a listing


def create_listing(access_token, marketplace_id, payload):
url = f"https://sellingpartnerapi-na.amazon.com/listings/{marketplace_id}/
items"
headers = {
'Authorization': f"Bearer {access_token}",
'Content-Type': 'application/json'
}
response = requests.post(url, headers=headers, json=payload)
return response.json()
```

### 2. Order Fulfillment


- **APIs**:
- **Merchant Fulfillment API**
- **Easy Ship API**

### Example Snippet for Order Management


```python
def get_order_status(order_id, access_token):
url = f"https://sellingpartnerapi-na.amazon.com/orders/v0/orders/{order_id}"
headers = {
'Authorization': f"Bearer {access_token}",
'Content-Type': 'application/json'
}
response = requests.get(url, headers=headers)
return response.json()
```

**Important Notifications**:
- `ORDER_STATUS_CHANGE`

### 3. Pricing and Fees


- **APIs**:
- **Product Pricing API**

### Example Snippet for Pricing Updates


```python
def update_product_pricing(access_token, marketplace_id, payload):
url = f"https://sellingpartnerapi-na.amazon.com/pricing/v0/price"
headers = {
'Authorization': f"Bearer {access_token}",
'Content-Type': 'application/json'
}
response = requests.put(url, headers=headers, json=payload)
return response.json()
```

**Important Notifications**:
- `PRICING_HEALTH`

### 4. Tax Reporting


- **APIs**:
- **VAT Invoicing API**

### Important Reports:


- `GET_VAT_TRANSACTION_DATA`
- Tax reporting requires attention to regional legal compliance.

## Important Classes, Functions, and Key Concepts


- **Authorization**: Ensure to use LWA (Login with Amazon) credentials to access
the APIs securely.
- **Rate Limits**: Incorporate exponential back off in your requests to manage rate
limits effectively.
- **Notifications**: Utilize the notification API to manage events in real-time for
changes in orders, listings, and more.

### Important Notes:


- Ensure your application complies with Amazon's policies regarding data usage and
protection.
- Different APIs may support different regions; always check for marketplace-
specific API capabilities.
- The SP-API documentation regularly updates; stay informed about new features and
deprecated ones.

By referencing this guide, developers can effectively utilize the SP-API to gather
and post data from a seller's Amazon account, offering automated management of
their selling activities.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-seller-use-


cases#vat-invoicing:
### Summary of Amazon SP APIs: VAT Invoicing

#### Overview of VAT Invoicing


The Amazon Selling Partner API (SP-API) offers endpoints specifically designed for
VAT invoicing, allowing sellers to generate tax invoices that comply with EU tax
regulations.

#### Important APIs and Reports

- **VAT Invoicing API**


- **Usage**: This API is used to generate and manage VAT invoices for sales made
to customers in the EU.

- **Main Reports Related to VAT Invoicing**


- `GET_ORDER_REPORT_DATA_INVOICING`: Retrieves order data for invoicing.
- `GET_FLAT_FILE_ORDER_REPORT_DATA_INVOICING`: Returns flat file representations
of order reports related to invoicing.
- `GET_AMAZON_FULFILLED_SHIPMENTS_DATA_INVOICING`: Fetches data about shipments
fulfilled by Amazon for invoicing.
- `GET_VAT_TRANSACTION_DATA`: Provides data on VAT transactions.
- `SC_VAT_TAX_REPORT`: Accesses VAT tax reporting data.

#### Key Concepts

- **Usage Scenarios**:
- VAT invoicing is essential for sellers operating in the European Union and
managing their tax compliance.

- **Error Handling**:
- Ensure to handle errors gracefully, particularly when dealing with VAT
invoices, as failure to comply with local tax laws can result in financial
penalties.

- **Compliance**:
- When using the VAT invoicing features, it is critical to ensure that all
generated invoices meet the specific legal requirements of the respective EU member
states.

#### Important Notes


- **Language**: Focus on using Python for interacting with these APIs as per user
requirements.
- **Authorization**: Make sure to authorize your application properly to access the
necessary endpoints and handle sensitive data (such as tax details).
- **Sandbox Testing**: Use the SP-API sandbox environment for testing calls to the
API before going live to minimize errors in production.
- **Rate Limits**: Be aware of the usage plans and rate limits imposed by Amazon to
avoid service interruptions.

### Sample Code Snippet


```python
import requests

def get_vat_invoice_data(access_token, seller_id):


headers = {
'Authorization': f'Bearer {access_token}',
'Content-Type': 'application/json',
'x-amz-access-token': access_token
}

# Assuming you need to fetch VAT transaction data


url = f'https://sellingpartnerapi-na.amazon.com/vat/invoices/{seller_id}/
transactions'

response = requests.get(url, headers=headers)


if response.status_code == 200:
return response.json() # Returns the IRS compliant invoice data
else:
raise Exception(f"Error fetching VAT invoice data: {response.content}")

# Usage
access_token = 'your_access_token_here' # Obtain via OAuth
seller_id = 'your_seller_id_here'
vat_data = get_vat_invoice_data(access_token, seller_id)
```
### Conclusion
The SP-API provides robust functionality for managing VAT invoicing, which is
crucial for compliance in the EU. Developers should familiarize themselves with the
specific endpoints, understand required reports, and comply with regulations while
testing any integrations thoroughly before going live.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-seller-use-


cases#fba-subscribe-and-save:
### Amazon Selling Partner API (SP-API) - Seller Use Cases

The Amazon SP-API provides various APIs for sellers to gather and post data related
to their selling activities on Amazon. Below is a summary targeted at developers
interested in using Python for SP-API integration.

#### Key APIs and Use Cases

1. **Marketing Content Management**


- **API**:
- **A+ Content**
- **Catalog Items**
- **Usage**: Enhance product pages with rich marketing content.

2. **Catalog Management**
- **APIs**:
- **Catalog Items**
- **Listings Items**
- **Listings Restrictions**
- **Product Type Definitions**
- **Notifications**:
- Various events including `ITEM_PRODUCT_TYPE_CHANGE`,
`LISTINGS_ITEM_MFN_QUANTITY_CHANGE`
- **Reports**:
- Inventory Reports
- Get Merchant Listings Data
- **Usage**: Manage Amazon listings, optimize catalog, and reduce errors.

3. **Pricing, Fees, and Promotions**


- **APIs**:
- **Product Pricing**
- **Product Fees**
- **Listings Items**
- **Reports**:
- GET_REFERRAL_FEE_PREVIEW_REPORT
- **Usage**: Automate product pricing updates based on business rules.

4. **Inventory Management**
- **APIs**:
- **Listings Items**
- **Product Type Definitions**
- **Reports**:
- GET_FLAT_FILE_OPEN_LISTINGS_DATA
- **Usage**: Automate inventory management and synchronization.

5. **Order Management**
- **API**:
- **Orders API**
- **Notifications**:
- Reports status changes like `ORDER_CHANGE`
- **Reports**:
- GET_FLAT_FILE_ALL_ORDERS_DATA_BY_ORDER_DATE
- **Usage**: Automate order status synchronization across systems.

6. **Fulfillment by Amazon (FBA)**


- **APIs**:
- **FBA Inbound Eligibility**
- **FBA Inventory**
- **Usage**: Manage fulfillment processes and inventory in Amazon’s centers.

7. **VAT Invoicing and Tax Reporting**


- **Reports**:
- GET_ORDER_REPORT_DATA_TAX
- **Usage**: Compliance with tax regulations through automated reporting.

8. **Seller Fulfillment**
- **API**:
- **Merchant Fulfillment API**
- **Usage**: Facilitate direct shipping using the seller's own carrier.

### Important Classes and Methods

- **SP-API SDK**: Utilizing the SDK in Python allows integration with various SP-
API endpoints.
- Common methods use HTTP actions like GET, POST, which adapt to each API segment:
- `get_order_report()`: Fetches order report data.
- `update_listing()`: Updates product information.

### Key Concepts

- **Authentication**: All requests must be authorized using the Amazon LWA (Login
with Amazon).
- **Rate Limits**: Understanding the limits on API calls is critical for smooth
integration.
- **Webhooks/Notifications**: The system allows developers to subscribe to changes
and updates in inventory, pricing, and listings.

### Important Notes

- **Data Compliance**: Ensure compliance with Amazon's data protection policies and
acceptable use policy.
- **Versioning**: APIs may have multiple versions; always use the latest reference
to include up-to-date methods and data structures.
- **Error Handling**: Pay attention to API error responses and implement retry
logic for throttled requests.

### Code Example

Here’s a basic example of making a request to the Pricing API using Python:

```python
import requests

def get_product_pricing(sku):
"""Fetches product pricing for the given SKU."""
url =
f"https://sellingpartnerapi-na.amazon.com/products/pricing/v0/competitivePrice/
{sku}"
headers = {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"x-amz-access-token": "YOUR_LWA_ACCESS_TOKEN",
"Host": "sellingpartnerapi-na.amazon.com"
}
response = requests.get(url, headers=headers)

if response.status_code == 200:
return response.json()
else:
raise Exception(f"Error fetching pricing data: {response.text}")

# Usage
sku = "example-sku"
pricing_info = get_product_pricing(sku)
print(pricing_info)
```

### Conclusion

Understanding the functionalities of the SP-API is crucial for developers


integrating Amazon marketplace capabilities into their applications. This summary
provides a roadmap for utilizing the SP-APIs effectively, especially in Python
environments.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-seller-use-


cases#replenishment-api:
### Summary of Amazon Selling Partner API (SP-API) Seller Use Cases - Replenishment
API

#### Overview of Replenishment API


The Replenishment API provides access to performance metrics and forecasts for
inventory replenishment. This API enables sellers to automate their inventory
management and optimize stock levels based on various data points for better
operational efficiency.

#### Key API Endpoints


1. **GET_FBA_SNS_PERFORMANCE_DATA**
- **Description**: Retrieves performance data for the replenishment program.
- **Usage**:
- Call this endpoint to gain insights into your inventory performance and
identify how well your replenishment program is functioning.

2. **GET_FBA_SNS_FORECAST_DATA**
- **Description**: Provides forecast data to assist in inventory planning.
- **Usage**:
- Utilize this endpoint to obtain anticipated inventory needs based on sales
trends and other predictive metrics.

#### Important Classes, Functions, and Methods


- **API Client Initialization**
- Create an instance of the SP-API client to access the various API
functionalities:
```python
import sp_api
from sp_api.base import Client

# Initialize the client with required credentials


client = Client(
refresh_token='YOUR_REFRESH_TOKEN',
client_id='YOUR_CLIENT_ID',
client_secret='YOUR_CLIENT_SECRET',
role_arn='YOUR_ROLE_ARN'
)
```

- **Using the Replenishment API**


After initializing the client, you can call the specific methods for
replenishment.
```python
# Fetch performance data
performance_data = client.replenishment_api.get_fba_sns_performance_data()

# Fetch forecast data


forecast_data = client.replenishment_api.get_fba_sns_forecast_data()
```

#### Key Concepts


- **Performance Data**: This includes metrics around inventory levels, sales
velocity, and fulfillment performance which help sellers maintain optimal stock
levels.
- **Forecasting**: Forecasting tools within the API allow for better planning,
accounting for seasonal trends, sales patterns, and inventory requirements.

#### Important Notes and Caveats


- **Authentication**: Ensure that the API is authenticated correctly using valid
LWA credentials and access tokens.
- **Rate Limits**: Be aware of usage limits for API calls to prevent throttling.
Monitor your API usage particularly when scaling up your connections.
- **Error Handling**: Implement error handling to manage various API responses
effectively, such as timeouts or HTTP error codes (e.g., 400, 403) during API
requests.

### Conclusion
This summary covers the essential aspects of interacting with the Amazon Selling
Partner API's Replenishment functionality. For practical implementation, ensure a
firm understanding of the authentication process, be vigilant regarding API rate
limits, and prepare for robust error handling in your application.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-seller-use-


cases#buy-shipping-for-seller-fulfillment:
### Summary of Amazon Selling Partner API (SP-API) - Seller Use Cases for Shipping
and Fulfillment

#### Overview
The Amazon Selling Partner API (SP-API) enables developers to integrate with Amazon
selling partner services to gather and post data relevant to a selling partner's
account. This document focuses on APIs and functionalities related to shipping and
fulfillment, particularly the **Buy Shipping** section for seller fulfillment.
---

### Key APIs and Use Cases

1. **Buy Shipping for Seller Fulfillment**


- Automates shipping and fulfillment processes by facilitating shipping rate
purchasing, label printing, and logistics.

#### API:
- **Shipping API**

#### Notifications (Events):


- `FULFILLMENT_ORDER_STATUS`
- `FEED_PROCESSING_FINISHED`

#### Reports:
- None specified for this API.

2. **Direct to Consumer Shipping**


- Automates the shipping processes that allow the seller to directly manage
logistics.

#### API:
- None specified.

#### Notifications (Events):


- `REPORT_PROCESSING_FINISHED`
- `FEED_PROCESSING_FINISHED`
- `ORDER_CHANGE`

#### Reports:
- **Order Reports:**
- `GET_FLAT_FILE_ACTIONABLE_ORDER_DATA_SHIPPING`
- `GET_ORDER_REPORT_DATA_SHIPPING`
- `GET_FLAT_FILE_ORDER_REPORT_DATA_SHIPPING`

3. **Easy Ship**
- Manages and ships Amazon Easy Ship orders, suitable for designated
marketplaces.

#### API:
- **Easy Ship API**

#### Reports:
- `GET_EASYSHIP_DOCUMENTS`
- `GET_EASYSHIP_PICKEDUP`
- `GET_EASYSHIP_WAITING_FOR_PICKUP`

---

### Important Concepts

- **Shipping API**: Enables sellers to manage shipping rates and logistics,


necessary for automating fulfillment tasks.
- **Notifications**: Events that provide real-time updates about the shipping
processes, allowing sellers to react promptly to changes in order status or
fulfillment processes.
- **Reports**: Various reports provide insights into order statuses, actionable
data, and shipping logistics, crucial for monitoring performance.
---

### Important Notes and Caveats

- **Rate Limits**: Developers should be aware of the usage limits on API calls to
avoid service interruptions.
- **Authorization**: Proper authorization is required for applications to access
the SP-API resources. Ensure that your app is properly registered and approved for
the required roles.
- **Data Accuracy**: It's critical to validate the accuracy of the shipping labels
and rate quotes returned by the API to avoid shipping issues.

---

### Code Examples

Although the specific code samples are not present in the document, integration
might typically involve the following steps:

```python
import requests

# Example function to get shipping rates


def get_shipping_rates(order_id):
api_url = f"https://sellingpartnerapi.com/shipping/rates/{order_id}"
headers = {'Authorization': 'Bearer YOUR_ACCESS_TOKEN'}
response = requests.get(api_url, headers=headers)
if response.status_code == 200:
return response.json() # returns shipping rates
else:
return response.raise_for_status() # handle errors

# Usage
shipping_info = get_shipping_rates("YOUR_ORDER_ID")
```

Replace `YOUR_ACCESS_TOKEN` and `YOUR_ORDER_ID` with appropriate credentials and


order IDs.

---

This summary aims to provide developers a structured reference when working with
Amazon's SP-API related to shipping and fulfillment functionalities, specifically
focusing on buying shipping services and related automation processes.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-seller-use-


cases#direct-to-consumer-shipping:
# Amazon Selling Partner API (SP-API) Overview

## Purpose
The Selling Partner API (SP-API) provides functionalities that allow developers to
gather data from a customer's selling partner account and post data to the selling
account. This documentation focuses on integrating with the SP-API using Python.

## Code Examples and API Snippets


### Authorization and Setup
To interact with the SP-API, authorization using LWA (Login with Amazon) is
required. Documentation on authorization flows can be found
[here](https://developer-docs.amazon.com/sp-api/docs/authorization).

### Key APIs for Use Cases


- **Inventory Management**
```python
# Example: Getting Inventory Data
import requests

headers = {
'Authorization': 'Bearer <access_token>',
'x-amz-access-token': '<access_token>',
'Content-Type': 'application/json'
}

response = requests.get('https://sellingpartnerapi-na.amazon.com/inventory/v1/
sku/<sku>/on_hand', headers=headers)
print(response.json())
```

- **Order Fulfillment**
```python
# Example: Get Order Details
order_id = '<order_id>'
response =
requests.get(f'https://sellingpartnerapi-na.amazon.com/orders/v0/orders/
{order_id}', headers=headers)
print(response.json())
```

### Notifications
Key notifications relevant when implementing SP-API are:
- `ORDER_CHANGE`: Updated order information
- `PRODUCT_TYPE_DEFINITIONS_CHANGE`: Changes in product types

For event notifications, you may subscribe to AWS SNS topics or similar mechanisms
depending on your application architecture.

## Important Classes and Methods


### Class: `SellingPartnerAPI`
- **Methods**:
- `get_orders()`: Retrieves orders within a specified date range.
- `list_inventory()`: Lists inventory items available for sale.

### Key Functions


- **Authorization Function**
Ensure all requests are authorized.

### Usage Example


```python
def authorize_application():
# Authorize and return access token
pass
```

## Key Concepts
1. **Client ID and Secret**: Required for authentication. Obtain these from the
Amazon Developer Console.
2. **Marketplace IDs**: Identify the marketplace for operations.

## Important Notes and Caveats


- **Rate Limiting**: SP-API identifies usage limits that restrict how often you can
call the APIs. Monitor your call usage and handle exceptions appropriately.
- **Data Protection**: Ensure that you comply with Amazon’s data protection
policies when handling sensitive data.
- **Endpoint Variants**: The SP-API endpoints can vary by region; make sure to
utilize the correct endpoint for operations.

## Conclusion
This summary provides a foundational guide for developers looking to integrate with
the Amazon Selling Partner API using Python. For detailed implementation and
further exploration, refer to the full API documentation accessible through the
Amazon Developer Hub.

Ensure to keep up with any changes in API versions or usage policies by subscribing
to updates from Amazon.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-seller-use-


cases#easy-ship:
## Summary of the Amazon Selling Partner API for Easy Ship

### Overview
The Amazon Selling Partner API (SP-API) facilitates the integration of applications
with Amazon's services for sellers. The APIs in the Easy Ship section allow
developers to manage and ship orders through Amazon Easy Ship. These APIs and
methodologies can help sellers automate shipping processes and maintain order
management.

### Key Concepts


- **Easy Ship API**: A specific set of endpoints designed for managing Easy Ship
orders. It allows sellers to automate and track shipments.
- **Marketplace IDs**: Important for specifying the market context; sellers must
use the correct marketplace ID for the relevant APIs.
- **Notifications**: Events that tools can subscribe to for updates related to
order processing, which are essential for maintaining real-time order fulfillment
data.

### APIs Relevant to Easy Ship

1. **Easy Ship API**


- **Version**: 2022-03-23
- **Base URL**: To be obtained through proper authorization to use the SP-API
endpoints.
- **Endpoints**:
- `GET_EASYSHIP_DOCUMENTS`
- `GET_EASYSHIP_PICKEDUP`
- `GET_EASYSHIP_WAITING_FOR_PICKUP`

These endpoints provide access to documents related to shipments, track pickup


statuses, and monitor orders waiting for pickup.

2. **Merchant Fulfillment API**


- Helps automate shipping and fulfillment that is directly managed by the
seller, allowing them to choose their carriers.
- **Endpoints**:
- Various endpoints for different functionalities such as managing shipping
rates and purchasing.

### Code Example


Below is a basic example of how to call the Easy Ship API using Python:

```python
import requests

def get_easy_ship_documents(seller_access_token):
url = "https://sellingpartnerapi-eu.amazon.com/easyship/v2022-03-23/documents"
headers = {
"Authorization": f"Bearer {seller_access_token}",
"Content-Type": "application/json"
}

response = requests.get(url, headers=headers)

if response.status_code == 200:
return response.json() # Process the JSON response
else:
return response.text # Handle errors appropriately

# Usage
# seller_access_token = 'your_token_here'
# documents = get_easy_ship_documents(seller_access_token)
# print(documents)
```

### Important Classes and Methods


- **Authorization**: Ensure to acquire and refresh access tokens to perform API
requests. Use the necessary OAuth2 flows to get valid `seller_access_token`.
- **Error Handling**: Implement error handling mechanisms for common response
errors (4xx, 5xx HTTP status codes) to ensure smooth functionality.

### Notes and Caveats


- **Rate Limits**: Be aware of API rate limits to avoid throttling. Implement
exponential backoff strategies while making requests to APIs during rate limit
errors.
- **Data Handling**: Ensure proper JSON formatting when handling data sent to or
returned from the APIs.
- **Marketplace-Specific APIs**: Different marketplaces may have different
requirements and constraints; ensure you're familiar with the specifics for each.

### FAQs and Resources


Refer to [Amazon SP-API
documentation](https://developer-docs.amazon.com/sp-api/docs/sp-api-seller-use-
cases#easy-ship) for detailed information regarding other available APIs,
notifications, reports, and more use cases.

This summary serves as a quick reference guide for developers looking to integrate
Amazon's Easy Ship functionality into their applications using the SP-API.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-seller-use-


cases#multi-channel-fulfillment-returns:
# Amazon SP-API Seller Use Cases Summary

## Overview
The Selling Partner API (SP-API) allows sellers to interact with Amazon’s services
via a set of APIs, notifications, and reports. This summary focuses on the Multi-
Channel Fulfillment Returns specific to SP-API.

## Important Classes, Functions, and Methods

### APIs
- **Fulfillment Outbound**
- Used to manage outbound shipments when fulfilling Multi-Channel Fulfillment
(MCF) orders using inventory in Amazon’s fulfillment network.

### Notifications (Events)


- **REPORT_PROCESSING_FINISHED**: Indicates that a processing report has been
completed and is ready to be retrieved.

### Reports
1. **GET_XML_RETURNS_DATA_BY_RETURN_DATE**: Fetch returns data in XML format,
filtered by return date.
2. **GET_FLAT_FILE_RETURNS_DATA_BY_RETURN_DATE**: Retrieve returns data in a flat
file format, filtered by return date.
3. **GET_XML_MFN_PRIME_RETURNS_REPORT**: Obtain a report specifically for Prime
return requests.
4. **GET_CSV_MFN_PRIME_RETURNS_REPORT**: CSV format for Prime return requests.
5. **GET_XML_MFN_SKU_RETURN_ATTRIBUTES_REPORT**: Gather return attributes info for
specific SKUs in XML format.
6. **GET_FLAT_FILE_MFN_SKU_RETURN_ATTRIBUTES_REPORT**: Similar info as above, but
in a flat file format.

## Key Concepts
- **Multi-Channel Fulfillment (MCF)**: A service allowing businesses to outsource
order fulfillment to Amazon. Orders can be from various sales channels, but
fulfillment occurs through Amazon's logistics.

- **Return Attributes**: Information regarding returns processed by Amazon,


identifiable by SKU. This helps sellers track which items are being returned and
their reasons.

- **Inventory Management**: Sellers can manage their inventory in Amazon's


fulfillment network, allowing integration with their own systems while leveraging
Amazon’s logistics capabilities.

## Important Notes and Caveats


- Ensure proper authorization is provided when accessing the SP-API.
- Familiarity with XML and flat file data formats is necessary for correctly
processing returns data.
- Monitor notifications for timely updates on report processing to ensure data is
retrieved promptly.
- Multi-Channel Fulfillment has specific terms and conditions; review Amazon's
guidelines to comply with policies.

## Conclusion
The Amazon SP-API offers robust capabilities for sellers to manage their products
and returns effectively through various APIs and reports. Understanding the
structure and key functionalities outlined will help in utilizing the SP-API to its
full potential, especially in managing returns via the Multi-Channel Fulfillment
service. For additional code examples or in-depth API functionalities, refer to the
official Amazon SP-API documentation.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-seller-use-


cases#finance-and-settlement:
### Summary of Amazon Selling Partner API (SP-API) Seller Use Cases - Finance and
Settlement

#### Overview
The Selling Partner API (SP-API) provides a set of APIs for sellers to manage their
Amazon selling accounts, retrieve data, and integrate with various applications.

---

#### Key APIs for Finance and Settlement

1. **Finances API**
- **Endpoint:** `Finances`
- **Description:** Tracks finances and helps reconcile payments, or integrate
with accounting software.
- **Important Methods:**
- **GET V2 Settlement Report**
- **Contract:**
```http
GET /finances/v2/settlementReport
```
- **Parameters:** This call retrieves financial data regarding settlements.

2. **Reports API**
- **Description:** Provides access to various reports relevant to seller
finances.
- **Key Reports:**
- **GET V2 Settlement Report Data**
- **Contract:**
```http
GET /reports/v2/settlementData
```
- **Usage:** Developers can automate the retrieval of settlement reports to
ensure accurate financial tracking.

#### Important Notifications


- **REPORT_PROCESSING_FINISHED**
- Triggers when a report finishes processing, allowing developers to take action
based on report readiness.

#### Code Examples


- **Python Example for Retrieving Settlement Data**
```python
import requests

# Set your API parameters


endpoint = "https://sellingpartnerapi-na.amazon.com/finances/v2/settlementReport"
headers = {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
}
response = requests.get(endpoint, headers=headers)

if response.status_code == 200:
print(response.json())
else:
print("Error:", response.status_code, response.text)
```

#### Key Concepts


- **Settlement Reports:** Important for reconciling payments; sellers should
periodically retrieve these reports to manage cash flow and accounting.
- **Rate Limits:** Be mindful of API rate limits, which can impact the frequency of
requests to the Finances API.

#### Important Notes


- **Authorization:** Ensure authorized access tokens are included in API requests
to avoid unauthorized access errors.
- **Error Handling:** Implement robust error handling to capture and respond to API
errors, especially during report retrieval or settlement processes.
- **Data Formats:** Familiarize yourself with JSON response formats as they are
standard for SP-API responses.

---

This summary provides the essential details for developers looking to implement
finance and settlement processes using the Amazon SP-API. Always refer to the
latest API documentation for updates and additional information.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-seller-use-


cases#sales-performance:
### Summary of Amazon SP-API Seller Use Cases

The Selling Partner API (SP-API) enables developers to integrate seamlessly with
Amazon's selling services, allowing developers to gather data from a customer's
selling partner account and post data to the seller's account. Below is a
structured overview of key API use cases, functions, and concepts.

#### Key APIs and Their Usage

1. **Marketing Content Management**


- **API**: A+ Content, Catalog Items
- **Usage**: Add rich marketing content to product detail pages.

2. **Catalog Management**
- **APIs**: Catalog Items, Listings Items, Listings Restrictions, Product Type
Definitions
- **Notifications**:
- ITEM_PRODUCT_TYPE_CHANGE
- LISTINGS_ITEM_MFN_QUANTITY_CHANGE
- **Reports**:
- GET_MERCHANT_LISTINGS_ALL_DATA
- GET_MERCHANT_LISTINGS_DATA

3. **Pricing, Fees, and Promotions**


- **APIs**: Product Pricing, Product Fees, Listings Items
- **Notifications**:
- PRICING_HEALTH
- ANY_OFFER_CHANGED
- **Reports**: GET_PAN_EU_OFFER_STATUS

4. **Inventory Management**
- **APIs**: Listings Items, Product Type Definitions
- **Reports**:
- GET_FLAT_FILE_OPEN_LISTINGS_DATA
- GET_MERCHANT_LISTINGS_DEFECT_DATA

5. **Order Management**
- **API**: Orders
- **Reports**:
- GET_FLAT_FILE_ALL_ORDERS_DATA_BY_ORDER_DATE
- Pending Orders Reports (JP Only)

6. **Sales Performance**
- **API**: Sales
- **Reports**: N/A

7. **Finance and Settlement**


- **API**: Finances
- **Reports**:
- GET_V2_SETTLEMENT_REPORT_DATA_FLAT_FILE_V2

#### Important Classes and Concepts

- **APIs**: These represent various functionalities available in the SP-API used to


manage products, orders, and metrics.
- **Notifications**: Events that allow the system to respond to changes in state or
updates, enabling real-time integration.
- **Reports**: Predefined queries that return compiled data for specific use cases,
assisting sellers in understanding their performance metrics.

#### Code Examples and Snippets

**Fetching Merchant Listings Data (Example)**


```python
import requests

url = "https://sellingpartnerapi-na.amazon.com/listings/v2021-08-01/merchant-
listings-data"
headers = {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
}

response = requests.get(url, headers=headers)


data = response.json()
print(data)
```

**Steve 's Product Pricing Data Fetch (Example)**


```python
url = "https://sellingpartnerapi-na.amazon.com/pricing/v2022-05-01/price"
response = requests.get(url, headers=headers)
pricing_data = response.json()
print(pricing_data)
```

### Important Notes

- **Authorization**: Every API call requires proper authorization using an access


token, which you receive upon application registration within Amazon's SP-API
framework.
- **Rate Limits**: Each API has defined rate limits that you must adhere to avoid
service disruptions.
- **Error Handling**: Ensure proper error handling by checking response codes and
implementing retries where necessary.

### Caveats

- **Market Specifics**: Some APIs and reports are specific to regions or


marketplaces (e.g., VAT invoicing in the EU), so review the impedance of
marketplace-specific features.
- **Versions**: Notice the API versioning, as older versions may become deprecated;
utilize the latest ones to ensure compliance and avoid unsupported features.

This concise summary should guide developers in understanding and utilizing the
Amazon SP-API for their selling partner needs.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-seller-use-


cases#retail-analytics:
# Summary of Amazon Selling Partner API (SP-API) Seller Use Cases

### Overview

The Amazon Selling Partner API (SP-API) provides a set of RESTful APIs that allow
developers to integrate their applications with Amazon to manage seller accounts.
The SP-API encompasses various functionalities including Catalog Management, Order
Fulfillment, Inventory Management, and more.

### Important APIs and Functions

1. **A+ Content API**


- **Purpose**: Add rich marketing content to Amazon product detail pages.
- **Usage**: Use the A+ Content API to enhance product presentations on Amazon.

2. **Catalog Management APIs**


- **Key APIs**:
- `Catalog Items`
- `Listings Items`
- `Listings Restrictions`
- `Product Type Definitions`
- **Notifications**:
- `ITEM_PRODUCT_TYPE_CHANGE`
- `LISTINGS_ITEM_MFN_QUANTITY_CHANGE`
- **Reports**:
- `GET_MERCHANT_LISTINGS_DATA`
- `GET_MERCHANT_LISTINGS_ALL_DATA`

3. **Pricing, Fees, and Promotions API**


- **Key APIs**:
- `Product Pricing`
- `Product Fees`
- **Notifications**:
- `PRICING_HEALTH`
- **Reports**:
- `GET_REFERRAL_FEE_PREVIEW_REPORT`

4. **Inventory Management APIs**


- **Key APIs**:
- `Listings Items`
- **Notifications**:
- `REPORT_PROCESSING_FINISHED`
- **Reports**:
- `GET_FLAT_FILE_OPEN_LISTINGS_DATA`

5. **Order Fulfillment APIs**


- **Key APIs**:
- `Merchant Fulfillment API v0`
- **Reports**:
- Order tracking reports

6. **Tax Reporting**
- **Purpose**: Calculate and report sales taxes.
- **Reports**:
- `GET_ORDER_REPORT_DATA_TAX`
- `GET_FLAT_FILE_ORDER_REPORT_DATA_TAX`

7. **Retail Analytics**
- **Purpose**: Analyze profitability and product costs.
- **Reports**:
- `GET_SALES_AND_TRAFFIC_REPORT`
- **Notifications**:
- `REPORT_PROCESSING_FINISHED`

8. **Brand Analytics**
- **Purpose**: Provides insights for enhancing sales and customer loyalty.
- **Reports**:
- `GET_BRAND_ANALYTICS_SEARCH_TERMS_REPORT`

### Key Concepts

- **Notifications**: Events that trigger specific actions or updates within the SP-
API ecosystem. Developers can listen for these notifications to react accordingly.
- **Reports**: A mechanism to retrieve structured data periodically, which is
essential for analysis and business strategy adjustments.
- **Integrations**: Multiple APIs can work together; for example, inventory
management APIs can be combined with order fulfillment APIs to ensure product
availability aligns with customer orders.

### Important Notes

- API Rate Limits: Be aware of the specified rate limits for API calls to avoid
service disruptions.
- Authorization: Ensure that proper permissions are granted to the SP-API
application for accessing vendor groups and other sensitive data.
- HTTPS Requirement: All API calls must be made over HTTPS for secure data
transmission.

### Code Snippets


While the provided content did not contain specific snippets, here’s a general
example of how a request for the Listings API might look in Python:

```python
import requests

url = "https://sellingpartnerapi-na.amazon.com/catalog/v0/items"
headers = {
"x-amz-access-token": "<ACCESS_TOKEN>",
"Content-Type": "application/json",
}

response = requests.get(url, headers=headers)


if response.status_code == 200:
data = response.json()
print(data)
else:
print("Error:", response.status_code, response.text)
```

### Conclusion

The SP-API offers comprehensive solutions for managing seller accounts on Amazon,
with various APIs suited for marketing, inventory management, order processing, and
analytics. Understanding the integrations between these components and adhering to
the specified guidelines will enable effective utilization of the SP-API.
Developers focusing on Python can leverage SDKs to simplify API calls and responses
in their applications.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-seller-use-


cases#utility:
### Summary of Amazon Selling Partner API (SP-API) Seller Use Cases

The Amazon SP-API facilitates interaction with a customer's Selling Partner


account, allowing developers to gather and post data effectively. Below are the key
components necessary for utilization of this API based on the content provided.

---

#### **SP-API Use Cases Overview**

1. **Marketing Content Management**


- **API**: A+ Content, Catalog Items
- **Description**: Enhance product detail pages with rich content.

2. **Catalog Management**
- **APIs**:
- **Catalog Items**
- **Listings Items**
- **Listings Restrictions**
- **Product Type Definitions**
- **Notifications (Events)**:
- ITEM_PRODUCT_TYPE_CHANGE
- LISTINGS_ITEM_STATUS_CHANGE
- etc.
- **Reports**: Various merchant listings reports for analysis.
3. **Pricing, Fees, and Promotions**
- **APIs**:
- Product Pricing
- Product Fees
- **Notifications (Events)**:
- PRICING_HEALTH
- FEE_PROMOTION

4. **Inventory Management**
- **APIs**: Listings Items, Product Type Definitions
- **Reports**: Include various merchant listings and inventory reports.

5. **Order Fulfillment**
- **APIs**: Merchant Fulfillment API
- **Usage**: Fulfill orders via Amazon or external sources.

6. **Order Management**
- **API**: Orders
- **Reports**: Various order tracking reports.

7. **Tax Reporting**
- **Reports**: Order Reports for tax compliance.
- **VAT Invoicing**: Generate tax invoices for EU regulations.

8. **Fulfillment by Amazon (FBA)**


- **APIs**:
- FBA Inbound Eligibility
- FBA Inventory
- etc.
- **Usage**: Outsource order fulfillment to Amazon.

9. **Returns Management**
- **API**: N/A
- **Reports**: Information on returns by SKU.

10. **Finance and Settlement**


- **API**: Finances
- **Reports**: Track finances, reconcile payments.

11. **Seller Performance**


- **Reports**: Feedback and performance metrics.

---

### **Key APIs and Usage**

- **Sellers API**
- **Purpose**: Retrieve and manage information about the Selling Partner account.
- **Notification**: ACCOUNT_STATUS_CHANGED.

- **Orders API**
- **Purpose**: Manage and track orders.
- **Important Reports**:
- GET_FLAT_FILE_ALL_ORDERS_DATA_BY_LAST_UPDATE_GENERAL
- GET_FLAT_FILE_ALL_ORDERS_DATA_BY_ORDER_DATE_GENERAL

- **Product Pricing API**


- **Purpose**: Retrieve and manage product pricing data.
- **Notification**: ANY_OFFER_CHANGED.

---

### **Notes and Caveats**

- **API Limitations**: Be aware of usage plans and rate limits while making API
calls.
- **Data Protection Compliance**: Ensure adherence to Amazon's data policies and
regulations.
- **Authorization**: Properly authorize applications to access relevant vendor
groups and user accounts.
- **Error Handling**: Implement robust error-handling mechanisms to manage API
response failures.

---

### **Tutorial References**

- **Automating API Calls**: Python SDK tutorials are available for automating SP-
API calls, which will help you initiate and manage requests easily.

---

This summary encapsulates essential information for developers looking to utilize


the Amazon SP-API effectively through the Seller Use Cases outlined. For detailed
code snippets and API contracts, refer to the respective API documentation provided
by Amazon.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-seller-use-


cases#seller-performance:
# Amazon Selling Partner API (SP-API) Seller Use Cases Summary

## Overview
The Amazon Selling Partner API (SP-API) provides a framework for managing seller
accounts, orders, inventory, and other related functionalities. It allows
developers to interact programmatically with Amazon's marketplace to gather data
and perform actions on behalf of selling partners.

### Key Concepts


- **APIs and Notifications**: Use various APIs to perform operations and receive
notifications for events that occur (e.g., changes in inventory, pricing
adjustments).
- **Reports**: Generate reports for different aspects of seller performance,
inventory, orders, and financial data.

## Important APIs

1. **Marketing Content Management**


- **APIs**: A+ Content, Catalog Items.

2. **Catalog Management**
- **APIs**:
- `Catalog Items`
- `Listings Items`
- `Listings Restrictions`
- `Product Type Definitions`
- **Notifications**:
- `ITEM_PRODUCT_TYPE_CHANGE`
- `LISTINGS_ITEM_MFN_QUANTITY_CHANGE`
- `LISTINGS_ITEM_STATUS_CHANGE`
- `REPORT_PROCESSING_FINISHED`
- **Reports**: Various listing data reports for merchants.

3. **Pricing, Fees, and Promotions**


- **APIs**:
- `Product Pricing`
- `Product Fees`
- **Notifications**:
- `PRICING_HEALTH`
- `ANY_OFFER_CHANGED`
- **Reports**: Includes inventory-related reports.

4. **Order Management**
- **APIs**: Orders API.
- **Notifications**:
- `ORDER_STATUS_CHANGE`
- `ORDER_CHANGE`
- **Reports**: Order tracking reports.

5. **Inventory Management**
- **APIs**:
- `Listings Items`
- `Product Type Definitions`
- **Reports**: Listings reports to manage inventories.

6. **Seller Performance**
- **APIs**: N/A
- **Reports**:
- `GET_SELLER_FEEDBACK_DATA`
- `GET_V1_SELLER_PERFORMANCE_REPORT`

7. **Tax Reporting and Invoicing**


- **APIs**: N/A
- **Reports**: Various tax-related reports, including VAT and EPR.

## Example API Usage

### Sample API Request: Get Seller Performance Report


```python
import requests

def get_seller_performance_report(selling_partner_id, access_token):


url = f"https://sellingpartnerapi-na.amazon.com/seller/performance/v1/report"
headers = {
"Authorization": f"Bearer {access_token}",
"x-amz-access-token": access_token,
"Content-Type": "application/json"
}
response = requests.get(url, headers=headers)
return response.json()
```

### Important Methods


- **GET_SELLER_PERFORMANCE_REPORT**: Fetch seller performance data.
- **GET_PROMOTION_PERFORMANCE_REPORT**: Retrieve performance metrics for
promotions.

## Notes and Caveats


- **Authorization**: Ensure your application is authorized to access the necessary
APIs. Familiarize yourself with the authorization workflows.
- **Vault Permissions**: Some APIs may require specific permissions; ensure your
role is correctly set up.
- **Rate Limits**: Adhere to the rate limits for different API endpoints to avoid
throttling.
- **Error Handling**: Implement robust error handling to manage cases such as
authorization failures or rate limit breaches.

## Conclusion
The SP-API facilitates comprehensive access to seller management functionalities,
enabling efficient operations for Amazon selling partners. Familiarize yourself
with these key APIs, reports, and best practices to maximize your application's
effectiveness on the platform. For further details, review specific API
documentation as necessary.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-seller-use-


cases#regulatory-compliance:
## Summary of SP-API Seller Use Cases Documentation

### Overview
The Selling Partner API (SP-API) enables developers to integrate with Amazon's
selling services, allowing them to gather data from a seller's account and post
information back. This includes various operations such as inventory management,
order fulfillment, and regulatory compliance reporting.

### Key Concepts


- **SP-API**: A REST-based API suite that provides access to Amazon's selling
services and supports operations in multiple areas, including order management,
pricing, inventory, and more.
- **APIs**: Each function is structured around specific APIs that cater to
particular functionalities (e.g., Inventory, Orders).
- **Notifications**: Events that signal changes in various processes (e.g.,
inventory changes, order status updates).
- **Reports**: Various types of reports that developers can retrieve for analysis
and compliance.

### Important APIs and Their Usage

#### Regulatory Compliance


- **Function**: To retrieve all the necessary data required for Extended Producer
Responsibility (EPR) reporting to regulatory bodies and pay EPR fees.
- **Reports**:
- `GET_EPR_MONTHLY_REPORTS`
- `GET_EPR_QUARTERLY_REPORTS`
- `GET_EPR_ANNUAL_REPORTS`

**Usage Example**:
```python
# Sample Python API request to retrieve monthly EPR reports
response = requests.get(
'https://sellingpartnerapi-na.amazon.com/reporting/v1/reports',
headers={
'x-amz-access-token': access_token,
'Content-Type': 'application/json'
},
params={'reportType': 'GET_EPR_MONTHLY_REPORTS'}
)

# Handle the response


print(response.json())
```

#### Inventory Management


- **APIs**:
- `Listings Items`: Manage Amazon listings and inventory data.
- **Notifications**:
- `LISTINGS_ITEM_MFN_QUANTITY_CHANGE`
- **Reports**:
- `GET_MERCHANT_LISTINGS_ALL_DATA`

**Usage Example**:
```python
# Sample Python API call to get merchant listings data
response = requests.get(
'https://sellingpartnerapi-na.amazon.com/inventory/v1/merchants',
headers={
'x-amz-access-token': access_token
}
)

print(response.json())
```

### Important Classes and Methods


- **Inventory API**: Interacts with inventory-related data.
- **Orders API**: Provides capabilities to manage orders.

### Notes and Caveats


- **Authorization**: Ensure that the application is properly authorized to access
the Selling Partner API. This includes obtaining and managing tokens through the
authorization process.
- **Rate Limits**: Be aware of the API rate limits to avoid being throttled.
Implement error handling for rate limit errors.
- **Versioning**: The APIs have versioning; make sure to use the endpoint relevant
to the version required for your application.

### Conclusion
This summary extracts key APIs, their functionalities, and usage examples relevant
for developers looking to integrate with Amazon's Selling Partner API. Developers
should ensure proper authorization and consider reporting and compliance
requirements when using the API, especially concerning inventory and order
management functionalities.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-seller-use-


cases#fulfillment-by-amazon-fba:
### Summary of Amazon Selling Partner API (SP-API) - Fulfillment by Amazon (FBA)
Use Cases
#### Overview
The Selling Partner API (SP-API) allows developers to interact with Amazon selling
accounts by retrieving data and sending data back to these accounts. The APIs
specifically designed for Fulfillment by Amazon (FBA) provide functionalities
related to management of inventory, order fulfillment, and tracking.

#### Key APIs for FBA

1. **FBA Inbound Eligibility API**


- **Usage**: Checks if products are eligible for FBA inbound shipments.
- **Reference**:
- `GET /fba/inbound/v1/eligibility`

2. **FBA Inventory API**


- **Usage**: Manages FBA inventory levels and stock information.
- **Reference**:
- `GET /fba/inventory/v1`
- **Response Elements**:
- `asin`: Amazon Standard Identification Number.
- `condition`: Condition of the inventory.

3. **FBA Outbound API**


- **Usage**: Manages outbound orders from FBA inventory.
- **Reference**:
- `POST /fba/outbound/v1/shipments`
- **Sample Request**:
```json
{
"shipmentId": "string",
"destinationAddress": {
"name": "string",
"addressLine1": "string",
"city": "string",
"postalCode": "string",
"countryCode": "string"
}
}
```

4. **FBA Small and Light API**


- **Usage**: Retrieves eligibility for the FBA Small and Light program.
- **Reference**:
- `GET /fba/smallandlight/v1/eligibility`
- **Response**: Indicates whether the ASIN qualifies for small and light program
benefits.

#### Key Concepts

- **Fulfillment by Amazon (FBA)**: A service where sellers send products to Amazon


fulfillment centers, and Amazon manages storage, packaging, and shipping to
customers.
- **Inbound Shipment**: The process of sending inventory to Amazon's warehouses.
- **Outbound Shipment**: A process where Amazon ships the products to customers
directly on behalf of the sellers.
- **ASIN**: A unique identifier used by Amazon for products.

#### Important Functionality


- **Notifications**: Events triggered by updates such as changes in order status or
inventory levels. For example:
- `ORDER_CHANGE`: Updates when the order status changes.
- `REPORT_PROCESSING_FINISHED`: Indicates when a report processing task is
completed.

#### Notes and Caveats

- Ensure to handle API rate limits when making requests to avoid throttling. Each
endpoint can have different limits.
- Verify eligibility for each API call to reduce errors and improve efficiency.
- Read the documentation for specific endpoints carefully, as some require specific
header information or query parameters.

#### Code Examples


Here is a basic example of how to make a request using the requests library in
Python:

```python
import requests

def check_fba_eligibility(asin, access_token):


url = f"https://sellingpartnerapi-na.amazon.com/fba/inbound/v1/eligibility/
{asin}"
headers = {
"Authorization": f"Bearer {access_token}",
"Content-Type": "application/json"
}
response = requests.get(url, headers=headers)

if response.status_code == 200:
print("Eligibility Data:", response.json())
else:
print("Error:", response.status_code, response.json())
```

#### Conclusion
This documentation provided a concise overview of the main APIs related to
Fulfillment by Amazon (FBA) within the Selling Partner API. It included essential
functions, basic request structures, and key concepts to facilitate integration and
effective use of the SP-API. Always refer to the latest official documentation for
updates and detailed usage instructions.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-vendor-use-


cases:
### Summary of Amazon Selling Partner API (SP-API) Vendor Use Cases

#### Overview
The Amazon SP-API provides various APIs, notifications, and reports to assist
vendors in managing their direct fulfillment operations and marketing content. This
guide outlines essential APIs and their functionalities.

### Key APIs and Usage

1. **Vendor Direct Fulfillment APIs**


- **Vendor Direct Fulfillment Inventory API v1**
- **Usage**: Manage inventory for direct fulfillment operations.

- **Vendor Direct Fulfillment Orders API v2021-12-28**


- **Usage**: Manage orders placed by customers for direct fulfillment.

- **Vendor Direct Fulfillment Shipping API v2021-12-28**


- **Usage**: Manage shipping details and logistics for orders.

- **Vendor Direct Fulfillment Payments API v1**


- **Usage**: Handle payment processing for orders.

- **Vendor Direct Fulfillment Transactions API v2021-12-28**


- **Usage**: Manage transactions related to fulfillment operations.

**Notifications**: Currently, there are no notifications associated with these


APIs.

**Reports**: No specific reports available for these APIs.

2. **Marketing Content Management**


- **APIs**:
- A+ Content
- Catalog Items
- **Usage**: For adding rich marketing content to product detail pages and
managing product listings.

3. **Retail Analytics**
- **Reports**:
- GET_VENDOR_SALES_REPORT
- GET_VENDOR_NET_PURE_PRODUCT_MARGIN_REPORT
- GET_VENDOR_TRAFFIC_REPORT
- GET_VENDOR_FORECASTING_REPORT
- GET_VENDOR_INVENTORY_REPORT
- GET_VENDOR_REAL_TIME_SALES_REPORT
- GET_VENDOR_REAL_TIME_TRAFFIC_REPORT
- GET_VENDOR_REAL_TIME_INVENTORY_REPORT

4. **Brand Analytics**
- **Reports**:
- GET_BRAND_ANALYTICS_MARKET_BASKET_REPORT
- GET_BRAND_ANALYTICS_SEARCH_TERMS_REPORT
- GET_BRAND_ANALYTICS_REPEAT_PURCHASE_REPORT

5. **Performance Analytics**
- **Reports**:
- GET_PROMOTION_PERFORMANCE_REPORT
- GET_COUPON_PERFORMANCE_REPORT

6. **Catalog Management**
- **APIs**:
- Catalog Items
- Listing Items
- Product Type Definitions
- **Notifications**:
- LISTINGS_ITEM_ISSUES_CHANGE
- PRODUCT_TYPE_DEFINITIONS_CHANGE
- **Usage**: Manage Amazon catalog lists, optimize listings, and reduce errors.

7. **Vendor Retail Procurement**


- **APIs**:
- Vendor Transaction Status
- Vendor Orders
- Vendor Shipments
- Vendor Invoices
- **Usage**: Programmatic management of vendor retail operations.

### Important Concepts

- **Direct Fulfillment**: A program enabling vendors to manage their operations


through web services, facilitating order processing, inventory management, and
shipping.
- **Marketing Content Management**: Functions enabling the addition of marketing
content directly on Amazon product pages, enhancing product visibility and
branding.
- **Analytics**: Reports provide insights into sales performance, customer
behavior, and inventory management, empowering data-driven decision-making.

### Key Notes for Developers

- Make sure to familiarize yourself with Amazon's [acceptable use


policy](https://developer-docs.amazon.com/sp-api/docs/acceptable-use-policy) and
[data protection policy](https://developer-docs.amazon.com/sp-api/docs/data-
protection-policy) to ensure compliance when using the API.
- Understand the rate limits and quotas associated with each API to optimize
application performance and avoid throttling.
- Ensure that all necessary authorizations and permissions are obtained prior to
making API requests.

### Conclusion
The SP-API offers a comprehensive suite of tools aimed at enhancing vendor
operations via systematic integration. Developers should leverage the provided APIs
and reports to maximize efficiency and capitalize on analytical insights for
decision-making.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-vendor-use-


cases#overview:
# Amazon Selling Partner API (SP-API) Vendor Use Cases Summary

## Overview
The SP-API supports vendors in managing their direct fulfillment operations and
marketing content programmatically. The APIs cover various functionalities such as
inventory management, order processing, marketing content management, and
analytics.

---

## Vendor Direct Fulfillment


**APIs:**
1. **Vendor Direct Fulfillment Inventory API v1**
2. **Vendor Direct Fulfillment Orders API v2021-12-28**
3. **Vendor Direct Fulfillment Shipping API v2021-12-28**
4. **Vendor Direct Fulfillment Payments API v1**
5. **Vendor Direct Fulfillment Transactions API v2021-12-28**

**Usage:**
These APIs help vendors in managing their direct fulfillment operations such as
tracking inventory levels, processing orders, and handling shipments.

---

## Marketing Content Management


**APIs:**
- **A+ Content**
- **Catalog Items**

**Description:**
This API allows vendors to enrich their product detail pages with rich marketing
content, including brand stories and product information.

---

## Retail Analytics
**Reports:**
1. **GET_VENDOR_SALES_REPORT**
2. **GET_VENDOR_NET_PURE_PRODUCT_MARGIN_REPORT**
3. **GET_VENDOR_TRAFFIC_REPORT**
4. **GET_VENDOR_FORECASTING_REPORT**
5. **GET_VENDOR_INVENTORY_REPORT**
6. **GET_VENDOR_REAL_TIME_SALES_REPORT**
7. **GET_VENDOR_REAL_TIME_TRAFFIC_REPORT**
8. **GET_VENDOR_REAL_TIME_INVENTORY_REPORT**

**Events:**
- **DETAIL_PAGE_TRAFFIC_EVENT**
- **ITEM_INVENTORY_EVENT_CHANGE**
- **ITEM_SALES_EVENT_CHANGE**

**Description:**
These resources allow vendors to analyze profitability and cost-per-product,
helping to direct business strategies effectively.

---

## Brand Analytics
**Reports:**
1. **GET_BRAND_ANALYTICS_MARKET_BASKET_REPORT**
2. **GET_BRAND_ANALYTICS_SEARCH_TERMS_REPORT**
3. **GET_BRAND_ANALYTICS_REPEAT_PURCHASE_REPORT**

**Description:**
These reports help vendors make data-driven decisions to increase sales and
customer loyalty.

---

## Performance
**Reports:**
1. **GET_PROMOTION_PERFORMANCE_REPORT**
2. **GET_COUPON_PERFORMANCE_REPORT**

**Description:**
These reports provide insights into the performance of coupons and promotions
offered by vendors.
---

## Catalog Management
**APIs:**
- **Catalog Items**
- **Listing Items**
- **Product Type Definitions**

**Events:**
- **LISTINGS_ITEM_ISSUES_CHANGE**
- **PRODUCT_TYPE_DEFINITIONS_CHANGE**

**Description:**
These tools assist vendors in managing Amazon listings, optimizing their catalogs,
and reducing errors in product listings.

---

## Vendor Retail Procurement


**APIs:**
1. **Vendor Transaction Status**
2. **Vendor Orders**
3. **Vendor Shipments**
4. **Vendor Invoices**

**Description:**
This functionality allows vendors to manage their retail business operations
programmatically.

---

## Important Notes and Caveats


- Vendors must implement robust error handling while interacting with the APIs to
manage the possible errors effectively.
- Rate limits are enforced on API calls to ensure fair usage; developers should
optimize their application workloads to stay within these limits.
- Ensure authorization is correctly configured according to the application
requirements for accessing the APIs.

---

By utilizing these APIs, vendors can enhance their operations on the Amazon Selling
Partner platform, thus achieving better management and insights into their business
activities.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-vendor-use-


cases#vendor-direct-fulfillment:
### Summary of Amazon Selling Partner API (SP-API) for Vendor Use Cases

#### Overview
The Amazon Selling Partner API (SP-API) offers a set of APIs to help vendors manage
their operations programmatically. This documentation covers Vendor Direct
Fulfillment, Marketing Content Management, Retail Analytics, Brand Analytics,
Performance, Catalog Management, and Vendor Retail Procurement.

#### Vendor Direct Fulfillment APIs


1. **Vendor Direct Fulfillment Inventory API v1**
2. **Vendor Direct Fulfillment Orders API v2021-12-28**
3. **Vendor Direct Fulfillment Shipping API v2021-12-28**
4. **Vendor Direct Fulfillment Payments API v1**
5. **Vendor Direct Fulfillment Transactions API v2021-12-28**

**Usage:** These APIs are used for managing the direct fulfillment program's
operations, allowing for programmatic interaction with Amazon's services.

#### Marketing Content Management


- **APIs**:
- A+ Content
- Catalog Items

**Usage:** APIs here are designed for enriching product pages with marketing
content.

#### Retail Analytics


**Reports**:
- `GET_VENDOR_SALES_REPORT`
- `GET_VENDOR_NET_PURE_PRODUCT_MARGIN_REPORT`
- `GET_VENDOR_TRAFFIC_REPORT`
- `GET_VENDOR_FORECASTING_REPORT`
- `GET_VENDOR_INVENTORY_REPORT`
- `GET_VENDOR_REAL_TIME_SALES_REPORT`
- `GET_VENDOR_REAL_TIME_TRAFFIC_REPORT`
- `GET_VENDOR_REAL_TIME_INVENTORY_REPORT`

**Notifications**:
- `DETAIL_PAGE_TRAFFIC_EVENT`
- `ITEM_INVENTORY_EVENT_CHANGE`
- `ITEM_SALES_EVENT_CHANGE`

**Usage:** Vendors can analyze profitability and adjust their strategies


accordingly.

#### Brand Analytics


**Reports**:
- `GET_BRAND_ANALYTICS_MARKET_BASKET_REPORT`
- `GET_BRAND_ANALYTICS_SEARCH_TERMS_REPORT`
- `GET_BRAND_ANALYTICS_REPEAT_PURCHASE_REPORT`

**Usage:** These reports support data-driven decision-making to enhance sales and


customer loyalty.

#### Performance
**Reports**:
- `GET_PROMOTION_PERFORMANCE_REPORT`
- `GET_COUPON_PERFORMANCE_REPORT`

**Usage:** Review promotional and coupon performance metrics.

#### Catalog Management


**APIs**:
- Catalog Items
- Listing Items
- Product Type Definitions

**Notifications**:
- `LISTINGS_ITEM_ISSUES_CHANGE`
- `PRODUCT_TYPE_DEFINITIONS_CHANGE`

**Usage:** Helps in managing and optimizing the catalog of products on Amazon.

#### Vendor Retail Procurement


**APIs**:
- Vendor Transaction Status
- Vendor Orders
- Vendor Shipments
- Vendor Invoices

**Usage:** Manage vendor-related business operations programmatically.

### Important Notes


- **SDKs Availability**: SDKs for languages like Python, C#, and Java can be
generated to ease API integrations.
- **Authorization**: Prior to using the APIs, applications must be authorized to
access the necessary vendor groups.
- **Rate Limits**: The usage of these APIs is subject to rate limits; developers
should manage their API calls appropriately.

### Code Examples and Snippets


As this documentation summary does not provide specific code samples or API
snippets, developers are encouraged to refer to the SP-API documentation for
examples based on the specific API they are working with, particularly in the
context of their respective programming language (Python recommended, based on user
intent).

This organized summary provides an accessible starting point for developers aiming
to implement the Amazon SP-API functionalities in their applications and manage
various vendor operations efficiently.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-vendor-use-


cases#marketing-content-management:
### Summary of Amazon Selling Partner API (SP-API) Vendor Use Cases

#### Overview
The SP-API provides a set of APIs to aid vendor management, marketing content
management, retail analytics, catalog management, and procurement operations. This
summary focuses on the relevant APIs and their key use cases, particularly for
managing data from the customer's selling partner account.

---

### Key Use Cases and APIs

#### 1. **Vendor Direct Fulfillment**


- **APIs:**
- **Vendor Direct Fulfillment Inventory API v1**
- **Vendor Direct Fulfillment Orders API v2021-12-28**
- **Vendor Direct Fulfillment Shipping API v2021-12-28**
- **Vendor Direct Fulfillment Payments API v1**
- **Vendor Direct Fulfillment Transactions API v2021-12-28**

#### 2. **Marketing Content Management**


- **Purpose:** Add rich marketing content to Amazon product detail pages.
- **APIs:**
- **A+ Content**
- **Catalog Items**

#### 3. **Retail Analytics**


- **Purpose:** Analyze profitability and cost-per-product.
- **Reports:**
- **GET_VENDOR_SALES_REPORT**
- **GET_VENDOR_NET_PURE_PRODUCT_MARGIN_REPORT**
- **GET_VENDOR_TRAFFIC_REPORT**
- **GET_VENDOR_FORECASTING_REPORT**
- **GET_VENDOR_INVENTORY_REPORT**
- **GET_VENDOR_REAL_TIME_SALES_REPORT**
- **GET_VENDOR_REAL_TIME_TRAFFIC_REPORT**
- **GET_VENDOR_REAL_TIME_INVENTORY_REPORT**
- **Notifications (Events):**
- `DETAIL_PAGE_TRAFFIC_EVENT`
- `ITEM_INVENTORY_EVENT_CHANGE`
- `ITEM_SALES_EVENT_CHANGE`

#### 4. **Brand Analytics**


- **Reports:**
- **GET_BRAND_ANALYTICS_MARKET_BASKET_REPORT**
- **GET_BRAND_ANALYTICS_SEARCH_TERMS_REPORT**
- **GET_BRAND_ANALYTICS_REPEAT_PURCHASE_REPORT**

#### 5. **Performance Management**


- **Reports:**
- **GET_PROMOTION_PERFORMANCE_REPORT**
- **GET_COUPON_PERFORMANCE_REPORT**

#### 6. **Catalog Management**


- **APIs:**
- **Catalog Items**
- **Listing Items**
- **Product Type Definitions**
- **Notifications (Events):**
- `LISTINGS_ITEM_ISSUES_CHANGE`
- `PRODUCT_TYPE_DEFINITIONS_CHANGE`

#### 7. **Vendor Retail Procurement**


- **APIs:**
- **Vendor Transaction Status**
- **Vendor Orders**
- **Vendor Shipments**
- **Vendor Invoices**

---

### Important Notes for Developers

- **Authorization:** Ensure the SP-API applications are properly authorized to


access vendor groups.
- **API Versioning:** Pay attention to the specific API versions (e.g., v1, v2021-
12-28) as these may have different functionalities or endpoints.
- **Notifications:** Familiarize yourself with the specific event notifications
applicable to each use case, as they are key to automating processes and
maintaining consistent data handling.
- **Reports Management:** Utilize the provided report APIs effectively for data
analysis, and ensure to handle responses within the established limits outlined in
the API documentation.

---

This condensed overview is intended to aid developers in understanding how to


integrate the relevant SP-API components into their applications efficiently while
focusing on vendor-specific use cases and functionalities. For more detailed
implementation, refer to the developer documentation at the provided URL.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-vendor-use-


cases#retail-analytics:
# Summary of Amazon Selling Partner API (SP-API) - Vendor Use Cases

## Overview
The Amazon Selling Partner API (SP-API) provides integration for vendors to manage
their operations programmatically, analyze data, and enhance their marketing
efforts. Here, we outline the key APIs, notifications, and reports critical for
vendor use cases, particularly focusing on the **Retail Analytics** and **Brand
Analytics** sections.

## Key Use Cases and APIs

### Vendor Direct Fulfillment


**Purpose**: Manage direct fulfillment operations.

- **APIs**:
- **Vendor Direct Fulfillment Inventory API v1**
- **Vendor Direct Fulfillment Orders API v2021-12-28**
- **Vendor Direct Fulfillment Shipping API v2021-12-28**
- **Vendor Direct Fulfillment Payments API v1**
- **Vendor Direct Fulfillment Transactions API v2021-12-28**

### Marketing Content Management


**Purpose**: Add marketing content to Amazon product detail pages.

- **APIs**:
- **A+ Content**
- **Catalog Items**

### Retail Analytics


**Purpose**: Analyze profitability and product cost to guide business strategy.

- **Notifications**:
- `DETAIL_PAGE_TRAFFIC_EVENT`
- `ITEM_INVENTORY_EVENT_CHANGE`
- `ITEM_SALES_EVENT_CHANGE`

- **Reports**:
- `GET_VENDOR_SALES_REPORT`
- `GET_VENDOR_NET_PURE_PRODUCT_MARGIN_REPORT`
- `GET_VENDOR_TRAFFIC_REPORT`
- `GET_VENDOR_FORECASTING_REPORT`
- `GET_VENDOR_INVENTORY_REPORT`
- `GET_VENDOR_REAL_TIME_SALES_REPORT`
- `GET_VENDOR_REAL_TIME_TRAFFIC_REPORT`
- `GET_VENDOR_REAL_TIME_INVENTORY_REPORT`

### Brand Analytics


**Purpose**: Make data-driven decisions to increase sales and customer loyalty.

- **Reports**:
- `GET_BRAND_ANALYTICS_MARKET_BASKET_REPORT`
- `GET_BRAND_ANALYTICS_SEARCH_TERMS_REPORT`
- `GET_BRAND_ANALYTICS_REPEAT_PURCHASE_REPORT`

### Performance
**Purpose**: Get performance data on coupons and promotions.

- **Reports**:
- `GET_PROMOTION_PERFORMANCE_REPORT`
- `GET_COUPON_PERFORMANCE_REPORT`

### Catalog Management


**Purpose**: Enhancing product listings while managing errors and optimizing the
catalog.

- **APIs**:
- **Catalog Items**
- **Listing Items**
- **Product Type Definitions**

- **Notifications**:
- `LISTINGS_ITEM_ISSUES_CHANGE`
- `PRODUCT_TYPE_DEFINITIONS_CHANGE`

### Vendor Retail Procurement


**Purpose**: Manage vendor retail business operations.

- **APIs**:
- **Vendor Transaction Status**
- **Vendor Orders**
- **Vendor Shipments**
- **Vendor Invoices**

## Important Classes and Functions


- Each API endpoint contains relevant classes, methods, and usages which are
outlined in their respective documentation sections. Be sure to review the specific
API documentation for detailed implementation guidance and coding examples.

## Key Concepts
- **Notifications**: Events that trigger specific actions or alerts are crucial for
real-time data tracking and management.
- **Reports**: These provide analytical data to drive decision-making in sales and
inventory management.

## Important Notes
- Ensure you handle authorization properly when accessing the SP-API.
- Monitor API limits to avoid throttling and errors.
- Always validate the data returned from the API calls to ensure accuracy in your
applications.
- Regularly check for updates in the API documentation due to potential changes in
APIs or report structures.
This summary encapsulates the essential information required to leverage the Amazon
SP-API for vendor-related tasks, focusing on retail analytics and key operations.
For more detailed implementation, refer to the specific API documentation.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-vendor-use-


cases#brand-analytics:
# Amazon Selling Partner API (SP-API) Vendor Use Cases Summary

## Overview
The Amazon Selling Partner API (SP-API) allows developers to integrate with the
Amazon ecosystem to access and manage data related to their selling partner
accounts. It provides capabilities for retrieving and posting data to the seller’s
account using various API endpoints.

### Key APIs for Vendor Use Cases


1. **Vendor Direct Fulfillment APIs**
- **Vendor Direct Fulfillment Inventory API v1**
- **Vendor Direct Fulfillment Orders API v2021-12-28**
- **Vendor Direct Fulfillment Shipping API v2021-12-28**
- **Vendor Direct Fulfillment Payments API v1**
- **Vendor Direct Fulfillment Transactions API v2021-12-28**

2. **Brand Analytics Reports**


- **GET_BRAND_ANALYTICS_MARKET_BASKET_REPORT**
- **GET_BRAND_ANALYTICS_SEARCH_TERMS_REPORT**
- **GET_BRAND_ANALYTICS_REPEAT_PURCHASE_REPORT**

3. **Retail Analytics Reports**


- **GET_VENDOR_SALES_REPORT**
- **GET_VENDOR_NET_PURE_PRODUCT_MARGIN_REPORT**
- **GET_VENDOR_TRAFFIC_REPORT**
- **GET_VENDOR_FORECASTING_REPORT**
- **GET_VENDOR_INVENTORY_REPORT**
- **GET_VENDOR_REAL_TIME_SALES_REPORT**
- **GET_VENDOR_REAL_TIME_TRAFFIC_REPORT**
- **GET_VENDOR_REAL_TIME_INVENTORY_REPORT**

### Important Concepts


- **Notifications**: The API allows for various notification events which can be
used to trigger actions in response to data changes.
- Events relevant to Retail Analytics include:
- `DETAIL_PAGE_TRAFFIC_EVENT`
- `ITEM_INVENTORY_EVENT_CHANGE`
- `ITEM_SALES_EVENT_CHANGE`

- **Reports**: Reports provide essential insights into the performance of products,


marketing strategies, and inventory at a glance. Ensure to integrate necessary
report fetching functionalities.

### Important Notes


- **API Versioning**: Always use the correct API version in your requests to ensure
compatibility and access to the latest features.
- **Authentication**: Proper authorization is required for all API requests; ensure
that your application has the necessary credentials and permissions set up.
- **Rate Limits**: Be aware of the API’s usage limits to avoid throttling or
temporary bans.
### Code Example Snippet (Python) for Fetching Brand Analytics Report
```python
import requests

# Example function to fetch Brand Analytics Market Basket Report


def fetch_brand_analytics_market_basket_report(access_token):
url = "https://sellingpartnerapi-na.amazon.com/analytics/v1/reports/brand-
analytics-market-basket"
headers = {
'Authorization': f'Bearer {access_token}',
'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)

if response.status_code == 200:
return response.json() # return the report data
else:
raise Exception(f"Error: {response.status_code} - {response.text}")

# Usage
access_token = "YOUR_ACCESS_TOKEN_HERE"
report_data = fetch_brand_analytics_market_basket_report(access_token)
print(report_data)
```

This code snippet demonstrates a basic approach to extracting a report from the
Brand Analytics API endpoint using Python. Replace `YOUR_ACCESS_TOKEN_HERE` with a
valid token.

### Conclusion
This summary provides a clear understanding of the key functionalities available
through the SP-API for vendors and offers examples to facilitate integration.
Ensure to explore the respective documentation for each API to optimize your
implementation.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-vendor-use-


cases#performance:
### Summary of SP-API Vendor Use Cases

#### Overview
The Selling Partner API (SP-API) enables vendors to manage and analyze data related
to their Amazon selling partner accounts programmatically. The following use cases
outline the essential APIs, notifications, and reports relevant for vendor
operations.

### Key Use Cases and APIs

1. **Vendor Direct Fulfillment**


- **Purpose**: Manage direct fulfillment operations programmatically through web
service integration.
- **APIs**:
- `Vendor Direct Fulfillment Inventory API v1`
- `Vendor Direct Fulfillment Orders API v2021-12-28`
- `Vendor Direct Fulfillment Shipping API v2021-12-28`
- `Vendor Direct Fulfillment Payments API v1`
- `Vendor Direct Fulfillment Transactions API v2021-12-28`
- **Notifications**: None
- **Reports**: None

2. **Marketing Content Management**


- **Purpose**: Add rich marketing content to Amazon product detail pages and
share brand stories.
- **APIs**:
- `A+ Content API`
- `Catalog Items API`
- **Notifications**: None
- **Reports**: None

3. **Retail Analytics**
- **Purpose**: Analyze profitability and cost-per-product to inform business
strategy.
- **Reports**:
- `GET_VENDOR_SALES_REPORT`
- `GET_VENDOR_NET_PURE_PRODUCT_MARGIN_REPORT`
- `GET_VENDOR_TRAFFIC_REPORT`
- `GET_VENDOR_FORECASTING_REPORT`
- `GET_VENDOR_INVENTORY_REPORT`
- `GET_VENDOR_REAL_TIME_SALES_REPORT`
- `GET_VENDOR_REAL_TIME_TRAFFIC_REPORT`
- `GET_VENDOR_REAL_TIME_INVENTORY_REPORT`
- **Notifications**:
- `DETAIL_PAGE_TRAFFIC_EVENT`
- `ITEM_INVENTORY_EVENT_CHANGE`
- `ITEM_SALES_EVENT_CHANGE`

4. **Brand Analytics**
- **Purpose**: Increase sales and customer loyalty through informed data-driven
decisions.
- **Reports**:
- `GET_BRAND_ANALYTICS_MARKET_BASKET_REPORT`
- `GET_BRAND_ANALYTICS_SEARCH_TERMS_REPORT`
- `GET_BRAND_ANALYTICS_REPEAT_PURCHASE_REPORT`
- **APIs**: None

5. **Performance**
- **Purpose**: Retrieve performance data related to coupons and promotions.
- **Reports**:
- `GET_PROMOTION_PERFORMANCE_REPORT`
- `GET_COUPON_PERFORMANCE_REPORT`
- **APIs**: None

6. **Catalog Management**
- **Purpose**: Manage Amazon listings, optimize catalogs, and reduce errors.
- **APIs**:
- `Catalog Items API`
- `Listings Items API`
- `Product Type Definitions API`
- **Notifications**:
- `LISTINGS_ITEM_ISSUES_CHANGE`
- `PRODUCT_TYPE_DEFINITIONS_CHANGE`
- **Reports**: None

7. **Vendor Retail Procurement**


- **Purpose**: Manage vendor retail business operations programmatically.
- **APIs**:
- `Vendor Transaction Status API`
- `Vendor Orders API`
- `Vendor Shipments API`
- `Vendor Invoices API`
- **Reports**: None

### Important Notes


- **API Versions**: Ensure to utilize the correct version of APIs as specified.
- **Rate Limits**: Adhere to the usage plans and rate limits specified within each
API documentation to avoid throttling or access issues.
- **Authorization**: Proper authorization is required for accessing SP-API
functionalities. Follow authorization workflows as outlined in the documentation.

### Conclusion
This summary encapsulates key vendor use cases, APIs, notifications, and reports
available through the SP-API. It is essential to follow documentation guidelines
and best practices provided in the specific API references for successful
integration and usage. Developers are advised to keep abreast of updates in API
releases to ensure compatibility and functionality.

For further details, please refer to the [Amazon SP-API


Documentation](https://developer-docs.amazon.com/sp-api/docs/sp-api-vendor-use-
cases#performance).
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-vendor-use-


cases#catalog-management:
## Summary of Amazon Selling Partner API (SP-API) Vendor Use Cases

The Amazon Selling Partner API (SP-API) offers various functionalities for managing
and gathering data from a customer's selling account. Below, I summarize the key
aspects from the available documentation regarding integration and usage focusing
on code snippets, API structures, and essential concepts.

### Code Samples and API Snippets

To use SP-API effectively, here are some relevant APIs corresponding to the vendor
use cases along with their primary functions:

#### Vendor Direct Fulfillment APIs


1. **Vendor Direct Fulfillment Inventory API v1**
- **Usage**: Manage inventory for direct fulfillment.
- **Endpoint**: `POST /vendor/directFulfillment/inventory`

2. **Vendor Direct Fulfillment Orders API v2021-12-28**


- **Usage**: Process orders for direct fulfillment.
- **Endpoint**: `POST /vendor/directFulfillment/orders`

3. **Vendor Direct Fulfillment Shipping API v2021-12-28**


- **Usage**: Manage shipping processes for orders.
- **Endpoint**: `POST /vendor/directFulfillment/shipping`

4. **Vendor Direct Fulfillment Payments API v1**


- **Usage**: Handle payment processing for orders.
- **Endpoint**: `POST /vendor/directFulfillment/payments`
5. **Vendor Direct Fulfillment Transactions API v2021-12-28**
- **Usage**: Track transactions related to direct fulfillment.
- **Endpoint**: `GET /vendor/directFulfillment/transactions`

#### Catalog Management APIs


- **Catalog Items API**
- **Usage**: Manage Amazon listings, including adding and updating products.
- **Endpoint**: `GET /catalog/2022-04-01/items`

- **Listing Items API**


- **Usage**: Create, update, and delete listing items.
- **Endpoint**: `POST /listings/2021-08-01/items`

- **Product Type Definitions API**


- **Usage**: Access information regarding product types.
- **Endpoint**: `GET /productTypeDefinitions/2020-09-01/`

### Important Classes and Functions


- **Events**: Various notification events that help in reacting to changes:
- `LISTINGS_ITEM_ISSUES_CHANGE`
- `PRODUCT_TYPE_DEFINITIONS_CHANGE`

These events allow developers to handle specific changes dynamically.

### Key Concepts


1. **API Roles**: Understanding the different roles and permissions required to
manage vendor operations.
- **Vendor Role**: Allows handling vendor-specific data.
- **Reporting Role**: Essential for accessing analytical reports and performance
metrics.

2. **Notifications and Events**: Configuring webhooks to be notified about key


changes in your vendor account helps to automate processes.

3. **Rate Limits**: It is crucial to respect API rate limits to avoid throttling


and errors in data retrieval and posting.

### Important Notes and Caveats


- **Integration Complexity**: Setting up SP-API can be intricate, and it is
advisable to thoroughly read the documentation on authorization and authentication
before starting.
- **API Versioning**: Different APIs have different versions, always ensure to use
the latest version available to avoid discrepancies.
- **Sandbox Testing**: Utilize the SP-API Sandbox for testing your application
without affecting live vendor data.

This summary provides a structured view of how to approach using the Amazon SP-API
focusing particularly on vendor use cases and catalog management. For more detailed
implementations, it is essential to refer to the specific API documentation linked
within the Amazon Developer Documentation.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-vendor-use-


cases#vendor-retail-procurement:
### Summary of SP-API Vendor Use Cases
The Selling Partner API (SP-API) provides a way for vendors to manage their direct
fulfillment operations and gather data from their selling partner accounts through
various APIs. The following summarizes key information relevant for developers
working with SP-API in Python.

---

#### **Key APIs for Vendor Retail Procurement**

1. **Vendor Orders API**


- **Purpose**: To manage vendor order data.
- **Usage**: Use this API to retrieve and update order details.

2. **Vendor Invoices API**


- **Purpose**: To handle invoicing for vendors.
- **Usage**: Utilize this API to submit and retrieve invoices.

3. **Vendor Shipments API**


- **Purpose**: To manage shipment data for orders.
- **Usage**: Access this API for tracking shipment statuses.

4. **Vendor Transaction Status API**


- **Purpose**: To check the status of various transactions.
- **Usage**: Implement this API to monitor the state of transactions related to
vendor operations.

---

#### **Important Notifications and Reports**

- **Notifications**: Currently, there are no specific events listed for Vendor


Retail Procurement.

- **Reports**: Specific reporting capabilities were not detailed for Vendor Retail
Procurement; consider utilizing other available report APIs for business insights.

---

#### **Code Examples**

While no explicit code samples were provided in the content, here are generic
examples to illustrate how interaction with the Vendor APIs would typically look in
Python:

**Example: Fetching Vendor Orders**


```python
import requests

# Example function to retrieve vendor orders


def fetch_vendor_orders(seller_id):
url = f"https://sellingpartner.api.amazon.com/vendor/orders"
headers = {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
}

response = requests.get(url, headers=headers)


if response.status_code == 200:
return response.json()
else:
print(f"Error fetching orders: {response.status_code}, {response.text}")
```

**Example: Submitting a Vendor Invoice**


```python
def submit_vendor_invoice(invoice_data):
url = f"https://sellingpartner.api.amazon.com/vendor/invoices"
headers = {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
}

response = requests.post(url, json=invoice_data, headers=headers)


if response.status_code == 201:
return response.json()
else:
print(f"Error submitting invoice: {response.status_code}, {response.text}")
```

---

#### **Key Concepts**

- **Authentication**: All requests to the SP-API must include an authorization


token generated through the Selling Partner Appstore workflow.

- **Rate Limits**: Be aware of the endpoint-specific rate limits to avoid


throttling.

- **Data Formatting**: Requests and responses are primarily in JSON format; ensure
correct formatting is adhered to as per API specifications.

---

#### **Notes and Caveats**

- **No Notifications Available**: For Vendor Retail Procurement use cases, there
are currently no specific notifications available.

- **Limited Report Availability**: There is an indication of N/A for reports under


Vendor Retail Procurement; ensure to explore other API categories for analytical
requirements.

- **Python SDKs**: Use existing SDK tutorials for Python to streamline your API
integration process where applicable.

---

This structured summary should assist developers in effectively utilizing the SP-
API for Vendor Retail Procurement while providing an overview of essential
components and code snippets for practical implementation.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/faq:


### Summary of Amazon Selling Partner API (SP-API) Documentation
#### Overview
The Selling Partner API (SP-API) allows developers to access and manage data from
customers' selling accounts, automating various tasks related to selling on Amazon.
This includes gathering data and posting updates to the selling accounts.

#### Key Concepts


1. **Selling Partner API (SP-API)**: A set of REST APIs that provide access to
Amazon's selling partner data.
2. **Roles**: Various roles defined for developers, such as Brand Analytics,
Pricing, and Inventory Tracking roles.
3. **Authorization**: Essential for accessing restricted data and managing
application permissions.

#### Important Classes, Functions, and Methods


- **Authorization Methods**: Various workflows for authorizing applications with
the Selling Partner API.
- **User Authorization**: Gain access to user account data.
- **Application Authorization**: Establish permissions to access vendor groups.

- **API Endpoints**: Examples include `GET /orders`, `POST /products`, etc. Each
endpoint allows specific operations like retrieving order details or updating
product listings.

- **Error Handling**: Developers are advised to handle common errors, such as


authorization errors, and to apply best practices in API consumption.

#### Code Examples and API Usage


Developers will find several **tutorials** that demonstrate how to use the Python
SDK for automating SP-API calls. Examples typically encompass:

- **Automate SP-API Calls Using Python SDK**:


```python
import sp_api

# initial configuration
client = sp_api.SellingPartnerApi(
refresh_token='YOUR_REFRESH_TOKEN',
lwa_app_id='YOUR_LWA_APP_ID',
lwa_client_secret='YOUR_LWA_CLIENT_SECRET',
aws_access_key='YOUR_AWS_ACCESS_KEY',
aws_secret_key='YOUR_AWS_SECRET_KEY',
role_arn='YOUR_ROLE_ARN'
)

# Example of retrieving orders


response = client.get_orders(...)
```

#### Usage Guidelines


- **Connection**: Ensure that the connections to SP-API are secure and compliant
with Amazon's security protocols.
- **Rate Limits**: Understand and apply limits to the number of requests your
application makes to avoid throttling.
- **Data Management**: Handle sensitive information securely and comply with data
protection laws.

#### Important Notes and Caveats


- **API Versions**: APIs may have different versions; developers must ensure they
are using the correct version for their application.
- **Deprecated Features**: Be aware of features that may be deprecated and check
the changelog regularly for updates.
- **Legal Compliance**: Follow Amazon’s Acceptable Use Policy and Developer Policy
when utilizing the APIs.

#### FAQs and Support


- Common questions and answers can be found in the FAQ section specific to each API
type, such as Fulfillment APIs, Reports, etc.

This structured summary provides essential information for understanding and using
the Amazon Selling Partner API effectively. Developers are encouraged to refer to
the official documentation for detailed API references, error codes, and additional
usage scenarios.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/faq#faq-for-sp-api-


vendors:
### Summary of Amazon Selling Partner API (SP-API) Documentation

#### User Intent


The Amazon SP-APIs allow developers to gather data from customer selling partners
and post data back to the customer’s selling account. This summary focuses on
resources relevant to Python.

#### Key Concepts


- **SP-API Definition**: The Selling Partner API (SP-API) is a set of APIs enabling
the integration of sales and operational workflows with Amazon Seller Central and
Vendor Central.
- **Authorization**: SP-API requires authorization for applications to access
vendor groups. This can involve self-authorization or various authoring workflows.
- **Usage Limits**: There are caps on API calls to ensure system performance and
fair use. Rate limits are crucial to avoid denial of service issues.

#### Important Classes, Functions, and Methods


- **Authorization Functions**:
- `authorizeApplication`: Authorizes an application to access vendor accounts.
- `revokeAuthorization`: Revokes access permissions.

- **API Call Functions**:


- `getMarketplaceIds()`: Helps retrieve marketplace IDs for various regions.
- `callSPAPI()`: Central method for making calls to different SP-API endpoints.

#### API Snippets


**Connecting to the Selling Partner API using Python**:
Here’s a simplified code snippet to initiate a connection:

```python
import requests

def call_sp_api(endpoint, params, headers):


response = requests.get(endpoint, headers=headers, params=params)
return response.json()

# Example usage
endpoint = 'https://sellingpartnerapi-na.amazon.com/orders/v0/orders'
params = {'MarketplaceIds': 'ATVPDKIKX0DER'}
headers = {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
}

orders = call_sp_api(endpoint, params, headers)


print(orders)
```

#### Important Notes


- **Error Handling**: Developers should implement error handling for API response
code errors (e.g., 400, 401). Use specific catch blocks to handle authorization
errors, request errors, etc.
- **Environment Setup**: Ensure proper installation of libraries necessary for API
calls (like `requests` for Python).
- **Request Rate Limits**: Monitor the number of requests to avoid hitting rate
limits. Each API has specific limitations based on its usage.
- **Compliance with Acceptable Use Policy**: All applications should comply with
Amazon's acceptable use policy and data protection policies to avoid penalties or
bans.

#### Tutorials and Learning Resources


- **Automate SP-API Calls**: Several tutorials are available, including methods to
automate calls using Python SDK. Refer to `Automate your SP-API Calls Using a
Python SDK` for detailed instructions.

### Conclusion
The Selling Partner API provides a robust way to integrate with Amazon's selling
platform. This summary covers essential points for effective usage, focusing on
Python integration, authorization, error handling, and API usage limits. Developers
are encouraged to explore more detailed sections of the documentation for advanced
use cases and best practices.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/seller-central-urls:


# Summary of Amazon Selling Partner API (SP-API) Documentation: Seller Central URLs

## Seller Central URLs

This section provides the URLs to access Seller Central for different marketplaces.
These URLs are crucial for managing sales, orders, and inventory through the Seller
Central platform via the Selling Partner API (SP-API).

### North America


- **Canada:** [https://sellercentral.amazon.ca](https://sellercentral.amazon.ca)
- **United States:**
[https://sellercentral.amazon.com](https://sellercentral.amazon.com)
- **Mexico:**
[https://sellercentral.amazon.com.mx](https://sellercentral.amazon.com.mx)
- **Brazil:**
[https://sellercentral.amazon.com.br](https://sellercentral.amazon.com.br)

### Europe
- **Spain:** [https://sellercentral-europe.amazon.com](https://sellercentral-
europe.amazon.com)
- **United Kingdom:**
[https://sellercentral-europe.amazon.com](https://sellercentral-europe.amazon.com)
- **France:** [https://sellercentral-europe.amazon.com](https://sellercentral-
europe.amazon.com)
- **Netherlands:**
[https://sellercentral.amazon.nl](https://sellercentral.amazon.nl)
- **Germany:** [https://sellercentral-europe.amazon.com](https://sellercentral-
europe.amazon.com)
- **Italy:** [https://sellercentral-europe.amazon.com](https://sellercentral-
europe.amazon.com)
- **Sweden:** [https://sellercentral.amazon.se](https://sellercentral.amazon.se)
- **South Africa:**
[https://sellercentral.amazon.co.za](https://sellercentral.amazon.co.za)
- **Poland:** [https://sellercentral.amazon.pl](https://sellercentral.amazon.pl)
- **Egypt:** [https://sellercentral.amazon.eg](https://sellercentral.amazon.eg)
- **Turkey:**
[https://sellercentral.amazon.com.tr](https://sellercentral.amazon.com.tr)
- **Saudi Arabia:**
[https://sellercentral.amazon.sa](https://sellercentral.amazon.sa)
- **United Arab Emirates:**
[https://sellercentral.amazon.ae](https://sellercentral.amazon.ae)
- **India:** [https://sellercentral.amazon.in](https://sellercentral.amazon.in)
- **Belgium:**
[https://sellercentral.amazon.com.be](https://sellercentral.amazon.com.be)

### Far East


- **Singapore:** [https://sellercentral.amazon.sg](https://sellercentral.amazon.sg)
- **Australia:**
[https://sellercentral.amazon.com.au](https://sellercentral.amazon.com.au)
- **Japan:**
[https://sellercentral.amazon.co.jp](https://sellercentral.amazon.co.jp)

## Important Notes for Developers


- URLs provided correspond to different Seller Central regions and are critical for
API integration.
- Ensure you are utilizing the correct URL based on the target marketplace to
access appropriate functionalities and data.
- The links are dynamic; check for the latest updates to URLs or any changes in the
Seller Central platform.

## Conclusion
When working with the Amazon SP-API, proper use of these Seller Central URLs is
necessary for effective data management and interaction with the Amazon selling
platform. Always refer to the specific URLs aligned with your marketplace to ensure
seamless operations.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/vendor-central-urls:


### Amazon Selling Partner API (SP-API) - Vendor Central URLs

#### Overview
The Selling Partner API (SP-API) helps gather and post data to customers' selling
accounts through various endpoints designed specifically for vendors.

#### Vendor Central URLs by Marketplace

**North America:**
- **Canada:** [vendorcentral.amazon.ca](https://vendorcentral.amazon.ca)
- **United States:** [vendorcentral.amazon.com](https://vendorcentral.amazon.com)
- **Mexico:** [vendorcentral.amazon.com.mx](https://vendorcentral.amazon.com.mx)
- **Brazil:** [vendorcentral.amazon.com.br](https://vendorcentral.amazon.com.br)

**Europe:**
- **Spain:** [vendorcentral.amazon.es](https://vendorcentral.amazon.es)
- **United Kingdom:**
[vendorcentral.amazon.co.uk](https://vendorcentral.amazon.co.uk)
- **France:** [vendorcentral.amazon.fr](https://vendorcentral.amazon.fr)
- **Belgium:** [vendorcentral.amazon.com.be](https://vendorcentral.amazon.com.be)
- **Netherlands:** [vendorcentral.amazon.nl](https://vendorcentral.amazon.nl)
- **Germany:** [vendorcentral.amazon.de](https://vendorcentral.amazon.de)
- **Italy:** [vendorcentral.amazon.it](https://vendorcentral.amazon.it)
- **Sweden:** [vendorcentral.amazon.se](https://vendorcentral.amazon.se)
- **South Africa:**
[vendorcentral.amazon.co.za](https://vendorcentral.amazon.co.za)
- **Poland:** [vendorcentral.amazon.pl](https://vendorcentral.amazon.pl)
- **Egypt:** [vendorcentral.amazon.me](https://vendorcentral.amazon.me)
- **Saudi Arabia:** [vendorcentral.amazon.me](https://vendorcentral.amazon.me)
- **Turkey:** [vendorcentral.amazon.com.tr](https://vendorcentral.amazon.com.tr)
- **UAE:** [vendorcentral.amazon.me](https://vendorcentral.amazon.me)
- **India:** [vendorcentral.in](https://www.vendorcentral.in)

**Far East:**
- **Singapore:** [vendorcentral.amazon.com.sg](https://vendorcentral.amazon.com.sg)
- **Australia:** [vendorcentral.amazon.com.au](https://vendorcentral.amazon.com.au)
- **Japan:** [vendorcentral.amazon.co.jp](https://vendorcentral.amazon.co.jp)

#### Key Concepts


- **SP-API**: A suite of APIs that provide vendors with the ability to interact
with the Amazon ecosystem for managing their products, orders, and account
information.
- **Endpoint Structure**: Each marketplace has a specific URL for accessing its
vendor central, facilitating localized access for vendors.

#### Important Notes


- The API is designed specifically for vendor applications, so ensure the correct
URL is used based on marketplace location.
- All URLs lead to publicly accessible areas of Vendor Central, where users can
manage their selling activities and data.

This summary focuses on the main aspects needed by a developer utilizing the SP-API
related to vendor central. It provides the necessary URLs for each marketplace and
highlights the importance of correct usage based on the vendor's geographic market.
No specific code snippets or API functions were detailed as the primary content
revolved around vendor URLs.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/feed-type-values :


### Summary of the Feed Type Values Documentation for Amazon Selling Partner API
(SP-API)

**Overview:**
The Selling Partner Feeds API allows developers to submit various types of data for
processing. Each feedType value indicates the specific processing method for the
feed submitted.

**Available Feed Types:**


The following table lists the feed categories and their respective feed types:
| **Feed Category** | **Available Feed Types** |
|-------------------|--------------------------|
| **Business** | RFQ_UPLOAD_FEED (Seller only) |
| **Easy Ship** | POST_EASYSHIP_DOCUMENTS (Seller only) |
| **Fulfillment by Amazon** | POST_FULFILLMENT_ORDER_REQUEST_DATA,
POST_FULFILLMENT_ORDER_CANCELLATION_REQUEST_DATA, POST_FBA_INBOUND_CARTON_CONTENTS,
POST_FLAT_FILE_FBA_CREATE_REMOVAL, POST_FLAT_FILE_FULFILLMENT_ORDER_REQUEST_DATA,
POST_FLAT_FILE_FULFILLMENT_ORDER_CANCELLATION_REQUEST_DATA (Seller only) |
| **Invoicing** | UPLOAD_VAT_INVOICES (Seller only) |
| **Listings** | POST_STD_ACES_DATA, POST_FLAT_FILE_BOOKLOADER_DATA,
POST_FLAT_FILE_INVLOADER_DATA, POST_FLAT_FILE_LISTINGS_DATA,
POST_FLAT_FILE_CONVERGENCE_LISTINGS_DATA,
POST_FLAT_FILE_PRICEANDQUANTITYONLY_UPDATE_DATA, POST_INVENTORY_AVAILABILITY_DATA,
JSON_LISTINGS_FEED, POST_PRODUCT_OVERRIDES_DATA, POST_PRODUCT_PRICING_DATA,
POST_PRODUCT_DATA, POST_PRODUCT_IMAGE_DATA, POST_PRODUCT_RELATIONSHIP_DATA,
POST_UIEE_BOOKLOADER_DATA (Seller only for many) |
| **Order** | POST_FLAT_FILE_ORDER_ACKNOWLEDGEMENT_DATA,
POST_FLAT_FILE_PAYMENT_ADJUSTMENT_DATA, POST_FLAT_FILE_FULFILLMENT_DATA,
POST_EXPECTED_SHIP_DATE_SOD_FLAT_FILE, POST_INVOICE_CONFIRMATION_DATA,
POST_ORDER_ACKNOWLEDGEMENT_DATA, POST_PAYMENT_ADJUSTMENT_DATA,
POST_ORDER_FULFILLMENT_DATA, POST_EXPECTED_SHIP_DATE_SOD (Seller only) |

**Key Points:**
- Each feed type is unique and designed for specific interactions with the SP-API,
providing flexibility for various use cases.
- **Retention Policy**: Feed result documents generated from all feed types are
retained for 28 days. This is important for compliance and auditing purposes but
requires users to manage and archive data accordingly.

**Important Notes:**
- Ensure to check for the **seller-only** restriction on several feed types, as not
all feed types will be available for all users or vendors.
- Proper error handling should be implemented as per SP-API best practices to
manage potential issues during API requests.

**Usage Considerations:**
- To implement feeds using this API, developers should familiarize themselves with
the structure, required fields, and data formats specific to each feed type.
- Make use of sample codes or API clients (e.g., Python SDK) to streamline
integration and reduce errors during implementation.

This summary provides insight into the Feed Type Values necessary for utilizing the
Selling Partner API effectively, focusing on practical implementation and relevant
considerations for developers.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/register-as-a-public-


developer:
### Summary of "Register as a Public SP-API Developer"

#### Overview

The Selling Partner API (SP-API) allows public developers to build applications
that integrate with Amazon's selling platform. Public developers must follow
specific guidelines, register their applications, and ensure compliance with
Amazon’s policies.
#### Registration Process

1. **Eligibility**:
- Only Professional Selling Accounts can register for SP-API; individual
accounts are ineligible.
- You must be a primary account user to complete the registration.

2. **Public Developer Requirements**:


- **Website**: Provide a publicly accessible URL detailing the services offered
by your application.
- **Architecture Review**: Developers intending to build applications with
restricted SP-API roles must undergo an architecture review, detailing data flows
and protection measures for Personally Identifiable Information (PII).

3. **Completing the Developer Profile**:


- Sign in to Seller Central and navigate to "Develop Apps."
- Fill the developer registration form, which involves:
- **Contact Information**
- **Data Access Details**: Select "Public Developer."
- **Roles**: Indicate the roles that apply to your application (restricted
roles require justification).
- **Use Cases**: Describe your application's functionality.
- **Security Controls**: Respond to security measures within your application.
- Agree to the Amazon Services API Developer Agreement and submit your
registration.

4. **Review Process**:
- Applications will undergo a review based on the information provided, ensuring
compliance with Amazon’s Acceptable Use Policy and Data Protection Policy.
- Applications for Restricted (PII) Roles undergo a three-stage review process:
- **Stage 1**: Business criteria review.
- **Stage 2**: Information/security architecture questions.
- **Stage 3**: Security architecture review (includes a live meeting).

5. **Waiting Period**: Notifications will be sent to the admin email regarding the
status and any additional information required.

#### Important Notes

- Developers applying for Restricted Roles (e.g., Direct-to-Consumer Shipping and


Tax Invoicing) must justify the need for PII.
- Complete all fields in the Developer Profile truthfully; inaccurate information
can lead to denial.
- If contacted for additional information, provide a response within five days to
avoid case closure.
- Developers must handle data obtained from SP-API according to Amazon’s policies;
periodic reviews may occur.
- Successful calls to Restricted API sections are necessary to maintain access to
Restricted SP-API roles.

#### Key Concepts

- **SP-API**: This handles both the retrieval and posting of data in the selling
partner’s account.
- **OAuth**: Authorization protocol used for public developers to allow sellers to
authorize their applications.
- **Public Developer**: A developer whose applications are available for use by
other sellers, requiring a public website.
- **Restricted Roles**: Certain API roles that require additional scrutiny and
justification due to the handling of sensitive data.

### Conclusion

This summary serves as a guide for developers interested in registering as public


SP-API developers. It outlines key steps in the registration process, expectations
for application functionality, and compliance requirements concerning data security
and handling. Ensure you follow these guidelines closely for a successful
integration with Amazon’s selling services.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/register-as-a-


private-developer:
### Summary of Registering as a Private SP-API Developer

#### Overview
To register as a Private Selling Partner API (SP-API) Developer, you must complete
the Developer Profile in Seller Central. This registration allows you to build
applications that integrate your company with Amazon Services APIs.

#### Key Requirements


- **Eligible Accounts**: Only Professional Selling Accounts can register for SP-
API. Individual accounts are not eligible. You can upgrade your account if needed.
- **Primary Account User**: You must be a primary account user to complete the
registration process.

#### Steps to Register as a Private Developer

1. **Sign in to Seller Central**:


- Use your account credentials to log in.

2. **Access Developer Profile**:


- Navigate to **Apps and Services** > **Develop Apps**.
- If no Developer Profile exists, select **Proceed to Developer Profile**;
otherwise, choose **View profile**.

3. **Complete the Developer Registration Form**:


- **Contact Information**: Provide your organization’s contact details.
- **Data Access Details**:
- Select "Private Developer" from the dropdown.
- List all of your organization's developer IDs if applicable.
- **Roles**: Choose applicable roles as per your organization needs. Refer to
"Roles in the Selling Partner API" for definitions.
- **Use Cases**: Describe how you will utilize the SP-API.
- **Security Controls**: Outline your security measures.
- **Agreements**: Check the confirmation box for policies.

4. **Registration Confirmation**:
- Click **Register**.
- Await further communication from Amazon regarding the approval or additional
information requirements.

#### Developer Profile Review


- The approval or denial of access to the SP-API is based on the details provided
in your Developer Profile, focusing on compliance with Amazon’s policies.
- It is crucial to respond to any additional requests for information within five
days, or your case may be closed without resolution.

#### Important Notes


- If you have multiple developer IDs as a previous Amazon Marketplace Web Service
developer, there's no need to submit a separate Developer Profile for each ID.
- Familiarize yourself with all policies (Acceptable Use Policy, Data Protection
Policy, Developer Agreement) since these govern the usage of the API and affect
your registration.

#### Caveats
- Registration is contingent on providing accurate information. Misleading or
incomplete entries could result in denial.
- Ensure that your use cases and security controls reflect actual practices to
maintain eligibility.

### Key Concepts and Terms


- **Professional Selling Account**: Required account type for SP-API registration.
- **Developer Profile**: A form filled with your company's details and needs
concerning the Amazon Services APIs.
- **Roles**: Describes the capacities your application will engage with within the
Amazon system.
- **Use Cases**: Scenarios detailing how your integration will function.

### Conclusion
This registration process lays the groundwork for using the SP-API to access and
manage data effectively. Adhering to the outlined steps and understanding the
critical elements should facilitate a smoother registration experience.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/register-as-a-


private-developer#complete-the-developer-profile:
# Amazon Selling Partner API (SP-API) Developer Registration Overview

## Purpose
The Amazon SP-API allows developers to gather data from and post data to a
customer's selling account with various Amazon Services APIs. This summary outlines
the steps for registering as a private developer for the SP-API.

## Key Registration Requirements


- **Eligibility**: Only Professional Selling Accounts can register to develop with
the SP-API. Individual accounts are not eligible; account upgrades are available.
- **Primary Account User**: The registration must be completed by a primary account
user.

## Steps to Register as a Private Developer

1. **Sign In to Seller Central**: Use your seller account credentials.


- For regional access, refer to the appropriate Seller Central URL.

2. **Navigate to Developer Profile**:


- Open the menu: Select **Apps and Services** > **Develop Apps**.

3. **Create or Update Developer Profile**:


- If a Developer Profile does not exist, choose **Proceed to Developer
Profile**. If it does, select **View Profile**.
- Complete the Developer Profile form, including:
- **Contact Information**
- **Data Access**:
- Select "Private Developer: I build application(s) that integrate my own
company with Amazon Services APIs."
- **Developer IDs**: List your organization's developer IDs if applicable.
- **Roles**: Choose roles that apply to your organization; refer to the
provided definitions in the SP-API documentation.
- **Use Cases**: Describe your applications' intended functionalities.
- **Security Controls**: Specify the security measures you will implement.
- **Agreement Confirmation**: Check to confirm acceptance of Amazon's policies
(Developer Agreement, Acceptable Use Policy, Data Protection Policy).

4. **Submit Registration**:
- Click **Register** to submit your profile.

5. **Post-Registration**:
- Await Amazon's evaluation and follow-up communication. If contacted for more
information, respond within five days to keep your case active.

## Developer Profile Review and Criteria


- The approval or denial of access to the SP-API is based on the provided Developer
Profile, including:
- Application functionality
- Compliance with Amazon’s policies
- The review process prioritizes data security.
- Non-responsiveness within five days may lead to case closure and unchanged access
status.

## Important Notes
- If you have previous experience as an Amazon Marketplace Web Service developer,
you do not need separate Developer Profiles for each developer ID.
- Accurate and truthful completion of the Developer Profile is crucial for further
communication and approval.

## Security and Policy Compliance


- Ensure you understand and comply with:
- **Acceptable Use Policy**
- **Data Protection Policy**
- **Amazon Services API Developer Agreement**

This registration process is essential for accessing the Selling Partner API
features as a private developer and maintaining compliance with Amazon's security
measures.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/register-as-a-


private-developer#developer-profile-review:
# Summary of Amazon Selling Partner API Developer Registration

## Registration as a Private SP-API Developer

### Overview
Private SP-API Developers create applications that integrate solely with their own
company's Amazon Services APIs. Only Professional Selling Accounts can register;
Individual accounts are ineligible. Registration must be completed by a primary
account user.

### Steps to Register as a Private Developer


1. **Sign in to Seller Central**: Access the Seller Central platform through the
regional URLs.
2. **Navigate to Developer Profile**:
- Select "Apps and Services" from the menu.
- Choose "Develop Apps."
- If no Developer Profile exists, select "Proceed to Developer Profile." If a
profile exists, choose "View profile."

3. **Complete the Developer Registration Form**:


- **Contact Information**: Provide your organization’s contact details.
- **Data Access Details**: Choose "Private Developer" from the dropdown.
- **Current Developer IDs**: List any existing developer IDs.
- **Roles Selection**: Specify applicable roles based on the organization’s
needs. Refer to Roles in the Selling Partner API.
- **Use Cases**: Describe how you intend to use the data and APIs.
- **Security Controls**: Outline the security measures that will be taken.
- Agree to Amazon's policies by checking the box.
- Click "Register."

4. **Wait for Case Updates**: Notifications will be sent to the registered admin's
email. Respond to requests for additional information within five days to avoid
case closure.

### Developer Profile Review


- The decision to grant or deny SP-API access depends on the Developer Profile's
accuracy and compliance with Amazon policies.
- Cases remain open for five days if not responded to, after which they are
automatically closed.

### Important Notes


- The Developer Profile collects essential information regarding organizational
contact, data requirements, and security protocols to ensure compliance with
Amazon’s Acceptable Use Policy and Data Protection Policy.
- If previously registered as an Amazon Marketplace Web Services developer, no
additional Developer Profile submission is required for each developer ID.

### Key Concepts


- **Developer Profile**: A crucial step where users provide organizational
information to gain access to SP-API.
- **Roles**: Identifiers of the various permissions and functionalities that apply
to the organization within the SP-API ecosystem.
- **Policies**: Compliance with Amazon's Acceptable Use Policy, Data Protection
Policy, and Developer Agreement is vital for access approval.

### Important Caveats


- Only one developer profile is needed for multiple IDs if previously a developer
in Amazon Marketplace Web Services.
- If a developer does not respond in time, their case will close, leaving their SP-
API access unchanged.

> Developers should ensure all fields in the Developer Profile are filled out
truthfully and accurately to improve their chances of access approval.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/register-as-a-


private-vendor:
### Summary of Registration as a Private SP-API Vendor

#### Overview
The Selling Partner API (SP-API) allows developers to create applications that can
gather and post data to a customer's selling account. The process for registering
as a private vendor developer involves completing a Developer Profile on Vendor
Central.

#### Registration Process


1. **Access Vendor Central**:
- Navigate to the Vendor Central URL for your marketplace.
- Sign in using the credentials associated with the vendor group you wish to
integrate with.

2. **Developer Profile Completion**:


- Choose **API Integration** from the Integration menu.
- If a Developer Profile hasn't been completed, select **Proceed to Developer
Profile**, or **View Profile** if it has already been started.
- Fill in the Developer Registration Form:
- **Contact Information**: Organizational contact details.
- **Data Access**: Select "Private Developer" for applications that integrate
internally.
- **Existing Developer IDs**: Provide the organization's developer IDs (comma-
separated) if applicable.
- **Roles**: Select applicable roles; additional restricted roles may be
needed for Direct Fulfillment scenarios.
- **Use Cases**: Describe how the application will be used.
- **Security Controls**: Outline security measures that will be implemented.
- Acknowledge your agreement with Amazon's policies (API Developer Agreement,
Acceptable Use Policy, Data Protection Policy) by checking the relevant box.
- Click **Register**.

3. **Await Feedback**:
- Amazon will evaluate the submitted information, which might require additional
documentation or information. Case updates will be communicated via the email
associated with the account.

#### Important Notes


- **Authorization Limits**: Private vendors can authorize other vendor groups if
they possess admin permissions, but must stay within specified authorization
limits. If these limits are exceeded, vendors must either revoke an existing
authorization or contact Vendor Central Support.
- **Response Timeliness**: If contacted for further information, respond within
five days to avoid case closure.
- **API Access Determination**: Access to SP-API is based on the application's
functionality and compliance with Amazon's policies regarding data usage and
security.

#### Developer Profile Review


The decision regarding SP-API access hinges on the accuracy of the Developer
Profile information. Amazon prioritizes data security and will not disclose
specific eligibility criteria.

#### Code Examples & API Snippets


- Currently, there are no specific code examples or API snippets explicitly
provided within the content. Developers will use the SDKs (Python, C#, Java) as
indicated in the tutorials mentioned for automating API calls.

#### Key Concepts


- **Private Vendor Applications**: These applications are self-authorized and
intended for internal integration within an organization.
- **Restricted Roles**: These are required if handling sensitive information,
particularly in Direct Fulfillment scenarios.

This summarized documentation provides essential steps and considerations for


developers aiming to leverage the SP-API for private vendor applications on
Amazon's platform.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/register-as-a-


private-vendor#content:
### Summary of Amazon Selling Partner API (SP-API) Registration as a Private Vendor

#### Overview
To register as a private vendor for the SP-API, follow the instructions to complete
your Developer Profile. This profile collects essential information regarding your
organization, including contact details, data access requirements, and security
compliance with Amazon's policies.

#### Registration Steps

1. **Access Vendor Central**:


- Sign in with your Vendor Central account.
- Navigate to the Integration menu and select API Integration.

2. **Complete Developer Profile**:


- If it's your first time, choose **Proceed to Developer Profile**; otherwise,
select **View Profile**.
- Fill out the developer registration form with the following sections:
- **Contact Information**.
- **Data Access Details**:
- From the dropdown, select "Private Developer: I build application(s) that
integrate my own company with Amazon Services APIs."
- Provide your organization's developer IDs (if applicable).
- **Roles**: Select applicable roles from the defined list (refer to Roles in
the SP-API for descriptions).
- **Use Cases**: Describe how your application will use the APIs.
- **Security Controls**: Outline the security measures your organization has
in place.
- Agree to Amazon's policies by checking the confirmation box.
- Press **Register** to submit your profile.

3. **Wait for Review**:


- Amazon will evaluate your submitted information. Updates will be communicated
through email.
- If additional information is required, respond within five days to keep your
case open.

#### Important Notes

- **Authorization Limits**: Private vendor developers can authorize others in


vendor groups if they possess admin permissions on both accounts. If you reach the
limit, you must remove existing self-authorizations or contact Vendor Central
Support for assistance.

- **Data Protection and Compliance**: Your eligibility for the Selling Partner API
is influenced by how well you comply with Amazon's Acceptable Use Policy and Data
Protection Policy. Security and data protection are prioritized in the review
process.

- **Role Restrictions**: Vendors utilizing Direct Fulfillment must register for


additional restricted roles that involve personally identifiable information (PII).
Compliance with additional security controls is mandatory.

#### Key Concepts

- **Developer Profile**: A critical step in registration that ensures your


organization meets Amazon's policies for security and data access.

- **Roles**: Specific permissions that govern what your application can access
within the API. Understanding the roles available can help tailor your
application’s functionality while remaining compliant with Amazon’s policies.

This summary condenses the essential registration processes and compliance


requirements for becoming a Private SP-API Vendor, critical for developers who aim
to integrate their applications with Amazon’s services. For more detailed
information on API usage and specific functionalities, refer to the relevant
sections in the SP-API documentation.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/register-as-a-


private-vendor#complete-the-private-vendor-developer-profile:
### Summary of Amazon SP-API Private Vendor Registration

#### Overview
To register as a Private SP-API Vendor, your application must be self-authorized
and intended for use solely within your organization. This process involves
completing a Developer Profile that collects essential information about your
organization, data requirements, and security compliance.

#### Steps to Complete the Private Vendor Developer Profile

1. **Access Vendor Central:**


- Navigate to your marketplace's Vendor Central.
- Sign in using the credentials for the Vendor Central account associated with
the vendor group you wish to access.

2. **Navigate to API Integration:**


- Select **Integration** from the menu and then **API Integration**.

3. **Complete the Developer Profile Registration Form:**


- **Contact Information:** Enter your organization’s contact details.
- **Data Access Details:**
- Choose **Private Developer:** for applications integrating your own company
with Amazon Services APIs.
- If already a developer, provide all developer IDs, separated by commas.
- **Roles Selection:** Select appropriate roles from the predefined list. Note
that Direct Fulfillment may require additional restricted roles.
- **Use Cases:** Describe the intended use cases for your application.
- **Security Controls:** Outline your organization's security measures.
- **Agreement Confirmation:** Confirm your understanding and agreement to
Amazon’s API Developer Agreement, Acceptable Use Policy, and Data Protection
Policy.
4. **Submit the Registration:**
- After completing the form, click **Register**.

5. **Monitor Registration Case:**


- The admin email will receive updates regarding the registration case. Respond
to any information requests within five days to avoid case closure.

#### Developer Profile Review


Amazon evaluates the profile based on:
- Application functionality
- Compliance with policies
- Data security considerations

The decision to grant or deny access is primarily grounded in these aspects. No


detailed explanation for decisions will be provided, emphasizing the importance of
adhering to security protocols.

#### Important Notes


- **Authorization Limits:** Private vendor developers can authorize other vendor
groups but are limited by the number assigned. Exceeding this limit requires either
removal of an existing authorization or contacting Vendor Central Support.
- **Restricted Data:** To access APIs that require handling Personally Identifiable
Information (PII), additional information on your security measures will be needed.

#### Additional Considerations


- Vendors should reference the **Registration Recommendations** in the SP-API
Registration overview.
- Cases not responded to within five days may be closed without changes to API
access.

### Conclusion
This registration process is essential for developers looking to integrate their
services with Amazon’s platforms while ensuring that security and compliance with
Amazon’s policies are upheld. Following these guidelines will facilitate a smooth
registration experience.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/register-as-a-


private-vendor#register-as-a-private-vendor-developer:
# Summary of Registering as a Private SP-API Vendor

## Overview
To register as a Private Selling Partner API (SP-API) Vendor, you need to complete
the Developer Profile that collects essential information regarding your
organization and the data you require from Amazon Services APIs. Private vendor
applications are self-authorized and are intended for internal use or by third-
party developers on behalf of your organization.

## Step-by-Step Registration Process

1. **Sign In to Vendor Central**: Go to your marketplace’s Vendor Central URL and


sign in with your vendor group credentials.

2. **Access API Integration**: From the Integration menu, select "API Integration".

3. **Complete Developer Profile**:


- If prompted, proceed to complete the Developer Profile showing that you are a
private developer.
- Fill in the required fields:
- **Contact Information**: Your organization’s contact info.
- **Data Access Details**: Select "Private Developer: I build
application(s) that integrate my own company with Amazon Services APIs."
- **Developer IDs**: If applicable, list all your developer IDs, separated
by commas.
- **Select Roles**: Choose applicable roles (e.g., Finance and Accounting
Role, Inventory and Order Tracking Role).
- **Use Cases**: Describe how you intend to use the API.
- **Security Controls**: List the security measures in place to protect
user data.
- Confirm agreement to Amazon’s policies and choose “Register”.

4. **Post Submission**: Amazon will review your submission. Be prepared to provide


additional information if requested, and respond to any inquiries within five days
to avoid case closure.

## Important Notes
- **Authorization Limits**: Private vendor developers can authorize other vendor
groups if they have admin permissions on both accounts, capped at a maximum number.
For additional authorization, either remove existing authorizations or contact
Vendor Central Support.
- **Review Process**: The decision for granting access hinges on alignment with the
Acceptable Use Policy and Data Protection Policy. Incomplete or delayed responses
can lead to unresolved cases.
- **Restrictions on Direct Fulfillment**: Additional roles with restricted access
may apply if you're integrating Direct Fulfillment services. Be sure to refer to
the documentation for restricted data handling.

## Additional Resources
- **Documentation**: Consult the SP-API Registration overview for detailed
recommendations.
- **Terminology and Roles**: Refer to the definitions of developer types and roles
to understand your application's potential capabilities and limitations.
- **Policies**: Familiarize yourself with Amazon's Acceptable Use Policy and Data
Protection Policy to ensure compliance.

This summarized guide is intended to assist developers in successfully navigating


the registration process for using the Amazon Selling Partner API as a private
vendor.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/register-as-a-


private-vendor#developer-profile-review:
### Summary: Registering as a Private Selling Partner API (SP-API) Vendor

#### Overview
The Amazon Selling Partner API (SP-API) allows vendors to integrate their
applications with Amazon services, facilitating data access and updates for their
selling accounts. This document focuses on the registration process to become a
Private SP-API Vendor.

#### Key Concepts

- **Private Vendor Applications**: These are applications used solely within your
organization and are self-authorized. Commonly, they are developed using in-house
IT resources or by a third-party agency for the vendor.
- **Developer Profile**: This profile collects necessary information such as
contact details, data access requirements, security measures, and agreement
compliance with Amazon policies.

#### Registration Steps

1. **Access Vendor Central**:


- Navigate to the appropriate Vendor Central portal for your marketplace.

2. **Sign In**:
- Use credentials for the Vendor Central account associated with the required
vendor group.

3. **API Integration**:
- From the Integration menu, select "API Integration."
- Choose to either proceed to the Developer Profile if you haven’t completed it,
or to view an existing profile.

4. **Complete the Developer Registration Form**:


- **Contact Information**: Enter the primary contacts for your organization.
- **Data Access Details**: Select "Private Developer: I build application(s)
that integrate my own company with Amazon Services APIs" from the dropdown.
- **Developer IDs**: If applicable, input all developer IDs (comma-separated).
- **Select Roles**: Identify applicable roles from the options that pertain to
your organization.
- Note: Direct Fulfillment vendors require additional roles due to the
handling of Personally Identifiable Information (PII).
- **Use Cases**: Provide detailed descriptions of the functions of your
application.
- **Security Controls**: Describe your organization's security measures for data
handling.
- **Agreement Confirmation**: Agree to Amazon's policies by checking the
relevant box.
- **Registration Submission**: Click "Register" to submit the profile.

5. **Wait for Evaluation**:


- Amazon evaluates the submitted information and may request additional
documentation or clarification. Responses need to be made within five days to avoid
case closure.

#### Important Notes

- The approval or denial of API access is based primarily on the Developer Profile
information provided, specifically functionality compliance with Amazon’s
Acceptable Use Policy and Data Protection Policy.
- Vendors may grant authorization to other vendor groups, but there’s a limit on
the number of authorizations possible without remedial action such as removing an
existing authorization or contacting Vendor Central Support to increase limits.
- Communication regarding the application process will be directed to the admin
email associated with the Vendor account.

#### Conclusion
Understanding the registration process and correctly filling out the Developer
Profile is essential for gaining access to the SP-API for Private Vendors. Ensure
that all provided information is truthful and comprehensive to facilitate smooth
approval.
For more details, refer to the Amazon Services API Developer Agreement and related
policies.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/check-the-status-of-


your-request-to-register-as-a-developer:
### Summary of Developer Registration Request Status for Amazon SP-API

#### Key Procedures for Checking Developer Registration Status

**Types of Applications:**
1. **Public and Private Seller Applications:**
- Applications available to the public or self-authorized by a seller.

2. **Private Vendor Applications:**


- Applications available solely to your organization, self-authorized.

---

#### How to Check the Status

**For Public and Private Seller Applications:**


1. Sign in to **Seller Central** using your developer credentials.
2. Navigate to **Develop Apps**.
3. In the Developer Central page, follow the instructions in the **Your developer
registration is under review** banner.
- The banner will update to reflect your application's current status.

**For Private Vendor Applications:**


1. Sign in to **Vendor Central** using the credentials used for developer
registration.
2. In the **Integration** menu, select **API Integration**.
3. Follow the instructions in the **Your developer registration is under review**
banner to check application status.

---

#### Important Notes:


- After submitting a request, Amazon evaluates the provided information and will
either approve or deny the request.
- If the request is denied, you can view the specific reasons and address them by
following the provided link to missed questions and controls before resubmitting
your Developer Profile.
- For additional details, reference the **Terminology** section where further
definitions of application types can be found.

---

#### Additional Information


This document focuses primarily on the process of checking the status of your
developer registration request and does not include code snippets or API-specific
functions, as the focus is on the registration process itself.

For developers interested in programming with the Amazon Selling Partner API (SP-
API) in Python, please ensure all required dependencies and setup procedures of the
specific APIs you wish to use are followed as per respective API documentation.
### Conclusion
This guide provides the necessary steps for developers to check their registration
status with Amazon SP-API effectively, along with defining the types of
applications that may be involved in the process. For further development
questions, refer to the comprehensive SP-API documentation available on Amazon’s
Developer Hub.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/registering-your-


application:
# Summary of the Amazon Selling Partner API (SP-API) Application Registration

## Overview
The Amazon SP-API enables developers to integrate and interact with the Selling
Partner ecosystem, allowing for data gathering and posting to a customer's selling
account.

## Application Types
1. **Public Applications:** Available for authorization by sellers or vendors.
2. **Private Seller Applications:** Available only to the developer's organization
and self-authorized.
3. **Private Vendor Applications:** Available only to the developer's organization
and self-authorized.

## Registration Steps

### For Public and Private Seller Applications:


1. Sign in to **Seller Central** with developer credentials.
2. Navigate to **Develop Apps**.
3. Click on **Add new app client**.
4. Complete the registration form.
- Note: After selecting the API type, check the appropriate boxes for Sellers,
Vendors, or both.

### For Private Vendor Applications:


1. Sign in to **Vendor Central** with your developer registration credentials.
2. Go to the **Integration** menu and select **API Integration**.
3. Click on **Add new app client**.
4. Complete the registration form.

## Important Notes and Caveats


- As of April 2022, both public and private applications are subject to
**authorization limits** and **restrictions**. More details can be found under the
**Authorization Limits** section.
- Only **primary account users** can complete the application registration.

## Key Concepts
- **Authorization Limits:** Understand the limitations and requirements for API
access when developing applications.
- **Seller Central vs. Vendor Central:** Be aware of the differences in
registration depending on the type of partnership (seller vs. vendor).

## Conclusion
This documentation outlines how to register applications for the Amazon SP-API
effectively, emphasizing the distinctions between application types and the
necessary steps for registration. Proper awareness of authorizations and roles is
crucial to ensure successful integration with the Selling Partner ecosystem.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/updating-your-


application-information:
### Summary of Updating Your Application Information - Amazon Selling Partner API

#### Overview
This documentation provides guidance on how to update application information
within the Amazon Selling Partner API (SP-API) after registering your application.
There are different procedures for private vendor applications and all other types
of applications.

#### Key Steps to Update Application Information

1. **For Private Vendor Applications**:


- Sign in to **Vendor Central** using your developer credentials.
- Navigate to the **Integration menu** and select **API Integration**.
- On the **Developer Central** page, find the application you wish to update and
choose **Edit app**.
- On the **App registration page**, modify the necessary values and select
**Save and exit**.

2. **For All Other Applications** (including public applications and private seller
applications):
- Sign in to **Seller Central** using your developer credentials.
- Go to **Develop Apps**.
- On the **Developer Central** page, locate the application to be updated and
click **Edit app**.
- On the **App registration page**, change the required values and click **Save
and exit**.

#### Important Notes


- Ensure that you use the correct credentials associated with your application type
(Vendor Central vs. Seller Central).
- Be aware of the types of fields that can be updated, as the specific options
might vary based on the application type.

#### Additional Concepts


- **OAuth Redirect URI**: An important field that can be modified during the update
process. This URI is where authorization responses are sent and must be a valid
endpoint registered in the application settings.

#### Conclusion
This guide focuses on updating application information in the Amazon SP-API,
including specific instructions for different application types, along with some
critical notes to ensure seamless updates. For detailed references regarding
authorization or error handling, users should review the general SP-API
documentation.

### Important Links


To access more information, visit the official API documentation: [Amazon SP-API
Documentation](https://developer-docs.amazon.com/sp-api/docs/updating-your-
application-information) (Note: Ensure confirmation of current links and API
references since this summary is based on the provided content.)
_____________________________
Summary of URL: https://developer-docs.amazon.com/sp-api/docs/updating-your-
application-information#update-your-application-information:
### Summary of Updating Application Information in Amazon SP-API

**Objective:**
Guide to update application information for Amazon Selling Partner API (SP-API)
applications.

---

#### Key Processes

1. **Updating Application Information:**

- **Private Vendor Applications:**


- **Sign In:** Access Vendor Central using your registration credentials.
- **Navigate:** Go to the Integration menu and select API Integration.
- **Edit App:** On the Developer Central page, select the application to
update and click "Edit app."
- **Update and Save:** Make necessary changes on the App registration page and
select "Save and exit."

- **Other Applications (Public/Seller Applications):**


- **Sign In:** Access Seller Central with your developer credentials.
- **Navigate:** Select Develop Apps on the Developer Central page.
- **Edit App:** Choose the relevant application and click "Edit app."
- **Update and Save:** Adjust values as needed and select "Save and exit."

---

#### Important Notes

- The steps for updating differ between private vendor applications and other
applications, which is crucial to follow based on the type of application being
used.
- Additional knowledge of terminology may be beneficial for understanding the
context and terms involved in the application process.

---

#### Reference Links

- [Amazon SP-API
Documentation](https://developer-docs.amazon.com/sp-api/docs/updating-your-
application-information#update-your-application-information)

This summary serves as a quick reference guide for developers looking to update
their application information in the Amazon Selling Partner API environment,
ensuring clarity and a streamlined process tailored for application types.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/updating-your-


application-information#steps-for-private-vendor-applications:
**Summary of Updating Application Information for Amazon SP-API**

This page provides guidance on how to update application information for Amazon
Selling Partner API (SP-API) applications, specifically focusing on two types:
private vendor applications and other applications (public or private seller
applications).

### Key Steps for Updating Application Information

#### For Private Vendor Applications:


1. **Sign In:** Use your credentials to sign in to Vendor Central.
2. **API Integration:** Navigate to the Integration menu and select API
Integration.
3. **Edit App:** On the Developer Central page, find the application you wish to
update and click on “Edit app.”
4. **Update Values:** Go to the App registration page, update the required values,
and then select "Save and exit."

#### For All Other Applications:


1. **Sign In:** Sign in to Seller Central with your developer credentials.
2. **Develop Apps:** Go to the Develop Apps section.
3. **Edit App:** Locate the application you want to update and click “Edit app.”
4. **Update Values:** Modify the values as needed on the App registration page and
select "Save and exit."

### Important Concepts


- **OAuth Redirect URI:** This is a critical part of the application registration
process where you specify the URI that the user is redirected to after
authorization.
- **Application Types:**
- **Private Vendor Applications:** These are self-authorized and only accessible
by your organization.
- **Public and Private Seller Applications:** Other types which may have
different update procedures.

### Notes
- It is important to have the correct credentials for signing into either Seller
Central or Vendor Central depending on your application type.
- Updating the application information can include adding or modifying URIs and
other data critical to the operation of your application within the Amazon
ecosystem.
- Changes can affect authorization and functionality, so ensure to keep credentials
and application settings secure.

### Additional Information


For further details, developers may refer to the main documentation under
"Terminology" and other sections pertaining to the Selling Partner API.

This curated information should assist in navigating the update process while
ensuring compliance with the relevant policies outlined by Amazon for SP-API
applications.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/updating-your-


application-information#steps-for-all-other-applications:
### Summary: Updating Your Application Information for Amazon SP-API

#### Overview
This document outlines the steps required to update application information for
Amazon's Selling Partner API (SP-API) after registration. There are different
procedures for private vendor applications and other types of applications.

#### Important Concepts


1. **Application Types**:
- **Private Vendor Applications**: Self-authorized and available only to your
organization.
- **All Other Applications**: Includes publicly available applications and
private seller applications.

#### Steps for Updating


1. **Private Vendor Applications**:
- Sign in to **Vendor Central** with developer credentials used for
registration.
- Navigate to the **API Integration** section under the Integration menu.
- On the **Developer Central** page, find the application you wish to update and
select **Edit app**.
- Update the necessary fields on the **App registration page** and select **Save
and exit**.

2. **All Other Applications**:


- Sign in to **Seller Central** with developer credentials.
- Go to **Develop Apps** in the Developer Central section.
- Locate the application you want to modify, click **Edit app**.
- Make necessary updates on the **App registration page** and click **Save and
exit**.

#### Notes for Developers


- Ensure that the details entered during updates are accurate to avoid access
issues.
- Refer to the provided **Terminology** for better understanding and context when
discussing application types and registration processes.

#### Important Considerations


- Accurate and clean updates are essential for maintaining the operational
integrity of the applications.
- Provisions for OAuth redirect Uniform Resource Identifiers (URIs) can be added;
manage these carefully to adhere to SP-API security practices.

This summary serves as a consolidated guide for developers looking to manage their
Amazon SP-API application information effectively.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/rotating-your-apps-


lwa-credentials:
# Summary of Rotating Your Application's LWA Credentials

## Key Concepts

### What is Credential Rotation?


- Credential rotation is the process of periodically updating your application's
Login With Amazon (LWA) credentials (client secrets). This is essential to enhance
security, limiting the lifespan of the credentials if they are exposed or
compromised.

### Importance of Rotation


- Applications must rotate their LWA credentials every 180 days. If the credentials
are not updated before their expiration, the application will lose access to SP-
API, impacting any customers using the application.

## Steps to Rotate LWA Credentials

### Programmatic Rotation


To rotate LWA credentials programmatically, follow the method outlined in the API
documentation for rotating your application's client secret.

### Manual Rotation via Developer Console


1. Sign in to your developer account on Seller Central, Vendor Central, or
Developer Central.
2. Navigate to the Developer Console page listing your applications.
3. In the LWA credentials column, find the expiration alert and select "View."
4. (Optional) Store your existing LWA credentials securely.
5. Click "Rotate secret," read the warning, then confirm by clicking "Rotate
secret" again.
6. View the updated target rotation date on the LWA credentials page.

**Important Notes:**
- After generating a new LWA client secret, update it in your application
immediately. The old credentials will expire seven days after generating new ones.
- Refresh tokens do not need to be recreated, as they remain tied to the LWA client
identifier.

### Error Handling


- If credentials are not rotated in time, API access will be blocked. The following
error may occur:
```json
{
"errors": [
{
"code": "Unauthorized",
"message": "Access to requested resource is denied.",
"details": "The LWA secret token you provided has expired."
}
]
}
```
To resolve, log in to your developer account, navigate to the Developer Console,
and update your credentials.

- Continuing to use old credentials after their expiration can result in:
```json
{
"error_description": "Client authentication failed",
"error": "invalid_client"
}
```
Follow the procedure to update to the new credentials.

## Important Notes/Caveats
- **No Impact on End Users**: Rotating credentials does not require end users to
re-authorize applications.
- **Timeliness**: Ensure that the rotation occurs before the expiration date to
maintain uninterrupted access to SP-API.
- **Security**: Regularly rotating credentials enhances application security and
limits risk exposure.

For further assistance, consult the SP-API Developer Support or access the specific
sections related to rotating LWA credentials in the API documentation.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/viewing-your-


application-information-and-credentials:
### Summary of Viewing Application Information and Credentials for Amazon SP-API

#### Overview
This documentation outlines how to view your application information and
credentials for the Selling Partner API (SP-API). Two types of applications are
discussed: private seller applications and public applications, as well as private
vendor applications.

#### Key Concepts


- **Application Types**:
- **Public Applications**: Applications authorized by a seller or vendor
available to users outside the organization.
- **Private Seller Applications**: Applications available only to your
organization and self-authorized.
- **Private Vendor Applications**: Applications also available only to your
organization and self-authorized.

#### Steps to View Application Information and Credentials

1. **For Private Seller and Public Applications**:


- Sign in to **Seller Central** using your developer credentials.
- Navigate to **Develop Apps**.
- The Developer Central page will display information about your applications.
- To retrieve your Login with Amazon (LWA) credentials, select **View** under
**LWA credentials** for the desired application. Your **LWA client identifier** and
**client secret** will be shown.

2. **For Private Vendor Applications**:


- Sign in to **Vendor Central** with your developer registration credentials.
- Choose **API Integration** from the Integration menu.
- The Developer Central page will display application information.
- Select **View** under **LWA credentials** to access your **LWA client
identifier** and **client secret**.

#### Important Notes


- **LWA Credentials**: These credentials are required to request an LWA access
token, which is necessary to authenticate your SP-API calls.
- Make sure to safeguard your LWA client identifier and client secret, as they are
sensitive information used for authorization.

#### Common Use Cases


- **Accessing SP-API**: After obtaining your LWA credentials, you can use them to
authenticate and access various SP-API resources.
- **Integrating with Seller/Vendor Central**: These steps are crucial for
developers looking to integrate SP-API functionality with their applications to
manage seller accounts efficiently.

This guide provides essential insights for developers who need to manage and
operate their applications using the Amazon Selling Partner API. For further
assistance, please refer to relevant sections regarding authorization and API
usage.
_____________________________
Summary of URL: https://developer-docs.amazon.com/sp-api/docs/viewing-your-
application-information-and-credentials#to-view-your-application-information-and-
credentials-for-private-seller-applications-and-for-public-applications-for-any-
type-of-selling-partner:
### Amazon Selling Partner API (SP-API) - Application Information and Credentials
Overview

This document provides information on how to view your application information and
credentials related to the Amazon Selling Partner API (SP-API). The SP-API allows
developers to manage and access vendor and seller data through various APIs.

#### Key Concepts

1. **Application Types**:
- **Public Applications**: These are available to any seller or vendor,
authorized by the respective party.
- **Private Seller Applications**: These applications are restricted to your
organization and are self-authorized.
- **Private Vendor Applications**: Similar to private seller applications, but
specifically for vendors.

2. **Login with Amazon (LWA) Credentials**:


- **Client Identifier**: A unique identifier for your application.
- **Client Secret**: A secret key used to authenticate with the LWA service.
- These credentials are needed to request an LWA access token.

#### Steps to View Application Information

**For Private Seller Applications and Public Applications**:


1. Sign in to **Seller Central** using your developer credentials.
2. Navigate to **Develop Apps** to access information regarding your applications.
3. Select **View** under LWA credentials for the desired application.
4. The LWA client identifier and secret will be displayed for the application,
necessary for access token requests.

**For Private Vendor Applications**:


1. Sign in to **Vendor Central** with the developer registration credentials.
2. Go to the **Integration menu** and select **API Integration**.
3. Click on **View** under LWA credentials for the relevant application.
4. Obtain the LWA client identifier and client secret for access token requests.

#### Important Notes


- The process of viewing application information varies slightly based on the
application type.
- Ensure you securely store your LWA credentials to prevent unauthorized access.
- For full details on utilizing the LWA access token, refer to the **Request a
Login with Amazon access token** section of the documentation.

#### Additional Resources


- For further development assistance, review tutorials related to using SP-API
SDKs, such as those for Python, C#, and Java.
- Understanding authorization flows and error handling is crucial to integrating
SP-API correctly.

This overview serves as a reference for accessing essential information on managing


your application credentials in the Amazon SP-API. Please ensure to consult the
linked sections in the official documentation for in-depth guidance and updates.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/viewing-your-


application-information-and-credentials#to-view-your-application-information-and-
credentials-for-private-vendor-applications:
## Amazon Selling Partner API (SP-API) Documentation Summary

### User Intent


The Amazon Selling Partner APIs allow developers to gather data from a customer's
selling partner using APIs and post data to the customer's selling account. The
focus is on using Python SDKs.

### Key Concepts


- **Application Types**: Applications are categorized into:
- **Public Applications**: Authorized by a seller or vendor, available to the
public.
- **Private Applications**: Self-authorized applications available only to the
organization (including private seller and vendor applications).

- **Login with Amazon (LWA) Credentials**: These are necessary to request LWA
access tokens required to perform API operations.

### Viewing Application Information and Credentials

#### For Private Seller Applications and Public Applications


1. **Sign In**: Use developer credentials to sign in to Seller Central.
2. **Navigate**: Go to Develop Apps.
3. **View Credentials**: Choose View under LWA credentials for your application. It
will display your LWA client identifier and client secret needed for requesting LWA
access tokens.

#### For Private Vendor Applications


1. **Sign In**: Use the credentials used during developer registration to sign in
to Vendor Central.
2. **Integration Menu**: Choose API Integration from the menu.
3. **View Credentials**: Select View under LWA credentials for the desired
application to find your LWA client identifier and client secret.

### Important Usage Notes


- **Credentials**: Both application types require access to LWA client identifier
and client secret for token requests.
- **Token Requests**: Developers need to refer to the API documentation on how to
request a Login with Amazon Access Token using these credentials.

### General API Usage Tips


- Always ensure you are authenticated before making API calls.
- Be aware of the API's version and its rate limits to avoid exceeding usage
limits.
- Review the Terms of Service and acceptable use policies to ensure compliance
while using the SP-API.

### Conclusion
Understanding the structure of the SP-API and the viewing of application
credentials is critical for effectively utilizing the APIs offered by Amazon. The
documentation provides the necessary procedures and precautions to help developers
successfully integrate with the Selling Partner API.
For further details or specific API implementations, developers should refer to the
full documentation available at the provided URL.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/roles-in-the-selling-


partner-api:
## Summary of Roles in the Selling Partner API

### Overview of Roles


- **Definition**: Roles in the Selling Partner API (SP-API) control access to
specific operations and resources. A developer must request and qualify for a role
to access its associated operations, ensuring that sensitive data is protected and
only necessary access is granted.

### Important Roles and Their Descriptions


1. **Brand Analytics**:
- **Description**: Accesses reports on seller/vender performance and consumer
behavior.
- **Example Operations**:
- `createReport`: Requesting reports related to brand analytics, such as
`GET_BRAND_ANALYTICS_SEARCH_TERMS_REPORT`.

2. **Product Listing**:
- **Description**: Manage product listings and catalog-related operations.
- **Example Operations**:
- `getCatalogItem`: Retrieves item information based on attributes.
- `createReport`: Requests reports like `GET_MERCHANT_LISTINGS_INACTIVE_DATA`.

3. **Pricing**:
- **Description**: Determine list prices and automate pricing strategies.
- **Example Operations**:
- `createFeed`: Submit pricing-related feeds, such as `RFQ_UPLOAD_FEED`.
- `getPricing`: Returns pricing information for seller offers.

4. **Amazon Fulfillment**:
- **Description**: Manage shipping related to Fulfillment by Amazon (FBA).
- **Example Operations**:
- `createReport`: Request estimates of FBA fees
(`GET_FBA_ESTIMATED_FBA_FEES_TXT_DATA`).

5. **Buyer Communication**:
- **Description**: Manage communications with buyers.
- **Example Operations**:
- `getMessagingActionsForOrder`: Lists message types for a specified order.

6. **Finance and Accounting**:


- **Description**: Create accounting statements.
- **Example Operations**:
- `getReports`: Retrieves settlement reports.

### Key Concepts


- **Role Assignment**: To use a role, it must be requested through a developer
profile. Each role is tied to specific API operations, feeds, reports, and
notifications.
- **Restricted Roles**: Some roles, such as Direct-to-Consumer Shipping and Tax
Invoicing, use personally identifiable information (PII) and require additional
measures around data protection.

### Important Notes


- **403 Error**: If a requested operation is called without the required role, a
403 HTTP status code will be returned, indicating insufficient permissions.
- **Role Addition**: New roles can be added by updating the developer profile and
reconfiguring the application. Published applications may require relisting after
role updates.
- **Role Qualifying**: The approval process for roles considers the developer's
need and explanation of how data will be securely managed.

### Conclusion
Understanding and correctly implementing roles within the Selling Partner API is
crucial for managing permissions effectively while ensuring compliance with
Amazon's security protocols. Always refer to specific role documentation for a
comprehensive list of associated operations and their implications.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/authorizing-selling-


partner-api-applications:
### Summary of Authorizing Selling Partner API Applications

#### Key Concepts

1. **Authorization Model**:
- The Selling Partner API (SP-API) authorization is based on **Login with
Amazon**, which implements **OAuth 2.0**.
- Applications interact with Amazon's pages and your website to authorize access
to the SP-API.

2. **Application Types**:
- **Public Applications for Sellers**: Authorized by sellers using:
- **Selling Partner Appstore Authorization Workflow**
- **Website Authorization Workflow**
- **Public Applications for Vendors**: Authorized by vendors using the **Website
Authorization Workflow**.
- **Private Applications**: Available only within your organization, authorized
using **Self Authorization**.

3. **Grantless Operations**:
- These operations can be called without explicit authorization from a selling
partner.

#### How to Authorize Applications

1. **Constructing OAuth Authorization URIs**:


- An OAuth authorization URI is essential for redirecting to the Amazon consent
page to authorize the application.

**For Public Seller Applications**:


```plaintext
Seller Central URL = https://sellercentral.amazon.com
OAuth URI = Seller Central URL + /apps/authorize/consent?
application_id={your_application_id}
Example:
https://sellercentral.amazon.com/apps/authorize/consent?
application_id=amzn1.sellerapps.app.0bf296b5-36a6-4942-a13e-EXAMPLEfcd28
```

**For Public Vendor Applications**:


```plaintext
Vendor Central URL = https://vendorcentral.amazon.com
OAuth URI = Vendor Central URL + /apps/authorize/consent?
application_id={your_application_id}
Example:
https://vendorcentral.amazon.com/apps/authorize/consent?
application_id=amzn1.sellerapps.app.0bf296b5-36a6-4942-a13e-EXAMPLEfcd28
```

2. **Regional Authorizations**:
- Construct OAuth authorization URIs specific to the marketplace (e.g.,
**Mexico**):
```plaintext
https://sellercentral.amazon.com.mx/apps/authorize/consent?
application_id=amzn1.sellerapps.app.0bf296b5-36a6-4942-a13e-EXAMPLEfcd28
```

3. **Testing Draft Applications**:


- To test the authorization workflow for draft applications, append
`&version=beta` to the OAuth URI.

#### Important Notes

- Ensure you have the correct **Marketplace URL** for the specific region when
creating authorization URIs.
- Use the **GetMarketplaceParticipations API** to find active marketplaces for a
selling partner.
- For public applications, the authorization workflow is crucial to allow
applications to make calls to the SP-API.

### Example Usage Snippet

Here is an example snippet for constructing the OAuth URI for authorization:
```python
def construct_oauth_uri(seller_central_url, application_id):
return f"{seller_central_url}/apps/authorize/consent?
application_id={application_id}"

# Example for Public Seller Application:


seller_central_url = "https://sellercentral.amazon.com"
application_id = "amzn1.sellerapps.app.0bf296b5-36a6-4942-a13e-EXAMPLEfcd28"
oauth_uri = construct_oauth_uri(seller_central_url, application_id)
print(oauth_uri)
```

This summary captures the essential information regarding authorizing applications


with the Amazon SP API, the types of applications, how to construct the necessary
authorization URIs, and relevant notes for ensuring successful implementations.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/authorizing-selling-


partner-api-applications#how-is-my-application-authorized:
### Summary: Authorizing Selling Partner API Applications
#### Key Concepts

- **Authorization Model**: The Selling Partner API (SP-API) uses OAuth 2.0 via
Login with Amazon to authorize applications. This involves user interactions
through Amazon's consent pages and your own website.

- **Application Types**:
1. **Public Applications for Sellers**: Authorized through:
- Selling Partner Appstore authorization workflow.
- Website authorization workflow (via your own website).

2. **Public Applications for Vendors**: Authorized only through:


- Website authorization workflow.

3. **Private Applications** (for sellers or vendors): Authorized via self-


authorization.

- **Grantless Operations**: Certain operations can be called without explicit


authorization.

#### Constructing OAuth Authorization URIs

OAuth authorization URIs are essential for redirecting users to the Amazon consent
page to grant permissions for your SP-API application.

**Public Seller Applications**:


- **URI Construction**:
```plaintext
Seller Central URL + /apps/authorize/consent?application_id={your application ID}
```
- Example:
```plaintext
https://sellercentral.amazon.com/apps/authorize/consent?
application_id=amzn1.sellerapps.app.0bf296b5-36a6-4942-a13e-EXAMPLEfcd28
```

**Public Vendor Applications**:


- **URI Construction**:
```plaintext
Vendor Central URL + /apps/authorize/consent?application_id={your application ID}
```
- Example:
```plaintext
https://vendorcentral.amazon.com/apps/authorize/consent?
application_id=amzn1.sellerapps.app.0bf296b5-36a6-4942-a13e-EXAMPLEfcd28
```

**Testing Draft Applications**:


- To create a URI for testing a draft application, append `&version=beta`.

- Example:
```plaintext
https://sellercentral-europe.amazon.com/apps/authorize/consent?
application_id=amzn1.sellerapps.app.0bf296b5-36a6-4942-a13e-
EXAMPLEfcd28&version=beta
```

#### Important Notes


- **Regional Authorization**: OAuth authorization is specific to the marketplace;
ensure the correct URI is constructed for the designated marketplace. For example,
for Mexico:
```plaintext
https://sellercentral.amazon.com.mx/apps/authorize/consent?
application_id=amzn1.sellerapps.app.0bf296b5-36a6-4942-a13e-EXAMPLEfcd28
```

- **Use `GetMarketplaceParticipations API`**: To discover active marketplaces for a


selling partner, utilize this API.

This summary presents essential information concerning the authorization process


for Selling Partner API applications, including the structure of necessary requests
and compliance considerations for applications targeting different seller or vendor
types.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/authorizing-selling-


partner-api-applications#construct-an-oauth-authorization-uri:
## Summary of Authorizing Selling Partner API Applications

### Key Concepts

1. **Authorization Model**:
- The Selling Partner API (SP-API) authorization is implemented using OAuth 2.0
through Amazon's "Login with Amazon." Applications must handle interactions with
Amazon's pages and redirect browsers to authorize.
- Applications can be classified as **public** or **private**:
- **Public Applications**: Available to all sellers or vendors; they can be
authorized using either Selling Partner Appstore or website authorization
workflows.
- **Private Applications**: Only available to a specific organization,
authorized through self-authorization.

2. **OAuth Authorization URI**:


- An OAuth authorization URI is necessary for redirecting users to the Amazon
consent page for granting access to the SP-API.
- This URI is constructed based on the type of application (Public Seller,
Public Vendor, Private).

### OAuth Authorization URI Construction

#### For Public Seller Applications


- **Base URL**: Obtain the **Seller Central URL** for the relevant marketplace.
- **URI Format**:
```
{Seller Central URL}/apps/authorize/consent?application_id={your_application_id}
```
- **Example**:
```
https://sellercentral.amazon.com/apps/authorize/consent?
application_id=amzn1.sellerapps.app.0bf296b5-36a6-4942-a13e-EXAMPLEfcd28
```

#### For Public Vendor Applications


- **Base URL**: Obtain the **Vendor Central URL** for the relevant marketplace.
- **URI Format**:
```
{Vendor Central URL}/apps/authorize/consent?application_id={your_application_id}
```
- **Example**:
```
https://vendorcentral.amazon.com/apps/authorize/consent?
application_id=amzn1.sellerapps.app.0bf296b5-36a6-4942-a13e-EXAMPLEfcd28
```

### Important Notes

- **Testing Authorization Workflows**:


- When constructing an OAuth authorization URI for testing, append
`&version=beta` to indicate draft status.
- Example for testing in Europe:
```
https://sellercentral-europe.amazon.com/apps/authorize/consent?
application_id=amzn1.sellerapps.app.0bf296b5-36a6-4942-a13e-
EXAMPLEfcd28&version=beta
```

- **Regional Considerations**:
- Authorizations are regional. Make sure to construct URIs for specific regions
based on the seller's account.
- For example, for a seller in Mexico:
```
https://sellercentral.amazon.com.mx/apps/authorize/consent?
application_id=amzn1.sellerapps.app.0bf296b5-36a6-4942-a13e-EXAMPLEfcd28
```

- **Grantless Operations**:
- Grantless operations can be called without explicit authorization from a
selling partner.

### API Reference

- No specific code snippets or API fields were provided in the content, as the
documentation primarily described processes and URI structures without detailed
code examples.

### Conclusion

This summary provides essential insights into the authorization process for the
Selling Partner API applications, including how to construct OAuth authorization
URIs for both seller and vendor applications, along with important considerations
for testing and regional authorization. Developers should ensure they understand
the differences in application types and the implications of authorization flows
when integrating with the SP-API.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/authorizing-selling-


partner-api-applications#construct-an-oauth-authorization-uri-for-public-seller-
applications:
## Summary of Authorizing Selling Partner API Applications

### Key Concepts


1. **OAuth 2.0 Authorization Model**: The Selling Partner API (SP-API) uses OAuth
2.0 for application authorization. Applications obtain authorization through user
interactions with Amazon's consent pages, either from the Selling Partner Appstore
or the developer's website.

2. **Application Types**:
- **Public Applications for Sellers**: Can be authorized via the **Selling
Partner Appstore authorization workflow** or the **Website authorization
workflow**.
- **Public Applications for Vendors**: Authorized using the **Website
authorization workflow**.
- **Private Applications**: Restricted to a single organization and can self-
authorize.

3. **Grantless Operations**: Some operations can be called without explicit


authorization from a selling partner.

### Constructing OAuth Authorization URIs

An OAuth authorization URI is necessary for redirecting users to Amazon’s consent


page to authorize your application. Here are the steps for constructing the URI for
different application types:

#### 1. Public Seller Applications

- **Get Seller Central URL**: Obtain the Seller Central URL for the corresponding
marketplace. Example: `https://sellercentral.amazon.com`

- **Construct the URI**:


```plaintext
https://sellercentral.amazon.com/apps/authorize/consent?
application_id={your_application_id}
```
Example:
```plaintext
https://sellercentral.amazon.com/apps/authorize/consent?
application_id=amzn1.sellerapps.app.0bf296b5-36a6-4942-a13e-EXAMPLEfcd28
```

#### 2. Public Vendor Applications

- **Get Vendor Central URL**: Obtain the Vendor Central URL for the marketplace.
Example: `https://vendorcentral.amazon.com`

- **Construct the URI**:


```plaintext
https://vendorcentral.amazon.com/apps/authorize/consent?
application_id={your_application_id}
```
Example:
```plaintext
https://vendorcentral.amazon.com/apps/authorize/consent?
application_id=amzn1.sellerapps.app.0bf296b5-36a6-4942-a13e-EXAMPLEfcd28
```

### Notes on Authorization

- **Regional Authorization**: Authorization must be constructed for specific


marketplaces. For example, for a seller in Mexican Seller Central, the
authorization URI must be specific to the Mexican marketplace.

- **Draft Applications**: When testing authorization workflows for applications


still in draft status, append `&version=beta` to the constructed URI.

Example for testing:


```plaintext
https://sellercentral-europe.amazon.com/apps/authorize/consent?
application_id=amzn1.sellerapps.app.0bf296b5-36a6-4942-a13e-
EXAMPLEfcd28&version=beta
```

### Important Considerations

- All public and private seller applications need to be grouped correctly when
constructing the OAuth URI.
- Ensure correct handling of parameters during redirects between your application
and Amazon's OAuth endpoints.
- Utilize the **GetMarketplaceParticipations API** to discover active marketplaces
for a selling partner before constructing the OAuth authorization URI.

### Additional Resources

Developers should refer to:


- **Selling Partner Appstore authorization workflow**
- **Website authorization workflow** guides for more detailed instructions on
implementing the authorization processes.

By understanding these models and correctly constructing OAuth URIs, developers can
effectively integrate with the Amazon SP-API and manage permissions for accessing
seller and vendor data.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/authorizing-selling-


partner-api-applications#construct-an-oauth-authorization-uri-for-public-vendor-
applications:
# Summary of Authorizing Selling Partner API Applications

## Key Concepts
- The **Selling Partner API (SP-API)** utilizes the **OAuth 2.0** authorization
framework through **Login with Amazon**.
- Applications can be categorized as **public** (accessible to all) or **private**
(limited to a specific organization).
- Different **authorization workflows** are applicable based on the type of
application:
- **Public applications for sellers** - Can be authorized via Selling Partner
Appstore or website authorization workflows.
- **Public applications for vendors** - Authorized via website authorization
workflow.
- **Private applications** - Authorized via self-authorization for either sellers
or vendors.
- **Grantless operations** can be performed without explicit authorization from a
selling partner.

## OAuth Authorization URI Construction


An OAuth authorization URI is crucial for redirecting the user to an Amazon consent
page to authorize the application’s access.
### For Public Seller Applications:
1. **Get the Marketplace URL**: (e.g., for the North America marketplace, use
`https://sellercentral.amazon.com`)
2. **Construct the URI**:
```plaintext
https://sellercentral.amazon.com/apps/authorize/consent?
application_id={your_application_id}
```
- **Example**:
```plaintext
https://sellercentral.amazon.com/apps/authorize/consent?
application_id=amzn1.sellerapps.app.0bf296b5-36a6-4942-a13e-EXAMPLEfcd28
```

### For Public Vendor Applications:


1. **Get the Vendor Central URL**: (e.g., for the North America marketplace, use
`https://vendorcentral.amazon.com`)
2. **Construct the URI**:
```plaintext
https://vendorcentral.amazon.com/apps/authorize/consent?
application_id={your_application_id}
```
- **Example**:
```plaintext
https://vendorcentral.amazon.com/apps/authorize/consent?
application_id=amzn1.sellerapps.app.0bf296b5-36a6-4942-a13e-EXAMPLEfcd28
```

### Regional Considerations


- OAuth authorization URIs must target the specific regional marketplace where
authorization is intended. For example, use `https://sellercentral.amazon.com.mx`
for sellers in Mexico.

### Testing Authorization Workflows


To test authorization workflows for applications in draft status, append the
`version=beta` parameter:
```plaintext
https://sellercentral-europe.amazon.com/apps/authorize/consent?
application_id={your_application_id}&version=beta
```

### Note on Application ID


- The application ID can be located in the developer console alongside your
application name.

## Important Notes
- Ensure that your application is capable of securely processing the parameters
passed by Amazon during OAuth interactions.
- Understanding the regional requirements for authorizations is critical for
managing accounts across multiple marketplaces.
- Familiarize yourself with the **GetMarketplaceParticipations API** for
discovering active marketplaces associated with a selling partner's account.

By adhering to these guidelines, developers can effectively configure and test


authorization flows for their applications interfacing with the Amazon Selling
Partner API.
_____________________________
Summary of URL: https://developer-docs.amazon.com/sp-api/docs/application-
authorization-limits:
## Summary of Amazon Selling Partner API (SP-API) Authorization Limits

### Overview

The Amazon Selling Partner API (SP-API) enables developers to interact with
Amazon's selling partner data. This guide discusses authorization limits associated
with public and private applications.

### Key Concepts

1. **Types of Applications**:
- **Private Developer Applications**: Restricted to your organization with
**self-authorization** only. Limited to **10 self-authorizations**.
- **Public Developer Applications for Sellers**: Available for external
authorization by sellers, requiring OAuth. Initially limited to **25 OAuths** when
unlisted; unlimited when listed on the Selling Partner Appstore.
- **Public Developer Applications for Vendors**: Publicly authorized by vendors
without OAuth limits. Has a **default of 10 self-authorizations** for internal
testing.

2. **Authorization Workflows**:
- **Self-Authorization**: Used primarily for private applications and testing.
- **OAuth Authorization**: Requires seller or vendor authorization via the
Selling Partner Appstore or website authorization workflow.

3. **Authorization Limits**:
- The maximum number of authorizations is strictly enforced. If the limit is
reached, additional authorizations cannot be added without removing existing ones.

### Authorization Limit Summary Table

| Application Type | Self-Authorization | OAuth |


|----------------------------------|-------------------|-------------------------|
| Private | 10 | Not applicable |
| Public (Unlisted) | 10 | Seller: 25 / Vendor:
Unlimited |
| Public (Listed) | 10 | Seller: Unlimited / Vendor:
Not applicable |

### Viewing Authorization Limits and Usage

**For Seller Central (public and private seller applications)**:


- Sign into Seller Central with developer credentials.
- Navigate to **Develop Apps**.
- Check the **Authorizations remaining** table and choose **View**.

**For Vendor Central (private vendor applications)**:


- Sign into Vendor Central with developer credentials.
- Select **API Integration** from the Integration menu.
- Choose **View** under the **Authorizations remaining** menu.

### Important Notes

- Developers receive a warning if their application's authorization usage


approaches the limit, prompting them to manage current authorizations effectively.
- It's cautionary to evaluate existing authorizations regularly to ensure that new
authorizations can be added when necessary.

### Additional Resources


- Refer to the full [SP-API Documentation](https://developer-docs.amazon.com/sp-
api/docs/application-authorization-limits) for comprehensive guidance and updates.

This information can assist developers in efficiently managing application


authorizations while ensuring compliance with Amazon SP-API restrictions.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/application-


authorization-limits#authorization-limit-summary-table:
### Summary of Authorization Limits for Amazon Selling Partner API (SP-API)

**Key Concepts:**

1. **Application Types:**
- **Private Developer Applications:**
- Limited to self-authorization.
- Maximum of 10 self-authorizations.
- **Public Developer Applications for Sellers:**
- Available publicly; authorized by sellers.
- Default limit of 25 OAuths when unlisted.
- Unlimited authorizations when listed on the Selling Partner Appstore.
- **Public Developer Applications for Vendors:**
- Available publicly; authorized by vendors.
- Unlimited vendor OAuths.
- Default max of 10 self-authorizations for internal testing.

2. **Authorization Workflows:**
- Private applications rely on internal resources; no OAuth required.
- Public applications must use OAuth via the Selling Partner Appstore or website
authorization workflow.

3. **Authorization Limits Overview:**


- **Self-Authorization Limits:**
- Private: **10**
- Public (unlisted): **10**
- Public (listed): **10**
- **OAuth Limits:**
- Public (unlisted) Seller: **25**
- Public (listed) Seller: **Unlimited**
- Public Vendor: **Unlimited**

4. **Monitoring Authorization Usage:**


- Developers can track authorization usage and limits via the Developer Central
page in Seller Central and Vendor Central.

**Important Notes:**
- **Warning for Reaching Limits:** Developers will receive a warning if their
application's authorization usage approaches the limit.
- Once an application reaches the maximum authorization limit, no new
authorizations can be added unless existing ones are removed.
- Review current authorizations before trying to add new ones if limits are close.

### Usage Example:


While the provided content did not include explicit code examples or snippets, a
typical usage might involve the following pseudocode interactions for
authorization:

```python
# Example pseudocode to demonstrate OAuth authorization

import requests

def authorize_application(client_id, client_secret, redirect_uri):


auth_url = "https://sellingpartner.amazon.com/api/oauth2/token"
payload = {
'grant_type': 'authorization_code',
'code': 'authorization_code_returned',
'client_id': client_id,
'client_secret': client_secret,
'redirect_uri': redirect_uri
}
response = requests.post(auth_url, data=payload)
return response.json()
```

### Important Classes and Functions:


- **Authorization Class:**
- Manages OAuth tokens.
- Method `authorize_application` for obtaining and refreshing tokens.

Using the above information, developers can implement their applications


accordingly while being aware of the limitations in authorization and the
importance of managing their authorization counts efficiently.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/application-


authorization-limits#view-authorization-limits-and-usage:
### Summary of Authorization Limits for Amazon Selling Partner API (SP-API)

#### Key Concepts and Authorization Types

- **Authorization Limits**: Different types of applications have specific limits on


user authorizations and self-authorizations based on the type of Selling Partner
(seller or vendor) they support.

- **Application Types**:
1. **Private Developer Applications**:
- **Restrictions**: Only available to your organization.
- **Self-Authorization Limit**: 10 self-authorizations.
- After reaching the limit, you must update to public or revoke existing self-
authorizations.

2. **Public Developer Applications for Sellers**:


- **Restrictions**: Available to other organizations; requires OAuth
authorization.
- **Self-Authorization Limit**: 10 for testing; 25 OAuth authorizations while
unlisted.
- **Post Listing**: Unlimited authorizations once listed on the Selling
Partner Appstore.
3. **Public Developer Applications for Vendors**:
- **Restrictions**: Available to other organizations; requires OAuth
authorization.
- **Limit on Authorizations**: No limit on vendor OAuths, 10 self-
authorizations for testing.

#### Authorization Limit Summary Table

| Application Type | Self-Authorization Limit | OAuth Limit


|
|----------------------------------|--------------------------|--------------------
----------|
| Private Developer Applications | 10 | Not applicable
|
| Public Developer (Unlisted) | 10 | Seller: 25, Vendor:
Unlimited |
| Public Developer (Listed) | 10 | Seller: Unlimited,
Vendor: Not applicable |

#### Tracking Authorization Usage

Developers can monitor authorization limits and usage by visiting the respective
sections in Seller Central and Vendor Central:

- **Seller Central**:
- Sign in with developer credentials.
- Navigate to Develop Apps → Authorizations remaining → View.

- **Vendor Central**:
- Sign in with your developer registration credentials.
- Go to Integration → API Integration → Authorizations remaining → View.

#### Important Notes

- **Authorization Method**: Public applications must use OAuth for authorization,


which can be conducted via the Selling Partner Appstore or a website.

- **Warning Notifications**: If the authorization usage approaches limits,


developers will receive a warning.

- **Removal of Authorizations**: Once the maximum authorization limit is reached,


new authorizations cannot be added unless existing ones are removed.

#### Code Examples and Snippets

```python
# Example of OAuth flow for authorization
import requests

# Sample function to initiate authorization


def get_oauth_token(client_id, client_secret, redirect_uri):
url = "https://api.amazon.com/auth/o2/token"
headers = {
'Content-Type': 'application/x-www-form-urlencoded',
}
data = {
'grant_type': 'authorization_code',
'client_id': client_id,
'client_secret': client_secret,
'redirect_uri': redirect_uri,
'code': 'AUTHORIZATION_CODE_RECEIVED'
}
response = requests.post(url, headers=headers, data=data)
return response.json() # Returns the access token

# Usage
token_data = get_oauth_token('<CLIENT_ID>', '<CLIENT_SECRET>', '<REDIRECT_URI>')
print(token_data)
```

#### Additional Considerations

- Always ensure to check your current authorization status to avoid application


interruptions due to crossed limits.
- Consider revisiting and optimizing your OAuth usage strategy to keep the
application running smoothly.

This summary captures the essential information regarding authorization limits


within the Amazon Selling Partner API, aimed at developers interfacing with the
APIs.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/application-


authorization-limits#from-seller-central-for-public-applications-and-private-
seller-applications:
## Amazon Selling Partner API (SP-API) - Authorization Limits Summary

### Overview
This documentation covers the authorization limits for public and private
applications in the Amazon Selling Partner API (SP-API). It is essential for
developers to understand these limits to effectively manage their application's
authorizations.

### Authorization Types and Limits


1. **Private Developer Applications**:
- **Authorized for**: Internal use only within your organization.
- **Self-Authorization Limit**: 10 self-authorizations.
- **Note**: Once the limit is reached, either update to a public developer
application or remove an existing self-authorization.

2. **Public Developer Applications**:


- **For Sellers**:
- **Authorized for**: Other organizations.
- **Self-Authorization Limit**: 10 for internal testing.
- **OAuth Limit**: 25 OAuths (when unlisted) | Unlimited (once listed on SP-
API).

- **For Vendors**:
- **Authorized for**: Other organizations.
- **Self-Authorization Limit**: 10 for internal testing.
- **OAuth Limit**: Unlimited.

### Important Notes


- **OAuth Usage**: Only public developer applications require OAuth for
authorization (via Selling Partner Appstore or website authorization workflow).
- **Maximum Authorization Limit**: Once the maximum authorization limit is reached,
no new authorizations can be added. To add new authorizations, existing ones need
to be reviewed and potentially removed.
- **Viewing Authorization Limits**:
- In **Seller Central**:
- Navigate to *Develop Apps* to view the authorizations remaining.
- In **Vendor Central**:
- Navigate to *API Integration* under the Integration menu to check
authorization limits.

### Important Caveats


- If your application's authorization usage approaches the set limit, a warning
will be sent to alert you.
- Different limits apply based on the Selling Partner type (sellers vs. vendors).

### Conclusion
Understanding the authorization limits is crucial for effectively working with the
Amazon SP-API. Developers must keep track of OAuth and self-authorization usage to
ensure seamless operation of their applications in the Seller and Vendor Central
environments.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/application-


authorization-limits#in-vendor-central-for-private-vendor-applications:
# Amazon Selling Partner API (SP-API) Authorization Limits Summary

## Key Concepts

1. **Application Types**:
- **Private Developer Applications**: Available only within your organization
with a limit of **10 self-authorizations**.
- **Public Developer Applications for Sellers**: Available to other
organizations with a limit of **25 OAuths** when unlisted, and **unlimited** once
listed on the Selling Partner Appstore.
- **Public Developer Applications for Vendors**: Publicly available with
**unlimited vendor OAuths** and a default of **10 self-authorizations** for
testing.

2. **Authentication Mechanisms**:
- Self-authorization is restricted to private applications.
- OAuth is required for all public applications (both for sellers and vendors).

3. **Authorization Limits Table**:

| Application Type | Self-Authorization | OAuth


|
|----------------------------------------|---------------------|-------------------
------|
| Private | 10 | Not applicable
|
| Public (unlisted) | 10 | Seller: 25; Vendor:
Unlimited |
| Public (listed) | 10 | Seller: Unlimited;
Vendor: Not applicable |

## Usage of Authorization Limits


- To track authorization limits:
- **For Seller Central**:
1. Sign in with developer credentials.
2. Navigate to **Develop Apps**.
3. View authorizations via the **Authorizations remaining** table.

- **For Vendor Central**:


1. Sign in with the developer credentials used for registration.
2. Select **API Integration** from the Integration menu.
3. Choose **View** from the **Authorizations remaining** menu.

### Important Notes:


- Once an application reaches its maximum authorization limit, you cannot add new
authorizations until an existing one is removed.
- If your usage nears the limit, you will receive a warning, prompting you to
manage your authorizations effectively.

## Code Examples and API Snippets


The documentation includes programming examples for various languages (specifically
for Python) under tutorials like:
- **Tutorial: Automate your SP-API Calls Using Python SDK**.

## Best Practices
- Always monitor the authorization limits to ensure consistent application
functionality and avoid service disruptions.
- Utilize the view limit features in both Seller and Vendor Central to manage
authorizations efficiently.

## Conclusion
Understand and manage your application's authorization limits according to the
Selling Partner type you are working with. Familiarity with OAuth requirements and
handling self-authorizations will aid in effective integration with the Selling
Partner API. Be proactive in monitoring your application's limits to ensure smooth
operation.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/revoke-self-


authorizations-from-your-application:
# Summary: Revoking Self-Authorizations from Your Application

## Overview
This documentation explains how to revoke self-authorizations from applications
developed for Amazon's Selling Partner API (SP-API). It covers the steps necessary
for both public and private seller applications, as well as for private vendor
applications.

## Key Concepts

- **Self-Authorizations**: These are authorizations generated by the application to


access resources on behalf of the seller or vendor accounts.

## Removing Self-Authorizations

### For Public and Private Seller Applications


1. **Sign In**: Log into **Seller Central** using developer credentials.
2. **Navigate to Manage Applications**:
- Go to **Develop Apps**.
- Find the application and click on **Edit**.
- Select **Authorize** to access the **Manage Authorizations** page.
3. **Revoke Authorization**:
- In the **Revoke Authorization** section, expand **Self-Authorizations**.
- Select **Revoke** next to any self-authorization you wish to remove.

### For Private Vendor Applications


1. **Sign In**: Log into **Vendor Central** with the registration credentials.
2. **Access API Integration**:
- Choose the **Integration** menu.
- Select **API Integration**.
- Similar to seller applications, find the application, expand **Edit**, and
then choose **Authorize**.
3. **Revoke Authorization**:
- Expand **Self-Authorizations** in the **Revoke Authorization** section.
- Click **Revoke** next to the desired authorization.

## Important Notes
- If your application has a significant number of authorizations (OAuths and self-
authorizations), you may need to contact the **SP-API Developer Support team** for
assistance with removing self-authorizations.
- Make sure to have the relevant **Application ID** and appropriate authorizations
ready when seeking support:
- For sellers: **Merchant Customer ID**
- For vendors: **Vendor Group ID**

## Support
For additional assistance, reach out to the SP-API Developer Support team.

### Final Note


Always ensure to periodically review and manage authorizations for security and
compliance purposes. This will help maintain control and visibility over your
application's access to seller or vendor data.

By following these steps, developers can effectively manage self-authorizations


within their Amazon Selling Partner applications.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/revoke-self-


authorizations-from-your-application#to-remove-authorizations-from-public-
applications-and-private-seller-applications:
### Summary of Revoke Self-Authorizations from Your Application

#### Overview
The document provides guidelines on how to revoke self-authorizations from seller
and vendor applications using the Amazon Selling Partner API (SP-API). There are
different procedures for public/seller applications and private vendor
applications.

### Key Steps to Revoke Authorizations

#### For Public Applications and Private Seller Applications:


1. **Sign in to Seller Central:**
- Use your developer credentials.
2. **Navigate to Develop Apps:**
- Select the application you wish to modify.
3. **Manage Authorizations:**
- Click on "Edit" and select "Authorize" to access the Manage Authorizations
page.
4. **Revoke Authorizations:**
- In the Revoke Authorization section, expand Self-Authorizations to view all
active authorizations.
- Click "Revoke" for any authorization you want to remove.

#### For Private Vendor Applications:


1. **Sign in to Vendor Central:**
- Use the credentials used for developer registration.
2. **Navigate to API Integration:**
- Go to the Integration menu and select API Integration.
3. **Manage Authorizations:**
- Similar to seller applications, click "Edit" next to the application and
select "Authorize."
4. **Revoke Authorizations:**
- In the Revoke Authorization section, expand Self-Authorizations to view all
active authorizations.
- Click "Revoke" for the desired authorization.

### Important Notes


- If the application has a large number of authorizations and is unable to revoke
them individually, contact the SP-API Developer Support team for assistance.
- When seeking assistance, provide the Application ID and the specific
authorization to be revoked:
- For sellers: use the Merchant Customer ID.
- For vendors: use the Vendor Group ID.

### Key Concepts


- **Self-Authorization**: This refers to authorizations that allow applications to
access specific seller or vendor accounts without the need for a full OAuth
authorization.

### Caveats
- Ensure you are signed in with the correct credentials for either Seller Central
or Vendor Central, as the procedures vary slightly between the two platforms.
- Revocations are permanent and should be handled cautiously to avoid disrupting
access to necessary data.

For any further issues or complications, contacting the SP-API Developer Support
team is recommended.

### Contact Information


- **Developer Support**: [SP-API Developer Support](https://developer-
docs.amazon.com/sp-api/docs/contact-support) (link for reference).

By following the above guidelines, developers can effectively manage their


application's self-authorizations within the Amazon Selling Partner API ecosystem.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/revoke-self-


authorizations-from-your-application#to-remove-authorizations-from-private-vendor-
applications:
### Summary: Revoke Self-Authorizations from Your Application

The Selling Partner API (SP-API) provides methods to revoke self-authorizations for
applications. This is essential for maintaining control over the access your
application has to seller and vendor accounts.

#### Key Concepts

1. **Self-Authorizations**: These are permissions granted to your application that


allow access to certain actions or data on behalf of a seller or vendor.
2. **Merchant Customer ID**: Used for identifying seller-specific authorizations.
3. **Vendor Group ID**: Used for identifying vendor-specific authorizations.

#### Important Notes

- **Large Authorizations**: If your application has a large number of


authorizations (both OAuths and self-authorizations), you cannot revoke self-
authorizations on your own and must contact SP-API Developer Support for
assistance.
- **Contact Support**: When seeking help to revoke authorizations, include the
Application ID and appropriate ID (Merchant Customer ID for sellers, Vendor Group
ID for vendors).

#### Procedure to Revoke Self-Authorizations

**For Public Applications and Private Seller Applications:**

1. Sign in to Seller Central using developer credentials.


2. Navigate to **Develop Apps**.
3. For the desired application, select **Edit** and then **Authorize** to go to the
Manage Authorizations page.
4. Expand **Self-Authorizations** in the Revoke Authorization section to see all
active self-authorizations.
5. Click **Revoke** next to any authorization you want to remove.

**For Private Vendor Applications:**

1. Sign in to Vendor Central with your developer credentials.


2. Go to the **Integration** menu and select **API Integration**.
3. For the desired application, select **Edit** and then **Authorize** to go to the
Manage Authorizations page.
4. Expand **Self-Authorizations** in the Revoke Authorization section to view all
active self-authorizations.
5. Click **Revoke** next to any authorization you want to remove.

#### Conclusion

Revoking self-authorizations is a straightforward process but requires careful


navigation through Seller Central or Vendor Central. Understanding the difference
between self-authorizations for sellers vs. vendors is crucial for managing
permissions accurately. Always consider contacting SP-API Developer Support for
issues related to extensive authorizations.

### API Snippets and Methods

As this documentation primarily instructs on revoking authorizations rather than


providing coding examples or API snippets, no direct code examples are present in
this section. For practical implementations, refer to the SP-API SDK samples
available for Python and other languages for specific coding use cases related to
authorization handling.

#### Additional Resources


- **SP-API Developer Support**: Reach out for help with managing authorizations.
- **SDK Samples**: Explore available SDKs for Python or other supported languages
for implementations.

Make sure to regularly check the SP-API documentation for any updates related to
revoking authorizations and best practices.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/authorization-errors:


# Summary of Amazon Selling Partner API (SP-API) Authorization Errors

## Overview
The authorization process for integrating with the Amazon Selling Partner API (SP-
API) may lead to various errors. Understanding these errors and their resolutions
is crucial for developers to effectively troubleshoot issues in their applications.
This document covers common error codes, error messages, and guidance to resolve
them.

## Common Error Codes

| **Error Code** | **Cause** | **Steps to Resolve** |


|-----------------|-----------|----------------------|
| **MD1000** | Application is in draft state. | Add `version=beta` to the OAuth
Authorization URI. After publishing, remove the parameter. |
| **MD5101** | Mismatch of redirect URL. | Verify and match the redirect URL in
Seller Central under your app's settings. |
| **MD5110** | Redirect URL contains fragments. | Check the redirect URL for any
fragments (#) and ensure it is syntactically valid. |
| **MD9010** | No MWS developer ID for the region. | Ensure the app is published
and has a valid MWS developer ID for the authorization region. |
| **MD9100** | Missing Login URI and Redirect URI. | Update the OAuth Login URI and
Redirect URI in your application's Seller Central settings. |
| **500** | Errors in the header. | Ensure `Content-Type` is set to `application/x-
www-form-urlencoded` and parameters are in the body, not as query parameters. |

## Common Error Messages

| **Error Message** | **Possible Scenarios** |


|-------------------|------------------------|
| **Credential should be scoped to a valid region** | Ensure the AWS Region in
credentials matches the request endpoint's region. |
| **Access to requested resource is denied** | Typically due to Unauthorized errors
or MissingAuthenticationToken errors. |
| **Unauthorized (403)** | Check seller account health, region mismatches, and API
access permissions. Ensure the application has the necessary roles enabled. |
| **MissingAuthenticationToken** | Sign HTTP requests with valid AWS access keys.
If using temporary keys from AWS STS, ensure they are correctly applied. |

## Key Concepts and Notes

- **Application Authorization**: Your application must be properly authorized to


access the Selling Partner API. Errors during the process may hinder your
integration.
- **OAuth Redirect URL**: The URL used in the OAuth authorization must match
exactly with those registered in the application settings on Seller Central.
- **Error Troubleshooting**: Utilize the error codes and messages to diagnose the
specific issues your application may face during the integrating or requesting
process.
- **Role Permissions**: Check that the necessary roles for the API operations your
app is using are correctly assigned. Missing roles may require re-authorization.

This summary provides crucial insights into handling authorization errors within
the Amazon Selling Partner API, ensuring developers can effectively troubleshoot
and maintain their integration projects.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/authorization-


errors#error-codes:
# Amazon Selling Partner API (SP-API) Authorization Errors

## Overview
This document addresses common error codes and messages encountered during the
application authorization process for the Amazon Selling Partner API (SP-API).
Proper authorization is vital for integrating with the SP-API, and understanding
these errors will help developers troubleshoot effectively.

## Important Concepts

### Application Authorization


- Required for any integration with SP-API.
- Errors in this process can be caused by incorrect configurations or missing
required details.

### Error Codes


The following common error codes indicate specific authorization issues:

| **Error Code** | **Cause** | **Resolution Steps** |


|----------------|-----------|----------------------|
| **MD1000** | Application is in draft state during OAuth production workflow.
| Add `version=beta` to the OAuth Authorization URI. Remove after publishing the
application. |
| **MD5101** | Redirect URL does not match configured URLs. | Verify and ensure
that the correct redirect URL is in both Seller Central and the authorization
request. |
| **MD5110** | Redirect URL contains fragments. | Check the redirect URL for
fragment characters (e.g., `#`) and ensure it is syntactically valid. |
| **MD9010** | No MWS developer ID associated with the region. | Ensure your
app is published and has a valid MWS developer ID for the region. |
| **MD9100** | Missing Login URI and Redirect URI information. | Update Login
URI and Redirect URI in the application settings in Seller Central. |
| **500** | Header errors. | Verify that the Content-Type header is set to
`application/x-www-form-urlencoded` and request parameters are in the body. |

### Error Messages


Common error messages include:

- **Credential should be scoped to a valid region**: Ensure your AWS Region in the
credentials matches the endpoint region.

- **Access to requested resource is denied**: Indicates unauthorized access or


missing authentication tokens.

- **Unauthorized (403)**: Check the following:


- Account status through Developer Central.
- Region consistency between the seller account and request endpoint.
- Proper API access and roles in Seller Central.

- **MissingAuthenticationToken**: Ensure HTTP requests are signed using AWS access


keys, especially if using AWS STS for temporary keys.

## Key API Usage


- **Authorization URI**: Use the generated OAuth Authorization URI with the
necessary parameters for client application.

- **Redirect URL**: Must match configured URL in Seller Central, ensuring


correctness on all accounts.

## Important Notes
- Always ensure that application settings in Seller Central are up-to-date and
reflective of the expected configurations.
- For restricted roles, ensure permissions are requested and the Developer Profile
is updated accordingly.
- Thoroughly test OAuth workflow during application development to preemptively
identify and address authorization errors.
- For detailed guidance on error handling and API integrations, refer to the [SP-
API Errors FAQ](https://developer-docs.amazon.com/sp-api/docs/sp-api-errors-faq).

This summary provides a foundation for understanding and resolving authorization


errors in the Amazon SP-API. For integration developers, being aware of these
issues and resolutions will streamline development and enhance application
performance.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/authorization-


errors#content:
### Amazon SP-API Authorization Errors

**Overview:**
The Selling Partner API (SP-API) requires application authorization for
integration. During this process, various errors can occur, which can hinder
successful interaction with the API.

---

### Common Error Codes and Resolutions

1. **MD1000**
- **Cause:** Application is in draft state.
- **Resolution:** Add `version=beta` to the OAuth Authorization URI:
```
https://sellercentral.amazon.com/apps/authorize/consent?
application_id=appidexample&state=stateexample&version=beta
```
- **Note:** Remove `version=beta` after the application is published.

2. **MD5101**
- **Cause:** Mismatch of redirect URL.
- **Resolution:** Verify that the redirect URL matches the one registered in
Seller Central. Update as necessary.

3. **MD5110**
- **Cause:** Redirect URL contains fragments.
- **Resolution:** Ensure the redirect URL is syntactically valid and free of
fragment characters (`#`).

4. **MD9010**
- **Cause:** No valid MWS developer ID associated with the authorization region.
- **Resolution:** Confirm app status and MWS developer ID validity for the
region.

5. **MD9100**
- **Cause:** Missing Login URI and Redirect URI.
- **Resolution:** Update these details in Seller Central.

6. **500**
- **Cause:** Incorrect header configuration.
- **Resolution:** Ensure `Content-Type` is `application/x-www-form-urlencoded`
and parameters are in the body, not query parameters.

---

### Common Error Messages

1. **Credential should be scoped to a valid region**


- Ensure the AWS Region matches the endpoint's region.

2. **Access to requested resource is denied**


- Check for Unauthorized errors or MissingAuthenticationToken errors.

3. **Unauthorized (403 status code)**


- Check seller account status, region matches, API access, and required roles.

4. **MissingAuthenticationToken**
- Ensure requests are signed using valid AWS access keys.

---

### Key Concepts for Understanding SP-API Authorization

- **OAuth Authorization:** Essential for gaining access to the API.


Misconfiguration can lead to various authorization errors.
- **Developer Central:** A tool to check your application’s health, permissions,
and profiles for access to restricted roles.
- **AWS Signature Version 4:** Authentication signing process for requests; ensure
proper keys are used.

---

### Important Notes

- Refer to the **SP-API Errors FAQ** for additional guidance.


- It’s crucial to ensure your app is published with valid credentials and
appropriate roles defined in your developer profile.
- Continuous monitoring of account health and permissions is necessary for smooth
API operation.

This concise summary encapsulates the critical components from the authorization
errors page to assist developers in resolving common issues they'd face during the
integration of Amazon's SP-API.
_____________________________
Summary of URL: https://developer-docs.amazon.com/sp-api/docs/authorization-
errors#error-messages:
### Summary of Authorization Errors in Amazon Selling Partner API (SP-API)

#### Overview
This documentation covers common authorization errors that developers might
encounter when integrating with the Amazon Selling Partner API. It provides error
codes, messages, and troubleshooting steps to help resolve these issues.

#### Error Codes

1. **MD1000**:
- **Cause**: Application is in draft state during OAuth workflow.
- **Resolution**: Add `version=beta` parameter to OAuth Authorization URI.
```plaintext
https://sellercentral.amazon.com/apps/authorize/consent?
application_id=appidexample&state=stateexample&version=beta
```
- Once published, remove the `version=beta` parameter.

2. **MD5101**:
- **Cause**: Mismatch in redirect URL during OAuth.
- **Resolution**: Verify that the redirect URL in Seller Central matches the one
used.
- Check in Seller Central under Apps and Services → Develop Apps.

3. **MD5110**:
- **Cause**: Redirect URL contains fragments.
- **Resolution**: Ensure redirect URL is properly formed without fragment
characters (#).

4. **MD9010**:
- **Cause**: No MWS developer ID associated with the region.
- **Resolution**: Check if the app is published and has a valid MWS developer
ID.

5. **MD9100**:
- **Cause**: Missing Login URI and Redirect URI in SP-API application.
- **Resolution**: Update Login URI and Redirect URI in Seller Central.

6. **500**:
- **Cause**: Header errors.
- **Resolution**: Ensure Content-Type header is set to `application/x-www-form-
urlencoded`.

#### Error Messages

- **Credential should be scoped to a valid region**: Make sure AWS Region matches
the endpoint.
- **Access to requested resource is denied**: This could indicate unauthorized
errors or missing tokens.
- **Unauthorized (Status Code 403)**:
- **Possible Causes**:
- Account status: Ensure seller account is healthy.
- Region mismatch: Verify seller account and request endpoint are in the same
region.
- API access: Ensure the application has permissions for the API operation.
- Missing SP-API Role: Validate that the necessary roles are assigned in the
Developer Profile.

- **MissingAuthenticationToken**: Ensure HTTP requests are signed correctly using


AWS access keys.

### Important Notes


- The SP-API uses the AWS Signature Version 4 signing process for authenticating
requests.
- Developers should verify their application's roles and permissions frequently in
the Developer Profile, especially for restricted role access.
- It is advised to handle error codes and messages programmatically to enhance user
experience by providing actionable feedback.

### Conclusion
This summary provides essential information about handling authorization errors
when using the Amazon Sp API. Developers should familiarize themselves with error
codes, messages, and resolutions to ensure a smooth integration process. For
further guidance, refer to the SP-API Errors FAQ and proper resources for OAuth and
AWS Signature processing.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/connecting-to-the-


selling-partner-api:
# Summary of Connecting to the Selling Partner API

## Overview
The Selling Partner API (SP-API) allows developers to connect and interact with
Amazon's Selling Partner accounts. This documentation provides the necessary steps
for connecting to the SP-API, including obtaining access tokens, constructing API
URIs, and adding required headers.

### Key Steps to Connect

1. **Request a Login with Amazon Access Token**


- **Purpose**: Authorizes applications to perform actions on behalf of a selling
partner.
- **Token Expiration**: LWA access tokens expire after one hour.
- **Restricted Operations**: For certain operations that return Personally
Identifiable Information (PII), a Restricted Data Token (RDT) is required.

**HTTP POST Request Example:**


```http
POST https://api.amazon.com/auth/o2/token
Content-Type: application/x-www-form-urlencoded;charset=UTF-8

grant_type=refresh_token
&refresh_token=Aztr|...
&client_id=foodev
&client_secret=Y76SDl2F
```

**Response Example:**
```json
{
"access_token": "Atza|IQEBLjAsAhRmHjNgHpi0U-Dme37rR6CuUpSREXAMPLE",
"token_type": "bearer",
"expires_in": 3600,
"refresh_token": "Atzr|IQEBLzAtAhRPpMJxdwVz2Nn6f2y-tpJX2DeXEXAMPLE"
}
```

2. **Construct a Selling Partner API URI**


- **Components**:
- **HTTP Method**: the type of request (e.g., GET, POST).
- **Endpoint**: the base URL for the SP-API
([example](https://sellingpartnerapi-na.amazon.com)).
- **Path**: the version and resource requested (e.g.,
`/fba/inbound/v0/shipments/{shipmentId}/preorder/confirm`).
- **Query String**: Additional parameters (e.g., `?
marketplace=ATVPDKIKX0DER`).

**Example URI Construction**:


```http
PUT
https://sellingpartnerapi-na.amazon.com/fba/inbound/v0/shipments/shipmentId1/
preorder/confirm?MarketplaceId=ATVPDKIKX0DER&NeedByDate=2020-10-10
```

3. **Add Headers to the URI**


- **Required HTTP Headers**:
- `host`: Marketplace endpoint.
- `x-amz-access-token`: The LWA access token or RDT for restricted operations.
- `x-amz-date`: The request timestamp.
- `user-agent`: Information about your application (name, version, language).

**Example Header Addition**:


```http
PUT /fba/inbound/v0/shipments/shipmentId1/preorder/confirm?
MarketplaceId=ATVPDKIKX0DER&NeedByDate=2020-10-10 HTTP/1.1
host: sellingpartnerapi-na.amazon.com
user-agent: My Selling Tool/2.0 (Language=Java/1.8.0.221; Platform=Windows/10)
x-amz-access-token: Atza|IQEBLjAsAhRmHjNgHpi0U-Dme37rR6CuUpSREXAMPLE
x-amz-date: 20190430T123600Z
```

### Important Notes and Caveats


- **Token Management**: Ensure to handle token refresh appropriately, as tokens
expire every hour.
- **Restricted Data Token**: Use an RDT for operations that require access to PII
instead of the LWA token.
- **User-Agent Header**: Always include a user-agent header for troubleshooting
purposes.
- **Updating Trust Store**: Make sure to update your trust store to avoid
certificate authority errors when calling the LWA authorization server.

### Additional Considerations


- Familiarize yourself with the various roles and permissions associated with the
SP-API.
- Consult the Tokens API Use Case Guide for more information on handling restricted
operations.
- Always test API calls in a development environment before moving to production.

This summary provides the core elements required for developers to connect and
interact with the Selling Partner API effectively.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/connecting-to-the-


selling-partner-api#step-1-request-a-login-with-amazon-access-token:
### Summary of Connecting to the Selling Partner API

#### Overview
The Selling Partner API (SP-API) allows applications to interact with Amazon's
Selling Partner ecosystem, enabling sellers to gather data and manage their selling
accounts. This summary provides instructions for connecting to the SP-API, focusing
on authorization and making requests.

---

### Important Steps for Connection

#### 1. Request a Login with Amazon Access Token


You must obtain a Login with Amazon (LWA) access token to authorize actions on
behalf of a selling partner.

- **Token Expiration:** The LWA access token expires one hour after issuance.

- **Usage of Tokens:**
- Use the **LWA access token** for most calls.
- Use a **Restricted Data Token (RDT)** for operations that return Personally
Identifiable Information (PII).

- **Request Structure:** Make a secure HTTP POST to the LWA authentication server.

**Endpoint:**
```
https://api.amazon.com/auth/o2/token
```

- **Required Parameters:**
- `grant_type`:
- `refresh_token` for operations requiring authorization.
- `client_credentials` for grantless operations.
- `refresh_token`: The LWA refresh token received after authorization for
operations needing selling partner authorization.
- `scope`: The scope of the LWA authorization grant (optional, based on the
grant type).
- `client_id`: The application's client ID.
- `client_secret`: The application's client secret.

- **Example Request for Authorized Operation:**


```http
POST /auth/o2/token HTTP/1.1
Host: api.amazon.com
Content-Type: application/x-www-form-urlencoded;charset=UTF-8

grant_type=refresh_token
&refresh_token=Aztr|...
&client_id=foodev
&client_secret=Y76SDl2F
```
- **Example Request for Grantless Operation:**
```http
POST /auth/o2/token HTTP/1.1
Host: api.amazon.com
Content-Type: application/x-www-form-urlencoded;charset=UTF-8

grant_type=client_credentials
&scope=sellingpartnerapi::notifications
&client_id=foodev
&client_secret=Y76SDl2F
```

- **Successful Response Structure:**


```json
{
"access_token": "Atza|...",
"token_type": "bearer",
"expires_in": 3600,
"refresh_token": "Atzr|..."
}
```

#### 2. Construct a Selling Partner API URI


The URI used to call the SP-API is constructed from several components:
- **HTTP Method:** GET, POST, PUT etc.
- **Endpoint:** Specific API endpoint, e.g., `https://sellingpartnerapi-
na.amazon.com`
- **Path:** Specific resource path, e.g.,
`/fba/inbound/v0/shipments/{shipmentId}/preorder/confirm`
- **Query String:** e.g. `?marketplace=ATVPDKIKX0DER`
- **Path Parameter:** e.g., `shipmentId`

- **Example URI Construction:**


```http
PUT https://sellingpartnerapi-na.amazon.com/fba/inbound/v0/shipments/{shipmentId}/
preorder/confirm?MarketplaceId=ATVPDKIKX0DER&NeedByDate=2020-10-10
```

#### 3. Add Headers to the Request


Include these headers in your API request:
- **host:** The endpoint of the marketplace.
- **x-amz-access-token:** Set to the LWA access token or RDT for restricted
operations.
- **x-amz-date:** Request timestamp.
- **user-agent:** Your application name, version, platform, and programming
language.

- **Example Request with Headers:**


```http
PUT /fba/inbound/v0/shipments/shipmentId1/preorder/confirm?
MarketplaceId=ATVPDKIKX0DER&NeedByDate=2020-10-10 HTTP/1.1
Host: sellingpartnerapi-na.amazon.com
User-Agent: My Selling Tool/2.0 (Language=Java/1.8.0.221; Platform=Windows/10)
x-amz-access-token: Atza|...
x-amz-date: 20190430T123600Z
```

---
### Key Concepts
- **Access Tokens:** Essential for making authorized calls to the API.
- **Endpoints and URIs:** Understanding how to construct URIs based on HTTP
methods, paths, and parameters.
- **HTTP Headers:** Significance of including correct headers for API interaction.

### Notes/Caveats for Developers


- Ensure your application's trust store is updated to avoid untrusted CA errors.
- Handling of token expiration scenarios should be implemented in your application.
- Familiarize yourself with the Tokens API Use Case Guide for restricted operations
involving PII.

This summary provides a clear guideline for developers looking to connect to the
Selling Partner API using Python.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/connecting-to-the-


selling-partner-api-using-a-generated-java-sdk:
### Summary of Connecting to the Selling Partner API Using a Generated Java SDK

This documentation provides instructions on how to connect to the Amazon Selling


Partner API (SP-API) using a generated Java SDK. The process involves setting up
authorization with Login with Amazon (LWA) credentials.

#### Key Concepts:

1. **LWA Authorization**: Before connecting to the SP-API, your application must be


registered and authorized by a selling partner. Two types of operations require
authorization:
- Operations requiring a `refreshToken`.
- "Grantless" operations that don't require one.

2. **Endpoints**: The authentication endpoint for LWA is


`https://api.amazon.com/auth/o2/token`. The Selling Partner API endpoint typically
follows the format: `https://sellingpartnerapi-<region>.amazon.com`.

#### Important Classes and Methods:

- **LWAAuthorizationCredentials**: This class is used to configure LWA credentials


for authorization. It has the following parameters:
- `clientId`: Your LWA client identifier _(required)_.
- `clientSecret`: Your LWA client secret _(required)_.
- `refreshToken`: The LWA refresh token _(optional, required for non-grantless
operations)_.
- `withScopes`: Specifies the scope of the LWA authorization grant _(optional,
used for grantless operations)_.
- `endpoint`: The LWA authentication server URI _(required)_.

#### Code Examples:

**1. Configure LWA Credentials:**


```java
import com.amazon.SellingPartnerAPIAA.LWAAuthorizationCredentials;

// Example for operations requiring selling partner authorization


LWAAuthorizationCredentials lwaAuthorizationCredentials =
LWAAuthorizationCredentials.builder()
.clientId("myClientId")
.clientSecret("myClientSecret")
.refreshToken("Aztr|...")
.endpoint("https://api.amazon.com/auth/o2/token")
.build();

// Example for grantless operations


LWAAuthorizationCredentials lwaAuthorizationCredentialsGrainless =
LWAAuthorizationCredentials.builder()
.clientId("myClientId")
.clientSecret("myClientSecret")
.withScopes(ScopeConstants.SCOPE_NOTIFICATIONS_API,
ScopeConstants.SCOPE_MIGRATION_API)
.endpoint("https://api.amazon.com/auth/o2/token")
.build();
```

**2. Create an Instance of the Sellers API:**


```java
import com.amazon.SellingPartnerAPIAA.SellersApi;

// Create an instance of SellersApi using the configured LWA credentials


SellersApi sellersApi = new SellersApi.Builder()
.lwaAuthorizationCredentials(lwaAuthorizationCredentials)
.endpoint("https://sellingpartnerapi-na.amazon.com")
.build();
```

#### Important Notes:

- **Operations**: Ensure you understand the distinction between operations that


require `refreshToken` and those that do not. Only grantless operations can be
executed without the partner's authorization.
- **Authorization Management**: The ability to authorize and manage permissions for
your application is vital to interacting with the SP-API correctly.
- **SDK Generation**: This documentation assumes you have generated an SDK for
Java. For detailed instructions on generating the SDK, refer to the "Generating a
Java SDK" section.

### Conclusion

This setup allows developers to interact with various Selling Partner API endpoints
effectively, manage products, orders, and perform numerous tasks through well-
defined API calls. Proper handling of LWA credentials and understanding of
authorization flows are critical for successful integration.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/connecting-to-the-


selling-partner-api-using-a-generated-java-sdk#step-1-configure-your-lwa-
credentials:
### Connecting to the Selling Partner API Using a Generated Java SDK

To connect to the Selling Partner API (SP-API) using a generated Java SDK, follow
the instructions outlined below. This section focuses on setting up the necessary
LWA (Login with Amazon) credentials and making API calls using those credentials.

#### Step 1: Configure your LWA Credentials


You need to create an instance of `LWAAuthorizationCredentials` using the following
parameters:

- **clientId**: Your LWA client identifier. *(Required)*


- **clientSecret**: Your LWA client secret. *(Required)*
- **refreshToken**: The LWA refresh token obtained after the selling partner
authorizes your application. *(Optional, required for operations needing selling
partner authorization)*
- **withScopes**: The scope of the LWA authorization grant. Includes values like
`ScopeNotificationsAPI`. *(Optional, needed for grantless operations only)*
- **endpoint**: The LWA authentication server URI. *(Required)*

**Example for calling operations that require selling partner authorization:**

```java
import com.amazon.SellingPartnerAPIAA.LWAAuthorizationCredentials;

LWAAuthorizationCredentials lwaAuthorizationCredentials =
LWAAuthorizationCredentials.builder()
.clientId("myClientId")
.clientSecret("myClientSecret")
.refreshToken("Aztr|...") // Obtain this from the selling partner
.endpoint("https://api.amazon.com/auth/o2/token")
.build();
```

**Example for calling grantless operations:**

```java
import com.amazon.SellingPartnerAPIAA.LWAAuthorizationCredentials;
import static
com.amazon.SellingPartnerAPIAA.ScopeConstants.SCOPE_NOTIFICATIONS_API;
import static com.amazon.SellingPartnerAPIAA.ScopeConstants.SCOPE_MIGRATION_API;

LWAAuthorizationCredentials lwaAuthorizationCredentials =
LWAAuthorizationCredentials.builder()
.clientId("myClientId")
.clientSecret("myClientSecret")
.withScopes(SCOPE_NOTIFICATIONS_API, SCOPE_MIGRATION_API) // Use necessary scopes
based on your operations
.endpoint("https://api.amazon.com/auth/o2/token")
.build();
```

#### Step 2: Create an Instance of the Sellers API and Call an Operation

After configuring your `LWAAuthorizationCredentials`, create an instance of the


`SellersApi` and call the desired operation:

**Example:**

```java
import com.amazon.SellingPartnerAPIAA.SellersApi;

SellersApi sellersApi = new SellersApi.Builder()


.lwaAuthorizationCredentials(lwaAuthorizationCredentials)
.endpoint("https://sellingpartnerapi-na.amazon.com")
.build();
```

### Key Concepts

- **LWA (Login with Amazon)**: An authentication service that provides secure


access.
- **Sellers API**: A part of the SP-API that allows developers to retrieve seller
information and tools.
- **Grantless Operations**: These are specific operations that do not require a
refresh token for authorization, typically lower-risk actions.

### Important Notes

- Ensure that your application is registered and authorized by the selling partner
before proceeding with these steps.
- Operations that require authorization must include the `refreshToken` unless they
are classified as grantless.
- Permissions granted to applications define what data can be accessed. Always
limit scopes to only what is necessary for your application.

This concise summary provides a clear and organized reference for developers
looking to integrate with the Amazon Selling Partner API using Java SDK, focusing
on configuration and API usage.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/connecting-to-the-


selling-partner-api-using-a-generated-java-sdk#step-2-create-an-instance-of-the-
sellers-api-and-call-an-operation:
### Summary of Connecting to the Selling Partner API Using a Generated Java SDK

**Objective:** This documentation explains how to connect to the Selling Partner


API (SP-API) using a generated Java SDK, allowing developers to gather and post
data to a customer's selling partner account.

#### Key Concepts:


1. **LWA Credentials**: To connect to the SP-API, your application must be
registered and authorized. You will need your Login with Amazon (LWA) credentials
for authentication.

2. **Authorization Tokens**: The SDK handles the generation of authorization tokens


needed for API calls. Tokens are obtained using client IDs, client secrets, and
refresh tokens.

3. **Sellers API**: A significant part of the SP-API used for interacting with
seller data.

#### Important Classes and Methods:


- **LWAAuthorizationCredentials**:
- This class is used to configure your LWA credentials.
- **Parameters**:
- `clientId`: Your LWA client identifier (required).
- `clientSecret`: Your LWA client secret (required).
- `refreshToken`: The LWA refresh token (optional, required for operations
needing seller authorization).
- `withScopes`: The scope of the LWA authorization (optional, for grantless
operations).
- `endpoint`: The LWA authentication server URI (required).
##### Example Usage:
```java
// Example for calling operations that require selling partner authorization
LWAAuthorizationCredentials lwaAuthorizationCredentials =
LWAAuthorizationCredentials.builder()
.clientId("myClientId")
.clientSecret("myClientSecret")
.refreshToken("Aztr|...")
.endpoint("https://api.amazon.com/auth/o2/token")
.build();

// Example for calling grantless operations


LWAAuthorizationCredentials lwaAuthorizationCredentials =
LWAAuthorizationCredentials.builder()
.clientId("myClientId")
.clientSecret("myClientSecret")
.withScopes(SCOPE_NOTIFICATIONS_API, SCOPE_MIGRATION_API)
.endpoint("https://api.amazon.com/auth/o2/token")
.build();
```

- **SellersApi**:
- This class allows you to create an instance for interacting with the SP-API.

##### Example of Creating SellersApi Instance:


```java
SellersApi sellersApi = new SellersApi.Builder()
.lwaAuthorizationCredentials(lwaAuthorizationCredentials)
.endpoint("https://sellingpartnerapi-na.amazon.com")
.build();
```

#### Steps to Connect to SP-API:


1. **Configure LWA Credentials**: You need to instantiate
`LWAAuthorizationCredentials` with the necessary parameters.
2. **Create Sellers API Instance**: With your `LWAAuthorizationCredentials` ready,
create an instance of `SellersApi` to make API calls.

#### Important Notes:


- All operations that are not considered "grantless" require seller authorization.
Ensure that you manage your tokens appropriately.
- The endpoint specified for the LWA authentication server should be correct and
functional to avoid authentication errors.
- Be mindful of the parameters provided during configuration, as incorrect values
may lead to authorization failures.

This summary provides the essential information required for developers to


effectively connect to and utilize the Selling Partner API using a Java SDK,
focusing specifically on LWA configuration and the operations available through the
Sellers API.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/connecting-to-the-


selling-partner-api#step-2-construct-a-selling-partner-api-uri:
# Summary of Amazon Selling Partner API Connection
## Key Concepts

### Selling Partner API (SP-API)


The Selling Partner API (SP-API) allows applications to gather data from a
customer's selling partner account and post data to it.

### Login with Amazon Access Token (LWA)


To authenticate and perform operations on behalf of a selling partner, your
application must obtain an LWA access token. This token expires after one hour.

### Restricted Data Token (RDT)


For operations that require access to Personally Identifiable Information (PII),
use an RDT instead of an LWA access token.

## Steps to Connect to the Selling Partner API

### Step 1: Request a Login with Amazon Access Token


- **Endpoint**: `https://api.amazon.com/auth/o2/token`
- **Method**: POST

#### Required Fields


1. **grant_type**: Specify `refresh_token` or `client_credentials`
2. **refresh_token**: Provide the refresh token obtained when the selling partner
authorizes your application (only if using `refresh_token`).
3. **scope**: Specify the required scope if using `client_credentials`.
4. **client_id**: Your application’s client ID.
5. **client_secret**: Your application’s client secret.

#### Example Request for Authorized Operation


```plaintext
POST /auth/o2/token HTTP/1.1
Host: api.amazon.com
Content-Type: application/x-www-form-urlencoded;charset=UTF-8
grant_type=refresh_token&refresh_token=Aztr|...&client_id=foodev&client_secret=Y76S
Dl2F
```

#### Example Request for Grantless Operation


```plaintext
POST /auth/o2/token HTTP/1.1
Host: api.amazon.com
Content-Type: application/x-www-form-urlencoded;charset=UTF-8
grant_type=client_credentials&scope=sellingpartnerapi::notifications&client_id=food
ev&client_secret=Y76SDl2F
```

### Successful Response Example


```json
{
"access_token": "Atza|IQEBLjAsAhRmHjNgHpi0U-Dme37rR6CuUpSREXAMPLE",
"token_type": "bearer",
"expires_in": 3600,
"refresh_token": "Atzr|IQEBLzAtAhRPpMJxdwVz2Nn6f2y-tpJX2DeXEXAMPLE"
}
```

### Step 2: Construct a Selling Partner API URI


Components include:
- **HTTP Method**: e.g., GET, PUT
- **Endpoint**: SP-API endpoint (e.g., `https://sellingpartnerapi-na.amazon.com`)
- **Path**: Resource path (e.g.,
`/fba/inbound/v0/shipments/{shipmentId}/preorder/confirm`)
- **Query String**: Parameters (e.g., `?marketplace=ATVPDKIKX0DER`)
- **Path Parameter**: Required identifiers (e.g., `{shipmentId}`)

#### Example URI Construction


```plaintext
PUT https://sellingpartnerapi-na.amazon.com/fba/inbound/v0/shipments/shipmentId1/
preorder/confirm?MarketplaceId=ATVPDKIKX0DER&NeedByDate=2020-10-10
```

### Step 3: Add Headers to the URI


Essential headers include:
1. **host**: The marketplace endpoint.
2. **x-amz-access-token**: The LWA or RDT token.
3. **x-amz-date**: The request date and time.
4. **user-agent**: Application name/version, platform, and programming language.

#### Example Request Header


```plaintext
PUT /fba/inbound/v0/shipments/shipmentId1/preorder/confirm?
MarketplaceId=ATVPDKIKX0DER&NeedByDate=2020-10-10 HTTP/1.1
host: sellingpartnerapi-na.amazon.com
user-agent: My Selling Tool/2.0 (Language=Java/1.8.0.221; Platform=Windows/10)
x-amz-access-token: Atza|IQEBLjAsAhRmHjNgHpi0U-Dme37rR6CuUpSREXAMPLE
x-amz-date: 20190430T123600Z
```

## Important Notes
- The LWA access token must be refreshed regularly since it expires after one hour.
- Ensure to update your trust store to avoid certificate authority errors when
making requests to the LWA authorization server.
- For operations requiring access to restricted data, it is crucial to use the RDT
properly as per the Tokens API guidelines.

This documentation primarily provides procedures to establish a connection to the


SP-API, ensuring developers can authenticate and deliver requests efficiently.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/connecting-to-the-


selling-partner-api#step-3-add-headers-to-the-uri:
### Summary of the Amazon Selling Partner API Documentation

#### Overview
The Selling Partner API (SP-API) allows developers to gather data from a customer's
selling partner account and post data. It requires registration and authorization.

---

### Key Concepts

1. **LWA Access Token**:


- Used to authorize actions on behalf of a selling partner.
- Expires one hour after issuance.
- For restricted operations involving PII, a Restricted Data Token (RDT) must be
used instead.
2. **URI Structure**:
- The SP-API URI includes several components:
- **HTTP Method**: e.g., GET, PUT
- **Endpoint**: e.g., `https://sellingpartnerapi-na.amazon.com`
- **Path**: API resource path, e.g.,
`/fba/inbound/v0/shipments/{shipmentId}/preorder/confirm`
- **Query String**: e.g., `?marketplace=ATVPDKIKX0DER`
- **Path Parameters**: e.g., `{shipmentId}`

---

### Steps to Connect to SP-API

#### Step 1: Request a Login with Amazon Access Token

Make a secure HTTP POST request to the LWA authentication server:

**Endpoint**: `https://api.amazon.com/auth/o2/token`

**Request Fields**:
- `grant_type`:
- **Values**:
- `refresh_token`: For authorized operations.
- `client_credentials`: For grantless operations.
- `refresh_token`: Required for operations needing authorization.
- `scope`: Required for grantless operations.
- `client_id`: Application identifier.
- `client_secret`: Application secret.

**Example Request**:
```http
POST /auth/o2/token HTTP/1.1
Host: api.amazon.com
Content-Type: application/x-www-form-urlencoded;charset=UTF-8

grant_type=refresh_token
&refresh_token=Aztr|...
&client_id=foodev
&client_secret=Y76SDl2F
```

**Successful Response**:
```json
{
"access_token": "Atza|IQEBLjAsAhRmHjNgHpi0U-Dme37rR6CuUpSREXAMPLE",
"token_type": "bearer",
"expires_in": 3600,
"refresh_token": "Atzr|IQEBLzAtAhRPpMJxdwVz2Nn6f2y-tpJX2DeXEXAMPLE"
}
```

#### Step 2: Construct a URI

The URI structure for making API calls:


- **HTTP Method**: e.g., PUT
- **Endpoint**: e.g., `https://sellingpartnerapi-na.amazon.com`
- **Path**: e.g., `/fba/inbound/v0/shipments/shipmentId1/preorder/confirm`
- **Query Parameters**: e.g., `?MarketplaceId=ATVPDKIKX0DER&NeedByDate=2020-10-10`
**Example URI**:
```http
PUT https://sellingpartnerapi-na.amazon.com/fba/inbound/v0/shipments/shipmentId1/
preorder/confirm?MarketplaceId=ATVPDKIKX0DER&NeedByDate=2020-10-10
```

#### Step 3: Add Headers to the URI

**Headers to Include**:
- `host`: Marketplace endpoint.
- `x-amz-access-token`: Either LWA access token or RDT (for restricted operations).
- `x-amz-date`: Request date and time.
- `user-agent`: Your application name and version.

**Example Headers**:
```http
PUT /fba/inbound/v0/shipments/shipmentId1/preorder/confirm?
MarketplaceId=ATVPDKIKX0DER&NeedByDate=2020-10-10 HTTP/1.1
host: sellingpartnerapi-na.amazon.com
user-agent: My Selling Tool/2.0 (Java/1.8.0.221; Windows/10)
x-amz-access-token: Atza|IQEBLjAsAhRmHjNgHpi0U-Dme37rR6CuUpSREXAMPLE
x-amz-date: 20190430T123600Z
```

---

### Important Notes


- Update the trust store of your application to avoid certificate authority errors
when calling the LWA authorization server.
- Always include a `User-Agent` header in all requests to assist Amazon with
diagnosing and resolving issues.
- Understand the difference between using an LWA access token and an RDT for
restricted operations.

This summary provides a clear reference for developers to effectively connect and
interact with the Amazon Selling Partner API.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/building-robust-apps:


# Summary of Building Robust Amazon SP-API Applications

## Overview
The Selling Partner API (SP-API) enables developers to gather data from their
customer's selling accounts and post data to those accounts. It is crucial for
client applications to be robust and adaptable to unforeseen changes in SP-API
responses and report formats.

## Key Concepts

### Handling Changes to Reports and Responses


1. **Report Changes**:
- **New Fields in Reports**: Applications should be able to handle new fields
that become available, such as additional columns in flat file reports or new
elements in XML reports.
- **New Field Values**: Applications must recognize new values within existing
fields.
2. **SP-API Response Changes**:
- **New Response Elements**: Applications should accommodate new or
unrecognized response elements.
- **New Response Element Values**: Applications should be adaptable to new or
unrecognized values.

### Best Practices


- **Expect Changes**: Develop applications that remain functional despite changes
to the SP-API.
- **Log Unrecognized Elements**: Maintain a log of unrecognized elements and values
to facilitate updates in the application.
- **Surface New Features**: When new fields or values are encountered, design the
application to display these appropriately to users.
- **Element Order**: Assume that response elements may appear in any order.
- **Use Latest API Model**: Always use the most recent model version to prevent
issues like null enum values.

## Notes for Developers


- Build in error handling for validation against report XSDs to manage unexpected
structures in responses.
- Ensure logging mechanisms are in place for tracking new functionalities
introduced through updates in SP-API.

## Tutorials
- **Automate SP-API Calls**:
- **JavaScript SDK for Node.js**
- **Python SDK**
- **C# SDK**
- **Java SDK**

These tutorials guide developers through creating automated processes for


interfacing with the SP-API, providing practical examples of usage.

## Important Classes and Methods


- While specific classes and methods are not explicitly listed in the documentation
snippet, the response handling and report parsing logic would generally involve
custom implementations specific to the developer's application needs.

## Conclusion
To effectively use the Amazon Selling Partner API, developers need to anticipate
changes in report formats and response structures while implementing error handling
and logging to maintain robust applications. Following best practices ensures that
applications can adapt to the evolving API without breaking functionality.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/building-robust-


apps#changes-to-reports-returned-by-sp-api:
### Summary: Building Robust Amazon SP-API Applications

#### Key Concepts

1. **SP-API Overview**:
- The Selling Partner API (SP-API) is designed to help developers interact
programmatically with Amazon's selling systems to gather data and manage sellers'
accounts effectively.
2. **Changes to SP-API Reports**:
- **New Fields and Values**: Client applications should be able to handle new
fields and values added to reports. This includes:
- New columns in flat file reports.
- New elements in XML reports.
- **Error Handling**: If using report XSDs for validation, ensure error handling
for unrecognized response elements or values.

3. **Changes to SP-API Response Elements**:


- Handle new response elements and unrecognized values. Client applications must
be flexible enough to accommodate such changes without breaking.

#### Best Practices for Robust Applications

- **Expect Changes**: Design applications that can handle changes. Avoid


assumptions about the presence of certain elements, fields, or values.
- **Logging**: Maintain a log of unrecognized elements, fields, or values to
identify new functionalities and update applications accordingly.
- **Response Ordering**: Do not rely on the order of response elements as they can
be returned in any sequence.
- **Use Latest Model Version**: Always utilize the latest version of the API model
to prevent issues with null enum values.

### Important Notes/Caveats

- **Dynamic Structure**: The structure of reports and responses can change at any
time. Applications must be built with this dynamism in mind.
- **Application Resilience**: Implement robust error handling and logging
mechanisms to gracefully manage unexpected changes or errors.

### Conclusion

Building robust applications with the Amazon Selling Partner API requires careful
planning to accommodate changes in report structures and response elements.
Following the listed best practices will enhance the resilience and adaptability of
applications in the face of evolving API conditions.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/building-robust-


apps#changes-to-sp-api-response-elements:
# Summary of Building Robust Amazon SP-API Applications

## Key Concepts

### Selling Partner API (SP-API)


The Selling Partner API allows developers to build applications that can interact
with Amazon's selling partner data. Applications can gather data and post data to a
customer’s selling account.

### Expectations on Changes


Developers are advised to design their applications to gracefully handle changes in
the SP-API, including changes to reports and response elements even if there’s no
prior notification from Amazon. This entails preparing for:
- New fields in reports and their values.
- New response elements and their values.

## Best Practices for Handling Changes


1. **Handle New Report Fields and Values**:
- Ensure your application can manage new fields or columns in flat-file reports
and new elements or values in XML reports without breaking.

2. **Error Handling with XSDs**:


- If using XSDs to validate reports, implement error handling to manage new,
unrecognized response elements or values.

3. **Log Unrecognized Elements**:


- Maintain a log for any unrecognized elements, fields, or values returned from
SP-API. This helps track new functionalities introduced by Amazon.

4. **Gracefully Surface New Data**:


- Automatically display new fields or values in your application to enhance user
experience.

5. **Expect Response Elements in Any Order**:


- Ensure your application does not depend on the sequence of response elements.

6. **Use Latest Model Versions**:


- Always utilize the most recent version of the API models to avoid null enum
values.

## Important Notes
- Client applications must be robust enough to avoid breaking with the introduction
of new response types or values.
- Implement logging to catch and adapt to unrecognized changes over time.

## Code Examples and API Snippets


### Example: Handling New Fields in Reports
```python
# Pseudo code for checking new field in reports
report_fields = received_report.keys()
expected_fields = ['field1', 'field2', 'new_field'] # Add expected fields

for field in expected_fields:


if field not in report_fields:
log_unrecognized_field(field)
```

### Example: Validating Response Elements


```python
# Pseudo code for handling new response elements
def handle_response(response):
for element in response:
if element not in recognized_elements:
log_unrecognized_element(element)
process_element(element)
```

## Conclusion
Developers working with Amazon SP-API should prepare for adaptability in their
applications in response to ongoing changes from Amazon. This involves implementing
best practices for handling unrecognized elements and ensuring backward
compatibility as new features are introduced.

Ensure to reference the official API documentation for updates on models and
additional examples, particularly focusing on Python SDK tutorials for automation
in your applications.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/building-robust-


apps#best-practices:
# Summary of Building Robust Amazon SP-API Applications

## Key Concepts

### Overview
The Selling Partner API (SP-API) allows developers to interact with Amazon's
services for gathering data and posting updates to a seller's account. It is
crucial for applications to handle potential changes to responses and reports
seamlessly.

### Changes to Reports


- **New Fields**: Applications should be able to detect and handle new fields,
including new columns in flat file reports or new elements in XML reports.
- **New Field Values**: Applications should accommodate new values as they are
introduced.

### Changes to SP-API Response Elements


- **New Response Elements**: Applications need to handle unexpected response
elements.
- **New Response Element Values**: Applications should also accommodate
unrecognized values properly.

## Best Practices

1. **Expect Changes**:
- Do not hardcode expectations for response elements, fields, or values.
Applications should remain operational regardless of changes made by Amazon.

2. **Log Unrecognized Elements**:


- Maintain logs for any unrecognized fields or values returned by the API. This
allows developers to monitor updates and enhance application functionality.

3. **Surface New Functionality**:


- Implement methods to automatically display new report fields in a user-
friendly manner when they appear in the API responses.

4. **Non-Order Dependency**:
- Ensure applications do not rely on the order of response elements, as Amazon
may return them in any order.

5. **Use Latest Model Version**:


- Always make use of the most recent model version to avoid issues with null
enum values.

## Important Notes/Caveats
- Implement error handling while validating reports against XSDs provided by
Amazon.
- Client applications can benefit from dynamic updates to accommodate changes in
the API without breaking existing functionalities.

## Conclusion
Following these best practices ensures robust integration and application
resilience while using the Amazon SP-API. Developers must remain aware of potential
changes and design their applications to accommodate them seamlessly.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/using-sdks:


### Summary of Amazon Selling Partner API (SP-API) SDKs

#### Overview
The Amazon Selling Partner API (SP-API) provides a suite of APIs designed to help
sellers access their selling partner data and manage their selling activity on
Amazon. This documentation specifically highlights the available Software
Development Kits (SDKs) for various programming languages to facilitate integration
with SP-API.

#### Available SDKs


- **C# SDK**
- **Tutorial:** Automate your SP-API calls using C# SDK. This tutorial covers the
details for token exchange and authentication using Login with Amazon (LWA).

- **Java SDK**
- **Tutorial:** Automate your SP-API calls using Java SDK. This tutorial provides
guidance on using Java SDK with authentication via LWA token exchange.

- **JavaScript SDK for Node.js**


- **Tutorial:** Automate your SP-API calls using JavaScript SDK for Node.js. It
also includes information on LWA token exchange and authentication.

- **Python SDK**
- **Tutorial:** Automate your SP-API calls using Python SDK. This tutorial
includes specific instructions for using the Python SDK with LWA authentication.

#### Important Notes


- **SDK Generation:** The SDKs available are not pre-packaged publicly; they
utilize a self-service model where developers generate SDK code directly from API
models using swagger-codegen. This method ensures updated and tailored SDK versions
for compatibility with the latest SP-API features.

- **Control Over SDK:** The self-service approach provides developers with direct
control over SDK generation and versioning, which results in a more customized
integration experience.

#### Key Concepts and Usage


- **LWA Token Exchange:** All SDKs use the Login with Amazon (LWA) system for
authentication. This mechanism allows applications to securely authorize users when
accessing SP-API.

- **Customization:** Since the SDKs are generated from models, developers can
customize the generated SDKs to better fit their specific requirements and ensure
they incorporate any new API changes promptly.

#### Tutorials and Implementations


Each SDK comes with a tutorial that guides the developer through automated calls to
the SP-API, ensuring the correct implementation of security practices (like LWA
token exchange) and making API requests seamless.

This information provides an essential foundation for developers looking to


implement the Seller Partner API using the available SDKs, particularly if they are
focusing on Python. It is critical that developers pay attention to the self-
service generation of SDKs to leverage the most recent updates.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/delete-an-


application-from-your-developer-account:
## Summary: Deleting an Application from Your Developer Account using Amazon SP-API

### Key Concepts

- **Application Deletion Conditions**:


An application can be deleted from your developer account if it meets **all** of
the following criteria:
- The application is in **draft** state and is not published.
- The application is only used on **SP-API**.
- The application does not have an **Amazon Business** role.
- The application does not have any existing active **OAuth** or **self-
authorizations**.

- **Irreversibility**:
- The deletion of an application and revocation of self-authorizations cannot be
undone. If you need to recreate the self-authorization, you must follow the set
workflow.

### Important Notes


- **Contact Support**:
If an application does not meet the deletion criteria, contact the **SP-API
Developer Support team** with the Application ID and relevant authorization
(Merchant Customer ID for sellers or Vendor Group ID for vendors).

- **Revoking Authorizations**:
Self-authorizations must be revoked prior to deleting the application:
- Refer to the OAuth documentation to revoke an OAuth token.
- For revoking self-authorizations, see the respective workflows.

### Deleting Public Applications and Private Seller Applications

1. **Sign in to Seller Central**: Use your developer credentials and navigate to


**Develop Apps**.
2. **Manage Authorizations**:
- Expand the dropdown next to your application and choose **Authorize** to
access the Manage Authorizations page.
- In the **Revoke Authorization** section, expand **Self-Authorizations** to
view and revoke any active authorizations.
3. **Delete the Application**:
- Return to **Develop Apps**.
- Click **Edit** for the application you’ve removed self-authorizations from.
- Scroll down and click **Delete app**.
- Confirm deletion by pasting the app ID from the confirmation message.

### Deleting Private Vendor Applications

1. **Sign in to Vendor Central**: Use the developer account credentials.


2. **Access API Integration**:
- Select the **Integration menu** and choose **API Integration**.
3. **Manage Authorizations**:
- Expand the dropdown next to your application and choose **Authorize** to
navigate to the Manage Authorizations page.
- In the **Revoke Authorization** section, revoke all active self-
authorizations.
4. **Delete the Application**:
- Navigate back to the Developer Central page through the **Integration menu**.
- Click **Edit** for the application you’ve removed self-authorizations from.
- Scroll to the bottom and select **Delete app**.
- Confirm deletion by pasting the application ID from the pop-up text box.

### Conclusion
Understanding the workflow for deleting applications, including managing
authorizations, is essential for maintaining your Amazon SP-API applications.
Always remember that deletions are permanent and ensure you are ready to proceed
with the deletion before confirming.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/delete-an-


application-from-your-developer-account#delete-public-applications-and-private-
seller-applications:
# Summary of Deleting an Application from Your Developer Account

## Key Concept
- **Deleting Applications**: You can delete applications from your developer
account provided they meet certain conditions, ensuring unwanted applications and
permissions do not persist unnecessarily.

## Conditions for Deletion


An application can be deleted if:
- It is **not in the production state**.
- It is in **draft state** and is not published.
- It is exclusively used on **SP-API**.
- It does **not** possess an **Amazon Business role**.
- It has **no active OAuth or self-authorizations**.

## Important Notes
- **Revoking is Irreversible**: Deletion of the application and revocation of self-
authorizations cannot be undone. Ensure that you are certain before proceeding.
- **Contact Support**: If your application does not meet the deletion conditions,
reach out to the SP-API Developer Support team with the appropriate identifiers
(Application ID, Merchant Customer ID for sellers, Vendor Group ID for vendors).

## Steps to Delete Applications

### For Public Applications and Private Seller Applications:


1. **Sign in** to Seller Central using your developer credentials.
2. Navigate to **Develop Apps**.
3. Find the desired application and expand the drop-down next to **Edit**, then
select **Authorize** to access the **Manage Authorizations** page.
4. In the **Revoke Authorization** section, expand **Self-Authorizations** to view
and select **Revoke** for any active authorizations you want to remove.
5. Return to **Develop Apps**, select **Edit** for the application from which you
removed self-authorizations.
6. Scroll down and select **Delete app**.
7. Paste the application ID from the confirmation message into the text box.
8. Confirm by choosing **Delete app**.

### For Private Vendor Applications:


1. **Sign in** to Vendor Central with your developer credentials.
2. Select the **Integration** menu and click on **API Integration**.
3. Expand the drop-down next to **Edit** for any application and choose
**Authorize** to go to the **Manage Authorizations** page.
4. In the **Revoke Authorization** section, expand **Self-Authorizations** to view
and select **Revoke** for all active authorizations.
5. Navigate back to **Integration** and select **API Integration**.
6. Choose **Edit** for the application you just revoked self-authorizations from.
7. Scroll to the bottom and select **Delete app**.
8. A text box will pop up. Copy the application ID from the confirmation page and
paste it into the text box to confirm.

### Important Warnings


- **OAuth Revocation**: You cannot revoke OAuth from your application through self-
service. This requires separate handling.

## Conclusion
Carefully follow the deletion process ensuring that the conditions are met for your
application. Always backup necessary application identifiers before proceeding with
deletions, as these actions cannot be reversed.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/delete-an-


application-from-your-developer-account#delete-private-vendor-applications:
## Summary of "Delete an Application from Your Developer Account"

### Overview
This documentation provides guidance on how to delete applications from your Amazon
Selling Partner API (SP-API) developer account, specifically focusing on the
conditions and steps required for both public and private applications.

### Important Conditions for Deletion


To delete an application from your developer account, it must meet the following
conditions:
- The application is **not in the production state**.
- The application is in a **draft state and is not published**.
- The application is used **only on SP-API**.
- The application does not have an **Amazon Business role**.
- The application does not have any existing **active OAuth or self-
authorizations**.

**Note**: Deleting an application or revoking authorizations cannot be undone or


rolled back.

### Deletion Steps

#### Deleting Public Applications and Private Seller Applications


1. **Sign In** to Seller Central with your developer credentials.
2. Navigate to **Develop Apps**.
3. For the application you wish to delete:
- Expand the dropdown next to **Edit** and select **Authorize** to access the
**Manage Authorizations** page.
4. In the **Revoke Authorization** section, expand **Self-Authorizations** to view
active self-authorizations.
5. Choose **Revoke** for any authorization you wish to remove.
6. Go back to **Develop Apps**, edit the application from which you removed self-
authorizations.
7. Scroll to the bottom and select **Delete app**.
8. Confirm deletion by pasting the app ID from the confirmation message into the
text box.
9. Choose **Delete app** to finalize the deletion.

#### Deleting Private Vendor Applications


1. **Sign In** to Vendor Central using the credentials used to register as a
developer.
2. Select **Integration** and then **API Integration**.
3. For the application:
- Expand the dropdown next to **Edit** and select **Authorize** to access
**Manage Authorizations**.
4. In the **Revoke Authorization** section, expand **Self-Authorizations** to view
and revoke active self-authorizations.
5. Navigate back to the Developer Central page via the **Integration menu**.
6. Edit the application that had self-authorizations removed.
7. Scroll to the bottom and select **Delete app**.
8. Confirm deletion by copying the application ID from the confirmation page and
pasting it into the text box.
9. Complete the process by choosing **Delete app**.

### Important Notes and Caveats


- Ensure that all necessary self-authorizations are revoked before attempting to
delete any application.
- If the application does not meet the specified conditions for deletion, reach out
to the SP-API Developer Support team, providing the **Application ID** and the
relevant authorization details (Merchant Customer ID for sellers or Vendor Group ID
for vendors).
- **Warning**: Revoking OAuth cannot be performed through the self-service
workflow, thus must be handled according to OAuth documentation.

### Conclusion
Following these guidelines will help developers manage their applications
effectively within Amazon's Selling Partner API structure, ensuring compliance with
policies and administration protocols.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/the-selling-partner-


api-sandbox:
# Selling Partner API Sandbox Summary

## Overview
The Selling Partner API (SP-API) Sandbox provides two environments for testing
applications without impacting production data: a static sandbox and a dynamic
sandbox.

### Key Concepts


1. **Static Sandbox**:
- Utilizes pattern matching to return static, mocked responses based on
predefined parameters.
- Ideal for checking functionality.

2. **Dynamic Sandbox**:
- Proxies requests to a sandbox backend, allowing responses to be dynamic and
responsive to inputs.
- Useful for verifying stateful operations.
### Important Notes
- **Throttling Limits**: Calls to sandbox endpoints are limited to five requests
per second and a burst of up to 15 requests.
- **Restricted Data Token (RDT)**: If a sandbox call requires an RDT, it must be
fetched from the production environment.
- **Sandbox-Only Operations**: Some APIs are available only in the sandbox and
cannot be executed in the production environment. These will have the `"x-amzn-api-
sandbox-only": true` attribute.

## Sandbox Endpoints
| Region | Endpoint | AWS Region
|
|----------|---------------------------------------------------------|-------------
|
| North America | https://sandbox.sellingpartnerapi-na.amazon.com | us-east-1 |
| Europe | https://sandbox.sellingpartnerapi-eu.amazon.com | eu-west-1 |
| Far East | https://sandbox.sellingpartnerapi-fe.amazon.com | us-west-2 |

## Making API Calls


### Static Sandbox Calls
**Step 1**: Check JSON for request parameters - Navigate to the desired API’s
Swagger model JSON file and look for `x-amzn-api-sandbox` objects for available
parameters.

**Step 2**: Make a static sandbox call -


```json
POST https://sandbox.sellingpartnerapi-na.amazon.com/{api-endpoint}
Headers:
{
"x-amzn-api-sandbox": {
"static": []
}
}
```

### Dynamic Sandbox Calls


**Step 1**: Check for support - Ensure that the operation JSON includes:
```json
"x-amzn-api-sandbox": {
"dynamic": {}
}
```

**Step 2**: Make a dynamic sandbox call -


```json
POST https://sandbox.sellingpartnerapi-na.amazon.com/{api-endpoint}
Headers:
{
"x-amzn-api-sandbox": {
"dynamic": {}
}
}
```

## API Response Types


- **Static Sandbox**: Returns responses defined in mocked JSON objects where
parameters are matched.
- **Dynamic Sandbox**: Returns responses based on the context provided by the
request, allowing potential stateful interaction.
## Additional Resources
- Refer to the documentation pages for detailed guidance on specific API calls and
parameters, as well as to review Swagger model JSON files for each API section.

This summary captures essential information regarding the Selling Partner API
Sandbox for developers looking to test applications effectively and understand its
functionalities without affecting live systems.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/the-selling-partner-


api-sandbox#how-to-make-a-static-sandbox-call-to-the-selling-partner-api:
# Summary of the Selling Partner API Sandbox Documentation

## Overview
The Selling Partner API (SP-API) provides developers with two sandbox environments
for testing their applications without affecting production data. These are:
- **Static Sandbox**: Returns static, mocked responses based on pattern matching.
- **Dynamic Sandbox**: Routes requests to a sandbox backend, allowing for stateful
responses based on request parameters.

## Important API Endpoints


### Sandbox Endpoints by Region:
- **North America**:
- Endpoint: `https://sandbox.sellingpartnerapi-na.amazon.com`
- AWS Region: `us-east-1`
- **Europe**:
- Endpoint: `https://sandbox.sellingpartnerapi-eu.amazon.com`
- AWS Region: `eu-west-1`
- **Far East**:
- Endpoint: `https://sandbox.sellingpartnerapi-fe.amazon.com`
- AWS Region: `us-west-2`

## Key Concepts
### Static Sandbox
- **Definition**: The static sandbox returns predefined responses based on specific
request parameters. It is designed to mimic the behavior of production without
causing side effects.
- **Response Structure**:
```json
{
"x-amzn-api-sandbox": {
"static": [
{
"request": { "parameters": { /* Specified parameters */ }},
"response": { /* Mocked response */ }
}
]
}
}
```
- **Usage Steps**:
1. Check the relevant API's Swagger model JSON file for static sandbox request
parameters.
2. Make calls by directing to the static sandbox endpoint and including the
specified parameters.
### Dynamic Sandbox
- **Definition**: The dynamic sandbox allows for a more flexible testing
environment where requests can generate variable and stateful responses.
- **Support Check**:
Look for the following JSON structure in the Swagger model:
```json
{
"x-amzn-api-sandbox": {
"dynamic": {}
}
}
```
- **Usage Steps**:
Similar to the static sandbox; however, responses vary based on request
parameters.

### Sandbox-only Operations


- **Definition**: Some API calls can only succeed in the sandbox environment and
provide testing capabilities not available in the production API. Identified by the
presence of:
```json
{
"x-amzn-api-sandbox-only": true
}
```

## Important Notes
- **Throttling Limits**: The sandbox calls are limited to:
- Rate: 5 requests per second
- Burst: 15 requests
This is crucial for developers to avoid exceeding the limits during testing.

- **Restricted Data Token (RDT)**: If testing operations that require an RDT, it


must be obtained from the production environment and used in sandbox calls.

### General Procedure for Making Calls


1. Identify the API and check the Swagger model to determine if it supports sandbox
calls.
2. Follow the provided steps specific to each sandbox type (static or dynamic).
3. Ensure all required parameters are included for successful responses.

## Example Usage
### Static Call Example
1. **Check Swagger JSON** for parameters:
```json
{
"x-amzn-api-sandbox": {
"static": [
{
"request": {
"parameters": {
"key": "value"
}
},
"response": {
"result": "mock response"
}
}
]
}
}
```
2. **Make request** to the static sandbox endpoint with required parameters.

### Dynamic Call Example


1. Ensure operation supports dynamic calls by checking Swagger JSON.
2. **Make request** similar to production but directed to the sandbox endpoint,
with potential varied responses based on input.

This structured approach enables developers to efficiently test and validate their
integration with the Selling Partner API without impacting live environments.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/the-selling-partner-


api-sandbox#the-selling-partner-api-static-sandbox:
# Summary of the Selling Partner API Sandbox Documentation

## Overview
The Selling Partner API (SP-API) provides two sandbox environments to test
applications without affecting production data: the static sandbox and the dynamic
sandbox.

### 1. Selling Partner API Sandbox Types


#### A. Static Sandbox
- **Functionality**: Returns static, mocked responses based on pattern matching.
- **Usage**: Calls to static sandbox endpoints are identical to production calls.

**Steps to Make a Static Sandbox Call**:


1. **Check JSON File for Request Parameters**:
- Navigate to the API documentation and locate the relevant Swagger model JSON
file.
- Look for `x-amzn-api-sandbox` objects that contain a "static" array with
request and response examples.

2. **Make the Call**:


- Include required parameters from the JSON file.
- Direct your call to sandbox endpoints and receive a response defined in the
static sandbox JSON object.

**Example**:
```json
"x-amzn-api-sandbox": {
"static": [
{
"request": {
"parameters": {
...
}
},
"response": {
...
}
}
]
}
```
#### B. Dynamic Sandbox
- **Functionality**: Routes requests to a sandbox backend that returns realistic
responses based on parameters, allowing for more complex interactions.
- **Usage**: Similar to production calls, but directed to sandbox endpoints.

**Steps to Make a Dynamic Sandbox Call**:


1. **Check JSON File**:
- Review Swagger model JSON to find operations supporting dynamic sandbox calls,
indicated by `x-amzn-api-sandbox` containing a "dynamic" object.

2. **Make the Call**:


- Direct your call to one of the Selling Partner API sandbox endpoints.

**Example**:
```json
"x-amzn-api-sandbox": {
"dynamic": {}
}
```

### 2. Sandbox-only Operations


- **Definition**: Some operations are only available in the sandbox and are
indicated by `x-amzn-api-sandbox-only: true`.
- **Purpose**: These operations enable test workflows not achievable with
production API calls.

### 3. Important Notes and Throttling Limits


- **Throttling**:
- Rate: 5 requests per second
- Burst: 15 requests
- **RDT (Restricted Data Token)**:
- For operations requiring an RDT, obtain it from the production environment for
use in sandbox calls.

### 4. Selling Partner API Sandbox Endpoints


- **North America**:
- Endpoint: `https://sandbox.sellingpartnerapi-na.amazon.com`
- AWS Region: `us-east-1`
- **Europe**:
- Endpoint: `https://sandbox.sellingpartnerapi-eu.amazon.com`
- AWS Region: `eu-west-1`
- **Far East**:
- Endpoint: `https://sandbox.sellingpartnerapi-fe.amazon.com`
- AWS Region: `us-west-2`

### Key Concepts


- **Static vs Dynamic Responses**: Understand the difference; static responses are
mocked based on preset patterns, while dynamic responses can simulate real-world
scenarios.
- **Sandbox-only Operations**: Recognize operations meant solely for testing
purposes to facilitate complete workflow trials.

### Conclusion
The SP-API sandbox is a crucial tool for developers to safely test API calls and
workflows. Use the static sandbox for predictable responses and the dynamic sandbox
for more complex scenario testing. Pay attention to throttling limits and ensure
the correct usage of RDT when necessary to maximize your testing efficiency.
_____________________________
Summary of URL: https://developer-docs.amazon.com/sp-api/docs/the-selling-partner-
api-sandbox#the-selling-partner-api-dynamic-sandbox:
### Selling Partner API Sandbox Overview

The Selling Partner API (SP-API) Sandbox provides two environments to test
applications without affecting production data: **Static Sandbox** and **Dynamic
Sandbox**.

---

### Key Concepts

1. **Static Sandbox**:
- Returns static, mocked responses based on predefined patterns.
- Responses are generated via pattern matching and mimic real API responses.
- Ideal for testing the structure of API calls.

2. **Dynamic Sandbox**:
- Processes requests dynamically through a backend that generates responses
based on input.
- Allows for stateful interactions, useful for testing complex workflows (e.g.,
shipping charge calculations).

3. **Sandbox-Only Operations**:
- Certain API operations are limited to sandbox environments and can only
succeed when targeted to sandbox endpoints. These operations assist in creating
comprehensive test workflows.

4. **Endpoints**:
- Specific endpoints for testing based on selling regions.
- North America: `https://sandbox.sellingpartnerapi-na.amazon.com`
- Europe: `https://sandbox.sellingpartnerapi-eu.amazon.com`
- Far East: `https://sandbox.sellingpartnerapi-fe.amazon.com`

---

### Making Sandbox Calls

#### 1. **Static Sandbox Call Example**:


- **Endpoint**: A request is directed to a static sandbox endpoint.
- **Request Parameters**: Check the Swagger model JSON for the API to retrieve the
needed parameters.

```json
"x-amzn-api-sandbox": {
"static": [
{
"request": {
"parameters": {
// Include required parameters here
}
},
"response": {
// Expected mocked response structure
}
}
]
}
```

#### Steps:
- **Step 1**: Review the JSON file in the documentation for parameters.
- **Step 2**: Make a call to the static endpoint with the necessary parameters.

#### 2. **Dynamic Sandbox Call Example**:


- **Endpoint**: Direct calls to a dynamic sandbox endpoint.
- **Supported Operations**: Check for a specific object in the Swagger model JSON.

```json
"x-amzn-api-sandbox": {
"dynamic": {}
}
```

#### Steps:
- **Step 1**: Inspect the Swagger model for dynamic support.
- **Step 2**: Issue a call to the dynamic endpoint.

---

### Important Notes

- **Rate Limits**:
- Static/Dynamic sandbox calls are limited to **5 requests per second** with a
burst limit of **15**. For more details, refer to the **Usage Plans and Rate
Limits** section.

- **Restricted Data Token (RDT)**: If testing calls that require an RDT, it must be
obtained from the production environment and included in sandbox requests.

- **Mock Responses**: While using the static sandbox, ensure to refer to the
correct mock response structures in the Swagger model.

- **Throttling and Best Practices**:


- Always follow best practices for API usage to avoid throttling and ensure
smoother testing.

This summary provides a structured approach to utilizing the Selling Partner API
Sandbox for testing purposes. Use the defined methods and examples to effectively
integrate and experiment with the SP-API. For further details, consult the specific
API documentation available through Amazon’s developer resources.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/the-selling-partner-


api-sandbox#selling-partner-api-sandbox-endpoints:
### Selling Partner API Sandbox Summary

#### Overview
The Selling Partner API (SP-API) offers two sandbox environments for testing
applications without affecting production data.

1. **Static Sandbox**: Returns predefined mock responses based on input parameters


(pattern matching).
2. **Dynamic Sandbox**: Routes requests to a sandbox backend that returns realistic
responses based on the request parameters.

#### Sandbox Endpoints


- **North America**: `https://sandbox.sellingpartnerapi-na.amazon.com`
- **Europe**: `https://sandbox.sellingpartnerapi-eu.amazon.com`
- **Far East**: `https://sandbox.sellingpartnerapi-fe.amazon.com`

#### Important Usage Notes


- **Rate Limits**: Calls are subject to throttling limits: 5 requests per second,
with bursts of 15.
- **Restricted Data Token (RDT)**: For sandbox calls requiring RDT, retrieve the
token from the production environment.

#### Static Sandbox


1. **Making Calls**:
- Call the sandbox endpoints like production calls.
- Refer to the API's Swagger model JSON file for the correct request parameters.

2. **Example JSON Response Structure**:


```json
"x-amzn-api-sandbox": {
"static": [
{
"request": {
"parameters": { ... }
},
"response": { ... }
}
]
}
```

#### Dynamic Sandbox


1. **Making Calls**:
- Similar to static calls; direct requests to the sandbox endpoints.
- Responses may vary based on input, allowing for more extensive testing.

2. **JSON Support Check**:


- Look for the presence of:
```json
"x-amzn-api-sandbox": {
"dynamic": {}
}
```

#### Sandbox-Only Operations


- Some operations are only available in the sandbox, indicated by:
```json
"x-amzn-api-sandbox-only": true
```
These allow testing workflows that can't be accomplished through production API
calls.

#### Key Concepts


- **APIs and Mock Responses**: The static sandbox uses predefined responses for
specific parameters. The dynamic sandbox provides more flexible responses.
- **Swagger Model**: The model contains essential information about request
parameters and their required formats.
#### Additional Caveats
- The sandbox environments are strictly for functionality testing and should not be
used for testing scalability.
- Ensure all required parameters as defined in the Swagger model are included in
calls for successful responses.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/the-selling-partner-


api-sandbox#static-sandbox-json-objects:
# Summary of the Selling Partner API Sandbox Documentation

## Introduction to the SP-API Sandbox


The **Selling Partner API (SP-API)** provides two sandbox environments:
- **Static Sandbox:** Returns static, mocked responses.
- **Dynamic Sandbox:** Routes requests to a backend that can return more realistic,
stateful responses.

### Important Notes


- **Testing Purpose:** The sandbox environments are intended for testing
application functionality only, not for scalability.
- **Rate Limits:**
- Maximum: **5 requests per second**
- Burst: **15 requests**
- **Restricted Data Token (RDT):** If testing a call that requires an RDT, retrieve
one from the production environment and include it in your sandbox call.

## Static Sandbox
### Making Static Sandbox Calls
1. **Check the JSON File for Request Parameters:**
- Go to the appropriate API documentation and locate the Swagger model JSON
file.
- Look for an object similar to:
```json
"x-amzn-api-sandbox": {
"static": [...]
}
```
2. **Make a Static Sandbox Call:**
- Call the API like a production call, directing to the sandbox endpoints and
including needed parameters.
- Example response structure:
```json
{
"static": [
{
"request": {
"parameters": { ... }
},
"response": { ... }
}
]
}
```

## Dynamic Sandbox
### Making Dynamic Sandbox Calls
1. **Check Supported Operations:**
- Review the Swagger model JSON for:
```json
"x-amzn-api-sandbox": {
"dynamic": {}
}
```
2. **Make a Dynamic Sandbox Call:**
- Similar to a production call, but directed to sandbox endpoints.

## Sandbox-Only Operations
- Some APIs are **sandbox-only** due to their specific functionalities, indicated
by:
```json
"x-amzn-api-sandbox-only": true
```
- Use cases may include creating data items that are not possible through
production APIs.

## Sandbox Endpoints
The SP-API offers sandbox endpoints for various regions:

| Selling Region | Endpoint | AWS Region |


|----------------|--------------------------------------------------|-------------|
| North America | https://sandbox.sellingpartnerapi-na.amazon.com | us-east-1 |
| Europe | https://sandbox.sellingpartnerapi-eu.amazon.com | eu-west-1 |
| Far East | https://sandbox.sellingpartnerapi-fe.amazon.com | us-west-2 |

## Key Concepts
- **Swagger Model JSON:** Key for determining the required parameters and formats
for requests and responses in both types of sandboxes.
- **Mocking Framework:** The static sandbox mimics functionality similar to mocking
frameworks, utilizing pattern matching to respond to specific parameters.

## Conclusion
The SP-API sandbox environment is essential for testing and developing applications
without affecting production data. Familiarity with the correct endpoints and
methods of making requests is crucial for successful interactions with the APIs.
Remember to adhere to rate limits and understand the necessity for RDTs when
required.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/the-selling-partner-


api-sandbox#step-1-check-the-json-file-for-request-parameters:
# Selling Partner API Sandbox Summary

The Selling Partner API (SP-API) provides sandbox environments for testing
applications without affecting production data. This summary covers the important
aspects of the SP-API Sandbox, including how to make calls, types of sandboxes, and
endpoints.

## Key Concepts

### Sandbox Environments


- **Static Sandbox**: Returns static, mocked responses based on predefined pattern
matching. Ideal for testing API calls with known parameters.
- **Dynamic Sandbox**: Proxies requests to a backend that returns responses based
on actual request parameters, making it possible to test stateful interactions.

### Important Notes


- The sandbox environments are primarily for functionality testing, not scalability
testing. They are subject to a throttling limit of 5 requests per second and a
burst of 15 requests.
- If a call requires a Restricted Data Token (RDT), it must be obtained from the
production environment.
- Always ensure requests include all required parameters as defined in the Swagger
model JSON for a successful response.

## Making Sandbox Calls

### Step 1: Check JSON File for Request Parameters


1. Navigate to the Documentation page and locate the desired API.
2. Choose the Swagger model JSON file for the API.
3. Search for the `x-amzn-api-sandbox` object containing a "static" array.

### Step 2: Make a Static Sandbox Call


- Use the parameters from the JSON file when making your call.
- Direct the call to the appropriate Selling Partner API sandbox endpoint.

**Example JSON Object for Static Sandbox**:


```json
"x-amzn-api-sandbox": {
"static": [
{
"request": {
"parameters": {
...
}
},
"response": {
...
}
}
]
}
```

### Making Dynamic Sandbox Calls


1. Follow similar steps as above, ensuring to identify if the operation supports
dynamic sandbox calls indicated by the presence of:
```json
"x-amzn-api-sandbox": {
"dynamic": {}
}
```

### Sandbox-Only Operations


- Some APIs are designed exclusively for the sandbox and include a flag:
```json
"x-amzn-api-sandbox-only": true
```
- These APIs allow testing workflows that aren't achievable with the production
API.

## Sandbox Endpoints
The SP-API has specific endpoints for different regions. Here are the sandbox
endpoints:

| Selling Region | Endpoint | AWS Region |


|----------------|--------------------------------------------|---------------|
| North America | https://sandbox.sellingpartnerapi-na.amazon.com | us-east-1
|
| Europe | https://sandbox.sellingpartnerapi-eu.amazon.com | eu-west-1
|
| Far East | https://sandbox.sellingpartnerapi-fe.amazon.com | us-west-2
|

## Conclusion
Utilizing the Selling Partner API Sandbox allows developers to test their
applications efficiently without impacting real-world data. Always refer to the
Swagger model for accurate parameters and environment specifications when making
sandbox calls.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/the-selling-partner-


api-sandbox#step-2-make-a-static-sandbox-call-to-an-api:
# Selling Partner API Sandbox Overview

## Key Concepts

### Selling Partner API Sandbox


The Selling Partner API (SP-API) provides two environments for testing applications
without affecting production data:
1. **Static Sandbox**: Returns static, mocked responses based on pattern matching.
2. **Dynamic Sandbox**: Returns realistic responses based on request parameters,
allowing for stateful interaction.

### Important Endpoints for Sandboxes


- **Static Sandbox Endpoint**:
- North America: `https://sandbox.sellingpartnerapi-na.amazon.com`
- **Dynamic Sandbox Endpoint**: Direct calls to these will behave like production
calls.

### Usage Notes


- **Throttling Limits**:
- Rate: 5 requests per second
- Burst: 15 requests
- **Restricted Data Token (RDT)**: If an API call needs an RDT, it must be obtained
from the production environment.

## Making Sandbox Calls

### Static Sandbox Call


1. **Check the Swagger Model**
- Go to the API documentation and find the Swagger model JSON file.
- Look for `x-amzn-api-sandbox` with a "static" array.

2. **Call Structure Example**:


```json
{
"x-amzn-api-sandbox": {
"static": [
{
"request": {
"parameters": {
"exampleParam": "value"
}
},
"response": {
"result": "mockedResponse"
}
}
]
}
}
```
3. **Execute Call**: Make the call as if it was a production call, using the
sandbox endpoint.

### Dynamic Sandbox Call


1. **Check for Dynamic Capability**
- In the Swagger model JSON, look for `x-amzn-api-sandbox` with a "dynamic"
object.

2. **Call Structure Example**:


```json
{
"x-amzn-api-sandbox": {
"dynamic": {}
}
}
```
3. **Execute Call**: Similar to static calls, but directed to the dynamic endpoint.

### Sandbox-only Operations


- Identified by `x-amzn-api-sandbox-only`: true in the Swagger model.
- These are exclusive APIs for testing workflows that cannot be accomplished
through the production APIs.

## Important Caveats
- The sandbox environment is meant for functionality testing, not scalability.
- API calls requiring RDT should handle this accordingly, as production tokens are
required.

## Summary
The Selling Partner API Sandbox provides developers with a safe environment to test
SP-API calls. Understanding the distinction between static and dynamic sandboxes is
essential for effective development and testing. Pay attention to throttling
limits, and ensure compliance with RDT requirements when necessary. Use the
documented JSON structures to format requests and analyze responses effectively.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/the-selling-partner-


api-sandbox#how-to-make-a-dynamic-sandbox-call-to-the-selling-partner-api:
### Summary of the Selling Partner API Sandbox Documentation

#### Overview
The Selling Partner API (SP-API) sandbox provides two environments for testing API
calls without affecting production data:
1. **Static Sandbox**: Returns static, mocked responses using pattern matching.
2. **Dynamic Sandbox**: Returns realistic responses based on request parameters,
allowing for more flexible testing.

### Important Concepts

1. **Static Sandbox**
- **Usage**: Make requests to sandbox endpoints to receive predefined responses.
- **Request Example**: Use the JSON format to specify parameters:
```json
"x-amzn-api-sandbox": {
"static": [
{
"request": {
"parameters": { ... }
},
"response": { ... }
}
]
}
```
- **How to Make a Call**:
1. Check the **Swagger model JSON** file for request parameters.
2. Direct your call to sandbox endpoints and include required parameters.

2. **Dynamic Sandbox**
- **Usage**: Similar to production calls but allows for stateful and realistic
interactions.
- **Check Support**: Look for the following object in the Swagger model:
```json
"x-amzn-api-sandbox": {
"dynamic": {}
}
```
- **How to Make a Call**:
1. Confirm that dynamic sandbox calls are supported by checking the API
documentation.
2. Direct calls to sandbox endpoints as you would in production.

3. **Sandbox-Only Operations**:
- Designed for testing APIs that do not exist in production.
- **Identification**: Look for:
```json
"x-amzn-api-sandbox-only": true
```

### API Endpoints

The sandbox endpoints are separated by selling regions:

| Selling Region | Endpoint | AWS Region |


|----------------|-----------------------------------------|------------|
| North America | `https://sandbox.sellingpartnerapi-na.amazon.com` | us-east-1
|
| Europe | `https://sandbox.sellingpartnerapi-eu.amazon.com` | eu-west-1 |
| Far East | `https://sandbox.sellingpartnerapi-fe.amazon.com` | us-west-2 |

### Important Notes

- **Throttling Limits**: Tests are subject to:


- Rate: **5 requests per second**
- Burst: **15 requests**

- **Restricted Data Token (RDT)**: If the API call requires an RDT, it must be
obtained from the production environment to be used in sandbox calls.

- **Testing Limitations**: The sandbox is for functionality testing only, not


scalability testing.

### Tutorials
- For using SDKs:
- Python tutorials for automating SP-API calls are available.

### Conclusion
This summary provides the fundamental knowledge and essential guidelines for using
the Selling Partner API Sandbox effectively, ensuring that developers can test
their APIs with both static and dynamic responses. Make sure to understand the
limitations and requirements for testing, especially concerning RDTs and endpoint
usage.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/the-selling-partner-


api-sandbox#step-1-check-the-json-file-for-operations-that-support-dynamic-sandbox-
calls:
### Amazon Selling Partner API Sandbox Overview

The **Selling Partner API (SP-API) Sandbox** provides a testing environment that
allows developers to make calls to the API without affecting production data. There
are two types of sandbox environments available: static and dynamic.

#### Key Concepts

1. **Static Sandbox**:
- Returns predetermined, mocked responses based on request parameters.
- Implemented using **pattern matching** to match the API calls to defined
responses.
- Developers must refer to the **Swagger model JSON file** for the required
parameters for successful calls.

2. **Dynamic Sandbox**:
- Routes requests to a sandbox backend, returning responses based on input
parameters, allowing for more realistic testing.
- Supports stateful responses and may accommodate a wider range of operations
than the static sandbox.

3. **Sandbox-only Operations**:
- Some API operations are sandbox-only and can only function in the sandbox
environments. They can assist in creating test workflows that aren't possible
through production APIs.

#### Important API Endpoints

- **North America**:
```
https://sandbox.sellingpartnerapi-na.amazon.com
```
- **Europe**:
```
https://sandbox.sellingpartnerapi-eu.amazon.com
```
- **Far East**:
```
https://sandbox.sellingpartnerapi-fe.amazon.com
```

#### Making Sandbox Calls

##### Making a Static Sandbox Call

1. **Check the JSON file**:


- Navigate to the desired API in the documentation.
- Locate the Swagger model JSON file and search for the `x-amzn-api-sandbox`
object that contains a "static" array.

2. **Structure of Static Sandbox Call**:


```json
{
"x-amzn-api-sandbox": {
"static": [
{
"request": {
"parameters": { /* required parameters */ }
},
"response": { /* expected response */ }
}
]
}
}
```
- Make the call using the parameters specified in the response mock and direct
it to the **sandbox endpoint**.

##### Making a Dynamic Sandbox Call

1. **Check the JSON file**:


- Similar to the static call, find the Swagger model JSON file.
- Look for `x-amzn-api-sandbox` with a "dynamic" object.

2. **Example Structure**:
```json
{
"x-amzn-api-sandbox": {
"dynamic": {}
}
}
```
- Make a call to the sandbox endpoints, ensuring that endpoint matches the API
supported in the Swagger file.

#### Important Notes

- The sandbox is intended for **testing functionality**, not for scalability


testing.
- **Throttling limits** for sandbox calls:
- Rate: 5 requests per second
- Burst: 15 requests
- Calls that require a **Restricted Data Token (RDT)** must obtain it from the
production environment before being used in the sandbox.

#### Conclusion

The Selling Partner API Sandbox is a valuable tool for developers looking to
integrate with Amazon's API in a controlled environment. Differentiating between
static and dynamic calls is crucial, and the correct handling of JSON parameters
allows for successful interaction with the API endpoints. For Python-specific
development, use the tutorials provided in the developer hub for assistance in
making API calls.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/the-selling-partner-


api-sandbox#step-2-make-a-dynamic-sandbox-call-to-an-api:
# Summary of Selling Partner API Sandbox Documentation

## Overview
The Selling Partner API (SP-API) offers two sandbox environments for developers to
test their applications without affecting production data:
1. **Static Sandbox**: Offers mocked responses based on pattern matching.
2. **Dynamic Sandbox**: Provides more realistic, stateful responses based on
request parameters.

### Important Notes


- Sandbox environments are for testing functionality only, **not scalability**.
- Rate limits for sandbox calls:
- Rate: 5 requests per second
- Burst: 15 requests
- For calls requiring a **Restricted Data Token (RDT)**, obtain the RDT from the
production environment.

## Key Concepts

### 1. **Static Sandbox**


- **Making Calls**: Similar to production calls, but directed to sandbox endpoints,
returning static mocked responses.
- **Static JSON Objects**: Requests match certain parameters to trigger predefined
responses. Here’s the JSON structure:
```json
"x-amzn-api-sandbox": {
"static": [
{
"request": {
"parameters": {
...
}
},
"response": {
...
}
}
]
}
```
- **Steps to Make a Static Call**:
- **Step 1**: Check the JSON for request parameters in the API's Swagger model.
- **Step 2**: Make the call using noted parameters directed to the sandbox
endpoint.

### 2. **Dynamic Sandbox**


- **Making Calls**: Same as production calls but directed to sandbox endpoints;
responses vary based on request states.
- Operations that support dynamic sandbox calls are indicated as follows:
```json
"x-amzn-api-sandbox": {
"dynamic": {}
}
```
- **Steps to Make a Dynamic Call**:
- **Step 1**: Identify supported dynamic operations in the Swagger model.
- **Step 2**: Make calls directed to the sandbox endpoint.

### 3. **Sandbox-only Operations**


- Special APIs that can only succeed in the sandbox.
- These are indicated by:
```json
"x-amzn-api-sandbox-only": true
```
- Allow testing workflows that cannot be completed in production.

## Selling Partner API Sandbox Endpoints


Sandbox endpoints for various regions:
- **North America**: `https://sandbox.sellingpartnerapi-na.amazon.com` (us-east-1)
- **Europe**: `https://sandbox.sellingpartnerapi-eu.amazon.com` (eu-west-1)
- **Far East**: `https://sandbox.sellingpartnerapi-fe.amazon.com` (us-west-2)

## Conclusion
The Selling Partner API Sandbox provides essential tools for developers to test
their applications in a safe environment. Understanding the differences between
static and dynamic sandboxes, as well as the appropriate usage of sandbox-only
operations, is vital for effective application development and testing. Always keep
the rate limits in mind when making calls.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/the-selling-partner-


api-sandbox#sandbox-only-operations:
## Selling Partner API Sandbox

### Overview
The Selling Partner API (SP-API) provides two sandbox environments for developers
to test their applications without impacting production data. There are two types
of sandboxes available:

1. **Static Sandbox**: Returns static, mocked responses.


2. **Dynamic Sandbox**: Returns realistic, stateful responses based on the request.

### Key Concepts

#### Static Sandbox


- **Purpose**: Allows for testing specific API functionalities by mocking
responses.
- **Request Format**: Calls to the static sandbox are made exactly as in
production, but direct requests to the static sandbox endpoints.
- **Response Structure**: Mocked responses are returned based on pre-defined
parameters.

**Example of Static Sandbox Call:**


```json
"x-amzn-api-sandbox": {
"static": [
{
"request": {
"parameters": {
// define parameters here
}
},
"response": {
// define mocked response structure here
}
}
]
}
```
- **Using Static Sandbox**:
1. Refer to the Swagger model JSON for required parameters.
2. Make a call to the sandbox endpoint with the required parameters.

#### Dynamic Sandbox


- **Purpose**: Enables testing with more flexibility as responses can adapt based
on input.
- **Request Format**: Similar to production calls but directed to dynamic sandbox
endpoints.
- **Supporting Call Checks**: Operations that support dynamic sandbox calls will
contain:
```json
"x-amzn-api-sandbox": {
"dynamic": {}
}
```
- **Using Dynamic Sandbox**:
1. Verify operation support via the Swagger model JSON.
2. Make calls to the sandbox endpoints using production-like requests.

#### Sandbox-Only Operations


- **Definition**: Operations that can only be executed in the sandbox environment,
marked with:
```json
"x-amzn-api-sandbox-only": true
```
- **Purpose**: These operations allow the creation of test workflows that are not
possible through the production API.

### Important Notes


- **Throttling Limits**: Calls made to the sandbox endpoints are subject to rate
limits:
- Rate: 5 requests per second
- Burst: 15.

- **Restricted Data Token (RDT)**: If a sandbox call requires an RDT, it must be


obtained from the production environment.
### Sandbox Endpoints
- **North America**:
```
https://sandbox.sellingpartnerapi-na.amazon.com
```
- **Europe**:
```
https://sandbox.sellingpartnerapi-eu.amazon.com
```
- **Far East**:
```
https://sandbox.sellingpartnerapi-fe.amazon.com
```

### Conclusion
Utilizing the SP-API sandbox is essential for developers needing to validate their
implementations in a safe environment. Be mindful of the throttling limits and
specific configurations for operations in both the static and dynamic sandboxes.
For testing needs involving restricted data, ensure you acquire tokens from the
production environment.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/using-postman-for-


selling-partner-api-models:
# Summary of Using Postman for Selling Partner API Models

## Overview
This documentation explains how to set up and utilize Postman for working with
Amazon's Selling Partner API (SP-API) models. It allows developers to generate
Login with Amazon (LWA) tokens, import SP-API models, and invoke both production
and sandbox endpoints.

## Key Concepts and Steps

### 1. **Credentials Required**


Before making calls to the SP-API, the following credentials are needed:
- **LWA client_id**: Available after registering your application.
- **LWA client_secret**: Also provided post-registration.
- **LWA refresh token**: Obtained from Seller Central after application
authorization.
- **SP-API endpoint**: Reference the SP-API Endpoints documentation for more
information.

### 2. **Generating LWA Access Token with Postman**


To authenticate with the SP-API, generate an access token using Postman by
following these steps:
1. **Create a New HTTP Request**:
- Set **Request Method**: POST
- Set **URL**: `https://api.amazon.com/auth/o2/token`

2. **Add Headers**:
- Choose `No Auth` in the Authorization tab.

3. **Set Body**:
- Choose `x-www-form-urlencoded` in the Body tab and add the following key-value
pairs:
```
Key | Value
---------------------|--------------------------
grant_type | refresh_token
refresh_token | [your refresh token value]
client_id | [your client id value]
client_secret | [your client secret value]
```

4. **Send Request**:
- Click Send. The response will include an `access_token`:
```json
{
"access_token": "Atza|*****",
"refresh_token": "Atzr|*****",
"token_type": "bearer",
"expires_in": 3600
}
```

### 3. **Importing an SP-API Model into Postman**


1. **Access the Swagger Model**:
- Open the selling-partner-api-models folder on GitHub.
- Download the desired API model JSON file.

2. **Import the Model**:


- In Postman, go to **Import** and select the downloaded JSON file.
- Confirm by selecting **Postman Collection** and clicking Import.

### 4. **Calling an SP-API Endpoint**


1. **Set Up Request**:
- Select the newly imported API from your collections.
- Choose the appropriate GET operation.

2. **Add Access Token to Headers**:


- Include the access token with the key:
```
Key | Value
-------------------|--------------------------
x-amz-access-token | [your access token value]
```

3. **Send Request**:
- Click Send and observe the response window for data returned from the call.

### 5. **Calling an SP-API Sandbox Endpoint**


- The procedure is similar to calling production endpoints, but the request should
target the sandbox URLs.
- Ensure the request includes all required parameters as per the Swagger model
corresponding to the API.

### 6. **Important Notes and Caveats**


- Always check the required parameters defined in the Swagger model to ensure
successful calls.
- Ensure the access token is valid and has not expired to avoid authorization
issues.
- Utilize the Selling Partner API sandbox for testing, which helps avoid unintended
interactions with production data.
- The sandbox provides two environments: a static sandbox for mocked responses and
a dynamic sandbox for more realistic interactions based on request parameters.
This document provides essential procedures and examples for using Postman with
Amazon's Selling Partner API, focusing specifically on authentication and importing
API models for interaction.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/using-postman-for-


selling-partner-api-models#generate-a-login-with-amazon-lwa-access-token-using-
postman:
# Summary of Using Postman for Selling Partner API Models

## Overview
This documentation explains how to set up Postman to interact with Amazon's Selling
Partner API (SP-API), including generating access tokens, importing API models, and
making requests to both production and sandbox environments.

## Key Concepts

### Credentials Required


To make calls to the SP-API, you need:
- **LWA `client_id`** and `client_secret`: Obtained after registering your
application.
- **LWA `refresh_token`**: Retrieved from Seller Central after authorizing your
application.
- **SP-API endpoint**: Specific endpoints for making API calls.

## Generating a Login with Amazon (LWA) Access Token

### Steps:
1. Open Postman and sign in.
2. Create a new HTTP Request:
- **Method**: POST
- **URL**: `https://api.amazon.com/auth/o2/token`
3. Set up the request:
- **Authorization**: No Auth
- **Body Type**: x-www-form-urlencoded
4. Add the following key-value pairs in the Body:
| Key | Value |
|------------------|---------------------------|
| grant_type | refresh_token |
| refresh_token | `[your refresh token]` |
| client_id | `[your client id]` |
| client_secret | `[your client secret]` |
5. Send the request; the response includes the access token:
```json
{
"access_token": "Atza|*****",
"refresh_token": "Atzr|*****",
"token_type": "bearer",
"expires_in": 3600
}
```

## Importing an SP-API Model into Postman

### Steps:
1. Download the desired SP-API model JSON file from GitHub.
2. Open Postman, sign in, and choose your workspace.
3. Click **Import**, select your JSON file, and choose **Open**.
4. Select **Postman Collection** and click **Import**. A success message will
confirm importation.

## Calling an SP-API Endpoint

### Steps:
1. Sign in to Postman and choose your workspace.
2. Select the imported API collection and the desired GET operation.
3. Add the access token to the request headers:
| Key | Value |
|-------------------------|--------------------------|
| x-amz-access-token | `[your access token]` |
4. Send the request. The response will populate in the Response window.

## Calling an SP-API Sandbox Endpoint

### Notes:
- The sandbox allows you to test applications without affecting production data.
- There are two sandbox environments: static (mocked responses) and dynamic
(realistic responses).

### Steps:
1. Import the Swagger model for the API you are testing.
2. Choose the GET operation for your desired API (e.g., Orders API).
3. Set the `{{baseUrl}}` as the Selling Partner API sandbox.
4. Include the required parameters specified in the Swagger model.
5. Add the access token to the request headers.
6. Send the request and verify that the response matches the Swagger model.

## Important Notes
- Ensure you have valid credentials to make API calls.
- Each API call may require specific parameters; refer to the associated Swagger
documentation.
- The success of operations should be verified against the expected responses
outlined in the API documentation.

### Caveats
- Be aware of rate limits and usage plans associated with the SP-API.
- Ensure safe handling of sensitive data, including client secrets and access
tokens.

This structured approach will help developers effectively utilize Amazon's SP-API
with Postman for various API operations and testing scenarios.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/using-postman-for-


selling-partner-api-models#credentials-required-to-make-a-call:
### Summary of Using Postman for Selling Partner API Models

This guide details the process of setting up and using Postman to interact with the
Amazon Selling Partner API (SP-API). Below is a structured summary including key
concepts, required credentials, and procedural steps.

---
#### **Credentials Required to Make a Call**
1. **LWA Client Credentials**:
- `client_id`: Obtained after registering your application.
- `client_secret`: Obtained after registering your application.

2. **LWA Refresh Token**:


- Retrieved from Seller Central after authorizing your application.

3. **SP-API Endpoint**:
- Refer to the [SP-API
Endpoints](https://developer-docs.amazon.com/sp-api/docs/sp-api-endpoints) for more
information.

---

#### **Generating a Login with Amazon (LWA) Access Token Using Postman**
To authenticate to the SP-API, you must first generate an access token:
1. Open Postman and sign in.
2. Select your workspace.
3. Create a new HTTP request:
- **Request Type**: `POST`
- **URL**: `https://api.amazon.com/auth/o2/token`
4. Set the Authorization type to **No Auth**.
5. Switch to the **Body** tab and select `x-www-form-urlencoded`, adding the
following key-value pairs:
- `grant_type`: `refresh_token`
- `refresh_token`: `[your refresh token value]`
- `client_id`: `[your client id value]`
- `client_secret`: `[your client secret value]`
6. Click **Send** to receive a response containing the access token in the
following format:
```json
{
"access_token": "Atza|*****",
"refresh_token": "Atzr|*****",
"token_type": "bearer",
"expires_in": 3600
}
```

---

#### **Importing an SP-API Model into Postman**


1. Locate the SP-API model JSON file on GitHub.
2. Download or copy the raw JSON format of the desired model.
3. Open Postman and sign in.
4. Choose your workspace, then select **Import**.
5. Import the downloaded or pasted JSON file as a **Postman Collection**.

---

#### **Calling an SP-API Endpoint**


1. Sign in to Postman and choose your workspace.
2. Navigate to **Collections** and select the imported API, then choose the desired
operation (e.g., **GET**).
3. If necessary, generate an LWA Access Token.
4. Under the **Headers** tab, add:
- `x-amz-access-token`: `[your access token value]`
5. Click **Send**. The response will populate in the Response window.
---

#### **Calling an SP-API Sandbox Endpoint**


1. Ensure you've imported the Swagger model for the API you're using.
2. Set the `{{baseUrl}}` as the Selling Partner API sandbox.
3. Pass any static request values as defined in the Swagger model.
4. Generate an LWA Access Token if not already done.
5. Under the **Headers** tab, include:
- `x-amz-access-token`: `[your access token value]`
6. Click **Send** to verify that the response matches the Swagger model structure.

---

### Important Notes


- Ensure all parameters are correctly set as per the Swagger model documentation
before making a call, especially when working with sandbox endpoints.
- Make sure any API operations do not affect production data unless intended.
- Regularly refresh your LWA token as needed (expiry is usually within an hour).

This structured guide should assist developers in effectively using Postman with
Amazon's Selling Partner API models.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/using-postman-for-


selling-partner-api-models#import-an-sp-api-model-into-postman:
## Summary of Using Postman for Selling Partner API Models

### Overview
This document provides instructions for setting up and using Postman with Amazon's
Selling Partner API (SP-API) models. It covers generating Login with Amazon (LWA)
access tokens, importing SP-API models, and calling SP-API endpoints, including
sandbox testing.

### Important Concepts


1. **LWA Client Credentials**:
- **client_id**: Your application's identifier obtained upon registration.
- **client_secret**: Your application's secret key.
- **refresh_token**: Obtained from Seller Central after authorizing the
application.

2. **SP-API Endpoints**:
- The SP-API provides access to various APIs that interact with seller
information. Refer to the SP-API Endpoints for a detailed list.

### Generating LWA Access Tokens


To authenticate with SP-API models, you must first generate an access token using
Postman:

#### Steps:
- Open Postman and sign in.
- Choose or create a workspace.
- Select **New** > **HTTP Request**.
- Set the request method to **POST**.
- Enter the URL: `https://api.amazon.com/auth/o2/token`.
- Set the following in the **Body** using `x-www-form-urlencoded`:
- `grant_type`: `refresh_token`
- `refresh_token`: `[your refresh token value]`
- `client_id`: `[your client id value]`
- `client_secret`: `[your client secret value]`
- Click **Send** to obtain the access token.

#### Response Example:


```json
{
"access_token": "Atza|*****",
"refresh_token": "Atzr|*****",
"token_type": "bearer",
"expires_in": 3600
}
```

### Importing SP-API Models into Postman


You need to import the specific SP-API model into Postman before making API calls.

#### Steps:
- Access the [selling-partner-api-models](https://github.com) repository on GitHub.
- Select the API model you wish to use and download the corresponding JSON file.
- Open Postman, choose your workspace, and select **Import**. Upload the downloaded
JSON file.
- Wait for the success message indicating successful import.

### Calling an SP-API Endpoint


Once the model is imported, you can make API calls.

#### Steps:
1. Sign in to Postman and select your workspace.
2. In the collections tab, locate the imported API model and select a `GET`
operation.
3. Ensure the LWA access token is generated and available.
4. Under the **Headers** tab, add:
- `x-amz-access-token`: `[your access token value]`
5. Click **Send** to execute the call and view the response in the response window.

### Calling SP-API Sandbox Endpoints


To test without affecting production data, you can use sandbox endpoints, which are
similar in procedure to production calls.

#### Steps:
1. Import the Swagger model associated with the API you are testing.
2. Set the **base URL** to the SP-API sandbox.
3. Define necessary parameters using the Swagger model as reference.
4. Follow similar header and request procedures as outlined for production calls.

### Important Notes


- Ensure you have all required tokens and keys to authenticate API calls
effectively.
- When using sandbox endpoints, test cases may yield different results compared to
production environments.
- Make sure to adhere to usage policies and consider API rate limits when designing
your application.

This concise guide encompasses essential steps and considerations for interacting
with Amazon's SP-API using Postman, tailored for Python developers.
_____________________________
Summary of URL: https://developer-docs.amazon.com/sp-api/docs/using-postman-for-
selling-partner-api-models#call-an-sp-api-endpoint:
# Summary of Using Postman for Selling Partner API Models

## Overview
This document outlines how to set up and use Postman for interacting with Amazon's
Selling Partner API (SP-API) models. Postman can be used to generate authentication
tokens, import API models, and call SP-API endpoints including sandbox environments
for testing.

## Key Concepts

### Credentials Required


- **LWA Client ID:** Obtained after registering your application.
- **LWA Client Secret:** Also obtained upon application registration.
- **LWA Refresh Token:** Retrieved from Seller Central after authorizing your
application.
- **SP-API Endpoint:** Reference SP-API Endpoints documentation for specifics on
endpoints.

### Generating a Login with Amazon (LWA) Access Token


To authenticate against the SP-API, you must generate an access token:

1. Open Postman and select your workspace.


2. Create a new HTTP Request.
3. Set the request type to `POST`.
4. Use the URL: `https://api.amazon.com/auth/o2/token`.
5. In the Authorization tab, select "No Auth".
6. In the Body tab, set it to `x-www-form-urlencoded` and add the following key-
value pairs:
- `grant_type`: `refresh_token`
- `refresh_token`: `[your refresh token value]`
- `client_id`: `[your client id value]`
- `client_secret`: `[your client secret value]`
7. Click `Send` and capture the response with the access token.

#### Example Request Body


```plaintext
Key | Value
--------------------|----------------------------
grant_type | refresh_token
refresh_token | your_refresh_token_value
client_id | your_client_id_value
client_secret | your_client_secret_value
```

### Importing an SP-API Model into Postman


1. Navigate to the selling-partner-api-models on GitHub to select the desired
model.
2. Download and copy the JSON model file.
3. In Postman, select Import and choose the saved JSON file.
4. Import it as a Postman Collection.

### Calling SP-API Endpoints


To call an SP-API endpoint:
1. Select the imported API collection in Postman.
2. Choose the desired API operation (e.g., `GET`).
3. In the Headers tab, add:
- `x-amz-access-token`: `[your access token value]`
4. Execute the request by clicking `Send`.

### Calling SP-API Sandbox Endpoints


Similar to production calls but directed to sandbox endpoints:
1. Ensure you have the Swagger model for the API.
2. Import the Swagger model to Postman.
3. Adjust the base URL to point to the Selling Partner API sandbox.
4. Populate request parameters as defined in the Swagger model.
5. Set the same headers as for the production call and execute.

### Example Header for API Requests


```plaintext
Key | Value
---------------------|----------------------------
x-amz-access-token | your_access_token_value
```

### Important Notes


- Ensure that all required parameters from the corresponding Swagger model are
included in your requests.
- Check that your access token is valid and generated using the correct LWA
service.
- Utilize sandbox endpoints to test APIs without impacting live data.

## Important Components
- **Postman:** A popular tool for testing APIs, allowing easy setups for generating
tokens and sending requests.
- **SWAGGER Model:** A representation of your API that defines its endpoints,
request parameters, and expected responses.

This guide should help developers effectively use Postman with Amazon's Selling
Partner API for both production and testing scenarios, allowing seamless
integration and management of selling partner data.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/using-postman-for-


selling-partner-api-models#generate-an-lwa-access-token-using-postman:
### Summary of Using Postman for Selling Partner API Models

#### Overview
Postman can be used to generate Login with Amazon (LWA) access tokens, import
Selling Partner API (SP-API) models, and make API calls (both production and
sandbox).

### Key Concepts


1. **LWA Access Token**: Required for authenticating to SP-API. It's generated
using your `client_id`, `client_secret`, and `refresh_token`.

2. **API Models**: Define the structure for making API calls. Must be imported into
Postman before accessing API endpoints.

3. **Endpoints**:
- **Production Endpoints**: Used for live data operations.
- **Sandbox Endpoints**: Used for testing purposes without affecting real data.
Includes static and dynamic responses.
### Credentials Required
To make a call to the API, you need:
- `client_id`: From your registered application.
- `client_secret`: From your registered application.
- `refresh_token`: Obtained from Seller Central after authorizing your application.

### Steps to Generate LWA Access Token


1. Open Postman and select your workspace.
2. Create a new HTTP Request (POST).
3. Set the URL to `https://api.amazon.com/auth/o2/token`.
4. In the Authorization tab, select **No Auth**.
5. In the Body tab, choose `x-www-form-urlencoded` and add the following key-value
pairs:
- `grant_type`: `refresh_token`
- `refresh_token`: `[your refresh token value]`
- `client_id`: `[your client id value]`
- `client_secret`: `[your client secret value]`
6. Click **Send**. The response will return the access token.

**Response Example**:
```json
{
"access_token": "Atza|*****",
"refresh_token": "Atzr|*****",
"token_type": "bearer",
"expires_in": 3600
}
```

### Importing an SP-API Model into Postman


1. Access the **selling-partner-api-models** folder on GitHub.
2. Select the desired API model’s JSON file. Download or copy it.
3. Open Postman, choose your workspace, and click **Import**.
4. Select the downloaded JSON file and click **Open**.
5. Ensure it’s imported as a Postman Collection.

### Calling SP-API Endpoints


1. Sign in to Postman and select your workspace.
2. Go to the Collections tab and select the imported API.
3. Choose the GET operation.
4. In the Headers tab, add:
- `x-amz-access-token`: `[your access token value]`
5. Click **Send** to see the response.

### Calling SP-API Sandbox Endpoints


- The procedure is the same as for production endpoints but use the sandbox URL and
ensure you import the Swagger model for the API you are testing.
- Example of setting the base URL for the sandbox.

### Important Notes:


- Make sure to generate an LWA access token before making any API calls.
- The sandbox allows for testing without affecting live data; it has two types:
static (mocked responses) and dynamic (realistic responses).
- Ensure all required parameters are included in your API call as defined in the
Swagger model.

This summary captures all essential processes and requirements for using Postman
with Amazon's Selling Partner API, focusing on access tokens, importing models, and
making API calls effectively.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/using-postman-for-


selling-partner-api-models#call-an-sp-api-sandbox-endpoint:
### Summary of Using Postman for Selling Partner API Models

This document outlines how to effectively use Postman to interact with Amazon's
Selling Partner API (SP-API). It includes guidance for generating access tokens,
importing API models, and making calls to both SP-API production and sandbox
endpoints.

---

#### Key Concepts

- **LWA (Login with Amazon)**: An authentication mechanism used to generate access


tokens required for making API calls.
- **SP-API Model**: A predefined structure that reflects the API endpoints and
their parameters.
- **Sandbox Environment**: A testing environment that allows developers to simulate
API calls without affecting production data.

---

#### Required Credentials

To make API calls, you must have the following credentials:

1. **LWA Client ID**: Obtained after registering your application.


2. **LWA Client Secret**: Also received upon application registration.
3. **LWA Refresh Token**: Acquired from Seller Central after authorizing your
application.
4. **SP-API Endpoint**: Refer to the endpoint documentation for specific APIs you
want to access.

---

#### Steps to Use Postman

##### 1. Generate an LWA Access Token

To obtain an access token, follow these steps:

- **Create a New Request**:


- Open Postman, choose your workspace, and select "New" → "HTTP Request".

- **Set Up the POST Request**:


```plaintext
POST https://api.amazon.com/auth/o2/token
```

- **Authorization**:
- Set `Authorization` to `No Auth`.

- **Body Setup**:
- Select `x-www-form-urlencoded`.
- Add the following key-value pairs:
| Key | Value |
|------------------|------------------------------|
| grant_type | refresh_token |
| refresh_token | [your refresh token value] |
| client_id | [your client id value] |
| client_secret | [your client secret value] |

- **Send the Request**:


- Choose "Send" and receive the token in the response:
```json
{
"access_token": "Atza|*****",
"refresh_token": "Atzr|*****",
"token_type": "bearer",
"expires_in": 3600
}
```

##### 2. Import an SP-API Model into Postman

- **Download API Model**:


- Access the selling-partner-api-models folder on GitHub. Find the required API
model JSON file.

- **Import into Postman**:


- Open Postman, choose your workspace, and select “Import” to upload the `.json`
file.
- Import as a Postman Collection and confirm success.

##### 3. Call an SP-API Endpoint

Here’s how to make a call to an API endpoint:

- **Select Your Collection**:


- In Postman, choose the imported API model and select the appropriate GET
operation.

- **Add Headers**:
- In the Headers tab, insert:
| Key | Value |
|----------------------|----------------------------|
| x-amz-access-token | [your access token value] |

- **Send the Request**:


- Choose "Send" to get the response in the response window.

##### 4. Call an SP-API Sandbox Endpoint

The process is similar to calling a production API but requires adjustments for
sandbox testing:

- **Use the Sandbox URL**: Replace the `baseUrl` with the sandbox endpoint.
- **Pass Required Parameters**: Ensure all required parameters from the Swagger
model are included in your request.
- **Add Headers**:
- Similar to production calls, use the generated access token in the headers.

---
#### Important Notes

- **Authentication is Key**: Ensure you handle credentials securely and refresh


your access tokens as needed.
- **Two Sandbox Environments**: Be aware that there are both static and dynamic
sandbox environments for testing different types of responses.
- **Required Parameters**: Always verify required parameters for API calls based on
the Swagger model before sending requests.
- **Error Handling**: Refer to the SP-API Errors FAQ for guidance on
troubleshooting common issues.

This guide should provide you with the foundational understanding and steps
necessary to work effectively with the Amazon Selling Partner APIs using Postman.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/include-a-user-agent-


header-in-all-requests:
### Summary of "Include a User-Agent Header in All Requests"

#### Overview
When using the Amazon Selling Partner API (SP-API), every request made must include
a `User-Agent` header. This header is crucial for identifying the application,
managing issues, and facilitating better support from Amazon based on application
usage and environment details.

#### User-Agent Header Format


The `User-Agent` header must be constructed in the following format:

```
AppId/AppVersionId (Language=LanguageNameAndOptionallyVersion)
```

- **AppId**: Your application name.


- **AppVersionId**: The version of your application.
- **Language**: Specifies the programming language being used (essential).
- Additional attributes can be included, separated by semicolons (`;`).

##### Example
```plaintext
My Selling Tool/2.0 (Language=Java/1.8.0.221; Platform=Windows/10)
```

For larger applications, especially those managed by IT departments, it's


recommended to include a `Host` attribute to assist support engineers when
troubleshooting:

```plaintext
MyCompanyName/build1611 (Language=Perl; Host=jane.desktop.example.com)
```

#### Rules for User-Agent Header


- If including multiple attributes in the `User-Agent` header:
- Use the format `AttributeName=Value;`.
- Escape special characters (e.g., `\`, `/`, `(`, `)`, `=`, `;`) as follows:
- Backslash: `\\`
- Forward slash: `\/`
- Opening parenthesis: `\(`
- Closing parenthesis: `\)`
- Equal sign: `\=`
- Semicolon: `\;`

#### Important Notes


- **Character Limit**: The `User-Agent` header must not exceed 500 characters. If
it does, the Selling Partner API will reject the request.
- **Reliability**: Including the `User-Agent` header every time improves
troubleshooting and enhances the integration experience.

#### Key Concepts


- **Application Identification**: The `User-Agent` header serves as a fingerprint
of the application making the API call, including versioning and platform details.
- **Support Interaction**: Properly formatted `User-Agent` headers can streamline
support processes, allowing Amazon's engineers to diagnose issues related to
specific applications easily.

This structure allows developers and system administrators to ensure proper


integration with the Selling Partner API, providing both Amazon and users with
essential information for support and development optimization.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/response-format:


# Amazon Selling Partner API (SP-API) Response Format Summary

## Overview
The Selling Partner API (SP-API) provides a standardized format for responses to
HTTP requests. Each response includes standard HTTP headers, JSON response
messages, and potential error messages.

---

## Response Headers
SP-API returns several headers in response to requests. Important headers include:

| **Header Name** | **Description**


| **Example** |
|--------------------------|-------------------------------------------------------
--------------------|-------------------------------------------------|
| `Connection` | Indicates if the connection is persistent.
| `Connection: keep-alive` |
| `Content-Length` | Standard HTTP header indicating the length of the
response content. | `Content-Length: 624` |
| `Content-Type` | Specifies the media type of the response, typically
JSON. | `Content-Type: application/json` |
| `Date` | The date and time at which the response was sent.
| `Date: Fri, 17 Feb 2023 20:13:55 GMT` |
| `x-amz-apigw-id` | An optional extended request ID created by API Gateway.
| `x-amz-apigw-id: Ac1E1EycvHcFyNw=` |
| `x-amzn-RequestId` | Unique identifier for the request, to provide when
contacting support. | `x-amzn-RequestId: 6875f61f-6aa1-11e8-98c6-9bExample` |
| `x-amzn-ErrorType` | Indicates the type of error if the response status code
is 4xx or 5xx. | `x-amzn-ErrorType: AccessDeniedException` |

## Success Response Example


A successful request returns a 200 OK status with the desired data. Here’s an
example:

```http
HTTP/1.1 200 OK
Content-Length: 368
Content-Type: application/json
Date: Thu, 01 Jun 2020 22:23:31 GMT
x-amzn-RequestId: 6875f61f-6aa1-11e8-98c6-9bExample

{
"payload": {
"ConfirmedNeedByDate": "2020-04-23",
"ConfirmedFulfillableDate": "2020-04-23"
}
}
```

## Error Response Example


An unsuccessful request returns an error status code with details about the error:

```http
HTTP/1.1 400 Bad Request
Content-Length: 117
Content-Type: application/json
Date: Fri, 01 Jun 2020 21:48:02 GMT
x-amzn-ErrorType: ValidationException
x-amzn-RequestId: a8c8d99a-6ab5-11e8-b0f8-19363980175b

{
"errors": [
{
"message": "Access to requested resource is denied.",
"code": "Unauthorized",
"details": "Access token is missing in the request header."
}
]
}
```

---

## Key Concepts

1. **Response Headers**:
- The headers provide context about the response, including success/failure
indication and metadata about the request.

2. **Success vs. Error Responses**:


- Successful responses contain payloads of data, while error responses contain
error messages and codes that help diagnose issues.

3. **Error Handling**:
- Developers should implement error handling based on the `HTTP status code`, as
well as utilize the `message` and `details` fields provided in error responses to
troubleshoot problems.

---

## Important Notes
- Be familiar with the types of headers returned, as they can inform you of various
request metrics, like rate limits or errors.
- Always check and handle the `x-amzn-RequestId` when seeking support, as it will
help Amazon's support team to track the specific request.
- Implement caching or handle retries where necessary, particularly when receiving
rate limit headers or errors relating to resource access.
- Ensure that your application correctly includes authorization tokens in request
headers to avoid `Unauthorized` errors.

This summary provides a concise guide for developers working with the Amazon SP-API
response format and should serve as a quick reference for coding and
troubleshooting.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/response-


format#response-headers:
# Amazon Selling Partner API (SP-API) Response Format Guide

The Selling Partner API (SP-API) returns response headers and a JSON response
message after processing an HTTP request. Understanding the response format is
essential for effective integration with the API.

## Response Headers

The following are significant response headers that may be returned:

| Header Name | Description


| Example |
|----------------------------|-----------------------------------------------------
------------------------------------------|----------------------------------------
---|
| Connection | Indicates the type of connection; default value is
`keep-alive`. | Connection: keep-alive
|
| Content-Length | Standard header indicating the size of the response
body in bytes. | Content-Length: 624
|
| Content-Type | Type of content returned; usually
`application/json`. | Content-Type:
application/json |
| Date | The date and time when the response was generated.
| Date: Fri, 17 Feb 2023 20:13:55 GMT |
| x-amz-apigw-id | An extended request ID created by Amazon API Gateway,
optional. | x-amz-apigw-id: Ac1E1EycvHcFyNw= |
| x-amzn-ErrorType | Error type for responses with status codes `4xx` or
`5xx`. | x-amzn-ErrorType: AccessDeniedException
|
| x-amzn-RateLimit-Limit | The limit of requests that can be made in a specific
time period; returned on a best-effort basis. | x-amzn-RateLimit-Limit: 2.0
|
| x-amzn-RequestId | Unique identifier for the request; provide this when
contacting support. | x-amzn-RequestId: 6875f61f-6aa1-11e8-
98c6-9bExample |
| X-Amzn-Trace-Id | A trace identifier generated by APIGateway, optional.
| X-Amzn-Trace-Id: Root=1-63ee9bb8-52ea8e6d108209842abc2a4d |

## Response Examples
### Successful Response

When a request is successful, the API returns data requested, with a response
structured as follows:

```http
HTTP/1.1 200 OK
Content-Length: 368
Content-Type: application/json
Date: Thu, 01 Jun 2020 22:23:31 GMT
x-amzn-RequestId: 6875f61f-6aa1-11e8-98c6-9bExample

{
"payload": {
"ConfirmedNeedByDate": "2020-04-23",
"ConfirmedFulfillableDate": "2020-04-23"
}
}
```

### Error Response

In case of an unsuccessful request, the response structure provides error details:

```http
HTTP/1.1 400 Bad Request
Content-Length: 117
Content-Type: application/json
Date: Fri, 01 Jun 2020 21:48:02 GMT
x-amzn-ErrorType: ValidationException
x-amzn-RequestId: a8c8d99a-6ab5-11e8-b0f8-19363980175b

{
"errors": [
{
"message": "Access to requested resource is denied.",
"code": "Unauthorized",
"details": "Access token is missing in the request header."
}
]
}
```

## Key Concepts

- **Response Headers**: These provide vital information about the request's status,
content type, and potential errors.
- **Success and Error Responses**: Differentiating between these helps identify
whether the requested operation was successful and what to do when an error occurs.

## Important Notes

- The response headers you receive may vary based on the specific API section and
operation.
- Always check response headers for rate limits to ensure compliance with usage
policies.
- Include the `x-amzn-RequestId` in support requests for faster service.
This summary serves as a reference for developers working with the Amazon Selling
Partner API, especially those needing clarity on how to interpret response formats
effectively.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/response-


format#success-response:
### Amazon Selling Partner API (SP-API) - Response Format

#### Response Format Overview


The Amazon Selling Partner API (SP-API) returns structured data formats based on
JSON for both successful requests and error responses.

---

#### Response Headers

When interacting with the SP-API, the following response headers may be included in
the HTTP response:

| **Name** | **Description**
| **Example** |
|-------------------------|--------------------------------------------------------
--------------------------------------------|--------------------------------------
----------|
| Connection | Persistent connection with the client.
| Connection: keep-alive |
| Content-Length | Standard HTTP response header indicating the size of
the response body. | Content-Length: 624
|
| Content-Type | The media type of the resource.
| Content-Type: application/json |
| Date | The date and time the response was generated.
| Date: Fri, 17 Feb 2023 20:13:55 GMT |
| x-amz-apigw-id | Optional extended request ID created by APIGateway.
| x-amz-apigw-id: Ac1E1EycvHcFyNw= |
| x-amzn-ErrorType | Populated with error type if the response status code is
4xx or 5xx. | x-amzn-ErrorType: AccessDeniedException
|
| x-amzn-RateLimit-Limit | Indicates rate limit applied to the request; provided on
a best-effort basis. | x-amzn-RateLimit-Limit: 2.0
|
| x-amzn-RequestId | Request identifier for support queries.
| x-amzn-RequestId: 6875f61f-6aa1-11e8-98c6-9bExample|
| X-Amzn-Trace-Id | Optional trace identifier generated by APIGateway.
| X-Amzn-Trace-Id: Root=1-63ee9bb8-52ea8e6d108209842abc2a4d|

---

#### Success Response

- **Description:** Returned when a request is successful.


- **Structure:**
- Returns a `200 OK` status along with the requested data in JSON format.

##### Example:
```http
HTTP/1.1 200 OK
Content-Length: 368
Content-Type: application/json
Date: Thu, 01 Jun 2020 22:23:31 GMT
x-amzn-RequestId: 6875f61f-6aa1-11e8-98c6-9bExample

{
"payload": {
"ConfirmedNeedByDate": "2020-04-23",
"ConfirmedFulfillableDate": "2020-04-23"
}
}
```

---

#### Error Response

- **Description:** Returned when a request fails.


- **Structure:**
- Contains an HTTP status code, a description of the error, and possibly
additional details.

##### Example:
```http
HTTP/1.1 400 Bad Request
Content-Length: 117
Content-Type: application/json
Date: Fri, 01 Jun 2020 21:48:02 GMT
x-amzn-ErrorType: ValidationException
x-amzn-RequestId: a8c8d99a-6ab5-11e8-b0f8-19363980175b

{
"errors": [
{
"message": "Access to requested resource is denied.",
"code": "Unauthorized",
"details": "Access token is missing in the request header."
}
]
}
```

---

#### Key Concepts

- **HTTP Status Codes:** Understanding various status codes (e.g., 200 for success,
400 for bad request) is crucial for error handling.

- **JSON Format:** Responses are presented in JSON, so familiarity with JSON


parsing is important for developers.

- **Rate Limiting:** Be aware of the rate limits; use the `x-amzn-RateLimit-Limit`


header to monitor API performance.

---

#### Important Notes


- Ensure your application correctly handles both successful and error responses to
provide a seamless experience.
- Always include appropriate headers for authentication and request identification,
such as access tokens in requests.
- Consult the SP-API documentation regularly for updates on changes and
improvements.

Utilize the above content as a reference for effectively working with the Amazon
Selling Partner API's response formats.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/response-


format#error-response:
### Amazon Selling Partner API (SP-API) Response Format

The Selling Partner API provides mechanisms to gather and post data from/to a
customer's selling account. Below are key elements regarding response formats,
including successful and error responses.

#### Response Format Overview

1. **Response Headers**: When an API request is made, the SP-API returns various
response headers. The headers can differ across API sections and operations. Here
are important response headers you may receive:

| Header Name | Description


| Example |

|------------------------------|---------------------------------------------------
----------------------------------------------|------------------------------------
----------|
| `Connection` | Default value for persistent connection with
the client. | `Connection: keep-alive`
|
| `Content-Length` | Standard HTTP response header indicating the
length of the response body. | `Content-Length: 624`
|
| `Content-Type` | Standard HTTP response header that specifies
the media type of the resource. | `Content-Type:
application/json` |
| `Date` | Standard HTTP response header indicating the
date and time the response was sent. | `Date: Fri, 17 Feb 2023 20:13:55
GMT` |
| `x-amz-apigw-id` | Extended request ID created by APIGateway.
| `x-amz-apigw-id: Ac1E1EycvHcFyNw=` |
| `x-amzn-ErrorType` | Error type returned for responses with HTTP
status code 4xx or 5xx. | `x-amzn-ErrorType:
AccessDeniedException` |
| `x-amzn-RateLimit-Limit` | Returns the rate limit applied to the request
(optional). | `x-amzn-RateLimit-Limit: 2.0`
|
| `x-amzn-RequestId` | Unique identifier for the request. Needed when
contacting support. | `x-amzn-RequestId: 6875f61f-6aa1-
11e8-98c6-9bExample` |

#### Successful Response


On a successful API call, the SP-API will return a JSON response.

**Example of a Successful Response:**


```http
HTTP/1.1 200 OK
Content-Length: 368
Content-Type: application/json
Date: Thu, 01 Jun 2020 22:23:31 GMT
x-amzn-RequestId: 6875f61f-6aa1-11e8-98c6-9bExample

{
"payload": {
"ConfirmedNeedByDate": "2020-04-23",
"ConfirmedFulfillableDate": "2020-04-23"
}
}
```

### Error Response

When an error occurs, the API provides an error response that includes important
information to diagnose the problem.

**Error Response Structure:**


- **code**: HTTP status code indicating the request status.
- **message**: Explanation of the error condition.
- **details**: Link to additional information (optional).

**Example of an Error Response:**


```http
HTTP/1.1 400 Bad Request
Content-Length: 117
Content-Type: application/json
Date: Fri, 01 Jun 2020 21:48:02 GMT
x-amzn-ErrorType: ValidationException
x-amzn-RequestId: a8c8d99a-6ab5-11e8-b0f8-19363980175b

{
"errors": [
{
"message": "Access to requested resource is denied.",
"code": "Unauthorized",
"details": "Access token is missing in the request header."
}
]
}
```

### Key Concepts

- **HTTP Status Codes**: Understand common HTTP response codes (e.g., 200 for
success, 400 for bad requests, 401 for unauthorized).
- **Error Handling**: Be prepared to handle various exceptions, particularly
authorization errors related to access tokens.

### Important Notes

- **Rate Limits**: Familiarize yourself with the rate limit headers to avoid
exceeding the limitations imposed by the API.
- **Authorization**: Ensure that the required authorization tokens are included in
the request headers, as missing tokens can lead to unauthorized responses.

This summary provides an overview of the SP-API response format and essential
guidelines for effective usage, helping developers integrate the API smoothly.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/grantless-operations:


# Summary of Grantless Operations in Amazon Selling Partner API

## Overview
Grantless operations in the Selling Partner API (SP-API) allow certain operations
to be executed without explicit authorization from the selling partner. When using
these operations, you can request a Login with Amazon access token without needing
to provide a refresh token, which simplifies the authorization process.

### Key Concepts


- **Grantless Operations**: These are operations that can be invoked without
explicit authorization, requiring only the scope parameter in the authorization
request.
- **Login with Amazon Access Token**: To perform grantless operations, obtain this
token to initiate API calls.

## Grantless Operations API Endpoints

### Operations Overview


Here are the key grantless operations available in the SP-API:

| Operation Name | HTTP Method | Path


|
|----------------------------|-------------|---------------------------------------
------|
| Create Destination | POST | `/notifications/v1/destinations`
|
| Create Subscription | POST |
`/notifications/v1/subscriptions/{notificationType}` |
| Delete Destination | DELETE |
`/notifications/v1/destinations/{destinationId}` |
| Delete Subscription By Id | DELETE |
`/notifications/v2/subscriptions/{notificationType}/{subscriptionId}` |
| Get Destination | GET |
`/notifications/v1/destinations/{destinationId}` |
| Get Destinations | GET | `/notifications/v1/destinations`
|
| Get Subscription By Id | GET |
`/notifications/v1/subscriptions/{notificationType}/{subscriptionId}` |
| Get Authorization Code | GET | `/authorization/v1/authorizationCode`
|
| Rotate Application Client Secret | POST |
`/applications/2023-11-30/clientSecret` |

## Usage Instructions
- When utilizing a generated Java SDK, use the `withScopes` parameter to set one or
more scopes for the LWA authorization grant.
- Ensure that your application has appropriate permissions to make grantless
requests as defined in the scope.
## Important Notes
- Grantless operations are primarily intended for seller applications only.
- Always handle sensitive credentials securely and review Amazon policies related
to data protection and acceptable use.
- Be aware of rate limits and best practices when integrating with the SP-API to
avoid throttling or service interruptions.

This summary provides a streamlined understanding of grantless operations within


Amazon's Selling Partner API, focused on practical application and implementation.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-


limits:
# Amazon Selling Partner API (SP-API) Usage Plans and Rate Limits

## Overview
The Amazon Selling Partner API (SP-API) employs usage plans to control the number
of requests made to an operation within a given timeframe, ensuring reliability and
efficiency in application workloads. Understanding usage plans and rate limits is
crucial for optimizing interactions with the API.

## Key Concepts

### 1. Terminology
- **Rate Limit**: Maximum requests allowed per operation per second.
- **Burst Limit**: Maximum requests that can be submitted simultaneously beyond the
rate limit.
- **Usage Plan**: Defined by the combination of rate limit and burst limit for
specific operations.
- **Throttling**: Occurs when requests exceed rate limits, returning a 429 HTTP
error.
- **Grantless Operations**: Operations that do not require a sellerId, thus not
influenced by the selling partner's account.

### 2. Rate-Limiting Algorithm


The SP-API utilizes a **token bucket algorithm** for rate limiting:
- Tokens are added to a bucket over time, with each request consuming a token.
- If the bucket is empty, requests are throttled.

**Example Scenario**:
- Operation with rate limit of 1 and burst limit of 2.
- Tokens can be depleted and filled based on request rates.

### 3. Factors Determining Usage Plans


- **API Operation**: Each operation has its unique rate and burst limits.
- **Selling Partner and Application Pair**: Limits are per selling partner-account
combination.
- **Regional and Marketplace Factors**: Tied to different marketplace-specific
seller accounts.

### 4. Usage Plan Types


- **Standard Usage Plans**: Governed by static limits for all callers.
- **Dynamic Usage Plans**: Automatically adjusted based on real-time business
needs; applicable for specific operations.

## Important API Calls and Responses


### Finding Your Usage Plan
- **API Documentation**: Each operation's documentation lists the relevant limits
and usage plans.
- **Response Headers**: Use `x-amzn-RateLimit-Limit` to check limits per operation,
but do not rely solely on this since it might not always be present.

### Handling Throttling (HTTP 429 Error Response)


- Use a **back-off strategy** for retrying requests.
- Optimize call patterns by reducing frequency or leveraging event-driven
architecture to manage updates efficiently.

## Important Notes for Developers


- **Rate Limit Changes**: Rate limits can change based on business metrics;
operations may adjust dynamically.
- **Testing**: Throttling behavior can be tested using the SP-API sandbox, but
actual rate limits only apply in production contexts.
- **Avoiding Throttling**: Applications should optimize workload, use push
notifications instead of polling, and leverage batch APIs to reduce the number of
calls.

## Conclusion
Understanding the SP-API's usage plans and rate limits is fundamental for building
robust applications that efficiently interact with Amazon services. By following
best practices regarding request handling and awareness of limits, developers can
ensure their applications run smoothly and meet operational demands.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-


limits#usage-plan-types:
# Summary of Usage Plans and Rate Limits for Amazon Selling Partner API (SP-API)

## Key Concepts

1. **Rate Limit**:
- Maximum number of requests allowed to a specific operation per second.
- To avoid throttling, requests must stay below this limit.

2. **Burst Limit**:
- Maximum number of requests to an operation that can be accumulated over time
and then submitted simultaneously.

3. **Usage Plan**:
- Combination of rate limit and burst limit applicable to a specific operation.

4. **Token Bucket Algorithm**:


- Used for rate-limiting requests, where tokens permit API requests. Tokens are
refilled at a set rate.

5. **Throttling**:
- Occurs when requests exceed the rate limit, resulting in a 429 HTTP error
response.

6. **Grantless Operations**:
- Operations that do not require a sellerId and therefore are not dependent on
the selling partner.
## Usage Plan Types

1. **Standard Usage Plans**:


- Most SP-API operations have static rate limits based on expected call
patterns.

2. **Dynamic Usage Plans**:


- Adjust automatically based on a selling partner's current and historical
business needs. They apply to certain operations in orders and pricing.

## How to Find Your Usage Plan

- **SP-API Documentation**: Rate and burst limits can be referenced in the API
documentation per operation.
- **Response Header**: The `x-amzn-RateLimit-Limit` header may specify rate limits
for the operation per account-application pair, though it's not guaranteed.

## Important Classes/Methods

Although specific classes or methods are not detailed in the page content,
developers should keep in mind:

- Each operation in the SP-API is governed by its corresponding usage plan, which
defines how many calls can be made.

## Important Notes/Caveats

- The API may not always include the `x-amzn-RateLimit-Limit` header, especially in
cases of unauthorized requests.
- It's important not to rely solely on the presence of this header; always validate
before using its value.
- Developers should implement a back-off strategy when receiving a 429 response to
handle throttling effectively.
- Dynamic usage plans aim to optimize throughput based on the metrics of business
behavior rather than solely request history.

## Frequently Asked Questions (FAQ)

- **Q: Can rate limits be increased?**


A: Standard limits are aimed to be right-sized. Applications should optimize call
patterns to avoid throttling.

- **Q: Are there ways to avoid throttling entirely?**


A: It is not possible to completely avoid throttling due to external factors.
Code should handle transient 429s.

- **Q: How should applications manage dynamic limits?**


Applications should read the `x-amzn-RateLimit-Limit` header and code against
events rather than using fixed timers.

## Best Practices for Developers

- Ensure efficient call patterns to reduce throttling; utilize batch APIs where
applicable.
- Rely on push notifications over polling to stay within limits.
- Test your application with the Selling Partner API sandbox, but remember all
sandbox operations share the same rate limits.

By understanding these plans, limits, and key concepts, developers can effectively
utilize the Amazon SP-API without encountering excessive throttling and ensure
their applications run smoothly.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-


limits#terminology:
# Summary of Amazon Selling Partner API (SP-API) Usage Plans and Rate Limits

## Key Concepts

1. **Rate Limit**:
- Maximum number of requests allowed to a specific operation per second.
- Exceeding this limit leads to throttling, which results in a 429 HTTP error
response.

2. **Burst Limit**:
- Maximum number of requests that can be accumulated and submitted
simultaneously.

3. **Usage Plan**:
- A combination of rate limit and burst limit that applies to a specific
operation in the SP-API.

4. **Token Bucket Algorithm**:


- The algorithm used for rate limiting within the SP-API. Each request consumes
a token from a bucket that refills at a defined rate.

5. **Throttling**:
- Occurs when requests exceed the rate limit, resulting in temporary rejection.

6. **Grantless Operations**:
- Operations that do not require a `sellerId` as part of the request. These
operations are not dependent on seller accounts in usage plans.

## Usage Plans

1. **Standard Usage Plans**:


- Governed by static limits for all applications based on predicted call
patterns.

2. **Dynamic Usage Plans**:


- Automatically adjusted based on current and historical business needs. Limited
to certain operations (e.g., Orders V0, Product Pricing v2022-05-01).

## Finding Your Usage Plan

- Your usage plan can be found in:


- **SP-API Documentation**: Each operation's rate limits are documented.
- **Response Header (x-amzn-RateLimit-Limit)**: This header provides the rate
limits for each operation upon calling the API. However, this header should not be
solely relied upon for limit values.

## Frequently Asked Questions

1. **How to Handle 429 Response**:


- Implement a back-off strategy and attempt to retry requests after observing
the limits.
2. **How to Test Usage Plans**:
- Use the SP-API sandbox for 429 error handling but note rate limits cannot be
tested in the sandbox environment.

3. **Avoiding Throttling**:
- While it's not possible to completely avoid throttling, optimizing call
frequency, relying on push notifications, and using batch APIs can help.

4. **Dynamic Plan Adjustments**:


- Changes may happen based on business metrics, but significant adjustments will
be communicated in advance.

## Additional Notes

- If you consistently experience throttling, examine your API call patterns to


optimize the number of requests.
- Rate limits are specific to the application and selling partner, allowing
throughput to naturally grow as you acquire more client integrations.
- Ensure code respects dynamic limits by reading headers and avoiding hard-coded
timers.

This summary highlights the critical aspects of the Amazon SP-API Usage Plans and
Rate Limits, essential for developers to effectively manage their API interactions.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-


limits#rate-limiting-algorithm:
### Summary of Amazon Selling Partner API (SP-API) Usage Plans and Rate Limits

#### Key Concepts

1. **Usage Plans**: Define how many requests can be made to the SP-API within a
specific time period. They are determined based on:
- Selling partner account
- Application making the requests
- Marketplace
- API operation being called

2. **Rate Limit**: Maximum number of requests allowed per operation per second.

3. **Burst Limit**: Maximum number of requests that can be submitted simultaneously


after being accumulated over time.

4. **Token Bucket Algorithm**: The SP-API uses this algorithm for rate-limiting. It
involves "tokens" that are consumed with each request. When the bucket (holding
tokens) is empty, further requests will be throttled (resulting in a 429 error).

5. **Throttling**: If a request exceeds your rate limits, it will be temporarily


rejected, and a 429 HTTP error will be returned.

6. **Grantless Operations**: These are operations that do not require a `sellerId`


and have different usage plans.

7. **Dynamic vs. Standard Usage Plans**:


- **Standard**: Static rates for all users based on expected call patterns.
- **Dynamic**: Rates adjust based on the selling partner’s current and
historical business needs.

#### Important Considerations

- **Handling 429 Responses**: Implement a back-off strategy for retrying requests


after receiving a 429 status code (throttled).

- **Testing Rate Limits**: Testing in the SP-API sandbox does not reflect
production limitations and all test operations share the same rate.

- **Rate Adjustment Factors**: Rate limits may change based on selling partner
business metrics. If limits are consistently insufficient, optimize your API call
patterns rather than expecting an increase.

#### How to Find Your Usage Plan

Usage plans can be found through:


- **SP-API Documentation**: Each operation references its rate limits and usage
plans.
- **Response Headers**: When an operation is called, check the `x-amzn-RateLimit-
Limit` header for assigned limits.

#### Usage Plan Types

1. **Standard Plans**: Most operations have predetermined limits, listed in the API
reference.
2. **Dynamic Plans**: Certain operations have limits that automatically adjust
based on business needs but do not change simply due to frequency of API calls.

#### FAQs and Recommendations

- **Is it possible to avoid throttling?**: Not entirely; applications must be built


to handle transient 429 responses.

- **Will limits increase with more authorizations?**: No, limits are specific to
the application and the selling partner combination, scaling with client growth.

#### Rate-Limiting Algorithm Example

Here's a simplified example illustrating how the token bucket algorithm works in
practice:

- Initial state: burst limit of **2 tokens**


- Suppose the initial call at `T=0` consumes 1 token (1 token left).
- A subsequent call at `T=0.1 seconds` consumes the last token (bucket empty).
- Attempting to make another call immediately results in throttling (a 429 error).
- After 1 second, the SP-API adds 1 token back, allowing one successful call, and
it takes 2 seconds to reach the burst limit again.

### Key Notes for Developers

- Implement strategies to optimize API calls, such as using batch APIs.


- Monitor your call patterns and adapt your application to avoid being throttled.
- Regularly check the API documentation for any changes to rate limits or usage
plans.

Using this guide, developers can effectively interact with Amazon's Selling Partner
API while managing rate limits and usage plans efficiently.
_____________________________
Summary of URL: https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-
limits#how-to-find-your-usage-plan:
### Summary of Amazon Selling Partner API (SP-API) - Usage Plans and Rate Limits

#### Key Concepts

1. **Usage Plans**: A usage plan defines the number of API requests you can make
within a specified time frame. Each operation in the SP-API has its own usage plan
determined by various factors, such as:
- API operation type
- Selling partner account and application pair
- Marketplace

2. **Rate Limit**: The maximum number of requests you can make to a specific
operation per second.

3. **Burst Limit**: The maximum number of requests you can send at once, which can
be accumulated over time and sent in a burst.

4. **Token Bucket Algorithm**: This algorithm is used for rate limiting whereby
each API request consumes a token from a bucket that is replenished at a set rate.
If the bucket is empty, requests will be throttled, yielding a 429 status code.

5. **Throttling**: Occurs when requests exceed the rate limit, resulting in a 429
error response. Requests can be retried after a delay.

6. **Grantless Operations**: API operations that do not require a sellerId, meaning


they are not subject to the seller's usage plan.

#### Usage Plan Types

- **Standard Usage Plans**: Fixed rate limits for most operations.


- **Dynamic Usage Plans**: Adjusted based on historical business metrics of the
selling partner. Applies to certain operations like Orders and Product Pricing.

#### Finding Your Usage Plan

- **SP-API Documentation**: Each operation’s limits are documented.


- **Response Header**: On a successful operation call, the `x-amzn-RateLimit-Limit`
header may provide the rate limits for that request. Not all responses will contain
this header.

#### Important API Interaction Notes

- If you frequently face throttling (429 errors), consider optimizing your API call
patterns:
- Reduce the frequency of calls.
- Utilize push notifications instead of polling mechanisms.
- Use batch APIs where available to reduce the number of calls.

- Dynamic limits may change based on the performance and metrics of the selling
partner’s account.

#### Frequently Asked Questions (FAQs)

1. **How to handle a 429 response?**


- Implement a retry mechanism with a back-off strategy when receiving a 429
error.

2. **Can limits be increased?**


- If consistent throttling occurs, it is advisable to optimize calling patterns
rather than expecting limits to be raised.

3. **Are rate limits static?**


- Static for standard usage plans; dynamic for operations that require
adjustments based on business context.

4. **Should my code be hardcoded with timers?**


- Avoid hard-coded timers. Use event-driven programming to react to specific
changes instead.

### Important Notes for Developers

- Always consider that usage plans may adjust based on performance, and different
operations have unique rate and burst limits.
- Ensure your application can gracefully handle rate limiting by adhering to best
practices for API call efficiency.
- Monitor the presence of `x-amzn-RateLimit-Limit` in responses but do not rely
solely on its availability; check for its presence before using its value for
limiting logic.

This summary encapsulates the essential aspects of implementing and working with
the Amazon SP-API's usage plans and rate limits, providing guidelines for
developers to effectively manage their API interactions.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-


limits#frequently-asked-questions:
# Amazon Selling Partner API (SP-API) Usage Plans and Rate Limits Documentation
Summary

This summary provides essential information regarding usage plans, rate limits, and
key concepts associated with the Amazon Selling Partner API (SP-API).

## Key Concepts

### 1. **Rate Limit**


- The maximum number of requests allowed to a specific operation per second.
- To avoid throttling, keep requests below this limit.

### 2. **Burst Limit**


- The maximum number of requests that can be built up over time and submitted
simultaneously.

### 3. **Usage Plan**


- A combination of rate limit and burst limit for a specific operation.

### 4. **Token Bucket Algorithm**


- Used to manage the rate limits for API requests. Tokens are added to a virtual
bucket at a set rate. Each request depletes one token from the bucket.

### 5. **Throttling**
- Occurs when requests exceed the defined rate limits. A throttled request results
in a 429 HTTP error response.

### 6. **Grantless Operations**


- Operations that do not require a `sellerId` as part of the request. The selling
partner account is not a factor in usage plans for grantless operations.

## Factors Determining Usage Plans


- **API Operation:** Each operation has its own default rate and burst limits,
available in API reference documentation.
- **Selling Partner and Application Pair:** Most operations' limits apply per some
pair.
- **Regions and Marketplaces:** Usage plans are tied to marketplace groups
authorized for calling the API.

## Usage Plan Types


1. **Standard Usage Plans:** Static limits based on expected call patterns.
2. **Dynamic Usage Plans:** Adjust limits based on real-time and historical
business needs.

## How to Find Your Usage Plan


- Check the SP-API documentation for the operation’s limits.
- Use the `x-amzn-RateLimit-Limit` response header, where available.

**Note:** Don't rely solely on the presence of this header; check it prior to
usage.

## Important Notes and Caveats


- If your application receives repeated 429 responses, optimize your call patterns
(call less frequently, use push notifications).
- Rate limits may be adjusted up or down based on business context, particularly
for dynamic usage plans.
- The application can’t completely avoid throttling due to uncontrollable factors.

## Frequently Asked Questions


- **Can limits be increased?**: The SP-API aims for right-sized limits, suggesting
that if throttled, optimizing call patterns may be necessary.
- **How to handle 429 response?**: Implement a back-off strategy for retries.
- **Can testing be done for rate limits?**: Rate limits can't be tested in the
sandbox environment; however, 429 error handling can be tested.

## Developer Recommendations
- **Dynamic Limits Handling:**
- Read the `x-amzn-RateLimit-Limit` header when available.
- Avoid hardcoding timers and use events to code against actions rather than
fixed intervals.

By understanding these concepts, developers can better manage API interactions and
optimize their applications under the constraints of the SP-API usage plans.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-


limits#what-should-i-do-if-my-application-is-consistently-throttled:
# Summary of Amazon Selling Partner API (SP-API) Usage Plans and Rate Limits

## Key Concepts

### 1. **Usage Plans and Rate Limits**:


- **Rate Limit**: Maximum requests allowed per operation per second.
- **Burst Limit**: Maximum requests that can be submitted simultaneously over time.
- **Usage Plan**: Combination of rate limit and burst limit for a specific
operation.
- **Throttling**: Occurs when requests exceed the rate limit, resulting in a 429
HTTP error.

### 2. **Token Bucket Algorithm**:


- The algorithm used for request rate limiting. Each request consumes a "token."
Tokens refill at a defined rate.
- If no tokens are available when a request is made, throttling occurs.

### 3. **Factors Determining Usage Plans**:


- API operation type.
- Selling partner (account) and application pair.
- Marketplaces involved.

### 4. **Usage Plan Types**:


- **Standard Usage Plans**: Fixed rate limits based on anticipated usage.
- **Dynamic Usage Plans**: Adjusts rate limits based on the selling partner's
business needs and performance metrics.

## How to Identify Your Usage Plan


- **SP-API Documentation**: Check the API reference for rate and burst limits.
- **Response Header**: The `x-amzn-RateLimit-Limit` header indicates limits for the
specific operation.

## Important Notes for Developers


- **Handling 429 Response**: Implement a back-off strategy since 429 indicates
throttled requests. Use available rate limit data in headers to optimize.
- **Testing Applications**: Use the SP-API sandbox for functionality tests, but
limits in the sandbox may not match production rates.

## Best Practices to Optimize Call Patterns


- Reduce frequency of calls and maintain limits.
- Utilize push notifications instead of polling.
- Use batch processing where applicable (e.g., Feeds, Reports APIs).

## Caveats
- Rate limits can change, and adjustments typically happen based on selling partner
performance metrics or business context.
- Avoid hardcoding timers; coding should be event-driven instead of relying on
continuous loops.
- Applications may still receive occasional throttling due to unpredictable usage
patterns.

This summary serves as a guide for developers to understand and effectively use the
Amazon SP-API, primarily focusing on managing usage plans and rate limits
effectively while ensuring compliance with best practices.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-


limits#how-should-my-application-handle-a-429-response:
### Summary of Amazon Selling Partner API (SP-API) Usage Plans and Rate Limits

#### Key Concepts


1. **Rate Limit**: The maximum number of requests allowed to a specific operation
per second.
2. **Burst Limit**: The maximum number of requests that can be accumulated and sent
simultaneously to a specific operation.
3. **Usage Plan**: A combination of rate limit and burst limit applicable to each
API operation. There are two types:
- **Standard Usage Plans**: Static values for all callers based on expected call
patterns.
- **Dynamic Usage Plans**: Adjust based on the current and historical business
needs of the selling partner. Applicable to specific operations like Orders V0 and
Product Pricing API.

4. **Throttling**: When requests exceed rate limits, the SP-API temporarily rejects
them, resulting in a 429 HTTP error response. It is advisable to implement retry
mechanisms.

5. **Token Bucket Algorithm**: The method used for rate limiting. Tokens are added
to a 'bucket' at a set rate, and each request deducts a token. If the bucket is
empty, subsequent requests will be throttled.

#### Important Classes and Functions


- **API Operations**: Each operation has its associated rate and burst limits which
can be found in the API reference documentation for that specific operation.

#### Handling 429 Responses


When a 429 status code is encountered (indicating throttling):
- Implement a back-off strategy for retries.
- Use the `x-amzn-RateLimit-Limit` response header (if available) to understand the
difference between expected and actual limits.

#### How to Find Your Usage Plan


1. **SP-API Documentation**: Each operation's limits can be found in its reference
documentation.
2. **Response Header**: When performing an operation, check for the `x-amzn-
RateLimit-Limit` header to get real-time rate limits, understanding it may not
always be present.

#### Implementation Recommendations


- Optimize application workloads to stay within rate limits (e.g., reduce frequency
of calls, utilize push notifications, use batch APIs).
- Read headers dynamically instead of relying on hard-coded values.

#### Important Caveats


- **No Guarantee Against Throttling**: Applications may still experience transient
429 responses due to factors beyond control.
- **Rate Limits Can Change**: Amazon may raise or lower limits at any time, usually
communicating such changes in advance. Dynamic plans will adjust rates based on
business context.

#### Example Code Snippet for Handling API Requests

```python
import requests
import time

def call_sp_api(api_endpoint, headers):


while True:
response = requests.get(api_endpoint, headers=headers)

if response.status_code == 200:
# Process the successful response
return response.json()
elif response.status_code == 429:
# Throttled; apply back-off strategy
backoff_duration = int(response.headers.get('x-amzn-RateLimit-Limit',
1))
time.sleep(backoff_duration)
continue
else:
response.raise_for_status()

# Example usage
api_endpoint = "https://sellingpartnerapi.amazon.com/path/to/operation"
headers = {
"Authorization": "Bearer your_access_token",
"Content-Type": "application/json",
}

try:
data = call_sp_api(api_endpoint, headers)
print(data)
except Exception as e:
print("Error occurred:", e)
```

### Conclusion
Understanding usage plans and rate limits is crucial for effectively using the
Amazon SP-API. Developers should implement error handling for throttling and
optimize API calls according to the mentioned guidelines to ensure better
performance and reliability of their applications.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-


limits#how-can-i-test-my-application-with-respect-to-its-usage-plans:
### Summary of Amazon Selling Partner API (SP-API) Usage Plans and Rate Limits

#### Key Concepts

1. **Rate Limit**: The maximum number of requests allowed per second for a specific
operation.
2. **Burst Limit**: The maximum number of requests that can be submitted
simultaneously after building up over time.
3. **Usage Plan**: A combination of the rate limit and burst limit that applies to
an operation.
4. **Token Bucket Algorithm**: The method used for rate limiting by controlling
tokens for requests in a "bucket".

#### Rate-Limiting Algorithm

- The SP-API utilizes a **token bucket algorithm** where tokens are added to a
bucket at a fixed rate. Each request depletes a token.
- Requests are throttled (receive a 429 error) when no tokens are available.
- Tokens are replenished based on the defined rate limit, which influences the
application's throughput.

#### Factors That Determine Usage Plans


- **API Operation**: Each API operation has its own rate and burst limits
documented in the API reference.
- **Selling Partner Account and Application Pair**: Rate limits generally apply per
selling partner and application pair. Grantless operations are exceptions.
- **Regions and Marketplaces**: Usage plans depend on the partner’s marketplace
groups.

#### Usage Plan Types

1. **Standard Usage Plans**: Governed by static rate limits based on expected call
patterns.
2. **Dynamic Usage Plans**: Automatically adjusted based on each selling partner's
business needs, influenced by various metrics.

#### How to Find Your Usage Plan

1. **SP-API Documentation**: Check the API reference documentation for listed


limits.
2. **Response Headers**: The `x-amzn-RateLimit-Limit` response header may provide
limits, but it should not be relied upon as its absence does not indicate a failed
request.

#### Important Notes and Caveats

- **Throttling Handling**: A 429 response indicates that the request was throttled.
Implement a back-off strategy when retrying.
- **Testing in Sandbox**: You can test error handling for 429 responses using the
SP-API sandbox; however, rate limits for sandbox operations are uniform and do not
reflect production usage.
- **Dynamic Rate Changes**: While limits can be raised, they can also be reduced
with prior notice.

#### Suggestions for Coding Against Dynamic Limits

- Monitor the `x-amzn-RateLimit-Limit` header when available.


- Avoid hardcoding timers; code to react to events instead.

#### FAQ Highlights

- **If Rate Limits Are Low**: Optimize call patterns or explore multi-request APIs.
- **Impact of More Authorizations**: Throttling does not increase with additional
authorizations; each application and selling partner pair has distinct limits.
- **Rate Change Communication**: Any reductions in rate limits are communicated in
advance.

### Additional Resources

- Refer to the **API Reference Documentation** for specific rate limits and usage
plans associated with API operations.
- Explore **Optimization Strategies** to align your application’s call patterns
with the available rate limits effectively.

By understanding the SP-API's usage plans and rate limits, developers can
efficiently manage their application’s requests while minimizing the risk of being
throttled.
_____________________________
Summary of URL: https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-
limits#will-rate-limits-change:
# Amazon Selling Partner API (SP-API) - Usage Plans and Rate Limits Summary

## Key Concepts

### 1. **Rate Limit**


- The maximum number of requests allowed per second for a specific operation in the
SP-API.

### 2. **Burst Limit**


- The maximum number of requests that can be accumulated over time and submitted
simultaneously.

### 3. **Usage Plan**


- A plan combining the rate limit and burst limit for a specific operation.

### 4. **Token Bucket Algorithm**


- The algorithm used for rate limiting, where a "bucket" is filled with tokens at a
defined rate. Each request consumes a token. If tokens are unavailable (bucket
empty), the request is throttled, returning a 429 HTTP error.

### 5. **Throttling**
- When requests exceed the rate limit, they are temporarily rejected, resulting in
a 429 error response.

### 6. **Grantless Operations**


- Operations that do not require a seller ID as part of the request, allowing
access without authorization from the selling partner.

## Usage Plan Types


- **Standard Usage Plans**:
- Static rate limits for all callers.
- **Dynamic Usage Plans**:
- Rate limits adjusted based on the selling partner's business context and needs.

## Finding Your Usage Plan


- **SP-API Documentation**: Rate limits can be found in the API reference
documentation for each operation.
- **Response Header**: The `x-amzn-RateLimit-Limit` header specifies the rate
limits for each account-application pair if available.

## Important Functions and Methods

### Error Handling


- **Handling 429 Responses**: Automatically retry requests while implementing a
back-off strategy.
- **Testing with Sandbox**: Use the SP-API sandbox for error handling testing; note
that rate limits are shared in the sandbox.

### Optimization Strategies


- Optimize call patterns to stay within rate limits, use push notifications, batch
APIs, and minimize polling.

## Notes and Caveats


- Rate limits may change over time, but any decrease will be communicated to
provide time for application adjustments.
- The dynamic usage plans rely on selling partner business metrics, not the volume
of API calls made.
- Avoiding throttling completely is not always possible; ensure your application
accounts for potential transient throttling.

## Conclusion
Understanding and effectively managing usage plans and rate limits is essential for
any developer integrating with the Amazon SP-API. By utilizing the correct
strategies and optimizing application workloads, you can ensure efficient use of
the API without recurring throttling issues.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-


limits#how-should-i-code-my-application-to-respect-dynamic-limits:
### Summary of Amazon Selling Partner API (SP-API) Usage Plans and Rate Limits

This document provides essential details regarding how to manage usage plans and
rate limits while utilizing the Amazon Selling Partner API (SP-API).

#### Key Concepts

1. **Rate Limit**:
- The maximum number of requests allowed to a specific operation per second.
- Exceeding this limit leads to throttling (HTTP error 429).

2. **Burst Limit**:
- The maximum number of requests that can be built up over time and submitted
simultaneously.
- It defines how many requests can be sent at once after brief periods of
inactivity.

3. **Usage Plans**:
- A combination of rate limit and burst limit specific to an API operation.
- It varies based on factors such as the selling partner account, application
calling the SP-API, and the marketplace.

4. **Token Bucket Algorithm**:


- The mechanism used to rate-limit requests, where tokens are added to a bucket
at a set rate. A request can only be made if a token is available.

5. **Throttling**:
- Occurs when requests exceed the set limits, resulting in a 429 HTTP error
response. Throttled requests can be retried later.

#### How to Find Your Usage Plan

- **Documentation**: Usage plan details, including limits, can be found in the API
reference documentation.
- **Response Header**: The `x-amzn-RateLimit-Limit` response header specifies the
current rate limits per account-application pair, though its presence shouldn't be
relied upon.

#### Usage Plan Types

1. **Standard Usage Plans**:


- Static values for rate limits applicable to most SP-APIs.
- Details are available in the API reference documentation.

2. **Dynamic Usage Plans**:


- Adjusted automatically based on the selling partner's current and historical
business metrics.
- Specifically apply to certain SP-API operations related to Orders and Product
Pricing.

#### Important Considerations for Coding

- **Handling 429 Responses**: Implement a retry mechanism with back-off strategies


for handling throttled requests (HTTP 429).
- **Optimization of Call Patterns**: If frequently throttled, consider strategies
such as:
- Reducing request frequency.
- Utilizing push notifications instead of polling.
- Employing batch APIs to reduce the total number of calls.

- **Dynamic Limit Management**: To respect dynamic limits:


- Read the `x-amzn-RateLimit-Limit` header when available.
- Avoid hardcoding timers; use event-driven programming where applicable.

#### Code Example

While specific code examples or API snippets were not provided in the text,
developers should refer to the respective SP-API documentation related to the
operations they are using (like Orders API, Feeds API) to find appropriate code
samples that include respective fields and contract details.

### Important Notes

- Dynamic limits can change based on the seller's business context, thus it is
essential to code applications that can adapt to changing limits.
- Rate limits can be increased or decreased by Amazon based on usage, but changes
will be communicated in advance.

This summary encapsulates the necessary information for developers to effectively


leverage the Amazon Selling Partner API while being mindful of how to handle usage
plans and rate limits.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-


limits#what-is-the-overall-goal-of-dynamic-usage-plans:
# Summary of Amazon Selling Partner API (SP-API) Usage Plans and Rate Limits

## Overview
The Amazon Selling Partner API (SP-API) allows developers to interact with a
seller's account to gather and post data through various APIs. This document
outlines the usage plans and rate limits to help developers optimize their
application's API calls.

## Key Concepts

### Rate Limit and Burst Limit


- **Rate Limit**: Maximum requests allowed per operation per second.
- **Burst Limit**: Maximum requests that can be sent simultaneously after being
built up over time.

### Usage Plans


- **Usage plan**: Combination of rate limit and burst limit that applies to a
specific operation.
- **Standard Usage Plans**: Static values for rate and burst limits based on
expected call patterns for each operation.
- **Dynamic Usage Plans**: Automatically adjusting limits based on the selling
partner's current and historical business needs.

### Token Bucket Algorithm


- The SP-API employs a token bucket algorithm where tokens represent allowances to
make requests. Availability of tokens in the bucket allows the caller to make API
requests without throttling.
- A **429 HTTP error** indicates that the request was throttled due to overstepping
the defined limits.

### Throttling
- Throttling occurs when requests exceed available tokens in the bucket, leading to
temporary rejection of requests.

## Finding Your Usage Plan


You can determine your usage plan using:
1. **SP-API Documentation**: Look up limits in API reference documents.
2. **Response Header**: The `x-amzn-RateLimit-Limit` header may provide the limits,
but should not be solely relied upon.

## Important Notes for Developers


- **Error Handling**: A response with a 429 status code should be retried with a
back-off strategy.
- **Testing**: While you can test error handling in the SP-API sandbox, actual rate
limits can only be verified in production.
- **Optimization Suggestions**:
- Reduce the frequency of calls and leverage batch APIs where applicable.
- Use push notifications instead of polling.

## Example [API Snippet]

Since the content did not provide any specific code examples or API snippets, below
is a hypothetical example illustrating how to check the rate limits on a request:

```python
import requests

def check_rate_limits(api_url, access_token):


headers = {
"Authorization": f"Bearer {access_token}",
}
response = requests.get(api_url, headers=headers)
if response.status_code == 200:
print("Request successful.")
print("Rate limits:", response.headers.get("x-amzn-RateLimit-Limit"))
elif response.status_code == 429:
print("Throttled, implement back-off strategy.")
else:
print("Request failed:", response.status_code)

# Usage
check_rate_limits("https://sellingpartnerapi-na.amazon.com/some-endpoint",
"your_access_token")
```

## Conclusion
Understanding usage plans and rate limits is crucial for effectively using the
Amazon SP-API. By implementing the token bucket strategy and dynamically adjusting
application behavior to respect these limits, developers can avoid throttling and
optimize their application workloads.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-


limits#factors-that-determine-usage-plans:
### Summary of Amazon Selling Partner API (SP-API) - Usage Plans and Rate Limits

#### Key Concepts

1. **Rate Limits**
- The maximum number of requests allowed to a specific operation per second.
- To avoid throttling, ensure your application stays below this limit.

2. **Burst Limits**
- The maximum number of requests that can be submitted simultaneously after
building up over time.

3. **Usage Plans**
- A combination of rate limit and burst limit specific to an operation.
- Plans can vary by selling partner account, marketplace, and the application
calling the API.

4. **Throttling**
- When requests exceed your rate limit, the API temporarily rejects them with an
HTTP 429 error.
- Implement a retry mechanism for throttled requests.

5. **Token Bucket Algorithm**


- This algorithm is used for rate limiting; it allows a certain number of tokens
(requests) in a "bucket."
- Tokens refill at a defined rate, and requests deplete tokens from the bucket.
If the bucket is empty, requests are throttled.

#### Usage Plan Types

1. **Standard Usage Plans**


- Governed by static rate limits across all callers based on expected usage
patterns.

2. **Dynamic Usage Plans**


- Adjusted dynamically according to the selling partner's current and historical
business metrics.
- Applicable to specific SP-API operations (e.g., Orders V0, Product Pricing).

#### How to Find Your Usage Plan

- **API Documentation**: Rate and burst limit details can be found in the API
reference documentation for each individual operation.
- **Response Header**: The `x-amzn-RateLimit-Limit` response header may provide the
operation's rate limits—though it should not be depended upon.

#### Key Classes/Methods

While specific classes and methods are not detailed in the provided content,
interaction with the SP-API generally involves:

- **Creating API calls**: Structure your API calls according to operation


specifications based on the SP-API documentation.
- Handling responses, particularly for `429` errors by implementing back-off
strategies to retry requests efficiently.

#### Developer Notes

- **Testing**: Use the SP-API sandbox to test your application, although be aware
that testing for rate limits is limited; production has different rates.
- **Handling 429 responses**: Always implement a back-off strategy when retrying
requests after receiving a throttled response.
- **Dynamic Limits**: Be wary of how dynamic limits can change based on business
metrics. Use provided headers to adapt to these adjustments in a live environment.

#### Important Caveats

- **No Hardcoding Timers**: Avoid hardcoding timings into your application;


leverage event-driven coding instead.
- **Optimize call patterns**: If experiencing throttling, evaluate if you can
reduce frequency or batch calls based on API capabilities.
- **Authorization**: Keep in mind that certain operations (grantless) do not
require seller authorization, affecting your usage plan.

This summary provides a clear overview of key points necessary for developers to
effectively work with the Amazon SP-API regarding usage plans and rate limits. For
specific code implementations and examples, refer to detailed API documentation for
each operation.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-


limits#what-factors-influence-dynamic-usage-plans:
# Amazon Selling Partner API (SP-API) Usage Plans and Rate Limits Summary

## Key Concepts

1. **Usage Plans**: These define the rate limits (number of allowed requests) and
burst limits (maximum simultaneous requests) for each SP-API operation. They
control the number of requests based on:
- Selling partner account.
- Application calling the SP-API.
- Marketplace.

2. **Rate Limit**: The maximum number of requests allowed per second for a specific
operation. Exceeding this will trigger throttling.

3. **Burst Limit**: The maximum number of accumulated requests that can be


submitted simultaneously.

4. **Throttling**: Occurs when the rate limit is exceeded, resulting in a 429 HTTP
error response. Retry after receiving this error.

5. **Grantless Operations**: These are operations that do not require a `sellerId`


in the request, hence the usage plan is not affected by the selling partner.

6. **Token Bucket Algorithm**: This algorithm is used by SP-API for rate limiting,
where requests consume tokens. Tokens are replenished at a steady rate until the
burst limit is reached.

## How to Find Your Usage Plan

You can find the specific rate and burst limits for an SP-API operation by:
- Checking the API reference documentation for each operation.
- Looking at the `x-amzn-RateLimit-Limit` response header; however, do not rely
solely on this header as it may not always be present.

## Types of Usage Plans

1. **Standard Usage Plans**: Fixed rate limits based on expected call patterns.
Each operation has predefined limits.

2. **Dynamic Usage Plans**: Adjusted based on current and historical business


needs. These adapt over time and can fluctuate based on selling partner metrics.

## Usage Plan Example

Each SP-API operation has an associated usage plan with quantifiable limits.
Example:
- **Operation**: `GET /orders/v0/orders`
- **Rate Limit**: 1 request per second
- **Burst Limit**: 2 requests

### Note
Dynamic usage plans apply specifically to operations within the Orders API and
Product Pricing operations.

## Important Points and Caveats

- Efficient call patterns should minimize throttling; adjust call frequencies and
leverage push notifications where possible.
- If continuously throttled, optimize call patterns by batching requests or
reducing request frequency.
- Rate limits can be changed by Amazon, potentially impacting applications reliant
on specific thresholds.
- Do not hardcode timers; instead, code naturally against events to respond to
rate-limited operations efficiently.

## Frequently Asked Questions (FAQs)

- **Can my limits be increased**? Rate limits are designed for optimal application
operation, and consistent throttling indicates the need for optimizations rather
than limit adjustments.
- **How to handle a 429 response**: Implement a back-off strategy to manage
excessive requests gracefully.
- **Testing your application**: Use the Selling Partner API sandbox for error
handling testing but note that it does not simulate varied rate limits found in
production.

By understanding these concepts and implementing the key practices highlighted,


developers can efficiently navigate the SP-API and optimize their application's
interaction with Amazon's systems.
_____________________________
Summary of URL: https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-
limits#can-my-application-completely-avoid-getting-throttled:
### Summary of Amazon Selling Partner API (SP-API) Usage Plans and Rate Limits

---

#### Key Concepts

1. **Usage Plans**:
- Define how many requests can be made to an operation in a set time frame.
- Include two main components:
- **Rate Limit**: Maximum requests per second.
- **Burst Limit**: Maximum requests that can be dispatched simultaneously
after a buildup.

2. **Rate-limiting Algorithm**:
- **Token Bucket Algorithm**: Exchanging tokens for API requests. If the bucket
is empty, requests are throttled (resulting in a `429 HTTP error`).
- Tokens are added to the bucket at a defined rate until the burst limit is
reached.

3. **Throttling**:
- Occurs when a request exceeds the defined rate limit.
- Handled via retry logic — applications should implement a back-off strategy
upon receiving a `429` response.

4. **Grantless Operations**:
- Operations that do not require a seller ID, and usage plans for these
operations are independent of the selling partner.

---

#### Important Classes/Methods

- **Applications**:
- Represents the developer application calling the SP-API on behalf of the
selling partner and is identified with an application ID.

- **API Operations**:
- Each SP-API operation has specific rate and burst limits that can be viewed in
the API reference documentation.

---

#### Usage Plan Types

1. **Standard Usage Plans**:


- Have static limits defined for all callers based on expected call patterns.

2. **Dynamic Usage Plans**:


- Adjust based on business needs, affected by metrics like sales volume,
allowing limits to increase or decrease.

---

#### Finding Your Usage Plan

- **API Documentation**: Review the SP-API documentation for operational rate and
burst limits.
- **Response Header**: Look for the `x-amzn-RateLimit-Limit` in the API response
header for the rate limits applicable to the request.

---

#### Key Recommendations for Handling Rate Limits

- **Avoiding Throttling**:
- Adjust call frequencies to stay within defined limits.
- Use push notifications to replace polling mechanisms.
- Utilize batch operations to reduce the number of API calls.

- **Handling Throttling**:
- Implement a back-off strategy when encountering a `429` status.
- Monitor the `x-amzn-RateLimit-Limit` header to adjust call patterns
dynamically.

- **No Complete Avoidance of Throttling**:


- Account for transient errors and implement retry logic in application codes.

#### Important Notes

- Rate limits can change; applicants are notified in advance of any reductions.
- Dynamic limits are influenced by selling partner business metrics and can adjust
automatically.
- Rates do not automatically increase based on historical API usage; they depend on
business metrics.

---

This overview provides essential guidance on understanding and leveraging the rate
limiting and usage plans associated with the Amazon Selling Partner API,
particularly tailored for developers using the API in Python.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-


limits#the-rate-limits-for-one-operation-are-too-low-for-my-use-case-can-the-limit-
be-increased:
# Amazon Selling Partner API (SP-API) - Usage Plans and Rate Limits Summary

## Key Concepts

### Terminology
- **Rate Limit**: Maximum number of requests allowed per second for a specific
operation.
- **Burst Limit**: Maximum number of requests that can be submitted simultaneously
after being built up.
- **Usage Plan**: A combination of rate limit and burst limit for a specific
operation.
- **Token Bucket Algorithm**: The algorithm used to manage rate limiting, allowing
requests as long as tokens (representing permissions) are available.
- **Throttling**: Occurs when requests exceed defined rate limits, resulting in a
429 HTTP status code.

### Rate-Limiting Algorithm


The SP-API uses a token bucket algorithm where:
- Tokens are added to the bucket at a specified rate per second.
- Each request removes a token from the bucket.
- Requests are throttled if no tokens are available, presenting a 429 error code.

### Factors Determining Usage Plans


- **API Operation**: Each operation has specific default rate and burst limits.
- **Account and Application Pair**: Most operations limit requests based on the
specific selling partner and application.
- **Regions and Marketplaces**: Usage plans are tied to marketplace groups
authorized by the selling partner.

### Usage Plan Types


1. **Standard Usage Plans**: Static rate limits for all callers based on expected
usage.
2. **Dynamic Usage Plans**: Adjust based on historical business needs, affecting
rate changes based on selling partner metrics.

## Important Notes and Caveats


- Applications may experience throttling; therefore, it's essential to implement
retry strategies with back-off mechanisms upon receiving 429 responses.
- Developers should not solely rely on the `x-amzn-RateLimit-Limit` response header
as it may not always be present.
- Consistent throttling may require optimization of call patterns, such as reducing
frequency, using push notifications, or using batch APIs.
- Rate limits are subject to change based on business metrics and operational
analysis by Amazon.

## Example API Usage


While specific snippets were not provided in the original content, developers
should focus on making API requests in accordance with the rate limits as follows:

### Python Example Using Requests Library


```python
import requests

def call_sp_api(url, headers):


response = requests.get(url, headers=headers)
if response.status_code == 429:
print("Throttled: Please retry after back-off.")
# Implement back-off strategy here
elif response.status_code == 200:
return response.json()
else:
print("Error:", response.status_code, response.text)

# Example header containing sellerId (as required)


headers = {
'Authorization': 'Bearer <access_token>',
'x-amzn-RateLimit-Limit': 'value_if_available',
'Content-Type': 'application/json'
}

# Example API call


response_data = call_sp_api("https://sellingpartnerapi-fe.amazon.com/some-
endpoint", headers)
```

## Optimization Strategies
- Optimize API call patterns to remain below the rate limits, consider alternate
approaches such as batch processing or using notifications to trigger actions
instead of polling.
- Monitor application behavior to detect and adjust for changes in usage patterns
leading to throttling.

Developers leveraging Amazon SP-API should utilize this documentation to


effectively manage their application's interaction with the APIs while staying
within operational limits.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-


limits#how-often-will-the-limits-associated-with-a-given-usage-plan-change:
### Summary of Usage Plans and Rate Limits for the Selling Partner API (SP-API)

#### Key Concepts

1. **Usage Plans**:
- **Usage Plan**: A combination of rate and burst limits for a specific API
operation.
- **Rate Limit**: Maximum number of requests allowed per second for an
operation.
- **Burst Limit**: Maximum requests that can be accumulated over time and
submitted simultaneously.

2. **Rate-Limiting Algorithm**:
- **Token Bucket Algorithm**: The SP-API uses this algorithm to manage rate
limiting. Tokens are added to a "bucket" at a defined rate; each request consumes a
token. If the bucket is empty, requests are throttled, resulting in a 429 HTTP
error.

3. **Throttling**:
- When requests exceed limits, they are temporarily rejected, leading to a 429
error response. These requests can be retried after waiting.

4. **Grantless Operations**:
- Operations that do not require a seller ID or authorization, impacting how
usage plans are determined.

#### Factors Influencing Usage Plans

- **API operation**: Each operation has predefined rate and burst limits.
- **Selling partner and application pair**: Rates are specific to each client-app
interaction.
- **Regions and marketplaces**: Limits depend on the selling partner's operating
marketplace.

### Usage Plan Types


1. **Standard Usage Plans**: Static limits for typical usage patterns.
2. **Dynamic Usage Plans**: Adjusted based on historical and current business
metrics for selling partners.

### Finding Your Usage Plan


- **SP-API Documentation**: Limit details are listed in API reference
documentation.
- **Response Header**: The `x-amzn-RateLimit-Limit` header (if present) indicates
current limits but should not be solely relied on.

### Important Notes


- **Handling 429 Responses**: Implement a back-off strategy for retrying requests
after being throttled.
- **Testing Rate Limits**: Use the SP-API sandbox for testing error handling,
though actual rate limits may vary in production.

### Implementation Considerations


- **Efficient API Call Patterns**: Optimize for fewer calls to stay within limits,
use batch operations when possible.
- **Monitoring**: Pay attention to rate limits in the response headers to adjust
call frequency dynamically.

### Suggested Practices


- Avoid hardcoding timers; instead, read the `x-amzn-RateLimit-Limit` when
available.
- Structure code around events (e.g., using notifications) instead of polling to
reduce unnecessary requests.

#### Conclusion
Understanding the usage plans and rate limits is crucial for developing efficient
applications with the SP-API. Proper management and optimization of API calls will
result in better performance and fewer throttling incidents.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-


limits-in-the-sp-api#what-should-i-do-if-my-application-is-consistently-throttled:
## Amazon Selling Partner API (SP-API) Rate Limits and Usage Plans Summary

### Key Concepts

1. **Rate Limit**: Maximum number of requests allowed to a particular operation per


second. Exceeding this limit results in throttling.

2. **Burst Limit**: Maximum number of requests that can be sent in a burst after
building up over time.

3. **Usage Plan**: Combines the rate limit and burst limit for a specific
operation.

4. **Token Bucket Algorithm**: The SP-API utilizes this algorithm to manage rate
limiting. Each request consumes a token, and tokens are replenished at a
predetermined rate. Exceeding this limit results in a throttled request (HTTP 429
error).

5. **Throttling**: Temporary rejection of requests when the rate limit is exceeded.


Developers must implement retry logic in their applications.

6. **Grantless Operations**: These do not require `sellerId` and are not affected
by the same rate limiting rules.

### Important Notes

- **Determining Usage Plans**:


- Usage plans depend on factors such as API operation, selling
partner/application pair, and marketplace.
- Usage plans can be either **Standard** (static limits) or **Dynamic** (limits
that adjust based on business needs).
- **Response Header for Rate Limits**:
- The `x-amzn-RateLimit-Limit` header provides the rate limits for operations
but should not be solely relied upon as it may not always be present.

### Suggested Application Practices

- If your application is frequently throttled:


- Optimize call patterns.
- Use push notifications instead of polling.
- Consider batch APIs to accomplish more in a single call.

- Implement a back-off strategy to handle 429 responses, retrying requests after a


delay.

- Avoid hardcoding timers; instead, respond to events (e.g., notifications) to


maintain natural flow in application operations.

### Usage Plans and Implementation

- **Finding Your Usage Plan**:


- Check the API documentation for specific operations, which lists associated
limits.
- Use the `x-amzn-RateLimit-Limit` header from the API response to understand
effective limits (though unreliable).

### Sample Code Snippet for Handling Throttling

Here is an example of handling a throttled request with retry logic:

```python
import time
import requests

def call_sp_api(url):
while True:
response = requests.get(url)
if response.status_code == 200:
return response.json()
elif response.status_code == 429:
# Throttled, back off
retry_after = int(response.headers.get("Retry-After", 1)) # default to
1 second
print(f'Throttled. Retrying after {retry_after} seconds...')
time.sleep(retry_after)
else:
# Handle other errors
response.raise_for_status()
```

### Conclusion

Understanding the usage plans and rate limits is essential for optimizing the
performance of applications using the Amazon SP-API. Developers must account for
the potential of being throttled and implement strategies for effective API calls.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-


limits-in-the-sp-api#usage-plan-types:
## Summary of Amazon SP API: Usage Plans and Rate Limits

### Key Concepts

1. **Usage Plans**:
- Define how the Selling Partner API (SP-API) controls request limits based on
various factors such as selling partner accounts, applications calling the API, and
marketplaces.
- Usage plans consist of a **rate limit** (max requests per second) and a
**burst limit** (max requests that can be accumulated and sent at once).

2. **Rate Limiting**:
- Achieved using a **token bucket algorithm**:
- Tokens are added to the "bucket" at a set rate.
- Each request consumes a token.
- If no tokens are available, requests are throttled with a 429 error
response.

3. **Throttling**:
- Occurs when requests exceed the defined rate limit. In this case, the API
returns a 429 HTTP error, and requests can be retried later.

4. **Grantless Operations**:
- Operations that do not require a seller ID, and thus are not impacted by the
selling partner's usage plan.

### Types of Usage Plans

1. **Standard Usage Plans**:


- Most API operations have fixed rate limits set in their documentation.

2. **Dynamic Usage Plans**:


- Adjust based on the selling partner's business metrics, not historical API
usage.
- Applies to certain operations under the Orders API and the Product Pricing
API.

### How to Determine Your Usage Plan

- **Documentation**: Consult the API reference for limits.


- **Response Header**: Check the `x-amzn-RateLimit-Limit` in the response to see
operation-specific rate limits, but don’t rely on its presence.

### Frequently Asked Questions

- **Handling 429 Responses**: Implement a back-off strategy if throttled.


- **Testing**: Use the SP-API sandbox, although rate limit testing may not be
authentic in the sandbox.
- **Dynamic Limit Management**: Read the `x-amzn-RateLimit-Limit` header and avoid
hardcoded timers in your code.

### Important Notes

- **Performance Optimization**: If frequently throttled, consider adjusting your


API call patterns, using push notifications instead of polling, and utilizing batch
APIs to consolidate requests.
- **Changeable Limits**: Rates can be adjusted based on business context, aiming
for efficient API utilization while ensuring stability for developers.
### Example Snippet for Handling Throttled Requests

```python
import time
import requests

def call_sp_api(endpoint, params):


while True:
response = requests.get(endpoint, params=params)

# Check for throttling


if response.status_code == 429:
print("Throttled! Retrying after waiting...")
time.sleep(1) # Implement a back-off strategy
continue
return response.json()
```

### Conclusion

Understanding and managing usage plans is crucial for successfully interacting with
the Amazon Selling Partner API. By adhering to rate limit guidelines and optimizing
application patterns, developers can maintain efficient and reliable application
performance.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-


limits-in-the-sp-api#how-to-find-your-usage-plan:
### Summary of Amazon SP-API Usage Plans and Rate Limits

#### Key Concepts

1. **Rate Limit**: The maximum number of requests allowed to an API operation per
second. Staying below this limit prevents throttling.

2. **Burst Limit**: The maximum number of requests that can be submitted


simultaneously after being built up over time.

3. **Usage Plan**: Defines the combination of rate limit and burst limit for a
specific operation, affected by various factors such as the selling partner account
and the application making the request.

4. **Token Bucket Algorithm**: The SP-API employs this algorithm to manage rate
limiting, where requests consume tokens from a bucket that fills at predefined
rates.

5. **Throttling**: When the rate limit is exceeded, the system may temporarily
reject requests, responding with a 429 HTTP status code.

6. **Grantless Operations**: API operations that do not require a `sellerId`,


meaning they are not subject to typical selling partner account limitations.

#### Usage Plan Types

- **Standard Usage Plans**: Static limits based on expected usage patterns for most
SP-API operations.
- **Dynamic Usage Plans**: Adjusted to meet real-time business needs based on
historical metrics for specific operations.

#### How to Find Your Usage Plan

1. **Documentation**: Reference usage limits in the API reference documentation of


each operation.

2. **Response Header**: Look for the `x-amzn-RateLimit-Limit` header in responses,


which provides rate limits when available. However, do not rely solely on it due to
inconsistencies in availability.

#### Important Notes

- The SP-API's ability to increase or decrease rate limits based on business


characteristics means limits can change without notice, but any reduction will be
communicated in advance.

- Applications should implement proper handling for 429 responses, with strategies
for back-off and retry based on returned headers.

- If facing consistent throttling, consider optimizing call patterns, reducing call


frequency, and making strategic use of batch operations.

#### Example Usage of SP-API

- To connect to the SP-API, use the applicable SDK in your programming language
(e.g., Python SDK).

#### Python SDK Interaction Example

```python
import requests

# Sample function to call an API operation


def call_sp_api(operation, params):
url = f'https://sellingpartnerapi.{region}.amazon.com/{operation}'
headers = {
'Authorization': f'Bearer {access_token}',
'Content-Type': 'application/json',
# Include other necessary headers
}

response = requests.get(url, headers=headers, params=params)

if response.status_code == 429:
print("Rate limit exceeded. Try again later.")
else:
return response.json()
```

#### Important Functions and Methods

- **call_sp_api(operation, params)**: A function designed to access SP-API


operations, requiring the operation name and parameters.

- **Error Handling**: Implement retry logic for 429 responses, and track limits
using headers when available.
By adhering to these guidelines and understanding the core concepts outlined,
developers can effectively manage their API interactions while navigating the
constraints of Amazon's SP-API.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-


limits-in-the-sp-api#rate-limiting-algorithm:
# Summary of Amazon Selling Partner API (SP-API) Usage Plans and Rate Limits

## Key Concepts

### Rate Limiting


- **Rate Limit**: The maximum number of requests an operation can handle per
second. Exceeding this leads to throttling (HTTP 429 errors).
- **Burst Limit**: The maximum number of requests that can be built up and sent
simultaneously.
- **Usage Plan**: Combines rate limit and burst limit per specific operation.
- **Token Bucket Algorithm**: The algorithm used by SP-API for rate limiting,
visualized as tokens in a bucket that get consumed with each request.

### Throttling
- Occurs when requests exceed the allowed rate limit, resulting in a 429 HTTP error
response. Throttled requests can be retried later.

### Grantless Operations


- Operations that do not require a sellerId. These operations have different usage
plan considerations.

## Important Classes & Methods


- **Token Bucket Implementation**: Automatically manages request tokens based on
defined rate limits and burst limits.

## Rate-Limiting Algorithm Explained


1. The SP-API adds tokens to your bucket at a defined rate (e.g., 1 token per
second).
2. Each request consumes a token.
3. When your bucket is empty (no tokens available), further requests are throttled
until tokens are replenished.

### Example of Token Consumption:


- Initial token bucket: 2 tokens (burst limit).
- Request 1: Successful, 1 token remains.
- Request 2: Successful, bucket emptied.
- Request 3: Throttled due to empty bucket.
- Tokens replenish 1 per second.

## Factors Determining Usage Plans


1. **API Operation**: Each SP-API operation has distinct rate/burst limits.
2. **Selling Partner and Application Pair**: Most operations' limits are per
selling partner/application combination.
3. **Regions and Marketplaces**: Limits vary based on regional marketplace
contexts.

### Types of Usage Plans


- **Standard Usage Plans**: Static limits based on expected call patterns.
- **Dynamic Usage Plans**: Adjust limits dynamically based on business needs and
metrics.

## Finding Your Usage Plan


- Check the usage limits in the SP-API documentation for specific operations or
inspect the `x-amzn-RateLimit-Limit` response header when available.

## Frequently Asked Questions


- **Can limits be increased?**: Rate limits are generally "right-sized" but can be
optimized based on application usage patterns.
- **Handling 429 responses**: Implement a back-off strategy when receiving a 429
response. Retry requests after waiting.
- **Testing applications**: Use the Selling Partner API sandbox to test but be
aware that rate limits may vary in production.

## Important Notes
- The developers should not rely solely on the presence of the `x-amzn-RateLimit-
Limit` response header; ensure proper error handling strategies are implemented.
- Applications can be throttled due to uncontrollable factors; developers should
build resilience into their error handling.
- Usage plans influence resources across different operations; understanding these
can help optimize call patterns.

By understanding these concepts and guidelines, developers can effectively utilize


the SP-API while adhering to its limits and practices.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-


limits-in-the-sp-api#factors-that-determine-usage-plans:
# Amazon Selling Partner API: Usage Plans and Rate Limits Summary

## Key Concepts

### Usage Plans


- **Usage Plan**: A combination of rate limit and burst limit that determines how
many requests can be made to an operation within a specific time period.
- **Rate Limit**: The maximum number of requests allowed per second for a specific
operation.
- **Burst Limit**: The maximum number of requests that can be accumulated and
submitted simultaneously.

### Rate-Limiting Algorithm


- The SP-API uses a **token bucket algorithm** for rate-limiting. Each request to
the API requires one token. Tokens are replenished at a fixed rate until a maximum
capacity (burst limit) is reached.
- Exceeding the rate limit temporarily results in throttling, leading to a 429 HTTP
error response.

### Account and Application Pair


- Requests are rate limited per selling partner account and application pair,
impacting the usage plan for the specific operation invoked.

### Grantless Operations


- Operations that do not require a sellerId as part of the request, meaning they
are independent of the selling partner for usage plans.

## Usage Plan Types


1. **Standard Usage Plans**: Most SP-API operations use static rate and burst
limits defined in the API reference documentation.
2. **Dynamic Usage Plans**: Adjust based on the selling partner's current and
historical business needs. Applicable to certain SP-API operations such as Orders
API and Product Pricing API.

## Finding Your Usage Plan


- **SP-API Documentation**: Review API reference to find specific rate and burst
limits.
- **Response Header**: The `x-amzn-RateLimit-Limit` response header (when
available) specifies the limits. Note that you should not rely on the presence of
this header, as it may not always be included.

## Important Notes and Caveats


- If an application experiences consistent throttling (429 errors), developers are
advised to optimize their call patterns:
- Reduce frequency of calls.
- Utilize push notifications over polling.
- Use batch APIs to minimize total calls.
- Rate limits can change; expect higher or lower limits based on observed business
metrics for a selling partner’s account.
- Dynamic usage plans are tailored to ensure appropriate limits over time, reducing
the occurrence of throttling.

## Example Scenario
- For instance, consider an operation with a rate limit of 1 request per second and
a burst limit of 2 tokens:
- At `01:00:100`, an application calls the API, successfully using up 1 token
(tokens left: 1).
- At `01:00:200`, another successful call reduces tokens to 0.
- At `01:00:300`, a call is made, but the request is throttled due to an empty
bucket.

## FAQs
1. **Can rate limits be increased?**
- No direct increase; assess and optimize your application's call patterns
instead.

2. **How to handle 429 responses?**


- Implement back-off strategies and potentially use the `x-amzn-RateLimit-Limit`
response header values to inform adjustments.

3. **Can throttling be avoided completely?**


- Throttling is a possibility due to various uncontrollable factors; code should
manage this potential.

4. **Will limits change with additional authorizations?**


- No, limits are specific to the application and selling partner pair.

5. **What factors influence dynamic usage plans?**


- Rates are influenced by selling partner business size, behavior, and type but
not by the historical number of API requests.

## Conclusion
Understanding the usage plans and rate limits of Amazon SP-API is crucial for
effective application performance and avoiding throttling. Adhering to the
recommendations laid out in the documentation will help developers optimize their
API interactions.
_____________________________
Summary of URL: https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-
limits-in-the-sp-api#the-rate-limits-for-one-operation-are-too-low-for-my-use-case-
can-the-limit-be-increased:
## Amazon Selling Partner API (SP-API) Usage Plans and Rate Limits Summary

### Key Concepts

**1. Rate Limit**: The maximum number of requests the SP-API allows per second for
a specific operation. Exceeding this limit leads to throttling.

**2. Burst Limit**: The maximum number of requests you can batch and send at once
that exceeds the rate limit.

**3. Usage Plan**: A combination of rate limit and burst limit that applies to a
specific operation.

**4. Token Bucket Algorithm**: The SP-API uses this algorithm to manage request
rates. Each request consumes a token from the “bucket,” refilled at a specific
rate. A request will be throttled (HTTP error 429) if there are no tokens
available.

**5. Throttling**: The condition when the SP-API rejects requests due to exceeding
rate limits, resulting in a 429 error.

### Factors Determining Usage Plans

- **API Operation**: Different operations have specific rate and burst limits
documented in the API reference.
- **Selling Partner and Application Pair**: Most operations’ limits are based on
the selling partner account and the associated application.
- **Regions and Marketplaces**: Different marketplace accounts may have distinct
rate limits and usage plans.

### Types of Usage Plans

**1. Standard Usage Plans**: Fixed rate and burst limits for most operations as per
documented expectations.

**2. Dynamic Usage Plans**: Adjusted based on historical and current business
needs, applied to specific operations like:
- Orders V0
- Product Pricing v2022-05-01

### Finding Your Usage Plan

- **SP-API Documentation**: Check the API reference for the respective operation
limits.
- **Response Header**: `x-amzn-RateLimit-Limit` header provides rate limit
information if available. However, do not rely on its presence.

### Handling Throttling

- A 429 response is retry-able. Implement a back-off strategy for repeated


requests.
- For applications consistently throttled:
- Optimize call frequency.
- Use push notifications over polling.
- Utilize batch APIs for efficiency.

### Important Notes

- Applications experience throttling based on their behavior and cannot avoid it


entirely.
- Rate limits are adjustable by Amazon, with prior notification when decreasing.
- Dynamic limits may change based on the selling partner's business context.

### Usage Example

Here is a hypothetical example that demonstrates how to check and handle rate
limits:

```python
import requests

def call_sp_api(api_endpoint):
response = requests.get(api_endpoint)

if response.status_code == 429: # Throttled


print("Throttled: Exceeded rate limits. Retrying...")
# Implement a delay/back-off strategy here
elif response.status_code == 200: # Successful request
limit = response.headers.get("x-amzn-RateLimit-Limit")
print(f"Request successful. Remaining limit: {limit}")
else:
print(f"Error: {response.status_code}")
```

### Conclusion

Understanding and effectively managing usage plans and rate limits within the
Amazon SP-API allows for robust application performance. By adhering to the
outlined guidelines regarding request limits and the token bucket algorithm,
developers can minimize issues related to throttling and optimize their integration
with Amazon's systems.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-


limits-in-the-sp-api#how-can-i-test-my-application-with-respect-to-its-usage-plans:
### Summary of Amazon Selling Partner API (SP-API) Usage Plans and Rate Limits

#### Key Concepts

1. **Usage Plans**: Define the number of requests allowed for specific operations
within a timeframe. They depend on factors like the selling partner account,
calling application, and marketplace.

2. **Rate Limit**: The maximum number of requests allowed per second for an
operation.

3. **Burst Limit**: The maximum number of requests that can be accumulated and
submitted simultaneously.

4. **Token Bucket Algorithm**: The method used for rate limiting, allowing requests
to be made as long as tokens are available. Tokens accumulate at a defined rate
until reaching the burst limit.

5. **Throttling**: When requests exceed the rate limit, the API responds with a 429
HTTP error, indicating that the request should be retried later.

6. **Grantless Operations**: These do not require a `sellerId` and have simpler


usage plan definitions.

#### Important Classes and Functions

- **API Call Structure**: Each API call checks usage plans and limits based on the
access token. Call examples include:

```python
response =
requests.get("https://sellingpartnerapi-na.amazon.com/orders/v0/orders", headers={
"Authorization": f"Bearer {access_token}",
"x-amzn-RateLimit-Limit": rate_limit
})
```

- **Error Handling**: Handle 429 errors using a back-off strategy, retrial


mechanism is necessary:

```python
if response.status_code == 429:
# Implement back-off strategy here
time.sleep(retry_after)
# Retry the request
```

#### Usage Plan Types

- **Standard Usage Plans**: Fixed limits set based on the expected usage patterns
for operations (common for most SP-API operations).

- **Dynamic Usage Plans**: Adjust based on historical and current metrics of the
selling partner's business, leading to more tailored rate and burst limits.

#### Testing and Optimization

- **Testing Rate Limits**: Use the SP-API sandbox to simulate API calls, but
remember that the sandbox has uniform rate limits compared to production.

- **Optimizing Call Patterns**:


- Reduce frequency of calls.
- Use push notifications instead of polling (when available).
- Leverage batch APIs to handle more data per request.

#### Important Considerations

- **Rate Limit Availability**: The `x-amzn-RateLimit-Limit` header in responses


indicates the current rate limits, but its presence is not guaranteed. Always
validate before reliance.

- **Throttling Handling**: Applications should be built to gracefully manage 429


errors and ensure that throttled requests are automatically retried.

- **Dynamic Limits Adaptation**: Read the `x-amzn-RateLimit-Limit` header and avoid


hardcoded timers to dynamically adjust API call frequency based on business needs.

- **Scaling Applications**: As you integrate more selling partners, expect usage


plans to scale accordingly as they are specific to each application-account pair.

This summary provides essential insights into navigating the rate limits and usage
plans of the Amazon Selling Partner API, crucial for developers working with the
library to optimize performance and manage API interactions effectively.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-


limits#will-my-rate-limits-increase-if-my-application-is-constantly-throttled:
### Summary of Amazon SP-API Usage Plans and Rate Limits

#### Key Concepts

1. **Rate Limit**: Maximum number of requests allowed per second for a specific
operation.
2. **Burst Limit**: Maximum number of requests that can be built up and submitted
simultaneously.
3. **Usage Plan**: Combination of rate limit and burst limit for a specific API
operation.
4. **Throttling**: Occurs when requests exceed the rate limit, resulting in a 429
HTTP error response.
5. **Token Bucket Algorithm**: The algorithm used for rate limiting which allows
requests based on an available "token" bucket filled at a defined rate.

#### Rate-Limiting Algorithm

- This algorithm employs a "bucket" analogy where tokens are added at a defined
rate up until a maximum (burst limit). Requests consume these tokens:
- Once the tokens are depleted, subsequent requests result in throttling (429
error).
- Tokens replenish at the set rate.

#### Factors Affecting Usage Plans

- **API Operation**: Each SP-API operation has specific rate and burst limits.
- **Application and Selling Partner**: Usage limits are typically per application
and the selling partner account.
- **Marketplace and Region**: Different marketplaces and regions may have distinct
limits.

#### Usage Plan Types

- **Standard Usage Plans**: Static rate limits applicable to most operations.


- **Dynamic Usage Plans**: Adjust limits based on historical usage and business
metrics of the selling partner.

#### Finding Your Usage Plan

- **SP-API Documentation**: Documentation for each operation includes rate and


burst limits.
- **Response Headers**: The `x-amzn-RateLimit-Limit` header indicates the limits
for the specific operation on a per account-application basis.

#### Handling Rate Limits


- It is suggested to implement a back-off strategy for handling 429 responses.
- Testing can be done in the SP-API sandbox, albeit not reflecting true operational
rate limits.

#### Important Notes

- Rate limits are independent of the number of authorizations your application


gains.
- Limits may be increased over time based on user metrics but this is generally not
a guarantee if requests are not optimized.
- To avoid throttling: reduce request frequency, leverage event-driven
architectures, and use batch APIs where applicable.

#### Caveats

- Ensure your application can gracefully handle transient throttling errors.


- Do not rely solely on the presence of the x-amzn-RateLimit-Limit header as it may
not always be available.

#### Example Code Snippet

While the documentation didn’t provide specific code snippets related to usage
plans and rate limits, developers are encouraged to implement proper error handling
based on the HTTP status codes.

```python
import requests

def call_sp_api(endpoint, params):


response = requests.get(endpoint, params=params)
if response.status_code == 429:
print("Throttled! Implement back-off strategy.")
# Implement retry logic with back-off
elif response.status_code == 200:
return response.json()
else:
print(f"Error: {response.status_code}")

# Example usage
data = call_sp_api('https://sellingpartnerapi-na.amazon.com/some_endpoint',
{'param1': 'value1'})
```

This snippet demonstrates a basic pattern to communicate with the SP-API, handle
throttling appropriately, and process successful responses.

By understanding these essential concepts and patterns, developers can effectively


leverage the Selling Partner API for their applications.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-


limits#content:
# Amazon Selling Partner API (SP-API): Usage Plans and Rate Limits Summary

## Key Concepts
### Usage Plans and Rate Limits
- **Rate Limit**: Maximum number of requests allowed per operation per second.
- **Burst Limit**: Maximum number of requests that can be submitted simultaneously
after being accumulated over time.
- **Usage Plan**: Combines rate limit and burst limit for specific operations.
- **Token Bucket Algorithm**: The mechanism used to control the rate of requests.
Each request consumes a token; tokens are replenished based on the rate limit.

### Throttling
- If a request exceeds the allowed rate, it results in a `429 HTTP error` response.
Developers should implement retry logic to handle these cases.

## How to Use the SP-API

### Finding Your Usage Plan


To check your rate and burst limits for API operations:
1. **SP-API Documentation**: Check the individual API operation documentation.
2. **Response Header**: When making a call, inspect the `x-amzn-RateLimit-Limit`
response header (not guaranteed to be present).

### Usage Plan Types


1. **Standard Usage Plans**: Static rate limits across all callers. Most SP-APIs
follow this model.
2. **Dynamic Usage Plans**: Rate limits adjust based on the selling partner's
historical business needs, applicable to specific operations like Orders and
Product Pricing.

## Code Examples & API Snippets

### Example of Handling Rate Limits in Python


Here’s how to prepare your application to manage the SP-API requests efficiently:

```python
import requests
import time

def call_sp_api(api_endpoint, headers):


while True:
response = requests.get(api_endpoint, headers=headers)

if response.status_code == 200:
return response.json()
elif response.status_code == 429: # Throttled
rate_limit_info = response.headers.get('x-amzn-RateLimit-Limit')
print(f'Throttled! Rate Limit: {rate_limit_info}')
time.sleep(1) # Implement exponential back-off strategy
else:
response.raise_for_status() # Raise error for other status codes
```

### Using the x-amzn-RateLimit-Limit Header


Upon receiving a response, you can extract and use the `x-amzn-RateLimit-Limit` to
understand your limits:

```python
rate_limit = response.headers.get('x-amzn-RateLimit-Limit', 'Not Available')
print(f"Current Rate Limit: {rate_limit}")
```
## Important Notes
- Ensure to **not depend solely** on the presence of `x-amzn-RateLimit-Limit` in
the response, as it may not always be present.
- Dynamic limits can change based on the selling partner’s metrics. Your
application should be designed to adapt to these changes rather than hard-coding
limits.
- For grantless operations, the selling partner account is not a factor; usage
plans are defined based on other criteria.

## Caveats
- Throttling can happen due to various reasons; hence a robust error handling
strategy is essential.
- Periodic updates to rate limits may occur without prior notification from Amazon;
keep your implementation flexible.

## Best Practices
- Optimize call patterns to reduce the frequency of calls, use push notifications
instead of polling, and batch API calls where possible.
- Regularly check for updates regarding API documentation and changes in rate
limits.

## Conclusion
Understanding usage plans and rate limits is crucial for building efficient
applications with the Amazon SP-API. By leveraging the token bucket algorithm and
adhering to the defined limits, developers can enhance application reliability and
performance.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-


limits#will-my-application-be-throttled-more-often-as-i-obtain-more-authorizations:
## Summary of Amazon SP-API Usage Plans and Rate Limits

### Key Concepts

1. **Rate Limit**: Maximum requests allowed to a specific SP-API operation per


second. To avoid throttling, keep below this limit.

2. **Burst Limit**: Maximum requests that can be accumulated over time and sent
simultaneously to a specific operation.

3. **Usage Plan**: Combination of rate limit and burst limit applicable to a


specific operation, determined by several factors including the selling partner
account and marketplace.

4. **Token Bucket Algorithm**: The mechanism used by SP-API to rate-limit requests.


Tokens increase at a set rate, and each request consumes one token.

5. **Throttling**: Occurs when requests exceed rate limits, resulting in a `429


HTTP` error. Throttled requests can be retried later.

6. **Grantless Operations**: Operations that do not require a sellerId in the


request. Such operations have different usage plans.

### Usage Plan Types

- **Standard Usage Plans**: Rate limits are static and apply equally to all users.
- **Dynamic Usage Plans**: Adjusts limits according to business needs based on
current and historical data, applicable only for designated operations.

### Rate-Limiting Algorithm

The SP-API uses a token bucket analogy:

- Each operation has an associated rate limit (tokens added per second) and a burst
limit (maximum tokens held).
- Requests deplete tokens; if none are available, requests will be throttled
(resulting in a `429` error).

**Example Scenario**:
- Rate limit: 1 token/second, Burst limit: 2 tokens.
- Initial state: Bucket holds 2 tokens.
- At `01:00:100`, 1 request sent → Bucket = 1 token.
- At `01:00:200`, 1 request sent → Bucket = 0 tokens.
- At `01:00:300`, request throttled.
- At `01:01:000`, 1 token added → Imagine subsequent requests.

### How to Find Your Usage Plan

- **SP-API Documentation**: Check each operation's reference for rate limits.


- **Response Header**: Use `x-amzn-RateLimit-Limit` to see rate limits per account-
application pair, but do not depend solely on it.

### Important Notes and Caveats

- If your application is consistently throttled, reconsider the frequency and


methods of API calls; study the API's suggested best practices.
- The limits are distinct for each selling partner and application pair, meaning
increased authorizations won’t translate to frequent throttling.
- Rate limits can change; adjustments occur through monitoring selling partner
business metrics.

### Frequently Asked Questions

- **Can limits be increased?**: They are generally fixed but may be adjusted if
call patterns are optimized.
- **What to do on a 429 error?**: Implement a back-off strategy; retry the request
after stabilizing call patterns.
- **Testing usage plans**: Use the SP-API sandbox for error handling testing, but
remember that sandbox operations share limits.
- **Complete avoidance of throttling**: It's impossible due to variables outside
control; design applications to manage transient throttles gracefully.

### Conclusion

Understanding and effectively utilizing the usage plans and rate limits of the
Amazon SP-API is essential for developing robust applications. Developers should
follow best practices for optimizing API calls and managing rate limits to ensure
seamless integration and operation within the Amazon ecosystem.

This summary provides an overview of essential elements for working with the Amazon
SP-API rate limits and usage plans, enabling developers to avoid common pitfalls
related to API throttling and optimize their application's request patterns.
_____________________________
Summary of URL: https://developer-docs.amazon.com/sp-api/docs/sp-api-endpoints:
### Summary of SP-API Endpoints Documentation

#### Overview
The Selling Partner API (SP-API) provides interfaces that allow users to interact
programmatically with Amazon’s selling partner tools by gathering and posting data
on seller accounts. This guide focuses on the necessary endpoints, integration
processes, and the available functionalities within the SP-API.

#### Key Concepts

1. **API Endpoints by Region**:


- Endpoints differ based on the geographic AWS region being accessed:
- **North America (Canada, US, Mexico, Brazil)**:
`https://sellingpartnerapi-na.amazon.com`
**AWS Region**: `us-east-1`
- **Europe (Various European countries)**:
`https://sellingpartnerapi-eu.amazon.com`
**AWS Region**: `eu-west-1`
- **Far East (Singapore, Australia, Japan)**:
`https://sellingpartnerapi-fe.amazon.com`
**AWS Region**: `us-west-2`

2. **Authorization**:
- Applications must be authorized to access the SP-API. Authorization involves
obtaining credentials and managing self-authorization along with token renewals.

3. **Data Handling**:
- The API supports operations for various data types, including orders,
products, reports, and finances.

#### Important Snippets and Code Examples


- **Authorization Example**:
```python
# Example of authorizing an SP-API application (pseudocode)
authorization_token = authorize_sp_api_application(client_id, client_secret)
```

- **Making an API Call**:


```python
import requests

url = "https://sellingpartnerapi-na.amazon.com/orders/v0/orders"
headers = {
"Authorization": f"Bearer {authorization_token}",
"Content-Type": "application/json",
"User-Agent": "YourApp/1.0"
}
response = requests.get(url, headers=headers)

if response.status_code == 200:
data = response.json()
```

#### Important Classes and Methods


- **SP-API Classes**:
- `SellingPartnerAPI`: Main class to interact with the API, responsible for
sending requests and handling responses.
- **Methods**:
- `get_orders()`: Method to retrieve orders from a seller account.
- `create_product()`: Method to create new products in the seller's inventory.
- `refresh_token()`: Method used to refresh the authorization token used in
requests.

#### Usage Notes


- **Endpoint Importance**:
- Make sure to use the correct endpoint based on your target AWS region as this
affects both the authentication mechanism and the data you can access.

- **Rate Limits**:
- Be aware of usage plans and rate limits imposed by Amazon for API calls, as
exceeding limits may lead to throttling.

- **Error Handling**:
- Implement error handling for API request failures, including distinguishing
between authorization errors and request format issues.

- **SDK Usage**:
- Several SDKs are available for automating SP-API calls including those for
Python, Java, and C#, which streamline integration. Always check if you're using
the latest version of the SDKs.

#### Additional Considerations


- Ensure compliance with Amazon’s Acceptable Use Policy and Data Protection Policy
while integrating with SP-API.

This concise summary provides developers with essential information to understand


and work with the Amazon Selling Partner API effectively.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/marketplace-ids:


# Summary of Amazon Selling Partner API: Marketplace IDs

## Marketplace IDs Overview


Marketplace IDs are unique identifiers used by the Selling Partner API (SP-API) to
specify different marketplaces in requests. Each marketplace ID corresponds to a
specific country and is crucial for making API calls to the Selling Partner
services.

### Marketplace IDs by Region

#### North America


| Country | Marketplace ID | Country Code |
|-----------------------------|----------------------------|--------------|
| Canada | A2EUQ1WTGCTBG2CA | CA |
| United States of America | ATVPDKIKX0DERUS | US |
| Mexico | A1AM78C64UM0Y8MX | MX |
| Brazil | A2Q3Y263D00KWCBR | - |

#### Europe
| Country | Marketplace ID | Country Code |
|-----------------------------|----------------------------|--------------|
| Spain | A1RKKUPIHCS9HSES | - |
| United Kingdom | A1F83G8C2ARO7PUK | - |
| France | A13V1IB3VIYZZHFR | - |
| Belgium | AMEN7PMS3EDWLBEN | - |
| Netherlands | A1805IZSGTT6HSNLG | - |
| Germany | A1PA6795UKMFR9DE | - |
| Italy | APJ6JRA9NG5V4IT | - |
| Sweden | A2NODRKZP88ZB9SE | - |
| South Africa | AE08WJ6YKNBMCZAP | - |
| Poland | A1C3SOZRARQ6R3PL | - |
| Egypt | ARBP9OOSHTCHUEGT | - |
| Turkey | A33AVAJ2PDY3EVTR | - |
| Saudi Arabia | A17E79C6D8DWNPSA | - |
| United Arab Emirates | A2VIGQ35RCS4UGAE | - |
| India | A21TJRUUN4KGVIN | - |

#### Far East


| Country | Marketplace ID | Country Code |
|-----------------------------|----------------------------|--------------|
| Singapore | A19VAU5U5O7RUSSG | - |
| Australia | A39IBJ37TRP1C6AU | - |
| Japan | A1VC38T7YXB528JP | - |

## Key Concepts
- **Marketplace ID Usage:** When making requests to the SP-API, include the
relevant `marketplaceId` in your API call to specify the target marketplace for the
operation. This ensures that the data retrieved or posted pertains to the correct
geographical location and its regulations.
- **Country Codes:** Each marketplace ID has an associated country code which may
be useful for further regional identification.

### Important Notes for Developers


- Make sure to refer to the latest marketplace identifiers as they can be updated
periodically.
- Always validate that you are using the correct marketplace ID for the intended
operation to avoid issues with data access or results.
- The above marketplace IDs are crucial in requests involving product listings,
orders, reports, and other API interactions.

### Related API Functions


- While this page primarily focuses on the IDs, developers should ensure they
understand how to integrate these identifiers within their API workflows,
especially when utilizing methods that require specification of a marketplace.

This summary provides essential information for developers working with the Amazon
Selling Partner API related to marketplace IDs. Always refer to the full API
documentation for comprehensive details about making effective use of these
identifiers in your API calls.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/marketplace-


ids#content:
### Summary of Marketplace IDs in Amazon SP API

#### Important Concepts:


- **Marketplace ID**: A unique identifier for each marketplace in the Selling
Partner API (SP-API). It must be included in requests to specify the relevant
marketplace.

#### Marketplace IDs:


The following are the relevant marketplace IDs categorized by region:

**North America:**
| Country | Marketplace ID | Country Code |
|-----------------------|---------------------|--------------|
| Canada | A2EUQ1WTGCTBG2CA | CA |
| United States | ATVPDKIKX0DERUS | US |
| Mexico | A1AM78C64UM0Y8MX | MX |
| Brazil | A2Q3Y263D00KWCBR | BR |

**Europe:**
| Country | Marketplace ID | Country Code |
|---------------|---------------------|--------------|
| Spain | A1RKKUPIHCS9HSES | ES |
| United Kingdom | A1F83G8C2ARO7PUK | GB |
| France | A13V1IB3VIYZZHFR | FR |
| Belgium | AMEN7PMS3EDWLBEN | BE |
| Netherlands | A1805IZSGTT6HSNLG | NL |
| Germany | A1PA6795UKMFR9DE | DE |
| Italy | APJ6JRA9NG5V4ITS | IT |
| Sweden | A2NODRKZP88ZB9SE | SE |
| South Africa | AE08WJ6YKNBMCZAP | ZA |
| Poland | A1C3SOZRARQ6R3PL | PL |
| Egypt | ARBP9OOSHTCHUEGT | EG |
| Turkey | A33AVAJ2PDY3EVTR | TR |
| Saudi Arabia | A17E79C6D8DWNPSA | SA |
| United Arab Emirates | A2VIGQ35RCS4UGAE | AE |
| India | A21TJRUUN4KGVIN | IN |

**Far East:**
| Country | Marketplace ID | Country Code |
|-------------|---------------------|--------------|
| Singapore | A19VAU5U5O7RUSSG | SG |
| Australia | A39IBJ37TRP1C6AU | AU |
| Japan | A1VC38T7YXB528JP | JP |

#### Important Notes:


- Ensure the correct **Marketplace ID** is used for API requests to avoid errors.
- Keep this reference table handy for quick look-ups when developing applications
that interact with the SP-API.

#### Code Examples and API Snippets:


While the content does not provide code snippets directly related to Marketplace ID
usage, integration with SP-API generally follows RESTful conventions.

**Example API Request Structure (Pseudocode):**


```python
import requests

# Replace the placeholders with actual values


url = "https://sellingpartner.api.amazon.com/{api-endpoint}"
headers = {
"Authorization": "Bearer <your-access-token>",
"Content-Type": "application/json",
"x-amz-access-token": "<token>",
}

# Using the marketplace ID


payload = {
"marketplaceId": "ATVPDKIKX0DERUS", # Example for USA
# additional parameters...
}

response = requests.get(url, headers=headers, json=payload)


print(response.json())
```

This example demonstrates making an API call with the appropriate headers and
marketplace ID. Developers are encouraged to implement error checking and handle
various HTTP response statuses as part of their integration logic.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/marketplace-


ids#north-america:
### Summary of Amazon Selling Partner API Documentation on Marketplace IDs

#### Marketplace Identifiers


The marketplace identifiers are used in the Selling Partner API (SP-API) to
identify specific marketplaces within requests. Below are the marketplace IDs for
North America:

| Country | Marketplace ID | Country Code |


|--------------------------|---------------------------|--------------|
| Canada | A2EUQ1WTGCTBG2CA | CA |
| United States of America | ATVPDKIKX0DERUS | US |
| Mexico | A1AM78C64UM0Y8MX | MX |
| Brazil | A2Q3Y263D00KWCBR | BR |

#### Important Classes and API Snippets


This section does not contain explicit classes or method definitions specific to
the Marketplace IDs as this documentation primarily lists the IDs. However,
utilizing these IDs is fundamental when making API requests to ensure data is
sourced from the correct marketplace.

#### Key Concepts


1. **Marketplace ID Usage**:
- The `marketplaceId` parameter should always be included in requests to
correctly identify which marketplace the data should be retrieved from or posted
to.

2. **Country Code**:
- Each marketplace ID is paired with a country code, which may be necessary in
certain API calls or configurations.

3. **API Requests**:
- When making SP-API requests, ensure to include the relevant `marketplaceId` in
your parameters, especially for methods that operate on product listings, pricing,
and inventory management.

#### Important Notes


- **Authorization**: Ensure that your application is properly authorized to access
the data associated with the given marketplace IDs.
- **Error Handling**: Pay attention to potential errors related to incorrect or
unsupported marketplace IDs, as they could lead to failed API requests.
- **Updates**: These IDs may be subject to change; always refer to the current API
documentation for the most updated lists.
### Conclusion
This summary highlights the critical information regarding the Marketplace IDs
necessary for utilizing the Amazon SP APIs effectively. Ensure to familiarize
yourself with the proper IDs corresponding to your application’s requirements, and
follow good practices for API request formation.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/marketplace-


ids#europe:
### Summary of Amazon SP APIs - Marketplace IDs

#### Overview
Amazon's Selling Partner API (SP-API) offers interaction with a customer's selling
partner data, allowing developers to gather and post data to the selling account.
It supports various marketplaces, each identified by a unique `marketplaceId`.

#### Marketplace IDs


Marketplace IDs are essential for making requests in the respective marketplace.
Below is a list of marketplace IDs organized by region:

**North America**
- Canada: `A2EUQ1WTGCTBG2CA`
- United States: `ATVPDKIKX0DERUS`
- Mexico: `A1AM78C64UM0Y8MX`
- Brazil: `A2Q3Y263D00KWCBR`

**Europe**
- Spain: `A1RKKUPIHCS9HSES`
- United Kingdom: `A1F83G8C2ARO7PUK`
- France: `A13V1IB3VIYZZHFR`
- Belgium: `AMEN7PMS3EDWLBEN`
- Netherlands: `A1805IZSGTT6HSNLG`
- Germany: `A1PA6795UKMFR9DE`
- Italy: `APJ6JRA9NG5V4ITS`
- Sweden: `A2NODRKZP88ZB9SE`
- South Africa: `AE08WJ6YKNBMCZAP`
- Poland: `A1C3SOZRARQ6R3PLE`
- Egypt: `ARBP9OOSHTCHUEGT`
- Turkey: `A33AVAJ2PDY3EVTR`
- Saudi Arabia: `A17E79C6D8DWNPSA`
- United Arab Emirates: `A2VIGQ35RCS4UGAE`
- India: `A21TJRUUN4KGVIN`

**Far East**
- Singapore: `A19VAU5U5O7RUSSG`
- Australia: `A39IBJ37TRP1C6AU`
- Japan: `A1VC38T7YXB528JP`

#### Important Concepts


- **marketplaceId**: An identifier used to specify the marketplace in API requests.
Ensuring the correct marketplace ID is used for the respective region is crucial
for successful API calls.
- **SP-API**: A set of APIs that allow access to Amazon services for developers
wishing to build applications that work with Amazon selling data.

#### Usage Notes


- Ensure that you have the correct `marketplaceId` for the region you are working
with to avoid errors in API requests.
- Familiarize yourself with the different APIs (like Listings API, Orders API,
etc.) within SP-API for specific functionalities related to your application needs.

This summary provides essential details for developers looking to work with
Amazon's SP-API concerning marketplace IDs. Always refer to the API documentation
for updates and more detailed explanations.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/marketplace-ids#far-


east:
## Summary of Amazon Selling Partner API (SP-API) Marketplace IDs

### Overview:
The Amazon Selling Partner API (SP-API) provides developers the ability to gather
and post data to a customer’s selling partner account via an array of marketplace
identifiers (marketplaceIds). Each marketplace ID is crucial for making requests
through the API.

### Important Marketplace IDs:


The following table lists the marketplace IDs for various regions, which are used
when making requests to the SP-API.

#### North America:


| Country | Marketplace ID | Country Code |
|---------------------|-----------------------|--------------|
| Canada | A2EUQ1WTGCTBG2CA | CA |
| United States | ATVPDKIKX0DERUS | US |
| Mexico | A1AM78C64UM0Y8MX | MX |
| Brazil | A2Q3Y263D00KWCBR | BR |

#### Europe:
| Country | Marketplace ID | Country Code |
|---------------------|-----------------------|--------------|
| Spain | A1RKKUPIHCS9HSES | ES |
| United Kingdom | A1F83G8C2ARO7PUK | GB |
| France | A13V1IB3VIYZZHFR | FR |
| Belgium | AMEN7PMS3EDWLBEN | BE |
| Netherlands | A1805IZSGTT6HSNLG | NL |
| Germany | A1PA6795UKMFR9DE | DE |
| Italy | APJ6JRA9NG5V4ITS | IT |
| Sweden | A2NODRKZP88ZB9SE | SE |
| South Africa | AE08WJ6YKNBMCZAP | ZA |
| Poland | A1C3SOZRARQ6R3PL | PL |
| Egypt | ARBP9OOSHTCHUEGT | EG |
| Turkey | A33AVAJ2PDY3EVTR | TR |
| Saudi Arabia | A17E79C6D8DWNPSA | SA |
| United Arab Emirates | A2VIGQ35RCS4UGAE | AE |
| India | A21TJRUUN4KGVIN | IN |

#### Far East:


| Country | Marketplace ID | Country Code |
|---------------------|-----------------------|--------------|
| Singapore | A19VAU5U5O7RUSSG | SG |
| Australia | A39IBJ37TRP1C6AU | AU |
| Japan | A1VC38T7YXB528JP | JP |
### Key Concepts:
- **Marketplace ID**: This ID uniquely identifies a marketplace for making SP-API
requests. It is necessary to specify the correct marketplace ID when accessing
specific regions or countries.

### Important Notes:


- Ensure you always use the correct marketplace ID for your requests to avoid
errors.
- Marketplace IDs may be updated, so regularly check the Amazon SP-API
documentation for the most recent data.

### Additional Resources:


- For detailed information about specific API endpoints and their usage, refer to
the [API Reference](https://developer-docs.amazon.com/sp-api/docs/api-reference).
- Code snippets for accessing the API can be found in the [Code Samples section]
(https://developer-docs.amazon.com/sp-api/docs/code-samples), specifically for
Python, as mentioned in the user intent.

This summary encapsulates the essential information regarding Marketplace IDs


within the Amazon SP-API, which is crucial for developers integrating with Amazon's
selling partner system efficiently.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/tutorial-automate-


your-sp-api-calls-using-python-sdk:
## Summary: Automate Your SP-API Calls Using a Python SDK

This tutorial provides comprehensive guidance for developers to automate their


Amazon Selling Partner API (SP-API) calls using Python. It demonstrates how to set
up a Python SDK, authenticate successfully, and make API calls, particularly
focused on the Orders API.

### Prerequisites
To complete the tutorial, ensure you have the following:
- A hybrid or SP-API app in draft or published state
- Integrated Development Environment (IDE) (e.g., Visual Studio IDE)
- Python (version 3.6 or later)
- `swagger-codegen-cli` (version 2.3 or later)

### Steps Overview

1. **Set Up Your Workspace**


- Create a directory named `SPAPI_Python_SDK`.
- Clone the Selling Partner API models repository.
- Install the required Python library:
```bash
pip install backoff
```

2. **Generate a Python Client from Swagger Definitions**


- Locate the Swagger JSON file for the desired SP-API model.
- Run the following command:
```bash
java -jar /path_to_swagger_jar/swagger-codegen-cli.jar generate -l python -
t /path_to_mustach_resources/resources/ -D packageName=swagger_client -o
/path_to_client_folder/client/[SP-API_NAME] -i /path_to_model_folder/models/[SP-
API_NAME]/SP-API.json
```

3. **Integrate the Authentication Module**


- Update paths in `spapiclient.py` and `LwaRequest.py` to integrate
authentication.

4. **Set Up the Python SDK Package**


- Create a `setup.py` file in your SDK directory:
```python
from setuptools import setup, find_packages

setup(
name='SellingPartnerAPIAuthAndAuthPython',
version='1.0.0',
package_dir={'': 'src'},
packages=find_packages(where='src'),
install_requires=[line.strip() for line in open("requirements.txt", "r")],
description='A Python SDK for Amazon Selling Partner API',
long_description=open('README.md').read(),
long_description_content_type='text/markdown',
url='TBD'
)
```

5. **Create an Instance of the Orders API and Invoke an Operation**


- Use the generated SDK to make an API call:
```python
if __name__ == "__main__":
from auth.credentials import SPAPIConfig
from spapi.spapiclient import SPAPIClient

config = SPAPIConfig(
client_id="Your client-id",
client_secret="Your client-secret",
refresh_token="Your refresh-token",
region="NA",
scope=None
)

api_client = SPAPIClient(config)
marketplace_ids = ["ATVPDKIKX0DER"]
created_after = "2024-01-19T00:00:00"

orders_api = api_client.get_api_client('OrdersV0Api')
orders_response = orders_api.get_orders(marketplace_ids=marketplace_ids,
created_after=created_after)
print("Orders API Response:")
print(orders_response)
```

### Important Classes and Methods


- **`SPAPIClient`**: The main client class used to interact with the SP-API. You
can request various API clients using `get_api_client()`.
- **`SPAPIConfig`**: This class holds configuration details needed for SP-API
authentication including `client_id`, `client_secret`, and `refresh_token`.

### Key Concepts


- **OAuth 2.0 Authentication**: The SP-API uses Login with Amazon (LWA) for
authentication and requires the exchange of tokens.
- **Swagger Code Generation**: The Swagger definitions allow for the automatic
generation of client code specific to the API model used.

### Important Notes and Caveats


- **Sensitive Information**: Never commit your `client_id`, `client_secret`, or
`refresh_token` to version control systems. Use environment variables or secure
storage solutions.
- **Successful API Calls**: A status code of 200 indicates a successful API call.

### Conclusion
This tutorial guides users through creating a Python SDK for automating SP-API
calls, particularly to the Orders API, covering setup, configuration, and execution
of API requests. Follow the outlined steps to efficiently integrate and interact
with Amazon marketplace features within your applications.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/tutorial-automate-


your-sp-api-calls-using-python-sdk#tutorial:
# Summary: Automate Your SP-API Calls Using Python SDK

## Overview
This tutorial provides a comprehensive guide on how to automate calls to the Amazon
Selling Partner API (SP-API) using a Python SDK. It includes prerequisites, setup
instructions, and example code for interacting with the Orders API.

### Key Concepts


- **Selling Partner API (SP-API)**: An API framework that provides access to
features across Amazon's marketplaces, including order management, product
information, and shipment handling.
- **Swagger Codegen**: A tool used to generate client code from SP-API Swagger
definitions, facilitating the creation of SDKs.

## Prerequisites
Before starting, ensure you have:
- A hybrid or SP-API app in draft or published state.
- An integrated development environment (IDE) (e.g., Visual Studio).
- Python version 3.6 or later installed.
- Swagger Codegen CLI version 2.3 or later.

### Setup Instructions


1. **Create a Workspace**:
- Create a directory named `SPAPI_Python_SDK` on your local drive.
- Clone the necessary client repository and download the required tools:
```bash
git clone https://github.com/amzn/selling-partner-api-models
wget https://repo1.maven.org/maven2/io/swagger/swagger-codegen-cli/2.4.13/
swagger-codegen-cli-2.4.13.jar -O swagger-codegen-cli.jar
```

2. **Install Dependencies**:
Run the following command to install the backoff library:
```bash
pip install backoff
```

3. **Generate the Python client**:


Run the Swagger Codegen command. Replace placeholders with appropriate paths and
API model names:
```bash
java -jar /path/to/swagger-codegen-cli.jar generate -l python -t
/path/to/resources/ -D packageName=swagger_client -o /path/to/client/SP-API_NAME -i
/path/to/models/SP-API_NAME/SP-API.json
```

4. **Integrate Authentication Module**:


Update paths in `spapiclient.py` and `LwaRequest.py` found in the generated
code.

5. **Set Up the SDK Package**:


Create a `setup.py` file in `C:\\SPAPI_Python_SDK`:
```python
from setuptools import setup, find_packages

setup(
name='SellingPartnerAPIAuthAndAuthPython', # Update with your package's
name
version='1.0.0', # Update with your package's version
package_dir={'': 'src'},
packages=find_packages(where='src'),
install_requires=[line.strip() for line in open("requirements.txt", "r")],
description='A Python SDK for Amazon Selling Partner API',
long_description=open('README.md').read(),
long_description_content_type='text/markdown',
url='TBD'
)
```

6. **Create an Instance of the Orders API and Invoke an Operation**:


Example code to call the Orders API:
```python
if __name__ == "__main__":
from auth.credentials import SPAPIConfig
config = SPAPIConfig(
client_id="Your client-id",
client_secret="Your client-secret",
refresh_token="Your refresh-token",
region="NA",
scope=None
)
from spapi.spapiclient import SPAPIClient

api_client = SPAPIClient(config)
marketplace_ids = ["ATVPDKIKX0DER"]
created_after = "2024-01-19T00:00:00"

orders_api = api_client.get_api_client('OrdersV0Api')
orders_response = orders_api.get_orders(marketplace_ids=marketplace_ids,
created_after=created_after)
print("Orders API Response:", orders_response)
```

### Important Notes


- **Sensitive Information**: Never commit files with sensitive credentials (like
`client_secret` and `refresh_token`) to version control; secure them appropriately.
- **Status Codes**: A response status code of 200 indicates a successful API call.
### Conclusion
This tutorial guides you through setting up a Python SDK to automate SP-API calls.
Following these steps, you will integrate your application with the Amazon SP-API
effectively.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/tutorial-automate-


your-sp-api-calls-using-python-sdk#prerequisites:
# Summary: Automate Your SP-API Calls Using a Python SDK

## Overview
This tutorial provides guidance on automating Selling Partner API (SP-API) calls
using a Python SDK. It includes prerequisites, setup instructions, and code
snippets to assist developers in integrating Amazon marketplace features into their
applications.

## Prerequisites
1. **SP-API App**: Must be in draft or published state.
2. **IDE Software**: Development environment software installed.
3. **Python**: Version 3.6 or later.
4. **Swagger Codegen CLI**: Version 2.3 or later for generating Python client code
from the SP-API's Swagger definitions.

## Step-by-Step Guide

### Step 1: Set Up Your Workspace


1. Create a directory named `SPAPI_Python_SDK`.
2. Clone the client repository.
3. Download the required tools, specifically IDE software (e.g., Visual Studio) and
Python.
4. Run the command to download Swagger Codegen CLI:
```bash
wget https://repo1.maven.org/maven2/io/swagger/swagger-codegen-cli/2.4.13/
swagger-codegen-cli-2.4.13.jar -O swagger-codegen-cli.jar
```
5. Copy `swagger-codegen-cli.jar` to `C:\SPAPI_Python_SDK`.
6. Install the `backoff` library:
```bash
pip install backoff
```
7. Clone the selling-partner-api-models repository:
```bash
git clone https://github.com/amzn/selling-partner-api-models
```

### Step 2: Generate a Python Client from Swagger Definitions


1. Locate the Swagger JSON file for the desired SP-API model (e.g., Orders API).
2. Run the following command to generate client code (update paths accordingly):
```bash
java -jar /[path_to_swagger_jar]/swagger-codegen-cli.jar generate \
-l python \
-t /[path_to_mustach_resources]/resources/ \
-D packageName=swagger_client \
-o /[path_to_client_folder]/client/[SP-API_NAME] \
-i /[path_to_model_folder]/models/[SP-API_NAME]/SP-API.json
```
### Step 3: Integrate the Authentication Module
1. Update paths in `spapiclient.py` and `LwaRequest.py` found in `C:\
SPAPI_Python_SDK`.

### Step 4: Set Up the Python SDK Package


1. Create a `setup.py` with the following content (update as necessary):
```python
from setuptools import setup, find_packages

setup(
name='SellingPartnerAPIAuthAndAuthPython',
version='1.0.0',
package_dir={'': 'src'},
packages=find_packages(where='src'),
install_requires=[line.strip() for line in open("requirements.txt", "r")],
description='A Python SDK for Amazon Selling Partner API',
long_description=open('README.md').read(),
long_description_content_type='text/markdown',
url='TBD'
)
```

### Step 5: Create an Instance of the Orders API and Invoke an Operation
Use the following sample code to make a `getOrders` request:
```python
if __name__ == "__main__":
from auth.credentials import SPAPIConfig

config = SPAPIConfig(
client_id="Your client-id",
client_secret="Your client-secret",
refresh_token="Your refresh-token",
region="NA", # Options: NA, EU, FE, SANDBOX
scope = None # Use for grant_type='client_credentials'
)

from spapi.spapiclient import SPAPIClient

api_client = SPAPIClient(config)

marketplace_ids = ["ATVPDKIKX0DER"]
created_after = "2024-01-19T00:00:00"

orders_api = api_client.get_api_client('OrdersV0Api')
orders_response = orders_api.get_orders(marketplace_ids=marketplace_ids,
created_after=created_after)
print("Orders API Response:")
print(orders_response)
```

**Note**: Secure sensitive information, such as LWA credentials, and avoid


committing them to version control.

### Step 6: Connect to the Selling Partner API Using the Generated Python SDK
1. Build and install your SDK locally:
```bash
python3 setup.py sdist bdist_wheel
pip install dist/{YourPackageName}-1.0.0-py3-none-any.whl
```
2. Run a test script to validate the installation:
```bash
python test.py
```

## Important Notes
- Successful API calls return a status code of 200.
- Ensure that LWA credentials are stored securely and not exposed.

## Conclusion
This guide covers the complete setup and execution process for automating SP-API
calls using a Python SDK. The process involves setting up the development
environment, generating client code, handling authentication, and invoking API
operations.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/tutorial-automate-


your-sp-api-calls-using-python-sdk#step-1-set-up-your-workspace:
# Summary of Automating SP-API Calls Using Python SDK

## Overview
This tutorial provides a step-by-step guide to automate calls to the Amazon Selling
Partner API (SP-API) using a Python SDK. It covers setting up your local workspace,
generating the SDK, and invoking API operations such as retrieving orders.

## Prerequisites
Before proceeding, ensure you have the following:
- A hybrid or SP-API app in draft or published state.
- An Integrated Development Environment (IDE) (e.g., Visual Studio).
- Python version 3.6 or later.
- The `swagger-codegen-cli` (version 2.3 or later) for generating client code.

## Step-by-Step Guide

### Step 1: Set Up Your Workspace


1. **Create a directory** for the project:
```bash
mkdir SPAPI_Python_SDK
cd SPAPI_Python_SDK
```

2. **Clone the client repository** and download necessary tools:


```bash
git clone https://github.com/amzn/selling-partner-api-models
wget https://repo1.maven.org/maven2/io/swagger/swagger-codegen-cli/2.4.13/
swagger-codegen-cli-2.4.13.jar -O swagger-codegen-cli.jar
```

3. **Install the backoff library**:


```bash
pip install backoff
```

### Step 2: Generate a Python Client from Swagger Definitions


To generate the Python client code:
```bash
java -jar /path_to_swagger_jar/swagger-codegen-cli.jar generate -l python -t
/path_to_mustach_resources/resources/ -D packageName=swagger_client -o
/path_to_client_folder/client/SP-API_NAME -i /path_to_model_folder/models/SP-
API_NAME/SP-API.json
```

### Step 3: Integrate the Authentication Module


Update paths in the `spapiclient.py` and `LwaRequest.py` files located in the SDK
folder to enable authentication.

### Step 4: Set Up the Python SDK Package


Create a `setup.py` file for your SDK package:
```python
from setuptools import setup, find_packages

setup(
name='SellingPartnerAPIAuthAndAuthPython',
version='1.0.0',
package_dir={'': 'src'},
packages=find_packages(where='src'),
install_requires=[line.strip() for line in open("requirements.txt", "r")],
description='A Python SDK for Amazon Selling Partner API',
long_description=open('README.md').read(),
long_description_content_type='text/markdown',
url='TBD'
)
```

### Step 5: Create an Instance of the Orders API and Invoke an Operation
Example code for using the Python SDK with the Orders API:
```python
if __name__ == "__main__":
from auth.credentials import SPAPIConfig
config = SPAPIConfig(
client_id="Your client-id",
client_secret="Your client-secret",
refresh_token="Your refresh-token",
region="NA", # Possible values NA, EU, FE, and SANDBOX
scope=None # Required for grant_type='client_credentials'
)

from spapi.spapiclient import SPAPIClient

# Create the API Client


print("Config and client initialized...")
api_client = SPAPIClient(config)

marketplace_ids = ["ATVPDKIKX0DER"]
created_after = "2024-01-19T00:00:00"

orders_api = api_client.get_api_client('OrdersV0Api')
orders_response = orders_api.get_orders(marketplace_ids=marketplace_ids,
created_after=created_after)
print("Orders API Response:")
print(orders_response)
```
**Important Note**: Never commit sensitive information like LWA credentials to
version control. Securely store credentials in an encrypted format.
### Step 6: Connect to the Selling Partner API Using the Generated Python SDK
1. Build and install your SDK:
```bash
python3 setup.py sdist bdist_wheel
pip install dist/{YourPackageName}-1.0.0-py3-none-any.whl
```

2. Test the SDK:


```bash
python test.py
```

## Conclusion
This tutorial guides you through the setup and integration of a Python SDK for
automating calls to the Amazon SP-API. By following these steps, you can
effectively manage orders and access product information through the SP-API. Make
sure to handle your API credentials securely to protect sensitive information.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/tutorial-automate-


your-sp-api-calls-using-python-sdk#step-2-generate-a-python-client-from-swagger-
definitions:
### Summary: Automate SP-API Calls Using a Python SDK

This tutorial guides you through the process of automating your Selling Partner API
(SP-API) calls with a Python SDK. It focuses on generating a Python client using
Swagger definitions and connecting to the SP-API.

#### Key Concepts:

- **Selling Partner API (SP-API)**: A set of APIs that allows integrations with
Amazon marketplace features, such as product information, order management, and
shipment handling.

- **Login with Amazon (LWA)**: An authentication system to access API resources.

#### Prerequisites:

- A hybrid or SP-API app in either draft or published state.


- An Integrated Development Environment (IDE) (e.g., Visual Studio).
- Python (version 3.6 or later).
- `swagger-codegen-cli-2.4.13.jar` for generating Python client code.

#### Tutorial Steps:

1. **Set Up Your Workspace**:


- Create a directory (e.g., `SPAPI_Python_SDK`).
- Clone the selling-partner-api-models repository.
- Download the Swagger code generator and move it to your project directory.
- Install the required Python library:
```bash
pip install backoff
```

2. **Generate a Python Client from Swagger Definitions**:


- Locate the Swagger JSON file for the desired SP-API model (e.g., Orders API).
- Run the following command to generate client code:
```bash
java -jar swagger-codegen-cli.jar generate -l python -t
/path_to_mustach_resources/ -D packageName=swagger_client -o
/path_to_client_folder/client/SP-API_NAME -i /path_to_model_folder/models/SP-
API_NAME/SP-API.json
```

3. **Integrate the Authentication Module**:


- Modify the paths in the files `spapiclient.py` and `LwaRequest.py` to include
authentication setup.

4. **Set Up the Python SDK Package**:


- Create a `setup.py` file in your SDK directory:
```python
from setuptools import setup, find_packages

setup(
name='SellingPartnerAPIAuthAndAuthPython',
version='1.0.0',
package_dir={'': 'src'},
packages=find_packages(where='src'),
install_requires=[line.strip() for line in open("requirements.txt", "r")],
description='A Python SDK for Amazon Selling Partner API',
long_description=open('README.md').read(),
long_description_content_type='text/markdown',
url='TBD'
)
```

5. **Create an Instance of the Orders API and Invoke an Operation**:


- Use the following code to make a request to the Orders API:
```python
if __name__ == "__main__":
from auth.credentials import SPAPIConfig
config = SPAPIConfig(
client_id="Your client-id",
client_secret="Your client-secret",
refresh_token="Your refresh-token",
region="NA", # Options: NA, EU, FE, and SANDBOX
scope=None # Required for grant_type='client_credentials'
)

from spapi.spapiclient import SPAPIClient


api_client = SPAPIClient(config)

marketplace_ids = ["ATVPDKIKX0DER"]
created_after = "2024-01-19T00:00:00"

orders_api = api_client.get_api_client('OrdersV0Api')
orders_response = orders_api.get_orders(marketplace_ids=marketplace_ids,
created_after=created_after)
print("Orders API Response:", orders_response)
```
- **Note**: Do not commit files containing sensitive information (e.g., LWA
credentials).

6. **Connect to the Selling Partner API**:


- Build and install your SDK locally:
```bash
python3 setup.py sdist bdist_wheel
pip install dist/{YourPackageName}-1.0.0-py3-none-any.whl
```

- Run your test script to validate the SDK setup:


```bash
python test.py
```
- A status code of 200 indicates a successful API call.

#### Important Notes:

- Ensure that proper permissions are set when requesting access to the Selling
Partner API.
- The generated SDK allows for integration with various Amazon Marketplace
features, but authentication setup is essential for functionality.
- Always keep sensitive information regarding credentials secure and encrypted.

This summary should provide a developer with a comprehensive guide on how to set up
and use the Python SDK for interacting with the Amazon SP-API.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/tutorial-automate-


your-sp-api-calls-using-python-sdk#step-3-integrate-the-authentication-module:
# Summary of the Tutorial: Automate Your SP-API Calls Using a Python SDK

## Overview
This tutorial guides developers to automate their Selling Partner API (SP-API)
calls using a Python SDK. It covers prerequisites, setup, SDK generation, and
making API calls, specifically focusing on the Orders API.

## Prerequisites
To follow the tutorial, you need:
- A hybrid or SP-API app in draft or published state.
- An Integrated Development Environment (IDE) like Visual Studio.
- Python 3.6 or later installed.
- Swagger Codegen CLI (version 2.4.13 or later) for client code generation.

## Steps

### Step 1: Set Up Your Workspace


1. Create a directory called `SPAPI_Python_SDK`.
2. Clone the client repository and download necessary tools:
```bash
wget https://repo1.maven.org/maven2/io/swagger/swagger-codegen-cli/2.4.13/
swagger-codegen-cli-2.4.13.jar -O swagger-codegen-cli.jar
```
3. Install the Python backoff library:
```bash
pip install backoff
```
4. Clone the models from GitHub:
```bash
git clone https://github.com/amzn/selling-partner-api-models
```

### Step 2: Generate a Python Client from Swagger Definitions


- Locate the Swagger JSON file for the desired API model (e.g., Orders API) and
run:
```bash
java -jar /path_to_swagger_jar/swagger-codegen-cli.jar generate -l python -t
/path_to_mustach_resources/resources/ -D packageName=swagger_client -o
/path_to_client_folder/client/OrdersAPI -i
/path_to_model_folder/models/OrdersAPI/SP-API.json
```

### Step 3: Integrate the Authentication Module


- Update paths in files:
- `spapiclient.py`
- `LwaRequest.py`

### Step 4: Set Up the Python SDK Package


- Create a `setup.py` file with the following content:
```python
from setuptools import setup, find_packages

setup(
name='SellingPartnerAPIAuthAndAuthPython', # Your package's name
version='1.0.0', # Your package's version
package_dir={'': 'src'}, # Adjust 'src' as necessary
packages=find_packages(where='src'),
install_requires=[line.strip() for line in open("requirements.txt", "r")],
description='A Python SDK for Amazon Selling Partner API',
long_description=open('README.md').read(),
long_description_content_type='text/markdown',
url='TBD'
)
```

### Step 5: Create an Instance of the Orders API and Invoke an Operation
- Use the following code snippet to create an instance of the Orders API:
```python
if __name__ == "__main__":
from auth.credentials import SPAPIConfig
config = SPAPIConfig(
client_id="Your client-id",
client_secret="Your client-secret",
refresh_token="Your refresh-token",
region="NA", # Region options: NA, EU, FE, SANDBOX
scope = None # For grant_type='client_credentials'; Possible values:
"sellingpartnerapi::notifications", "sellingpartnerapi::migration"
)

from spapi.spapiclient import SPAPIClient


api_client = SPAPIClient(config)

marketplace_ids = ["ATVPDKIKX0DER"]
created_after = "2024-01-19T00:00:00"

orders_api = api_client.get_api_client('OrdersV0Api')
orders_response = orders_api.get_orders(marketplace_ids=marketplace_ids,
created_after=created_after)
print("Orders API Response:")
print(orders_response)
```
### Step 6: Connect to the Selling Partner API
- Build and install your SDK:
```bash
python3 setup.py sdist bdist_wheel
pip install dist/{YourPackageName}-1.0.0-py3-none-any.whl
```
- Run a test script:
```bash
python test.py
```

## Important Notes
- Always keep your LWA credentials secure and never commit sensitive files to
version control.
- A response with a status code of 200 indicates a successful API call.

## Conclusion
This tutorial provides the foundational steps needed to automate SP-API calls with
a Python SDK, setting up the workspace, generating SDK, and making calls to the
Orders API. Follow each step carefully for successful implementation.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/tutorial-automate-


your-sp-api-calls-using-python-sdk#step-4-set-up-the-python-sdk-package:
### Summary of the Tutorial: Automate Your SP-API Calls Using a Python SDK

This tutorial provides a comprehensive guide on setting up a Python SDK to automate


calls to the Amazon Selling Partner API (SP-API). It covers prerequisites,
workspace setup, client generation, and executing API requests.

#### Key Concepts

- **Python SDK**: A library to facilitate API interaction using Python. This SDK
enables integration with various Amazon marketplace features like product
information access, order management, and shipment handling.

- **LWA (Login with Amazon)**: An authentication method required for accessing the
SP-API.

#### Prerequisites

Before starting, ensure you have:


- A hybrid or SP-API app in draft or published state.
- An Integrated Development Environment (IDE) (e.g., Visual Studio).
- Python (version 3.6 or later).
- `swagger-codegen-cli-2.3` (or later) for generating client code.

#### Steps to Set Up Python SDK

##### Step 1: Set Up Your Workspace


- Create a new directory: `SPAPI_Python_SDK`.
- Clone the client repository for SP-API models:
```bash
git clone https://github.com/amzn/selling-partner-api-models
```
- Download Swagger CodeGen:
```bash
wget https://repo1.maven.org/maven2/io/swagger/swagger-codegen-cli/2.4.13/
swagger-codegen-cli-2.4.13.jar -O swagger-codegen-cli.jar
```
- Install the Python backoff library:
```bash
pip install backoff
```

##### Step 2: Generate a Python Client


Run the following command with the appropriate paths:
```bash
java -jar /[path_to_swagger_jar]/swagger-codegen-cli.jar generate -l python -t
/[path_to_mustach_resources]/resources/ -D packageName=swagger_client -o
/[path_to_client_folder]/client/[SP-API_NAME] -i
/[path_to_model_folder]/models/[SP-API_NAME]/SP-API.json
```

##### Step 3: Integrate the Authentication Module


1. Locate the `auth` and `spapi` client code folders.
2. Update the paths in `spapiclient.py` and `LwaRequest.py` as indicated in the
files.

##### Step 4: Set Up the Python SDK Package


Create a `setup.py` file within the SPAPI_Python_SDK directory:
```python
from setuptools import setup, find_packages

setup(
name='SellingPartnerAPIAuthAndAuthPython', # Package name
version='1.0.0', # Package version
package_dir={'': 'src'}, # Source directory
packages=find_packages(where='src'),
install_requires=[line.strip() for line in open("requirements.txt", "r")],
description='A Python SDK for Amazon Selling Partner API',
long_description=open('README.md').read(),
long_description_content_type='text/markdown',
url='TBD'
)
```

##### Step 5: Create an Instance of the Orders API


Here's an example of how to use the SDK to make an API call to retrieve orders:
```python
if __name__ == "__main__":
from auth.credentials import SPAPIConfig
config = SPAPIConfig(
client_id="Your client-id",
client_secret="Your client-secret",
refresh_token="Your refresh-token",
region="NA", # Possible values: NA, EU, FE, SANDBOX
scope=None # Required for 'client_credentials'; Possible values:
"sellingpartnerapi::notifications", "sellingpartnerapi::migration"
)

from spapi.spapiclient import SPAPIClient

api_client = SPAPIClient(config)

marketplace_ids = ["ATVPDKIKX0DER"]
created_after = "2024-01-19T00:00:00"

orders_api = api_client.get_api_client('OrdersV0Api')
orders_response = orders_api.get_orders(marketplace_ids=marketplace_ids,
created_after=created_after)
print("Orders API Response:")
print(orders_response)
```

**Caution**: Never commit sensitive files like those containing LWA credentials to
version control. Securely store credentials in an encrypted format.

##### Step 6: Build and Install Your SDK


To build and install the SDK locally, run:
```bash
python3 setup.py sdist bdist_wheel
pip install dist/{YourPackageName}-1.0.0-py3-none-any.whl
```

### Conclusion
This tutorial guides you through automating SP-API calls using a Python SDK. You
learned how to set up your workspace, generate the required client for SP-API,
integrate authentication, create an Orders API instance, and test the setup
effectively.

#### Important Notes


- Ensure to replace placeholders with actual values in code snippets.
- A status code of `200` indicates successful API calls.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/tutorial-automate-


your-sp-api-calls-using-python-sdk#step-5-create-an-instance-of-the-orders-api-and-
invoke-an-operation:
# Summary of the Tutorial: Automate Your SP-API Calls Using a Python SDK

## Overview
This tutorial guides developers in setting up a Python SDK to automate calls to the
Amazon Selling Partner API (SP-API). It covers prerequisites, workspace setup, SDK
generation, authentication integration, and a practical example of invoking API
requests.

### Key Concepts


- **SP-API**: A set of APIs that allow developers to access Amazon marketplace
features, such as product information, order management, and shipment handling.
- **Authentication with LWA (Login with Amazon)**: Necessary for securely accessing
SP-API resources.

## Prerequisites
Before you start, ensure you have:
- A hybrid or SP-API app in draft or published state.
- An Integrated Development Environment (IDE), such as Visual Studio.
- Python (version 3.6 or later) installed.
- Swagger Codegen CLI (version 2.3 or later) to generate Python SDK from SP-API's
Swagger definitions.

## Step-by-Step Instructions
### Step 1: Set Up Your Workspace
1. Create a directory for this project, e.g., `SPAPI_Python_SDK`.
2. Clone the client repository and download necessary tools.
3. Run the commands in your terminal:
```bash
wget https://repo1.maven.org/maven2/io/swagger/swagger-codegen-cli/2.4.13/
swagger-codegen-cli-2.4.13.jar -O swagger-codegen-cli.jar
cp swagger-codegen-cli.jar C:\\SPAPI_Python_SDK
pip install backoff
git clone https://github.com/amzn/selling-partner-api-models
```

### Step 2: Generate a Python Client from Swagger Definitions


1. Locate the Swagger JSON file for the SP-API model (e.g., Orders API) in your
local directory.
2. Run the command to generate the client code (replace paths accordingly):
```bash
java -jar /[path_to_swagger_jar]/swagger-codegen-cli.jar generate -l python -
t /[path_to_mustach_resources]/resources/ -D packageName=swagger_client -o
/[path_to_client_folder]/client/[SP-API_NAME] -i
/[path_to_model_folder]/models/[SP-API_NAME]/SP-API.json
```

### Step 3: Integrate the Authentication Module


1. Update paths in `spapiclient.py` and `LwaRequest.py` in your Python directory
for authentication.

### Step 4: Set Up the Python SDK Package


1. Create a `setup.py` file in `C:\\SPAPI_Python_SDK` directory:
```python
from setuptools import setup, find_packages

setup(
name='SellingPartnerAPIAuthAndAuthPython', # Package name
version='1.0.0', # Package version
package_dir={'': 'src'}, # Source directory
packages=find_packages(where='src'),
install_requires=[line.strip() for line in open("requirements.txt", "r")],
description='A Python SDK for Amazon Selling Partner API',
long_description=open('README.md').read(),
long_description_content_type='text/markdown',
url='TBD' # URL of your package
)
```

### Step 5: Create an Instance of the Orders API and Invoke an Operation
Example code to make a `getOrders` request:
```python
if __name__ == "__main__":
from auth.credentials import SPAPIConfig
config = SPAPIConfig(
client_id="Your client-id",
client_secret="Your client-secret",
refresh_token="Your refresh-token",
region="NA", # Possible values: NA, EU, FE, and SANDBOX
scope=None # Required for grant_type='client_credentials'
)

from spapi.spapiclient import SPAPIClient


# Create the API Client
api_client = SPAPIClient(config)

marketplace_ids = ["ATVPDKIKX0DER"]
created_after = "2024-01-19T00:00:00"

orders_api = api_client.get_api_client('OrdersV0Api')
orders_response = orders_api.get_orders(marketplace_ids=marketplace_ids,
created_after=created_after)
print("Orders API Response:")
print(orders_response)
```

### Important Notes/Caveats


- **Sensitive Information**: Never commit sensitive files that include LWA
credentials to version control. Store them securely, preferably in an encrypted
format.
- **Status Codes**: A status code of `200` indicates a successful API call.

### Conclusion
By following this tutorial, you will have set up a Python SDK for automating your
SP-API calls, including making requests to the Orders API.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/tutorial-automate-


your-sp-api-calls-using-python-sdk#step-6-connect-to-the-selling-partner-api-using-
the-generated-python-sdk:
## Summary: Tutorial for Automating SP-API Calls Using a Python SDK

This tutorial guides you through automating calls to the Amazon Selling Partner API
(SP-API) using a Python SDK. The following sections highlight prerequisites, setup
instructions, code examples, important classes, functions, and guidelines.

### Prerequisites
To follow this tutorial, ensure you have:
- A hybrid or SP-API application in a draft or published state.
- Integrated Development Environment (IDE) software (e.g., Visual Studio).
- Python (version 3.6 or later).
- `swagger-codegen-cli-2.3` or later for generating Python client code from Swagger
definitions.

### Steps to Set Up the Python SDK

#### Step 1: Set Up Your Workspace


1. Create a project directory: `SPAPI_Python_SDK`.
2. Clone the client repository and download necessary tools:
- Command to download Swagger Code Jar:
```bash
wget https://repo1.maven.org/maven2/io/swagger/swagger-codegen-cli/2.4.13/
swagger-codegen-cli-2.4.13.jar -O swagger-codegen-cli.jar
```
- Copy `swagger-codegen-cli.jar` to your local directory `C:\SPAPI_Python_SDK`.
- Install the `backoff` library:
```bash
pip install backoff
```
- Clone the selling-partner-api-models repository:
```bash
git clone https://github.com/amzn/selling-partner-api-models
```

#### Step 2: Generate a Python Client from Swagger Definitions


1. Locate the Swagger JSON file for the SP-API model (e.g., Orders API).
2. Execute the following command to generate client code (update paths
accordingly):
```bash
java -jar /[path_to_swagger_jar]/swagger-codegen-cli.jar generate -l python -
t /[path_to_mustach_resources]/resources/ -D packageName=swagger_client -o
/[path_to_client_folder]/client/[SP-API_NAME] -i
/[path_to_model_folder]/models/[SP-API_NAME]/SP-API.json
```

#### Step 3: Integrate the Authentication Module


- Locate the `auth` and `spapi` client code folders and update the paths in
`spapiclient.py` and `LwaRequest.py`.

#### Step 4: Set Up the Python SDK Package


- Create a `setup.py` file in `C:\SPAPI_Python_SDK` with the following example
structure (update as necessary):
```python
from setuptools import setup, find_packages

setup(
name='SellingPartnerAPIAuthAndAuthPython',
version='1.0.0',
package_dir={'': 'src'},
packages=find_packages(where='src'),
install_requires=[line.strip() for line in open("requirements.txt", "r")],
description='A Python SDK for Amazon Selling Partner API',
long_description=open('README.md').read(),
long_description_content_type='text/markdown',
url='TBD'
)
```

#### Step 5: Create an Instance of the Orders API and Invoke an Operation
Here’s a code snippet to initialize the Orders API:
```python
if __name__ == "__main__":
from auth.credentials import SPAPIConfig
config = SPAPIConfig(
client_id="Your client-id",
client_secret="Your client-secret",
refresh_token="Your refresh-token",
region="NA", # Options: NA, EU, FE, SANDBOX
scope="sellingpartnerapi::notifications"
)

from spapi.spapiclient import SPAPIClient

# Create the API Client


api_client = SPAPIClient(config)

marketplace_ids = ["ATVPDKIKX0DER"]
created_after = "2024-01-19T00:00:00"
orders_api = api_client.get_api_client('OrdersV0Api')
orders_response = orders_api.get_orders(marketplace_ids=marketplace_ids,
created_after=created_after)
print("Orders API Response:")
print(orders_response)
```

### Important Notes


- Never commit sensitive information like LWA credentials to version control. Store
them securely in encrypted formats.
- A successful API call will return a status code of `200`.

### Conclusion
This tutorial has covered the necessary steps to set up a Python SDK for automating
SP-API calls, including the integration of authentication and creating an instance
of the Orders API. Use the provided code snippets to facilitate the implementation
of SP-API functionality in your applications.
_____________________________

Summary of URL: https://developer-docs.amazon.com/sp-api/docs/tutorial-automate-


your-sp-api-calls-using-python-sdk#conclusion:
# Summary: Automate Your SP-API Calls Using a Python SDK

## Overview
This tutorial explains how to set up a Python SDK for automating calls to the
Amazon Selling Partner API (SP-API). It covers prerequisites, workspace setup, SDK
generation, authentication integration, and making a sample API call.

## Prerequisites
- **Hybrid or SP-API App**: Must be in draft or published state.
- **IDE Software**: Installation of an Integrated Development Environment (IDE).
- **Python**: Version 3.6 or later.
- **Swagger Codegen**: Version 2.3 or later, used to generate Python client code.

## Steps

### Step 1: Set Up Your Workspace


1. Create a directory named `SPAPI_Python_SDK` on your local drive.
2. Clone the client repository and download necessary tools.
3. Install the backoff library using:
```bash
pip install backoff
```
4. Download the Swagger Codegen CLI:
```bash
wget https://repo1.maven.org/maven2/io/swagger/swagger-codegen-cli/2.4.13/
swagger-codegen-cli-2.4.13.jar -O swagger-codegen-cli.jar
```
5. Copy `swagger-codegen-cli.jar` into `C:\SPAPI_Python_SDK`.

### Step 2: Generate a Python Client from Swagger Definitions


1. Locate the Swagger JSON file for the SP-API model (e.g., Orders API).
2. Execute the command to generate client code, replacing appropriate paths and API
names:
```bash
java -jar /[path_to_swagger_jar]/swagger-codegen-cli.jar generate -l python -
t /[path_to_mustach_resources]/resources/ -D packageName=swagger_client -o
/[path_to_client_folder]/client/[SP-API_NAME] -i
/[path_to_model_folder]/models/[SP-API_NAME]/SP-API.json
```

### Step 3: Integrate the Authentication Module


1. Locate the `auth` and `spapi` client code folders.
2. Update paths in `spapiclient.py` and `LwaRequest.py` as specified in the files.

### Step 4: Set Up the Python SDK Package


Create a `setup.py` file in `C:\SPAPI_Python_SDK`:
```python
from setuptools import setup, find_packages

setup(
name='SellingPartnerAPIAuthAndAuthPython', # Your package's name
version='1.0.0', # Your package's version
package_dir={'': 'src'}, # Adjust as necessary
packages=find_packages(where='src'),
install_requires=[line.strip() for line in open("requirements.txt", "r")],
description='A Python SDK for Amazon Selling Partner API',
long_description=open('README.md').read(),
long_description_content_type='text/markdown',
url='TBD' # Update URL if needed
)
```

### Step 5: Create an Instance of the Orders API and Invoke an Operation
Example code to make a `getOrders` request:
```python
if __name__ == "__main__":
from auth.credentials import SPAPIConfig
config = SPAPIConfig(
client_id="Your client-id",
client_secret="Your client-secret",
refresh_token="Your refresh-token",
region="NA", # NA, EU, FE, SANDBOX
scope=None # e.g., "sellingpartnerapi::notifications"
)

from spapi.spapiclient import SPAPIClient

api_client = SPAPIClient(config)
marketplace_ids = ["ATVPDKIKX0DER"]
created_after = "2024-01-19T00:00:00"

orders_api = api_client.get_api_client('OrdersV0Api')
orders_response = orders_api.get_orders(marketplace_ids=marketplace_ids,
created_after=created_after)
print("Orders API Response:")
print(orders_response)
```
**Caution**: Don't commit sensitive information (like LWA credentials) to version
control.

### Step 6: Connect to the SP-API Using the Generated Python SDK
To build and install the SDK locally:
```bash
python3 setup.py sdist bdist_wheel
pip install dist/{YourPackageName}-1.0.0-py3-none-any.whl
```
Run the test script:
```bash
python test.py
```

## Key Concepts
- **Authentication Module**: Integrates LWA (Login with Amazon) credentials needed
for API access.
- **Generating SDK**: Uses Swagger definitions to create a customer-specific SDK
for the API model.
- **API Client Configuration**: Instantiates and configures the API client to make
requests.

## Important Notes
- Ensure LWA credentials are stored securely and not included in version control.
- Monitor response codes; a status code of **200** indicates a successful request.

This summary provides a complete overview of setting up and using the Amazon SP-API
with Python. Follow the outlined steps to automate API calls effectively.
_____________________________

You might also like