Response Definitions - Amazon Product Advertising API Developer's Manual

Api version 2011-08-01
Table of Contents

Advertisement

Product Advertising API Developer Guide
<xs:element name="Artist" type="xs:string" minOccurs="0" />
<xs:element name="Availability" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="Available" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element ref="tns:AudienceRating" minOccurs="0" maxOccurs="unbounded" />
This snippet shows some of ItemSearch 's input parameters, including Actor , Artist , Availability ,
and AudienceRating . The element declarations specify that these parameters are valid in an
ItemSearch request. Most of the parameters in this example are strings. The type of one, however,
Availability , is a variation on the base class, string. In this case, the variation puts a restriction on
the strings that can be valid values for Availability . For that reason, the restriction keyword is used.
The restriction is that the valid values for Availability are defined by an enumeration.The enumeration,
however, has only one valid value, "Available," which means that the parameter, Availability can be
set to only one value.
minOccurs refers to the minimum number of times the parameter must appear in an ItemSearch
request. If the value is zero, the associated parameter is optional. If the value is 1, the associated parameter
is required to be included once in every request involving that operation. The default value is 1, that is,
if minOccurs is not included in an element declaration, minOccurs is 1.
maxOccurs defines the maximum number of times the parameter can appear in a request. The default
is 1, that is, if maxOccurs is not included in an element declaration, maxOccurs is 1 and the parameter
can only appear once in a request. In the preceding example, maxOccurs is "unbounded," which means
that the AudienceRating parameter can appear any number of times in an ItemSearch request.
In the preceding example, the parameter types are declared to be simpleTypes. A simple type cannot
have child elements or attributes. Complex types can. In practice, any parameter that can take multiple
values, such as an array, must be defined as a complex type.
The following snippet shows an example of a complex type.
<xs:element name="ItemSearch">
<xs:complexType>
<xs:sequence>
<xs:element name="MarketplaceDomain" type="xs:string" minOccurs="0" />
<xs:element name="AWSAccessKeyId" type="xs:string" minOccurs="0" />
<xs:element name="SubscriptionId" type="xs:string" minOccurs="0" />
This definition snippet shows three of the parameters that can be part of an ItemSearch request.

Response Definitions

The response section defines the responses returned by default by each operation. The following snippet
shows some of the specifications of an ItemSearch response.
<xs:element name="ItemSearchResponse">
<xs:complexType>
<xs:sequence>
<xs:element ref="tns:OperationRequest" minOccurs="0" />
<xs:element ref="tns:Items" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
What is a WSDL?
API Version 2011-08-01
17

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Product Advertising API and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Table of Contents