POST
/
leases
/
find
/

You need to provide exact matches in the body of the request for the attributes of the leases you are looking for.

All date fields included in the body parameters need to be specified as ISO8601-formatted date strings.

Date fields should follow a “YYYY-MM-DD” format.

Example use cases

This endpoint allows you to find leases based on a number of parameters.

You can retrieve all leases for a given group or list of groups by providing their IDs.

You can retrieve all leases for a specific unit by passing the internal ID or the external reference.

You can retrieve leases for a given address, with the possibility of narrowing or broadening the search by providing more or less address data.

You can provide either group ids through the group_ids parameter or group external references through the group_external_refs attribute to filter the list of retrieved leases down.

Do not provide both, as this will result in the request failing.

If no group_ids or group_external_refs are specified in the request body, the authenticated user will retrieve lease records for all groups they have access to.

Authorization
string
default: "none"required

The authentication token for your request

Body

identifier
string
default: "none"

The identifier for the leases to be retrieved.

start_date
string
default: "none"

The start date of the leases to be retrieved.

end_date
string
default: "none"

The end date of the leases to be retrieved.

move_in_date
string
default: "none"

The move in date of the leases to be retrieved.

group_ids
[string]
default: "none"

A list of group ids to retrieve leases for.

groups_external_refs
[string]
default: "none"

A list of group external refs to retrieve leases for.

unit_external_refs
[string]
default: "none"

A list of unit external references to retrieve leases for.

unit_identifiers
[string]
default: "none"

A list of unit internal IDs to retrieve leases for.

address
object
default: "none"

An address to retrieve leases for.

after-id
string
default: "1"

The API returns a maximum of 100 records per call.

You can use this parameter to load the next set of records by passing in the value returned in the response, under last_id.

Response

leases
string

A list of the leases that have been retrieved.

last_id
integer

The last id in the set of results returned for this API call.

You can use this value in the after-id parameter to load the next set of results.

If there are no more results to load, this value will be -1.

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 both a group id and group_external_ref are provided

Both group id and external ref provided for the tenant find operation
{
   "error": {
    "type": "both_group_identifiers_provided",
    "message": "You have provided both a group id and group external reference for the find leases operation. Please only provide one of the two."
  }
}

Status Code - 404

Returned if no lease records could not be found.

No lease records found for the provided parameters
{
   "error": {
    "type": "not_found",
    "message": "There are no lease records matching the provided parameters."
  }
}