Skip to Content
HomeLink Hub
Platform Settings

Update platform settings

PATCH
/api/v1/settings

Access: Bearer token required. Roles: ADMIN.

Admin-only partial update of the global settings record (created on first write if missing). Only the six fields listed below are read; autoSweepPlatformFees and the platform payout account cannot be changed through this endpoint.

imageGeotagging is merged: only the keys sent change, so { "enabled": true } keeps the stored distance. defaultLegalPartnerId must be the id of an active user with role LAWYER; null or "" clears it. Once set, every newly published listing is automatically assigned to that lawyer for legal verification.

The route has no request validator. The percentages and the inspection fee are not range-checked (any number is stored); an invalid paymentMode or a non-numeric value is rejected by the model as 400 Validation Error: ..., and a request with no JSON body at all fails with a 500. Changes apply to future transactions only, since fees are snapshotted on each escrow at creation.

Unlike GET /settings, the response is the full settings document, so it includes platformBankAccount (unmasked) when one has been configured.

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

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

Request Body

application/json
  1. body
paymentMode?string

ESCROW or DIRECT.

platformPropertyFeePercent?number

HomeLink's fee as a percentage, added on top of the base amount for property rent/sale payments. Default 1. Not range-checked.

agentCommissionPercent?number

The listing agent's share of a completed property purchase, as a percentage. Default 5. Not range-checked.

defaultInspectionFee?number

Flat inspection fee in NGN used when an agent has not configured their own. Default 5000.

imageGeotagging?

{ enabled?: boolean, strict?: boolean, maxDistanceMeters?: number 50-50000 }. enabled turns the photo-location check on; strict also rejects photos with no GPS position; maxDistanceMeters is how far from the listing's pin a photo may have been taken (default 500). Merged with the stored values.

defaultLegalPartnerId?string

User id of an active lawyer to auto-assign new listings to. null or an empty string clears it.

Response Body

The full settings document after the update. platformBankAccount appears here if one is configured.

application/json
  1. response
status*integer
success*boolean
message*string
data*
Example Request
curl -X PATCH 'http://localhost:4000/api/v1/settings' \  -H 'Content-Type: application/json' \  -d '{  "platformPropertyFeePercent": 1.5,  "defaultInspectionFee": 7500,  "imageGeotagging": {    "enabled": true,    "maxDistanceMeters": 300  },  "defaultLegalPartnerId": "664d3e0b5c1f6a0014dd55ee"}'
Example Response
{  "status": 200,  "success": true,  "message": "Settings updated successfully",  "data": {    "_id": "6601a2b3c4d5e6f708192a3b",    "paymentMode": "ESCROW",    "platformPropertyFeePercent": 1.5,    "agentCommissionPercent": 5,    "defaultInspectionFee": 7500,    "autoSweepPlatformFees": false,    "imageGeotagging": {      "enabled": true,      "strict": false,      "maxDistanceMeters": 300    },    "defaultLegalPartnerId": "664d3e0b5c1f6a0014dd55ee",    "createdAt": "2026-01-10T08:00:00.000Z",    "updatedAt": "2026-11-25T14:00:00.000Z",    "__v": 0,    "platformBankAccount": {      "bankName": "Guaranty Trust Bank",      "bankCode": "058",      "accountNumber": "0123456789",      "accountName": "HomeLink Hub Limited"    }  }}