Skip to Content
HomeLink Hub
Agent Dashboard

Get views and inquiries chart data

GET
/api/v1/dashboard/performance

Access: Bearer token required.

Returns the area-chart series for the caller's properties (those where they are landlordId or agentId). With view=weekly (the default, also used for any unrecognised value) the array has seven points, MON to SUN, covering the current Monday-to-Sunday week in UTC; with view=monthly it has twelve points, JAN to DEC, covering the current calendar year to date. The success message differs between the two.

views counts recorded property views in the period (a view is stored at most once per user per property per day) and inquiries counts inspection requests created in the period. Days or months with no data are returned as zeros.

Known quirk in the weekly series: the inquiry day label is computed by indexing a Sunday-first label list with MongoDB's 1-based $dayOfWeek, so inquiries are reported one day late (Monday's under TUE, Sunday's under MON) and inquiries created on a Saturday are not counted. views and the monthly series are unaffected.

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

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

Query Parameters

view?string

weekly or monthly. Anything other than monthly is treated as weekly.

Default"weekly"

Response Body

  • Weekly series (default): seven points, MON to SUN.
  • Monthly series (view=monthly): twelve points, JAN to DEC.
application/json
  1. response
status*integer
success*boolean
message*string
data*array<>
Example Request
curl -X GET 'http://localhost:4000/api/v1/dashboard/performance'
Example Response
{  "status": 200,  "success": true,  "message": "Weekly performance fetched successfully",  "data": [    {      "name": "MON",      "views": 42,      "inquiries": 3    }  ]}