Skip to Content
HomeLink Hub
Agent Dashboard

Get dashboard stat cards

GET
/api/v1/dashboard/stats

Access: Bearer token required.

Returns the headline counters for the agent/landlord dashboard, computed over the properties the caller owns, meaning the caller is the property's landlordId (creator) or its assigned agentId.

totalListings counts every such property in any status (drafts included; the query does not filter out soft-deleted listings either),listingsThisMonth those created since the 1st of the current month (UTC), and activeListings those with status listed. pendingRequests is the number of inspections on those properties in scheduled or pending_review. successfulClosings counts properties in rented or sold, and closingsVolume adds up the listed pricing.rentPrice and pricing.salePrice of those properties (asking prices, not money actually received). There is no role check: any authenticated user can call it and gets zeros if they own nothing.

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

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

Response Body

The stat card values.

application/json
  1. response
status*integer
success*boolean
message*string
data*
Example Request
curl -X GET 'http://localhost:4000/api/v1/dashboard/stats'
Example Response
{  "status": 200,  "success": true,  "message": "Dashboard stats fetched successfully",  "data": {    "totalListings": 18,    "listingsThisMonth": 3,    "activeListings": 11,    "pendingRequests": 4,    "successfulClosings": 5,    "closingsVolume": 131500000  }}