Get analytics screen data
Access: Bearer token required.
Returns everything the analytics screen renders in one call. A deal counts for the caller when they are the escrow's seller or its listing agent, and "closed" always means an escrow in completed; deals are bucketed by the escrow's creation date (UTC).
stats: totalRevenue is the net amount (after platform fee and agent commission) of deals closed this calendar year and propertiesSold their count, each with a percentage change against last year; activeLeads is the number of open inspections (scheduled, pending_review, in_progress) on the caller's properties, compared with the number of inspections created last month; avgDaysToClose is the mean days from escrow creation to completion over all closed deals. A ...Change value is null when there is no previous figure to compare with.
volumeByMonth always has twelve entries (JAN to DEC) with the gross value closed that month and type, the category that contributed most (residential when the month is empty). categories groups property types into residential (APARTMENT, HOUSE, SHORTLET), luxury (VILLA) and commercial (LAND, COMMERCIAL, OFFICE) and reports units sold this year, live listed inventory, average gross price and growth against last year; only categories with inventory or sales appear. topPerformer is the caller's most-viewed property, or null when they own none.
bearerAuthAuthorizationBearer <JWT>Access token returned by sign-in. Send it as Authorization: Bearer <token>.
The analytics payload. topPerformer.location is the property's full location object; price is the sale price, else the rent price, else 0.
application/json- response
status*integersuccess*booleanmessage*stringdata*curl -X GET 'http://localhost:4000/api/v1/dashboard/analytics'{ "status": 200, "success": true, "message": "Analytics fetched successfully", "data": { "stats": { "totalRevenue": 43110000, "totalRevenueChange": 18.5, "propertiesSold": 2, "propertiesSoldChange": 100, "activeLeads": 4, "activeLeadsChange": -20, "avgDaysToClose": 6, "currency": "NGN" }, "volumeByMonth": [ { "month": "JAN", "value": 0, "type": "residential" } ], "categories": [ { "category": "residential", "label": "Residential", "sold": 2, "inventory": 9, "avgPrice": 22906800, "growth": null } ], "topPerformer": { "_id": "665e0a7b9b1d4a0012ab1f02", "title": "4 Bedroom Duplex, Lekki Phase 1", "type": "HOUSE", "category": "residential", "image": "https://res.cloudinary.com/homelinkhub/image/upload/v1717400000/properties/duplex-front.jpg", "views": 1284, "price": 45000000, "currency": "NGN", "location": { "state": "Lagos", "lga": "Eti-Osa", "community": "Lekki Phase 1", "street": "12 Admiralty Way", "nearestLandmark": "Lekki Phase 1 Gate", "coordinates": { "type": "Point", "coordinates": [ 3.4723, 6.4474 ] } } } }}Get agent earnings totals GET
Returns flat lifetime totals for the dashboard tiles, covering only what the caller earned as an agent: inspectionEarnings is the sum of agentFee over paid inspections assigned...
Invite a lawyer to partner POST
Sends a partnership invite to a lawyer who is already registered on the platform with role LAWYER; the email is trimmed and lower-cased before the lookup.
HomeLink Hub