POST /search

Search for an available train trip between 2 stations, around a given departure date & time.

application/json

Body

  • departure_station string
  • destination_station string
  • departure_around string(date-time)

Responses

  • 200 application/json

    An array of available trips.

    Hide response attributes Show response attributes object
    • id string
    • departure_station string
    • arrival_station string
    • departure_at string
    • arrival_at string
    • cents string
    • train_code string
POST /search
curl \
 --request POST 'http://api.mycompany.com/v1/trips/search' \
 --header "Content-Type: application/json" \
 --data '{"departure_station":"string","destination_station":"string","departure_around":"2026-05-04T09:42:00Z"}'
Request examples
{
  "departure_station": "string",
  "destination_station": "string",
  "departure_around": "2026-05-04T09:42:00Z"
}
Response examples (200)
[
  {
    "id": "string",
    "departure_station": "string",
    "arrival_station": "string",
    "departure_at": "string",
    "arrival_at": "string",
    "cents": "string",
    "train_code": "string"
  }
]