Confirm a booking
Access: Bearer token required. Also requires: Caller must be the booking's landlordId.
Accepts a booking: sets status to confirmed, stores dates.confirmedDate and, when sent, overwrites dates.visitDuration. Only the user stored as the booking's landlordId may call it; a listing agent who received the request notification but is not the property's landlord gets the 403.
Side effects: a booking:updated event ({ bookingId, propertyId, status, type }) is pushed over SSE and Socket.IO to both the tenant and the landlord, and the tenant is notified. For reservation and shortlet bookings that is a payment_request_accepted notification with the Your Payment Request Was Accepted email, which is the tenant's cue to pay; for viewing it is booking_confirmed.
The current status is not checked, so a cancelled or already confirmed booking can be confirmed again (and the tenant is notified again). The validator requires confirmedDate for every booking type, including stays whose dates are already fixed.
bearerAuthAuthorizationBearer <JWT>Access token returned by sign-in. Send it as Authorization: Bearer <token>.
id*stringObjectId of the booking to confirm.
application/json- body
confirmedDate*stringAgreed date and time. Required by validation for all booking types; for a viewing it is the visit time, for a reservation or stay it is only recorded.
date-timevisitDuration?numberViewings: visit length in hours (0.5 to 8). Replaces the value requested by the tenant.
float0.5 <= value <= 8Booking confirmed. data is the updated booking (ids not populated).
application/json- response
status*integersuccess*booleanmessage*stringdata*curl -X PATCH 'http://localhost:4000/api/v1/booking/string/confirm' \ -H 'Content-Type: application/json' \ -d '{ "confirmedDate": "2026-12-04T10:00:00.000Z", "visitDuration": 1}'{ "status": 200, "success": true, "message": "Booking confirmed successfully", "data": { "_id": "665f1c2e9b1d4a0012ab34cd", "propertyId": "664a0b7e3f2c1d0012ef5a01", "tenantId": "663d9a1c5e4b2a0012cd7f10", "landlordId": "6629e4f08a7b3c0012aa9e42", "status": "confirmed", "type": "viewing", "dates": { "requestedDate": "2026-12-04T10:00:00.000Z", "confirmedDate": "2026-12-04T10:00:00.000Z", "visitDuration": 1 }, "notes": "I would like to see the kitchen and the parking space.", "escrowId": null, "createdAt": "2026-11-25T09:14:22.318Z", "updatedAt": "2026-11-25T11:02:40.007Z", "__v": 0 }}Get a booking by ID GET
Returns one booking with propertyId populated as the full property document, tenantId and landlordId populated with firstName, lastName, avatar and email, and escrowId populated...
Cancel or decline a booking PATCH
Sets status to cancelled and records cancellationReason, cancellationBy (the caller) and cancellationDate.
HomeLink Hub