TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/ALEJ4NDRO2025/urban-store/llms.txt
Use this file to discover all available pages before exploring further.
/api/products/ endpoint serves as the primary entry point to the product catalog. GET requests are fully public and return all active products stored in MongoDB, with optional query-string filters to narrow results. POST requests create a new product document and are restricted to administrators whose JWT payload carries is_admin: true.
GET /api/products/
Retrieve a list of all active products. No authentication is required. Filters can be combined freely; omitting all filters returns the full catalog. Authentication: None (public)Query Parameters
Filter products by category name. The comparison is exact (case-sensitive).
Example:
streetwearReturn only products whose price is greater than or equal to this value.
Example:
29.99Return only products whose price is less than or equal to this value.
Example:
99.99Filter products that include this size in their
sizes array. Matches a single size string exactly.
Example: MResponse Fields
Each object in the returned array contains:MongoDB ObjectId of the product, serialized as a string.
Display name of the product.
URL-safe unique identifier used in detail, update, and delete endpoints.
Product price as a decimal string with two decimal places (e.g.
"49.99").Category the product belongs to.
Total aggregate stock count across all variants.
List of available sizes, e.g.
["S", "M", "L", "XL"].List of available colors, e.g.
["negro", "blanco"].Cloudinary URLs for the product’s images.
Per-variant stock counts keyed by
"size|color". Example: {"M|negro": 5, "L|blanco": 3}.Examples
Fetch all active products:POST /api/products/
Create a new product document in MongoDB. Only administrators are authorized. Authentication: Bearer token required. The JWT payload must containis_admin: true.
Request Body
Display name of the product. Maximum 200 characters.
URL-safe unique identifier for the product. Must be unique across the entire catalog.
Example:
"urban-classic-tee"Optional long-form product description.
Product price. Stored with two decimal places of precision.
Example:
49.99Category name the product belongs to.
Example:
"streetwear"Total aggregate stock count. Defaults to
0.Available sizes. Example:
["S", "M", "L", "XL"]Available colors. Example:
["negro", "blanco"]Per-variant stock keyed by
"size|color". Example: {"M|negro": 5, "L|blanco": 3}Cloudinary URLs for the product’s images.
Whether the product appears in the public catalog. Defaults to
true.