Detailed API specifications

Content-Type of response header

The Content-Type of the response header will return the below values, for each format. In the case of json, the return value will change as follows, considering the Acceptance of the request header. When the header value with a set quality factor is sent, it is set according to the above process in descending order of priority.

Format Content-Type
xml application/xml;charset=utf-8
json If only application/json, application/* application/json;charset=utf-8
if only text/plain, text/* text/plain;charset=utf-8
* / * , if undesignated text/plain;charset=utf-8

Notes on URL encoding

If there is Japanese included in the request parameter, please URL encode (percent encode) the Japanese portion using UTF8. However, please do not URL encode column :, or slash, /, and other reservation characters defined by RFC3986.

# GET /v1/xml/station?key=xxx&viaList=高円寺:新宿:池袋
GET /v1/xml/station?key=xxx&name=%e9%ab%98%e5%86%86%e5%af%ba:%e6%96%b0%e5%ae%bf:%e6%b1%a0%e8%a2%8b

Multiple specifications

Some of the request parameters of each API are marked "Multiple designations possible." To specify more than one parameter, please denote the value with a colon : delimiter.

code=22828:22741

Also, please use the colon : without designating URL encoding (percentage encoding).

"Ekispert Web Service" does not allow undefined parameters, so an error will occur if a value is left as just a colon :.

code=:

Please be careful when all specified values become empty. See the explanation of request parameters on each API page for the specific designation methods.

Handling of index in json

The "index" attribute representing the order of components by XML is not included in the response of the json format. Furthermore, index related values such as "xxxIndex" are based on the index of xml. The index of xml starts from 1, but since an array in json starts from 0, the value is shifted. Please be careful when handling index related values with json.

<Route>
  <Point index="1">
    <Station code="22828">
      <Name>東京</Name>
    </Station>
  </Point>
  <Line index="1">
    <Name>JR新幹線のぞみ</Name>
  </Line>
  <Point index="2">
    <Station code="25978">
      <Name>新大阪</Name>
    </Station>
  </Point>
  <Line index="2">
    <Name>JR東海道本線・西明石行</Name>
  </Line>
  <Point index="3">
    <Station code="25853">
      <Name>大阪</Name>
    </Station>
  </Point>
</Route>
"Route": {
  "Point": [
    {
      "Station": {
        "Name": "東京",
      }
    },
    {
      "Station": {
        "Name": "新大阪",
      }
    },
    {
      "Station": {
        "Name": "大阪",
      }
    }
  ],
  "Line": [
    {
      "Name": "JR新幹線のぞみ",
    },
    {
      "Name": "JR東海道本線・西明石行",
    }
  ],
}

Index handling on json response

If the components of an xml file include only text notes, in json label the file with the appropriate component value depending on the content of the text notes.

<Type>train</Type>
{"Type": "train"}

If the components of an xml file that contains text notes also includes subcomponents or other attributes, define the content of the text notes as "text" in json.

<Type detail="local">bus</Type>
{
  "Type": {
    "detail": "local",
    "text": "bus"
  }
}

Error

"Ekispert Web Service" API error is shown as a message included in an error and error response as an HTTP protocol. Regarding the internal error code, it becomes a reference information to be used for support later on.

<?xml version="1.0" encoding="UTF-8"?>
<ResultSet apiVersion="1.x.x.x" engineVersion="xxxxxx_xxx">
  <Error code="内部エラーコード">
    <Message>エラーメッセージ</Message>
  </Error>
</ResultSet>

Railway operation information supplier and distribution standard

Operation information is provided by the following two companies. Distribution standards are as follows.

JR East Japan i-STATIONS Inc.

Rescuenow Inc.