Backend APIs for train routes