API Overview
Base URLs, request format, the response envelope and how to read the endpoint pages.
The HomeLink Hub API is a JSON REST API served by service/. Every client (the tenant web app, the dashboard, the admin panel and the mobile app) uses it.
Base URLs
| Environment | Base URL |
|---|---|
| Local development | http://localhost:4000/api/v1 |
| Production | https://homelinkhub-prod-service.onrender.com/api/v1 |
Three groups of routes live outside /api/v1:
| Prefix | What |
|---|---|
/webhooks/... | Callbacks from Pandascrow. See Webhooks and callbacks. |
/og/... | Link-preview pages and images for shared listing links. |
/socket.io | The realtime channel. See Realtime events. |
Requests
- Send JSON with
Content-Type: application/json, except where an endpoint page saysmultipart/form-data(file uploads: listing photos and videos, payment proof, legal documents). - In multipart requests, nested objects are sent as JSON-encoded strings in a text field.
- Protected endpoints need
Authorization: Bearer <access token>. See Authentication. - Ids are MongoDB ObjectIds: 24 hexadecimal characters, such as
665f1c2e9b1d4a0012ab34cd. - Money is in naira, as whole numbers, unless a field says otherwise.
- Dates are ISO 8601 strings in UTC.
Responses
Almost every endpoint answers with the same envelope:
{
"status": 200,
"success": true,
"message": "Listed properties retrieved successfully",
"data": { "properties": [], "pagination": { "page": 1, "limit": 20, "total": 0, "pages": 0 } }
}| Field | Meaning |
|---|---|
status | The HTTP status code, repeated in the body |
success | true on success, false on failure |
message | A human-readable message. Error messages are safe to show to users. |
data | The payload, or null |
A few endpoints answer differently: the chat and wishlist endpoints leave out some envelope fields, the escrow passthrough endpoints return Pandascrow's own status and message, the webhooks return what their provider expects, and a handful of unfinished routes return only message. Each endpoint page shows the exact shape. See Conventions and errors for errors and pagination.
Reading an endpoint page
Each endpoint has its own page in the sidebar, grouped by area. A page shows:
- Access at the top: public or token required, the roles allowed, and any other gate (email verified, KYC verified, owner of the record).
- What it does: the business rules, the state changes and the side effects (emails, notifications, realtime events, calls to Pandascrow or Paystack).
- Parameters: path, query and body fields, with types and which are required.
- Responses: one tab per status code, each with an example body. Codes with several causes list every cause and every example message.
- Example request in several languages, and a Try it playground that can call a running API.
The All endpoints page lists every route on one page.
HomeLink Hub