Set the floor plans
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>"
}
}Photos
Set the floor plans
The listing’s full list of floor plans, one per level, in display order. Each plan has an image (a URL or an upload key), its level and the points that show where each photo was taken. A plan missing from the list is deleted. The response comes right away (202), the plans are processed in the background, and media.processing tells you when they are done.
PUT
/
listings
/
{code}
/
floor-plans
Set the floor plans
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>"
}
}Path Parameters
Query Parameters
The response language, ro or en. It changes error messages (title, detail), labels and, when the listing has an approved translation in that language, its title and description. Codes are the same in every language. It takes precedence over Accept-Language and over the account's language.
Available options:
ro, en Body
application/json
Response
The request was accepted and is being processed in the background.