Lease subsidies

Update a subsidy

Changes an existing subsidy. Send only what you want to change, plus amount and updatePastSubsidies, which are always required. Set updatePastSubsidies to true to also revise the payments already recorded.

PATCH
https://api.portal.magicdoor.com/company-app/leases/{leaseId}/subsidies/{leaseSubsidyId}

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

example: 1830472847398404096
leaseSubsidyIdstringrequired

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

example: 1845019384756201984

Body

application/json

amountnumberrequired

The amount the subsidy pays each period, as a decimal of at least 1.

updatePastSubsidiesbooleanrequired

Whether to apply the change to payments already recorded.

subsidizerIdstring

New paying body. A Snowflake id, sent as a decimal string.

chartOfAccountIdstring

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

subsidyTypeenum<string>

New programme.

section8vashehvfupprojectBasedother
subsidyFrequencyenum<string>

New frequency.

monthlyweeklydailymonthly2XSplitquarterlyyearly
effectiveDatestring · date

New first date.

endDatestring · date

New last date. Must be later than effectiveDate.

ownerIdstring

New owner to record it against. A Snowflake id, sent as a decimal string.

voucherNumberstring

New voucher number. 1 to 100 characters.

descriptionstring

New description. Up to 1000 characters.

Response

200 · The updated subsidy.

idstring

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

leaseIdstring

The lease it applies to. A Snowflake id, sent as a decimal string.

ownerIdstring

The owner the subsidy is recorded against, when one is set. A Snowflake id, sent as a decimal string.

unitIdstring

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

propertyIdstring

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

portfolioIdstring

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

subsidizerIdstring

The body paying the subsidy. A Snowflake id, sent as a decimal string.

chartOfAccountIdstring

Account the subsidy payments are booked to. A Snowflake id, sent as a decimal string.

subsidyTypeenum<string>

Which programme this is: section8 for a Housing Choice Voucher, vash for Veterans Affairs Supportive Housing, ehv for an Emergency Housing Voucher, fup for the Family Unification Program, projectBased for a Project-Based Voucher, or other.

section8vashehvfupprojectBasedother
voucherNumberstring

The voucher number the paying body uses. Up to 100 characters.

descriptionstring

What the subsidy is for. Up to 1000 characters.

amountnumber

How much the subsidy pays each period, as a decimal amount.

subsidyFrequencyenum<string>

How often the subsidy pays.

monthlyweeklydailymonthly2XSplitquarterlyyearly
effectiveDatestring · date

First date the subsidy pays.

endDatestring · date

Last date it pays. Absent when it runs indefinitely.

lastSubsidystring · date-time

When it last paid.

nextSubsidystring · date-time

When it next pays.

activeboolean

Whether the subsidy is switched on. A deactivated subsidy keeps its history but stops paying.

creatorobject

Who created the record.

createdstring · date-time

When the subsidy was created, in the company's timezone.

updatedstring · date-time

When it last changed.

ownerobject

The owner the subsidy is recorded against, when one is set.

subsidizerobject

The body paying the subsidy.

chartOfAccountobject

The account the subsidy payments are booked to.

creatorInfoobject

The full record of whoever created this, under whichever one key matches the creator's type.

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