Skip to Content
HomeLink Hub
Properties

Record a listing view

POST
/api/v1/property/{id}/view

Access: Bearer token required.

Records that the authenticated user viewed a listing. At most one view per user per property per UTC calendar day is stored (with the timestamp, weekday label and UTC hour, used for the lister's analytics and the viewCount on /property/me). The call is idempotent and always answers 200: View recorded the first time that day, View already counted today afterwards. The second message is also what you get when the property does not exist, so it cannot be used to test for existence. No request body; data is always null. The owner's own views are counted like anyone else's.

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

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

Path Parameters

id*string

ObjectId of the property being viewed.

Response Body

  • First view by this user today; a view entry was stored.
  • The user already has a view for today, or no property has this id. Nothing was stored.
application/json
  1. response
status*integer
success*boolean
message*string
data*unknown
Example Request
curl -X POST 'http://localhost:4000/api/v1/property/string/view'
Example Response
{  "status": 200,  "success": true,  "message": "View recorded",  "data": null}