The Balsamoa Backend implements a soft-delete pattern through theDocumentation 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.
activo boolean column on the productos table. Rather than permanently removing a product, you can toggle its visibility with two dedicated PATCH endpoints. This approach preserves all historical sales records, variant data, and images while hiding the product from shoppers. It is the recommended way to remove a product from the storefront when it has existing orders, when you want to bring it back in the future, or when you simply need to take it temporarily offline.
PATCH /api/v1/admin/productos/:id/activar
Setsactivo = true on the product row, making it visible again in the public store. This is the reverse of deactivation and can be called any number of times.
Request
Method:PATCHPath:
/api/v1/admin/productos/:id/activarRequest body: none
The numeric ID of the product to activate.
Response — 200 Success
Confirmation that the product was re-activated.
Array containing the updated raw product row returned by
UPDATE … RETURNING *. The activo field will be true.PATCH /api/v1/admin/productos/:id/desactivar
Setsactivo = false on the product row, immediately hiding it from all public store endpoints. The product remains fully accessible through admin endpoints and all its data — images, variants, and order history — is preserved.
Request
Method:PATCHPath:
/api/v1/admin/productos/:id/desactivarRequest body: none
The numeric ID of the product to deactivate.
Response — 200 Success
Confirmation that the product was deactivated (soft-deleted).
Array containing the updated raw product row returned by
UPDATE … RETURNING *. The activo field will be false.Error Cases
Both endpoints share the same error behavior.| Status | Condition | Response body |
|---|---|---|
400 | id path parameter is not a valid number | {"mensaje": "El ID del producto debe ser un número válido"} |
404 | No product exists with the given id | {"mensaje": "Producto no encontrado"} |
500 | Unexpected database or server error | {"mensaje": "Error al activar el producto"} or {"mensaje": "Error al desactivar el producto"} |