Cum merg anunțurile
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>"
}
}Statistici
Cum merg anunțurile
Cifrele din prima pagină a contului: vizualizările, salvările și contactele pe fiecare zi, pe 7, 30 sau 90 de zile, plus totalurile perioadei de dinainte, ca să le poți compara. Cheia unui cont fără echipă primește anunțurile contului. Cheia titularului, a unui administrator sau a unui manager primește anunțurile echipei pe care o vede în portal și poate filtra pe un coleg cu agent. Momentele graficului și sursele contactelor vin doar dacă cheia are și leads:read.
GET
/
account
/
stats
Cum merg anunțurile
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>"
}
}Parametri interogare
Limba răspunsului, ro sau en. Schimbă mesajele erorilor (title, detail), etichetele și, când anunțul are o traducere aprobată în limba cerută, titlul și descrierea lui. Codurile sunt aceleași în orice limbă. Are întâietate față de Accept-Language și de limba contului.
Opțiuni disponibile:
ro, en