List a lawyer's assignments and counterparties
Access: Bearer token required. Roles: ADMIN.
Every PropertyVerificationAssignment whose lawyerId is this user, newest first, with the property (and its landlord and agent), the assigner and document submitters populated. counterparties is derived from those assignments: one entry per distinct landlord or agent behind the assigned properties, with propertyCount (how many of the lawyer's assignments involve them) and hasOpenWork (true when any of those assignments is not verified, rejected or reassigned). Assignments whose property no longer resolves keep propertyId: null and are skipped when building counterparties. The handler does not check that the user is actually a LAWYER; any other user simply returns empty lists. No pagination.
bearerAuthAuthorizationBearer <JWT>Access token returned by sign-in. Send it as Authorization: Bearer <token>.
id*stringObjectId of the lawyer.
Assignments plus the landlords/agents behind them
application/json- response
status*integersuccess*booleanmessage*stringdata*curl -X GET 'http://localhost:4000/api/v1/admin/users/string/legal-assignments'{ "status": 200, "success": true, "message": "Legal assignments fetched successfully", "data": { "assignments": [ { "_id": "6660a7d49b1d4a0012ab3501", "propertyId": { "_id": "665f1c2e9b1d4a0012ab34cd", "landlordId": { "_id": "665f1c2e9b1d4a0012ab34c2", "firstName": "Ngozi", "lastName": "Balogun", "email": "ngozi.balogun@example.com", "avatar": "https://res.cloudinary.com/example/image/upload/v1717500000/homelinkhub/media/ngozi.jpg", "role": "LANDLORD" }, "agentId": { "_id": "665f1c2e9b1d4a0012ab34c1", "firstName": "Chinedu", "lastName": "Okafor", "email": "chinedu.okafor@example.com", "avatar": "https://res.cloudinary.com/example/image/upload/v1717500000/homelinkhub/media/chinedu.jpg", "role": "AGENT" }, "title": "3-Bedroom Flat, Lekki Phase 1", "type": "APARTMENT", "status": "pending_verification", "legalStatus": "under_legal_review", "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 ] } }, "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": [] }, "deletedAt": null, "createdAt": "2026-06-04T09:15:22.481Z" }, "lawyerId": "665f1c2e9b1d4a0012ab34c3", "assignedBy": { "_id": "665f1c2e9b1d4a0012ab34c1", "firstName": "Chinedu", "lastName": "Okafor", "email": "chinedu.okafor@example.com" }, "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": "in_review", "dueDate": "2026-06-12T17:00:00.000Z", "notes": "Please confirm the C of O and survey plan.", "decision": { "checklist": [] }, "documentSubmissions": [ { "_id": "6660a7d49b1d4a0012ab3505", "documents": [ { "url": "https://res.cloudinary.com/example/raw/upload/v1717600000/homelinkhub/media/certificate-of-occupancy.pdf", "name": "certificate-of-occupancy.pdf", "mimeType": "application/pdf", "size": 482113 } ], "note": "C of O attached as requested.", "submittedBy": { "_id": "665f1c2e9b1d4a0012ab34c1", "firstName": "Chinedu", "lastName": "Okafor", "email": "chinedu.okafor@example.com", "avatar": "https://res.cloudinary.com/example/image/upload/v1717500000/homelinkhub/media/chinedu.jpg", "role": "AGENT" }, "submittedAt": "2026-06-05T14:02:10.107Z" } ], "createdAt": "2026-06-04T09:15:22.481Z", "updatedAt": "2026-06-05T14:02:10.107Z", "__v": 1 } ], "counterparties": [ { "user": { "_id": "665f1c2e9b1d4a0012ab34c2", "firstName": "Ngozi", "lastName": "Balogun", "email": "ngozi.balogun@example.com", "avatar": "https://res.cloudinary.com/example/image/upload/v1717500000/homelinkhub/media/ngozi.jpg", "role": "LANDLORD" }, "propertyCount": 1, "hasOpenWork": true } ] }}
HomeLink Hub