The Specialties API is the entry point for appointment booking in MELIKA. It exposes the catalog of active medical disciplines, resolves which physicians practice each specialty, and provides availability data that integrates directly with FullCalendar for scheduling UIs. All specialties endpoints are public — no authentication token is required — making them suitable for patient-facing booking flows before a user is signed in.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Imjuanisss/proyecto-melika/llms.txt
Use this file to discover all available pages before exploring further.
Data Model
Theespecialidades table describes each medical discipline offered on the platform, including its pricing baseline and active status.
| Field | Type | Notes |
|---|---|---|
id | integer | Primary key |
nombre | VARCHAR(100) | UNIQUE. Specialty name |
descripcion | TEXT | Description of the discipline |
precio_base | numeric(10,2) | Base consultation price. Default 0.00 |
imagen_url | VARCHAR(255) | URL to the specialty’s cover image |
activa | boolean | Only TRUE records appear in public listings. Default TRUE |
created_at | timestamp | Auto-generated |
updated_at | timestamp | Auto-updated |
GET /especialidades returns only active specialties (activa = TRUE). Inactive disciplines are hidden from public listings and are accessible only via the admin route.Endpoints
GET /especialidades
Returns the full list of active medical specialties available on the platform. This is the primary endpoint for populating specialty selector UIs in patient booking flows. Authentication: None (public)Specialty identifier.
Unique specialty name (e.g.
"Cardiología", "Pediatría").Description of the medical discipline.
Base consultation price for this specialty.
URL to the specialty’s cover image.
Always
true in this response (inactive specialties are filtered out).GET /especialidades/admin
Returns all specialties — including inactive ones — for administrative management interfaces. This route is intended for admin dashboards where operators need to view, enable, or disable disciplines. Authentication: None at route level (enforced at the admin layer)Specialty identifier.
Specialty name.
Discipline description.
Base consultation price.
Cover image URL.
Active status — includes both
true and false records.GET /especialidades/disponibilidad
Returns the available time slots (franjas_horarias) for a specific doctor on a given calendar day. Each slot is 40 minutes long. Only slots with disponible = TRUE are returned. Use this endpoint to populate a daily time-slot picker in the booking flow.
Authentication: None (public)
The ID of the physician whose availability to query.
The target date in
YYYY-MM-DD format.Time slot (franja) identifier.
Slot start time (e.g.
"09:00:00").Slot end time (e.g.
"09:40:00"). Always 40 minutes after hora_inicio.Always
true for slots returned by this endpoint.GET /especialidades/disponibilidad-rango
Returns all available time slots for a doctor within a date range, formatted as FullCalendar event objects. This endpoint is designed for direct consumption by FullCalendar’sevents feed — each object includes id, title, start, end, backgroundColor, borderColor, textColor, and MELIKA-specific metadata in extendedProps.
Authentication: None (public)
The ID of the physician whose availability to query.
Range start date in
YYYY-MM-DD format (inclusive).Range end date in
YYYY-MM-DD format (inclusive).Event identifier — the string
"franja-" prefixed to the slot’s numeric ID (e.g. "franja-201").Human-readable start time label displayed on the calendar (e.g.
"09:00").ISO 8601 datetime string for the event start (e.g.
"2025-02-10T09:00:00").ISO 8601 datetime string for the event end (e.g.
"2025-02-10T09:40:00").Hex color for the FullCalendar event background. Always
#1A7A52 (MELIKA green).Hex color for the FullCalendar event border. Always
#145C3E.Always
"#fff".GET /especialidades/:id/medicos
Returns all active physicians who practice a given specialty, along with their professional profile data. Use this endpoint to populate doctor selection UIs after a patient has chosen a specialty. Only doctors withmedicos.activo = TRUE and usuarios.activo = TRUE are returned.
Authentication: None (public)
The specialty ID for which to retrieve the list of affiliated physicians.
Doctor’s
medicos.id (not usuarios.id).Physician’s first name.
Physician’s first surname.
The physician’s individual consultation fee.
Average patient rating score.
Whether the physician offers teleconsultation appointments.
Whether the physician offers in-person appointments.
Short professional biography.
Years of clinical experience.
URL to the physician’s profile photo.
POST /especialidades
Creates a new medical specialty entry. This operation is reserved for platform administrators and is exposed through the admin route layer. The request fieldicono maps to the imagen_url column in the database.
Authentication: None at route level (enforced at the admin layer)
Unique specialty name. Returns an error if a specialty with this name already exists.
Description of the discipline.
Base consultation price for this specialty.
URL to the specialty’s cover image. Stored as
imagen_url in the database.Whether the specialty is immediately visible to patients. Defaults to
true.PUT /especialidades/:id
Fully updates an existing specialty record. All fields may be modified, including togglingactiva to hide a specialty from public listings without deleting it. The request field icono maps to imagen_url in the database.
Authentication: None at route level (enforced at the admin layer)
The ID of the specialty to update.
Updated specialty name. Must remain unique across all specialties.
Updated discipline description.
Updated base consultation price.
Updated cover image URL. Stored as
imagen_url in the database.Set to
false to deactivate and hide this specialty from public listings.