Setează planurile
curl --request PUT \
--url https://staging.housera.ro/api/v1/listings/{code}/floor-plans \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"floor_plans": [
{
"url": "<string>",
"key": "<string>",
"level": "<string>",
"hotspots": [
{
"x": 0.5,
"y": 0.5,
"angle": 180,
"photo_url": "<string>",
"photo_key": "<string>"
}
]
}
]
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://staging.housera.ro/api/v1/listings/{code}/floor-plans",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'floor_plans' => [
[
'url' => '<string>',
'key' => '<string>',
'level' => '<string>',
'hotspots' => [
[
'x' => 0.5,
'y' => 0.5,
'angle' => 180,
'photo_url' => '<string>',
'photo_key' => '<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: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
floor_plans: [
{
url: '<string>',
key: '<string>',
level: '<string>',
hotspots: [{x: 0.5, y: 0.5, angle: 180, photo_url: '<string>', photo_key: '<string>'}]
}
]
})
};
fetch('https://staging.housera.ro/api/v1/listings/{code}/floor-plans', 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}/floor-plans"
payload = { "floor_plans": [
{
"url": "<string>",
"key": "<string>",
"level": "<string>",
"hotspots": [
{
"x": 0.5,
"y": 0.5,
"angle": 180,
"photo_url": "<string>",
"photo_key": "<string>"
}
]
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"queued": 123,
"warnings": [
{
"pointer": "<string>",
"code": "plan_level_gone"
}
]
}{
"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>"
}
}Poze
Setează planurile
Lista completă a planurilor anunțului, câte unul pe nivel, în ordinea afișării. Fiecare plan are o imagine (un URL sau o cheie de încărcare), nivelul și punctele care arată unde a fost făcută fiecare poză. Un plan care lipsește din listă se șterge. Răspunsul vine imediat (202), planurile se procesează în fundal, iar media.processing arată când s-a terminat.
PUT
/
listings
/
{code}
/
floor-plans
Setează planurile
curl --request PUT \
--url https://staging.housera.ro/api/v1/listings/{code}/floor-plans \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"floor_plans": [
{
"url": "<string>",
"key": "<string>",
"level": "<string>",
"hotspots": [
{
"x": 0.5,
"y": 0.5,
"angle": 180,
"photo_url": "<string>",
"photo_key": "<string>"
}
]
}
]
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://staging.housera.ro/api/v1/listings/{code}/floor-plans",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'floor_plans' => [
[
'url' => '<string>',
'key' => '<string>',
'level' => '<string>',
'hotspots' => [
[
'x' => 0.5,
'y' => 0.5,
'angle' => 180,
'photo_url' => '<string>',
'photo_key' => '<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: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
floor_plans: [
{
url: '<string>',
key: '<string>',
level: '<string>',
hotspots: [{x: 0.5, y: 0.5, angle: 180, photo_url: '<string>', photo_key: '<string>'}]
}
]
})
};
fetch('https://staging.housera.ro/api/v1/listings/{code}/floor-plans', 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}/floor-plans"
payload = { "floor_plans": [
{
"url": "<string>",
"key": "<string>",
"level": "<string>",
"hotspots": [
{
"x": 0.5,
"y": 0.5,
"angle": 180,
"photo_url": "<string>",
"photo_key": "<string>"
}
]
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"queued": 123,
"warnings": [
{
"pointer": "<string>",
"code": "plan_level_gone"
}
]
}{
"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>"
}
}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 Corp
application/json
Răspuns
Cererea a fost acceptată și se procesează în fundal.