Skip to main content
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
  },
  "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>"
}
'
{
  "id": "<string>",
  "created": 123,
  "object": "unit",
  "active": true,
  "address": {
    "line1": "<string>",
    "line2": "<string>",
    "city": "<string>",
    "country": "<string>",
    "postal_code": "<string>",
    "state": "<string>"
  },
  "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,
    "unit_fees": {
      "management_fee": 123,
      "management_fee_amount": 123,
      "management_fee_discount": {
        "end": 123,
        "percent_off": 123
      },
      "renewal_fee": 123,
      "rent_review_fee": 123,
      "tax": 123,
      "tenant_find_fee": 123,
      "updated_at": 123
    },
    "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>",
    "account": "<string>",
    "deleted": false
  },
  "fees": {
    "management_fee": 123,
    "management_fee_amount": 123,
    "management_fee_discount": {
      "end": 123,
      "percent_off": 123
    },
    "renewal_fee": 123,
    "rent_review_fee": 123,
    "tax": 123,
    "tenant_find_fee": 123,
    "updated_at": 123
  },
  "furnished": true,
  "floor": 123,
  "has_owner": true,
  "maintenance_threshold": 123,
  "name": "<string>",
  "plot_number": "<string>",
  "square_foot": 123,
  "account": "<string>",
  "deleted": false,
  "archived": true,
  "archived_at": 123,
  "assignee": "<string>",
  "features": {
    "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,
  "under_offer": true,
  "unit_group": "<string>"
}

Authorizations

Authorization
string
header
required

API Key authentication. Use "Bearer YOUR_API_KEY".

Body

application/json
currency
string
required

The default currency for the unit.

name
string
required

The name of the unit.

building
string | null

The ID of the building the unit belongs to.

building_data
object

Building details used to create a new building alongside the unit.

address
object

The physical address of the unit.

alternate_postal_code
string | null

An alternate postal code to use for the unit.

assignee
string | null

The ID of the user the unit is assigned to.

available_from
number | null

The date the unit is available from.

bathrooms
number | null

The number of bathrooms in the unit.

bedrooms
number | null

The number of bedrooms in the unit.

compliance
object
completion_date
number | null

The expected completion date of the unit.

contract_address
string | null

The address used on contracts for the unit.

currency_options
object

Per-currency options for the unit, keyed by ISO currency code.

default_deposit
number | null

The default deposit, in the smallest currency unit, charged for the unit.

default_price
number | null

The default monthly rent, in the smallest currency unit, for the unit.

default_rent_tax_rate
string | null

The ID of the default tax rate applied to the rent for the unit.

features
object
fees
object

Fee overrides for the unit. Defaults to the fees on the building when not set.

floor
number | null

The floor the unit is on.

furnished
boolean | null

Whether the unit is furnished.

maintenance_threshold
number | null

The spend threshold, in the smallest currency unit, above which maintenance requires owner approval.

management_type
enum<string>

The management type for the unit.

Available options:
fully_managed,
let_only,
rent_collection
metadata
object

Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.

offline_reason
string | null

The reason the unit is offline.

owners
object[] | null

Owners to attach to the unit on creation.

plot_number
string | null

The plot number of the unit.

reference
string | null

An arbitrary reference attached to the unit.

rent
object
sales
object
square_foot
number | null

The size of the unit in square feet.

square_metre
number | null

The size of the unit in square metres.

status
enum<string>

The status of the unit.

Available options:
available,
maintenance,
offline,
unmanaged
unit_group
string | null

The ID of the unit group the unit belongs to.

workspace
string | null

The ID of the workspace to attach the unit to.

Response

200 - application/json

Returns the unit object if the request succeeded.

id
string
required

Unique identifier for the object.

created
number
required

Time at which the object was created. Measured in seconds since the Unix epoch.

object
enum<string>
required
Available options:
unit
active
boolean
required

Whether the unit is currently active.

address
object
required

The physical address of the unit.

available_from
number | null
required

The date the unit is available from.

bathrooms
number | null
required

The number of bathrooms in the unit.

bedrooms
number | null
required

The number of bedrooms in the unit.

building
required

The building the unit belongs to.

completion_date
number | null
required

The expected completion date of the unit.

contract_address
string | null
required

The address used on contracts for the unit.

currency
string
required

The default currency for the unit.

currency_options
object
required

Per-currency options for the unit, keyed by ISO currency code.

default_deposit
number | null
required

The default deposit, in the smallest currency unit, charged for the unit.

default_price
number | null
required

The default monthly rent, in the smallest currency unit, for the unit.

default_rent_tax_rate
required

The default tax rate applied to the rent for the unit.

fees
object
required

Fee overrides for the unit. Defaults to the fees on the building when not set.

furnished
boolean | null
required

Whether the unit is furnished.

floor
number | null
required

The floor the unit is on.

has_owner
boolean | null
required

Whether the unit currently has at least one owner attached.

maintenance_threshold
number | null
required

The spend threshold, in the smallest currency unit, above which maintenance requires owner approval.

management_type
enum<string>
required

The management type for the unit.

Available options:
fully_managed,
let_only,
rent_collection
name
string
required

The name of the unit.

plot_number
string | null
required

The plot number of the unit.

square_foot
number | null
required

The size of the unit in square feet.

account
string

The account that the object belongs to. Only returned if the request is made with a valid Yorlet-Context header.

deleted
boolean
default:false

Only returned if the object has been deleted.

archived
boolean

Whether the unit has been archived.

archived_at
number | null

The time at which the unit was archived.

assignee
string | null

The ID of the user the unit is assigned to.

features
object
compliance
object
metadata
object

Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.

offline_reason
string | null

The reason the unit is offline.

reference
string | null

An arbitrary reference attached to the unit.

rent
object
sales
object
square_metre
number | null

The size of the unit in square metres.

status
enum<string>

The status of the unit.

Available options:
available,
maintenance,
occupied,
offline,
unmanaged
under_offer
boolean

Whether the unit is currently under offer.

unit_group
string | null

The ID of the unit group the unit belongs to.