Leases

List a lease's automatic payments

Returns the automatic payments tenants have set up against this lease, with the amount, the schedule and when the next one is due.

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

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

example: 1830472847398404096

Response

200 · The automatic payments on the lease.

idstring

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

tenantPaymentAccountIdstring

The tenant payment account it draws on. A Snowflake id, sent as a decimal string.

paymentMethodIdstring

The payment method it draws on. A Snowflake id, sent as a decimal string.

typeenum<string>

Whether it pays a fixed amount or whatever is owed up to a cap.

fixedAmountnumber

The fixed amount taken each time, when the type is a fixed amount.

maximumAmountnumber

The most that may be taken, when the type is balance-based.

frequencyenum<string>

How often it runs.

monthlyweeklydailymonthly2XSplitquarterlyyearly
startstring · date

First date it runs.

endstring · date

Last date it runs. Absent when it runs indefinitely.

lastPaymentstring · date

When it last took a payment.

nextPaymentstring · date

When it next runs.

leaseobject

The lease it pays.

tenantobject

The tenant who set it up.

portfolioobject

The portfolio the lease rolls up to.

propertyobject

The property the lease's unit sits in.

unitobject

The unit the lease is for.

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

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