Get Bus Routes Endpoint

Retrieves the bus routes available on Syticks. It can also be customized to filter out exact information using query parameters.

Example of bus routes are Lagos->Abuja, Abuja->Kaduna, Awka-> Benin.

circle-info

Note that, to get all Lagos->Abuja routes, you have to pass Lagos' city ID as the from_city_id as you can see below and Abuja's city ID as the to_city_id. Doing this will fetch you all the transport companies that ply that route.

So, if there are 4 companies that ply that route, it will return 4 items in the list, then if you pass in a business_id in the query param, it will return only the route of that particular business that you have specified.

To get the ID of any city, go to the 'Get all Cities' Endpoint.

Fetch All Bus Routes

get

This endpoint allows users to search for routes between cities and filter by price and business using query parameters. It provides flexibility for users to search for routes based on their travel needs. Filtering by origin, destination, price, and business allows for targeted searches.

Query parameters
searchstringOptional

Search for routes by city name, state name, or address. Returns routes matching the search criteria in origin or destination.

Example: Lagos
from_city_idintegerOptional

Filter routes departing from a specific city by its unique ID.

to_city_idintegerOptional

Filter routes arriving in a specific city by its unique ID.

pricestringOptional

Filter routes by price. You can specify a range using commas (e.g., price=100,200).

business_idintegerOptional

Filter routes by a specific business offering the route (e.g., bus company).

Responses
chevron-right
200

List of bus routes.

application/json
successbooleanOptional

Indicates whether the request was successful.

Example: true
statusintegerOptional

HTTP status code representing the response status.

Example: 200
messagestringOptional

Human-readable description of the response.

Example: List of bus routes
get
/api/v2/merpi/transport/routes

Last updated