Skip to main content
GET
https://app.medisync.me
/
api
/
recordings
/
{appointmentId}
Get Recordings by Appointment
curl --request GET \
  --url https://app.medisync.me/api/recordings/{appointmentId} \
  --header 'Authorization: <authorization>'
{
  "success": true,
  "data": [
    {
      "_id": "<string>",
      "appointment_id": "<string>",
      "recording_url": "<string>",
      "recording_key": "<string>",
      "createdAt": "<string>",
      "updatedAt": "<string>"
    }
  ],
  "error": "<string>"
}

Overview

Retrieves all recordings associated with a specific appointment ID. This endpoint returns an array of recording objects for the given appointment.
This endpoint searches for recordings by appointment ID, not by recording ID. It returns all recordings associated with the appointment.

Authentication

Authorization
string
required
Bearer JWT token for authentication
Authorization: Bearer your_jwt_token_here

Path Parameters

appointmentId
string
required
The appointment ID to search for recordings (MongoDB ObjectId)
65f8a1b2c3d4e5f6789012f3

Response

success
boolean
required
Indicates if the request was successful
data
array
Array of recording objects associated with the appointment
error
string
Error message if the request failed

Example Request

curl -X GET \
  'https://app.medisync.me/api/recordings/65f8a1b2c3d4e5f6789012f3' \
  -H 'Authorization: Bearer your_jwt_token_here'

Example Response

Success Response - With Recordings
{
  "success": true,
  "data": [
    {
      "_id": "65f8a1b2c3d4e5f6789012f4",
      "appointment_id": "65f8a1b2c3d4e5f6789012f3",
      "recording_url": "https://storage.example.com/recordings/65f8a1b2c3d4e5f6789012f3_recording.wav",
      "recording_key": "65f8a1b2c3d4e5f6789012f3_recording.wav",
      "createdAt": "2024-03-18T10:30:00.000Z",
      "updatedAt": "2024-03-18T10:30:00.000Z"
    }
  ]
}
Success Response - No Recordings
{
  "success": true,
  "data": []
}
Error Response
{
  "success": false,
  "error": "Database error message"
}

Behavior Notes

  • Search by Appointment: The endpoint searches for recordings using the appointment ID, not the recording ID
  • Array Response: Always returns an array, even if no recordings are found (empty array)
  • Multiple Recordings: Can return multiple recordings if an appointment has multiple recording files
  • Authentication Required: Requires valid JWT token for access

Use Cases

  1. View Appointment Recordings: Get all recordings for a specific medical appointment
  2. Recording Management: List recordings before processing or transcription
  3. Appointment History: View recording history for follow-up appointments
  4. Audio Playback: Retrieve recording metadata before streaming or downloading