curl --request POST \
--url https://staging.housera.ro/api/v1/listings/{code}/viewings/clients \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"starts_at": "<string>",
"name": "<string>",
"phone": "<string>"
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://staging.housera.ro/api/v1/listings/{code}/viewings/clients",
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([
'starts_at' => '<string>',
'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({starts_at: '<string>', name: '<string>', phone: '<string>'})
};
fetch('https://staging.housera.ro/api/v1/listings/{code}/viewings/clients', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://staging.housera.ro/api/v1/listings/{code}/viewings/clients"
payload = {
"starts_at": "<string>",
"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,
"kind": "viewing",
"starts_at": "<string>",
"ends_at": "<string>",
"status": "completed",
"request_expires_at": "<string>",
"visitor": {
"name": "<string>",
"email": null,
"phone": "<string>",
"account": true
},
"source": "schedule",
"duration_min": 123,
"held": true,
"bookable": "<string>",
"booked_at": "<string>",
"proposed_starts_at": "<string>",
"attendance_confirmed_at": "<string>",
"reminded_day_at": "<string>",
"reminded_soon_at": "<string>",
"outcome": "offer",
"outcome_at": "<string>",
"agent": {
"name": "<string>",
"email": "<string>"
},
"place": "office",
"place_rooms": 123,
"seat": 123
}
}{
"data": {
"id": 123,
"kind": "viewing",
"starts_at": "<string>",
"ends_at": "<string>",
"status": "completed",
"request_expires_at": "<string>",
"visitor": {
"name": "<string>",
"email": null,
"phone": "<string>",
"account": true
},
"source": "schedule",
"duration_min": 123,
"held": true,
"bookable": "<string>",
"booked_at": "<string>",
"proposed_starts_at": "<string>",
"attendance_confirmed_at": "<string>",
"reminded_day_at": "<string>",
"reminded_soon_at": "<string>",
"outcome": "offer",
"outcome_at": "<string>",
"agent": {
"name": "<string>",
"email": "<string>"
},
"place": "office",
"place_rooms": 123,
"seat": 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,
"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 client care a sunat
Pune în agendă un client fără cont cu care ai stabilit o oră: ora se rezervă pe loc, cu regulile de suprapunere ale agendei, iar clientul intră în contacte. Acceptă Idempotency-Key. Cere listings:write, leads:read și leads:write.
curl --request POST \
--url https://staging.housera.ro/api/v1/listings/{code}/viewings/clients \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"starts_at": "<string>",
"name": "<string>",
"phone": "<string>"
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://staging.housera.ro/api/v1/listings/{code}/viewings/clients",
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([
'starts_at' => '<string>',
'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({starts_at: '<string>', name: '<string>', phone: '<string>'})
};
fetch('https://staging.housera.ro/api/v1/listings/{code}/viewings/clients', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://staging.housera.ro/api/v1/listings/{code}/viewings/clients"
payload = {
"starts_at": "<string>",
"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,
"kind": "viewing",
"starts_at": "<string>",
"ends_at": "<string>",
"status": "completed",
"request_expires_at": "<string>",
"visitor": {
"name": "<string>",
"email": null,
"phone": "<string>",
"account": true
},
"source": "schedule",
"duration_min": 123,
"held": true,
"bookable": "<string>",
"booked_at": "<string>",
"proposed_starts_at": "<string>",
"attendance_confirmed_at": "<string>",
"reminded_day_at": "<string>",
"reminded_soon_at": "<string>",
"outcome": "offer",
"outcome_at": "<string>",
"agent": {
"name": "<string>",
"email": "<string>"
},
"place": "office",
"place_rooms": 123,
"seat": 123
}
}{
"data": {
"id": 123,
"kind": "viewing",
"starts_at": "<string>",
"ends_at": "<string>",
"status": "completed",
"request_expires_at": "<string>",
"visitor": {
"name": "<string>",
"email": null,
"phone": "<string>",
"account": true
},
"source": "schedule",
"duration_min": 123,
"held": true,
"bookable": "<string>",
"booked_at": "<string>",
"proposed_starts_at": "<string>",
"attendance_confirmed_at": "<string>",
"reminded_day_at": "<string>",
"reminded_soon_at": "<string>",
"outcome": "offer",
"outcome_at": "<string>",
"agent": {
"name": "<string>",
"email": "<string>"
},
"place": "office",
"place_rooms": 123,
"seat": 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,
"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 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.
ro, en