Documentation 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.
The Category resource organizes Ferreandina’s product catalog into logical groupings such as hand tools, electrical, fasteners, and paints. Every product document holds a category_id that references one of these categories. Category documents are intentionally lean — just an ID, a name slug, a description, and a cover image URL. The full catalog ships with 19 predefined categories, but they can be created, updated, and removed through the standard CRUD endpoints at /api/categories.
Document Schema
Unique integer identifier for the category.
Slug-style category name (e.g., "hand-tools", "electrical").
Human-readable description of what the category contains.
URL of the category cover image.
Endpoints
GET /api/categories
Returns an array of all category documents.
curl http://localhost:7070/api/categories
[
{
"_id": 1,
"name": "construction-materials",
"description": "Basic materials for construction and renovation projects such as cement, sand, bricks, blocks, mixes, plaster, mortars and complementary supplies",
"image": "https://cdn.jsdelivr.net/gh/tutosrive/images-projects-srm-trg@main/others/ferreandina-nosql/categories/adhesives-and-sealants.webp"
},
{
"_id": 2,
"name": "pvc",
"description": "PVC products such as pipes, fittings, elbows, joints, valves and accessories for water, drainage and other systems",
"image": "https://cdn.jsdelivr.net/gh/tutosrive/images-projects-srm-trg@main/others/ferreandina-nosql/categories/pvc.webp"
}
]
GET /api/categories/{id}
Returns a single category by its integer _id.
curl http://localhost:7070/api/categories/11
{
"_id": 11,
"name": "hand-tools",
"description": "Tools for mechanical, assembly and repair tasks without electricity, such as hammers, screwdrivers, wrenches, pliers and other manual tools",
"image": "https://cdn.jsdelivr.net/gh/tutosrive/images-projects-srm-trg@main/others/ferreandina-nosql/categories/hand-tools.webp"
}
POST /api/categories
Creates a new category document.
Request Body
Unique integer ID for the new category.
Slug-style category name.
Human-readable description of the category.
URL of the category cover image.
curl -X POST http://localhost:7070/api/categories \
-H "Content-Type: application/json" \
-d '{
"_id": 20,
"name": "welding-equipment",
"description": "Welding machines, electrodes, protective gear and accessories for metal joining and repair.",
"image": "https://example.com/welding.webp"
}'
PATCH /api/categories/{id}
Partially updates a category. Include only the fields to change.
Request Body
curl -X PATCH http://localhost:7070/api/categories/20 \
-H "Content-Type: application/json" \
-d '{ "description": "Industrial and hobbyist welding machines, rods, helmets and related consumables." }'
DELETE /api/categories/{id}
Deletes the category with the given integer _id.
curl -X DELETE http://localhost:7070/api/categories/20
Example Document
{
"_id": 5,
"name": "electrical",
"description": "Electrical installation products such as cables, plugs, switches, outlets, breakers, conduits, light bulbs and electrical accessories",
"image": "https://cdn.jsdelivr.net/gh/tutosrive/images-projects-srm-trg@main/others/ferreandina-nosql/categories/electrical.webp"
}
The seed data ships with 19 categories in total, ranging from construction-materials (_id: 1) to pipes-and-curtain-accessories (_id: 19). Some examples:
_id | name |
|---|
| 1 | construction-materials |
| 5 | electrical |
| 10 | power-tools |
| 11 | hand-tools |
| 15 | adhesives-and-sealants |
| 18 | fasteners |
| 19 | pipes-and-curtain-accessories |