Lease documents

Replace a lease document's PDF (multipart)

Replaces a lease document's PDF by uploading it in one multipart request. Kept for older integrations; new work should request an upload session and then replace the file by its session id.

Request an upload session, upload the PDF there, then replace the file with the JSON endpoint.
PUT
https://api.portal.magicdoor.com/company-app/lease-documents/{leaseDocumentId}/file

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

leaseDocumentIdstringrequired

The document whose file you are replacing. A Snowflake id, sent as a decimal string.

example: 1842019384756201984

Body

multipart/form-data

filefilerequired

The replacement PDF. Must not be empty.

Response

200 · The document, pointing at the new PDF.

idstring

Id of the lease document. A Snowflake id, sent as a decimal string.

portfolioIdstring

Portfolio the lease rolls up to. A Snowflake id, sent as a decimal string.

propertyIdstring

Property the lease is on. A Snowflake id, sent as a decimal string.

unitIdstring

Unit the lease is on. A Snowflake id, sent as a decimal string.

leaseIdstring

The lease the document belongs to. A Snowflake id, sent as a decimal string.

leaseTemplateIdsstring[]

The lease templates the document was built from.

fileIdstring

The stored PDF. A Snowflake id, sent as a decimal string.

namestring

Name of the document.

statusenum<string>

Where the document stands: draft while it is being prepared, pendingSignatures once it has gone out, completed once everyone has signed, retracted if it was pulled back.

draftpendingSignaturescompletedretracted
typeenum<string>

Whether this is a lease document or a lease renewal document.

leaseleaseRenewal
signersLeaseDocumentSigner[]

Who has to sign, and how far each of them has got.

annotationsLeaseDocumentAnnotation[]

The boxes placed on the PDF — signatures, initials, dates and filled-in values.

fileobject

The stored PDF, resolved to a full file record.

400 · No file was sent, or the file was empty.

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

404 · No lease document matched the id, or it belongs to another company.