This endpoint allows an authenticated lawyer to accept a pending client reservation and confirm (or override) the appointment’s date and time. When called, the server looks up the reservation by its MongoDB ObjectId, setsDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/fredy-rizo/despacho-backend/llms.txt
Use this file to discover all available pages before exploring further.
reservation_accepted to true, and updates preferred_date and preferred_hour with the values supplied in the request body. The full updated reservation document is returned in the response.
Endpoint
Authentication
Required. Include a valid JWT in theAuthorization header as a Bearer token. The token is verified against the lawyer user database; requests with a missing, expired, or invalid token are rejected before the handler runs.
Path Parameters
The MongoDB ObjectId of the reservation to accept. This value is found in the
_id field of any reservation document returned by the list or create endpoints.Request Body
The confirmed appointment date as set by the lawyer. Recommended format:
YYYY-MM-DD (e.g., "2025-08-20"). This value overwrites the client’s originally requested date.The confirmed appointment time as set by the lawyer. Recommended format:
HH:MM in 24-hour notation (e.g., "11:00"). This value overwrites the client’s originally requested time.Example Request
Responses
200 — Reservation Accepted
The reservation was successfully updated.reservation_accepted is now true and the confirmed date and time are reflected in the returned document.
404 — Reservation Not Found
Returned when no reservation document exists in the database for the providedreserveId.
401 — Missing Token
Returned when theAuthorization header is absent from the request.