Users
The User object represents an individual user in the EstatePrime system. This object is returned in JSON format, containing all available values for a user.
Object
The User object represents an individual user in the EstatePrime system. Below are the fields included in a User object:
Example
json
{
"id": 22,
"first_name": "John",
"last_name": "Due",
"usergroup": 1,
"email": "[email protected]",
"phone": "+30697701000",
"is_active": true
}- id (int): The system id of the contact.
- first_name (string): The first name of the contact.
- last_name (string): The last name of the contact.
- source_id (int): The ID of the user's usergroup.
- email (string): The user's email.
- phone (string): The user's phone number.
- is_active (boolean): Indicates if the user is active.
Get users
/api/users (GET)
Fetch a list of users.
Request
- Method:
GET - Headers: Include authentication headers as described in the Authentication section.
- Body: JSON object with the following parameters:
page(int): The page number to fetch. Defaults to1.
Example Body
json
{
"page": 1
}Response
- 200 OK: Returns a JSON array of contact objects.
Example Response
json
{
"status": 200,
"page": 1,
"total_pages": 1,
"results_per_page": 50,
"total_results": 28,
"data": [
{
"id": 1489,
"first_name": "John",
"last_name": "Doe",
"usergroup": 1,
"email": "[email protected]",
"phone": "+30697701000",
"is_active": false,
"is_company": false
},
//Rest of the data...
]
}Get usergroups
/api/users/usergroups (GET)
Fetch the usergroup names.
Request
- Method:
GET - Headers: Include authentication headers.
Response
- 200 OK: Returns a JSON array of all usergroups.
Example Response
json
{
"status": 200,
"data": [
{
"id": 1,
"name": "Admin",
},
{
"id": 2,
"name": "Agent",
}
]
}
