This article contains the following information related to APIs.
- API Version
- Pagination Info
- Throttling Info
- Handling Errors
API Version
This Connector supports these versions of SP APIs. Both FBM and FBA selling models are supported.
Operations | Supported API Versions |
---|---|
Orders | Version V0 |
Feeds | Version 2021-06-30 |
Reports | Version 2021-06-30 |
A+ Content | Version 2020-11-01 |
Catalog Items | Version 2020-12-01 |
FBA Inbound Eligibility | Version V1 |
FBA Inventory | Version V1 |
FBA Small and Light |
Version V1 |
Finances | Version V0 |
Fulfillment Inbound | Version V0 |
Fulfillment Outbound | Version 2020-07-01 |
Listings Items | Version 2021-08-01 |
Listings Restrictions | Version 2021-08-01 |
Product Type Definitions | Version 2020-09-01 |
Merchant Fulfillment | Version V0 |
Messaging | Version V1 |
Product Fees | Version V0 |
Product Pricing | Version V0 |
Sales | Version V1 |
Sellers | Version V1 |
Services | Version V1 |
Shipment Invoicing | Version V0 |
Shipping | Version V2 |
Solicitations | Version V1 |
Tokens | Version 2021-03-01 |
Uploads | Version 2020-11-01 |
For more information on Amazon SP API Versions and release notes, please refer to https://developer-docs.amazon.com/sp-api/page/versions.
Pagination Information
When a request produces a response that exceeds the pageSize, pagination occurs. This means the response is divided into individual pages. To retrieve the next page or the previous page, you must pass the nextToken value or the previousToken value as the pageToken parameter in the next request. When you receive the last page, there will be no nextToken key in the pagination object.
Name | Description | Schema |
---|---|---|
nextToken
(optional) |
A token that can be used to fetch the next page. | String |
previousToken
(optional) |
A token that can be used to fetch the previous page. | String |
For example, GetOrders.bps returns max 100 orders at a time in the response. If there are more than 100 orders to be retrieved, a NextToken field will be made available in the GetOrders.bps response. This NextToken value can be used to retrieve the orders instead of other criteria to retrieve the next set of orders. If NextToken is not returned, then there are no more orders.
Throttling Information
Throttling is the process of limiting the number of requests you can submit to a given operation in a given amount of time. In the Selling Partner API, requests are rate-limited using the token bucket algorithm. The algorithm is based on the analogy of a bucket that contains tokens, where each token can be exchanged to make a request. Tokens are automatically added to the bucket using a set rate-per-second until the maximum size of the bucket is reached. The maximum size is also called the burst rate. Each request subtracts a token from the bucket. Throttling occurs when a request is made for which no token is available because the bucket is empty. A throttled request results in an error response usually with 429 status code.
When you submit a request to a Selling Partner API operation, the current rate limits for that operation are returned in the x-amzn-RateLimit-Limit response header, on a best-effort basis, for HTTP status codes 20x, 400 and 404 only.
How to retrieve Throttling information from this Connector
In the integration project implemented, right after the step where a BP from the connector project is called, add a new step called Connector Response Header Parser that will retrieve header information such as x-amzn-RateLimit-Limit.
Sample Response Headers:
{ "x-amz-apigw-id": [ "M6P96EE_oAMFT8w=" ], "Connection": [ "keep-alive" ], "x-amzn-RequestId": [ "de937cf0-7867-4250-9e96-67ea58b2444b" ], "Content-Length": [ "41059" ], "Date": [ "Wed, 02 Feb 2022 10:43:38 GMT" ], "X-Amzn-Trace-Id": [ "Root=1-61fa6058-26f254106be3da3c13f01feb" ], "Content-Type": [ "application/json" ], "x-amzn-RateLimit-Limit": [ "0.0167" ] }
For more information on Throttling please refer to the link: https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api
Handling Errors
If the Connector BP (i.e., API call) is successful (returns status code between 200 & 300), then the BP task passes and returns the response payload (in Studio>Admin Console> Auditor View the task is marked as completed).
Or
In case the Connector BP (i.e. API call) has failed (any response status code not between 200 & 300), then the BP task will fail without returning any response payload (in Studio>Admin Console> Auditor View the task is marked as failed, an error payload is returned from Amazon, and stack trace logged)
Or
In case this Connector BP API call execution fails (which can be an internal error such as payload parse issue), then the task will fail without returning any response payload (in Studio>Admin Console>Auditor View, the task is marked as failed, and a stack trace is logged).
Below are some of the error codes for Amazon SP APIs.
HTTP Code | Description |
---|---|
400 | Request has missing or invalid parameters and cannot be parsed.
Headers: x-amzn-RateLimit-Limit (string):Your rate limit (requests per second) for this operation. x-amzn-RequestId (string):Unique request reference identifier. |
402 | Indicates that access to the resource is forbidden. Possible reasons include Access Denied, Unauthorized, Expired Token, or Invalid Signature.
Headers: x-amzn-RequestId (string):Unique request reference identifier. |
404 | The resource specified does not exist.
Headers: x-amzn-RateLimit-Limit (string):Your rate limit (requests per second) for this operation. x-amzn-RequestId (string):Unique request reference identifier. |
413 | The request size exceeded the maximum accepted size.
Headers: x-amzn-RateLimit-Limit (string):Your rate limit (requests per second) for this operation. Note: For this status code, the rate limit header is deprecated and no longer returned. x-amzn-RequestId (string):Unique request reference identifier. |
415 | The request payload is in an unsupported format.
Headers: x-amzn-RateLimit-Limit (string):Your rate limit (requests per second) for this operation. Note: For this status code, the rate limit header is deprecated and no longer returned. x-amzn-RequestId (string):Unique request reference identifier. |
429 | The frequency of requests was greater than allowed.
Headers: x-amzn-RateLimit-Limit (string):Your rate limit (requests per second) for this operation. Note: For this status code, the rate limit header is deprecated and no longer returned. x-amzn-RequestId (string):Unique request reference identifier. |
500 | An unexpected condition occurred that prevented the server from fulfilling the request.
Headers: x-amzn-RateLimit-Limit (string):Your rate limit (requests per second) for this operation. Note: For this status code, the rate limit header is deprecated and no longer returned. x-amzn-RequestId (string):Unique request reference identifier. |
503 | Temporary overloading or maintenance of the server.
Headers: x-amzn-RateLimit-Limit (string):Your rate limit (requests per second) for this operation. Note: For this status code, the rate limit header is deprecated and no longer returned. x-amzn-RequestId (string):Unique request reference identifier. |
For more information on specific SP API response codes please visit the Error Response and Schemas section of Amazon's documentation: https://developer-docs.amazon.com/sp-api/
Comments
0 comments
Please sign in to leave a comment.