This api is developed for our mobile development project - Cars renting app -
POST
/login
Login to cars renting app
name |
type |
data type |
description |
Phon Number |
required |
String |
N/A |
Password |
required |
String |
N/A |
http code |
content-type |
response |
200 |
application/json |
Login successfull with JWT token |
404 |
application/json |
User not found |
500 |
application/json |
Server error |
POST
/register
Create account in renting car app
name |
type |
data type |
description |
phoneNumber |
required |
String |
N/A |
creditCardNumber |
required |
String |
N/A |
creditCardExpiration |
required |
String |
N/A |
drivingLicense |
required |
String |
N/A |
http code |
content-type |
response |
400 |
application/json |
Information not complete |
400 |
application/json |
Phone number existe |
200 |
application/json |
JWT token with the generated password |
500 |
application/json |
Server error |
GET
/api/users
Get all users of the app
Require authentication/authorization
http code |
content-type |
response |
200 |
application/json |
List of users |
500 |
application/json |
Server error |
GET
/api/cars
Get all Cars
Require authentication
http code |
content-type |
response |
200 |
application/json |
List of cars |
500 |
application/json |
Server error |
GET
/api/cars/:idCar
Get car by id
name |
type |
data type |
description |
idCar |
required |
String |
N/A |
http code |
content-type |
response |
200 |
application/json |
One car |
404 |
application/json |
Car not found |
500 |
application/json |
Server error |
GET
/api/user/carsRented/:phone
Get Cars rented by user
name |
type |
data type |
description |
phone |
required |
String |
N/A |
http code |
content-type |
response |
200 |
application/json |
List of cars rented |
500 |
application/json |
Server error |
POST
/api/reserve/:phone/:idCar
Reserve a car by id=idCar
name |
type |
data type |
description |
phone |
required |
String |
N/A |
idCar |
required |
String |
N/A |
http code |
content-type |
response |
200 |
application/json |
List of cars rented |
404 |
application/json |
Not Found |
500 |
application/json |
Server error |
POST
/api/endreserve/:phone/:idCar
End reservation of user with car of id=idCar
name |
type |
data type |
description |
phone |
required |
String |
N/A |
idCar |
required |
String |
N/A |
http code |
content-type |
response |
200 |
application/json |
End reservation successfully |
404 |
application/json |
Car Not Found / User not found |
500 |
application/json |
Server error |
POST
/api/editinfo/:phone
Edit user information
name |
type |
data type |
description |
phone |
required |
String |
N/A |
name |
type |
data type |
description |
phoneNumber |
Not required unless changed |
String |
N/A |
password |
Not required unless changed |
String |
N/A |
creditCardNumber |
Not required unless changed |
String |
N/A |
http code |
content-type |
response |
200 |
application/json |
Edited Information |
404 |
application/json |
User not found |
500 |
application/json |
Information already exists in another user |
500 |
application/json |
Server error |
You can see the documentation here: API Documentation
NOTE: The server is not deployed for the moment