経路例3: 田町 ⇒ 品川 ⇒ 名古屋
- 経路の概要
- 乗車券は「田町~名古屋」で算出されるが、特急料金は「品川~名古屋」で出力される
- 自由席、指定席、グリーン席の3種類の特急料金が出力される
■経路全体の運賃
"move": { "transit_count": 1, "fare": { "unit_1": 4180.0, // 自由席特急料金 "unit_2": 4720.0, // 指定席特急料金 "unit_0": 6380.0, // 普通運賃(乗車券) "unit_3": 8580.0 // グリーン席席特急料金 }, "type": "move", "from_time": "2020-06-29T10:03:00+09:00", "to_time": "2020-06-29T12:00:00+09:00", "time": 117, "distance": 361400 }
■区間ごとの運賃
- 「sections>transport>fare_break」配下にある情報から分かること
- 当該区間に存在するすべての料金区分が取得できます。
- それぞれの料金区分について、当該区間で運賃計算を行ったかどうかの結果が取得できます。
- 「true」:当該区間で運賃を算出したことを示す。金額は対応する「sections>transport>fare」を参照することで取得します。
- 「false」:次区間以降に運賃計算を持ち越したことを示す。つまり、他路線への乗り入れ「有」と判断します。
"sections": [ { "type": "point", "coord": { "lat": 35.645738, "lon": 139.747527 }, "name": "田町(東京都)", "node_id": "00006495", "node_types": [ "station" ], "numbering": { // 一部省略 } }, { "next_transit": true, "transport": { "getoff": "前・中・後", "color": "#00B2E5", "name": "JR京浜東北線・根岸線快速", "company": { "id": "00000004", "name": "JR東日本" }, "links": [ { "id": "00000131", "name": "JR京浜東北線", "direction": "down", "destination": { "name": "品川", "id": "00007825" }, "from": { "name": "田町(東京都)", "id": "00006495" }, "to": { "name": "品川", "id": "00007825" }, "is_timetable": "false" } ], "id": "00000334", "type": "普通", "fare_break": { "unit_0": false, // fare_breakがすべて「false」の場合 "unit_254": false // 「transport>fare」オブジェクト自体が // 出力されない } }, "type": "move", "move": "local_train", "from_time": "2020-06-29T10:03:00+09:00", "to_time": "2020-06-29T10:07:00+09:00", "time": 4, "distance": 2200, "line_name": "JR京浜東北線・根岸線快速", "transfer_seconds": 480 }, { "type": "point", "coord": { "lat": 35.628062, "lon": 139.7389 }, "name": "品川", "node_id": "00007825", "node_types": [ "station" ], "numbering": { // 一部省略 } }, { "transport": { "fare": { // ↓の「fare_break」が「true」の区分のみ運賃を出力 "unit_0": 6380.0, "unit_254": 0.0, // この値はダミー値のため無視する "unit_2": 4720.0, "unit_1": 4180.0, "unit_3": 8580.0 }, "color": "#0000FF", "name": "のぞみ(東海道)", "fare_season": "slack", "company": { "id": "00000003", "name": "JR東海" }, "links": [ { "id": "00000110", "name": "JR東海道新幹線", "direction": "down", "destination": { "name": "名古屋", "id": "00008576" }, "from": { "name": "品川", "id": "00007825" }, "to": { "name": "名古屋", "id": "00008576" }, "is_timetable": "false" } ], "id": "00000004", "type": "新幹線", "fare_break": { "unit_0": true, // ↑の「fare」を参照して運賃を取得 "unit_254": true, // unit_254はダミー値なので無視する "unit_2": true, // ↑の「fare」を参照して運賃を取得 "unit_1": true, // ↑の「fare」を参照して運賃を取得 "unit_3": true // ↑の「fare」を参照して運賃を取得 }, "fare_detail": [ { "start": { "node_id": "00006495", "name": "田町(東京都)" }, "goal": { "node_id": "00008576", "name": "名古屋" }, "fare": 6380.0, "id": "0" }, { "start": { "node_id": "00006495", "name": "田町(東京都)" }, "goal": { "node_id": "00008576", "name": "名古屋" }, "fare": 0.0, "id": "254" }, { "start": { "node_id": "00007825", "name": "品川" }, "goal": { "node_id": "00008576", "name": "名古屋" }, "fare": 4720.0, "id": "2" }, { "start": { "node_id": "00007825", "name": "品川" }, "goal": { "node_id": "00008576", "name": "名古屋" }, "fare": 4180.0, // デフォルトの特急料金を示すフラグ // id=1なので「unit_1(自由席料金)」を意味する "default_extra_fare": true, "id": "1" }, { "start": { "node_id": "00007825", "name": "品川" }, "goal": { "node_id": "00008576", "name": "名古屋" }, "fare": 8580.0, "id": "3" } ] }, "type": "move", "move": "superexpress_train", "from_time": "2020-06-29T10:25:00+09:00", "to_time": "2020-06-29T12:00:00+09:00", "time": 95, "distance": 359200, "line_name": "のぞみ(東海道)" }, { "type": "point", "coord": { "lat": 35.170451, "lon": 136.881095 }, "name": "名古屋", "node_id": "00008576", "node_types": [ "station", "shuttle_busstop" ] } ]