Home      API一覧     楽天トラベル地区コードAPI









楽天トラベル地区コードAPI(GetAreaClass) 入力パラメーター version:2013-10-24

ID 項目名 パラメーター 型(括弧内は最大バイト数) 必須 デフォルト 備考
Division: Shared parameters
1 App ID applicationId String 必須 - Check here
2 Affiliate ID affiliateId String - - Check here
3 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.
4 Callback function name callback String - - Function name to be used with the JSONP output
(UTF-8 URL encoded string)
Alphanumeric characters, periods, or underscores
5 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.
6 Format version formatVersion int - 1

Response format version.

If formatVersion=2 is set, the response format (JSON) will be improved.

In case of formatVersion=1 :
Our API response will be returned in Array format as the followings.
You would need to use notation items[0].item.itemName To access itemName parameter.

{"items": [
    {"item": {
        "itemName": "a",
        "itemPrice": 10
    {"item": {
        "itemName": "b",
        "itemPrice": 20

In case of formatVersion=2 :
Our API response will be returned in Array format as the followings.
You can use notation items[0].itemName To access itemName parameter.

{"items": [
        "itemName": "a",
        "itemPrice": 10
        "itemName": "b",
        "itemPrice": 20


楽天トラベル地区コードAPI(GetAreaClass) 出力パラメーター version:2013-10-24

ID 大分類 分類 項目名 パラメーター 備考
1 地区コード
"<largeClasses> ~ </largeClasses>"内に複数の
"<largeClass> ~ </largeClass>"が表示される
大区分コード largeClassCode 例) japan
2 大区分名称 largeClassName 例) 日本
3 中区分
"<middleClasses> ~ </middleClasses>"内に複数の
"<middleClass> ~ </middleClass>"が表示される
中区分コード middleClassCode 例) tokyo
4 中区分名称 middleClassName 例) 東京
5 小区分
"<smallClasses> ~ </smallClasses>"内に複数の
"<smallClass> ~ </smallClass>"が表示される
小区分コード smallClassCode 例) tokyo
6 小区分名称 smallClassName 例) 東京23区
7 細区分
"<detailClasses> ~ </detailClasses>"内に複数の
"<detailClass> ~ </detailClass>"が表示される
細区分コード detailClassCode 例) A
8 細区分名称 detailClassName 例) 東京駅・銀座・日本橋


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

    "error": "wrong_parameter",
    "error_description": "specify valid applicationId"

If keyword is not valid (only 1 character given, etc.)

    "error": "wrong_parameter",
    "error_description": "keyword parameter is not valid"
404 If data not found.
    "error": "not_found",
    "error_description": "not found"
429 Too many requests

This error will be displayed if the number of API requests has been exceeded.
Please try access again after an amount of time.

    "error": "too_many_requests",
    "error_description": "number of allowed requests has been exceeded for this API. please try again soon."
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

    "error": "system_error",
    "error_description": "api logic error"
503 Unavailable due to maintenance or overloaded

Maintenance (the API name will be displayed in XXX/XXX)

    "error": "service_unavailable",
    "error_description": "XXX/XXX is under maintenance"

Response body format is display in format.

format Error output example
    "error": "wrong_parameter",
    "error_description": "page must be a number"
<?xml version="1.0" encoding="UTF-8"?>
    <error_description>page must be a number</error_description>