Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/160906/Yakultt-App/llms.txt

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

The Products API manages the Yakult catalog — the source of truth for what can be sold, at what price, and how much remains in stock. Each product is identified by a human-readable SKU that must be unique across the catalog. When an order is placed, stock is deducted automatically; use these endpoints to inspect or correct inventory levels at any time. No authentication is required on any products endpoint.

GET /api/productos

Returns the full product catalog ordered alphabetically by name, including current stock levels for every item. Products with a blank category are returned with "General" as the category value. Example request
curl http://localhost:3000/api/productos
Example response
[
  {
    "id": 1,
    "nombre": "Yakult Light 65ml",
    "sku": "YKL-LITE-65",
    "precio": 16.50,
    "stock": 300,
    "categoria": "General",
    "creado_en": "2025-01-01T00:00:00.000Z"
  },
  {
    "id": 2,
    "nombre": "Yakult Original 65ml",
    "sku": "YKL-ORIG-65",
    "precio": 15.00,
    "stock": 500,
    "categoria": "Bebida probiótica",
    "creado_en": "2025-01-01T00:00:00.000Z"
  }
]
id
number
Unique numeric ID of the product.
nombre
string
Display name of the product.
sku
string
Unique stock-keeping unit identifier.
precio
number
Unit price in the local currency.
stock
number
Available units currently in inventory.
categoria
string
Product category label. Blank categories are returned as "General".
creado_en
string
ISO 8601 timestamp of when the product was added.

POST /api/productos

Adds a new product to the catalog. No authentication is required.
nombre
string
required
Display name of the product, e.g. "Yakult Original 65ml".
sku
string
required
Unique stock-keeping unit code, e.g. "YKL-ORIG-65".
precio
number
required
Unit sale price in the local currency.
stock
number
required
Initial inventory quantity.
categoria
string
Optional category label to group products. Defaults to "General" if omitted or left blank.
Example request
curl -X POST http://localhost:3000/api/productos \
  -H "Content-Type: application/json" \
  -d '{
    "nombre": "Yakult Original 65ml",
    "sku": "YKL-ORIG-65",
    "precio": 15.00,
    "stock": 500,
    "categoria": "Bebida probiótica"
  }'
Example response
{
  "id": 1,
  "nombre": "Yakult Original 65ml",
  "sku": "YKL-ORIG-65",
  "precio": 15.00,
  "stock": 500,
  "categoria": "Bebida probiótica"
}
id
number
Auto-generated ID assigned to the new product.
nombre
string
Product name as stored.
sku
string
SKU as stored.
precio
number
Unit price as stored.
stock
number
Initial stock as stored.
categoria
string
Category label as stored. Defaults to "General" when not provided.

PUT /api/productos/:id

Replaces all editable fields on an existing product. Supply all five fields — nombre, sku, precio, stock, and categoria. No authentication is required.
id
number
required
Numeric ID of the product to update.
nombre
string
required
Updated product name.
sku
string
required
Updated SKU.
precio
number
required
Updated unit price.
stock
number
required
Updated stock level. Use this to manually correct inventory discrepancies.
categoria
string
Updated category label. Defaults to "General" if omitted or left blank.
Example request
curl -X PUT http://localhost:3000/api/productos/1 \
  -H "Content-Type: application/json" \
  -d '{
    "nombre": "Yakult Original 65ml",
    "sku": "YKL-ORIG-65",
    "precio": 16.00,
    "stock": 480,
    "categoria": "Bebida probiótica"
  }'
Example response
{ "ok": true }

DELETE /api/productos/:id

Permanently removes a product from the catalog. This action cannot be undone. No authentication is required.
id
number
required
Numeric ID of the product to delete.
Example request
curl -X DELETE http://localhost:3000/api/productos/1
Example response
{ "ok": true }

Build docs developers (and LLMs) love