This API supports the following operations:
- Get the list of all flight tickets for sale
- Get details of one single flight ticket
- Login/register a user
- Add a flight ticket to cart
- Get the list of all tickets in cart
- Move a ticket from cart to history (i.e. the ticket is purchased)
- Get the list of all purchased tickets (i.e. history)
- Get details of a ticket in cart or history
docker run -dp 0.0.0.0:80:80 sxweetlollipop2912/flight-booking-api
Then, test the API at http://localhost:80/docs#
- View available tickets:
GET /api/tickets
- Login/Register a user:
POST /api/login/access-token
- Add ticket to cart:
POST /api/items/
, sethas_purchased
tofalse
- Move ticket from cart to history:
PUT /api/items/{id}
, sethas_purchased
totrue
- View cart:
GET /api/items/cart
- View history:
GET /api/items/history