Overview
Retrieve all medical documents associated with a specific appointment in MediSync. This endpoint returns a list of documents that have been uploaded and linked to the specified appointment.Appointment-Based Retrieval: Documents are organized by appointment ID, allowing you to easily access all medical documents related to a specific consultation or medical visit.
Authentication
Path Parameters
The appointment ID to retrieve documents for
Response
Whether the request was successful
Array of documents associated with the appointment
Error message if the request failed
Response Examples
Successful Response with Documents
Successful Response with No Documents
Error Response
Business Logic
- Appointment-Centric: Documents are retrieved based on the appointment ID, not individual document IDs.
- Multiple Documents: While the upload endpoint currently restricts to one document per appointment, this endpoint returns an array to support potential future expansion.
- Secure Access: Only authorized users can access document information for appointments they have permission to view.
Error Handling
- 400 Bad Request: Invalid appointment ID format or database query error
- 401 Unauthorized: Invalid or missing authentication token
- 404 Not Found: Appointment ID does not exist (returns empty array)
- 500 Internal Server Error: Database connection or query error
Notes
- Returns an empty array if no documents are found for the appointment
- Document URLs are secure and require proper authentication to access
- The actual file content is not returned - use the download endpoint to retrieve file data
- Document metadata includes creation and update timestamps for audit purposes