Units
Update a unit
Updates the specified unit by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
POST
/
v1
/
units
/
{id}
Update a unit
curl --request POST \
--url https://api.yorlet.com/v1/units/{id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"country": "<string>",
"postal_code": "<string>",
"state": "<string>"
},
"alternate_postal_code": "<string>",
"archived": true,
"assignee": "<string>",
"available_from": 123,
"bathrooms": 123,
"bedrooms": 123,
"completion_date": 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,
"send_email": true
},
"contract_address": "<string>",
"currency_options": {},
"custom_postal_code": "<string>",
"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": {},
"name": "<string>",
"offline_reason": "<string>",
"owners": [
{
"owner": "<string>",
"contract": "<string>",
"percent_ownership": 123
}
],
"ownership_change": {
"ended_at": 123,
"ended_description": "<string>",
"send_notice": true,
"retain_owner_details": true
},
"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>"
}
'import requests
url = "https://api.yorlet.com/v1/units/{id}"
payload = {
"address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"country": "<string>",
"postal_code": "<string>",
"state": "<string>"
},
"alternate_postal_code": "<string>",
"archived": True,
"assignee": "<string>",
"available_from": 123,
"bathrooms": 123,
"bedrooms": 123,
"completion_date": 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,
"send_email": True
},
"contract_address": "<string>",
"currency_options": {},
"custom_postal_code": "<string>",
"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": {},
"name": "<string>",
"offline_reason": "<string>",
"owners": [
{
"owner": "<string>",
"contract": "<string>",
"percent_ownership": 123
}
],
"ownership_change": {
"ended_at": 123,
"ended_description": "<string>",
"send_notice": True,
"retain_owner_details": True
},
"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>"
}
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({
address: {
line1: '<string>',
line2: '<string>',
city: '<string>',
country: '<string>',
postal_code: '<string>',
state: '<string>'
},
alternate_postal_code: '<string>',
archived: true,
assignee: '<string>',
available_from: 123,
bathrooms: 123,
bedrooms: 123,
completion_date: 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,
send_email: true
},
contract_address: '<string>',
currency_options: {},
custom_postal_code: '<string>',
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: {},
name: '<string>',
offline_reason: '<string>',
owners: [{owner: '<string>', contract: '<string>', percent_ownership: 123}],
ownership_change: {
ended_at: 123,
ended_description: '<string>',
send_notice: true,
retain_owner_details: true
},
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>'
})
};
fetch('https://api.yorlet.com/v1/units/{id}', 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/{id}",
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([
'address' => [
'line1' => '<string>',
'line2' => '<string>',
'city' => '<string>',
'country' => '<string>',
'postal_code' => '<string>',
'state' => '<string>'
],
'alternate_postal_code' => '<string>',
'archived' => true,
'assignee' => '<string>',
'available_from' => 123,
'bathrooms' => 123,
'bedrooms' => 123,
'completion_date' => 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,
'send_email' => true
],
'contract_address' => '<string>',
'currency_options' => [
],
'custom_postal_code' => '<string>',
'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' => [
],
'name' => '<string>',
'offline_reason' => '<string>',
'owners' => [
[
'owner' => '<string>',
'contract' => '<string>',
'percent_ownership' => 123
]
],
'ownership_change' => [
'ended_at' => 123,
'ended_description' => '<string>',
'send_notice' => true,
'retain_owner_details' => true
],
'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>'
]),
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/{id}"
payload := strings.NewReader("{\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"country\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"state\": \"<string>\"\n },\n \"alternate_postal_code\": \"<string>\",\n \"archived\": true,\n \"assignee\": \"<string>\",\n \"available_from\": 123,\n \"bathrooms\": 123,\n \"bedrooms\": 123,\n \"completion_date\": 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 \"send_email\": true\n },\n \"contract_address\": \"<string>\",\n \"currency_options\": {},\n \"custom_postal_code\": \"<string>\",\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 \"name\": \"<string>\",\n \"offline_reason\": \"<string>\",\n \"owners\": [\n {\n \"owner\": \"<string>\",\n \"contract\": \"<string>\",\n \"percent_ownership\": 123\n }\n ],\n \"ownership_change\": {\n \"ended_at\": 123,\n \"ended_description\": \"<string>\",\n \"send_notice\": true,\n \"retain_owner_details\": true\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}")
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/{id}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"country\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"state\": \"<string>\"\n },\n \"alternate_postal_code\": \"<string>\",\n \"archived\": true,\n \"assignee\": \"<string>\",\n \"available_from\": 123,\n \"bathrooms\": 123,\n \"bedrooms\": 123,\n \"completion_date\": 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 \"send_email\": true\n },\n \"contract_address\": \"<string>\",\n \"currency_options\": {},\n \"custom_postal_code\": \"<string>\",\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 \"name\": \"<string>\",\n \"offline_reason\": \"<string>\",\n \"owners\": [\n {\n \"owner\": \"<string>\",\n \"contract\": \"<string>\",\n \"percent_ownership\": 123\n }\n ],\n \"ownership_change\": {\n \"ended_at\": 123,\n \"ended_description\": \"<string>\",\n \"send_notice\": true,\n \"retain_owner_details\": true\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}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.yorlet.com/v1/units/{id}")
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 \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"country\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"state\": \"<string>\"\n },\n \"alternate_postal_code\": \"<string>\",\n \"archived\": true,\n \"assignee\": \"<string>\",\n \"available_from\": 123,\n \"bathrooms\": 123,\n \"bedrooms\": 123,\n \"completion_date\": 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 \"send_email\": true\n },\n \"contract_address\": \"<string>\",\n \"currency_options\": {},\n \"custom_postal_code\": \"<string>\",\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 \"name\": \"<string>\",\n \"offline_reason\": \"<string>\",\n \"owners\": [\n {\n \"owner\": \"<string>\",\n \"contract\": \"<string>\",\n \"percent_ownership\": 123\n }\n ],\n \"ownership_change\": {\n \"ended_at\": 123,\n \"ended_description\": \"<string>\",\n \"send_notice\": true,\n \"retain_owner_details\": true\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}"
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 update succeeded.
Was this page helpful?
Update a unit
curl --request POST \
--url https://api.yorlet.com/v1/units/{id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"country": "<string>",
"postal_code": "<string>",
"state": "<string>"
},
"alternate_postal_code": "<string>",
"archived": true,
"assignee": "<string>",
"available_from": 123,
"bathrooms": 123,
"bedrooms": 123,
"completion_date": 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,
"send_email": true
},
"contract_address": "<string>",
"currency_options": {},
"custom_postal_code": "<string>",
"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": {},
"name": "<string>",
"offline_reason": "<string>",
"owners": [
{
"owner": "<string>",
"contract": "<string>",
"percent_ownership": 123
}
],
"ownership_change": {
"ended_at": 123,
"ended_description": "<string>",
"send_notice": true,
"retain_owner_details": true
},
"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>"
}
'import requests
url = "https://api.yorlet.com/v1/units/{id}"
payload = {
"address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"country": "<string>",
"postal_code": "<string>",
"state": "<string>"
},
"alternate_postal_code": "<string>",
"archived": True,
"assignee": "<string>",
"available_from": 123,
"bathrooms": 123,
"bedrooms": 123,
"completion_date": 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,
"send_email": True
},
"contract_address": "<string>",
"currency_options": {},
"custom_postal_code": "<string>",
"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": {},
"name": "<string>",
"offline_reason": "<string>",
"owners": [
{
"owner": "<string>",
"contract": "<string>",
"percent_ownership": 123
}
],
"ownership_change": {
"ended_at": 123,
"ended_description": "<string>",
"send_notice": True,
"retain_owner_details": True
},
"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>"
}
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({
address: {
line1: '<string>',
line2: '<string>',
city: '<string>',
country: '<string>',
postal_code: '<string>',
state: '<string>'
},
alternate_postal_code: '<string>',
archived: true,
assignee: '<string>',
available_from: 123,
bathrooms: 123,
bedrooms: 123,
completion_date: 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,
send_email: true
},
contract_address: '<string>',
currency_options: {},
custom_postal_code: '<string>',
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: {},
name: '<string>',
offline_reason: '<string>',
owners: [{owner: '<string>', contract: '<string>', percent_ownership: 123}],
ownership_change: {
ended_at: 123,
ended_description: '<string>',
send_notice: true,
retain_owner_details: true
},
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>'
})
};
fetch('https://api.yorlet.com/v1/units/{id}', 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/{id}",
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([
'address' => [
'line1' => '<string>',
'line2' => '<string>',
'city' => '<string>',
'country' => '<string>',
'postal_code' => '<string>',
'state' => '<string>'
],
'alternate_postal_code' => '<string>',
'archived' => true,
'assignee' => '<string>',
'available_from' => 123,
'bathrooms' => 123,
'bedrooms' => 123,
'completion_date' => 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,
'send_email' => true
],
'contract_address' => '<string>',
'currency_options' => [
],
'custom_postal_code' => '<string>',
'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' => [
],
'name' => '<string>',
'offline_reason' => '<string>',
'owners' => [
[
'owner' => '<string>',
'contract' => '<string>',
'percent_ownership' => 123
]
],
'ownership_change' => [
'ended_at' => 123,
'ended_description' => '<string>',
'send_notice' => true,
'retain_owner_details' => true
],
'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>'
]),
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/{id}"
payload := strings.NewReader("{\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"country\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"state\": \"<string>\"\n },\n \"alternate_postal_code\": \"<string>\",\n \"archived\": true,\n \"assignee\": \"<string>\",\n \"available_from\": 123,\n \"bathrooms\": 123,\n \"bedrooms\": 123,\n \"completion_date\": 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 \"send_email\": true\n },\n \"contract_address\": \"<string>\",\n \"currency_options\": {},\n \"custom_postal_code\": \"<string>\",\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 \"name\": \"<string>\",\n \"offline_reason\": \"<string>\",\n \"owners\": [\n {\n \"owner\": \"<string>\",\n \"contract\": \"<string>\",\n \"percent_ownership\": 123\n }\n ],\n \"ownership_change\": {\n \"ended_at\": 123,\n \"ended_description\": \"<string>\",\n \"send_notice\": true,\n \"retain_owner_details\": true\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}")
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/{id}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"country\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"state\": \"<string>\"\n },\n \"alternate_postal_code\": \"<string>\",\n \"archived\": true,\n \"assignee\": \"<string>\",\n \"available_from\": 123,\n \"bathrooms\": 123,\n \"bedrooms\": 123,\n \"completion_date\": 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 \"send_email\": true\n },\n \"contract_address\": \"<string>\",\n \"currency_options\": {},\n \"custom_postal_code\": \"<string>\",\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 \"name\": \"<string>\",\n \"offline_reason\": \"<string>\",\n \"owners\": [\n {\n \"owner\": \"<string>\",\n \"contract\": \"<string>\",\n \"percent_ownership\": 123\n }\n ],\n \"ownership_change\": {\n \"ended_at\": 123,\n \"ended_description\": \"<string>\",\n \"send_notice\": true,\n \"retain_owner_details\": true\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}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.yorlet.com/v1/units/{id}")
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 \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"country\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"state\": \"<string>\"\n },\n \"alternate_postal_code\": \"<string>\",\n \"archived\": true,\n \"assignee\": \"<string>\",\n \"available_from\": 123,\n \"bathrooms\": 123,\n \"bedrooms\": 123,\n \"completion_date\": 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 \"send_email\": true\n },\n \"contract_address\": \"<string>\",\n \"currency_options\": {},\n \"custom_postal_code\": \"<string>\",\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 \"name\": \"<string>\",\n \"offline_reason\": \"<string>\",\n \"owners\": [\n {\n \"owner\": \"<string>\",\n \"contract\": \"<string>\",\n \"percent_ownership\": 123\n }\n ],\n \"ownership_change\": {\n \"ended_at\": 123,\n \"ended_description\": \"<string>\",\n \"send_notice\": true,\n \"retain_owner_details\": true\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}"
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>"
}