Skip to main content

GET /api/platos

Returns all dishes that have not been soft-deleted (i.e. where borrado_en is null). Authentication: Bearer JWT required
Required role: any authenticated user

Request

No parameters or body required.

Response

Success (200)

An array of platos objects.
[].id
string
Unique dish ID (nanoid, 10 characters)
[].nombre
string
Dish name
[].precio
string
Dish price as a decimal string (e.g. "25.00")
[].creado_en
string
Creation timestamp (ISO 8601)
[].actualizado_en
string
Last update timestamp (ISO 8601)
[].borrado_en
string | null
Always null in this response — soft-deleted dishes are excluded

Error responses

StatusDescription
401Unauthorized — missing or invalid JWT

Example

curl http://localhost:3000/api/platos \
  -H "Authorization: Bearer <token>"
[
  {
    "id": "aB3dEfGhIj",
    "nombre": "Sopa de Maní",
    "precio": "25.00",
    "creado_en": "2026-02-04T09:00:00.000Z",
    "actualizado_en": "2026-02-04T09:00:00.000Z",
    "borrado_en": null
  },
  {
    "id": "kL5mNoPqRs",
    "nombre": "Silpancho",
    "precio": "35.00",
    "creado_en": "2026-01-15T10:00:00.000Z",
    "actualizado_en": "2026-01-15T10:00:00.000Z",
    "borrado_en": null
  }
]

Build docs developers (and LLMs) love