Create a new doctor account in the system.
Request Body
Doctor’s CRM (Medical Registration) number. Must be unique and up to 9 characters.
Doctor’s email address. Must be unique.
Password for the doctor’s account.
Doctor’s medical specialty (e.g., Cardiology, Pediatrics, Dermatology).
Doctor’s contact telephone number.
Price for a consultation with this doctor (decimal value).
Response
Doctor’s medical specialty.
Doctor’s telephone number.
Example Request
curl -X POST http://localhost:8080/doctor/create \
-H "Content-Type: application/json" \
-d '{
"crm": "123456789",
"email": "dr.silva@hospital.com",
"password": "securePassword123",
"name": "Dr. João Silva",
"specialty": "Cardiology",
"telephone": "+5534999887766",
"consultationValue": 250.00
}'
Example Response
{
"crm": "123456789",
"email": "dr.silva@hospital.com",
"password": "securePassword123",
"name": "Dr. João Silva",
"specialty": "Cardiology",
"telephone": "+5534999887766",
"consultationValue": 250.00
}
Error Responses
Invalid request body or missing required fields.
Doctor with this CRM or email already exists.