Lease charges

Issue a credit

Puts a credit on the lease that reduces what the tenants owe, for example a goodwill allowance. The credit is used up against charges as they fall due.

POST
https://api.portal.magicdoor.com/company-app/leases/{leaseId}/charges/credits

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 to credit. A Snowflake id, sent as a decimal string.

example: 1830472847398404096

Body

application/json

amountnumberrequired

How much credit to issue, as a decimal amount of at least 1.

issueDatestring · daterequired

The date the credit counts from.

descriptionstring

What the credit is for. Up to 1000 characters.

Response

200 · The credit that was issued.

idstring

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

createdstring · date-time

When the credit was issued, in the company's timezone.

updatedstring · date-time

When it last changed.

bankAccountIdstring

Bank account the credit is booked against. A Snowflake id, sent as a decimal string.

chartOfAccountIdstring

Account the credit is booked to. A Snowflake id, sent as a decimal string.

portfolioIdstring

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

propertyIdstring

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

unitIdstring

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

leaseIdstring

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

amountnumber

How much credit was issued, as a decimal amount.

appliedAmountnumber

How much of it has been used against charges.

availableAmountnumber

How much of it is still unused.

creditDatestring · date

The date the credit counts from.

appliedLeaseChargesAppliedLeaseCharge[]

Which charges the credit has been used against.

metadataobject

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

creatorobject

Who created the record.

bankAccountobject

The bank account the credit is booked against.

chartOfAccountobject

The account the credit is booked to.

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 credit is on.

leaseChargesLeaseCharge[]

The charges named in appliedLeaseCharges.

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.