PrasannPradeepPatil / Booking-Website

0 stars 2 forks source link

Search/Filters API call #9

Open manish-alluri opened 2 years ago

manish-alluri commented 2 years ago

Description -

When a user updates his requirements like source, destination, journey date, trip type etc. on the UI and clicks on the search button, this API is triggered and it returns the necessary options the customer has. The data is displayed on the front end for flight selection and ticket booking. When the user selects additional filters and clicks on the apply filters button, this API is triggered again with the updated filter fields and the appropriate data is returned.

Acceptance criteria -

When the search option is selected initially, the filter fields are set to default and the API returns appropriate responses by accessing the database. When the apply filters button is clicked, the API is again triggered but with selected filter values. This returns more streamlined data as per user’s liking to the front end. Source and destination fields are mandatory to trigger this API. The request and response fields may vary later on.

Request : { sourceName: “”, destinationName:””, startDate:””, endDate: “”, isRoundTrip: “”, (Boolean) AirlineFilter:””, ArrivalTimeFilter:””, DepartureTimeFilter:””, PriceRangeFilter:””, JourneyTimeFilter:””
} Response :

{ { Id: idFromDatabase departureTime:””, arrivalTime:””, sourceAirportCode: “”, destinationAirportCode:””, price:””, duration:””, flightName: “”, flightLogo: img }, { }, ….. }

ahamad-s commented 2 years ago

Created search API and further enhancement is done in upcoming sprints.