The users model has the following endpoints:
Action | Method | Resource | Description |
---|---|---|---|
Get users |
|
| Get all users of the project. |
Get user |
|
| Get user with id |
Create |
|
| Create a new user. |
Update |
|
| Update user with id |
Delete |
|
| Delete user with id |
The users model has the following attributes:
Attribute | Type | Required | Description | Whereable |
---|---|---|---|---|
name | string | no | The user's first and/or middle name. | Yes |
middle_name | string | no | The user's middle name | Yes |
lastname | string | no | The user's last name. | Yes |
second_lastname | string | no | The user's second lastname | |
string | no, required to create. | The user's email. | Yes | |
password | string | no, required to create. | The user's password, minimum 8 characteres. | No |
photo | base64 string, url image or file image | no | The user's photo. | No |
birthdate | date | no | The user's birthdate, with format MM/DD/YYYY (e.g. "12/31/2018") | Yes |
cellphone | string | no | The user's cellphone, minimum 10 characteres. | Yes |
country_phone_code | integer | no | No | |
address | string | no | The user's address. | Yes |
address_notes | string | no | The user's address notes. (e.g "Second floor") | No |
zipcode | string | no | The user's zip code/postal code. | Yes |
location | json | no | The user's position. (e.g. "{"lat": 10, "lng": 10}"). | No |
level | integer | no | The user's role. | Yes |
busy | boolean | no | The user's status (e.g. if the driver is busy with an assigned order). | Yes |
available | boolean | no | The user's status (e.g. if the driver is available to assign order). | Yes |
enabled | boolean | no | The user's status. | Yes |
User levels
User level is used to control the access to the different functionalities by discriminating by the type of user. Users levels are listed bellow:
Level | Type of user | Description |
---|---|---|
0 | Administrator |
|
1 | City manager | Functionality coming soon |
2 | Business owner |
|
3 | Customer |
|
4 | Driver |
|
5 | Driver manager | Functionality coming soon |