Units
Create a unit
Creates a unit.
POST
/
v1
/
units
Create a unit
curl --request POST \
--url https://api.yorlet.com/v1/units \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"currency": "<string>",
"name": "<string>",
"building": "<string>",
"building_data": {
"active": true,
"currency": "gbp",
"description": "<string>",
"marketing": {
"featured_photo": "<string>",
"photos": [
"<string>"
]
},
"metadata": {},
"name": "<string>",
"single_unit": true,
"viewings_availability": {},
"viewings_require_confirmation": true
},
"alternate_postal_code": "<string>",
"assignee": "<string>",
"available_from": 123,
"bathrooms": 123,
"bedrooms": 123,
"compliance": {
"epc": "<string>",
"epc_expires_at": 123,
"electric_safety": "<string>",
"electric_safety_expires_at": 123,
"gas_safety": "<string>",
"gas_safety_expires_at": 123,
"gas_safety_required": true
},
"completion_date": 123,
"contract_address": "<string>",
"currency_options": {},
"default_deposit": 123,
"default_price": 123,
"default_rent_tax_rate": "<string>",
"features": {
"balcony": true,
"pet_friendly": true,
"view": "<string>",
"min_term": "<string>"
},
"fees": {
"management_fee": 123,
"management_fee_amount": 123,
"management_fee_discount": {
"end": 123,
"percent_off": 123
},
"renewal_fee": 123,
"rent_review_fee": 123,
"send_update_email": true,
"tax": 123,
"tenant_find_fee": 123
},
"floor": 123,
"furnished": true,
"maintenance_threshold": 123,
"metadata": {},
"offline_reason": "<string>",
"owners": [
{
"owner": "<string>",
"contract": "<string>",
"percent_ownership": 123
}
],
"plot_number": "<string>",
"reference": "<string>",
"rent": {
"default": 123,
"maximum": 123,
"minimum": 123,
"tax_percent": 123
},
"sales": {
"last_purchase_price": 123
},
"square_foot": 123,
"square_metre": 123,
"unit_group": "<string>",
"workspace": "<string>"
}
'import requests
url = "https://api.yorlet.com/v1/units"
payload = {
"currency": "<string>",
"name": "<string>",
"building": "<string>",
"building_data": {
"active": True,
"currency": "gbp",
"description": "<string>",
"marketing": {
"featured_photo": "<string>",
"photos": ["<string>"]
},
"metadata": {},
"name": "<string>",
"single_unit": True,
"viewings_availability": {},
"viewings_require_confirmation": True
},
"alternate_postal_code": "<string>",
"assignee": "<string>",
"available_from": 123,
"bathrooms": 123,
"bedrooms": 123,
"compliance": {
"epc": "<string>",
"epc_expires_at": 123,
"electric_safety": "<string>",
"electric_safety_expires_at": 123,
"gas_safety": "<string>",
"gas_safety_expires_at": 123,
"gas_safety_required": True
},
"completion_date": 123,
"contract_address": "<string>",
"currency_options": {},
"default_deposit": 123,
"default_price": 123,
"default_rent_tax_rate": "<string>",
"features": {
"balcony": True,
"pet_friendly": True,
"view": "<string>",
"min_term": "<string>"
},
"fees": {
"management_fee": 123,
"management_fee_amount": 123,
"management_fee_discount": {
"end": 123,
"percent_off": 123
},
"renewal_fee": 123,
"rent_review_fee": 123,
"send_update_email": True,
"tax": 123,
"tenant_find_fee": 123
},
"floor": 123,
"furnished": True,
"maintenance_threshold": 123,
"metadata": {},
"offline_reason": "<string>",
"owners": [
{
"owner": "<string>",
"contract": "<string>",
"percent_ownership": 123
}
],
"plot_number": "<string>",
"reference": "<string>",
"rent": {
"default": 123,
"maximum": 123,
"minimum": 123,
"tax_percent": 123
},
"sales": { "last_purchase_price": 123 },
"square_foot": 123,
"square_metre": 123,
"unit_group": "<string>",
"workspace": "<string>"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
currency: '<string>',
name: '<string>',
building: '<string>',
building_data: {
active: true,
currency: 'gbp',
description: '<string>',
marketing: {featured_photo: '<string>', photos: ['<string>']},
metadata: {},
name: '<string>',
single_unit: true,
viewings_availability: {},
viewings_require_confirmation: true
},
alternate_postal_code: '<string>',
assignee: '<string>',
available_from: 123,
bathrooms: 123,
bedrooms: 123,
compliance: {
epc: '<string>',
epc_expires_at: 123,
electric_safety: '<string>',
electric_safety_expires_at: 123,
gas_safety: '<string>',
gas_safety_expires_at: 123,
gas_safety_required: true
},
completion_date: 123,
contract_address: '<string>',
currency_options: {},
default_deposit: 123,
default_price: 123,
default_rent_tax_rate: '<string>',
features: {balcony: true, pet_friendly: true, view: '<string>', min_term: '<string>'},
fees: {
management_fee: 123,
management_fee_amount: 123,
management_fee_discount: {end: 123, percent_off: 123},
renewal_fee: 123,
rent_review_fee: 123,
send_update_email: true,
tax: 123,
tenant_find_fee: 123
},
floor: 123,
furnished: true,
maintenance_threshold: 123,
metadata: {},
offline_reason: '<string>',
owners: [{owner: '<string>', contract: '<string>', percent_ownership: 123}],
plot_number: '<string>',
reference: '<string>',
rent: {default: 123, maximum: 123, minimum: 123, tax_percent: 123},
sales: {last_purchase_price: 123},
square_foot: 123,
square_metre: 123,
unit_group: '<string>',
workspace: '<string>'
})
};
fetch('https://api.yorlet.com/v1/units', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.yorlet.com/v1/units",
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([
'currency' => '<string>',
'name' => '<string>',
'building' => '<string>',
'building_data' => [
'active' => true,
'currency' => 'gbp',
'description' => '<string>',
'marketing' => [
'featured_photo' => '<string>',
'photos' => [
'<string>'
]
],
'metadata' => [
],
'name' => '<string>',
'single_unit' => true,
'viewings_availability' => [
],
'viewings_require_confirmation' => true
],
'alternate_postal_code' => '<string>',
'assignee' => '<string>',
'available_from' => 123,
'bathrooms' => 123,
'bedrooms' => 123,
'compliance' => [
'epc' => '<string>',
'epc_expires_at' => 123,
'electric_safety' => '<string>',
'electric_safety_expires_at' => 123,
'gas_safety' => '<string>',
'gas_safety_expires_at' => 123,
'gas_safety_required' => true
],
'completion_date' => 123,
'contract_address' => '<string>',
'currency_options' => [
],
'default_deposit' => 123,
'default_price' => 123,
'default_rent_tax_rate' => '<string>',
'features' => [
'balcony' => true,
'pet_friendly' => true,
'view' => '<string>',
'min_term' => '<string>'
],
'fees' => [
'management_fee' => 123,
'management_fee_amount' => 123,
'management_fee_discount' => [
'end' => 123,
'percent_off' => 123
],
'renewal_fee' => 123,
'rent_review_fee' => 123,
'send_update_email' => true,
'tax' => 123,
'tenant_find_fee' => 123
],
'floor' => 123,
'furnished' => true,
'maintenance_threshold' => 123,
'metadata' => [
],
'offline_reason' => '<string>',
'owners' => [
[
'owner' => '<string>',
'contract' => '<string>',
'percent_ownership' => 123
]
],
'plot_number' => '<string>',
'reference' => '<string>',
'rent' => [
'default' => 123,
'maximum' => 123,
'minimum' => 123,
'tax_percent' => 123
],
'sales' => [
'last_purchase_price' => 123
],
'square_foot' => 123,
'square_metre' => 123,
'unit_group' => '<string>',
'workspace' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.yorlet.com/v1/units"
payload := strings.NewReader("{\n \"currency\": \"<string>\",\n \"name\": \"<string>\",\n \"building\": \"<string>\",\n \"building_data\": {\n \"active\": true,\n \"currency\": \"gbp\",\n \"description\": \"<string>\",\n \"marketing\": {\n \"featured_photo\": \"<string>\",\n \"photos\": [\n \"<string>\"\n ]\n },\n \"metadata\": {},\n \"name\": \"<string>\",\n \"single_unit\": true,\n \"viewings_availability\": {},\n \"viewings_require_confirmation\": true\n },\n \"alternate_postal_code\": \"<string>\",\n \"assignee\": \"<string>\",\n \"available_from\": 123,\n \"bathrooms\": 123,\n \"bedrooms\": 123,\n \"compliance\": {\n \"epc\": \"<string>\",\n \"epc_expires_at\": 123,\n \"electric_safety\": \"<string>\",\n \"electric_safety_expires_at\": 123,\n \"gas_safety\": \"<string>\",\n \"gas_safety_expires_at\": 123,\n \"gas_safety_required\": true\n },\n \"completion_date\": 123,\n \"contract_address\": \"<string>\",\n \"currency_options\": {},\n \"default_deposit\": 123,\n \"default_price\": 123,\n \"default_rent_tax_rate\": \"<string>\",\n \"features\": {\n \"balcony\": true,\n \"pet_friendly\": true,\n \"view\": \"<string>\",\n \"min_term\": \"<string>\"\n },\n \"fees\": {\n \"management_fee\": 123,\n \"management_fee_amount\": 123,\n \"management_fee_discount\": {\n \"end\": 123,\n \"percent_off\": 123\n },\n \"renewal_fee\": 123,\n \"rent_review_fee\": 123,\n \"send_update_email\": true,\n \"tax\": 123,\n \"tenant_find_fee\": 123\n },\n \"floor\": 123,\n \"furnished\": true,\n \"maintenance_threshold\": 123,\n \"metadata\": {},\n \"offline_reason\": \"<string>\",\n \"owners\": [\n {\n \"owner\": \"<string>\",\n \"contract\": \"<string>\",\n \"percent_ownership\": 123\n }\n ],\n \"plot_number\": \"<string>\",\n \"reference\": \"<string>\",\n \"rent\": {\n \"default\": 123,\n \"maximum\": 123,\n \"minimum\": 123,\n \"tax_percent\": 123\n },\n \"sales\": {\n \"last_purchase_price\": 123\n },\n \"square_foot\": 123,\n \"square_metre\": 123,\n \"unit_group\": \"<string>\",\n \"workspace\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.yorlet.com/v1/units")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"currency\": \"<string>\",\n \"name\": \"<string>\",\n \"building\": \"<string>\",\n \"building_data\": {\n \"active\": true,\n \"currency\": \"gbp\",\n \"description\": \"<string>\",\n \"marketing\": {\n \"featured_photo\": \"<string>\",\n \"photos\": [\n \"<string>\"\n ]\n },\n \"metadata\": {},\n \"name\": \"<string>\",\n \"single_unit\": true,\n \"viewings_availability\": {},\n \"viewings_require_confirmation\": true\n },\n \"alternate_postal_code\": \"<string>\",\n \"assignee\": \"<string>\",\n \"available_from\": 123,\n \"bathrooms\": 123,\n \"bedrooms\": 123,\n \"compliance\": {\n \"epc\": \"<string>\",\n \"epc_expires_at\": 123,\n \"electric_safety\": \"<string>\",\n \"electric_safety_expires_at\": 123,\n \"gas_safety\": \"<string>\",\n \"gas_safety_expires_at\": 123,\n \"gas_safety_required\": true\n },\n \"completion_date\": 123,\n \"contract_address\": \"<string>\",\n \"currency_options\": {},\n \"default_deposit\": 123,\n \"default_price\": 123,\n \"default_rent_tax_rate\": \"<string>\",\n \"features\": {\n \"balcony\": true,\n \"pet_friendly\": true,\n \"view\": \"<string>\",\n \"min_term\": \"<string>\"\n },\n \"fees\": {\n \"management_fee\": 123,\n \"management_fee_amount\": 123,\n \"management_fee_discount\": {\n \"end\": 123,\n \"percent_off\": 123\n },\n \"renewal_fee\": 123,\n \"rent_review_fee\": 123,\n \"send_update_email\": true,\n \"tax\": 123,\n \"tenant_find_fee\": 123\n },\n \"floor\": 123,\n \"furnished\": true,\n \"maintenance_threshold\": 123,\n \"metadata\": {},\n \"offline_reason\": \"<string>\",\n \"owners\": [\n {\n \"owner\": \"<string>\",\n \"contract\": \"<string>\",\n \"percent_ownership\": 123\n }\n ],\n \"plot_number\": \"<string>\",\n \"reference\": \"<string>\",\n \"rent\": {\n \"default\": 123,\n \"maximum\": 123,\n \"minimum\": 123,\n \"tax_percent\": 123\n },\n \"sales\": {\n \"last_purchase_price\": 123\n },\n \"square_foot\": 123,\n \"square_metre\": 123,\n \"unit_group\": \"<string>\",\n \"workspace\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.yorlet.com/v1/units")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"currency\": \"<string>\",\n \"name\": \"<string>\",\n \"building\": \"<string>\",\n \"building_data\": {\n \"active\": true,\n \"currency\": \"gbp\",\n \"description\": \"<string>\",\n \"marketing\": {\n \"featured_photo\": \"<string>\",\n \"photos\": [\n \"<string>\"\n ]\n },\n \"metadata\": {},\n \"name\": \"<string>\",\n \"single_unit\": true,\n \"viewings_availability\": {},\n \"viewings_require_confirmation\": true\n },\n \"alternate_postal_code\": \"<string>\",\n \"assignee\": \"<string>\",\n \"available_from\": 123,\n \"bathrooms\": 123,\n \"bedrooms\": 123,\n \"compliance\": {\n \"epc\": \"<string>\",\n \"epc_expires_at\": 123,\n \"electric_safety\": \"<string>\",\n \"electric_safety_expires_at\": 123,\n \"gas_safety\": \"<string>\",\n \"gas_safety_expires_at\": 123,\n \"gas_safety_required\": true\n },\n \"completion_date\": 123,\n \"contract_address\": \"<string>\",\n \"currency_options\": {},\n \"default_deposit\": 123,\n \"default_price\": 123,\n \"default_rent_tax_rate\": \"<string>\",\n \"features\": {\n \"balcony\": true,\n \"pet_friendly\": true,\n \"view\": \"<string>\",\n \"min_term\": \"<string>\"\n },\n \"fees\": {\n \"management_fee\": 123,\n \"management_fee_amount\": 123,\n \"management_fee_discount\": {\n \"end\": 123,\n \"percent_off\": 123\n },\n \"renewal_fee\": 123,\n \"rent_review_fee\": 123,\n \"send_update_email\": true,\n \"tax\": 123,\n \"tenant_find_fee\": 123\n },\n \"floor\": 123,\n \"furnished\": true,\n \"maintenance_threshold\": 123,\n \"metadata\": {},\n \"offline_reason\": \"<string>\",\n \"owners\": [\n {\n \"owner\": \"<string>\",\n \"contract\": \"<string>\",\n \"percent_ownership\": 123\n }\n ],\n \"plot_number\": \"<string>\",\n \"reference\": \"<string>\",\n \"rent\": {\n \"default\": 123,\n \"maximum\": 123,\n \"minimum\": 123,\n \"tax_percent\": 123\n },\n \"sales\": {\n \"last_purchase_price\": 123\n },\n \"square_foot\": 123,\n \"square_metre\": 123,\n \"unit_group\": \"<string>\",\n \"workspace\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"created": 123,
"object": "unit",
"active": true,
"address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"country": "<string>",
"postal_code": "<string>",
"state": "<string>"
},
"apply_url": "<string>",
"availability": {
"available_from": 123,
"held": true,
"hold_reason": "works",
"released": true,
"released_at": 123,
"state": "available",
"tenancy": "<string>",
"tenancy_end": 123
},
"available_from": 123,
"bathrooms": 123,
"bedrooms": 123,
"building": {
"id": "<string>",
"created": 123,
"object": "building",
"active": true,
"address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"country": "<string>",
"postal_code": "<string>",
"state": "<string>"
},
"currency": "<string>",
"description": "<string>",
"marketing": {
"featured_photo": "<string>",
"photos": [
"<string>"
]
},
"name": "<string>",
"removable": true,
"single_unit": true,
"type": "block_management",
"unit_fees": {
"management_fee": 123,
"management_fee_amount": 123,
"management_fee_discount": {
"percent_off": 123,
"end": 123
},
"management_fee_type": "percentage",
"renewal_fee": 123,
"rent_review_fee": 123,
"tax": 123,
"tax_behavior": "exclusive",
"tenant_find_fee": 123,
"updated_at": 123
},
"viewing_booking_url": "<string>",
"viewings_availability": {},
"viewings_require_confirmation": true,
"account": "<string>",
"deleted": false,
"metadata": {}
},
"completion_date": 123,
"contract_address": "<string>",
"currency": "<string>",
"currency_options": {},
"default_deposit": 123,
"default_price": 123,
"default_rent_tax_rate": {
"id": "<string>",
"created": 123,
"object": "tax_rate",
"active": true,
"country": "<string>",
"description": "<string>",
"inclusive": true,
"jurisdiction": "<string>",
"name": "<string>",
"percentage": 123,
"state": "<string>",
"tax_type": "gst",
"account": "<string>",
"deleted": false,
"metadata": {}
},
"fees": {
"management_fee": 123,
"management_fee_amount": 123,
"management_fee_discount": {
"percent_off": 123,
"end": 123
},
"management_fee_type": "percentage",
"renewal_fee": 123,
"rent_review_fee": 123,
"tax": 123,
"tax_behavior": "exclusive",
"tenant_find_fee": 123,
"updated_at": 123
},
"furnished": true,
"floor": 123,
"has_owner": true,
"maintenance_threshold": 123,
"management_type": "fully_managed",
"name": "<string>",
"plot_number": "<string>",
"square_foot": 123,
"account": "<string>",
"deleted": false,
"active_tenancy_end": 123,
"archived": true,
"archived_at": 123,
"assignee": "<string>",
"features": {
"aspect": "n",
"balcony": true,
"pet_friendly": true,
"view": "<string>",
"min_term": "<string>"
},
"compliance": {
"epc": "<string>",
"epc_expires_at": 123,
"electric_safety": "<string>",
"electric_safety_expires_at": 123,
"gas_safety": "<string>",
"gas_safety_expires_at": 123,
"gas_safety_required": true
},
"metadata": {},
"offline_reason": "<string>",
"reference": "<string>",
"rent": {
"default": 123,
"maximum": 123,
"minimum": 123,
"tax_percent": 123
},
"sales": {
"last_purchase_price": 123
},
"square_metre": 123,
"status": "available",
"under_offer": true,
"unit_group": "<string>"
}Body
application/json
Response
200 - application/json
Returns the unit object if the request succeeded.
Was this page helpful?
Create a unit
curl --request POST \
--url https://api.yorlet.com/v1/units \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"currency": "<string>",
"name": "<string>",
"building": "<string>",
"building_data": {
"active": true,
"currency": "gbp",
"description": "<string>",
"marketing": {
"featured_photo": "<string>",
"photos": [
"<string>"
]
},
"metadata": {},
"name": "<string>",
"single_unit": true,
"viewings_availability": {},
"viewings_require_confirmation": true
},
"alternate_postal_code": "<string>",
"assignee": "<string>",
"available_from": 123,
"bathrooms": 123,
"bedrooms": 123,
"compliance": {
"epc": "<string>",
"epc_expires_at": 123,
"electric_safety": "<string>",
"electric_safety_expires_at": 123,
"gas_safety": "<string>",
"gas_safety_expires_at": 123,
"gas_safety_required": true
},
"completion_date": 123,
"contract_address": "<string>",
"currency_options": {},
"default_deposit": 123,
"default_price": 123,
"default_rent_tax_rate": "<string>",
"features": {
"balcony": true,
"pet_friendly": true,
"view": "<string>",
"min_term": "<string>"
},
"fees": {
"management_fee": 123,
"management_fee_amount": 123,
"management_fee_discount": {
"end": 123,
"percent_off": 123
},
"renewal_fee": 123,
"rent_review_fee": 123,
"send_update_email": true,
"tax": 123,
"tenant_find_fee": 123
},
"floor": 123,
"furnished": true,
"maintenance_threshold": 123,
"metadata": {},
"offline_reason": "<string>",
"owners": [
{
"owner": "<string>",
"contract": "<string>",
"percent_ownership": 123
}
],
"plot_number": "<string>",
"reference": "<string>",
"rent": {
"default": 123,
"maximum": 123,
"minimum": 123,
"tax_percent": 123
},
"sales": {
"last_purchase_price": 123
},
"square_foot": 123,
"square_metre": 123,
"unit_group": "<string>",
"workspace": "<string>"
}
'import requests
url = "https://api.yorlet.com/v1/units"
payload = {
"currency": "<string>",
"name": "<string>",
"building": "<string>",
"building_data": {
"active": True,
"currency": "gbp",
"description": "<string>",
"marketing": {
"featured_photo": "<string>",
"photos": ["<string>"]
},
"metadata": {},
"name": "<string>",
"single_unit": True,
"viewings_availability": {},
"viewings_require_confirmation": True
},
"alternate_postal_code": "<string>",
"assignee": "<string>",
"available_from": 123,
"bathrooms": 123,
"bedrooms": 123,
"compliance": {
"epc": "<string>",
"epc_expires_at": 123,
"electric_safety": "<string>",
"electric_safety_expires_at": 123,
"gas_safety": "<string>",
"gas_safety_expires_at": 123,
"gas_safety_required": True
},
"completion_date": 123,
"contract_address": "<string>",
"currency_options": {},
"default_deposit": 123,
"default_price": 123,
"default_rent_tax_rate": "<string>",
"features": {
"balcony": True,
"pet_friendly": True,
"view": "<string>",
"min_term": "<string>"
},
"fees": {
"management_fee": 123,
"management_fee_amount": 123,
"management_fee_discount": {
"end": 123,
"percent_off": 123
},
"renewal_fee": 123,
"rent_review_fee": 123,
"send_update_email": True,
"tax": 123,
"tenant_find_fee": 123
},
"floor": 123,
"furnished": True,
"maintenance_threshold": 123,
"metadata": {},
"offline_reason": "<string>",
"owners": [
{
"owner": "<string>",
"contract": "<string>",
"percent_ownership": 123
}
],
"plot_number": "<string>",
"reference": "<string>",
"rent": {
"default": 123,
"maximum": 123,
"minimum": 123,
"tax_percent": 123
},
"sales": { "last_purchase_price": 123 },
"square_foot": 123,
"square_metre": 123,
"unit_group": "<string>",
"workspace": "<string>"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
currency: '<string>',
name: '<string>',
building: '<string>',
building_data: {
active: true,
currency: 'gbp',
description: '<string>',
marketing: {featured_photo: '<string>', photos: ['<string>']},
metadata: {},
name: '<string>',
single_unit: true,
viewings_availability: {},
viewings_require_confirmation: true
},
alternate_postal_code: '<string>',
assignee: '<string>',
available_from: 123,
bathrooms: 123,
bedrooms: 123,
compliance: {
epc: '<string>',
epc_expires_at: 123,
electric_safety: '<string>',
electric_safety_expires_at: 123,
gas_safety: '<string>',
gas_safety_expires_at: 123,
gas_safety_required: true
},
completion_date: 123,
contract_address: '<string>',
currency_options: {},
default_deposit: 123,
default_price: 123,
default_rent_tax_rate: '<string>',
features: {balcony: true, pet_friendly: true, view: '<string>', min_term: '<string>'},
fees: {
management_fee: 123,
management_fee_amount: 123,
management_fee_discount: {end: 123, percent_off: 123},
renewal_fee: 123,
rent_review_fee: 123,
send_update_email: true,
tax: 123,
tenant_find_fee: 123
},
floor: 123,
furnished: true,
maintenance_threshold: 123,
metadata: {},
offline_reason: '<string>',
owners: [{owner: '<string>', contract: '<string>', percent_ownership: 123}],
plot_number: '<string>',
reference: '<string>',
rent: {default: 123, maximum: 123, minimum: 123, tax_percent: 123},
sales: {last_purchase_price: 123},
square_foot: 123,
square_metre: 123,
unit_group: '<string>',
workspace: '<string>'
})
};
fetch('https://api.yorlet.com/v1/units', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.yorlet.com/v1/units",
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([
'currency' => '<string>',
'name' => '<string>',
'building' => '<string>',
'building_data' => [
'active' => true,
'currency' => 'gbp',
'description' => '<string>',
'marketing' => [
'featured_photo' => '<string>',
'photos' => [
'<string>'
]
],
'metadata' => [
],
'name' => '<string>',
'single_unit' => true,
'viewings_availability' => [
],
'viewings_require_confirmation' => true
],
'alternate_postal_code' => '<string>',
'assignee' => '<string>',
'available_from' => 123,
'bathrooms' => 123,
'bedrooms' => 123,
'compliance' => [
'epc' => '<string>',
'epc_expires_at' => 123,
'electric_safety' => '<string>',
'electric_safety_expires_at' => 123,
'gas_safety' => '<string>',
'gas_safety_expires_at' => 123,
'gas_safety_required' => true
],
'completion_date' => 123,
'contract_address' => '<string>',
'currency_options' => [
],
'default_deposit' => 123,
'default_price' => 123,
'default_rent_tax_rate' => '<string>',
'features' => [
'balcony' => true,
'pet_friendly' => true,
'view' => '<string>',
'min_term' => '<string>'
],
'fees' => [
'management_fee' => 123,
'management_fee_amount' => 123,
'management_fee_discount' => [
'end' => 123,
'percent_off' => 123
],
'renewal_fee' => 123,
'rent_review_fee' => 123,
'send_update_email' => true,
'tax' => 123,
'tenant_find_fee' => 123
],
'floor' => 123,
'furnished' => true,
'maintenance_threshold' => 123,
'metadata' => [
],
'offline_reason' => '<string>',
'owners' => [
[
'owner' => '<string>',
'contract' => '<string>',
'percent_ownership' => 123
]
],
'plot_number' => '<string>',
'reference' => '<string>',
'rent' => [
'default' => 123,
'maximum' => 123,
'minimum' => 123,
'tax_percent' => 123
],
'sales' => [
'last_purchase_price' => 123
],
'square_foot' => 123,
'square_metre' => 123,
'unit_group' => '<string>',
'workspace' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.yorlet.com/v1/units"
payload := strings.NewReader("{\n \"currency\": \"<string>\",\n \"name\": \"<string>\",\n \"building\": \"<string>\",\n \"building_data\": {\n \"active\": true,\n \"currency\": \"gbp\",\n \"description\": \"<string>\",\n \"marketing\": {\n \"featured_photo\": \"<string>\",\n \"photos\": [\n \"<string>\"\n ]\n },\n \"metadata\": {},\n \"name\": \"<string>\",\n \"single_unit\": true,\n \"viewings_availability\": {},\n \"viewings_require_confirmation\": true\n },\n \"alternate_postal_code\": \"<string>\",\n \"assignee\": \"<string>\",\n \"available_from\": 123,\n \"bathrooms\": 123,\n \"bedrooms\": 123,\n \"compliance\": {\n \"epc\": \"<string>\",\n \"epc_expires_at\": 123,\n \"electric_safety\": \"<string>\",\n \"electric_safety_expires_at\": 123,\n \"gas_safety\": \"<string>\",\n \"gas_safety_expires_at\": 123,\n \"gas_safety_required\": true\n },\n \"completion_date\": 123,\n \"contract_address\": \"<string>\",\n \"currency_options\": {},\n \"default_deposit\": 123,\n \"default_price\": 123,\n \"default_rent_tax_rate\": \"<string>\",\n \"features\": {\n \"balcony\": true,\n \"pet_friendly\": true,\n \"view\": \"<string>\",\n \"min_term\": \"<string>\"\n },\n \"fees\": {\n \"management_fee\": 123,\n \"management_fee_amount\": 123,\n \"management_fee_discount\": {\n \"end\": 123,\n \"percent_off\": 123\n },\n \"renewal_fee\": 123,\n \"rent_review_fee\": 123,\n \"send_update_email\": true,\n \"tax\": 123,\n \"tenant_find_fee\": 123\n },\n \"floor\": 123,\n \"furnished\": true,\n \"maintenance_threshold\": 123,\n \"metadata\": {},\n \"offline_reason\": \"<string>\",\n \"owners\": [\n {\n \"owner\": \"<string>\",\n \"contract\": \"<string>\",\n \"percent_ownership\": 123\n }\n ],\n \"plot_number\": \"<string>\",\n \"reference\": \"<string>\",\n \"rent\": {\n \"default\": 123,\n \"maximum\": 123,\n \"minimum\": 123,\n \"tax_percent\": 123\n },\n \"sales\": {\n \"last_purchase_price\": 123\n },\n \"square_foot\": 123,\n \"square_metre\": 123,\n \"unit_group\": \"<string>\",\n \"workspace\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.yorlet.com/v1/units")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"currency\": \"<string>\",\n \"name\": \"<string>\",\n \"building\": \"<string>\",\n \"building_data\": {\n \"active\": true,\n \"currency\": \"gbp\",\n \"description\": \"<string>\",\n \"marketing\": {\n \"featured_photo\": \"<string>\",\n \"photos\": [\n \"<string>\"\n ]\n },\n \"metadata\": {},\n \"name\": \"<string>\",\n \"single_unit\": true,\n \"viewings_availability\": {},\n \"viewings_require_confirmation\": true\n },\n \"alternate_postal_code\": \"<string>\",\n \"assignee\": \"<string>\",\n \"available_from\": 123,\n \"bathrooms\": 123,\n \"bedrooms\": 123,\n \"compliance\": {\n \"epc\": \"<string>\",\n \"epc_expires_at\": 123,\n \"electric_safety\": \"<string>\",\n \"electric_safety_expires_at\": 123,\n \"gas_safety\": \"<string>\",\n \"gas_safety_expires_at\": 123,\n \"gas_safety_required\": true\n },\n \"completion_date\": 123,\n \"contract_address\": \"<string>\",\n \"currency_options\": {},\n \"default_deposit\": 123,\n \"default_price\": 123,\n \"default_rent_tax_rate\": \"<string>\",\n \"features\": {\n \"balcony\": true,\n \"pet_friendly\": true,\n \"view\": \"<string>\",\n \"min_term\": \"<string>\"\n },\n \"fees\": {\n \"management_fee\": 123,\n \"management_fee_amount\": 123,\n \"management_fee_discount\": {\n \"end\": 123,\n \"percent_off\": 123\n },\n \"renewal_fee\": 123,\n \"rent_review_fee\": 123,\n \"send_update_email\": true,\n \"tax\": 123,\n \"tenant_find_fee\": 123\n },\n \"floor\": 123,\n \"furnished\": true,\n \"maintenance_threshold\": 123,\n \"metadata\": {},\n \"offline_reason\": \"<string>\",\n \"owners\": [\n {\n \"owner\": \"<string>\",\n \"contract\": \"<string>\",\n \"percent_ownership\": 123\n }\n ],\n \"plot_number\": \"<string>\",\n \"reference\": \"<string>\",\n \"rent\": {\n \"default\": 123,\n \"maximum\": 123,\n \"minimum\": 123,\n \"tax_percent\": 123\n },\n \"sales\": {\n \"last_purchase_price\": 123\n },\n \"square_foot\": 123,\n \"square_metre\": 123,\n \"unit_group\": \"<string>\",\n \"workspace\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.yorlet.com/v1/units")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"currency\": \"<string>\",\n \"name\": \"<string>\",\n \"building\": \"<string>\",\n \"building_data\": {\n \"active\": true,\n \"currency\": \"gbp\",\n \"description\": \"<string>\",\n \"marketing\": {\n \"featured_photo\": \"<string>\",\n \"photos\": [\n \"<string>\"\n ]\n },\n \"metadata\": {},\n \"name\": \"<string>\",\n \"single_unit\": true,\n \"viewings_availability\": {},\n \"viewings_require_confirmation\": true\n },\n \"alternate_postal_code\": \"<string>\",\n \"assignee\": \"<string>\",\n \"available_from\": 123,\n \"bathrooms\": 123,\n \"bedrooms\": 123,\n \"compliance\": {\n \"epc\": \"<string>\",\n \"epc_expires_at\": 123,\n \"electric_safety\": \"<string>\",\n \"electric_safety_expires_at\": 123,\n \"gas_safety\": \"<string>\",\n \"gas_safety_expires_at\": 123,\n \"gas_safety_required\": true\n },\n \"completion_date\": 123,\n \"contract_address\": \"<string>\",\n \"currency_options\": {},\n \"default_deposit\": 123,\n \"default_price\": 123,\n \"default_rent_tax_rate\": \"<string>\",\n \"features\": {\n \"balcony\": true,\n \"pet_friendly\": true,\n \"view\": \"<string>\",\n \"min_term\": \"<string>\"\n },\n \"fees\": {\n \"management_fee\": 123,\n \"management_fee_amount\": 123,\n \"management_fee_discount\": {\n \"end\": 123,\n \"percent_off\": 123\n },\n \"renewal_fee\": 123,\n \"rent_review_fee\": 123,\n \"send_update_email\": true,\n \"tax\": 123,\n \"tenant_find_fee\": 123\n },\n \"floor\": 123,\n \"furnished\": true,\n \"maintenance_threshold\": 123,\n \"metadata\": {},\n \"offline_reason\": \"<string>\",\n \"owners\": [\n {\n \"owner\": \"<string>\",\n \"contract\": \"<string>\",\n \"percent_ownership\": 123\n }\n ],\n \"plot_number\": \"<string>\",\n \"reference\": \"<string>\",\n \"rent\": {\n \"default\": 123,\n \"maximum\": 123,\n \"minimum\": 123,\n \"tax_percent\": 123\n },\n \"sales\": {\n \"last_purchase_price\": 123\n },\n \"square_foot\": 123,\n \"square_metre\": 123,\n \"unit_group\": \"<string>\",\n \"workspace\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"created": 123,
"object": "unit",
"active": true,
"address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"country": "<string>",
"postal_code": "<string>",
"state": "<string>"
},
"apply_url": "<string>",
"availability": {
"available_from": 123,
"held": true,
"hold_reason": "works",
"released": true,
"released_at": 123,
"state": "available",
"tenancy": "<string>",
"tenancy_end": 123
},
"available_from": 123,
"bathrooms": 123,
"bedrooms": 123,
"building": {
"id": "<string>",
"created": 123,
"object": "building",
"active": true,
"address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"country": "<string>",
"postal_code": "<string>",
"state": "<string>"
},
"currency": "<string>",
"description": "<string>",
"marketing": {
"featured_photo": "<string>",
"photos": [
"<string>"
]
},
"name": "<string>",
"removable": true,
"single_unit": true,
"type": "block_management",
"unit_fees": {
"management_fee": 123,
"management_fee_amount": 123,
"management_fee_discount": {
"percent_off": 123,
"end": 123
},
"management_fee_type": "percentage",
"renewal_fee": 123,
"rent_review_fee": 123,
"tax": 123,
"tax_behavior": "exclusive",
"tenant_find_fee": 123,
"updated_at": 123
},
"viewing_booking_url": "<string>",
"viewings_availability": {},
"viewings_require_confirmation": true,
"account": "<string>",
"deleted": false,
"metadata": {}
},
"completion_date": 123,
"contract_address": "<string>",
"currency": "<string>",
"currency_options": {},
"default_deposit": 123,
"default_price": 123,
"default_rent_tax_rate": {
"id": "<string>",
"created": 123,
"object": "tax_rate",
"active": true,
"country": "<string>",
"description": "<string>",
"inclusive": true,
"jurisdiction": "<string>",
"name": "<string>",
"percentage": 123,
"state": "<string>",
"tax_type": "gst",
"account": "<string>",
"deleted": false,
"metadata": {}
},
"fees": {
"management_fee": 123,
"management_fee_amount": 123,
"management_fee_discount": {
"percent_off": 123,
"end": 123
},
"management_fee_type": "percentage",
"renewal_fee": 123,
"rent_review_fee": 123,
"tax": 123,
"tax_behavior": "exclusive",
"tenant_find_fee": 123,
"updated_at": 123
},
"furnished": true,
"floor": 123,
"has_owner": true,
"maintenance_threshold": 123,
"management_type": "fully_managed",
"name": "<string>",
"plot_number": "<string>",
"square_foot": 123,
"account": "<string>",
"deleted": false,
"active_tenancy_end": 123,
"archived": true,
"archived_at": 123,
"assignee": "<string>",
"features": {
"aspect": "n",
"balcony": true,
"pet_friendly": true,
"view": "<string>",
"min_term": "<string>"
},
"compliance": {
"epc": "<string>",
"epc_expires_at": 123,
"electric_safety": "<string>",
"electric_safety_expires_at": 123,
"gas_safety": "<string>",
"gas_safety_expires_at": 123,
"gas_safety_required": true
},
"metadata": {},
"offline_reason": "<string>",
"reference": "<string>",
"rent": {
"default": 123,
"maximum": 123,
"minimum": 123,
"tax_percent": 123
},
"sales": {
"last_purchase_price": 123
},
"square_metre": 123,
"status": "available",
"under_offer": true,
"unit_group": "<string>"
}