Product Advertising API
Developer Guide (API Version 2013-08-01)

Request Validation Segment

The Request Validation segment has error information if there was an error in the request. It is also the last segment that Product Advertising API returns in a response if there was an error.

In the preceding example, the request was valid, as shown in the IsValid element.


The IsValid element pertains only to the validity of the request. It reports if all of the required elements of a request are present, parameter restrictions and constraints have been obeyed, and parameter values are legal. IsValid does not assure that a valid request will be processed.

For example, an ItemId such as 1234ABCD is in the correct form, but no items in Amazon's catalog match that ItemId. The request is valid, but will return an error.

There are many reasons why a request can fail.

Problem Description
Incorrect parameters

The request is missing parameters that an operation requires, or the combination of parameters is not allowed, or the Service parameter was omitted.

In this case, the IsValid value is "False" and the request is not processed. Common mistakes that cause these errors are spaces in the URL that prevent Product Advertising API from reading the entire request, or misspelled and incorrectly capitalized parameter names or values.

If you inadvertently enter a space in a request, your browser automatically enters the URL-encoded form of a space: %20. For example, if you paste, ItemId= B12345, in your browser as part of a request, the URL field in the browser shows, ItemId=%20B12345.

Invalid values

The request may be syntactically correct, but the values for one or more parameters may be invalid. For example, you might supply an ItemId value that does not match any item sold on Amazon.

In this case, the IsValid value is "True", but an error message is returned that says that the value is not valid.

Empty result

The request is valid, but there is no data that matches the search criteria.

In this case, the IsValid value is "True". Remember that parameter names and values are case sensitive.

Network or processing error

The request is valid, but a network outage or processing failure has caused Product Advertising API to return an empty response.

In this case, the IsValid value is "True".

Partial request errors Product Advertising API returns as much information as possible. For example, if you use a batch request and Product Advertising API finds items for one request but not the other, Product Advertising API returns all of the information for the found item and an error message for the other request.

When one of these errors occurs, the IsValid value is "False" and an error element is returned in the Request Validation segment. The error element includes:

  • Error code — The title of the error.

  • Error message — A brief description of the error.

The following is an example error message.

<Errors> <Error> <Code>missing_service_parameter</code> <message>Your request is missing the Service parameter. Please add the Service parameter to your request and retry. Valid values for the Service parameter include AWSEcommerceService.</message> </Error> </Errors>

The more difficult error to assess is a request that is valid and processed, but contains an error in logic. For example, a request might use default values such that only items in new condition are returned when the requester meant to return items in all conditions.

The remainder of the Request Validation segment is a subsection named after the operation used in the request. In this example, the subsection is named ItemLookup Request. This subsection echoes the parameter values used in the request. These values are returned for the purpose of troubleshooting the request.

For a list of all error codes and messages, see Error Messages.