Lease deposits

Replace a deposit's file list

Replaces the whole list of files attached to a deposit. Send every file you want to keep — anything missing from the list is detached.

PUT
https://api.portal.magicdoor.com/company-app/leases/{leaseId}/deposits/{depositId}/files

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 the deposit is on. A Snowflake id, sent as a decimal string.

example: 1830472847398404096
depositIdstringrequired

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

example: 1837401928475620198

Body

application/json

filesobject[]required

The complete list of files the deposit should have. At least one.

Response

200 · The deposit, with its new file list.

idstring

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

createdstring · date-time

When the deposit was created, in the company's timezone.

updatedstring · date-time

When it last changed.

billDatestring · date

The date the deposit is booked into the ledger.

dueDatestring · date

The date the tenant has to pay it by.

totalAmountnumber

How much deposit was asked for, as a decimal amount.

allocatedAmountnumber

How much has been paid towards it.

dueAmountnumber

How much is still outstanding.

memostring

Free-text note on the deposit.

referencestring

External reference carried on the deposit.

portfolioIdstring

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

propertyIdstring

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

unitIdstring

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

leaseIdstring

Lease the deposit is on. A Snowflake id, sent as a decimal string.

refundableboolean

Whether this deposit is refundable to the tenant.

lineItemsLeaseDepositLineItem[]

What the deposit is made up of.

filesLeaseDepositFile[]

Files attached to the deposit, by id.

metadataobject

Free-form key/value data carried on the deposit.

creatorobject

Who created the record.

portfolioobject

The portfolio the lease rolls up to.

propertyobject

The property the lease's unit sits in.

unitobject

The unit the lease is for.

leaseobject

The lease the deposit is on.

transactionsTransaction[]

The transactions referenced by the allocations above.

bankAccountsBankAccount[]

Bank accounts referenced above.

chartOfAccountsChartOfAccount[]

Chart-of-account records referenced above.

hydratedFilesFile[]

The files listed in files, resolved to full file records.

creatorInfoobject

The full record of whoever created this, under whichever one key matches the creator's type.

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 deposit matched the id, or it belongs to another company.