Urban Store’s product catalog is stored in a MongoDBDocumentation 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.
products collection and managed entirely through the /api/products/ REST API. All write operations — create, update, and delete — are restricted to admin users via the IsAdminMongo permission class. Read operations (browsing and filtering the catalog) are public. Each product supports granular per-variant inventory tracking through a stock_by_variant dictionary, and images are stored as Cloudinary URLs.
Product Schema
TheProduct MongoEngine document exposes the following fields:
| Field | Type | Required | Description |
|---|---|---|---|
name | String (max 200) | Yes | Display name of the product |
slug | String (unique) | Yes | URL-safe identifier used in all API paths |
description | String | No | Long-form product description |
price | Decimal (2 places) | Yes | Unit price |
category | String | Yes | Product category, e.g. camisetas, accesorios |
stock | Integer | No | General stock fallback (default 0) |
sizes | List[String] | No | Available sizes, e.g. ["S", "M", "L", "XL"] |
colors | List[String] | No | Available colors, e.g. ["negro", "blanco", "rojo"] |
stock_by_variant | Dict | No | Per-variant inventory map (see below) |
images | List[URL] | No | Cloudinary secure URLs |
is_active | Boolean | No | true = visible in public catalog (default true) |
created_at | DateTime | — | Set automatically on creation |
Per-Variant Stock Format
Thestock_by_variant dictionary maps composite keys in the format "<size>|<color>" to integer quantities. This lets you track inventory for each exact combination independently:
0 means the variant is sold out. The key uses a pipe character | as the separator between size and color.
Creating a Product
201 Created:
Editing a Product
Partial updates are fully supported — send only the fields you want to change.Deleting a Product
Soft Deactivation
To hide a product from the public catalog without permanently deleting it, setis_active to false:
GET /api/products/ endpoint filters to is_active=true only, so deactivated products disappear from the storefront immediately. They can be re-activated at any time by setting is_active back to true.
Image Management
Product images are stored as Cloudinary secure URLs inside theimages list on each product document. Urban Store does not upload images directly — you upload your assets to Cloudinary first and then reference the resulting URLs.
Upload to Cloudinary
Log in to your Cloudinary dashboard and upload the product image via the Media Library or the Cloudinary Upload widget. Copy the Secure URL (
https://res.cloudinary.com/...).Admin Permission
Write access to the product endpoints is enforced by theIsAdminMongo permission class defined in products/views.py. It manually decodes the JWT from the Authorization header and checks the is_admin field in the payload:
403 Forbidden.