Optimize Calls to the Selling Partner API

Build efficient Selling Partner API integrations through optimized request patterns.

This topic outlines strategies to optimize your retrieval (GET API) call patterns and build efficient, cost-effective Selling Partner API (SP-API) integrations. Whether you're enhancing existing integrations or building new SP-API applications, these best practices help you create an optimized solution that serves both you and your users effectively.

Use batch and bulk operations

The SP-API offers multiple options to optimize your GET API usage through batch and bulk operations, which can significantly reduce the number of individual API calls that your integration requires.

Batch operations

The SP-API provides batch operations that enable you to perform multiple requests in a single API call. Instead of making individual calls, you can bundle up to 20 requests. The SP-API currently supports batch operations for the following functionality:

Bulk download

For larger datasets, you can download bulk data efficiently by using the Reports API or the Data Kiosk API. These APIs provide comprehensive data in fewer requests, which reduces your total API usage.

The Reports API offers extensive reporting capabilities for various business use cases, including inventory monitoring, order fulfillment tracking, tax information retrieval, returns and seller performance tracking, and Fulfillment by Amazon (FBA). For information about Reports API operations, data types, and schemas, refer to the Reports API reference. For available report types, refer to Report Type Values.

The Data Kiosk API leverages GraphQL query operations for dynamic reporting capabilities. With GraphQL, you can request and receive the data that you need in a single request. The GraphQL-based dynamic reporting suite enables you to create custom queries to access bulk data from Amazon datasets efficiently. For available datasets, refer to the Data Kiosk Schema Explorer.

Implement event-driven architectures

The SP-API provides the Notifications API, which you can use to build an event-driven architecture. Instead of continuously polling for information, your application can receive updates directly from Amazon when specific events occur. The use cases covered by the different notification types range from listing status changes, order updates, and fee promotion activations, to report processing completion and product definition changes.

Event-driven architectures enable you to:

  • Automatically trigger actions when specific conditions are met.
  • Respond to business events in real-time.
  • Optimize call patterns and reduce API requests.

With the Notifications API, you can:

  • Create destinations to receive notifications.
  • Subscribe to and manage notification subscriptions.
  • Perform actions based on specific conditions
  • Choose between Amazon Simple Queue Service (Amazon SQS) or Amazon EventBridge workflows.

For more information, refer to the use case guides within the Notifications API section.

Reduce error rates

To reduce unnecessary requests and improve efficiency, minimize client-side errors in your API calls. A robust error monitoring system that checks HTTP status codes in API responses helps identify and resolve issues promptly. When you receive HTTP status codes in the 4xx range, your request was invalid or couldn't be processed due to client-side issues. You can get a consolidated view of your client-side errors on the API usage metrics dashboard in Solution Provider Portal. For details, refer to API Usage Metrics in Solution Provider Portal. You can significantly reduce client-side errors by implementing proper error-handling strategies.

Common 4xx error codes include:

  • 400 Bad Request: The server didn't process your request because your request didn't comply with the API specification. For example, the request might have missed required parameters. For detailed guidance on how to resolve 400 errors, refer to Resolve 400 Errors.
  • 403 Forbidden: The server didn't process your request because you aren't authenticated and/or authorized to call this operation. For example, your request lacks a valid access token, uses expired credentials, or your account doesn't have the required Role for the requested operation.
  • 404 Not Found: The server didn't process your request because the requested resource doesn't exist. To learn how to resolve unauthorized errors, refer to Unauthorized error messages.
  • 429 Too Many Requests: The server didn't process your request because you sent too many requests in a given amount of time. For guidance on rate limiting, refer to Optimize Rate Limits for Application Workloads.

For comprehensive guidance on error-handling strategies and resolution steps for specific error types, refer to the SP-API Developer University video Error Handling Best Practices for Selling Partner API.

Use efficient data refresh mechanisms

To efficiently use the SP-API and ensure that your application has access to current information, optimize your data refresh strategy. A well-designed refresh mechanism can significantly reduce your GET API calls, improve response times, and provide better service to your selling partners. The following key strategies help you implement efficient data refresh patterns:

  • Event-driven data retrieval: Use notifications to trigger data updates instead of continuous polling. For example, pull transaction data only when you receive transaction update notifications, or refresh order information only when you receive order change notifications. This approach reduces unnecessary API calls and ensures real-time data accuracy.
  • Targeted data retrieval: Instead of pulling all available data, tailor your data retrieval based on seller-specific requirements and participation in programs and marketplaces. For example, certain report types like Pan-European Eligibility: FBA ASINs are specific to certain marketplaces and should be requested only for sellers participating in that program. This targeted approach optimizes API usage and improves system efficiency.
  • Smart data retrieval: Structure your system to request data based on when data is likely to be available instead of continuously polling. For report processing, align your polling with report generation schedules. For example, Amazon FBA Reports daily reports are generated no more than once every four hours, so schedule your pulls accordingly instead of continuously checking for availability. Optimize your Data Kiosk API queries to pull only the data elements that your application requires.
  • Strategic historical data backfills: When you receive new seller authorizations, assess which historical data is essential for business operations rather than retrieving everything. Instead of 1:1 API calls, use reports and schedule backfills during off-peak hours to minimize system impact. For large datasets, implement incremental backfills to manage the load effectively.

Create integrated workflows

To create efficient workflows, combine multiple optimization strategies rather than relying on a single approach. For example:

  • Order processing: Create an order management system by implementing a hybrid approach that ensures complete order visibility while minimizing API calls. For more information, refer to the Amazon SP-API Developer University video Orders API Best Practices. You learn how to implement efficient order processing through the following strategies:
    • Use order reports for bulk historical data and scheduled updates.
    • Leverage the Orders API for real-time order information.
    • Monitor order change notifications for immediate status updates.
  • Pricing updates: Reduce API calls while maintaining competitive pricing through notification-driven updates. For example, Price Adjustment Automation Workflows Guide explains how to:
    • Monitor PRICING_HEALTH notifications to respond to featured offer disqualification events, allowing timely price adjustments.
    • Implement ANY_OFFER_CHANGED notification handling for immediate price update reactions, enabling dynamic pricing strategies based on market changes.
  • Listings operations: Optimize listing management through multiple strategies:
  • Merchant-fulfilled order management: Create an efficient fulfillment workflow for merchant-fulfilled orders. For example, Subscribe to MFN notifications explains how to:
    • Monitor order change notifications for orders with Upcoming, Pending, or Unshipped status and MFN as the FulfillmentChannel.
    • Retrieve eligible shipment services based on order requirements.
    • Process order fulfillment using optimal shipping options.

These optimization strategies help you build efficient and cost-effective SP-API integrations. By implementing these best practices, you can reduce API calls while maintaining your application's key functionality.