O cerere de la un client
curl --request GET \
--url https://staging.housera.ro/api/v1/leads/{lead} \
--header 'Authorization: Bearer <token>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://staging.housera.ro/api/v1/leads/{lead}",
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/leads/{lead}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://staging.housera.ro/api/v1/leads/{lead}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": {
"id": 123,
"source": "phone",
"status": "new",
"listing": {
"code": "<string>",
"external_ref": "<string>"
},
"complex": {
"code": "<string>",
"title": "<string>",
"url": "<string>"
},
"contact": {
"name": "<string>",
"phone": "<string>",
"email": "<string>"
},
"message": "<string>",
"erased": true,
"note": "<string>",
"price": 123,
"agent": {
"name": "<string>",
"email": "<string>",
"display_name": "<string>"
},
"requests": {
"callback_at": "<string>",
"viewing_at": "<string>"
},
"office": {
"id": 123,
"name": "<string>"
},
"inbox": {
"reason": "no_listing",
"since": "<string>"
},
"created_at": "<string>",
"updated_at": "<string>"
}
}{
"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,
"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>"
}
}Cererile clienților
O cerere de la un client
Cererea, după id-ul primit în listă sau în evenimentele lead.created și lead.updated. Cere dreptul leads:read. Pentru o cerere la care cheia nu are acces, răspunsul e 404.
GET
/
leads
/
{lead}
O cerere de la un client
curl --request GET \
--url https://staging.housera.ro/api/v1/leads/{lead} \
--header 'Authorization: Bearer <token>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://staging.housera.ro/api/v1/leads/{lead}",
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/leads/{lead}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://staging.housera.ro/api/v1/leads/{lead}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": {
"id": 123,
"source": "phone",
"status": "new",
"listing": {
"code": "<string>",
"external_ref": "<string>"
},
"complex": {
"code": "<string>",
"title": "<string>",
"url": "<string>"
},
"contact": {
"name": "<string>",
"phone": "<string>",
"email": "<string>"
},
"message": "<string>",
"erased": true,
"note": "<string>",
"price": 123,
"agent": {
"name": "<string>",
"email": "<string>",
"display_name": "<string>"
},
"requests": {
"callback_at": "<string>",
"viewing_at": "<string>"
},
"office": {
"id": 123,
"name": "<string>"
},
"inbox": {
"reason": "no_listing",
"since": "<string>"
},
"created_at": "<string>",
"updated_at": "<string>"
}
}{
"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,
"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>"
}
}Parametri cale
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