### API Documentation
#### User Registration API
API Endpoint: /authenticate/register
Request Type: POST
| Params | Required | Type | Default value |
|:--------------:|:--------:|:---------------:|:-------------:|
| username | Yes | string | - |
| password | Yes | string | - |
| first_name | Yes | string | - |
| last_name | Yes | string | - |
| date_of_birth | Yes | isoformat | - |
| email | Yes | string | - |
| phone | Yes | integer | - |
| qualification | Yes | string | - |
| qualified_year | Yes | integer | - |
| college | Yes | string | - |
| branch | Yes | string | - |
| occupation | Yes | string | - |
| company | No | string | empty string |
| place | Yes | string | - |
| Interests | No | list of strings | empty list |
| has_laptop | No | boolean | false |
| has_internet | No | boolean | false |
| about swecha | No | string | empty string |
Return Type:
- if username, phone number and email id are not exists in our DB it gives the success Response as True
Json response
```json=
{"success": true, "message": "user Created successfully"}
```
- if anyone of the value present in our DB it gives success response as false
```json=
{
"success": false,
"phone_number_exists": true,
"is_email_exists": true,
"user_exists": true
}
```
#### Note:
- in the response message it only gives true for existed values otherwise it gives false
Example:
- suppose username and phone number already exists but email id is not present in our DB the response message will be like
```json=
{
"success": false,
"phone_number_exists": true,
"is_email_exists": false,
"user_exists": true
}
```
Here it is only given the phone_number status and user status are marked true email_id status marked as false as it is not present in our DB.
#### User login
API Endpoint: /authenticate/login
Request Type: POST
| Params | Required | Type | Default value |
|:--------------:|:--------:|:---------------:|:-------------:|
| username | Yes | string | - |
| password | Yes | string | - |
Return Type:
if the user successfully logged in it gives success response as true
```json=
{"success": True, "message": "user logged in successfully"}
```
if the user not authenticated properly the success response as false
```json=
{"success": False, "message": "invalid username or password"}
```
#### User logout
API Endpoint: /authenticate/logout
Request Type: GET
Return Type:
```json=
{"success": True, "message": username}
```