Please go to https://github.com/Chargekart-Tech/services-D7 for instructions on setup and running the service.
For checking out the docs for the APIs, please setup and start the service using main docker-compose configuration. The, go to the URL ->
Root path -
localhost/api/
/
[GET] -> For checking the running status of the backend.
Root path -
localhost/api/user/
-
/login
[POST] -> User Login usingusername
andpassword
. It sets the authorization cookie. Can also sendemail
in the variableusername
. -
/register
[POST] -> New User Registration using the fields of the User Model. It sets the authorization cookie. -
/logout
[POST] -> User logout endpoint. Doesn't take any input. -
/details
[GET] -> Returns user details, based on the authorization cookie. Requires user to be logged in. -
/change-password
[POST] -> Change currently logged in user password. Takes current password and new password. Requires user to be logged in. -
/edit
[PUT] -> Edit user details using the fields of the User Model. Requires user to be logged in.
Root path -
localhost/api/locations/
-
/all
[GET] -> -
/location/{locid}
[GET] -> -
/new-location
[POST] ->
- username: string - Unique username (Alphanumeric only)
- email: string - Valid email (Unique only)
- contact: string - Valid Phone Number
- full_name: string - Full Name of the user
- password: string - Valid Password (Stored in hashed form in db for security)
- car_number: str
- model_number: str
- model_year: str
- battery_capacity: float
- locid: string - Unique id for each location, for ease of access in frontend (Auto - Generated)
- title: string - Name of the Place
- description: string - Description of the Place
- coordinates
- latitude: float
- longitude: float
- city: string
- state: string
- country: string
- pincode: int - 6 digit integer pincode of the location