Lease charges

Get a credit

Fetches one credit, including how much of it is still unused and which charges it has been applied to.

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

example: 1836114029384756224

Response

200 · The 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.

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

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