Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/teofilobetancourt/Restaurant-Equis/llms.txt

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

The Products API exposes the Restaurant Equis menu catalog — every dish that can be ordered by a customer. Dishes (called platos internally) belong to one of five categories and carry a name, optional description, and a unit price. Two router prefixes cover the same catalog: /api/productos (legacy-compatible, returns dict responses) and /api/platos (returns Pydantic-validated PlatoOut responses). POST for creating new dishes is only available under /api/platos.
GET /api/productos and GET /api/platos execute the same query and return the same JSON shape. The difference is that /api/platos uses Pydantic’s response_model=List[PlatoOut] for strict validation, while /api/productos uses response_model=List[dict] for broader frontend compatibility.

List All Dishes

curl -X GET https://your-api.com/api/productos
Returns every dish in the menu catalog. Apply the optional ?categoria= query parameter to narrow results to a single category. Both /api/productos and /api/platos support this parameter.

Query Parameters

categoria
string
Filters the response to dishes belonging to a specific category. Accepted values:
ValueDescription
entradaStarters and appetisers
plato_principalMain courses
postreDesserts
bebidaBeverages
acompañanteSide dishes
Omit this parameter to return dishes from all categories.

Response

Returns an array of dish objects. Both /api/productos and /api/platos return the following fields:
id_producto
integer
Alias for id_plato. Present in /api/productos (dict response) for legacy frontend compatibility.
id_plato
integer
Auto-incremented primary key of the dish record. Present under both endpoints.
nombre
string
Display name of the dish, e.g. "Pabellón Criollo". Present under both endpoints.
descripcion
string
Optional description of the dish. Returns an empty string "" when not set on /api/productos; returns null on /api/platos (via PlatoOut).
precio
number
Unit price of the dish as a floating-point number, e.g. 12.50. Present under both endpoints.
categoria
string
Category the dish belongs to. One of entrada, plato_principal, postre, bebida, acompañante. Present under both endpoints.
disponible
boolean
Always true in the current implementation. Only present on /api/productos (dict response); not included in the PlatoOut schema returned by /api/platos.

List All Dishes (Typed)

GET /api/platos is an identical query to GET /api/productos but responses are validated against the PlatoOut Pydantic schema. The response shape is the same; use this endpoint when you want stricter server-side type guarantees.
curl -X GET https://your-api.com/api/platos
When building order creation forms, fetch the catalog from this endpoint and use the returned id_plato values as the id_plato field in your POST /api/ordenes items array.

Create a Dish

curl -X POST https://your-api.com/api/platos \
  -H "Content-Type: application/json" \
  -d '{
    "nombre": "Pabellón Criollo",
    "descripcion": "Arroz blanco, caraotas negras, carne mechada y tajadas",
    "precio": 15.50,
    "categoria": "plato_principal"
  }'
Registers a new dish in the menu catalog. Returns 201 Created with the full PlatoOut object, including the auto-generated id_plato.

Request Body

nombre
string
required
Display name of the dish. Maximum 100 characters (enforced at the database level).
descripcion
string
Optional human-readable description of the dish. Maximum 255 characters. Omit or pass null to leave blank.
precio
number
required
Unit price for the dish. Must be a positive number with up to 2 decimal places, e.g. 12.50.
categoria
string
required
Category to assign the dish to. Must be one of the accepted enum values: entrada, plato_principal, postre, bebida, acompañante.

Response

Returns 201 Created with a PlatoOut object:
id_plato
integer
Auto-generated primary key assigned to the new dish.
nombre
string
Name of the dish as stored.
descripcion
string | null
Description of the dish, or null if not provided.
precio
number
Unit price of the dish.
categoria
string
Category the dish was assigned to.
Example 201 response
{
  "id_plato": 14,
  "nombre": "Pabellón Criollo",
  "descripcion": "Arroz blanco, caraotas negras, carne mechada y tajadas",
  "precio": 15.50,
  "categoria": "plato_principal"
}

Build docs developers (and LLMs) love