Lease charges

Update a recurring credit

Replaces a recurring credit's amount, frequency, dates and description. Set updatePastCredits to true to also change the credits it has already issued.

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

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

example: 1830472847398404096
recurringCreditIdstringrequired

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

example: 1861019384756201984

Body

application/json

amountnumberrequired

New amount, as a decimal of at least 1.

creditFrequencyenum<string>required

New frequency.

monthlyweeklydailymonthly2XSplitquarterlyyearly
updatePastCreditsbooleanrequired

Whether to apply the change to credits this has already issued.

startFromstring · date

New first date.

endstring · date

New last date. Must be later than startFrom.

descriptionstring

New description. 1 to 1000 characters.

Response

200 · The updated recurring credit.

idstring

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

amountnumber

Credit issued each period, as a decimal.

creditFrequencyenum<string>

How often it is issued.

monthlyweeklydailymonthly2XSplitquarterlyyearly
descriptionstring

What the credit is for.

lastCreditstring · date

When it last issued a credit.

nextCreditstring · date

When it next issues one.

startstring · date

First date it issues a credit.

endstring · date

Last date it issues a credit. Absent when it runs indefinitely.

statusenum<string>

Whether it is still running, has finished, or is about to issue a credit.

activeendeddueSoon

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