Skip to main content

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

_id
integer
required
Unique integer identifier for the category.
name
string
required
Slug-style category name (e.g., "hand-tools", "electrical").
description
string
required
Human-readable description of what the category contains.
image
string
required
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
_id
integer
required
Unique integer ID for the new category.
name
string
required
Slug-style category name.
description
string
required
Human-readable description of the category.
image
string
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"
  }'
{ "insertedId": 20 }

PATCH /api/categories/{id}

Partially updates a category. Include only the fields to change. Request Body
name
string
Updated category name.
description
string
Updated description.
image
string
Updated cover image URL.
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." }'
{ "modifiedCount": 1 }

DELETE /api/categories/{id}

Deletes the category with the given integer _id.
curl -X DELETE http://localhost:7070/api/categories/20
{ "deletedCount": 1 }

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:
_idname
1construction-materials
5electrical
10power-tools
11hand-tools
15adhesives-and-sealants
18fasteners
19pipes-and-curtain-accessories

Build docs developers (and LLMs) love