Tenants

List a tenant's leases

Returns every lease the tenant is currently on — that is, every lease of theirs that has not been ended. Leases that have already ended are not included, and there is no paging.

GET
https://api.portal.magicdoor.com/company-app/tenants/{tenantId}/leases

Authorization

Authorizationstringrequired
Bearer token — Send your API token in the Authorization header as Bearer <token>. Requests without a valid token are rejected with 401 Unauthorized.

Path parameters

tenantIdstringrequired

The tenant. A Snowflake id, sent as a decimal string.

example: 1830472847398404096

Response

200 · The tenant's leases that have not ended. An empty array when they are on none.

idstring

The lease.

portfolioIdstring

The portfolio the lease's property sits in.

propertyIdstring

The property the lease is for.

unitIdstring

The unit the lease is for.

startstring · date

First day of the lease term.

endstring · date

Last day of the lease term. Absent on a month-to-month lease with no fixed end.

endedboolean

true once the lease has been ended.

monthToMonthboolean

true when the lease rolls month to month.

evictionboolean

true when an eviction is in progress.

chatIdstring

The lease's group conversation. Absent when no conversation exists.

tenantsobject[]

The people on this lease and the dates they are on it for.

balancedecimal

What the lease currently owes, in the company's currency. Negative when the lease is in credit.

currentRentdecimal

The rent charged per period, in the company's currency.

securityDepositPaiddecimal

Deposit received so far.

securityDepositRequesteddecimal

Deposit asked for.

securityDepositDuedecimal

securityDepositRequested minus securityDepositPaid.

lastPaymentDatestring · date

Date of the most recent payment. Absent when nothing has been paid.

earliestUnpaidBillDueDatestring · date

Due date of the oldest unpaid bill. Absent when nothing is unpaid.

iconsstring[]

Icon keys a property manager has pinned to the lease.

moveOutDatestring · date

Date the lease is scheduled to be vacated. Absent when no move-out is scheduled.

draftboolean

true while the lease is still a draft.

statusenum<string>

Where the lease sits in its life, worked out from its dates and flags at the time of the request.

leaseleaseMonthToMonthmonthToMonthevictionexpireddraftendedfuture
expiringStatusenum<string>

How close the lease is to its end date.

nonesoonimminentimmediate
pastDueDaysinteger

Days since the oldest unpaid bill fell due. Absent when the lease owes nothing or nothing is yet overdue.

postedBalancedecimal

The balance counting only charges already posted to the ledger.

401 · The access token is missing, expired, or does not belong to a property manager.

404 · No tenant with that id exists for the calling company. A record that belongs to another company is reported the same way as one that does not exist. The id you asked for is in `entityId`; `detail` names only the kind of record.

A tenant is not a lease tenant

A tenant is a person: one record per human being, with their contact details, their identity documents and their portal sign-in. A lease tenant is that person's place on one particular lease, with its own move-in and move-out dates. The same tenant can be a lease tenant on several leases at once, and stays a tenant after every one of them ends. Endpoints under a lease manage lease tenants; the endpoints here manage the person.