The RESTful API for an airport service platform.
- Users can register with their email and password to create an account.
- Users can login with their credentials and receive a JWT token for authentication.
- Users can logout and invalidate their JWT token.
- Users can create and update their profile, including profile picture and other details.
- Users can retrieve their own profile.
- User with admin permission can create/update/retrieve/delete airport.
- User who is authenticated can retrieve the airport.
- User with admin permission can create/update/retrieve/delete routes.
- User who is authenticated can retrieve the route.
- User with admin permission can create/update/retrieve/delete crew.
- User who is authenticated can retrieve crew.
- User with admin permission can create/update/retrieve/delete airplanes.
- User who is authenticated can retrieve the airplane.
- User who is authenticated can add a star (1-5) to the airplane.
- User with admin permission can create/update/retrieve/delete airplane type.
- The user who is authenticated can retrieve airplane type.
- User with admin permission can create/update/retrieve/delete flight.
- A user who is authenticated can retrieve a flight.
- User who is authenticated can create/update/retrieve/delete order including a few tickets.
- Users can pay for orders (functionality with Stripe).
- The user who is authenticated can filter the next endpoint:
- Airport (by name, country, city);
- Route (by source, destination, distance);
- Crew (by crew position);
- Airplane (by name, rows, seats in row, airplane type);
- Flight (by route, airplane, departure time, arrival time);
- Order (by created at).
- Only authenticated users can perform actions such as creating orders/tickets and adding stars to the airplane.
- User with admin permission can create/update/retrieve/delete user profile, airport, route, crew, flight, airplane, airplane type, tickets, order, ratings.
- Users can update their own profile.
- The API is well-documented with clear instructions on how to use each endpoint.
- The documentation includes sample API requests and responses for different endpoints.
- You can test the next endpoint:
- Airport;
- Route;
- Crew;
- Airplane;
- Flight;
- Clone this repository
- Create venv: python -m venv venv
- Activate venv: source venv/bin/activate
- Install requirements: pip install -r requirements.txt
- Run: python manage.py runserver
- Create user via: user/register
- Get access token via: user/token