Locales
Amazon is a world-wide venture. Product Advertising API is as well. As you saw in earlier chapters, Product Advertising API operates in six locales:
-
CA
-
DE
-
FR
-
JP
-
UK
-
US
Each of these locales is serviced by an Amazon web site that uses the local language, local customs, and local formatting. For example, when you look at the DE homepage for Amazon, you see the listings in German. If you purchased an item, you would find the price in Euros, and, if you were to purchase a movie, you would find that the movie rating would conform to the movie rating system used in Germany. Product Advertising API responses contain the same localized information. Product Advertising API determines the correct locale by examining the endpoint in the request. For example, the endpoints for the DE locale are:
http://ecs.amazonaws.de/onca/xml https://ecs.amazonaws.de/onca/xml
For a list of the other endpoints, see Anatomy Of a REST Request.
Currency, for example is localized, as follows.
<SubTotal> <Amount>4082</Amount> <CurrencyCode>USD</CurrencyCode> <FormattedPrice>$40.82</FormattedPrice> </SubTotal>
The values for
CurrencyCode
are similar to the names of Product Advertising API locales. In the preceding
example, the currency is formatted according to the conventions in the US locale.