Lease charges

Get the full ledger invoice PDF

Returns the stored PDF that covers everything on the lease's charge ledger, as a file record with the URL to download it from. The response is the file's metadata, not the PDF bytes.

GET
https://api.portal.magicdoor.com/company-app/leases/{leaseId}/charges/ledger/invoice

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

leaseIdstringrequired

The lease whose ledger invoice you want. A Snowflake id, sent as a decimal string.

example: 1830472847398404096

Response

200 · The ledger invoice file.

idstring

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

createdstring · date-time

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

namestring

Original file name.

extensionstring

File extension.

sizeinteger

Size in bytes.

contentTypestring

MIME type.

secureUrlobject

Where to download the file. Requires an authorised company request.

fileIdstringdeprecated

Same value as id.

fileNamestringdeprecated

Same value as name.

signedUrlstringdeprecated

Pre-signed download URL.

signedThumbUrlstringdeprecated

Pre-signed thumbnail URL.

fileSizeintegerdeprecated

Same value as size.

uploadedstring · date-timedeprecated

Same value as created.

claimedbooleandeprecated

Internal debug flag. Do not depend on it.

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

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