Lavanda Developer API

API change history

Lavanda Developer API

Retrieve property details

Retrieve property details

Try it

Request

Request URL

Request parameters

  • string

    The ID of the property. Only available for standalone properties or multi-unit groups.

Request headers

  • string
    Subscription key which provides access to this API. Found in your Profile.

Request body

Responses

200 OK

Success

Representations

{
  "data": {
    "address": {
      "apartment_number": "",
      "city": "London",
      "country": "UK",
      "country_code": "GB",
      "floor": null,
      "lat": 51.4921178,
      "lng": -0.16458,
      "post_code": "SW3 3AX",
      "region": "London",
      "street1": "Some Street",
      "street2": ""
    },
    "amenities": [
      {
        "name": "tv",
        "type": "basic"
      },
      {
        "name": "wifi",
        "type": "basic"
      },
      {
        "name": "heating",
        "type": "basic"
      }
    ],
    "approximate_annual_available_nights": 365,
    "basic_pricing": {
      "currency_code": "GBP",
      "default_rate": 100,
      "maximum_rate": null,
      "minimum_rate": null,
      "monthly_discount": null,
      "weekend_rate": 120,
      "weekly_discount": null
    },
    "beds": [
      {
        "room": "Bedroom 33",
        "type": "king"
      },
      {
        "room": "Bedroom 34",
        "type": "king"
      }
    ],
    "booking_policy": {
      "check_in_time": "15:00",
      "check_out_time": "11:00",
      "house_rules": null,
      "minimum_night_stay": 2,
      "minimum_booking_age": null,
      "parties_allowed": false,
      "pets_allowed": false,
      "smoking_allowed": false,
      "suitable_for_children": false,
      "suitable_for_elderly": false,
      "suitable_for_infants": false
    },
    "cadastral": null,
    "code": "TEST-001",
    "cover_image": {
      "group": "professional",
      "type": "image",
      "url": "https://res.cloudinary.com/lavanda/image/upload/c_fill,h_800,w_800/ops/ffed5b2aead6011b416225e70ed73de9.png"
    },
    "created_at": "2021-11-04T15:45:39.412Z",
    "dedicated_rental": true,
    "default_availability": {
      "available": false
    },
    "features": [
      {
        "description": "for warm water, ...",
        "location": "Bedroom 33",
        "title": "tap quirk"
      },
      {
        "description": "for warm water, ...",
        "location": "Bedroom 34",
        "title": "tap quirk"
      }
    ],
    "hkus": "2.5",
    "id": "nKUbuFFucGw3ZhdYe19FXz5EBllowmRcC1uvFW2M1a0",
    "is_multi_unit_group": false,
    "license": null,
    "location_description": "Near the subway",
    "keynest": {
      "guest_self_check_in": true,
      "guest_set_keys": 1,
      "lockbox_address": {
        "apartment_number": null,
        "city": null,
        "country": null,
        "country_code": null,
        "floor": null,
        "lat": null,
        "lng": null,
        "post_code": null,
        "region": null,
        "street1": null,
        "street2": null
      },
      "lockbox_code": "1234",
      "remote_key_management_address": {
        "apartment_number": null,
        "city": null,
        "country": null,
        "country_code": null,
        "floor": null,
        "lat": null,
        "lng": null,
        "post_code": null,
        "region": null,
        "street1": null,
        "street2": null
      },
      "remote_key_management_opening_hours": null,
      "total_set_keys": 3
    },
    "marketing_description": "Lovely property in London",
    "marketing_title": "Lively flat located in central London",
    "max_occupants": 10,
    "media_items": [
      {
        "group": "professional",
        "type": "image",
        "url": "https://res.cloudinary.com/lavanda/image/upload/c_fill,h_800,w_800/ops/ffed5b2aead6011b416225e70ed73de9.png"
      },
      {
        "group": "professional",
        "type": "image",
        "url": "https://res.cloudinary.com/lavanda/image/upload/c_fill,h_800,w_800/ops/d519a32ca05448f012d1a5d4c30b7dab.png"
      },
      {
        "group": "professional",
        "type": "image",
        "url": "https://res.cloudinary.com/lavanda/image/upload/c_fill,h_800,w_800/ops/c247fc1d71828c4a32645442c7d72b77.png"
      },
      {
        "group": "professional",
        "type": "image",
        "url": "https://res.cloudinary.com/lavanda/image/upload/c_fill,h_800,w_800/ops/5e44e0d7d68177a323240a30160a8f49.png"
      },
      {
        "group": "professional",
        "type": "image",
        "url": "https://res.cloudinary.com/lavanda/image/upload/c_fill,h_800,w_800/ops/2d7bce86bb94f7828c5e1b2326e83ae9.png"
      },
      {
        "group": "professional",
        "type": "image",
        "url": "https://res.cloudinary.com/lavanda/image/upload/c_fill,h_800,w_800/ops/f35da6161f937f916af765ef23944a23.png"
      }
    ],
    "multi_unit_group_id": null,
    "number_of_bathrooms": 1,
    "number_of_bedrooms": 1,
    "procedures": [
      {
        "title": "Wifi",
        "checklist_items": [
          {
            "position": 0,
            "title": "Do this..."
          }
        ],
        "media_items": []
      },
      {
        "title": "Check In",
        "checklist_items": [
          {
            "position": 0,
            "title": "Do this..."
          }
        ],
        "media_items": []
      },
      {
        "title": "Check Out",
        "checklist_items": [
          {
            "position": 0,
            "title": "Do this..."
          }
        ],
        "media_items": []
      },
      {
        "title": "Exit",
        "checklist_items": [
          {
            "position": 0,
            "title": "Do this..."
          }
        ],
        "media_items": []
      }
    ],
    "property_fees": [
      {
        "basis": "flat",
        "cost": 100,
        "fee_type": "MandatoryPropertyFee",
        "guest_threshold": null,
        "name": "Cleaning Fee",
        "percentage": null
      },
      {
        "basis": "person-nights",
        "cost": 100,
        "fee_type": "MandatoryPropertyFee",
        "guest_threshold": 4,
        "name": "Extra Person Fee",
        "percentage": null
      }
    ],
    "property_type": "house",
    "size_in_sqm": 70,
    "total_units": 1,
    "updated_at": "2019-11-20T00:00:00Z",
    "vat": "20.0"
  }
}
{
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "address": {
          "type": "object",
          "properties": {
            "apartment_number": {
              "type": "string",
              "x-nullable": true
            },
            "city": {
              "type": "string",
              "x-nullable": true
            },
            "country": {
              "type": "string",
              "x-nullable": true
            },
            "country_code": {
              "type": "string",
              "x-nullable": true
            },
            "floor": {
              "type": "number",
              "x-nullable": true
            },
            "lat": {
              "type": "number",
              "x-nullable": true
            },
            "lng": {
              "type": "number",
              "x-nullable": true
            },
            "post_code": {
              "type": "string",
              "x-nullable": true
            },
            "region": {
              "type": "string",
              "x-nullable": true
            },
            "street1": {
              "type": "string",
              "x-nullable": true
            },
            "street2": {
              "type": "string",
              "x-nullable": true
            }
          }
        },
        "amenities": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "type": {
                "type": "string"
              }
            }
          }
        },
        "approximate_annual_available_nights": {
          "type": "number"
        },
        "basic_pricing": {
          "type": "object",
          "properties": {
            "currency_code": {
              "type": "string"
            },
            "default_rate": {
              "type": "number"
            },
            "maximum_rate": {
              "type": "number",
              "x-nullable": true
            },
            "minimum_rate": {
              "type": "number",
              "x-nullable": true
            },
            "monthly_discount": {
              "type": "number",
              "x-nullable": true
            },
            "weekend_rate": {
              "type": "number",
              "x-nullable": true
            },
            "weekly_discount": {
              "type": "number",
              "x-nullable": true
            }
          }
        },
        "beds": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "room": {
                "type": "string"
              },
              "type": {
                "type": "string"
              }
            }
          }
        },
        "booking_policy": {
          "type": "object",
          "properties": {
            "check_in_time": {
              "type": "string"
            },
            "check_out_time": {
              "type": "string"
            },
            "house_rules": {
              "type": "string",
              "x-nullable": true
            },
            "minimum_night_stay": {
              "type": "number",
              "x-nullable": true
            },
            "minimum_booking_age": {
              "type": "number",
              "x-nullable": true
            },
            "parties_allowed": {
              "type": "boolean"
            },
            "pets_allowed": {
              "type": "boolean"
            },
            "smoking_allowed": {
              "type": "boolean"
            },
            "suitable_for_children": {
              "type": "boolean"
            },
            "suitable_for_elderly": {
              "type": "boolean"
            },
            "suitable_for_infants": {
              "type": "boolean"
            }
          }
        },
        "cadastral": {
          "type": "string",
          "x-nullable": true
        },
        "code": {
          "type": "string"
        },
        "cover_image": {
          "type": "object",
          "properties": {
            "group": {
              "type": "string"
            },
            "type": {
              "type": "string"
            },
            "url": {
              "type": "string"
            }
          }
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "dedicated_rental": {
          "type": "boolean"
        },
        "default_availability": {
          "type": "object",
          "properties": {
            "default_availability": {
              "type": "boolean"
            }
          }
        },
        "features": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "description": {
                "type": "string"
              },
              "location": {
                "type": "string"
              },
              "title": {
                "type": "string"
              }
            }
          }
        },
        "hkus": {
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "license": {
          "type": "string",
          "x-nullable": true
        },
        "location_description": {
          "type": "string"
        },
        "keynest": {
          "type": "object",
          "properties": {
            "guest_self_check_in": {
              "type": "boolean",
              "x-nullable": true
            },
            "guest_set_keys": {
              "type": "number",
              "x-nullable": true
            },
            "lockbox_address": {
              "type": "object",
              "properties": {
                "apartment_number": {
                  "type": "string",
                  "x-nullable": true
                },
                "city": {
                  "type": "string",
                  "x-nullable": true
                },
                "country": {
                  "type": "string",
                  "x-nullable": true
                },
                "country_code": {
                  "type": "string",
                  "x-nullable": true
                },
                "floor": {
                  "type": "number",
                  "x-nullable": true
                },
                "lat": {
                  "type": "number",
                  "x-nullable": true
                },
                "lng": {
                  "type": "number",
                  "x-nullable": true
                },
                "post_code": {
                  "type": "string",
                  "x-nullable": true
                },
                "region": {
                  "type": "string",
                  "x-nullable": true
                },
                "street1": {
                  "type": "string",
                  "x-nullable": true
                },
                "street2": {
                  "type": "string",
                  "x-nullable": true
                }
              }
            },
            "lockbox_code": {
              "type": "string",
              "x-nullable": true
            },
            "remote_key_management_address": {
              "type": "object",
              "properties": {
                "apartment_number": {
                  "type": "string",
                  "x-nullable": true
                },
                "city": {
                  "type": "string",
                  "x-nullable": true
                },
                "country": {
                  "type": "string",
                  "x-nullable": true
                },
                "country_code": {
                  "type": "string",
                  "x-nullable": true
                },
                "floor": {
                  "type": "number",
                  "x-nullable": true
                },
                "lat": {
                  "type": "number",
                  "x-nullable": true
                },
                "lng": {
                  "type": "number",
                  "x-nullable": true
                },
                "post_code": {
                  "type": "string",
                  "x-nullable": true
                },
                "region": {
                  "type": "string",
                  "x-nullable": true
                },
                "street1": {
                  "type": "string",
                  "x-nullable": true
                },
                "street2": {
                  "type": "string",
                  "x-nullable": true
                }
              }
            },
            "remote_key_management_opening_hours": {
              "type": "string",
              "x-nullable": true
            },
            "total_set_keys": {
              "type": "number",
              "x-nullable": true
            }
          }
        },
        "marketing_description": {
          "type": "string"
        },
        "marketing_title": {
          "type": "string"
        },
        "max_occupants": {
          "type": "number"
        },
        "media_items": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "group": {
                "type": "string"
              },
              "type": {
                "type": "string"
              },
              "url": {
                "type": "string"
              }
            }
          }
        },
        "number_of_bathrooms": {
          "type": "number"
        },
        "number_of_bedrooms": {
          "type": "number"
        },
        "procedures": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "title": {
                "type": "string"
              },
              "checklist_items": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "position": {
                      "type": "number"
                    },
                    "title": {
                      "type": "string"
                    }
                  }
                }
              },
              "media_items": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "group": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    },
                    "url": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "property_fees": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "cost": {
                "type": "number"
              },
              "basis": {
                "type": "string"
              },
              "fee_type": {
                "type": "string"
              },
              "guest_threshold": {
                "type": "number",
                "x-nullable": true
              },
              "name": {
                "type": "string"
              },
              "percentage": {
                "type": "number",
                "format": "float",
                "x-nullable": true
              }
            }
          }
        },
        "property_type": {
          "type": "string"
        },
        "size_in_sqm": {
          "type": "number"
        },
        "updated_at": {
          "type": "string",
          "format": "date-time"
        },
        "vat": {
          "type": "string",
          "format": "float"
        }
      }
    }
  }
}

401 Unauthorized

Unauthorized

Representations

403 Forbidden

Forbidden

Representations

404 Not Found

Not found

Representations

500 Internal Server Error

Server error

Representations

Code samples

@ECHO OFF

curl -v -X GET "https://lavanda.azure-api.net/properties/{id}/details"
-H "Ocp-Apim-Subscription-Key: {subscription key}"

--data-ascii "{body}" 
using System;
using System.Net.Http.Headers;
using System.Text;
using System.Net.Http;
using System.Web;

namespace CSHttpClientSample
{
    static class Program
    {
        static void Main()
        {
            MakeRequest();
            Console.WriteLine("Hit ENTER to exit...");
            Console.ReadLine();
        }
        
        static async void MakeRequest()
        {
            var client = new HttpClient();
            var queryString = HttpUtility.ParseQueryString(string.Empty);

            // Request headers
            client.DefaultRequestHeaders.Add("Ocp-Apim-Subscription-Key", "{subscription key}");

            var uri = "https://lavanda.azure-api.net/properties/{id}/details?" + queryString;

            var response = await client.GetAsync(uri);
        }
    }
}	
// // This sample uses the Apache HTTP client from HTTP Components (http://hc.apache.org/httpcomponents-client-ga/)
import java.net.URI;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.utils.URIBuilder;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;

public class JavaSample 
{
    public static void main(String[] args) 
    {
        HttpClient httpclient = HttpClients.createDefault();

        try
        {
            URIBuilder builder = new URIBuilder("https://lavanda.azure-api.net/properties/{id}/details");


            URI uri = builder.build();
            HttpGet request = new HttpGet(uri);
            request.setHeader("Ocp-Apim-Subscription-Key", "{subscription key}");


            // Request body
            StringEntity reqEntity = new StringEntity("{body}");
            request.setEntity(reqEntity);

            HttpResponse response = httpclient.execute(request);
            HttpEntity entity = response.getEntity();

            if (entity != null) 
            {
                System.out.println(EntityUtils.toString(entity));
            }
        }
        catch (Exception e)
        {
            System.out.println(e.getMessage());
        }
    }
}

<!DOCTYPE html>
<html>
<head>
    <title>JSSample</title>
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
</head>
<body>

<script type="text/javascript">
    $(function() {
        var params = {
            // Request parameters
        };
      
        $.ajax({
            url: "https://lavanda.azure-api.net/properties/{id}/details?" + $.param(params),
            beforeSend: function(xhrObj){
                // Request headers
                xhrObj.setRequestHeader("Ocp-Apim-Subscription-Key","{subscription key}");
            },
            type: "GET",
            // Request body
            data: "{body}",
        })
        .done(function(data) {
            alert("success");
        })
        .fail(function() {
            alert("error");
        });
    });
</script>
</body>
</html>
#import <Foundation/Foundation.h>

int main(int argc, const char * argv[])
{
    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
    
    NSString* path = @"https://lavanda.azure-api.net/properties/{id}/details";
    NSArray* array = @[
                         // Request parameters
                         @"entities=true",
                      ];
    
    NSString* string = [array componentsJoinedByString:@"&"];
    path = [path stringByAppendingFormat:@"?%@", string];

    NSLog(@"%@", path);

    NSMutableURLRequest* _request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:path]];
    [_request setHTTPMethod:@"GET"];
    // Request headers
    [_request setValue:@"{subscription key}" forHTTPHeaderField:@"Ocp-Apim-Subscription-Key"];
    // Request body
    [_request setHTTPBody:[@"{body}" dataUsingEncoding:NSUTF8StringEncoding]];
    
    NSURLResponse *response = nil;
    NSError *error = nil;
    NSData* _connectionData = [NSURLConnection sendSynchronousRequest:_request returningResponse:&response error:&error];

    if (nil != error)
    {
        NSLog(@"Error: %@", error);
    }
    else
    {
        NSError* error = nil;
        NSMutableDictionary* json = nil;
        NSString* dataString = [[NSString alloc] initWithData:_connectionData encoding:NSUTF8StringEncoding];
        NSLog(@"%@", dataString);
        
        if (nil != _connectionData)
        {
            json = [NSJSONSerialization JSONObjectWithData:_connectionData options:NSJSONReadingMutableContainers error:&error];
        }
        
        if (error || !json)
        {
            NSLog(@"Could not parse loaded json with error:%@", error);
        }
        
        NSLog(@"%@", json);
        _connectionData = nil;
    }
    
    [pool drain];

    return 0;
}
<?php
// This sample uses the Apache HTTP client from HTTP Components (http://hc.apache.org/httpcomponents-client-ga/)
require_once 'HTTP/Request2.php';

$request = new Http_Request2('https://lavanda.azure-api.net/properties/{id}/details');
$url = $request->getUrl();

$headers = array(
    // Request headers
    'Ocp-Apim-Subscription-Key' => '{subscription key}',
);

$request->setHeader($headers);

$parameters = array(
    // Request parameters
);

$url->setQueryVariables($parameters);

$request->setMethod(HTTP_Request2::METHOD_GET);

// Request body
$request->setBody("{body}");

try
{
    $response = $request->send();
    echo $response->getBody();
}
catch (HttpException $ex)
{
    echo $ex;
}

?>
########### Python 2.7 #############
import httplib, urllib, base64

headers = {
    # Request headers
    'Ocp-Apim-Subscription-Key': '{subscription key}',
}

params = urllib.urlencode({
})

try:
    conn = httplib.HTTPSConnection('lavanda.azure-api.net')
    conn.request("GET", "/properties/{id}/details?%s" % params, "{body}", headers)
    response = conn.getresponse()
    data = response.read()
    print(data)
    conn.close()
except Exception as e:
    print("[Errno {0}] {1}".format(e.errno, e.strerror))

####################################

########### Python 3.2 #############
import http.client, urllib.request, urllib.parse, urllib.error, base64

headers = {
    # Request headers
    'Ocp-Apim-Subscription-Key': '{subscription key}',
}

params = urllib.parse.urlencode({
})

try:
    conn = http.client.HTTPSConnection('lavanda.azure-api.net')
    conn.request("GET", "/properties/{id}/details?%s" % params, "{body}", headers)
    response = conn.getresponse()
    data = response.read()
    print(data)
    conn.close()
except Exception as e:
    print("[Errno {0}] {1}".format(e.errno, e.strerror))

####################################
require 'net/http'

uri = URI('https://lavanda.azure-api.net/properties/{id}/details')


request = Net::HTTP::Get.new(uri.request_uri)
# Request headers
request['Ocp-Apim-Subscription-Key'] = '{subscription key}'
# Request body
request.body = "{body}"

response = Net::HTTP.start(uri.host, uri.port, :use_ssl => uri.scheme == 'https') do |http|
    http.request(request)
end

puts response.body