Verifică dacă un contact există deja
curl --request POST \
--url https://staging.housera.ro/api/v1/leads/duplicate-check \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"phone": "<string>"
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://staging.housera.ro/api/v1/leads/duplicate-check",
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>'
]),
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>'})
};
fetch('https://staging.housera.ro/api/v1/leads/duplicate-check', 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/duplicate-check"
payload = {
"name": "<string>",
"phone": "<string>"
}
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": {
"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,
"errors": [
{
"pointer": "<string>",
"code": "<string>",
"detail": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"existing": {
"code": "<string>",
"external_ref": "<string>"
}
}Cererile clienților
Verifică dacă un contact există deja
Aceeași verificare ca la butonul „Adaugă” din portal, înainte de salvare: ultimul contact din aceleași cereri (ale firmei sau ale tale, după board, ca la POST /leads) cu același telefon, comparat în format internațional, sau cu exact același nume. Primești cererea găsită în data și ce s-a potrivit în meta.matched_on, ori data: null. Verificarea nu schimbă nimic. Cere drepturile leads:read și leads:write.
POST
/
leads
/
duplicate-check
Verifică dacă un contact există deja
curl --request POST \
--url https://staging.housera.ro/api/v1/leads/duplicate-check \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"phone": "<string>"
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://staging.housera.ro/api/v1/leads/duplicate-check",
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>'
]),
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>'})
};
fetch('https://staging.housera.ro/api/v1/leads/duplicate-check', 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/duplicate-check"
payload = {
"name": "<string>",
"phone": "<string>"
}
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": {
"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,
"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 Corp
application/json