Products are the core of the Kantuta POS inventory system. Each product tracks its sale price, purchase cost, current stock, minimum stock threshold, and the category it belongs to. All routes require a valid Bearer Token JWT in theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Eleazarguitar18/kantuta_pos_front/llms.txt
Use this file to discover all available pages before exploring further.
Authorization header. The list endpoint returns only active products with the categoria object pre-loaded, so you have everything you need to display a full product listing without a second request.
The
stock_actual field is decremented automatically by the backend when a sale is created via POST /ventas. You should not manually subtract stock when recording a sale — only update stock_actual directly via PATCH /inventario/producto/:id for manual inventory adjustments such as corrections or writeoffs.Interface Reference
GET /inventario/producto
Returns all active products. Each item in the array includes the fullcategoria object, so you can display category information without additional requests.
Authentication: Required — Authorization: Bearer <access_token>
Response Fields
Unique identifier for the product.
Display name of the product.
Barcode string for the product, or
null if not assigned.Retail sale price. Must be
>= 0.Unit purchase cost. Must be
>= 0. Updated automatically when a purchase is recorded.Current units in stock. Decremented on each sale; incremented on each purchase.
Minimum stock threshold. Use this to trigger low-stock alerts in the UI.
Foreign key referencing the parent category.
The full category object associated with this product.
Active flag. Only
true records are returned by this endpoint.ISO 8601 creation timestamp.
ISO 8601 last-update timestamp.
POST /inventario/producto
Creates a new product in the inventory and returns the saved object with thecategoria relation populated.
Authentication: Required — Authorization: Bearer <access_token>
Request Body
Display name of the product.
Optional barcode string. Omit or pass
null if the product has no barcode.Retail sale price per unit. Must be
>= 0.Unit purchase cost. Must be
>= 0.Starting stock quantity. Must be
>= 0.Minimum stock level before a low-stock alert is triggered. Must be
>= 0.ID of an existing active category to associate with this product.
Response Fields
Auto-generated unique identifier.
Name of the newly created product.
The populated category object matching
id_categoria.Defaults to
true on creation.ISO 8601 creation timestamp.
GET /inventario/producto/:id
Fetches a single product by its numeric ID, including thecategoria relation.
Authentication: Required — Authorization: Bearer <access_token>
Path Parameters
The unique identifier of the product to retrieve.
Response Fields
Unique identifier of the product.
Display name of the product.
Barcode value or
null.Current retail price.
Current unit cost.
Units currently in stock.
Minimum stock threshold.
The full parent category object.
Active status of the product.
PATCH /inventario/producto/:id
Partially updates a product. All fields are optional — only the fields you include will be modified. Useful for correcting pricing, adjusting stock, or reassigning a category. Authentication: Required —Authorization: Bearer <access_token>
Path Parameters
The unique identifier of the product to update.
Request Body
Updated display name for the product.
Updated barcode string.
Updated retail price. Must be
>= 0.Updated unit purchase cost. Must be
>= 0.Manually override the current stock level. Must be
>= 0.Updated minimum stock threshold. Must be
>= 0.ID of the new category to assign to this product.
ID of the authenticated user performing this update. Used for audit tracking.
Response Fields
Unique identifier of the updated product.
Current name after the update.
Current sale price after the update.
Current stock level after the update.
ISO 8601 timestamp of this update.
DELETE /inventario/producto/:id
Deactivates a product by setting itsestado field to false. The record is not permanently removed from the database.
Authentication: Required — Authorization: Bearer <access_token>
This is a soft delete. The product record is kept in the database with
estado set to false. It will no longer appear in the GET /inventario/producto list, but existing sale and purchase records that reference this product are unaffected.Path Parameters
The unique identifier of the product to deactivate.