Calculate commuter pass refund
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.
It will acquire multiple combinations of commuter passes that will be the source for calculating reimbursement.
GET /v1/{format}/course/repayment
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 |
startDate | int | Valid start date of the commuter ticket. Optional. Format: YYYYMMDD Default: Current date |
buyDate | int | Purchase date of the commuter ticket. Optional. Format: YYYYMMDD Default: Handled as the same date as the valid start date |
repaymentDate | int | Refund date of the commuter ticket. Optional. Format: YYYYMMDD Default: Current date |
validityPeriod | int | Valid period of the commuter ticket. Optional. Possible values: - 1: One month - 3: Three months - 6: Six months - 12: Twelve months Default: Six |
changeSection | string | Whether to use the calculation formula at the point of changing section for the commuter ticket refund, or not. Optional. Possible values: - true: Use - false: Do not use Default: false ※ レスポンスに区間変更時の払い戻し金額と解約時の払い戻し金額のどちらが返却されたかについては、定期券の払い戻し額を調べるをご確認ください。 |
separator | string | Section division. multiple specifications is possible. Optional. Not divided by default. For details see here. |
separator
For section partition, the response's SectionSeparator's indexResultSet / TeikiRoute / SectionSeparator / index
should be specified and determined in the below format.
[SectionSeparatorのindex],[分割する場合はtrue分割しない場合はfalseを指定]
When splitting at the SectionSeparator part whose index is 1
separator=1,true
response
Name | Description |
---|---|
ResultSet | Root element of response |
ResultSet / apiVersion | Web API version |
ResultSet / engineVersion | Engine version |
ResultSet / RepaymentList | Element representing an information list of the commuter ticket refund |
ResultSet / RepaymentList / buyDate | Purchase date of the commuter ticket |
ResultSet / RepaymentList / repaymentDate | Refund date of the commuter ticket |
ResultSet / RepaymentList / startDate | Valid start date of the commuter ticket |
ResultSet / RepaymentList / validityPeriod | Valid period Unit: month |
ResultSet / RepaymentList / RepaymentTicket | Element representing information of the commuter ticket refund |
ResultSet / RepaymentList / RepaymentTicket / calculateTarget | Whether it is subject to calculate or not - True: Subject to calculate - False: Not subject to calculate |
ResultSet / RepaymentList / RepaymentTicket / feePriceValue | Commission |
ResultSet / RepaymentList / RepaymentTicket / fromTeikiRouteSectionIndex | Starting section index |
ResultSet / RepaymentList / RepaymentTicket / index | Index * Index is not included in the response of json format data. index handling on json response |
ResultSet / RepaymentList / RepaymentTicket / payPriceValue | Purchase amount |
ResultSet / RepaymentList / RepaymentTicket / repayPriceValue | Refund amount |
ResultSet / RepaymentList / RepaymentTicket / state | State of the commuter ticket - 0x0001: Parameter error - 0x0002: State that has not been calculated - 0x8000: Including unsupported corporation - 0x4000: Not subject to calculate |
ResultSet / RepaymentList / RepaymentTicket / toTeikiRouteSectionIndex | Ending section index |
ResultSet / RepaymentList / RepaymentTicket / usedPriceValue | Used amount |
ResultSet / RepaymentList / RepaymentTicket / validityPeriod | Valid period |
ResultSet / RepaymentList / RepaymentTicket / changeableSection | 「駅すぱあと」で定期券の払い戻し時に区間変更として計算できるか。 - true: できる。 - false: できない。 詳しくは定期券の払い戻し額を調べるをご参照ください。 |
ResultSet / TeikiRoute | Element representing a route for the commuter ticket refund |
ResultSet / TeikiRoute / SectionSeparator | Element representing a division state of the route section for the commuter ticket |
ResultSet / TeikiRoute / SectionSeparator / changeable | - true: Possible to change the divided state - false: Impossible to change |
ResultSet / TeikiRoute / SectionSeparator / divided | - true: The commuter ticket is divided by this section - false: Not divided |
ResultSet / TeikiRoute / SectionSeparator / index | Index * Index is not included in the response of json format data. index handling on json response |
ResultSet / TeikiRoute / TeikiRouteSection | Element representing a section of the route for the commuter ticket refund |
ResultSet / TeikiRoute / TeikiRouteSection / index | Index * Index is not included in the response of json format data. index handling on json response |
ResultSet / TeikiRoute / TeikiRouteSection / repaymentTicketIndex | Refund index |
ResultSet / TeikiRoute / TeikiRouteSection / Point | Component representing site |
ResultSet / TeikiRoute / TeikiRouteSection / Point / index | Index * Index is not included in the response of json format data. index handling on json response |
ResultSet / TeikiRoute / TeikiRouteSection / Point / Prefecture | Element representing a prefecture |
ResultSet / TeikiRoute / TeikiRouteSection / Point / Prefecture / code | prefecture code |
ResultSet / TeikiRoute / TeikiRouteSection / Point / Prefecture / Name | Element representing a prefecture name |
ResultSet / TeikiRoute / TeikiRouteSection / Point / Station | Element representing station |
ResultSet / TeikiRoute / TeikiRouteSection / Point / Station / code | station code |
ResultSet / TeikiRoute / TeikiRouteSection / Point / Station / Name | Element representing station name |
ResultSet / TeikiRoute / TeikiRouteSection / Point / Station / Type | Element representing transport type |
example
GET /v1/xml/course/repayment?key=アクセスキーを入力してください&separator=1,true&serializeData=VkV4QaECp9nIAsMCpgEz76YDpgEz76UEkcIBQwAAAAKmATPvpQPKAQECAQMBBAEHAQgBCgIPQv9_EKX_9xSRpVjVBZfBAqVYj8ECpVjVwQKlWXvBAqVZLMECpVkPwQKlWvHBAqVXwAaSwwEBAgEDxwGlWFoCDQMPBQMGRDk0NlQHBAgDwwEBAgEDxgGmAAIwMwIVAxYFAwcGCAUHksUBpgEz76gDpQJfBKUCZgUACADGAaYBM||oAgEDpQJwBKUCcQUACAAIksQEAQUBB6RtCAHGAgEEAgUBBgEHpQEvCAIJksEDAcMBAQIBAwEPkcUBkwABAgKSwwEAAgADAMMBAQIBAwEDksMBAAIAAwDDAQECAQMBBJIAAQWSAAA*--T3221233232319:F332112212000:A23121141:--88eed71f6168dfe5ab30b8cc5e938621dd3806a7--0--0--0--284
<?xml version="1.0" encoding="UTF-8"?>
<ResultSet apiVersion="1.27.0.0" engineVersion="201809_02a">
<TeikiRoute>
<TeikiRouteSection repaymentTicketIndex="1" index="1">
<Point index="1">
<Station code="22671">
<Name>高円寺</Name>
<Type>train</Type>
</Station>
<Prefecture code="13">
<Name>東京都</Name>
</Prefecture>
</Point>
<Point index="2">
<Station code="22741">
<Name>新宿</Name>
<Type>train</Type>
</Station>
<Prefecture code="13">
<Name>東京都</Name>
</Prefecture>
</Point>
</TeikiRouteSection>
<SectionSeparator index="1" divided="true" changeable="true" />
<TeikiRouteSection repaymentTicketIndex="2" index="2">
<Point index="3">
<Station code="22741">
<Name>新宿</Name>
<Type>train</Type>
</Station>
<Prefecture code="13">
<Name>東京都</Name>
</Prefecture>
</Point>
<Point index="4">
<Station code="22907">
<Name>初台</Name>
<Type>train</Type>
</Station>
<Prefecture code="13">
<Name>東京都</Name>
</Prefecture>
</Point>
</TeikiRouteSection>
</TeikiRoute>
<RepaymentList repaymentDate="2018-09-04" validityPeriod="6" startDate="2018-09-04" buyDate="2018-09-04">
<RepaymentTicket feePriceValue="220" repayPriceValue="22720" state="0" usedPriceValue="320" calculateTarget="True" toTeikiRouteSectionIndex="1" fromTeikiRouteSectionIndex="1" index="1" validityPeriod="6" payPriceValue="23260" changeableSection="true"/>
<RepaymentTicket feePriceValue="220" repayPriceValue="24420" state="0" usedPriceValue="260" calculateTarget="True" toTeikiRouteSectionIndex="2" fromTeikiRouteSectionIndex="2" index="2" validityPeriod="6" payPriceValue="24900" changeableSection="true"/>
</RepaymentList>
</ResultSet>
GET /v1/json/course/repayment?key=アクセスキーを入力してください&separator=1,true&serializeData=VkV4QaECp9nIAsMCpgEz76YDpgEz76UEkcIBQwAAAAKmATPvpQPKAQECAQMBBAEHAQgBCgIPQv9_EKX_9xSRpVjVBZfBAqVYj8ECpVjVwQKlWXvBAqVZLMECpVkPwQKlWvHBAqVXwAaSwwEBAgEDxwGlWFoCDQMPBQMGRDk0NlQHBAgDwwEBAgEDxgGmAAIwMwIVAxYFAwcGCAUHksUBpgEz76gDpQJfBKUCZgUACADGAaYBM||oAgEDpQJwBKUCcQUACAAIksQEAQUBB6RtCAHGAgEEAgUBBgEHpQEvCAIJksEDAcMBAQIBAwEPkcUBkwABAgKSwwEAAgADAMMBAQIBAwEDksMBAAIAAwDDAQECAQMBBJIAAQWSAAA*--T3221233232319:F332112212000:A23121141:--88eed71f6168dfe5ab30b8cc5e938621dd3806a7--0--0--0--284
{
"ResultSet": {
"apiVersion": "1.27.0.0",
"engineVersion": "201809_02a",
"RepaymentList": {
"repaymentDate": "2018-09-04",
"validityPeriod": "6",
"startDate": "2018-09-04",
"buyDate": "2018-09-04",
"RepaymentTicket": [
{
"feePriceValue": "220",
"repayPriceValue": "22720",
"state": "0",
"usedPriceValue": "320",
"calculateTarget": "True",
"toTeikiRouteSectionIndex": "1",
"fromTeikiRouteSectionIndex": "1",
"validityPeriod": "6",
"payPriceValue": "23260",
"changeableSection": "true"
},
{
"feePriceValue": "220",
"repayPriceValue": "24420",
"state": "0",
"usedPriceValue": "260",
"calculateTarget": "True",
"toTeikiRouteSectionIndex": "2",
"fromTeikiRouteSectionIndex": "2",
"validityPeriod": "6",
"payPriceValue": "24900",
"changeableSection": "true"
}
]
},
"TeikiRoute": {
"SectionSeparator": {
"divided": "true",
"changeable": "true"
},
"TeikiRouteSection": [
{
"repaymentTicketIndex": "1",
"Point": [
{
"Station": {
"code": "22671",
"Name": "高円寺",
"Type": "train"
},
"Prefecture": {
"code": "13",
"Name": "東京都"
}
},
{
"Station": {
"code": "22741",
"Name": "新宿",
"Type": "train"
},
"Prefecture": {
"code": "13",
"Name": "東京都"
}
}
]
},
{
"repaymentTicketIndex": "2",
"Point": [
{
"Station": {
"code": "22741",
"Name": "新宿",
"Type": "train"
},
"Prefecture": {
"code": "13",
"Name": "東京都"
}
},
{
"Station": {
"code": "22907",
"Name": "初台",
"Type": "train"
},
"Prefecture": {
"code": "13",
"Name": "東京都"
}
}
]
}
]
}
}
}