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.
- In the case only serializeData has been assigned, a path replication is carried out.
- In the case serializeData and assignRoute have been assigned, assignRoute is allotted to the serializeData path replication as a seasonal ticket path.
- In the case serializeData and coupon have been assigned, a ticket book is allotted to the serializeData path replication.
- In the case serializeData, lineCode, sectionIndex and assignInstruction have been assigned, the assigned section of the serializeData path replication is replaced with the assigned train.
- In the case serializeData, sectionIndex, assignType, date and time have been assigned, the assigned section of the serializeData path replication is searched again with the assigned time and date.
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 |
offpeakTeikiMode | string | オフピーク定期券利用時の計算モード。 assignRoute, assignDetailRoute, assignTeikiSerializeDataのいずれか指定時のみ指定可。 省略可。省略時は、指定された定期券の種類に関わらず、通常の定期券利用時の運賃計算となります(オフピーク定期券として扱われません)。 指定できる値: - offpeakTime: オフピーク時間帯の利用とみなして運賃計算する - peakTime: ピーク時間帯の利用とみなして運賃計算する ※詳しくは定期券利用時の運賃計算 > 定期情報を「オフピーク定期券」として利用する場合および定期割り当てステータスコード > オフピーク定期券を利用する場合をご確認ください。 |
assignPassClassIndex | int | 定期券利用時の運賃計算を行う際に、利用する定期経路に定期券の種類が複数ある場合は、PassStatus(kind="nikukanteiki"またはkind="bycorporation")のindexの値を指定することで、定期券の種類を切り替えることができます。 複数指定可。同一区間のインデックスが複数指定された場合はどれか一つを適用します。 assignRoute, assignDetailRoute, assignTeikiSerializeDataのいずれか指定時のみ有効。 省略可。省略時は、デフォルトの定期券となります。 assignNikukanteikiIndexと排他。 ※ 詳しくは、二区間定期券などの特殊な定期券利用時の運賃計算をご確認ください。 |
assignNikukanteikiIndex | int | assignPassClassIndexと同様。※ 現在は、非推奨のパラメータとなります。これから開発を始める方は、assignPassClassIndexをご利用ください。 |
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 |
interruptTransferStationCodeList | string | 乗換しない駅リスト。乗り換えたくない駅の駅コードを指定します。複数指定可。最大30件。省略可。省略時は制限のない通常の探索となります。 |
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
※ リクエスト例では、シリアライズデータ作成時のエンジンバージョンと再現時のエンジンバージョンが同一かチェックするcheckEngineVersionパラメータをfalse(チェックしない)にしております。詳しくは経路シリアライズデータの有効期限をご覧ください。
GET /v1/xml/course/edit?key=your_access_key_here&serializeData=VkV4QaECp_PIAsMCpgE0sRMDpgE0sQIEkcIBQwAAAAKmATSxAgPJAQECAQMBBAEHAQgBCgIPQv9_EKX_9wWUwQKlWI_BAqVY1cECpVkswQKlWQ8GkcMBAQIBA8cBpdeGAg0DDwUDBkUxMTYwVAcDCAIHkcUBpgE0sLgDpQLaBKUC4AUACAAIkcQEAQUBB6RtCAEJkcEDAQ|RxQGSAAECkcMBAAIAAwADkcMBAAIAAwAEkQAFkQA*--T32212332323191:F33211221200001:A23121141:--fa8db1aa39cecd2f0e16d84cd0ddca1eb319dae0--0--0--0--182&checkEngineVersion=false
<?xml version="1.0" encoding="UTF-8"?>
<ResultSet apiVersion="1.27.0.0" engineVersion="202304_02a">
<Course dataType="onTimetable">
<Route timeOther="0" timeOnBoard="6" exhaustCO2="98" index="1" exhaustCO2atPassengerCar="754" 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="6" track="railway" exhaustCO2="98" fareIndex="1" index="1" exhaustCO2atPassengerCar="754" distance="58" trainID="1160T" teiki1Index="1">
<Name>JR中央線快速・東京行</Name>
<Type>train</Type>
<ArrivalState no="7">
<Type>normal</Type>
<Datetime operation="today">2023-03-28T12:16:00+09:00</Datetime>
</ArrivalState>
<Destination>東京</Destination>
<TimeReliability>onTimetable</TimeReliability>
<DepartureState no="4">
<Type>normal</Type>
<Datetime operation="today">2023-03-28T12:10:00+09:00</Datetime>
</DepartureState>
<LineSymbol code="8">
<Name>JC</Name>
</LineSymbol>
<Color>255090035</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 fareRevisionStatus="none" toLineIndex="1" fromLineIndex="1" kind="Fare" index="1" selected="true">
<Type>Fare</Type>
<Oneway>170</Oneway>
<RevisionStatus>latest</RevisionStatus>
<Round>340</Round>
</Price>
<Price kind="FareSummary">
<Oneway>170</Oneway>
<Round>340</Round>
</Price>
:
<SerializeData>VkV4QaECp_PIAsMCpgE0sRMDpgE0sQIEkcIBQwAAAAKmATSxAgPJAQECAQMBBAEHAQgBCgIPQv9_EKX_9wWUwQKlWI_BAqVY1cECpVkswQKlWQ8GkcMBAQIBA8cBpdeGAg0DDwUDBkUxMTYwVAcDCAIHkcUBpgE0sLgDpQLaBKUC4AUACAAIkcQEAQUBB6RtCAEJkcEDAQ|RxQGSAAECkcMBAAIAAwADkcMBAAIAAwAEkQAFkQA*--T32212332323191:F33211221200001:A23121141:--fa8db1aa39cecd2f0e16d84cd0ddca1eb319dae0--0--0--0--182</SerializeData>
<Teiki>
<SerializeData>VkV4QaECpyvIAQEDpgE0sLgEksEBpViPwQGlWNUFkcMBAQOkbQSlWNUHkcUBpViPAqVY1QMABAAFAAgBCgEMAA**--21d00035092c4eb05d1c7ffa49c852cd26a5dda0--1--64</SerializeData>
<DisplayRoute>高円寺--JR中央線快速--新宿</DisplayRoute>
</Teiki>
</Course>
</ResultSet>
GET /v1/json/course/edit?key=your_access_key_here&serializeData=VkV4QaECp_PIAsMCpgE0sRMDpgE0sQIEkcIBQwAAAAKmATSxAgPJAQECAQMBBAEHAQgBCgIPQv9_EKX_9wWUwQKlWI_BAqVY1cECpVkswQKlWQ8GkcMBAQIBA8cBpdeGAg0DDwUDBkUxMTYwVAcDCAIHkcUBpgE0sLgDpQLaBKUC4AUACAAIkcQEAQUBB6RtCAEJkcEDAQ|RxQGSAAECkcMBAAIAAwADkcMBAAIAAwAEkQAFkQA*--T32212332323191:F33211221200001:A23121141:--fa8db1aa39cecd2f0e16d84cd0ddca1eb319dae0--0--0--0--182&checkEngineVersion=false
{
"ResultSet": {
"apiVersion": "1.27.0.0",
"engineVersion": "202304_02a",
"Course": {
"dataType": "onTimetable",
"SerializeData": "VkV4QaECp_PIAsMCpgE0sRMDpgE0sQIEkcIBQwAAAAKmATSxAgPJAQECAQMBBAEHAQgBCgIPQv9_EKX_9wWUwQKlWI_BAqVY1cECpVkswQKlWQ8GkcMBAQIBA8cBpdeGAg0DDwUDBkUxMTYwVAcDCAIHkcUBpgE0sLgDpQLaBKUC4AUACAAIkcQEAQUBB6RtCAEJkcEDAQ|RxQGSAAECkcMBAAIAAwADkcMBAAIAAwAEkQAFkQA*--T32212332323191:F33211221200001:A23121141:--fa8db1aa39cecd2f0e16d84cd0ddca1eb319dae0--0--0--0--182",
"Price": [
{
"fareRevisionStatus": "none",
"toLineIndex": "1",
"fromLineIndex": "1",
"kind": "Fare",
"index": "1",
"selected": "true",
"Type": "Fare",
"Oneway": "170",
"RevisionStatus": "latest",
"Round": "340"
},
{
"kind": "FareSummary",
"Oneway": "170",
"Round": "340"
},
:
],
"Teiki": {
"SerializeData": "VkV4QaECpyvIAQEDpgE0sLgEksEBpViPwQGlWNUFkcMBAQOkbQSlWNUHkcUBpViPAqVY1QMABAAFAAgBCgEMAA**--21d00035092c4eb05d1c7ffa49c852cd26a5dda0--1--64",
"DisplayRoute": "高円寺--JR中央線快速--新宿"
},
"Route": {
"timeOther": "0",
"timeOnBoard": "6",
"exhaustCO2": "98",
"exhaustCO2atPassengerCar": "754",
"distance": "58",
"timeWalk": "0",
"transferCount": "0",
"Line": {
"stopStationCount": "1",
"teiki3Index": "1",
"teiki6Index": "1",
"timeOnBoard": "6",
"track": "railway",
"exhaustCO2": "98",
"fareIndex": "1",
"exhaustCO2atPassengerCar": "754",
"distance": "58",
"trainID": "1160T",
"teiki1Index": "1",
"Name": "JR中央線快速・東京行",
"Type": "train",
"ArrivalState": {
"no": "7",
"Type": "normal",
"Datetime": {
"text": "2023-03-28T12:16:00+09:00",
"operation": "today"
}
},
"Destination": "東京",
"TimeReliability": "onTimetable",
"DepartureState": {
"no": "4",
"Type": "normal",
"Datetime": {
"text": "2023-03-28T12:10:00+09:00",
"operation": "today"
}
},
"LineSymbol": {
"code": "8",
"Name": "JC"
},
"Color": "255090035"
},
"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"
}
}
]
}
}
}
}