Retrieve a list of all medical specialties
Authorization header.validatorJWT - Validates JWT token (backend/middlewares/validatorJWT.ts)collectionErrors - Handles validation errors (backend/middlewares/collectionErrors.ts)backend/controllers/speciality.ts:28
%${search} (matches names that contain the search term)Implementation: backend/controllers/speciality.ts:36-41Examples:search=Cardio - Returns specialties like “Cardiología”search=Ped - Returns specialties like “Pediatría”search=a - Returns all specialties containing “a”Activa - Active specialtiesInactiva - Inactive specialtiesbackend/controllers/speciality.ts:44-46Example:state=Activa - Returns only active specialties| Status Code | Description |
|---|---|
200 | Success - Returns array of specialties (may be empty) |
401 | Unauthorized - Invalid or missing JWT token |
404 | Not Found - No specialties exist in the system |
500 | Server Error - Database or internal error |
backend/controllers/speciality.ts:34-50
backend/models/speciality.ts:27-31backend/helpers/constants.ts (STATES_SPECIALITIES)Activa%${search}), which means it will match specialties where the name contains the search term anywhere in the string.200 with empty array404