Skip to main content

Overview

Update notes for a specific appointment in MediSync. This endpoint allows modification of existing notes by finding the appointment and updating the associated notes. All fields are optional and will preserve existing values if not provided.
Appointment-Based Updates: This endpoint first finds the appointment by ID, then locates and updates the associated notes. The appointment ID in the URL is used to identify which appointment’s notes to update.

Authentication

curl -X PUT \
  'https://api.medisync.com/notes/apt_abc123?uid=doc_xyz789' \
  -H 'Authorization: Bearer YOUR_JWT_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "notes": "Updated clinical notes: Patient showed improvement in symptoms. EKG remains normal. Continue current treatment plan.",
    "summary": "Updated summary: Improved symptoms, normal EKG, continue treatment"
  }'

Path Parameters

id
string
required
The appointment ID whose notes should be updated

Query Parameters

uid
string
required
The user ID of the healthcare provider updating the notes

Body Parameters

appointment_id
string
Optional override for the appointment ID (will use existing value if not provided)
notes
string
The clinical notes content to update (will preserve existing value if not provided)
summary
string
The summary to update (will preserve existing value if not provided)

Response

success
boolean
Indicates if the operation was successful
data
object
The updated notes object
error
string
Error message if the operation failed

Example Response

{
  "success": true,
  "data": {
    "_id": "notes_def456",
    "appointment_id": "apt_abc123",
    "notes": "Updated clinical notes: Patient showed improvement in symptoms. EKG remains normal. Continue current treatment plan.",
    "summary": "Updated summary: Improved symptoms, normal EKG, continue treatment",
    "createdAt": "2024-01-15T10:30:00.000Z",
    "updatedAt": "2024-01-15T14:20:00.000Z"
  }
}

Behavior Notes

  • Two-Step Process: The endpoint first finds the appointment by ID, then locates the notes associated with that appointment
  • Partial Updates: All body parameters are optional. Only provided fields will be updated, others will retain their existing values
  • Automatic Timestamps: The updatedAt field is automatically updated when notes are modified
  • Preserves Existing Data: If a field is not provided in the request, its current value is preserved

Status Codes

  • 200 - Notes updated successfully
  • 400 - Invalid request data or database error
  • 404 - Appointment or notes not found