Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/EstefanoARG/FridgeRadar/llms.txt

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

The Products endpoints power FridgeRadar’s shared catalog of groceries and household goods. Products are the building blocks referenced by both the Inventory and Recipe systems — every item on a shelf traces back to a product record here. Categories let you group related products (Dairy, Produce, Frozen, etc.) and expose icon and color metadata for richer UIs. All endpoints require a valid Bearer token.

Create a product

Request body — ProductoCreate
nombre
string
required
Display name of the product (e.g. "Whole Milk 1L").
descripcion
string
Optional longer description of the product.
id_categoria
integer
ID of the category this product belongs to. Optional — can be assigned later via PATCH.
codigo_barras
string
EAN / UPC barcode string, used for scanning-based lookup. Optional.
unidad_medida
string
The unit used to measure quantity — e.g. "unidad", "kg", "litro". Defaults to "unidad".
perecible
boolean
Whether the product can expire. When true, expiry tracking is enabled for inventory entries. Defaults to true.
dias_promedio_vencimiento
integer
Typical number of days before this product expires after purchase. Used to pre-fill fecha_vencimiento when adding to inventory. Optional.
imagen
string
URL or path to a product image. Optional.
Creates a new product in the shared catalog and returns it with a freshly assigned id_producto.
curl -X POST "https://api.fridgeradar.app/api/v1/productos" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "nombre": "Whole Milk 1L",
    "id_categoria": 2,
    "unidad_medida": "litro",
    "perecible": true,
    "dias_promedio_vencimiento": 10,
    "codigo_barras": "7501055300902"
  }'
POST /api/v1/productos201 Created

List products

q
string
Search term matched against product names. Case-insensitive substring search. Optional.
id_categoria
integer
Filter results to products belonging to a specific category. Optional.
Returns the full product catalog, optionally filtered by a name search and/or category. Combine both query params to narrow to, for example, all dairy products matching “milk”.
# List all products
curl -X GET "https://api.fridgeradar.app/api/v1/productos" \
  -H "Authorization: Bearer <token>"

# Search for products named "milk" in the Dairy category (id 2)
curl -X GET "https://api.fridgeradar.app/api/v1/productos?q=milk&id_categoria=2" \
  -H "Authorization: Bearer <token>"
GET /api/v1/productos200 OK — returns an array of ProductoResponse objects.

Create a product category

Request body — CategoriaProductoCreate
nombre
string
required
Display name of the category (e.g. "Dairy", "Produce").
icono
string
Icon identifier or emoji string for UI rendering (e.g. "🥛" or "dairy-icon"). Optional.
color
string
Hex color code or named color used to badge this category in the UI (e.g. "#4A90D9"). Optional.
Creates a new product category that products can be assigned to. Returns the created category with its id_categoria.
curl -X POST "https://api.fridgeradar.app/api/v1/productos/categorias" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "nombre": "Dairy",
    "icono": "🥛",
    "color": "#4A90D9"
  }'
POST /api/v1/productos/categorias201 Created

List product categories

Returns all available product categories. Use this to populate category pickers in forms and to resolve id_categoria values in product responses.
curl -X GET "https://api.fridgeradar.app/api/v1/productos/categorias" \
  -H "Authorization: Bearer <token>"
GET /api/v1/productos/categorias200 OK — returns an array of CategoriaProductoResponse objects.

Get a single product

id_producto
integer
required
The unique ID of the product to retrieve.
Fetches a single product by ID. Unlike the list endpoint, this returns the enriched ProductoConCategoriaResponse shape which nests the full category object rather than just its ID.
curl -X GET "https://api.fridgeradar.app/api/v1/productos/12" \
  -H "Authorization: Bearer <token>"
GET /api/v1/productos/{id_producto}200 OK — returns ProductoConCategoriaResponse.

Update a product

id_producto
integer
required
ID of the product to update.
Request body — ProductoUpdate (all fields optional)
nombre
string
New display name for the product.
descripcion
string
Updated description.
id_categoria
integer
Reassign the product to a different category.
codigo_barras
string
Updated or corrected barcode string.
unidad_medida
string
Change the unit of measure used for this product.
perecible
boolean
Toggle whether expiry tracking applies to this product.
dias_promedio_vencimiento
integer
Update the typical days-until-expiry hint.
imagen
string
New image URL or path.
Applies a partial update — only fields present in the request body are changed. Returns the updated ProductoResponse.
curl -X PATCH "https://api.fridgeradar.app/api/v1/productos/12" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "dias_promedio_vencimiento": 14,
    "imagen": "https://cdn.fridgeradar.app/products/milk.png"
  }'
PATCH /api/v1/productos/{id_producto}200 OK

Delete a product

id_producto
integer
required
ID of the product to permanently delete.
Removes a product from the catalog. Note that deleting a product that is still referenced by inventory entries or recipes may result in referential integrity errors — remove those associations first.
curl -X DELETE "https://api.fridgeradar.app/api/v1/productos/12" \
  -H "Authorization: Bearer <token>"
DELETE /api/v1/productos/{id_producto}204 No Content

Response schemas

ProductoResponse

id_producto
integer
Unique catalog identifier for the product.
nombre
string
Display name of the product.
descripcion
string | null
Optional longer description.
id_categoria
integer | null
ID of the product’s category, or null if uncategorized.
codigo_barras
string | null
Barcode string, or null if not set.
unidad_medida
string
Unit of measure (e.g. "unidad", "kg", "litro").
perecible
boolean
Whether expiry tracking is enabled for this product.
dias_promedio_vencimiento
integer | null
Typical number of days until expiry, or null if unknown.
imagen
string | null
Image URL or path, or null if not set.

ProductoConCategoriaResponse

Extends ProductoResponse with one additional field returned by GET /api/v1/productos/{id_producto}.
categoria
object | null
The full category object nested inline, or null if the product has no category.

Build docs developers (and LLMs) love