The products (productos) API manages the catalog of items — drinks, snacks, and anything else sold at the tables — that staff can record as consumptions during an active session. Each product carries a price and an availability flag so that seasonal or out-of-stock items can be hidden from the point-of-sale without permanently removing their history from past consumption records.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/ierinconc/billar-pro-backend/llms.txt
Use this file to discover all available pages before exploring further.
Endpoints
GET /api/productos
Returns the complete product catalog, both available and unavailable items. Authentication: Required — include a valid JWT Bearer token. Response:200 OK — array of Producto objects.
Auto-generated primary key.
Display name of the product, e.g.
"Gaseosa".Free-text category label, e.g.
"Bebidas" or "Snacks".Unit price in local currency.
true if the product is currently available for sale; false hides it from active menus while preserving historical data.Request example
GET /api/productos/{id}
Returns a single product by its primary key. Authentication: Required — include a valid JWT Bearer token. Path parameters:Primary key of the product to retrieve.
200 OK — Producto object.
Errors:
| Status | Meaning |
|---|---|
404 | No product with that id exists. |
Request example
POST /api/productos
Creates a new product in the catalog. Authentication: Required — include a valid JWT Bearer token. Request body (JSON):Display name for the product. Must not be blank.
Category label for grouping on the menu, e.g.
"Bebidas", "Snacks", "Licores".Unit price in local currency. Must be a positive number.
Pass
true to make the product immediately available for consumptions; false to add it in a hidden state.201 Created — the newly created Producto object including its generated id.
Request example
Response example
PUT /api/productos/{id}
Replaces all fields of an existing product. All four body fields must be supplied — this is a full replacement, not a partial update. Authentication: Required — include a valid JWT Bearer token. Path parameters:Primary key of the product to update.
New display name.
New category label.
New unit price. Changing the price does not retroactively affect closed-session subtotals, which were computed at registration time.
Updated availability flag.
200 OK — the updated Producto object.
Errors:
| Status | Meaning |
|---|---|
404 | No product with that id exists. |
Request example
DELETE /api/productos/{id}
Permanently removes a product from the catalog. Authentication: Required — include a valid JWT Bearer token. Path parameters:Primary key of the product to delete.
204 No Content — empty body on success.
Errors:
| Status | Meaning |
|---|---|
404 | No product with that id exists. |