The Supply resource records individual product delivery events from suppliers to Ferreandina. Each supply document embeds a lightweight supplier reference and an array of products included in the shipment — each product item carrying its ID, name, and quantity received. The document also tracks the number of defective units found in the delivery and the entry date. All CRUD operations are available atDocumentation 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.
/api/supplies. A special defective-report aggregation query (GET /api/supplies/defective-report) is documented in Advanced Queries.
The field
defective_quanity contains a source-level typo — the letter t is missing from “quantity”. This spelling is present in SupplieModel.java and the MongoDB collection, and must be used exactly as-is when reading or writing this field.The Java model class is
SupplieModel (not SupplyModel) and its internal field for the supplier is named suplier (missing the second p). However, the wire-format JSON key in the database seed is "supplier". Use "supplier" in all API requests and responses.Document Schema
Unique integer identifier for the supply record.
Embedded summary of the supplier who made the delivery.
Array of products included in this supply delivery.
Number of units found to be defective in this delivery.
Note the intentional source typo in the field name:
defective_quanity (missing the t in “quantity”). Use this exact spelling in all requests and queries.Date the delivery was received, stored as a string (e.g.,
"12/08/2026").Endpoints
GET /api/supplies
Returns an array of all supply records.GET /api/supplies/{id}
Returns a single supply record by its integer_id.
POST /api/supplies
Creates a new supply record. Request BodyUnique integer ID for the new supply record.
Embedded supplier summary with
_id (integer) and name (string).Array of delivered products. Each item needs
_id (integer), name (string), and quantity (integer).Number of defective units received. (Note the typo — this is the exact field name.)
Delivery date string (e.g.,
"15/09/2026").PATCH /api/supplies/{id}
Partially updates a supply record. Include only the fields to change. Request BodyUpdated embedded supplier object.
Updated product delivery array.
Updated defective unit count.
Updated entry date string.
DELETE /api/supplies/{id}
Deletes the supply record with the given integer_id.