API詳細
楽天トラベルホテルチェーンAPI (version:2013-10-24)
楽天トラベルホテルチェーンAPIは、楽天トラベルで用いられるホテルチェーンの情報を取得することが可能なAPIです。
リクエストURL
https://openapi.rakuten.co.jp/engine/api/Travel/GetHotelChainList/20131024?[parameter]=[value]…
※JSONP形式は、JSON形式で入力パラメーターにcallbackを指定することで出力されます。
ホテルチェーンの情報を取得する場合のリクエストURLは下記になります。(実際には改行せずに1行につなげてリクエストしてください。)
https://openapi.rakuten.co.jp/engine/api/Travel/GetHotelChainList/20131024?
applicationId=[アプリID]
&format=xml
※短い時間の間に大量に、同一のリクエストURLへアクセスすると、一定時間利用できなくなる場合がございます。テストの際にはご注意ください。
Input headers
楽天トラベルホテルチェーン API input headers version:2013-10-24
| ID | Header name | Header | Type (maximum bytes in parentheses) | Required | Default | Comment |
|---|---|---|---|---|---|---|
| Division: Shared headers | ||||||
| 1 | Access key token【NEW】 | Authorization | String | - |
In the form of Bearer {accessKey}Can be provided in either header or as parameter Required along with app ID Check here |
|
入力パラメーター
楽天トラベルホテルチェーンAPI(GetHotelChainList) 入力パラメーター version:2013-10-24
| ID | 項目名 | パラメーター | 型(括弧内は最大バイト数) | 必須 | デフォルト | 備考 |
|---|---|---|---|---|---|---|
| Division: Shared parameters | ||||||
| 1 | App ID | applicationId | String | - |
Required along with access key Check here |
|
| 2 | Access Key【NEW】 | accessKey | String | - |
Can be provided in either header or as parameter Required along with app ID Check here |
|
| 3 | Affiliate ID | affiliateId | String | - | - | Check here |
| 4 | Response format | format | String | - | json | Either JSON or XML When JSON is specified the callback parameter can also be set in order to use JSONP. |
| 5 | Callback function name | callback | String | - | - | Function name to be used with the JSONP output (UTF-8 URL encoded string) Alphanumeric characters, periods, or underscores |
| 6 | Choosing output fields | elements | String | - | - |
By default, API response all of the fields. You can change response fields by this parameter. This parameter's data is separated by comma(,). For example, following request will response only itemName, itemPrice and itemUrl. elements=itemName,itemPrice,itemUrl
|
| 7 | Format version | formatVersion | int | - | 1 |
Response format version. If
In case of {"items": [
{"item": {
"itemName": "a",
"itemPrice": 10
}},
{"item": {
"itemName": "b",
"itemPrice": 20
}}
]}
In case of {"items": [
{
"itemName": "a",
"itemPrice": 10
},
{
"itemName": "b",
"itemPrice": 20
}
]}
|
出力パラメーター
楽天トラベルホテルチェーンAPI(GetHotelChainList) 出力パラメーター version:2013-10-24
| ID | 大分類 | 分類 | 項目名 | パラメーター | 備考 |
|---|---|---|---|---|---|
| 1 | 大区分 largeClasses "<largeClasses> ~ </largeClasses>"内に複数の" <largeClass> ~ </largeClass>"が表示される |
大区分コード | largeClassCode | ||
| 2 | ホテルチェーン情報 hotelChains "<hotelChains> ~ </hotelChains>"内に複数の" <hotelChain> ~ </hotelChain>"が表示される |
ホテルチェーンコード | hotelChainCode | ||
| 3 | ホテルチェーン名称 | hotelChainName | |||
| 4 | ホテルチェーンカナ名称 | hotelChainNameKana | |||
| 5 | ホテルチェーンコメント | hotelChainComment | 各ホテルチェーンの紹介文 |
Error
Error messages are displayed in the form of HTTP status code and its response body
| HTTP Status Code | Description | Response body example (JSON) |
|---|---|---|
| 400 | Parameter error (or required parameters were insufficient) |
If applicationId is not set
If keyword is not valid (only 1 character given, etc.)
|
| 404 | If data not found. |
|
| 429 | Too many requests |
This error will be displayed if the number of API requests has been exceeded.
|
| 500 | Internal error in Rakuten Web Service | An internal system error occured. If you continue seeing this message for a long period, please give your inquiry via this link
|
| 503 | Unavailable due to maintenance or overloaded |
Maintenance (the API name will be displayed in XXX/XXX)
|
Response body format is display in format.
| format | Error output example |
|---|---|
| json |
|
| xml |
|