Skip to main content
GET
/
doctor
List All Doctors
curl --request GET \
  --url https://api.example.com/doctor
{
  "[]": [
    {
      "crm": "<string>",
      "email": "<string>",
      "password": "<string>",
      "name": "<string>",
      "specialty": "<string>",
      "telephone": "<string>",
      "consultationValue": 123
    }
  ],
  "200 OK (Empty Array)": {}
}
Retrieve a list of all doctors in the system.

Response

Returns an array of all doctor objects.
[]
array
Array of all Doctor objects in the system.
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 GET http://localhost:8080/doctor

Example Response

[
  {
    "crm": "123456789",
    "email": "[email protected]",
    "password": "securePassword123",
    "name": "Dr. João Silva",
    "specialty": "Cardiology",
    "telephone": "+5534999887766",
    "consultationValue": 250.00
  },
  {
    "crm": "987654321",
    "email": "[email protected]",
    "password": "password456",
    "name": "Dr. Maria Santos",
    "specialty": "Pediatrics",
    "telephone": "+5534988776655",
    "consultationValue": 200.00
  }
]

Error Responses

200 OK (Empty Array)
success
No doctors in the system. Returns an empty array [].

Build docs developers (and LLMs) love