Skip to Content
HomeLink Hub
Legal Verification

Submit a legal decision

PATCH
/api/v1/legal/assignments/{assignmentId}/decision

Access: Bearer token required. Roles: LAWYER. Also requires: Caller must be the lawyer on the assignment; Assignment status must be in_review.

The lawyer records the outcome of an in_review assignment. The decision (outcome, notes, checklist, decidedAt) is stored on the assignment and the assignment status becomes the outcome: verified, rejected or changes_requested. The property is updated to match. verified: legalStatus -> legally_verified; verification.isVerified -> true with verifiedBy (the lawyer), verifiedAt and verificationNotes (the decision notes); and if the property's status is pending_verification it becomes listed, unless it has an open duplicate flag, in which case it stays held until an admin resolves the flag. rejected: legalStatus -> legally_rejected, verification.isVerified -> false; the listing status is left as it is. changes_requested: legalStatus -> changes_requested, verification.isVerified -> false; the lister answers by uploading documents, which returns the assignment to in_review. An audit entry (decision_verified, decision_rejected or decision_changes_requested) is written and the user who made the assignment is notified: event lawyer_verification_completed for verified and rejected, lawyer_changes_requested for changes_requested, titled Legal Review Decision: <outcome>, delivered in-app with a notifications:new socket event, by push, and by the generic notification email. Only presence of outcome and notes is checked by the handler; an outcome or checklist status outside the allowed values fails Mongoose validation and surfaces as a 500. Any unexpected error inside the legal service (including a Mongoose cast or validation failure) is re-thrown as a 500 carrying the underlying error's message plus an errorData field holding the serialized underlying error.

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

Access token returned by sign-in. Send it as Authorization: Bearer <token>.

Path Parameters

assignmentId*string

ObjectId of the legal assignment.

Request Body

application/json
  1. body
outcome*string

verified, rejected or changes_requested.

notes*string

Explanation of the decision. Max 5000 characters (model limit). On verified it is copied to the property's verification.verificationNotes.

checklist?array<unknown>

Optional list of checked items. Each entry is an object with item (string), status (pass, fail or comment) and optional comment (string). Defaults to an empty list.

Response Body

Decision recorded. data is the assignment as loaded before the property update, so the populated propertyId.verification may still show the pre-decision values.

application/json
  1. response
status*integer
success*boolean
message*string
data*
Example Request
curl -X PATCH 'http://localhost:4000/api/v1/legal/assignments/string/decision' \  -H 'Content-Type: application/json' \  -d '{  "outcome": "verified",  "notes": "Certificate of Occupancy and survey plan confirmed against the Lagos State Lands Registry.",  "checklist": [    {      "item": "Certificate of Occupancy",      "status": "pass",      "comment": "Registered, no encumbrance"    }  ]}'
Example Response
{  "status": 200,  "success": true,  "message": "Decision submitted successfully",  "data": {    "_id": "6660a7d49b1d4a0012ab3501",    "propertyId": {      "_id": "665f1c2e9b1d4a0012ab34cd",      "title": "3-Bedroom Flat, Lekki Phase 1",      "location": {        "state": "Lagos",        "lga": "Eti-Osa",        "community": "Lekki Phase 1",        "street": "14 Admiralty Way",        "nearestLandmark": "Lekki Phase 1 Gate",        "coordinates": {          "type": "Point",          "coordinates": [            3.4723,            6.4474          ]        }      },      "details": {        "bedrooms": 3,        "bathrooms": 3,        "squareFeet": 1650,        "features": [          "Fitted kitchen"        ]      },      "pricing": {        "rentPrice": 4500000,        "salePrice": null,        "currency": "NGN",        "rentDurationYears": 1      },      "media": {        "images": [          {            "url": "https://res.cloudinary.com/example/image/upload/v1717500000/homelinkhub/media/living-room.jpg",            "metadata": {              "address": "14 Admiralty Way, Lekki Phase 1, Lagos",              "coordinates": [                3.4723,                6.4474              ],              "tag": "Living room"            },            "_id": "6660a7d49b1d4a0012ab3570"          }        ],        "videos": []      },      "verification": {        "isVerified": false      }    },    "lawyerId": {      "_id": "665f1c2e9b1d4a0012ab34c3",      "firstName": "Folake",      "lastName": "Adeyemi",      "avatar": "https://res.cloudinary.com/example/image/upload/v1717500000/homelinkhub/media/folake.jpg"    },    "assignedBy": {      "_id": "665f1c2e9b1d4a0012ab34c1",      "firstName": "Chinedu",      "lastName": "Okafor"    },    "mediaSnapshot": {      "images": [        {          "url": "https://res.cloudinary.com/example/image/upload/v1717500000/homelinkhub/media/living-room.jpg",          "metadata": {            "address": "14 Admiralty Way, Lekki Phase 1, Lagos",            "coordinates": [              3.4723,              6.4474            ]          },          "_id": "6660a7d49b1d4a0012ab3570"        }      ],      "videos": []    },    "status": "verified",    "dueDate": "2026-06-12T17:00:00.000Z",    "notes": "Please confirm the C of O and survey plan.",    "decision": {      "outcome": "verified",      "notes": "Certificate of Occupancy and survey plan confirmed against the Lagos State Lands Registry.",      "checklist": [        {          "item": "Certificate of Occupancy",          "status": "pass",          "comment": "Registered, no encumbrance",          "_id": "6660a7d49b1d4a0012ab3580"        }      ],      "decidedAt": "2026-06-06T10:30:00.000Z"    },    "documentSubmissions": [],    "createdAt": "2026-06-04T09:15:22.481Z",    "updatedAt": "2026-06-06T10:30:00.000Z",    "__v": 1  }}