Lease charges

Adjust a credit

Changes an existing credit's amount, date or description. Send only what you want to change.

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

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

example: 1830472847398404096
creditIdstringrequired

The credit to adjust. A Snowflake id, sent as a decimal string.

example: 1836114029384756224

Body

application/json

amountnumber

New amount, as a decimal of at least 1.

issueDatestring · date-time

New date the credit counts from.

descriptionstring

New description. Up to 1000 characters.

Response

200 · The adjusted credit.

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