Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/MateoNavarroMN/Balsamoa-Backend/llms.txt

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

Product categories define the top-level groupings available in the Balsamoa store. Every product must belong to exactly one category, identified by its id. This endpoint returns all category records seeded in the database so you can populate a category selector before creating or updating a product.

Request

PropertyValue
MethodGET
Path/api/v1/admin/categorias
No query parameters or request body are required.

Example

curl https://your-api.com/api/v1/admin/categorias

Response

200 OK — An array of category objects ordered by database insertion (ascending id).
[
  {
    "id": 1,
    "nombre": "Hoodie",
    "descripcion": "Buzos de alta calidad con y sin capucha"
  },
  {
    "id": 2,
    "nombre": "Remera",
    "descripcion": "Remeras de algodón premium"
  }
]

Response Fields

id
integer
The unique numeric identifier for the category. Pass this value as categoria_id in product create and update requests.
nombre
string
The display name of the category (e.g., "Hoodie", "Remera").
descripcion
string
A short human-readable description of the category. May be null if no description was provided.

Error Cases

StatusCauseResponse body
404The categorias table contains no rows{"mensaje": "Registros no encontrados"}
Call this endpoint first when building a product creation or editing form to dynamically populate the category dropdown. The id values are stable — they are set by the SQL seed script and the sequences are updated accordingly, so IDs will not shift after new categories are inserted.

Build docs developers (and LLMs) love