Application documents

Get a document

Returns one attached document with its size, MIME type and signed download URLs. The rental application itself lists documents without URLs, so call this when you need to fetch or display one. Requires the rental_applications:read permission.

GET
https://services.magicdoor.com/leasing/company-portal/rental-applications/{applicationId}/files/{id}

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

applicationIdstringrequired

The rental application to work with. A Snowflake id, sent as a decimal string.

example: 1830472847398404096
idstringrequired

The attached document to work with. A Snowflake id, sent as a decimal string.

example: 1832910384756029440

Response

200 · The document.

idstring

The attachment record on this rental application. Use it to fetch or delete the file.

fileIdstring

The stored file in the Files service that this attachment points at.

namestring

File name captured when the upload was committed.

descriptionstring

Free-text note the uploader supplied. Absent when none was given.

kindenum<string>

What kind of document this is. other when the uploader did not say.

otherpayStubgovernmentIdbankStatementtaxReturnofferLetterreferenceLetteremploymentVerification
employmentIdstring

The employment entry this file is attached to. Absent when the file belongs to the application as a whole.

residentialHistoryIdstring

The residential-history entry this file is attached to. Absent when the file belongs to the application as a whole.

extensionstring

File extension without the dot, for example "pdf". An empty string when the stored file is missing.

sizeinteger

Size in bytes. 0 when the stored file is missing.

contentTypestring

MIME type, for example "application/pdf". An empty string when the stored file is missing.

publicUrlobject

Signed URLs for fetching the file. Every value is an empty string when the stored file is missing — treat an empty raw as "file unavailable".

createdstring · date-time

When the file was attached, in the company's timezone.

updatedstring · date-time

When the attachment was last changed, in the company's timezone.

401 · The access token is missing, expired, or not valid.

403 · The caller is authenticated but does not hold the `rental_applications:read` permission.

404 · No attached document with this id exists on this rental application, or the rental application itself was not found.

Documents on an application are personal data

Applicants upload pay stubs, bank statements, tax returns and government identity documents here. The signed URLs work for anyone who has them until they expire, so do not put them somewhere they can leak.

Empty strings mean the file is gone

When the underlying stored file has been removed, the attachment still exists but extension, contentType and every publicUrl value come back empty and size is 0.