Lease charges

Update a recurring charge

Replaces a recurring charge's amount, frequency, account, dates and description. Set updatePastCharges to true to also change the charges it has already raised.

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

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

example: 1830472847398404096
recurringChargeIdstringrequired

The recurring charge to update. A Snowflake id, sent as a decimal string.

example: 1840193847562019840

Body

application/json

amountnumberrequired

New amount, as a decimal of at least 1.

chargeFrequencyenum<string>required

New frequency.

monthlyweeklydailymonthly2XSplitquarterlyyearly
chartOfAccountIdstringrequired

New account to book each charge to. A Snowflake id, sent as a decimal string.

updatePastChargesbooleanrequired

Whether to apply the change to charges this has already raised.

startFromstring · date

New first date.

endstring · date

New last date. Must be later than startFrom.

descriptionstring

New description. 1 to 1000 characters.

companyChargeboolean

Whether the company keeps these charges.

Response

200 · The updated recurring charge.

idstring

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

amountnumber

Amount raised each period, as a decimal.

chargeFrequencyenum<string>

How often it is raised.

monthlyweeklydailymonthly2XSplitquarterlyyearly
chartOfAccountIdstring

Account each charge is booked to. A Snowflake id, sent as a decimal string.

descriptionstring

What the charge is for.

companyChargeboolean

Whether the company keeps these charges rather than passing them to the owner.

lastChargestring · date

When it last raised a charge.

nextChargestring · date

When it next raises one.

startFromstring · date

First date it raises a charge.

endstring · date

Last date it raises a charge. Absent when it runs indefinitely.

statusenum<string>

Whether it is still running, has finished, or is about to raise a charge.

activeendeddueSoon
chartOfAccountobject

The account each charge is booked to.

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