Processing of Errors
Is it possible to submit a valid request and still have an error?
Yes. If you were to submit a request and no items in Amazon satisfied the request, you would receive an error. The following request is an example of this problem.
Following is a SearchItems request trying to search for Mystery Novels Non Existing on Amazon under
Automotivecategory having condition asNew.
{
"keywords": "Mystery Novels Non Existing",
"searchIndex": "Automotive",
"condition": "New",
"partnerTag": "xyz-20"
}
Since, looking for non-existing mystery novels under Automotive category doesn't return any results, we got No results for the request. The response we get from Creators API in this case look like this:
{
"__type": "com.amazon.creators#ResourceNotFoundException",
"message": "No results found for your search request",
"resourceType": "SearchResult",
"resourceId": "Mystery Novels Non Existing"
}
Is it possible to not get a resource response even after requesting it?
Yes. Resources determine what information will be returned in the API response. It is possible that a requested resource is not available for a particular product. In this case, Creators API returns partial response where the unservable resource is absent from the response whereas other valid resources are served. For example, ContentRating resource from ItemInfo is usually applicable for digital products like Movies or VideoGames. Requesting for ContentRating for an Electronics product will not return ContentRating information.
Following is a GetItems request for a Fire TV Stick which requests for
itemInfo.contentRatinganditemInfo.titleresources.
{
"itemIds": ["B00ZV9RDKK"],
"itemIdType": "ASIN",
"resources": ["itemInfo.contentRating", "itemInfo.title"],
"partnerTag": "xyz-20",
"marketplace": "www.amazon.com",
"operation": "GetItems"
}
As there is no
ContentRatinginformation for the item, the response only containsTitleinformation which is the other resource requested.
{
"items": [
{
"asin": "B00ZV9RDKK",
"detailPageURL": "https://www.amazon.com/dp/B00ZV9RDKK?tag=dsf&linkCode=ogi&th=1&psc=1",
"itemInfo": {
"title": {
"displayValue": "Fire TV Stick with Alexa Voice Remote | Streaming Media Player",
"label": "Title",
"locale": "en_US"
}
}
}
]
}
Does Creators API return Partial Response?
Yes. For example, if you try to get item info for multiple ASINs where some are invalid, you'll get results for the valid ASINs along with detailed error information for the invalid ASINs in the errors array. For example:
Following is a GetItems request where some of the ASINs are invalid.
{
"itemIds": ["B08N5WRWNW", "B0BL8WSCH3"],
"partnerTag": "xyz-20",
"marketplace": "www.amazon.com",
"operation": "GetItems"
}
The response contains the valid ASIN in
itemsResultand detailed error information for the invalid ASIN in theerrorsarray:
{
"errors": [
{
"code": "InvalidParameterValue",
"message": "The ItemIds B08N5WRWNW provided in the request is invalid."
}
],
"itemsResult": {
"items": [
{
"asin": "B0BL8WSCH3",
"detailPageURL": "https://www.amazon.com/dp/B0BL8WSCH3?tag=xyz-20&linkCode=ogi&th=1&psc=1",
"itemInfo": {
"title": {
"displayValue": "Amazon Fire 7 Kids tablet (newest model) ages 3-7",
"label": "Title",
"locale": "en_US"
}
}
}
]
}
}
Understanding the errors Array
The errors array provides detailed information about partial failures:
When it appears: Only in HTTP 200 responses when some items succeed and others fail
What it contains: Each error has:
code: A unique identifier for the error type (e.g.,InvalidParameterValue,ItemNotFound)message: A human-readable description of what went wrong
Behavior:
If some items are valid: Returns HTTP 200 with valid items +
errorsarray for invalid itemsIf ALL items are invalid: Returns HTTP 404
ResourceNotFoundException(no partial response)If ALL items are valid: Returns HTTP 200 with
itemsResultonly (noerrorsarray)
This pattern applies to all catalog operations that accept multiple identifiers:
GetItems- Multiple item IDsSearchItems- Search queries (may have refinement errors)GetVariations- Variation requestsGetBrowseNodes- Multiple browse node IDs
Error Handling Best Practices
When processing responses:
Always check the
errorsarray to identify which items failed and whyProcess successful items from the result object
Log or retry failed items based on error codes
Don't assume all requested items are present in the response
