This API Endpoint makes a POST request to the Travu API service in other to get a response of AVAILABLE BUS TRIPS from all our aggregated Bus operators based on the requested DEPARTURE STATE, DESTINATION STATE and DATE.
Remember to Pass your Authorization Token for this request to go through, read about Authorization here.
BODY PAYLOAD
The Body Payload format is as below;
{"departure_state":"Supported string e.g ABIA","destination_state":"Supported string e.g LAGOS","trip_date":"date(YYYY-MM-DD)e.g 2021-07-04","sort":"(Optional) if you need to uniform response based on departure date, use 'date'"}
Our Supported States Strings (UPPERCASE SENSITIVE) to be used for both departure_state and destination_state are;
Below is an actual request made and it's response.
Check Trip Request
POSThttps://api.travu.africa/api/v1/check_trip
This API Endpoint makes a POST request to the MytripAPI service in other to get a response of AVAILABLE BUS TRIPS from all our aggregated Bus operators based on the requested DEPARTURE STATE, DESTINATION STATE and DATE.
The Response for this request should bring the TRIP DETAILS in the below format if the sort parameter is sent as empty or not included in the payload entirely.;
ALSO: The Response for this request should bring the TRIP DETAILS in the below format if the sort parameter is sent as "date", this combines all results based on the departure time.
Always convert these response values (Strings and Integers) into Strings so as to always correspond as our responds might return those values in either form.
The above responses are an example of a situation where One operator has available trip (GUO in this case) and the other does not operate around that route.
Reference to Authentication for possible authentication errors that might occur during this request.
Seat Layout
The next thing you want to do is present the seat layouts to your users in our supported formats, this enables your users pick specific seats and positions from a bus.
Here is the documentation that helps you with this, Seat Layouts