curl --request POST \
--url https://api.example.com/cases/upload \
--header 'Content-Type: application/json' \
--data '{
"case_id": 123
}'{
"message": "<string>",
"file": {
"file.file_id": "<string>",
"file.case_id": 123,
"file.file_name": "<string>",
"file.file_type": "<string>",
"file.file_size": 123,
"file.file_url": "<string>",
"file.uploaded_at": "<string>"
},
"404 Not Found": {},
"400 Bad Request": {},
"500 Internal Server Error": {}
}Upload a single file to an existing medical case
curl --request POST \
--url https://api.example.com/cases/upload \
--header 'Content-Type: application/json' \
--data '{
"case_id": 123
}'{
"message": "<string>",
"file": {
"file.file_id": "<string>",
"file.case_id": 123,
"file.file_name": "<string>",
"file.file_type": "<string>",
"file.file_size": 123,
"file.file_url": "<string>",
"file.uploaded_at": "<string>"
},
"404 Not Found": {},
"400 Bad Request": {},
"500 Internal Server Error": {}
}multipart/form-data for file upload.
curl -X POST "https://api.medmitra.com/cases/upload" \
-H "Authorization: Bearer YOUR_TOKEN" \
-F "case_id=12345" \
-F "file=@/path/to/document.pdf"
{
"message": "File uploaded successfully",
"file": {
"file_id": "f9e8d7c6-5432-10fe-dcba-0987654321ab",
"case_id": 12345,
"file_name": "document.pdf",
"file_type": "application/pdf",
"file_size": 1234567,
"file_url": "/files/12345/document.pdf",
"uploaded_at": "2026-03-04T14:30:00Z"
}
}
{
"detail": "Case not found"
}
{
"detail": "Error message describing the issue"
}
{
"detail": "Internal server error: {error details}"
}