The products API gives you full control over the Don Mamino product catalog. Products can represent customer-facing items (Documentation Index
Fetch the complete documentation index at: https://mintlify.com/luisllatas-dev/Proyecto_Pasteleria_DonMamino/llms.txt
Use this file to discover all available pages before exploring further.
vendible) or internal ingredients and supplies (insumo). Each product belongs to a specific sede (location). GET endpoints are open to the public; write operations require a valid JWT Bearer token.
GET /api/productos
Retrieve a list of all products across all sedes. Auth required: NoResponse fields
Returns an array of product objects.Unique identifier of the product.
Name of the product.
Full description of the product.
Unit price of the product (decimal with two decimal places).
Current available quantity in inventory.
URL pointing to the product’s image.
Availability status. One of
activo or inactivo.Product category. One of
vendible (sold to customers) or insumo (internal ingredient/supply).ID of the sede this product belongs to.
Example
curl
GET /api/productos/:id
Retrieve a single product by its ID. Auth required: NoPath parameters
The
id_producto of the product to retrieve.Response fields
Returns a single product object with the same fields as the list endpoint above.Example
curl
Error responses
| Status | Description |
|---|---|
404 | No product found with the given ID. Response body: { "message": "Producto no encontrado" } |
500 | Internal server error. |
POST /api/productos
Create a new product. Auth required: YesRequest body
Name of the product.
Description of the product.
Unit price. Must be a decimal value (e.g.,
12.50).Initial inventory quantity. Defaults to
0 if omitted.URL of the product image.
Availability status. Accepted values:
activo, inactivo. Defaults to activo.Product type. Accepted values:
vendible, insumo. Defaults to vendible.ID of the sede this product belongs to.
Response fields
The auto-generated
id_producto of the newly created product.Confirmation message. Returns
"Producto creado exitosamente".Example
curl
PUT /api/productos/:id
Update an existing product by its ID. Auth required: YesPath parameters
The
id_producto of the product to update.Request body
All fields are accepted. Provide the full updated product object — all columns are overwritten.Updated name of the product.
Updated description.
Updated unit price.
Updated inventory quantity.
Updated image URL.
Updated status. One of
activo or inactivo.Updated product type. One of
vendible or insumo.Updated sede assignment.
Response fields
Confirmation message. Returns
"Producto actualizado exitosamente".Example
curl
Error responses
| Status | Description |
|---|---|
404 | No product found with the given ID. |
500 | Internal server error. |
DELETE /api/productos/:id
Delete a product by its ID. This action is permanent. Auth required: YesPath parameters
The
id_producto of the product to delete.Response fields
Confirmation message. Returns
"Producto eliminado exitosamente".Example
curl
Error responses
| Status | Description |
|---|---|
404 | No product found with the given ID. Response body: { "message": "Producto no encontrado" } |
500 | Internal server error. |