Lease documents

List lease documents

Returns a page of lease documents across the company, with the leases, units, properties and stored files they refer to alongside. Filter by lease to see one tenancy's paperwork.

GET
https://api.portal.magicdoor.com/company-app/lease-documents

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.

Query parameters

pageinteger

Which page to return. Starts at 1.

default: 1example: 1
pageSizeinteger

How many rows per page, between 1 and 100.

default: 50example: 50
leaseIdstring

Only documents on this lease. A Snowflake id, sent as a decimal string.

unitIdstring

Only documents on leases at this unit. A Snowflake id, sent as a decimal string.

propertyIdstring

Only documents on leases at this property. A Snowflake id, sent as a decimal string.

portfolioIdstring

Only documents on leases in this portfolio. A Snowflake id, sent as a decimal string.

statusenum<string>

Only documents in this state.

draftpendingSignaturescompletedretracted

Response

200 · A page of lease documents.

itemsLeaseDocument[]

The rows on this page.

currentPageinteger

The page you asked for. Pages start at 1.

totalPagesinteger

How many pages exist at this page size.

pageSizeinteger

How many rows a page holds.

totalCountinteger

How many rows match in total, across all pages.

propertiesProperty[]

The properties the documents' leases are on.

unitsUnit[]

The units the documents' leases are on.

leasesLease[]

The leases the documents belong to.

filesFile[]

The stored PDFs the documents point at.

400 · The request failed validation. `errors` maps each field name to what was wrong with it.

401 · The access token is missing, expired, or not for this company.

The signing flow

A lease document starts as a draft. Place the signature and text boxes on it with the update endpoint, then call begin-signing to send it out, which moves it to pendingSignatures. Once every signer has signed it becomes completed. Retracting pulls it back out of signing.