This API enables integration between Bosch Access Control and ISS SecureOS VMS, allowing gates to open automatically when a registered car's plate number is detected. Users interact with the system via a mobile app.
Please See the ex1 and ex2 pictures and text files first to know how to input the plate number.
- User registration and email verification via OTP.
- JWT-based authentication.
- Plate number registration and gate-opening functionality.
Endpoint: POST /api/Users/register
Description: Registers a new user.
Request Example:
{
"name": "John Doe",
"email": "johndoe@example.com",
"password": "SecurePass123"
}Response:
200 OK: User registered successfully.400 Bad Request: Invalid input, email already exists, invalid email format, or weak password.
Error Response Example:
{
"message": "Email already exists"
}Endpoint: POST /api/Users/send-otp
Description: Sends an OTP to the user's email for verification.
Request Example:
{
"email": "johndoe@example.com"
}Response:
200 OK: OTP sent successfully.400 Bad Request: User not found or email not provided.
Error Response Example:
{
"message": "User not found"
}Endpoint: POST /api/Users/confirm-user
Description: Verifies the user's email using the OTP.
Request Example:
{
"email": "johndoe@example.com",
"otp": "123456"
}Response:
200 OK: OTP verified successfully.400 Bad Request: OTP not sent, expired, or invalid.500 Internal Server Error: Error occurred while confirming the user.
Error Response Example:
{
"message": "Invalid OTP"
}Endpoint: POST /api/Users/login
Description: Logs in the user and returns a JWT token.
Request Example:
{
"email": "johndoe@example.com",
"password": "SecurePass123"
}Response:
200 OK: User logged in successfully, returns JWT token.400 Bad Request: Invalid credentials or user not confirmed.401 Unauthorized: Invalid credentials.
Error Response Example:
{
"message": "Invalid credentials"
}Endpoint: GET /api/Tickets
Description: Fetches all tickets.
Headers:
Authorization: Bearer token(Mandatory)
Response Example:
[
{
"id": 1,
"userId": 42,
"plateNumber": "ABC123",
"dateTime": "2024-12-11T13:49:11.611Z"
}
]Error Response Example:
{
"message": "Unauthorized access"
}Endpoint: POST /api/Tickets
Description: Registers a new plate number.
Headers:
Authorization: Bearer token(Mandatory)
Request Example:
{
"plateNumber": "XYZ789"
}Response Example:
{
"id": 2,
"userId": 42,
"plateNumber": "XYZ789",
"dateTime": "2024-12-11T13:49:11.613Z"
}Error Response Example:
{
"message": "Invalid plate number format"
}- Register a User: Use
/api/Users/registerto create an account. - Send OTP: Use
/api/Users/send-otpto send an OTP to the registered email. - Confirm User: Use
/api/Users/confirm-userto verify the email with the OTP. - Login: Use
/api/Users/loginto log in and receive a JWT token. - Add Plate Number: Use
/api/Ticketsto register a car's plate number. - Automatic Gate Opening: Once the plate is registered, the gate opens when the VMS detects the car.
- JWT tokens are valid for 1 day.
- Ensure the backend server and VMS system are properly configured for smooth integration.
Contact the backend development team.