curl --request GET \
--url https://staging.housera.ro/api/v1/account/stats \
--header 'Authorization: Bearer <token>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://staging.housera.ro/api/v1/account/stats",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://staging.housera.ro/api/v1/account/stats', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://staging.housera.ro/api/v1/account/stats"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": {
"range": 123,
"scope": "team",
"agent": "<string>",
"timezone": "<string>",
"days": [
"<unknown>"
],
"totals": {
"views": 123,
"saves": 123,
"contacts": 123
},
"previous": {
"views": 123,
"saves": 123,
"contacts": 123
},
"top": [
"<unknown>"
],
"moments": [
"<unknown>"
],
"contacts": {
"sources": [
"<unknown>"
],
"new": 123,
"in_progress": 123
}
}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"existing": {
"code": "<string>",
"external_ref": "<string>"
}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"existing": {
"code": "<string>",
"external_ref": "<string>"
}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"errors": [
{
"pointer": "<string>",
"code": "<string>",
"detail": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"existing": {
"code": "<string>",
"external_ref": "<string>"
}
}How the listings are doing
The figures from the account’s front page: views, saves and contacts for each day, over 7, 30 or 90 days, plus the totals of the period before so you can compare them. A key of an account with no team gets the account’s listings. A key of the owner, an administrator or a manager gets the listings of the team it sees in the portal and can narrow them to one colleague with agent. The chart’s moments and the contact sources come only if the key also has leads:read.
curl --request GET \
--url https://staging.housera.ro/api/v1/account/stats \
--header 'Authorization: Bearer <token>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://staging.housera.ro/api/v1/account/stats",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://staging.housera.ro/api/v1/account/stats', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://staging.housera.ro/api/v1/account/stats"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": {
"range": 123,
"scope": "team",
"agent": "<string>",
"timezone": "<string>",
"days": [
"<unknown>"
],
"totals": {
"views": 123,
"saves": 123,
"contacts": 123
},
"previous": {
"views": 123,
"saves": 123,
"contacts": 123
},
"top": [
"<unknown>"
],
"moments": [
"<unknown>"
],
"contacts": {
"sources": [
"<unknown>"
],
"new": 123,
"in_progress": 123
}
}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"existing": {
"code": "<string>",
"external_ref": "<string>"
}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"existing": {
"code": "<string>",
"external_ref": "<string>"
}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"errors": [
{
"pointer": "<string>",
"code": "<string>",
"detail": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"existing": {
"code": "<string>",
"external_ref": "<string>"
}
}Query Parameters
The response language, ro or en. It changes error messages (title, detail), labels and, when the listing has an approved translation in that language, its title and description. Codes are the same in every language. It takes precedence over Accept-Language and over the account's language.
ro, en