The API provides endpoints for managing a parking garage system. It allows users to book parking spots, retrieve information about available spots, fetch user data, and search for car brands. The API supports both automated and standard parking spots, with functionalities for booking, fetching data, and searching. It also includes error handling for various scenarios to ensure smooth operation.
The base URL for all API requests is:
https://localhost/api.php
POST /add_userPOSThttp://localhost/api.phpContent-Type: application/jsonjson
{
"action": "add_user",
"name": "string",
"phoneNum": "string",
"email": "string",
"password": "string",
"carNum": ["string"],
"brand": ["string"]
}
Status Code: 200 OK
Body:
json
{
"message": "User and cars added successfully"
}