Skip to Content
HomeLink Hub
Agent Dashboard

Get agent earnings totals

GET
/api/v1/dashboard/earnings

Access: Bearer token required.

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 to them (inspectionCount of them, whatever the inspection's status), and acquisitionEarnings is the sum of agentCommission over completed purchase escrows on which they are the listing agent (acquisitionCount). totalEarnings is the two added together.

Seller proceeds, short-let income, withdrawals and balances are not included. For those, and for the per-transaction list, use GET /earnings and GET /earnings/wallet; the two endpoints have different response shapes and are not interchangeable. Amounts are in naira.

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

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

Response Body

The totals (all zeros when the caller has no agent earnings).

application/json
  1. response
status*integer
success*boolean
message*string
data*
Example Request
curl -X GET 'http://localhost:4000/api/v1/dashboard/earnings'
Example Response
{  "status": 200,  "success": true,  "message": "Agent earnings fetched successfully",  "data": {    "totalEarnings": 2265000,    "inspectionEarnings": 15000,    "inspectionCount": 3,    "acquisitionEarnings": 2250000,    "acquisitionCount": 1  }}