curl --request POST \
--url https://staging.housera.ro/api/v1/leads \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"phone": "<string>",
"email": "jsmith@example.com",
"note": "<string>",
"price": 50000000
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://staging.housera.ro/api/v1/leads",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'phone' => '<string>',
'email' => 'jsmith@example.com',
'note' => '<string>',
'price' => 50000000
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
phone: '<string>',
email: 'jsmith@example.com',
note: '<string>',
price: 50000000
})
};
fetch('https://staging.housera.ro/api/v1/leads', 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"
payload = {
"name": "<string>",
"phone": "<string>",
"email": "jsmith@example.com",
"note": "<string>",
"price": 50000000
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, 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>"
},
"meta": {
"possible_duplicate": {
"id": 123,
"matched_on": "<string>"
}
}
}{
"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>"
},
"meta": {
"possible_duplicate": {
"id": 123,
"matched_on": "<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>"
}
}{
"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>"
}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"existing": {
"code": "<string>",
"external_ref": "<string>"
}
}Adaugă un contact
Un contact adăugat de mână, ca butonul „Adaugă” din cererile tale de pe portal, cu aceleași reguli pentru nume, telefon și email. Contul cheii devine responsabil. Titularul firmei, un administrator sau un manager îl adaugă în cererile firmei, iar board cu valoarea personal îl lasă în cererile proprii; pentru oricine altcineva, contactul rămâne în cererile proprii. Fără status, contactul pornește din etapa new. Cere drepturile leads:read și leads:write. Cu Idempotency-Key, o cerere repetată în 10 minute întoarce contactul adăugat prima dată (200), cu același meta.possible_duplicate, și nu mai adaugă altul.
curl --request POST \
--url https://staging.housera.ro/api/v1/leads \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"phone": "<string>",
"email": "jsmith@example.com",
"note": "<string>",
"price": 50000000
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://staging.housera.ro/api/v1/leads",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'phone' => '<string>',
'email' => 'jsmith@example.com',
'note' => '<string>',
'price' => 50000000
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
phone: '<string>',
email: 'jsmith@example.com',
note: '<string>',
price: 50000000
})
};
fetch('https://staging.housera.ro/api/v1/leads', 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"
payload = {
"name": "<string>",
"phone": "<string>",
"email": "jsmith@example.com",
"note": "<string>",
"price": 50000000
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, 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>"
},
"meta": {
"possible_duplicate": {
"id": 123,
"matched_on": "<string>"
}
}
}{
"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>"
},
"meta": {
"possible_duplicate": {
"id": 123,
"matched_on": "<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>"
}
}{
"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>"
}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"existing": {
"code": "<string>",
"external_ref": "<string>"
}
}Anteturi
O valoare unică pentru această creare (de exemplu un UUID). O cerere repetată cu aceeași valoare, în 10 minute, întoarce ce a creat prima, fără să creeze altceva: anunțul la POST /listings, contactul la POST /leads, mesajul la POST /leads/{lead}/messages. La anunțuri și la mesaje contează primele 64 de caractere.
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.
ro, en