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.

Colors define the second axis of product variants alongside sizes. Each color record includes a hex code that can be used to render a color swatch in any frontend. Retrieve all available colors from this endpoint before building the variantes array when creating or updating a product.

Request

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

Example

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

Response

200 OK — An array of color objects.
[
  { "id": 1, "nombre": "Blanco",     "hex": "#F5F5F5" },
  { "id": 2, "nombre": "Negro",      "hex": "#1A1A1A" },
  { "id": 3, "nombre": "Verde",      "hex": "#4A5D23" },
  { "id": 4, "nombre": "Beige",      "hex": "#D5C7A8" },
  { "id": 5, "nombre": "Azul",       "hex": "#1A365D" },
  { "id": 6, "nombre": "Gris Claro", "hex": "#D3D3D3" },
  { "id": 7, "nombre": "Gris Oscuro","hex": "#4A4A4A" },
  { "id": 8, "nombre": "Marrón",     "hex": "#5C4033" }
]

Response Fields

id
integer
The unique numeric identifier for this color. Pass this value as color_id inside each object of the variantes array when creating or updating a product.
nombre
string
The display name of the color (e.g., "Blanco", "Gris Oscuro").
hex
string
A 7-character CSS hex color code (e.g., "#F5F5F5"). Use this to render color swatches in the admin panel or storefront. May be null if not set.

Error Cases

StatusCauseResponse body
404The colores table contains no rows{"mensaje": "Registros no encontrados"}
The hex values from this endpoint are also aggregated directly onto product objects. When you fetch a product from GET /api/v1/admin/productos or either public store endpoint, the response includes a colores_hex array (e.g., ["#F5F5F5", "#1A1A1A"]) containing the distinct hex codes of all colors available as variants for that product. This lets you render color swatches on product cards without a secondary lookup.

Build docs developers (and LLMs) love