Reproduction or regular / train assignment


 Attention!

This page has not been fully translated into English yet. It is possible that some parts of description may contains old information. Please see Japanese Documents if you need the latest and accurate information.

serialized route data it is a function that lets you operate various routes. The function changes according to the combination of specified parameters.

GET /v1/{format}/course/edit

parameters

Name Type Description
format string Specifying the response data format. Required.
Possible values:
- xml: xml format data
- json: json format data.
key string Your access key. Required.
serializeData string serialized route data. Required
checkEngineVersion string When performing complete reproduction of serialized route data, activate the identical check of the engine version of the serialized data at the point of creation and of reproduction. If the engine version differs, it will return an error. Optional.
Possible values:
- true: Check
- false: Do not check
Default: true
assignTeikiSerializeData string 定期経路シリアライズデータ。省略可。assignRoute, assignDetailRouteと排他。
※ 詳しくは定期情報の取得定期情報の更新及び定期券利用時の運賃計算をご確認ください。
assignRoute string Path character string for seasonal allotment. A listing of Name of the station: Average route: Name of the station.... Optional. Mutually exclusive with assignDetailRoute.
Example: Koenji: JR Chuo Line Rapid: Shinjuku: JR Yamanote Line outer directions: Ikebukuro
assignDetailRoute string Detailed path character string for seasonal allotment. A listing of Station name: Average route: Direction: Station name.... Optional. Mutually exclusive with assignRoute.
Example: Koenji: JR Chuo Line Rapid: Up: Shinjuku: JR Yamanote Line outer directions: Down: Ikebukuro
assignNikukanteikiIndex int If the seasonal allotment path is two-zone commuter pass, the PassStatusIndex, which expresses that state, is assigned. multiple specifications is possible. In the case the indexes of the same section have been assigned during multiple assignment, one of them is applied. Optional. When omitted, the seasonal allotment path becomes regular.
coupon string Allotment detail information of coupon ticket name. Optional.
addAssignStatus string 定期券などの利用時に、レスポンスに割り当てステータスを付加します。assignRoute, assignDetailRoute, assignTeikiSerializeDataのいずれか指定時のみ有効。省略可。
指定できる値:
- true: 割り当てステータスを付加する
- false: 割り当てステータスを付加しない
Default: false
※ 現時点では回数券の利用時には未対応です。
※ 詳しくは定期券利用時の運賃計算 > note及び更新判定ステータスによる判定をご確認ください。
sectionIndex int Section index. Required when lineCode or assignType are assigned.
lineCode string identification code for train. Optional.
For more information, please click here.
assignInstruction string Repeated search mode at the moment of allocation.
Variables which can be assigned:
- SearchAll: Does a repeated search through all paths
- SearchAfter: Searches after the assigned section again
- SearchBefore: Searches before the assigned section again
- Replace: Replaces the assigned section
- AutoNext: Allots the most suitable schedule to the train that is next to depart.
- AutoPrevious: Allots the most suitable schedule to the train that is previous to depart.
For more information, please click here.
assignType string Handling of the alloted time and date. Optional.
Assignable variables:
- departure: departure time
- arrival: arrival time
date int Search date. Optional.
Format: YYYYMMDD
Default: the current date
time int Search time. Optional.
Format: HHMM
Default: the current time
resultDetail string Adds detailed information to the results. Optional. When omitted, the results are regular.
Assignable variables:
- addCorporation: Adds the corporation to the route.
addOperationLinePattern string Adds an operation route pattern which ties up with the path section in the results.
Effective only when the search is being done according to a schedule. Optional.
Assignable variables:
- true: Adds
- false: Does not add
Default: false
addChange string 結果に次の路線への乗り換えに便利な乗車位置情報を付加します。ダイヤによる探索時のみ有効。省略可。
指定できる値:
- true: 付加します
- false: 付加しません
Default: false
addStop string 経路の区間に停車駅一覧を付加する。ダイヤによる探索時のみ有効。省略可。
指定できる値:
- true: 付加します
- false: 付加しません
Default: false
gcs string If the request and response include coordinates, the geodetic system for the coordinates can be specified. coordinate information of the request parameters can be set separately from this parameter. Optional.
Possible values:
- tokyo: Tokyo Geodetic System
- wgs84: World Geodetic System
Default: tokyo

lineCode

lineCode is a variable that specifies trains which run in the section.

In this variable, use the value of ResultSet / Line / code which is included in the response of average rail information when the serialized route data and section index is specified.

ResultSet / TimeTable / HourTable / MinuteTable / Stop / lineCode included in the results of timetable of train (old version) cannot be used.

assignInstruction

As AutoNext and AutoPrevious are allocated to a train automatically, even if the lineCode and the sectionIndex parameters are assigned, it won't affect the results. In the case you assign AutoNext or AutoPrevious to the assignInstruction parameter, please assign only the serializeData and assignInstruction parameters.

response

It is equivalent to route search

example

GET /v1/xml/course/edit?key=your_access_key_here&serializeData=SHlUczAxLjAwLjA0rAQBAAAAJFEzAQIAAQAAAAAACAAB_38C__cDAAAAAAAAAAEAj1gAANVYAAAAAAAACgCBAAABMgIADQAPJFEzAa0DAAC0AwAAAgABAAEAAQABAAEAAAAAAAAA--T3221233232319:F3321122120:A23121141:--c003197761417cfffa1afc00cbbb2594d43f3041
<?xml version="1.0" encoding="UTF-8"?>
<ResultSet apiVersion="1.27.0.0" engineVersion="201806_02a">
  <Course dataType="onTimetable">
    <Route timeOther="0" timeOnBoard="7" exhaustCO2="127" index="1" exhaustCO2atPassengerCar="974" distance="58" timeWalk="0" transferCount="0">
      <Point index="1">
        <Station code="22671">
          <Name>高円寺</Name>
          <Type>train</Type>
          <Yomi>こうえんじ</Yomi>
        </Station>
        <Prefecture code="13">
          <Name>東京都</Name>
        </Prefecture>
        <GeoPoint longi="139.39.10.89" lati="35.42.7.59" longi_d="139.653027" gcs="tokyo" lati_d="35.70211"/>
      </Point>
      <Line stopStationCount="1" teiki3Index="1" teiki6Index="1" timeOnBoard="7" track="railway" exhaustCO2="127" fareIndex="1" index="1" exhaustCO2atPassengerCar="974" distance="58" teiki1Index="1">
        <Name>JR中央線快速・東京行</Name>
        <Type>train</Type>
        <ArrivalState no="8">
          <Type>normal</Type>
          <Datetime operation="today">2018-06-05T12:55:00+09:00</Datetime>
        </ArrivalState>
        <Destination>東京</Destination>
        <TimeReliability>onTimetable</TimeReliability>
        <DepartureState no="4">
          <Type>normal</Type>
          <Datetime operation="today">2018-06-05T12:48:00+09:00</Datetime>
        </DepartureState>
        <LineSymbol code="8">
          <Name>JC</Name>
        </LineSymbol>
        <Color>250060002</Color>
      </Line>
      <Point index="2">
        <Station code="22741">
          <Name>新宿</Name>
          <Type>train</Type>
          <Yomi>しんじゅく</Yomi>
        </Station>
        <Prefecture code="13">
          <Name>東京都</Name>
        </Prefecture>
        <GeoPoint longi="139.42.11.0" lati="35.41.15.0" longi_d="139.703056" gcs="tokyo" lati_d="35.6875"/>
      </Point>
    </Route>
    <Price kind="FareSummary">
      <Oneway>160</Oneway>
      <Round>320</Round>
    </Price>
    <Price fareRevisionStatus="none" toLineIndex="1" fromLineIndex="1" kind="Fare" index="1" selected="true">
      <Type>Fare</Type>
      <Oneway>160</Oneway>
      <RevisionStatus>latest</RevisionStatus>
      <Round>320</Round>
    </Price>
    :
    <SerializeData>VkV4QaECp4jIAsMCpgEz7noDpgEz7nkEkcIBQwAAAAKmATPueQPJAQECAQMBBAEHAQgBCgIPQv9_EKX_9wWUwQKlWI_BAqVY1cECpVkswQKlWQMGkcMBAQIBA8cBpVXqAhIDFAUDBkUxMTM4VAcDCAIHkcUBpgEz7n0DpQMABKUDBwUACAAIkcQEAQUBB6RtCAEJkcEDAQ|RxQGSAAECkcMBAAIAAwADkcMBAAIAAwAEkQAFkQA*--T3221233232319:F332112212000:A23121141:--dcfa423d1113de174649d873e2a7a4167465d1c4--0--0--0--182</SerializeData>
  </Course>
</ResultSet>
GET /v1/json/course/edit?key=your_access_key_here&serializeData=SHlUczAxLjAwLjA0rAQBAAAAJFEzAQIAAQAAAAAACAAB_38C__cDAAAAAAAAAAEAj1gAANVYAAAAAAAACgCBAAABMgIADQAPJFEzAa0DAAC0AwAAAgABAAEAAQABAAEAAAAAAAAA--T3221233232319:F3321122120:A23121141:--c003197761417cfffa1afc00cbbb2594d43f3041
{
  "ResultSet":{
    "apiVersion":"1.27.0.0",
    "engineVersion":"201806_02a",
    "Course":{
      "dataType":"onTimetable",
      "SerializeData":"VkV4QaECp4jIAsMCpgEz7noDpgEz7nkEkcIBQwAAAAKmATPueQPJAQECAQMBBAEHAQgBCgIPQv9_EKX_9wWUwQKlWI_BAqVY1cECpVkswQKlWQMGkcMBAQIBA8cBpVXqAhIDFAUDBkUxMTM4VAcDCAIHkcUBpgEz7n0DpQMABKUDBwUACAAIkcQEAQUBB6RtCAEJkcEDAQ|RxQGSAAECkcMBAAIAAwADkcMBAAIAAwAEkQAFkQA*--T3221233232319:F332112212000:A23121141:--dcfa423d1113de174649d873e2a7a4167465d1c4--0--0--0--182",
      "Price":{
        {
          "kind":"FareSummary",
          "Oneway":"160",
          "Round":"320"
        },
        {
          "fareRevisionStatus":"none",
          "toLineIndex":"1",
          "fromLineIndex":"1",
          "kind":"Fare",
          "index":"1",
          "selected":"true",
          "Type":"Fare",
          "Oneway":"160",
          "RevisionStatus":"latest",
          "Round":"320"
        },
        {
          :
        }
      ],
      "Route":{
        "timeOther":"0",
        "timeOnBoard":"7",
        "exhaustCO2":"127",
        "exhaustCO2atPassengerCar":"974",
        "distance":"58",
        "timeWalk":"0",
        "transferCount":"0",
        "Line":{
          "stopStationCount":"1",
          "teiki3Index":"1",
          "teiki6Index":"1",
          "timeOnBoard":"7",
          "track":"railway",
          "exhaustCO2":"127",
          "fareIndex":"1",
          "exhaustCO2atPassengerCar":"974",
          "distance":"58",
          "teiki1Index":"1",
          "Name":"JR中央線快速・東京行",
          "Type":"train",
          "ArrivalState":{
            "no":"8",
            "Type":"normal",
            "Datetime":{
              "text":"2018-06-05T12:55:00+09:00",
              "operation":"today"
            }
          },
          "Destination":"東京",
          "TimeReliability":"onTimetable",
          "DepartureState":{
            "no":"4",
            "Type":"normal",
            "Datetime":{
              "text":"2018-06-05T12:48:00+09:00",
              "operation":"today"
            }
          },
          "LineSymbol":{
            "code":"8",
            "Name":"JC"
          },
          "Color":"250060002"
        },
        "Point":{
          {
            "Station":{
              "code":"22671",
              "Name":"高円寺",
              "Type":"train",
              "Yomi":"こうえんじ"
            },
            "Prefecture":{
              "code":"13",
              "Name":"東京都"
            },
            "GeoPoint":{
              "longi":"139.39.10.89",
              "lati":"35.42.7.59",
              "longi_d":"139.653027",
              "gcs":"tokyo",
              "lati_d":"35.70211"
            }
          },
          {
            "Station":{
              "code":"22741",
              "Name":"新宿",
              "Type":"train",
              "Yomi":"しんじゅく"
            },
            "Prefecture":{
              "code":"13",
              "Name":"東京都"
            },
            "GeoPoint":{
              "longi":"139.42.11.0",
              "lati":"35.41.15.0",
              "longi_d":"139.703056",
              "gcs":"tokyo",
              "lati_d":"35.6875"
            }
          }
        ]
      }
    }
  }
}