Welcome to the Just Park DOCS
Authentication
- POST /auth/signup: Registers a new user.
- POST /auth/login: Logs in a user and returns an access token.
- POST /auth/logout: Logs out a user and invalidates the session token. (Requires authentication)
- POST /auth/lostpassword: Sends a password reset link to the user's email.
- POST /auth/reset-password/:token: Resets the user's password using a token sent to their email.
Users
- GET /users/me: Retrieves current user information based on their role. (Requires authentication)
- DELETE /users/:userID: Deletes a user by their ID. (Requires authentication)
- PUT /users/:userID: Updates user information. (Requires authentication)
- PUT /users/credit/:userID: Adds credit to a user's account. (Requires authentication)
- GET /users/credit/:userID: Checks the credit balance of a user. (Requires authentication)
Parkings
- GET /parkings: Retrieves a list of all parkings.
- GET /parkings/:parkingID: Retrieves details of a specific parking by its ID.
- POST /parkings: Creates a new parking. (Requires authentication)
- PUT /parkings/:parkingID: Updates details of a specific parking by its ID. (Requires authentication)
- DELETE /parkings/:parkingID: Deletes a specific parking by its ID. (Requires authentication)
- GET /parkings/:parkingID/cars: Checks cars in a specific parking by its ID. (Requires authentication)
Cars
- POST /cars: Registers a new car. (Requires authentication)
- PATCH /cars/:licencePlate: Updates the license plate of an existing car. (Requires authentication)
- DELETE /cars/:licencePlate: Deletes a car by its license plate. (Requires authentication)
Wardens
- GET /wardens: Retrieves all wardens.
- GET /wardens/parking/:parkingID: Retrieves wardens for a specific parking.
- GET /wardens/:wardenId: Retrieves details of a specific warden by their ID.
- POST /wardens/parking/:parkingID: Adds a new warden to a specific parking.
- PUT /wardens/:wardenId: Updates a warden by their ID.
- PUT /wardens/reassign/:wardenId/:newParkingID: Reassigns a warden to a different parking lot.
- DELETE /wardens/:wardenId: Deletes a warden by their ID.
Sessions
- POST /session/:parkingID/start: Starts a new parking session. (Requires authentication)
- DELETE /session/:sessionId: Deletes a parking session by its ID. (Requires authentication)
- PATCH /session/:sessionId: Updates a parking session by its ID. (Requires authentication)
- GET /session: Retrieves all parking sessions. (Requires authentication)