Skip to main content
PUT
/
doctor
/
{crm}
Update Doctor
curl --request PUT \
  --url https://api.example.com/doctor/{crm} \
  --header 'Content-Type: application/json' \
  --data '
{
  "crm": "<string>",
  "email": "<string>",
  "password": "<string>",
  "name": "<string>",
  "specialty": "<string>",
  "telephone": "<string>",
  "consultationValue": 123
}
'
{
  "crm": "<string>",
  "email": "<string>",
  "password": "<string>",
  "name": "<string>",
  "specialty": "<string>",
  "telephone": "<string>",
  "consultationValue": 123,
  "404 Not Found": {},
  "400 Bad Request": {},
  "409 Conflict": {}
}
Update an existing doctor’s information by CRM number.

Path Parameters

crm
string
required
The CRM number of the doctor to update.

Request Body

crm
string
Updated CRM number (optional, use with caution as it’s the primary identifier).
email
string
Updated email address.
password
string
Updated password.
name
string
Updated full name.
specialty
string
Updated medical specialty.
telephone
string
Updated telephone number.
consultationValue
number
Updated consultation price.

Response

crm
string
Doctor’s CRM number.
email
string
Doctor’s email address.
password
string
Doctor’s password.
name
string
Doctor’s full name.
specialty
string
Doctor’s medical specialty.
telephone
string
Doctor’s telephone number.
consultationValue
number
Consultation price.

Example Request

curl -X PUT http://localhost:8080/doctor/123456789 \
  -H "Content-Type: application/json" \
  -d '{
    "crm": "123456789",
    "email": "dr.silva.updated@hospital.com",
    "password": "newSecurePassword123",
    "name": "Dr. João Silva",
    "specialty": "Cardiology",
    "telephone": "+5534999887766",
    "consultationValue": 300.00
  }'

Example Response

{
  "crm": "123456789",
  "email": "dr.silva.updated@hospital.com",
  "password": "newSecurePassword123",
  "name": "Dr. João Silva",
  "specialty": "Cardiology",
  "telephone": "+5534999887766",
  "consultationValue": 300.00
}

Error Responses

404 Not Found
error
Doctor with the specified CRM number not found.
400 Bad Request
error
Invalid request body or data validation failed.
409 Conflict
error
Updated email or CRM conflicts with an existing doctor.

Build docs developers (and LLMs) love