Approve tenancy verification
Tenancy
Approve tenancy verification
Approve a tenancy verification, flip the user to APPROVED, denormalise onto their listing, and fire push + email. SUPER or MODERATOR only.
POST
Approve tenancy verification
Overview
Approves a tenancy verification. In one operation it:- Updates the verification row (
reviewStatus = APPROVED,reviewedBy,reviewedAt). - Flips
users.tenancyStatus → APPROVED. - Denormalises
ownerTenancyApproved = trueonto the user’s active current-home listing (this is what lets the listing count toward the live-listing total). - Enqueues the
tenancy.approvedpush notification and the approval email (Phase 5 fan-out — see Push notification fan-out).
APPROVED row is a no-op (no duplicate push/email).
Authentication
Bearer <accessToken> with scope: 'admin' required (requireAdmin).
Path parameters
| Name | Type | Required | Notes | Example |
|---|---|---|---|---|
id | string | yes | Verification row ObjectId, 1..64 chars. | 66400a8f1c2b4d5e6f7ab000 |
Query parameters
None.Request body
None.Response — 200 OK
Returns the updated tenancy verification row with reviewStatus: "APPROVED".
Error responses
| Status | Code | Meaning |
|---|---|---|
| 401 | UNAUTHENTICATED | Missing, malformed, expired, or non-admin-scope token. |
| 403 | FORBIDDEN | Caller is a FINANCE admin. |
| 404 | NOT_FOUND | No verification row with that id. |
| 409 | STATE_CONFLICT | Row is already REJECTED — a rejected verification cannot be flipped to approved through this endpoint. |
Example error — 409 STATE_CONFLICT
Side effects
- Verification row +
users.tenancyStatusupdated. ownerTenancyApproveddenormalised onto the active listing.tenancy.approvedpush job + approval email enqueued (best-effort; failures do not roll back the approval).- Audit-log row written (action
tenancy.approve).
See also
- Tenancy queue — find the row to approve.
- Reject tenancy — the opposite decision.
- Tenancy retention — the 30-day clock starts at
reviewedAt.
curl
Postman
Seedocs/postman/swappr.postman_collection.json → Admin Tenancy → Approve.