Custom Connector
iRail Belgium Connector
Belgium
The iRail Belgium Connector provides access to Belgian railway data — stations, liveboards, connections, vehicle information, train compositions, disturbances, and logs. It acts as a proxy supporting train schedules, real-time updates, and feedback submission, with JSON and XML responses.
Overview
Integration Overview
This document provides a detailed guide for each integration point, its purpose, configuration, and workflow support using the iRail Belgium Connector.
- getStations. Retrieve a list of stations.
- getLiveboard. Retrieve liveboard information for a station.
- getConnections. Retrieve routes between two stations.
- getVehicle. Retrieve vehicle (train) information.
- getComposition. Retrieve train composition details.
- getDisturbances. Retrieve current rail network disturbances.
- postFeedback. Submit occupancy feedback for a train.
- getLogs. Retrieve recent log entries.
Documentation
Detailed Integration Documentation
Get Stations Retrieval
| Action | getStations |
|---|---|
| Purpose | Retrieves a list of Belgian railway stations with IDs, names, and locations. The primary entry point for station data. |
| Configuration | Configure the base URL via CONNECTOR_ENV_IRAILBELGIUM_BASE_URL. |
| Parameters | Optional: format (xml, json, jsonp; default xml); lang (nl, fr, en, de; default en). |
| Output | Successful: JSON/XML with version, timestamp, and a station array (id, locationX, locationY, standardname, name). Failure: 500 Internal server error. |
| Workflow example | Execute getStations with format=json, then populate a station selection list. |
Get Liveboard Retrieval
| Action | getLiveboard |
|---|---|
| Purpose | Retrieves liveboard data for a station — departures or arrivals with delays, platforms, and occupancy. |
| Configuration | Configure the base URL via CONNECTOR_ENV_IRAILBELGIUM_BASE_URL. |
| Parameters | Required: station (e.g. Gent-Sint-Pieters). Optional: id, arrdep (departure/arrival, default departure), date (ddmmyy), time (hhmm), alerts (boolean), format (xml, json, jsonp; default xml); lang (nl, fr, en, de; default en). |
| Output | Successful: JSON/XML with version, timestamp, station, stationinfo, and departures/arrivals (id, delay, station, time). Failure: 500. |
| Workflow example | Execute getLiveboard with station=Gent-Sint-Pieters and arrdep=departure to display real-time departures. |
Get Connections Retrieval
| Action | getConnections |
|---|---|
| Purpose | Retrieves route connections between two stations — durations, vias, and real-time delays. |
| Configuration | Configure the base URL via CONNECTOR_ENV_IRAILBELGIUM_BASE_URL. |
| Parameters | Required: from, to. Optional: timesel (departure/arrival), typeOfTransport (automatic, trains, nointernationaltrains, all), date (ddmmyy), time (hhmm), alerts, results (default 6), format (xml, json, jsonp; default xml); lang (nl, fr, en, de; default en). |
| Output | Successful: JSON/XML with version, timestamp, and a connection array (id, departure, arrival, duration, vias, alerts). Failure: 400 Bad request. |
| Workflow example | Execute getConnections with from=Gent-Sint-Pieters and to=Mechelen for route planning. |
Get Vehicle Retrieval
| Action | getVehicle |
|---|---|
| Purpose | Retrieves information about a specific train vehicle — stops, delays, and current location. |
| Configuration | Configure the base URL via CONNECTOR_ENV_IRAILBELGIUM_BASE_URL. |
| Parameters | Required: id (e.g. BE.NMBS.IC1832). Optional: date (ddmmyy), alerts, format (xml, json, jsonp; default xml); lang (nl, fr, en, de; default en). |
| Output | Successful: JSON/XML with version, timestamp, vehicle, vehicleinfo, and a stops array. Failure: 404 Not found. |
| Workflow example | Execute getVehicle with id=BE.NMBS.IC1832 to track a train. |
Get Composition Retrieval
| Action | getComposition |
|---|---|
| Purpose | Retrieves the composition of a train — carriages and locomotives with properties like toilets and outlets. |
| Configuration | Configure the base URL via CONNECTOR_ENV_IRAILBELGIUM_BASE_URL. |
| Parameters | Required: id (e.g. S51507). Optional: data (’’ or all), format (xml, json, jsonp; default xml); lang (nl, fr, en, de; default en). |
| Output | Successful: JSON/XML with a segments array (origin, destination, units with materialType, hasToilets). Failure: 404 Not found. |
| Workflow example | Execute getComposition with id=S51507 for accessibility or planning applications. |
Get Disturbances Retrieval
| Action | getDisturbances |
|---|---|
| Purpose | Retrieves current disturbances on the rail network — scheduled works and unscheduled issues. |
| Configuration | Configure the base URL via CONNECTOR_ENV_IRAILBELGIUM_BASE_URL. |
| Parameters | Optional: lineBreakCharacter, format (xml, json, jsonp; default xml); lang (nl, fr, en, de; default en). |
| Output | Successful: JSON/XML with version, timestamp, and a disturbance array (id, title, description, link, timestamp). Failure: 500. |
| Workflow example | Execute getDisturbances with format=json, then integrate into notification systems. |
Post Feedback
| Action | postFeedback |
|---|---|
| Purpose | Submits occupancy feedback for a train, contributing to average occupancy data (crowd-sourced). |
| Configuration | Configure the base URL via CONNECTOR_ENV_IRAILBELGIUM_BASE_URL. |
| Parameters | Required: connection (departure connection URI), occupancy (occupancy URI). Optional: None. |
| Output | Successful: confirmation with Location header (e.g. http://irail.be/vehicle/IC4516). Failure: 400 Bad request. |
| Workflow example | Execute postFeedback with connection and occupancy details for user-feedback integration. |
Get Logs Retrieval
| Action | getLogs |
|---|---|
| Purpose | Retrieves the last 1000 log entries in JSON format — for API usage monitoring and debugging. |
| Configuration | Configure the base URL via CONNECTOR_ENV_IRAILBELGIUM_BASE_URL. |
| Parameters | Optional: None. |
| Output | Successful: JSON array of log entries. Failure: 500. |
| Workflow example | Execute getLogs and review the logs for operational insights. |
Example Workflow: Train Journey Planning
| Retrieve stations | Use getStations to fetch stations and identify departure/arrival (e.g. Gent-Sint-Pieters, Mechelen). |
|---|---|
| Query connections | Execute getConnections with from and to to fetch routes and note vehicle IDs. |
| Fetch vehicle/liveboard | Use getVehicle and getLiveboard to power a journey planner. |
| Monitor & feedback | Use getDisturbances for network status and postFeedback for occupancy. |
Support
For technical support, contact custom-connectors-support@isolutions.sa.