Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/OswalSnow/AR-Barber/llms.txt

Use this file to discover all available pages before exploring further.

AR Barbería exposes five public routes that require no authentication. They cover the customer-facing journey from browsing available barbers to submitting a booking, plus a JSON availability API used by the booking form to populate time slots in real time.

GET /

Returns the homepage view, which lists all active barbers. No parameters. Renders an HTML view — not a JSON endpoint.

GET /agendar/{id}

Displays the booking form pre-loaded for the barber identified by id. The form uses GET /api/disponibilidad/{user_id}/{fecha} to fetch available time slots dynamically when the customer selects a date.
id
integer
required
The ID of the barber (users.id where role = 'barber'). Returns a 404 if the barber does not exist.

POST /confirmar-cita

Submits a new appointment. This endpoint is rate-limited to 3 requests per minute per IP (throttle:3,1) to prevent booking spam.
Requests that exceed the rate limit receive a 429 Too Many Requests response. The client should wait 60 seconds before retrying.
Request body (form data or JSON):
customer_name
string
required
Full name of the customer. Maximum 255 characters.
customer_phone
string
required
10-digit phone number with no spaces or punctuation. Must match /^[0-9]{10}$/.
servicio
string
required
The service being booked. Accepted values: corte, barba, ambos.
fecha
string
required
Appointment date in YYYY-MM-DD format. Must be today or a future date.
hora
string
required
Appointment start time, e.g. "10:30". Must be a slot returned by the availability endpoint for the chosen barber and date.
user_id
integer
required
ID of the barber to book. Must reference an existing user (users.id).
On success the server redirects to a confirmation view. On validation failure it returns a 422 with error details.

GET /api/disponibilidad/{user_id}/{fecha}

Returns an array of available time strings for a given barber on a given date. This is the only public JSON endpoint in the application.
user_id
integer
required
The barber’s user ID.
fecha
string
required
The date to check, formatted as YYYY-MM-DD.
duration
integer
default:"30"
Desired appointment duration in minutes. Slots are generated in 30-minute increments; this parameter filters out slots that are too short to fit the requested duration. Defaults to 30.
Response Returns a JSON array of available time strings. The array is empty when the barber has no workday configured for that date or when all slots are occupied.
[]
string[]
Ordered list of available start times in HH:MM 24-hour format. Slots in the past are excluded when the requested date is today.
["10:00", "10:30", "11:00", "14:30", "15:00"]
Example request:
curl "https://example.com/api/disponibilidad/3/2026-06-15?duration=30"
Empty response (no workday or fully booked):
[]
Call this endpoint whenever the customer changes either the selected barber or the selected date so the time picker always reflects current availability.

GET /servicios

Renders the services and portfolio gallery page. Retrieves all PortfolioImage records ordered by most recently uploaded and passes them to the servicios view. No parameters. Renders an HTML view — not a JSON endpoint.

Build docs developers (and LLMs) love