Leases

Calculate a prorated rent amount

Works out the part-period rent between a lease's start date and the first full charge date. Pass the answer as proratedAmount when you create the lease. Nothing is stored by this call.

GET
https://api.portal.magicdoor.com/company-app/leases/prorated-amount

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.

Query parameters

rentAmountnumberrequired

The full-period rent, as a decimal amount of at least 1.

example: 1850
leaseStartDatestring · daterequired

The lease's first day.

example: 2026-03-15
firstChargeDatestring · date

The first full charge date. Leave it out to use MagicDoor's default.

Response

200 · The prorated amount.

proratedAmountnumber

Rent for the part period, as a decimal amount.

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.