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/{slug}/ endpoint addresses a single product document by its unique slug. GET is open to the public and returns the complete product record including per-variant stock and all image URLs. PUT and DELETE are restricted to administrators (JWT must carry is_admin: true) and allow in-place edits or permanent removal.
GET /api/products/{slug}/
Retrieve all fields for a single product by its slug. Authentication: None (public)Path Parameters
The unique URL-safe slug that identifies the product. Slugs are assigned at creation time and never change.
Example:
urban-classic-teeResponse Fields
MongoDB ObjectId of the product, serialized as a string.
Display name of the product.
URL-safe unique identifier.
Long-form product description. May be an empty string if not set.
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.
Available sizes, e.g.
["S", "M", "L", "XL"].Available colors, e.g.
["negro", "blanco"].Cloudinary image URLs for the product.
Per-variant stock counts keyed by
"size|color". Example: {"M|negro": 5, "L|blanco": 3}.Example
PUT /api/products/{slug}/
Update one or more fields of an existing product. Only fields included in the request body are changed — this is a partial update. Authentication: Bearer token required. The JWT payload must containis_admin: true.
Path Parameters
The slug of the product to update.
Request Body
All fields are optional. Send only the fields you want to change. Field definitions match those used inPOST /api/products/.
New display name.
Updated product description.
New price with up to two decimal places.
Replacement category name.
Updated total stock count.
Replacement sizes list. This overwrites the entire existing array.
Replacement colors list. This overwrites the entire existing array.
Replacement variant-stock map. This overwrites the entire existing object.
Replacement Cloudinary image URL list.
Set to
false to hide the product from the public catalog without deleting it.Response
200 OK:Example — Updating stock_by_variant
DELETE /api/products/{slug}/
Permanently remove a product document from MongoDB. Authentication: Bearer token required. The JWT payload must containis_admin: true.
Path Parameters
The slug of the product to delete.