Calculate commuter pass refund

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 Specification of the response data format. Mandatory.
Possible values:
- xml: xml format data
- json: json format data
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
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
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 Element representing lowest 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 / TeikiRoute Element representing a route for the commuter ticket refund
ResultSet / RepaymentList / TeikiRoute / SectionSeparator Element representing a division state of the route section for the commuter ticket
ResultSet / RepaymentList / TeikiRoute / SectionSeparator / changeable - true: Possible to change the divided state
- false: Impossible to change
ResultSet / RepaymentList / TeikiRoute / SectionSeparator / divided - true: The commuter ticket is divided by this section
- false: Not divided
ResultSet / RepaymentList / TeikiRoute / SectionSeparator / index Index
* Index is not included in the response of json format data. index handling on json response
ResultSet / RepaymentList / TeikiRouteSection Element representing a section of the route for the commuter ticket refund
ResultSet / RepaymentList / TeikiRouteSection / index Index
* Index is not included in the response of json format data. index handling on json response
ResultSet / RepaymentList / TeikiRouteSection / repaymentTicketIndex Refund index
ResultSet / RepaymentList / TeikiRouteSection / Point Component representing site
ResultSet / RepaymentList / TeikiRouteSection / Point / index Index
* Index is not included in the response of json format data. index handling on json response
ResultSet / RepaymentList / TeikiRouteSection / Point / Prefecture Element representing a prefecture
ResultSet / RepaymentList / TeikiRouteSection / Point / Prefecture / code prefecture code
ResultSet / RepaymentList / TeikiRouteSection / Point / Prefecture / Name Element representing a prefecture name
ResultSet / RepaymentList / TeikiRouteSection / Point / Station Element representing station
ResultSet / RepaymentList / TeikiRouteSection / Point / Station / code station code
ResultSet / RepaymentList / TeikiRouteSection / Point / Station / Name Element representing station name
ResultSet / RepaymentList / TeikiRouteSection / Point / Station / Type Element representing transport type

example

GET /v1/xml/course/repayment?key=your_access_key_here&separator=1,true&serializeData=SHlUczAxLjAwLjA0rAQBAAAAJFEzAQIAAgAAAAAAAAAIAAH_fwL_9wMAAAAAAAAAAgCPWAAA1VgAAHtZAAAAAAAACgCBAAABMgIADQAPJFEzAa0DAAC0AwAACgCBAAAC2AIAFQAWJFEzAb8DAADBAwAAAgABAAEAAQABAAEAAAAAAAAA--T3221233232319:F3321122120:A23121141:--960b1f43cd5e939c7535fb6834b4b46ba0f97e75
<?xml version="1.0" encoding="UTF-8"?>
<ResultSet apiVersion="1.14.0.0" engineVersion="201404_01a">
  <TeikiRoute>
    <TeikiRouteSection index="1" repaymentTicketIndex="1">
      <Point index="1">
        <Prefecture code="13">
          <Name>東京都</Name>
        </Prefecture>
        <Station code="22671">
          <Name>高円寺</Name>
          <Type>train</Type>
        </Station>
      </Point>
      <Point index="2">
        <Prefecture code="13">
          <Name>東京都</Name>
        </Prefecture>
        <Station code="22741">
          <Name>新宿</Name>
          <Type>train</Type>
        </Station>
      </Point>
    </TeikiRouteSection>
    <SectionSeparator index="1" divided="true" changeable="true"/>
    <TeikiRouteSection index="2" repaymentTicketIndex="2">
      <Point index="3">
        <Prefecture code="13">
          <Name>東京都</Name>
        </Prefecture>
        <Station code="22741">
          <Name>新宿</Name>
          <Type>train</Type>
        </Station>
      </Point>
      <Point index="4">
        <Prefecture code="13">
          <Name>東京都</Name>
        </Prefecture>
        <Station code="22907">
          <Name>初台</Name>
          <Type>train</Type>
        </Station>
      </Point>
    </TeikiRouteSection>
  </TeikiRoute>
  <RepaymentList buyDate="2014-03-24" repaymentDate="2014-03-24" startDate="2014-03-24" validityPeriod="6">
    <RepaymentTicket index="1" fromTeikiRouteSectionIndex="1" toTeikiRouteSectionIndex="1" payPriceValue="22680" usedPriceValue="300" feePriceValue="210" repayPriceValue="22170" calculateTarget="True" validityPeriod="6" state="0"/>
    <RepaymentTicket index="2" fromTeikiRouteSectionIndex="2" toTeikiRouteSectionIndex="2" payPriceValue="24300" usedPriceValue="240" feePriceValue="210" repayPriceValue="23850" calculateTarget="True" validityPeriod="6" state="0"/>
  </RepaymentList>
</ResultSet>
GET /v1/json/course/repayment?key=your_access_key_here&separator=1,true&serializeData=SHlUczAxLjAwLjA0rAQBAAAAJFEzAQIAAgAAAAAAAAAIAAH_fwL_9wMAAAAAAAAAAgCPWAAA1VgAAHtZAAAAAAAACgCBAAABMgIADQAPJFEzAa0DAAC0AwAACgCBAAAC2AIAFQAWJFEzAb8DAADBAwAAAgABAAEAAQABAAEAAAAAAAAA--T3221233232319:F3321122120:A23121141:--960b1f43cd5e939c7535fb6834b4b46ba0f97e75
{
  "ResultSet": {
    "apiVersion": "1.14.0.0",
    "engineVersion": "201404_01a",
    "TeikiRoute": {
      "TeikiRouteSection": [
        {
          "repaymentTicketIndex": "1",
          "Point": [
            {
              "Prefecture": {
                "code": "13",
                "Name": "東京都"
              },
              "Station": {
                "code": "22671",
                "Name": "高円寺",
                "Type": "train"
              }
            },
            {
              "Prefecture": {
                "code": "13",
                "Name": "東京都"
              },
              "Station": {
                "code": "22741",
                "Name": "新宿",
                "Type": "train"
              }
            }
          ]
        },
        {
          "repaymentTicketIndex": "2",
          "Point": [
            {
              "Prefecture": {
                "code": "13",
                "Name": "東京都"
              },
              "Station": {
                "code": "22741",
                "Name": "新宿",
                "Type": "train"
              }
            },
            {
              "Prefecture": {
                "code": "13",
                "Name": "東京都"
              },
              "Station": {
                "code": "22907",
                "Name": "初台",
                "Type": "train"
              }
            }
          ]
        }
      ],
      "SectionSeparator": {
        "divided": "true",
        "changeable": "true"
      }
    },
    "RepaymentList": {
      "buyDate": "2014-03-24",
      "repaymentDate": "2014-03-24",
      "startDate": "2014-03-24",
      "validityPeriod": "6",
      "RepaymentTicket": [
        {
          "fromTeikiRouteSectionIndex": "1",
          "toTeikiRouteSectionIndex": "1",
          "payPriceValue": "22680",
          "usedPriceValue": "300",
          "feePriceValue": "210",
          "repayPriceValue": "22170",
          "calculateTarget": "True",
          "validityPeriod": "6",
          "state": "0"
        },
        {
          "fromTeikiRouteSectionIndex": "2",
          "toTeikiRouteSectionIndex": "2",
          "payPriceValue": "24300",
          "usedPriceValue": "240",
          "feePriceValue": "210",
          "repayPriceValue": "23850",
          "calculateTarget": "True",
          "validityPeriod": "6",
          "state": "0"
        }
      ]
    }
  }
}