Skip to Content
HomeLink Hub
Admin

List site visits

GET
/api/v1/admin/inspections

Access: Bearer token required. Roles: ADMIN.

Every inspection (site-visit request) on the platform, sorted by scheduledDate descending, with no pagination or filters. Cancelled visits and visits on soft-deleted properties are included (property.isDeleted). status is one of pending_review, in_progress, scheduled, completed, cancelled; approval.status is pending, approved or rejected; paymentStatus is unpaid or paid. visitor is the user who requested the visit. host is the agent stamped on the inspection once it is paid, falling back to the property's agent, then its landlord. The stored cancellationReason field is overloaded: for a non-cancelled visit it is exposed as visitorNote (the note the visitor sent with the request) and cancellationReason is null; for a cancelled visit visitorNote is null and cancellationReason is the stored reason or the approval's rejectionReason. property, visitor and host are null when the reference no longer resolves; findings is {} when nothing was recorded.

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

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

Response Body

All site visits, latest scheduled date first

application/json
  1. response
status*integer
success*boolean
message*string
data*array<>
Example Request
curl -X GET 'http://localhost:4000/api/v1/admin/inspections'
Example Response
{  "status": 200,  "success": true,  "message": "Site visits fetched successfully",  "data": [    {      "_id": "6660a7d49b1d4a0012ab3540",      "status": "scheduled",      "scheduledDate": "2026-06-13T10:00:00.000Z",      "completedDate": null,      "createdAt": "2026-06-04T09:15:22.481Z",      "updatedAt": "2026-06-05T14:02:10.107Z",      "paymentStatus": "paid",      "paymentReference": "ps_ref_8f2k1q9x7c",      "agentFee": 5000,      "property": {        "_id": "665f1c2e9b1d4a0012ab34cd",        "title": "3-Bedroom Flat, Lekki Phase 1",        "type": "APARTMENT",        "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            ]          }        },        "coverImage": "https://res.cloudinary.com/example/image/upload/v1717500000/homelinkhub/media/living-room.jpg",        "isDeleted": false      },      "visitor": {        "_id": "665f1c2e9b1d4a0012ab34c4",        "firstName": "Amaka",        "lastName": "Eze",        "email": "amaka.eze@example.com",        "avatar": "https://res.cloudinary.com/example/image/upload/v1717500000/homelinkhub/media/amaka.jpg",        "role": "TENANT",        "phone": "+2348051112233"      },      "host": {        "_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",        "phone": "+2348031234567"      },      "approval": {        "status": "approved",        "decidedAt": "2026-06-05T14:02:10.107Z",        "notes": "Gate pass will be left with security.",        "rejectionReason": null      },      "visitorNote": "I can only come after 10am.",      "cancellationReason": null,      "cancellationDate": null,      "findings": {}    }  ]}