Lease deposits

Get the deposit ledger

Returns the running deposit ledger for the lease: every deposit, payment, return and transfer in order, each with the balance after it. This is the money the company is holding, not rent.

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

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 deposit ledger you want. A Snowflake id, sent as a decimal string.

example: 1830472847398404096

Query parameters

limitinteger

How many entries to return, between 1 and 300. Leave it out for the server default.

asOfstring · date-time

Only entries up to this instant, so you can see the ledger as it stood on a past date.

Response

200 · The deposit ledger.

currentBalancenumber

Deposit held right now, counting money that has not settled.

postedBalancenumber

Deposit held counting only settled money.

currentlyProcessingInnumber

Deposit money on its way in that has not settled.

currentlyProcessingOutnumber

Deposit money on its way out that has not settled.

lastPaymentDatestring · date

Date of the most recent deposit payment.

entriesLeaseDepositLedgerEntry[]

The ledger lines, in order.

bankAccountsBankAccount[]

Bank accounts referenced above.

chartOfAccountsChartOfAccount[]

Chart-of-account records referenced above.

tenantsTenant[]

The tenants referenced by the entries.

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.

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

Deposits sit on their own ledger

A security deposit is money the company holds, not rent income, so it runs on a ledger of its own with its own balance. Paying rent never touches it. Move deposit money onto the rent ledger with the allocate endpoint, and give it back to the tenant with the release endpoint.