Agencies/users
Available methods
HTTP method | Path | Function |
---|---|---|
get | /agencies/{agency_id}/users | Retrieve the users list |
get | /agencies/{agency_id}/users/{user_id}/actions | Retrieve actions list of a specific user |
get Retrieve the users list /agencies/{agency_id}/users
Path parameters
- agency_id The unique id for the real estate agency
Request body parameters
- limit The number of records to return (max: 10000, default: 10000)
- offset The number of records to skip (default: 0)
Response body
- id Unique ID
- agency Unique ID of the agency (should be equal to {agency_id})
- active true/false (boolean)
- created_at Date of the first creation
- updated_at Date of the last update
- firstname Firstname
- lastname Lastname
- username Login
- password Password (encrypted)
- group Group (please report to user_group)
- email e-mail address
- phone Phone number
- mobile Mobile number
- fax Fax number
- timezone Timezone (timezone list)
- picture URL for picture
Response body private mode
- birthday_at Birthday date
Example request
curl --request GET \
--url 'https://api.apimo.pro/agencies/{agency_id}/users' \
--user 'provider:token'
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.apimo.pro/agencies/{agency_id}/users');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_USERPWD, 'provider:token');
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
$output = curl_exec($ch);
curl_close($ch);
$values = json_decode($output, true);
?>
Example response
HTTP/1.1 200 OK
Server: nginx
Date: Mon, 30 Dec 2024 17:59:35 +0100
Content-Type: application/json; charset=utf-8
Content-Length: 137
Connection: keep-alive
Vary: Accept-Encoding
{"users":[{"id":"9","agency":"14","active":true,"created_at":"2008-02-05 17:53:03","updated_at":"2016-04-15 23:07:33","firstname":"Marc","lastname":"WYLER","username":"mylogin","password":"*********","group":"2","email":"NO-SPAM@swissmedimmo.com","phone":null,"mobile":"+33620000000","fax":null,"birthday_at":"1965-01-01","timezone":"Europe\/Paris","picture":"https:\/\/api.apimo.pro\/uploads\/user\/9\/picture_200.jpg"}],"total_items":1}
get Retrieve actions list of a specific user /agencies/{agency_id}/users/{user_id}/actions
Path parameters
- agency_id The unique id for the real estate agency
- user_id The unique id for the user/agent
Request body parameters
- limit The number of records to return (max: 1000, default: 1000)
- offset The number of records to skip (default: 0)
- type Return records with specific type
Response body
- id Unique ID
- type Type of the action
- user Unique ID of the user (should be equal to {user_id})
- contact Unique ID of the contact
- date Date of the action
- time_start Start time of the action
- time_end End time of the action
- subject Subject of the action (can be the subject of an e-mail)
- content Content of the action (can be the body of an e-mail)
- properties List of properties
- referral Origin of the action
- subreferral Sub-origin of the action
- created_at Date of the first creation
- updated_at Date of the last update
Example request
curl --request GET \
--url 'https://api.apimo.pro/agencies/{agency_id}/users/{user_id}/actions' \
--user 'provider:token'
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.apimo.pro/agencies/{agency_id}/users/{user_id}/actions');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_USERPWD, 'provider:token');
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
$output = curl_exec($ch);
curl_close($ch);
$values = json_decode($output, true);
?>
Example response
HTTP/1.1 200 OK
Server: nginx
Date: Mon, 30 Dec 2024 17:59:35 +0100
Content-Type: application/json; charset=utf-8
Content-Length: 137
Connection: keep-alive
Vary: Accept-Encoding
{"actions":[{"id":"19344999","type":"2","user":"1234","contact":"8520201","date":"2018-09-11","time_start":"14:43:20","time_end":"15:43:00","subject":"More details on a new property","content":"Hello, \u2026","properties":{"id":"233030","report":null,"price":"2600000","currency":"EUR","rating":null,"assessment":null},"referral":null,"subreferral":null,"created_at":"2018-09-11 14:43:20","updated_at":"2018-09-11 14:43:20"}],"total_items":1}