Skip to Content
HomeLink Hub
Users & Profile

Set availability for inspections and tours

PUT
/api/v1/user/agent-availability

Access: Bearer token required.

Partially updates the days and daily time window in which the user can be booked for inspections, and the length of each slot; only the fields sent are changed. Times are 24-hour HH:mm strings with no time zone. Defaults when nothing has been saved are 09:00 to 17:00 with 60-minute slots and no available days. The handler does not check that dayStartTime is earlier than dayEndTime, and although the setting is meant for agents the route does not restrict by role: any signed-in user can set it. The response returns the complete availability object.

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

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

Request Body

application/json
  1. body
availableDays?array<>

Days the user accepts bookings: any of MON, TUE, WED, THU, FRI, SAT, SUN. Replaces the existing list.

dayStartTime?string

Start of the daily window, HH:mm (24-hour), for example 09:00.

Match^([01]\d|2[0-3]):[0-5]\d$
dayEndTime?string

End of the daily window, HH:mm (24-hour), for example 17:00.

Match^([01]\d|2[0-3]):[0-5]\d$
slotDurationMinutes?number

Length of one bookable slot in minutes: 15, 30, 45, 60, 90 or 120.

Formatfloat
Value in1530456090120

Response Body

Availability saved

application/json
  1. response
status*integer
success*boolean
message*string
data*
Example Request
curl -X PUT 'http://localhost:4000/api/v1/user/agent-availability' \  -H 'Content-Type: application/json' \  -d '{  "availableDays": [    "MON",    "TUE",    "WED",    "THU",    "FRI"  ],  "dayStartTime": "09:00",  "dayEndTime": "17:00",  "slotDurationMinutes": 60}'
Example Response
{  "status": 200,  "success": true,  "message": "Availability settings updated.",  "data": {    "agentAvailability": {      "availableDays": [        "MON",        "TUE",        "WED",        "THU",        "FRI"      ],      "dayStartTime": "09:00",      "dayEndTime": "17:00",      "slotDurationMinutes": 60    }  }}