Reproduction or regular / train assignment

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 Specify response data format. Required.
Possible Values:
- xml: xml data format
- json: json data format
key string access key. Mandatory
serializeData string serialized route data. Mandatory
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
assignRoute string Path character string for seasonal allotment. A listing of Name of the station: Average route: Name of the station.... Can be omitted. 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.... Can be omitted. 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. Can be omitted. When omitted, the seasonal allotment path becomes regular.
coupon string Allotment coupon detail name. Can be omitted
sectionIndex int Section index. Required when lineCode or assignType are assigned.
lineCode string identification code for train. Can be omitted
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. Can be omitted.
Assignable variables:
- departure: departure time
- arrival: arrival time
date int Search date. Can be omitted.
Format: YYYYMMDD
Default: the current date
time int Search time. Can be omitted.
Format: HHMM
Default: the current time
resultDetail string Adds detailed information to the results. Can be omitted. 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. Can be omitted.
Assignable variables:
- true: Adds
- false: Does not add
Default: false
gcs string If the request and response include coordinates, the geodetic system for the coordinates can be specified. Also, in addition to the coordinate information request parameter, the gcs parameter can be set separately. May be omitted.
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 railway station time table 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.14.0.0" engineVersion="201404_01a">
  <Course dataType="onTimetable">
    <Route index="1" timeOnBoard="7" timeWalk="0" timeOther="0" transferCount="0" distance="58" exhaustCO2="110" exhaustCO2atPassengerCar="974">
      <Point index="1">
        <Prefecture code="13">
          <Name>東京都</Name>
        </Prefecture>
        <GeoPoint gcs="tokyo" lati_d="35.702110" longi_d="139.653027" lati="35.42.7.59" longi="139.39.10.89"/>
        <Station code="22671">
          <Name>高円寺</Name>
          <Yomi>こうえんじ</Yomi>
          <Type>train</Type>
        </Station>
      </Point>
      <Line index="1" fareIndex="1" teiki1Index="1" teiki3Index="1" teiki6Index="1" timeOnBoard="7" distance="58" stopStationCount="1" exhaustCO2="110" exhaustCO2atPassengerCar="974">
        <Name>JR中央線快速・東京行</Name>
        <Type>train</Type>
        <Color>250060002</Color>
        <DepartureState no="4">
          <Type>normal</Type>
          <Datetime operation="today">2014-03-24T15:41:00+09:00</Datetime>
        </DepartureState>
        <ArrivalState no="8">
          <Type>normal</Type>
          <Datetime operation="today">2014-03-24T15:48:00+09:00</Datetime>
        </ArrivalState>
        <TimeReliability>onTimetable</TimeReliability>
        <Destination>東京</Destination>
      </Line>
      <Point index="2">
        <Prefecture code="13">
          <Name>東京都</Name>
        </Prefecture>
        <GeoPoint gcs="tokyo" lati_d="35.6875" longi_d="139.703055" lati="35.41.15.0" longi="139.42.11.0"/>
        <Station code="22741">
          <Name>新宿</Name>
          <Yomi>しんじゅく</Yomi>
          <Type>train</Type>
        </Station>
      </Point>
    </Route>
    <Price kind="FareSummary">
      <Oneway>150</Oneway>
      <Round>300</Round>
    </Price>
    <Price kind="Fare" index="1" fromLineIndex="1" toLineIndex="1" fareRevisionStatus="none" selected="true">
      <Oneway>150</Oneway>
      <Round>300</Round>
      <Type>Fare</Type>
    </Price>
    <Price kind="Teiki1Summary">
      <Oneway>4730</Oneway>
    </Price>
    <Price kind="Teiki1" index="1" fromLineIndex="1" toLineIndex="1" fareRevisionStatus="none" selected="true">
      <Oneway>4730</Oneway>
      <Type>Teiki1</Type>
    </Price>
    <Price kind="Teiki3Summary">
      <Oneway>13470</Oneway>
    </Price>
    <Price>
    :
    </Price>
    <SerializeData>SHlUczAxLjAwLjA0rAQBAAAAJFEzAQIAAQAAAAAACAAB_38C__cDAAAAAAAAAAEAj1gAANVYAAAAAAAACgCBAAABMgIADQAPJFEzAa0DAAC0AwAAAgABAAEAAQABAAEAAAAAAAAA--T3221233232319:F3321122120:A23121141:--c003197761417cfffa1afc00cbbb2594d43f3041</SerializeData>
  </Course>
</ResultSet>
GET /v1/json/course/edit?key=your_access_key_here&serializeData=SHlUczAxLjAwLjA0rAQBAAAAJFEzAQIAAQAAAAAACAAB_38C__cDAAAAAAAAAAEAj1gAANVYAAAAAAAACgCBAAABMgIADQAPJFEzAa0DAAC0AwAAAgABAAEAAQABAAEAAAAAAAAA--T3221233232319:F3321122120:A23121141:--c003197761417cfffa1afc00cbbb2594d43f3041
{
  "ResultSet": {
    "apiVersion": "1.14.0.0",
    "engineVersion": "201404_01a",
    "Course": {
      "dataType": "onTimetable",
      "Route": {
        "timeOnBoard": "7",
        "timeWalk": "0",
        "timeOther": "0",
        "transferCount": "0",
        "distance": "58",
        "exhaustCO2": "110",
        "exhaustCO2atPassengerCar": "974",
        "Point": [
          {
            "Prefecture": {
              "code": "13",
              "Name": "東京都"
            },
            "GeoPoint": {
              "gcs": "tokyo",
              "lati_d": "35.702110",
              "longi_d": "139.653027",
              "lati": "35.42.7.59",
              "longi": "139.39.10.89"
            },
            "Station": {
              "code": "22671",
              "Name": "高円寺",
              "Yomi": "こうえんじ",
              "Type": "train"
            }
          },
          {
            "Prefecture": {
              "code": "13",
              "Name": "東京都"
            },
            "GeoPoint": {
              "gcs": "tokyo",
              "lati_d": "35.6875",
              "longi_d": "139.703055",
              "lati": "35.41.15.0",
              "longi": "139.42.11.0"
            },
            "Station": {
              "code": "22741",
              "Name": "新宿",
              "Yomi": "しんじゅく",
              "Type": "train"
            }
          }
        ],
        "Line": {
          "fareIndex": "1",
          "teiki1Index": "1",
          "teiki3Index": "1",
          "teiki6Index": "1",
          "timeOnBoard": "7",
          "distance": "58",
          "stopStationCount": "1",
          "exhaustCO2": "110",
          "exhaustCO2atPassengerCar": "974",
          "Name": "JR中央線快速・東京行",
          "Type": "train",
          "Color": "250060002",
          "DepartureState": {
            "no": "4",
            "Type": "normal",
            "Datetime": {
              "text": "2014-03-24T15:41:00+09:00",
              "operation": "today"
            }
          },
          "ArrivalState": {
            "no": "8",
            "Type": "normal",
            "Datetime": {
              "text": "2014-03-24T15:48:00+09:00",
              "operation": "today"
            }
          },
          "TimeReliability": "onTimetable",
          "Destination": "東京"
        }
      },
      "Price": [
        {
          "kind": "FareSummary",
          "Oneway": "150",
          "Round": "300"
        },
        {
          "kind": "Fare",
          "index": "1",
          "fromLineIndex": "1",
          "toLineIndex": "1",
          "fareRevisionStatus": "none",
          "selected": "true",
          "Oneway": "150",
          "Round": "300",
          "Type": "Fare"
        },
        {
          "kind": "Teiki1Summary",
          "Oneway": "4730"
        },
        {
          "kind": "Teiki1",
          "index": "1",
          "fromLineIndex": "1",
          "toLineIndex": "1",
          "fareRevisionStatus": "none",
          "selected": "true",
          "Oneway": "4730",
          "Type": "Teiki1"
        },
        {
          "kind": "Teiki3Summary",
          "Oneway": "13470"
        },
        {
          :
        }
      ],
      "SerializeData": "SHlUczAxLjAwLjA0rAQBAAAAJFEzAQIAAQAAAAAACAAB_38C__cDAAAAAAAAAAEAj1gAANVYAAAAAAAACgCBAAABMgIADQAPJFEzAa0DAAC0AwAAAgABAAEAAQABAAEAAAAAAAAA--T3221233232319:F3321122120:A23121141:--c003197761417cfffa1afc00cbbb2594d43f3041"
    }
  }
}