POST
/
leases
/
create
/

You must specify either a unit_id or unit_external_ref for your lease.

If the corresponding unit record does not exist, you must create it separately via the relevant unit/property endpoints.

Authorization
string
default: "none"required

The authentication token for your request

Body

lease
object
default: "none"required

The parameters for the lease to update or create.

tenants
[object]
default: "none"

A list of tenants to be associated with the created or updated lease.

Response

Errors

Listed below are common errors that may be returned by the endpoint, along with their corresponding status code.

Status Code - 400

Missing Authorization header
{
   "error": {
    "type": "missing_authorization",
    "message": "Your request does not include an 'Authorization' header with a bearer token for your account."
  }
}

Status Code - 401

Expired Authorization header bearer token value
{
   "error": {
    "type": "expired_token",
    "message": "The bearer token you have provided in the 'Authorization' header has expired. Please obtain a new one."
  }
}

Status Code - 401

Invalid Authorization header bearer token value
{
   "error": {
    "type": "invalid_authorization",
    "message": "The bearer token you have provided in the 'Authorization' header is invalid."
  }
}

Status Code - 400

Returned if neither a unit id or a unit external reference is passed in the request body

No unit specified for the lease
{
   "error": {
    "type": "no_unit",
    "message": "No unit id or unit external reference provided."
  }
}

Status Code - 400

Returned if a unit with the specified unit id or unit external reference could not be retrieved

Unit to use for lease not found
{
   "error": {
    "type": "unit_not_found",
    "message": "No unit with the provided unit id or unit external reference."
  }
}