POST
/
leases
/
tenants
/

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 tenants based on lease parameters.

You can retrieve tenants for a lease with a specific ID.

You can retrieve tenants for all leases within a minimum (min_move_in_date) and/or maximum (max_move_in_date) move in date range.

You can retrieve tenants for leases belonging specific group via the group’s ID.

You can retrieve tenants with a lease at a particular address, with the possibility of narrowing or broadening the search by providing more or less address data.

You can provide either a group id through the group_id parameter or a group external reference through the group_external_ref attribute to filter the list of retrieved tenants down.

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

If no group_id or group_external_ref are specified in the request body, the authenticated user will retrieve tenant 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 of a lease to find the tenants for.

min_move_in_date
string
default: "none"

The lower boundary for the lease’s tenants’ move in date.

max_move_in_date
string
default: "none"

The upper boundary for the lease’s tenants’ move in date.

group_id
string
default: "none"

The id of the group the lease and tenants belong to.

group_external_ref
string
default: "none"

The external reference of the group the lease and tenants belong to.

address
object
default: "none"

The address of a lease to retrieve tenants 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

tenants
string

A list of the tenants 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 tenant operation. Please only provide one of the two."
  }
}

Status Code - 404

Returned if no tenant records could not be found.

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