Overview
Deletes a transcription associated with a specific appointment ID. This operation removes the transcription record from the database permanently.
Permanent Deletion: This operation permanently deletes the transcription and cannot be undone. The transcription will be removed from the database.
Authentication
Bearer JWT token for authenticationAuthorization: Bearer your_jwt_token_here
Path Parameters
The appointment ID whose transcription should be deleted (MongoDB ObjectId)
Response
Indicates if the transcription was deleted successfully (always true for successful deletion)
Error message if the deletion failed
Example Request
curl -X DELETE \
'https://app.medisync.me/api/transcriptions/65f8a1b2c3d4e5f6789012f3' \
-H 'Authorization: Bearer your_jwt_token_here'
Example Response
Error Response - Missing Appointment ID
{
"success": false,
"error": "Missing or invalid appointment ID"
}
Error Response - Transcription Not Found
{
"success": false,
"error": "Transcription not found"
}
Error Response - Database Error
{
"success": false,
"error": "An error occurred while deleting the transcription"
}
Behavior Notes
- Delete by Appointment: The endpoint finds and deletes transcriptions using the appointment ID
- Permanent Operation: The deletion is permanent and cannot be reversed
- Error Handling: Provides specific error messages for different failure scenarios
- Authentication Required: Requires valid JWT token for authorization
- Validation: Checks for valid appointment ID parameter before attempting deletion
HTTP Status Codes
- 200 OK: Transcription successfully deleted
- 400 Bad Request: Missing or invalid appointment ID
- 404 Not Found: Transcription not found for the given appointment ID
- 500 Internal Server Error: Database or server error during deletion
Use Cases
- Clean Up Old Transcriptions: Remove transcriptions that are no longer needed
- Privacy Compliance: Delete transcriptions upon patient request
- Data Management: Remove incorrect or duplicate transcriptions
- Workflow Reset: Delete transcriptions to restart the transcription process