Enroll a tenant in a benefit package
Enrolls one tenant on a lease into one of the company's packages, on the property manager's behalf. Requires the resident_benefit_packages:write permission.
Authorization
AuthorizationstringrequiredPath parameters
leaseIdstringrequiredThe lease the tenant is on, as a Snowflake id in decimal string form.
Body
application/json
tenantIdstringrequiredThe tenant to enroll, as a Snowflake id in decimal string form. They must be on the lease and not moved out.
packageIdstringrequiredThe package to enroll them in, as a Snowflake id in decimal string form. It must belong to this company and be enabled.
Response
200 · The new enrollment, `pendingActivation`, with `enrolledBy` `propertyManager` and `enrolledVia` `company_portal`.
idstringrequiredThe enrollment, as a Snowflake id in decimal string form.
leaseIdstringrequiredThe lease the enrolled tenant is on.
unitIdstringrequiredThe unit that lease is for.
propertyIdstringrequiredThe property that unit belongs to.
tenantIdstringrequiredThe enrolled tenant.
packageIdstringrequiredThe package the tenant is enrolled in.
statusenum<string>requiredpendingActivation is enrolled but not yet live with the partner, active is live, cancelled is terminal — re-enrolling creates a new record.
enrolledAtstring · date-timerequiredWhen the enrollment was created, in the company's timezone.
enrolledByenum<string>requiredWho performed the enrollment. Always propertyManager for an enrollment made through this API.
enrolledViastringrequiredThe surface the enrollment came from. Enrollments made through this API are stamped company_portal.
commitmentMonthsintegerrequiredThe commitment the tenant took on, copied from the package at enrollment and fixed afterwards.
committedUntilstring · date-timerequiredThe end of the tenant's commitment, in the company's timezone. It is the floor for a tenant-requested cancellation, not for a property manager's.
serviceStartsAtstring · date-timerequiredWhen benefits and billing begin. Enrolling on or after the 15th of a month pushes this to the start of the next month; enrolling before a lease starts anchors it to the lease start.
retailPriceSnapshotnumberrequiredThe package's list price at the moment of enrollment, as a decimal amount.
customRetailPricenumberA per-tenant price the property manager set on this enrollment. Absent when there is none; 0 means the property manager funds it.
effectiveRetailPricenumberrequiredWhat this enrollment bills next: the per-tenant override if one is set, otherwise the price snapshot while the price lock holds, otherwise the package's current list price.
cancellationRequestedAtstring · date-timeWhen the tenant asked to cancel. Absent when no request is outstanding.
cancelAtstring · date-timeWhen a scheduled cancellation takes effect. Absent when nothing is scheduled. No charge is posted for a period starting on or after it.
cancelOriginenum<string>Who scheduled the pending cancellation. Absent when nothing is scheduled.
cancelledAtstring · date-timeWhen the enrollment actually reached cancelled. Absent until then.
cancelledByenum<string>Who cancelled it. Absent until it is cancelled.
cancelledReasonstringThe reason recorded with the cancellation. Absent until it is cancelled.
firstChargedAtstring · date-timeWhen the first charge posted. Absent until then.
paidThroughstring · date-timeExclusive end of the latest month a charge actually posted for. Absent until the first charge. It is what paid-through cancellation maths is based on.
nextChargeDatestring · date-timeWhen the next monthly charge is due. Absent once the enrollment is cancelled.
400 · The program is switched off for this company, the lease has ended, the tenant has moved out, the tenant has no email address on file, or the package is not enabled.
401 · The request carried no valid access token.
403 · The caller is not a property manager, or is missing the `resident_benefit_packages:write` permission.
404 · The lease is not this company's, the tenant is not on the lease, or the package is not this company's.
409 · The package cannot be combined with one the tenant already holds.
The enrollment is created as pendingActivation. serviceStartsAt is worked out from the later of today and the lease start, in the company's timezone: on a day before the 15th it is that day, and on the 15th or later it moves to the start of the next month. The enrollment goes active once the first charge has posted and the service month has arrived.
commitmentMonths is copied from the package and fixed for good, and committedUntil is that many calendar months out.
A tenant can hold several packages at once as long as they do not share an exclusivity group. Within one group, enrolling into a higher tier than the one they hold is an upgrade — the old enrollment is cancelled automatically with the reason Upgraded, the longer of the two commitments is kept, and the billing already paid for carries across. Enrolling into a lower tier, or into a package that clashes with one they hold, is refused with 409.