Product Advertising API
Developer Guide (API Version 2011-08-01)
Print this pageEmail this pageGo to the ForumsView the PDFShare this page on TwitterShare this page on FacebookBookmark this page on DeliciousSubmit this page to RedditSubmit this page to DiggDid this page help you?  Yes  No   Tell us about it...

Response Group Definitions

Response groups, except in the case of a request error, always form part of a response. Each response group is defined in the WSDL. The following snippet from the WSDL shows the definition of the Images response group.

<xs:complexType name="Image">
  <xs:sequence>
    <xs:element name="URL" type="xs:string" />
    <xs:element name="Height" type="tns:DecimalWithUnits" />
    <xs:element name="Width" type="tns:DecimalWithUnits" />
    <xs:element name="IsVerified" type="xs:string" minOccurs="0" />
  </xs:sequence>
  </xs:complexType>

As you can see, the Image response group returns the elements URL, Height (height of the image), Width, and IsVerified. All are required in the response except IsVerified, which is optional (minOccurs=0). You can see how these elements are displayed in a response.

<MediumImage>
  <URL>http://ec1.images-amazon.com/images/P/
    B00005TNFV.01._SCMZZZZZZZ_.jpg</URL>
  <Height Units="pixels">140</Height>
  <Width Units="pixels">99</Width>

This example shows how URL, Height, and Width are child elements.