Skip to content

Unofficial API Documentation for Israel Railways API

chaimkut edited this page Jul 24, 2018 · 7 revisions

API used by website

GetRoutes

  • URL

    <apiinfo/api/Plan/GetRoutes>

  • Method:

    GET

  • URL Params

    Required:

    OId=[integer] TId=[integer] Date=[integer] Hour=[integer]

  • Success Response:

    • Code: 200 <br /> Content:

      {
          "MessageType": 2,
          "Message": null,
          "Data": {
              "Error": null,
              "Details": {
                  "Origin": "2300",
                  "Destination": "2200",
                  "Date": "24/07/2018 00:00:00",
                  "SugKav": "P",
                  "Hour": "0"
              },
              "StartIndex": 30,
              "Routes": [{
                  "Train": [{
                      "Trainno": "420",
                      "OrignStation": "2300",
                      "DestinationStation": "2200",
                      "ArrivalTime": "24/07/2018 17:47:00",
                      "DepartureTime": "24/07/2018 17:40:00",
                      "StopStations": [],
                      "LineNumber": "73201840",
                      "Route": "1",
                      "Midnight": false,
                      "Handicap": true,
                      "DirectTrain": false,
                      "TrainParvariBenironi": null,
                      "ReservedSeat": true,
                      "Platform": "1",
                      "DestPlatform": "1"
                  }],
                  "IsExchange": false,
                  "EstTime": "00:07:00"
              }, ....],
              "BeforeRoutes": null,
              "Rates": [],
              "Delays": [],
              "TrainPositions": [{
                  "CurrentStation": 2300,
                  "DifMin": 3,
                  "NextStation": 2200,
                  "TrainNumber": 122,
                  "DifType": "DELAY",
                  "TotalKronot": "009",
                  "SugNayad": "SIM",
                  "StopPoint": "ד"
              }, ...],
              "Omasim": [{
                  "TrainNumber": 134,
                  "Stations": [{
                      "StationNumber": 400,
                      "OmesPercent": 0.055,
                      "Shmurim": "Y",
                      "Time": "22:20",
                      "Platform": 4
                  }, ...]
              },
              ]
          }
      }
      
  • Error Response:

    • Code: 200 <br /> Content:

      {
          "MessageType": 2,
          "Message": null,
          "Data": {
              "CustomPropertys": [{
                  "Id": "3700",
                  "Heb": ["תל אביב - סבידור מרכז"],
                  "Eng": ["Tel Aviv-Savidor Center"],
                  "Rus": ["Тель-Авив - Мерказ - Центральная"],
                  "Arb": ["تل ابيب – ساڤيدور المركز"]
              }...]
          }
      }
      

    (long list of train stations)

  • Sample Call:

    Example: https://www.rail.co.il/apiinfo/api/Plan/GetRoutes?OId=2300&TId=3600&Date=20180724&Hour=1830

  • Notes:

GeneralUpdates

  • URL
apiinfo/api/Info/GeneralUpdates
  • Method:

    GET

  • URL Params

    Required:

    id=[integer]

  • Success Response:

    • Code: 200 <br /> Content:

      <ServiceResultOfArrayOfUpdateStationd2PbYAiG
              xmlns:i="http://www.w3.org/2001/XMLSchema-instance"
              xmlns="http://schemas.datacontract.org/2004/07/SolBox.Rail.Api.OM">
              <Data>
                      <UpdateStation>
                              <EndValidationOfReport>2018-07-29T01:00:00</EndValidationOfReport>
                              <Float>true</Float>
                              <NameArb/>
                              <NameEng/>
                              <NameHeb>הפסקה זמנית של שירות הרכבות בתחנות מודיעין</NameHeb>
                              <NameRus/>
                              <Order>1400</Order>
                              <ReportImage>/_catalogs/masterpage/solboxrail/img/sound.svg</ReportImage>
                              <ReportType>report1</ReportType>
                              <StartValidationOfReport>2018-07-22T21:00:00</StartValidationOfReport>
                              <Station
                                      xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"/>
                                      <UpdateContentArb/>
                                      <UpdateContentEng/>
                                      <UpdateContentHeb>
      הפסקת השירות תחל ביום ד' 25.7.18 בשעה 21&#58;00&#160; ותסתיים ביום א' 29.7.18 בשעה 04&#58;00/&#160;תחנות מודיעין תהיינה סגורות.&#160;בנוסף, בלילה שבין יום ה' 26.7.18 (00&#58;20) ליום א' 29.7.18 (04&#58;45) יופסק השירות בתחנת נתב&quot;ג. לשירותכם, יועמדו שירותי היסעים (ללא תשלום)
      </UpdateContentHeb>
                                      <UpdateContentRus/>
                                      <UpdateLinkArb/>
                                      <UpdateLinkEng/>
                                      <UpdateLinkHeb>
      https://www.rail.co.il/Pages/Updates/modiin-closure.aspx
      </UpdateLinkHeb>
                                      <UpdateLinkRus/>
                              </UpdateStation>
                              <UpdateStation>
                                      <EndValidationOfReport>2018-07-27T15:00:00</EndValidationOfReport>
                                      <Float>true</Float>
                                      <NameArb>
      إيقاف مؤقت لخدمة القطارات بين محطة بنيامينا ومحطة الخضيرة
      </NameArb>
                                      <NameEng>Temporary halt of train services </NameEng>
                                      <NameHeb>
      הפסקה זמנית של שירות הרכבות בין תחנת בנימינה לתחנת חדרה מערב
      </NameHeb>
                                      <NameRus>Временный перерыв в движении поездов </NameRus>
                                      <Order>1300</Order>
                                      <ReportImage>/_catalogs/masterpage/solboxrail/img/sound.svg</ReportImage>
                                      <ReportType>report1</ReportType>
                                      <StartValidationOfReport>2018-07-15T21:00:00</StartValidationOfReport>
                                      <Station
                                              xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"/>
                                              <UpdateContentArb>
      ​بسبب أعمال لتطوير البنية التحتية للسكة الحديدية.سيبدأ إيقاف الخدمة في الليلة ما بين يوم الخميس 26.7.2018 ويوم الجمعة 27.7.2018&#160;في الساعة 00&#58;01 وسينتهي يوم الجمعة 27.7.2018 في الساعة 18&#58;00.
      </UpdateContentArb>
                                              <UpdateContentEng>
      Due to track improvement works.Services will stop from the night between Thursday, 26.7.18 and Friday, 27.7.18 at 00&#58;01 and resume on Friday, 27.7.18 &#160;at 18&#58;00.
      </UpdateContentEng>
                                              <UpdateContentHeb>
      בשל עבודות לשדרוג תשתית המסילה.&#160;הפסקת השירות תחל בלילה שבין יום ה' 26.7.18 ליום ו' 27.7.18 בשעה 00&#58;01 ותסתיים ביום ו' 27.7.18 בשעה 18&#58;00.
      </UpdateContentHeb>
                                              <UpdateContentRus>
      по причине ремонта железнодорожной инфраструктуры.Движение поездов прекратится в 00&#58;01 ночи с четверга 26.07 на пятницу 27.07.2018 и возобновится в 18&#58;00 пятницы 27.07.2018.
      </UpdateContentRus>
                                              <UpdateLinkArb>
      https://www.rail.co.il/ar/Pages/UdatesAR/Caesarea-closure.aspx
      </UpdateLinkArb>
                                              <UpdateLinkEng>
      https://WWW.rail.co.il/en/Pages/updates/Caesarea-closure.aspx
      </UpdateLinkEng>
                                              <UpdateLinkHeb>
      https://www.rail.co.il/Pages/Updates/Caesarea-closure.aspx
      </UpdateLinkHeb>
                                              <UpdateLinkRus>
      https://www.rail.co.il/ru/Pages/UpdatesRU/Caesarea-closure.aspx
      </UpdateLinkRus>
                                      </UpdateStation>
                                      <UpdateStation>
                                              <EndValidationOfReport>2018-10-31T22:00:00</EndValidationOfReport>
                                              <Float>true</Float>
                                              <NameArb>تحديثات للجنود</NameArb>
                                              <NameEng>Updates for soldiers</NameEng>
                                              <NameHeb>עדכונים לחיילים</NameHeb>
                                              <NameRus>Информация для военнослужащих</NameRus>
                                              <Order>300</Order>
                                              <ReportImage>/_catalogs/masterpage/solboxrail/img/sound.svg</ReportImage>
                                              <ReportType>report1</ReportType>
                                              <StartValidationOfReport>2018-04-29T02:00:00</StartValidationOfReport>
                                              <Station
                                                      xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
                                                      <d4p1:string>9700</d4p1:string>
                                                      <d4p1:string>5800</d4p1:string>
                                                      <d4p1:string>5900</d4p1:string>
                                                      <d4p1:string>7300</d4p1:string>
                                                      <d4p1:string>7320</d4p1:string>
                                                      <d4p1:string>1280</d4p1:string>
                                                      <d4p1:string>3400</d4p1:string>
                                                      <d4p1:string>6300</d4p1:string>
                                                      <d4p1:string>4100</d4p1:string>
                                                      <d4p1:string>2800</d4p1:string>
                                                      <d4p1:string>4680</d4p1:string>
                                                      <d4p1:string>4690</d4p1:string>
                                                      <d4p1:string>7500</d4p1:string>
                                                      <d4p1:string>9200</d4p1:string>
                                                      <d4p1:string>3500</d4p1:string>
                                                      <d4p1:string>3100</d4p1:string>
                                                      <d4p1:string>4660</d4p1:string>
                                                      <d4p1:string>1300</d4p1:string>
                                                      <d4p1:string>2200</d4p1:string>
                                                      <d4p1:string>2300</d4p1:string>
                                                      <d4p1:string>2100</d4p1:string>
                                                      <d4p1:string>5410</d4p1:string>
                                                      <d4p1:string>9000</d4p1:string>
                                                      <d4p1:string>1240</d4p1:string>
                                                      <d4p1:string>6700</d4p1:string>
                                                      <d4p1:string>1250</d4p1:string>
                                                      <d4p1:string>4800</d4p1:string>
                                                      <d4p1:string>8700</d4p1:string>
                                                      <d4p1:string>1220</d4p1:string>
                                                      <d4p1:string>8550</d4p1:string>
                                                      <d4p1:string>5000</d4p1:string>
                                                      <d4p1:string>5150</d4p1:string>
                                                      <d4p1:string>1600</d4p1:string>
                                                      <d4p1:string>9650</d4p1:string>
                                                      <d4p1:string>3300</d4p1:string>
                                                      <d4p1:string>3310</d4p1:string>
                                                      <d4p1:string>1500</d4p1:string>
                                                      <d4p1:string>1260</d4p1:string>
                                                      <d4p1:string>2500</d4p1:string>
                                                      <d4p1:string>4250</d4p1:string>
                                                      <d4p1:string>4640</d4p1:string>
                                                      <d4p1:string>2820</d4p1:string>
                                                      <d4p1:string>4170</d4p1:string>
                                                      <d4p1:string>700</d4p1:string>
                                                      <d4p1:string>1400</d4p1:string>
                                                      <d4p1:string>7000</d4p1:string>
                                                      <d4p1:string>4500</d4p1:string>
                                                      <d4p1:string>8800</d4p1:string>
                                                      <d4p1:string>9100</d4p1:string>
                                                      <d4p1:string>9800</d4p1:string>
                                                      <d4p1:string>5200</d4p1:string>
                                                      <d4p1:string>5010</d4p1:string>
                                                      <d4p1:string>9600</d4p1:string>
                                                      <d4p1:string>3700</d4p1:string>
                                                      <d4p1:string>3600</d4p1:string>
                                                      <d4p1:string>4900</d4p1:string>
                                                      <d4p1:string>4600</d4p1:string>
                                              </Station>
                                              <UpdateContentArb>
      ​لراحتكم، ركزنا تفاصيل ساعات خدمات النقليات من محطات القطار إلى مدينة التدريب العسكري &quot;هبهاديم&quot;.​
      </UpdateContentArb>
                                              <UpdateContentEng>
      ​For your convenience, we have listed the times of all shuttle services from train stations to Camp Ariel Sharon (HaBahadim).
      </UpdateContentEng>
                                              <UpdateContentHeb>
      ​לנוחותכם, ריכזנו את פירוט שעות שירותי ההיסעים מתחנות הרכבת לעיר הבה&quot;דים.&#160;
      </UpdateContentHeb>
                                              <UpdateContentRus>
      ​Для удобства пассажиров приводим общую сводку расписания подвозок от железнодорожных станций до военного городка в Негеве.​​
      </UpdateContentRus>
                                              <UpdateLinkArb>
      https://WWW.rail.co.il/ar/pages/udatesar/soldiersar.aspx
      </UpdateLinkArb>
                                              <UpdateLinkEng>https://WWW.rail.co.il/en/Pages/soldiersEN.aspx</UpdateLinkEng>
                                              <UpdateLinkHeb>https://www.rail.co.il/pages/soldiers.aspx</UpdateLinkHeb>
                                              <UpdateLinkRus>
      https://WWW.rail.co.il/ru/Pages/UpdatesRU/soldiersRU.aspx
      </UpdateLinkRus>
                                      </UpdateStation>
                              </Data>
                              <Message/>
                              <MessageType>Success</MessageType>
                      </ServiceResultOfArrayOfUpdateStationd2PbYAiG>
      
  • Error Response:

    • Code: 400 BAD REQUEST<br /> Content:

      <Error>
              <Message>The request is invalid.</Message>
      </Error>
      
  • Sample Call:

    Example: https://rail.co.il/apiinfo/api/Info/GeneralUpdates

  • Notes:

CheckActiveVersion

  • URL

    apiinfo/api/taarif/CheckActiveVersion

  • Method:

    GET

  • Success Response:

    • Code: 200 <br /> Content:

      {
          "VersionId": 58,
          "ContentVersionId": 1,
          "RestrictionsLastUpdateDate": "2018-06-28T14:22:54.54",
          "FileVersion": 131.0
      }
      
  • Error Response:

  • Sample Call:

    Example: https://www.rail.co.il/apiinfo/api/taarif/CheckActiveVersion

  • Notes:

Title

<_Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple)._>
  • URL

    apiinfo/api/taarif/GetInfo

  • Method:

    GET

  • URL Params

    Required:

    VersionId=[integer]

  • Success Response:

    • Code: 200 <br /> Content:
  • Error Response:

    • Code: 404 Not Found<br /> Content:

      <Error>
              <Message>
      No HTTP resource was found that matches the request URI 'https://www.rail.co.il/apiinfo/api/taarif/GetInfo'.
      </Message>
      </Error>
      
  • Sample Call:

    Example: https://www.rail.co.il/apiinfo/api/taarif/GetInfo?VersionId=58

  • Notes:

Clone this wiki locally