Download Route data

I am trying to build an application that can track whether my shipment is on a defined route or not. For that I need the coordinates of whole route. From the routexl website, I am able to define a route and download that data in a file. But I want some api or service that can do the same functionality but instead of downloading the data and entering data manually into database, I want to give the user the provision to give route details and when user submit the details I can get all the coordinates using that api and enter those details in my database. Is there any service or API for this functinality?

Unfortunately our API does not return the directions or the path with coordinates. Only the sorted list of locations. It is on our list for development, but we can not give any time line for it.