Search for a train trip
Search for an available train trip between 2 stations, around a given departure date & time.
Body
-
via_station string
-
departure_around string(date-time)
POST /search
curl \
-X POST http://api.mycompany.com/v1/search \
-H "Content-Type: application/json" \
-d '{"departure_station":"Marseille","destination_station":"Sisteron","departure_around":"2023-05-04T09:42:00+00:00"}'
Request examples
Basic Origin-Destination search
{
"departure_station": "Marseille",
"destination_station": "Sisteron",
"departure_around": "2023-05-04T09:42:00+00:00"
}
{
"departure_station": "Marseille",
"via_station": "Valence",
"destination_station": "Sisteron",
"departure_around": "2023-05-04T09:42:00+00:00"
}
Request examples
{
"departure_station": "string",
"via_station": "string",
"destination_station": "string",
"departure_around": "2024-05-04T09:42:00+00:00"
}
Response examples (200)
[
{
"id": "string",
"departure_station": "string",
"arrival_station": "string",
"departure_at": "string",
"arrival_at": "string",
"cents": "string",
"train_code": "string"
}
]
Response examples (200)
[
{
"id": "string",
"departure_station": "string",
"arrival_station": "string",
"departure_at": "string",
"arrival_at": "string",
"cents": "string",
"train_code": "string"
}
]