# Users

An important part of the real estate companies are their employees, Wasi stores relevant information about them and in this section you will see how you can get it through the API.

# Get all users

To get the list of all your users in Wasi, you have the URI:

api.wasi.co/v1/user/all-users

This should return a JSON similar to this one:

{
    "0": {
        "id_user": "1",
        "email": "[email protected]",
        "user_type": "ADMIN",
        "has_profile": "false"
    },
    "1": {
        "id_user": "2",
        "email": "[email protected]",
        "user_type": "ADMIN",
        "has_profile": "true",
        "first_name": "Julian",
        "last_name": "Vega",
        "phone": "018000123456",
        "cell_phone": "3001234567",
        "address": "Avenida siempre viva #12-34",
        "photo": "https:\/\/images.wasi.co\/perfiles\/b20160412033623.png"
    },
    "2": {
        "id_user": "3",
        "email": "[email protected]",
        "user_type": "REALTOR",
        "has_profile": "true",
        "first_name": "Jose",
        "last_name": "Capera",
        "phone": "018000987654",
        "cell_phone": "3009876543",
        "address": "",
        "photo": ""
    },
    "status": "success"
}

# Get a user

To get a user in Wasi, you have the URI:

api.wasi.co/v1/user/#id_user

For a sample user whose id_user is 1, the URI would be:

api.wasi.co/v1/user/get/1

This should return a JSON similar to this one:

{
    "id_user":"1",
    "email":"[email protected]",
    "user_type":"ADMIN",
    "has_profile":"true",
    "first_name":"Julian",
    "last_name":"Vega",
    "phone":"018000123456",
    "cell_phone":"3001234567",
    "address":"Avenida siempre viva #12-34",
    "photo":"https:\/\/images.wasi.co\/perfiles\/b20160412033623.png",
    "status":"success"
}

❗️ Note

In case the information is needed to display contact data, the optional parameter for_contact can be sent with value true. If the requested user is not in active status, the information of the first administrator user will be returned.

Last Updated: 8/3/2020, 9:51:52 PM