The Product resource represents an individual item sold across Ferreandina store branches. Each product document holds a human-readable name, a description, a unit price, weight, current stock quantity, and a nullable sell-out date for perishable or seasonal items. Products reference a category viaDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/tutosrive/ferreandina-nosql/llms.txt
Use this file to discover all available pages before exploring further.
category_id and embed a lightweight supplier object (_id + name) so supplier information is immediately available without a join. Product documents are also embedded inside Branch records to represent per-branch inventory. All CRUD operations are available at /api/products. A special category-filter query (GET /api/products/category/{categoryId}) is documented in Advanced Queries.
Document Schema
Unique integer identifier for the product.
Slug-style product name (e.g.,
"hammer", "copper_wire_12awg").Full plain-text description of the product.
Unit selling price (double precision).
Integer ID referencing the product’s category in the Categories collection.
Total units in stock across all branches.
Weight per unit in kilograms (float).
Date string indicating when this product is expected to sell out.
null if not applicable.The field name
sould_out_date is a source-level typo for “sold out date”. It is preserved exactly as-is in ProductModel.java and the MongoDB collection for backward compatibility.Embedded summary of the supplier that provides this product.
URL of the product image.
Endpoints
GET /api/products
Returns an array of all product documents.GET /api/products/{id}
Returns a single product by its integer_id.
POST /api/products
Creates a new product document. Request BodyUnique integer ID for the new product.
Slug-style product name.
Full product description.
Unit price (double).
ID of the product’s category.
Units available in stock.
Weight per unit in kg (float).
Expected sell-out date string, or
null.Embedded supplier summary with
_id (integer) and name (string).URL of the product image.
PATCH /api/products/{id}
Partially updates a product. Include only the fields to change. Request BodyUpdated product name.
Updated description.
Updated unit price.
Updated category reference.
Updated stock quantity.
Updated unit weight.
Updated sell-out date or
null.Updated embedded supplier object.
Updated image URL.
DELETE /api/products/{id}
Deletes the product with the given integer_id.