2004年10月11日

Amazon E-Commerce Service 4.0(和訳)A Tour of ECS

A Tour of Amazon E-Commerce Service (ECS)
Amazon E-Commerce Service (ECS)を体験しよう


To get you started, we have assembled a set of REST requests that you can access in your browser to take a tour of the major ECS features. To use these links, you should do the following:
ECS4.0を始めるために、主なECS機能をブラウザ上で体験するために必要なRESTリクエストのサンプルを紹介します。これらのリンクを使うために以下の2つの事をしてください:

  1. Do a global change on [your subscription ID here] to insert your own Amazon Web Services (AWS) subscription ID string.
    すべての[your subscription ID here] という文字列をあなたのAmazon Web Services (AWS) サブスクリプションIDに置き換えてください:.

  2. Copy the links, one by one, into your browser and activate the link, to see what the ECS response looks like. Of course, you can also modify the URL and re-submit it, to experiment with ECS and get immediate feedback on what is available.
    1つ1つのリンクをブラウザにコピーして実行することで、結果をすぐに見ることができます。もちろん、編集してカスタマイズして、再度リンクを実行することで、その変更の結果をすぐに見ることができます。
    訳注:たとえエラーになっても、日本語でどうしたらよいか優しくおしえてくれますので、実行することが上達への最適な道です

The URLs are provided in versions that work on all Amazon locales: US, UK, DE and JP. Your subscription ID will work on all sites, so feel free to try out the REST requests for each site.
URLはアマゾンの管理する地域(国)別に提供されます。提供される地域は US, UK, DE and JP.です。あなたのサブスクリプションIDはすべてのサイトで使うことができます。だから、同じRESTリクエストをすべてのサイトで自由に使えます。
訳注:実際には日本のデータベースを使用することになるはずなので、JP=日本を使うことになります。以下のサンプルではJPの部分を実行するようにしてください。

For each request, we have included a sample of an XML response you could expect to receive from ECS. The Amazon catalog changes on an hourly basis, so the products we have used in our examples may not return the same results to you. For convenience, or if you are not connected to the Internet, you may use the sample responses we have provided to get to know ECS and its features.
各リクエストごとに、ECSが返すと予想される応答のサンプルを以下の例に入れました。ただし、アマゾンのデータベースは時々刻々と変化するので、 このサイトが提供する例と同じ回答をECS4.0は返さないかもしれません。下記の物は、インターネットにつなげないひとの利便性を考えて、ECSの応答のサンプルとして載せた物であり、常に同一のレスポンスが返る事を保証する物で亜ありません。

Searching the Amazon Catalog
アマゾンのデータベースを検索する

The first operation we'll try is ItemSearch, which allows you to search the Amazon product catalog in various kinds of ways.
最初の手順として、 ItemSearch(商品の検索)にチャレンジしましょう。これによりあなたは様々な方法でデータベースを検索することができるようになります。

Scenario: You're interested in finding golf clubs manufactured by Callaway.
前提:あなたはキャロウェイ製のゴルフクラブに興味があったとしたます。

REST request / URL:
Amazonに問い合わせを行うためのREST request / URL:は以下のようになります。

http://webservices.amazon.com/onca/xml?Service=AWSECommerceService
&SubscriptionId=[your subscription ID here]
&Operation=ItemSearch &SearchIndex=SportingGoods
&Keywords=golf%20club%20Callaway

We encourage you to try the link for yourself, but if you are not able to see the results, you can view the sample response instead.
私たちは、あなたのために、実際に上記のリンクを自分の手で作って、試してみることをお奨めします。しかし、実際に見ることができる環境にいない人のために、サンプルの回答を見る事ができるようにしてあります。

※訳注:日本用にカスタマイズされてますが訳者がテストのために使ったフォームも良ければ使ってください。

※訳注:より日本向けには、たとえば、キノの旅=the beautifl worldというDVDを探そうとすると以下のようになります。ついでに訳者のIDをうめたバージョンも用意します。

http://webservices.amazon.co.jp/onca/xml?Service=AWSECommerceService
&SubscriptionId=[your subscription ID here]
&Operation=ItemSearch
&SearchIndex=DVD
&Keywords=beautiful%20world

http://webservices.amazon.co.jp/onca/xml?Service=AWSECommerceService

&SubscriptionId=0VE04X4B678E9B60S102
&Operation=ItemSearch
&SearchIndex=DVD&Keywords=beautiful%20world

The SearchIndex parameter in this request specified that you were searching for sporting goods. You could also have set SearchIndex to Books, Toys, DVD, Music, VideoGames, Software or any other of Amazon's stores. Not all stores are available on all sites. For example, the sporting goods store referred to in the REST sample above is only available for the US site.
このリクエストにおける SearchIndex パラメータは、あなたがスポーツ用品を捜していると指定しました。 あなたは、 SearchIndex を Books 、 Toys 、 DVD 、 Music 、 VideoGames 、 Software 、その他アマゾンストアの提供するあらゆるジャンルをセットできます。必ずしも全てのジャンルは、全てのサイトで利用可能であるとは限らない。 例えば、上で REST サンプルにおいて参照されたスポーツ用品ストアは、唯一米国のサイトに利用可能である。
訳注:特に日本のサイトは指定できる物が少ないので注意してください。 先ほど紹介したテストのために使ったフォームには日本のサイトで呼べる情報のみを詰めました。

Note also several keywords, separated by spaces (URL-encoded as %20). Capitalization and order are not significant in the search keywords.
(%20にURLエンコードされた)スペースで区切られたいくつかのキーワードに注意してください。大文字小文字や並び順は検索結果に影響しません。

This ItemSearch request returned the XML data for the first ten items in the Amazon catalog that matched your criteria. For each item, an <Item> element contains a description of the product. Note that the first element inside <Item> is the ASIN (Amazon Standard Identification Number)--we'll be working with ASINs a lot both in this tour and throughout the ECS documentation.
この ItemSearch リクエストは、アマゾンデータベースの中から、あなたのリクエストにマッチした最初の 10 個アイテムを XMLデータ化して返しました。各アイテムは、<Item>エレメントの中に記述されます。<Item>エレメント内部の最初の要素が 必ずASIN ( Amazon Standard Identification Number ) である点に注意してください――我々は、このツアーにおいて、そしてまた すべてのECS ドキュメンテーションで大いに ASINs を使って作業をしているはずです。
※訳注: それくらいASINは大切だということです。プログラムを書く上でもASINが先頭にきていることは大変便利です。
すべての製品はASINで管理されていますので、ASINはとても大切です。

Scenario: You want to find a variety of Harry Potter related merchandise, including books, clothing, DVDs, etc. You also noted from the last search that no product images were included, and you want to see product image URLs for this search.
前提: あなたは、本、衣類、 DVDs 等を含む様々なハリー・ポッターの関連の商品を探そうとしています。 上記のゴルフクラブの検索では商品の写真のURLが結果に無かったことに注目してください。そして、今回の検索では。商品の写真のURLが添付されていることに注目してください。

REST request / URL:
Amazonに問い合わせを行うためのREST request / URL:は以下のようになります。

US
http://webservices.amazon.com/onca/xml?Service=AWSECommerceService
    &SubscriptionId=[your subscription ID here]
    &Operation=ItemSearch
    &SearchIndex=Blended
    &Keywords=Harry%20Potter
    &ResponseGroup=Medium
UK
http://webservices.amazon.co.uk/onca/xml?Service=AWSECommerceService
    &SubscriptionId=[your subscription ID here]
    &Operation=ItemSearch
    &SearchIndex=Blended
    &Keywords=Harry%20Potter
    &ResponseGroup=Medium
DE
http://webservices.amazon.de/onca/xml?Service=AWSECommerceService
    &SubscriptionId=[your subscription ID here]
    &Operation=ItemSearch
    &SearchIndex=Blended
    &Keywords=Harry%20Potter
    &ResponseGroup=Medium
JP
http://webservices.amazon.co.jp/onca/xml?Service=AWSECommerceService
    &SubscriptionId=[your subscription ID here]
    &Operation=ItemSearch
    &SearchIndex=Blended
    &Keywords=Harry%20Potter
    &ResponseGroup=Medium

訳注:オマケ訳者のIDをつけたクリック可能リンク
http://webservices.amazon.co.jp/onca/xml?Service=AWSECommerceService
  &SubscriptionId=0VE04X4B678E9B60S102
  &Operation=ItemSearch
  &SearchIndex=Blended
  &Keywords=Harry%20Potter
  &ResponseGroup=Medium

The output shows how the ResponseGroup parameter specifies how much data to return. When the parameter is omitted, a default set of data is returned. By setting this parameter to Medium, we requested additional elements, including product image URLs.
その出力は、ResponseGroup パラメータを指定することで返すデータがどのぐらい異なるかを示す。 ResponseGroup パラメータが省略された場合はデフォルトのセットが返ります。 ResponseGroup パラメータを Medium に設定することによって、製品イメージ URL を含んだレスポンスが返ります。

You can search in only one store at a time. However, when you set the SearchIndex parameter to Blended, it searches the DVD, Electronics, Toys, Magazines, PCHardware, Tools, SportingGoods, Books, Software, Music, GourmetFood, Kitchen, and Apparel stores. Note how the output consists now of two sections of data:
一回の検索では1つのジャンルからしか検索することができません。しかし、SearchIndexパラメータをBlendedにすることで、DVD 、エレクトロニクス、玩具、マガジン、 PCハードウェア、ツール、 スポーツグッツ、本、ソフトウェア、音楽、 美食 、キッチン、衣料品店, から検索することができます。その出力が以下の2つのセクションからなることに注目してください。

  1. <SearchResultsMap> contains a <SearchIndex> element for each store where the keywords were found. For each store, you are given the ASINs of the three most popular products in that store that matched your keyword(s).
    <SearchResultsMap> セクションはキーワードが発見された各ジャンルのために<SearchIndex>エレメントを含みます。各ジャンルのために3 つの最もポピュラーな製品ASINを返します。

  2. For each ASIN in the <SearchResultsMap>, you will find an <Item> element with item attributes and other information.
    <SearchResultsMap>の中の各ASINは, <Item>セクションでアイテムの属性や詳細が記述されています。

※訳注:SearchIndexにBlendedを指定した場合は、他のジャンルの時と異なり、<SearchResultsMap>と<Item>という2つのセクションが応答に含まれます。<SearchResultsMap>には、各ジャンルごとにストア名と代表的なASINが3つ載っています。<Item>セクションは通常の応答と同じですが、<SearchResultsMap>セクションに載っているASINの詳細が含まれています。

The first ItemSearch request returned up to ten items that matched your criteria. However a blended ItemSearch request can return up to three items for each store searched.
最初の ItemSearch リクエストは、あなたのリクエストにマッチしたアイテムを最大でも 10個しか返せませんでした。 しかしながら、BlendedなItemSearchリクエストは、適合するアイテムを含む各ジャンルのために各最大3 つのアイテムを返すことができます。
※訳注:つまり、適合するジャンルのストア数が4以上ある場合、含まれるアイテムが10個を超えることがあります。

Let's try a few more ItemSearch requests.
さらにいくつかの ItemSearch リクエストを試みよう:

Scenario: You're looking for a CD which contains a specific track.
前提: あなたは特定のトラックを含むCDを探そうとしています。

REST request / URL:
Amazonに問い合わせを行うためのREST request / URL:は以下のようになります。

US
http://webservices.amazon.com/onca/xml?Service=AWSECommerceService
    &SubscriptionId=[your subscription ID here]
    &Operation=ItemSearch
    &SearchIndex=Music
    &Keywords=Hungarian%20Rhapsody%20Liszt
    &ResponseGroup=Medium,Tracks
UK
http://webservices.amazon.co.uk/onca/xml?Service=AWSECommerceService
    &SubscriptionId=[your subscription ID here]
    &Operation=ItemSearch
    &SearchIndex=Music
    &Keywords=Hungarian%20Rhapsody%20Liszt
    &ResponseGroup=Medium,Tracks
DE
http://webservices.amazon.de/onca/xml?Service=AWSECommerceService
    &SubscriptionId=[your subscription ID here]
    &Operation=ItemSearch
    &SearchIndex=Music
    &Keywords=Hungarian%20Rhapsody%20Liszt
    &ResponseGroup=Medium,Tracks
JP
http://webservices.amazon.co.jp/onca/xml?Service=AWSECommerceService
    &SubscriptionId=[your subscription ID here]
    &Operation=ItemSearch
    &SearchIndex=Music
    &Keywords=Hungarian%20Rhapsody%20Liszt
    &ResponseGroup=Medium,Tracks

訳注:オマケ訳者のIDをつけたクリック可能リンク
http://webservices.amazon.co.jp/onca/xml?Service=AWSECommerceService
  &SubscriptionId=0VE04X4B678E9B60S102
  &Operation=ItemSearch
  &SearchIndex=Music
  &Keywords=Hungarian%20Rhapsody%20Liszt
  &ResponseGroup=Medium,Tracks

This search uses a special response group, Tracks, which returns a list of CDs with tracks whose titles match the search criteria.
この検索は特定のresponse groupとしてTracksを使っています。出力のサンプルを見ると検索に適合したCDのリストができており、その中にトラック情報が載っていることがわかります。
※訳注:CDをトラックの名前などで検索ができるよというアピールです。

Scenario: You want to find used digital cameras made by Nikon.
前提: あなたは中古のニコン製デジカメを探そうとしています。

REST request / URL:
Amazonに問い合わせを行うためのREST request / URL:は以下のようになります。

US
http://webservices.amazon.com/onca/xml?Service=AWSECommerceService
    &SubscriptionId=[your subscription ID here]
    &Operation=ItemSearch
    &SearchIndex=Electronics
    &Manufacturer=NikonK
    &Keywords=digital%20camera
    &Condition=Used
    &MerchantId=All
    &ResponseGroup=Medium,OfferFull
DE
http://webservices.amazon.de/onca/xml?Service=AWSECommerceService
    &SubscriptionId=[your subscription ID here]
    &Operation=ItemSearch
    &SearchIndex=Electronics
    &Manufacturer=NikonK
    &Keywords=digital%20camera
    &Condition=Used
    &MerchantId=All
    &ResponseGroup=Medium,OfferFull

Note that only the US and DE sites carry cameras. This search specifies only used items and returns price and availability information (via the OfferFull response group).
注意事項:USとDEのサイトだけが中古のカメラ情報を扱っています。この検索では中古カメラのみが価格と状態の結果に登場します。結果のサンプルはこちら。中古の価格と状態が表示されるのはResponseGroupにOfferFullを指定したからです。

※訳注:残念ながらというか、幸運というか日本にもエレクトロニクスのマーケットプレイスがあるため、ニコンの中古のデジカメを探すことはできます。

http://webservices.amazon.co.jp/onca/xml?Service=AWSECommerceService
&SubscriptionId=[your subscription ID here]
&Operation=ItemSearch
&SearchIndex=Electronics
&Manufacturer=NikonK
&Keywords=digital%20camera
&Condition=Used
&MerchantId=All
&ResponseGroup=Medium,OfferFull

※訳注:オマケ訳者のIDをつけたクリック可能リンク
http://webservices.amazon.co.jp/onca/xml?Service=AWSECommerceService
&SubscriptionId=0VE04X4B678E9B60S102
&Operation=ItemSearch
&SearchIndex=Electronics
&Manufacturer=NikonK
&Keywords=digital%20camera
&Condition=Used&MerchantId=Al
l&ResponseGroup=Medium,OfferFull

※訳注:ここでは、中古=マーケットプレイスから検索する方法を学んでください。

Scenario: You're interested in books about amateur soccer leagues.
前提: あなたは草サッカー連盟に関する書籍を探しています.

This is a very simple query as shown below which returns standard XML.
これは下記のようにとてもシンプルなクエリーになります。XMLベースのレスポンスのサンプルをここにしめします.

REST request/URL:
Amazonに問い合わせを行うためのREST request / URL:は以下のようになります。

US
http://webservices.amazon.com/onca/xml?Service=AWSECommerceService
    &SubscriptionId=[your subscription ID here]
    &Operation=ItemSearch
    &SearchIndex=Books
    &Keywords=amateur%20soccer%20league
UK
http://webservices.amazon.co.uk/onca/xml?Service=AWSECommerceService
    &SubscriptionId=[your subscription ID here]
    &Operation=ItemSearch
    &SearchIndex=Books
    &Keywords=amateur%20soccer%20league
DE
http://webservices.amazon.de/onca/xml?Service=AWSECommerceService
    &SubscriptionId=[your subscription ID here]
    &Operation=ItemSearch
    &SearchIndex=Books
    &Keywords=amateur%20soccer%20league
JP
http://webservices.amazon.co.jp/onca/xml?Service=AWSECommerceService
    &SubscriptionId=[your subscription ID here]
    &Operation=ItemSearch
    &SearchIndex=Books
    &Keywords=amateur%20soccer%20league

※訳注:残念ながら、日本のサイトを英語で検索するのは無謀です。
下記に検索部分をUTF-8の日本語で検索するサンプルをつけておきます。
たいていの場合はこのように日本語で検索しないと日本語のサイトからは検索できないでしょう。
このサンプルではサッカーと連盟という2つの日本語で検索しています。
http://webservices.amazon.co.jp/onca/xml?Service=AWSECommerceService
  &SubscriptionId=0VE04X4B678E9B60S102
  &Operation=ItemSearch
  &SearchIndex=Books
  &Keywords=%E3%82%B5%E3%83%83%E3%82%AB%E3%83%BC+%E9%80%A3%E7%9B%9F


※訳注:日本語で検索する場合はUTF-8をさらにURLエンコードするのを忘れずに。
わからないかたは訳者作成のこちらのフォームなどで実験してください。

Looking up Data for Specific Products
特定の商品の詳細なデータを検索する方法

The previous URLs (operation requests in ECS terminology) used the ItemSearch operation. ItemSearch does a search using criteria such as keywords or titles or manufacturer. The ItemLookup operator allows you to look up a specific product, typically by ASIN (Amazon Standard Item Number), but also by SKU, UPC (US only) or EAN (DE/JP only). ItemLookup also allows you to filter your results by merchant (US only) or by delivery method (shipped or in-store pickup, US only).
上記のURL(ECS 用語におけるオペレーションリクエスト)ではItemSearch オペレーションについて説明しました。ItemSearch はキーワードやタイトル、製造元や制作者などに基づいて商品を検索する方法です。ItemLookup オペレーションは、商品の詳細を検索する方法です。対外はASIN (Amazon Standard Item Number)によって検索します。しかしSKU、UPC (US only) 、EAN (DE/JP only)などのコードからも検索することができます。米国のみの機能ですがItemLookup は結果を小売人や配送方法(発送の有無、店頭引き取りのみか?)によってフィルタリングすることができます。

The examples below use ASINs that were valid products at the time of writing. If you are trying to use an ASIN without success, you can simply go to one of the Amazon Web sites and look up a product. The ASIN will either be displayed on the product detail page or you can extract it from the URL. For example, for the Amazon page URL below:
この例題は執筆時点で有効なASINを使って書かれている。したがって、あなたが試すときにはASINが有効ではないかもしれないので必ずしも成功するとは限らない。その時はアマゾンのウェブサイトに行って適当な商品を検索して、そのASINを下記のサンプルの代わりに使うことで正常な結果を得ることができる。ASINはURLから取得することができるたとえば以下のURLを例にすれば、ASINは1931561648である。

http://www.amazon.com/exec/obidos/ASIN/1931561648/qid=1095087622/sr=ka-1/ref=pd_ka_1/104-6903287-5823935

the ASIN is 1931561648.
※訳注:説明の都合上、上記の文章に織り込みました。
もっともASINはURLから取得するよりも商品のページにASINとして記載されているのそちらからとる方がはるかに楽であることを併記しておきます。

Scenario: You want to find out the list price and current Amazon price for a specific book.
前提: あなたは、特定の本の表示価格、アマゾン価格を探そうとしています。


Amazonに問い合わせを行うためのREST request / URL:は以下のようになります。

US http://webservices.amazon.com/onca/xml?Service=AWSECommerceService&SubscriptionId=[your subscription ID here]&Operation=ItemLookup&IdType=ASIN&ItemId=0486411214&ResponseGroup=Medium,OfferFull
UK
http://webservices.amazon.co.uk/onca/xml?Service=AWSECommerceService
&SubscriptionId=[your subscription ID here]
&Operation=ItemLookup &IdType=ASIN &ItemId=0486411214
&ResponseGroup=Medium,OfferFull
DE
http://webservices.amazon.de/onca/xml?Service=AWSECommerceService
&SubscriptionId=[your subscription ID here]
&Operation=ItemLookup &IdType=ASIN &ItemId=0486411214
&ResponseGroup=Medium,OfferFull
JP
http://webservices.amazon.co.jp/onca/xml?Service=AWSECommerceService
&SubscriptionId=[your subscription ID here]
&Operation=ItemLookup &IdType=ASIN &ItemId=0486411214
&ResponseGroup=Medium,OfferFull

※訳注:英語の本ではつまらないので、クリックすると日本語の本を検索するリンクを添付します
http://webservices.amazon.co.jp/onca/xml?Service=AWSECommerceService&
  SubscriptionId=0VE04X4B678E9B60S102
  &Operation=ItemLookup
  &IdType=ASIN
  &ItemId=4840215855
  &ResponseGroup=Medium,OfferFull

The returned data is standard XML that includes all pricing information that is current.
上記のクエリーで得られる現在の価格などの情報のXMLレスポンスのサンプルはこちら.

Scenario: You want to build a detail page for a specific book listed on your Web site.
前提: あなたは、自分のウェブサイト上で特定の本の詳細を表示しようとしています



Amazonに問い合わせを行うためのREST request / URL:は以下のようになります。

US
http://webservices.amazon.com/onca/xml?Service=AWSECommerceService
    &SubscriptionId=[your subscription ID here]
    &Operation=ItemLookup
    &IdType=ASIN
    &ItemId=0553212788
    &MerchantId=All
    &ResponseGroup=Large
UK
http://webservices.amazon.com/onca/xml?Service=AWSECommerceService
    &SubscriptionId=[your subscription ID here]
    &Operation=ItemLookup
    &IdType=ASIN
    &ItemId=0553212788
    &MerchantId=All
    &ResponseGroup=Large
DE
http://webservices.amazon.com/onca/xml?Service=AWSECommerceService
    &SubscriptionId=[your subscription ID here]
    &Operation=ItemLookup
    &IdType=ASIN
    &ItemId=0553212788
    &MerchantId=All
    &ResponseGroup=Large
JP
http://webservices.amazon.com/onca/xml?Service=AWSECommerceService
    &SubscriptionId=[your subscription ID here]
    &Operation=ItemLookup
    &IdType=ASIN
    &ItemId=0553212788
    &MerchantId=All
    &ResponseGroup=Large

※訳注:上記の訳注の例をLargeモデルにしたサンプルを添付します。
http://webservices.amazon.co.jp/onca/xml?Service=AWSECommerceService
  &SubscriptionId=0VE04X4B678E9B60S102
  &Operation=ItemLookup
  &IdType=ASIN
  &ItemId=4840215855
  &ResponseGroup=Large
  &MerchantId=All

The Large response group returns a great deal of information that includes reviews, ASINs of similar products, customer-created lists that reference this product, and more. We'll come back to some of that data later in this tour.
response groupをLargeにすると このサンプルのレスポンス にあるように、ユーザの作ったリスト情報を含む実に様々な情報がレスポンスに載ることになります。ユーザリストはユーザが作った似た商品のASIN番号を集めたユーザ作成の類似商品リストです。 このユーザリストについてはツアーの後の方で再度紹介することにします。.

Getting Seller Feedback for non-Amazon Vendors
アマゾンの加盟店舗ではない人のための販売者フィードバックの取得方法

※訳注:要するにマーケットプレイス(中古)販売の売り手の評価の取得方法についてです

If you (or your customers) are considering buying products from non-Amazon vendors, you can get feedback information about sellers with the SellerLookup operation.
もしあなたがアマゾンノ正規加盟店舗以外のベンダーつまりは、マーケットプレイスなどの中古品の売り手から商品を買おうとしているならば、売り手の評価を取得することができます。

Scenario: You want to find out if a seller gets high customer-approval ratings or not.
前提: あなたは売り手が高い評価を得ているかを調べようとしています。


Amazonに問い合わせを行うためのREST request / URL:は以下のようになります。

http://webservices.amazon.com/onca/xml?Service=AWSECommerceService
&SubscriptionId=[your subscription ID here]
&Operation=SellerLookup &SellerId=A35O48Y1QVX6

Note that in the output XML, the SellerFeedback/Feedback/Rating element value ranges from 1-5, indicating the number of stars that a given customer gave to the seller (1 star indicates poor service/delivery while 5 stars indicates excellent service). Only the first five feedback records are returned, but you can return additional "pages" of output using the OfferPage parameter, as shown below.
注意事項:出力のサンプルはこちら。XMLの出力ではSellerFeedback/Feedback/Rating の3つのエレメントに1〜5の数字が含まれる。これはアマゾンノサイトでいう売り手につけられた☆の数である。(1つの☆は非常に悪い評価であり、5つの☆は非常に良い評価をしめしている)。出力のXMLにはフィードバックの最初の5つの評価のみが含まれている。他の評価が見たい場合は『後述の後続のページを見る』機能を使って続きを読むことができる


Amazonに問い合わせを行うためのREST request / URL:は以下のようになります。
※訳注:このリクエストでは &FeedbackPage=2というオプションをつけることにより2ページ目を見ることができます。

http://webservices.amazon.com/onca/xml?Service=AWSECommerceService
&SubscriptionId=[your subscription ID here]
&Operation=SellerLookup &SellerId=A35O48Y1QVX6
&FeedbackPage=2

Looking at Products with Variations (US only)
(色や形など)バリエーションを持つプロダクトを検索する方法 (US only)

On the US site, many apparel and sporting goods products come in a range of sizes and colors. These products are stored as a parent product that contains the standard attributes, linked to child products that are the variations (the specific size/color product). The scenario below discusses how to retrieve variation product data.
米国のサイトでは、多くの製品は、特にスポーツ製品や衣料品は、多種多様なサイズや色を持つ規格品である。これらの商品は標準的な企画を持つ商品を親商品として格納され、色やサイズなどの要素を持った各製品が、子製品として階層的に格納されます。下の例はこれらの色やサイズのバリエーションを検索する方法を提示します。

Scenario: You want to allow customers to purchase shirts in a variety of sizes/colors.
前提: あなたはお客様にサイズと色にバリエーションを持たせたシャツを販売しようとしています.

Step 1: Find the parent ASIN. You can use either ItemSearch or ItemLookup to get the data for a given product.
Step 1: 最初に与えられた商品のデータを使ってItemSearchItemLookup などを使って、親商品のASINを検索します。

Amazonに問い合わせを行うためのREST request / URL:は以下のようになります。 

http://webservices.amazon.com/onca/xml?Service=AWSECommerceService &SubscriptionId=[your subscription ID here] &Operation=ItemLookup &IdType=ASIN &ItemId=B0002FHIWG &MerchantId=All &ResponseGroup=Large,Variations

※訳注:ResponseGroupにVariationsがついていることに注目してください。

Note that this request returns a new kind of element, <Variations> which contains a series of <Item> elements for each actual combination that is available as well as its size/color/price/availability. Only the first ten variations are returned, but you can retrieve additional ones by using the VariationPage parameter, as shown below:
注意事項:出力のサンプルはこちら、このサンプルでは新しい<Variations>という一連のヴァリエーションを持った商品の情報を含む<Item>エレメントを持ったエレメントが新しく登場しています。ヴァリエーションは最初の10個のみが表示されます。必要であれば、VariationPageパラメータを使って続くバリーエーションの情報を取得してください。

Amazonに問い合わせを行うためのREST request / URL:は以下のようになります。 
※訳注:以下は2ページ目を得るためにVariationPage=2というオプションがついています。

http://webservices.amazon.com/onca/xml?Service=AWSECommerceService &SubscriptionId=[your subscription ID here] &Operation=ItemLookup &IdType=ASIN &ItemId=B0002FHIWG &MerchantId=All &ResponseGroup=Large,Variations &VariationPage=2

Step 2: Use the child ASIN to purchase. The parent ASIN cannot be purchased because it does not actually exist (i.e., you cannot buy the generic product without specifying a size, color or other varying characteristic).
Step 2: 商品の購入のために子ASINを使ってください。親ASINは仮想のASIN番号であり実際に購入することはできません。なぜならば、色や形を指定せずに商品を購入することがぶっちゃけありえないからです。※訳注:たとえば、プリキュアを1体といわれても、キュアホワイトとキュアブラックどちらだかわからないでしょ?。私なら断然白ですけど。

Buying Products with the Shopping Cart
アマゾン提供のショッピングカート機能の使い方

The ECS shopping cart is a mechanism for managing the items a customer wants to buy before sending the customer to Amazon to purchase their selections.
ECSショッピングカート機能はお客がアマゾンで直接商品を買う前にあなたのサイトで一時的に商品をカートに入れてためておく機能です。

※訳注:この機能は今回の追加では目玉機能でしょう。煩わしいカート機能を自前で用意しなくてもアマゾンノ機能として使うことができます。
いままでは紹介して終わりでしたが、これで、あなたのサイトが単なく紹介サイトではなく、まさにお店のように商品を売ることができます。
しかも、このカートは保存ができるために、長期間お客が悩む、迷うという動作ができるようになります。

Scenario: You want your customers to be able to browse books on your site and you want to create a shopping cart and send them to Amazon to complete their purchase.
前提: あなたのお客があなたのサイトで本を探して、カートに入れて、最終的にアマゾンから購入しようとしていると仮定します。

Step 1: Look up the book, determine its list price and current price and availability.
Step 1: 本を探します。定価と現在のアマゾン価格を比較して商品を選びます。

※訳注:現在の日本では、書籍は定価販売を法律で義務づけれられているために、この表現はあまり適切ではありません。外国では本はふつうに値引きされて販売されています。

Amazonに問い合わせを行うためのREST request / URL:は以下のようになります。 

http://webservices.amazon.com/onca/xml?Service=AWSECommerceService &SubscriptionId=[your subscription ID here] &Operation=ItemLookup &IdType=ASIN &ItemId=0486411214 &ResponseGroup=Medium,OfferFull

In the returned XML output, the <ItemAttributes> element contains a <ListPrice> element that specifies the standard publisher's list price for the book. However, the presence of the ListPrice element does not indicate that the book is available. Additionally, the ListPrice value does not correlate to the actual price at which the book is being sold.
このリクエストのレスポンスはこちらになります。<ItemAttributes>エレメントに<ListPrice>が含まれています。<ListPrice>は定価の事です。ただし、<ListPrice>があるからと言って、在庫があるとか、現在の価格が<ListPrice>と同じであるという事を示しているわけではありません。<ListPrice>の値は定価を示している以外のあらゆる意味を持ちません。

To determine current price and availability, you must look at the <Offers> element. Every vendor who actually sells this book has an <Offer> element that specifies the condition of the vendor's offer (used, new, collectible, etc.). Since we did not specify a vendor by including the MerchantId parameter, only the Amazon offer is provided. Within the Offer element, the OfferListing element contains the vendor's price and availability. If the Offer/OfferListing/Availability element starts with the words "usually ships" (US), "usually dispatched" (UK), or equivalent in German (DE) or Japanese (JP), then the product is available and may be purchased.
現在の販売価格および、在庫の有無を見るためには<Offers>エレメントを見てください。対象の本を販売しているすべての売り手の提示している現在の価格が<Offer>エレメントに含まれています。売り手からのオファーには新品価格・中古価格・プレミア付き価格などがあります。このサンプルでは MerchantIdオプションを指定しなかったために中古商品は検索しない設定になっています。したがって、アマゾンノ正規店舗から提供される値段のみが出力に含まれます。 <OfferListing>エレメントは売り手の価格や在庫状況の情報を複数含みます。もし、Offer/OfferListing/Availabilityエレメントが以下の値であるならば購入可能、つまり、在庫のある商品化もしれません。"usually ships" (US), "usually dispatched" (UK),German (DE) とJapanese (JP)はequivalent,

※訳注:さすがに英語の本ではつまらないので上記例の日本語の本の例を再び
http://webservices.amazon.co.jp/onca/xml?Service=AWSECommerceService&
SubscriptionId=0VE04X4B678E9B60S102
&Operation=ItemLookup
&IdType=ASIN
&ItemId=4840215855
&ResponseGroup=Medium,OfferFull

この例のレスポンスを抜粋すると

		<ListPrice>
      	<Amount>557</Amount> 
      	<CurrencyCode>JPY</CurrencyCode> 
      	<FormattedPrice>¥ 557</FormattedPrice> 
      </ListPrice>
      
      <Offers>
      	<TotalOffers>1</TotalOffers> 
      	<TotalOfferPages>1</TotalOfferPages> 
      	<Offer>
      		<Merchant>
      			<MerchantId>AN1VRQENFRJN5</MerchantId> 
      			<Name>Amazon.co.jp</Name> 
      		</Merchant>
      		<OfferAttributes>
      			<Condition>New</Condition> 
      		</OfferAttributes>
      		<OfferListing>
      			<Price>
      				<Amount>557</Amount> 
      				<CurrencyCode>JPY</CurrencyCode> 
      				<FormattedPrice>¥ 557</FormattedPrice> 
      			</Price>
      			<Availability>通常24 hours以内に発送</Availability> 
      		</OfferListing>
      	</Offer>
      </Offers>
こんな感じ ListPriceでは現在の価格 557が Amountで JPYつまり日本円で表記された価格が FormattedPriceで示されている
Offersでは Merchantで Amazon.co.jpつまりAmazonの正規販売品であることが、 Availabilityで在庫有りが示されている。 なおこの情報は執筆時点の物でアマゾンに在庫があることを示す物ではない。

Step 2: Create a shopping cart and add the item to it.
Step 2: ショッピングカートを作って商品を入れる

Amazonに問い合わせを行うためのREST request / URL:は以下のようになります。 

http://webservices.amazon.com/onca/xml?Service=AWSECommerceService &SubscriptionId=[your subscription ID here] &Operation=CartCreate &Item.1.ASIN=0486411214 &Item.1.Quantity=1

This operation creates a cart and returns to you a <Cart> element containing a CartId and HMAC -- identifiers that you must use for any future operations with the cart. For now, let's presume that the customer wants to purchase the contents of their cart immediately.
このオペレーションはカートを作成して、レスポンスを返す。レスポンスには<Cart>エレメントにCartIdHMACつまり今後カートを識別するのに必要なIDが含まれている。このIDはいろりろと使えるが、とりあえずは、お客がすぐに購入するとして例を続ける。

※訳注:当然、すぐには買わない場合にはカートを保存することができるんだよ?という事を暗に言っています。

If the product was actually not available when you attempted to add it to the cart, it would be added to the cart as a <SavedForLaterItem> rather than a <CartItem> in the <Cart> element.
もし、カートに商品を追加しようとしたときに、その商品が実際に購入可能ではなかった場合は<Cart>エレメントに<CartItem>ではなく <SavedForLaterItem>としてのカートに追加される。

※訳注:つまり、購入可能な商品はすぐに購入できる<CartItem>に、取り寄せ商品は<SavedForLaterItem>に追加される。

Step 3: Transfer the customer to Amazon to complete the purchase.
Step 3: 購入してもらうために顧客をアマゾンに転送してください。

Purchasing the cart couldn't be simpler. Just transfer the customer to the Cart/PurchaseURL that was returned by the CartCreate operation. To test this for yourself, copy the PurchaseURL to your browser and access the link. If you are not signed in to Amazon, you may be asked to do so. If you are an existing Amazon customer, the contents of the new cart will be merged with your existing cart. If you are not an existing Amazon customer, you will be asked to create a new account.
購入手続きオペレーション自体は簡単ですが、その過程はシンプルではありません。購入手続きそのものは非常に簡単です。単にCartCreateのレスポンスに含まれるCart/PurchaseURLに記述されているURLに顧客を転送するだけです。テストのために実際にリクエストのURLをクリックして表示されるPurchaseURLをブラウザにカット&ペーストしてみてください。もし、あなたがアマゾンにサインインしていなければ、サインインが求められるでしょうし、すでにアマゾンで購入済みの商品があれば、カートがマージされるでしょうし、アマゾンのアカウントを持っていなければ新規に作成することが求められれます。

Of course, since this is just a test, you probably don't want to complete the purchase process. Creating a cart does not obligate you to buy anything, it just sets the purchase process in motion. But clicking through to the PurchaseURL link will allow you to verify that the cart was created correctly and that a customer could, in fact, purchase the item or items they added to the cart.
もちろん、これは単にテストですから、実際に商品を購入することはないでしょう。カートを作成すること自体は購入行為とは何ら関係ありません。しかしPurchaseURLを実際にリンクすることで、商品がカートに追加され、アマゾンのカートにマージされる事が確認できるはずです。

※訳注:つまり、カートを作って、アマゾンに転送しただけでは購入したことにはならないので、気軽にテストしてみてくれということ。アマゾンのカートで買わない限りは実際に購入することにはなりませんが、アマゾンのカートの方で買った場合は、購入されてしまうので注意はしてください。

ちょっと危険ですが、訳者が上記2つをテストするためのサンプルを提示します。訳者はこのリンクを使ってまちがって、商品を購入してしまっても責任はとれません。購入する気が無い場合は、アマゾンノカートにマージされた後、購入をキャンセルしてください。

サンプル1.カートに追加してその結果を見る
http://webservices.amazon.co.jp/onca/xml?Service=AWSECommerceService
&SubscriptionId=0VE04X4B678E9B60S102
&Operation=CartCreate&Item.1.ASIN=4840215855
&Item.1.Quantity=1


サンプル2.カートに商品を追加して、アマゾンに転送する。クリックするといきなり転送しますので注意してください。画面が表示されたら削除ボタンで購入を削除してください。
http://s00.kokorohamoe.com/Amazon/sample2.php

If you are a member of the Amazon Associates program, you would want to specify your Associate tag in the cart operations, to ensure that you receive commissions on sales referred from your Web site.
もしあなたがアマゾンアソシエイトプログラムのメンバーであるならば、 cart オペレーションにAssociate tagをつけることで、あなたが別途規定されている販売の報酬を得ることを得ることを保証します。

ECS provides full management capabilities for the shopping cart--adding items, modifying quantities, deleting items, etc.
ECSはアイテムを複数追加したり、削除したり、あなたが商売をするのに十分な機能を提供します。

The previous example was to purchase an Amazon product. For non-Amazon vendors, it is not sufficient to just specify the ASIN when adding an item to the cart.
この例はアマゾンから商品を購入する例でした。しかし、中古の商品などの非アマゾン提供の商品をカートに入れる場合はASINだけでは十分ではありません。

Scenario: You wish to purchase a grill from a non-Amazon vendor.
前提: アマゾン以外の売り手からグリルを買うと仮定します。

Step 1: Look up the grill and availability.
Step 1: 売られているグリルを探します

Amazonに問い合わせを行うためのREST request / URL:は以下のようになります。 

http://webservices.amazon.com/onca/xml?Service=AWSECommerceService &SubscriptionId=[your subscription ID here] &Operation=ItemLookup
&IdType=ASIN &ItemId=B00006LS6X
&MerchantId=All
&ResponseGroup=Medium,OfferFull

Here is a locale-specific difference in ECS. Setting the MerchantId parameter to All returns all vendors including Amazon for the US, but returns all vendors EXCEPT Amazon for UK, DE and JP.
ここで地域ごとに実装に差分があることに気をつけてください。 MerchantIdを指定した場合に米国つまりUSではアマゾンを含むすべてのベンダーが表示されますが、UK, DE 、JPつまり、日本ではアマゾンは含まれません。

※訳注:日本では中古つまり個人がマーケットプレイスの中心な事も主理由かもしれません。

At time of writing, this ASIN produced several offers. As for the Amazon product above, each <Offer> contains an <OfferListing>. However an additional element, the OfferListingId is required to purchase non-Amazon products.
この問い合わせのASINではいくつかのofferエレメントを含んでいます。 サンプルはこちらアマゾンの商品のためには<Offer>に含まれる<OfferListing>がありました。しかし、マーケットプレイスの商品のためには<OfferListingId>エレメントが追加されることに注目してください。

Step 2: Create a cart and add the grill to the cart.
Step 2: カートを作成して商品を追加します.

This request uses an OfferListingId rather than ASIN when specifying the product to add to the cart. While ASINs are permanent identifiers, offer listings are not. You will therefore need to note the offer listing ID from the XML output returned by the previous REST request and copy it into this request:
このリクエストではカートに商品を追加するためにASINではなくOfferListingIdを使っていることに注目してください。ASINが恒久的な商品につけられた番号であるのに対して、OfferListingIdはそうではない商品につけられます。下記のリクエストを試すためにあなたは、上記リクエストで得られた、OfferListingIdをカット&ペーストする必要性があるでしょう。参考までに、レスポンスのサンプルをこちらに提示します。

Amazonに問い合わせを行うためのREST request / URL:は以下のようになります。 

http://webservices.amazon.com/onca/xml?Service=AWSECommerceService
&SubscriptionId=[your subscription ID here]
&Operation=CartCreate &Item.1.OfferListingId=5C1cZK
zqzVg2Yp6OhAvSD2%2BgnWFglKTz4vNkr9L%2B5pf5kb%2BqBviIbpia7hF2Ir1iPJcyTR6TVlg%3D
&Item.1.Quantity=1

As before you can test that the cart is correct by linking to Amazon through the PurchaseURL to verify that the product was correctly added to the cart.
前述のようにレスポンスに含まれる PurchaseURLをリンクしアマゾンに転送してチェックしてみてください。

※訳注:マーケットプレイスの商品は一品物であるため、時々刻々内容がかわります。実際にトライするよりかはサンプルをみて参考にするていどにしたほうが良いでしょう。さもなければ、実際にアプリケーションを君でテストする段階で確認する方が便利です。

Looking up Customers' Wish Lists and Registries
顧客のウイッシュリストや登録情報を検索する

Scenario: You know a customer's name and you want to look up the customer's wish list.
前提: あなたは顧客の名前とウイッシュリストを見たいと仮定する.

Step 1: Get the ID of the wish list.
Step 1: ウイッシュリストのIDを取得する

Amazonに問い合わせを行うためのREST request / URL:は以下のようになります。 

http://webservices.amazon.com/onca/xml?Service=AWSECommerceService &SubscriptionId=[your subscription ID here] &Operation=ListSearch &ListType=WishList &Name=Jeff%20Bezos

This search returns customer information, including WishList, but you could also search for WeddingRegistry or BabyRegistry lists in the same way. You can also specify an Email parameter (in place of the name parameter) to search by email address.
レスポンスのサンプルをここに提示します。 このレスポンスでウイッシュリストを含む顧客情報を取得できます。同様の方法で結婚祝い希望リストや出産祝い希望リストも取得することができます。また、名前からだけではなくnameパラメータの代わりにEmailパラメータを使うことにより電子メールからウイッシュリストを探すことができます。.

Step 2: Once you have identified the ListId, you can then retrieve the contents of the list with a request as shown below.
Step 2: リストのIDがわかれば、以下の方法でリストの中身を参照することができます。

Amazonに問い合わせを行うためのREST request / URL:は以下のようになります。 

http://webservices.amazon.com/onca/xml?Service=AWSECommerceService &SubscriptionId=[your subscription ID here] &Operation=ListLookup &ListType=WishList &ListId=BUWBWH9K2H77 &ResponseGroup=Request,ListFull

※訳注:レスポンスのサンプルは上のStep1のレスポンスのサンプルの下の方にあります。

The End of the Tour
最後に

This is the end of our tour of ECS. For more information on how to create your own Web site or application that takes advantage of ECS, consult our Getting Started Guide!
これでECSの機能紹介のツアーは終了です。 あなたのウエブサイトを作成するのに必要な情報を集めるためにGetting Started Guide!の項目を活用してください。



Amazon E-Commerce Service 4.0(和訳) Ver1.0
日本語化:心は萌え
原文:http://www.amazon.com/gp/aws/sdk/main.html?s=AWSEcommerceService&v=4-0&p=TourOfAws
原文の著作権はアマゾンに訳文の著作権は心は萌えに存在します。

トラックバックURL

この記事にコメントする

名前:
URL:
  情報を記憶: 評価: 顔