The Avanzar product catalog is built around a coreDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/ItsJhonAlex/Ecommerce/llms.txt
Use this file to discover all available pages before exploring further.
products table that stores identity, status, and stock. Pricing, images, and category memberships are each managed in dedicated satellite tables, keeping the core lean and making it straightforward to add a new currency or image without touching the product row itself. Every product exposes a URL-friendly slug that serves as its public identifier across storefront endpoints.
Product Fields
Theproducts table contains the following columns:
| Column | Type | Notes |
|---|---|---|
id | UUID | Primary key, generated by the database |
slug | text (unique) | URL-friendly identifier used in all public storefront endpoints |
name | text | Display name shown to customers |
description | text (nullable) | Full product description; may be null for draft products |
status | product_status | One of draft, active, or archived — see below |
stockQuantity | integer (default 0) | Current units available; decremented at checkout, restored on cancellation |
createdAt | timestamptz | Row creation timestamp |
updatedAt | timestamptz | Last modification timestamp |
Product Statuses
draft
The product is under construction and not visible in the public storefront. Use this state while filling in descriptions, uploading images, or setting prices.
active
The product is publicly visible and available for purchase. Only active products are returned by the storefront listing and detail endpoints.
archived
The product has been soft-deleted. It is hidden from the storefront and from the default admin listing. Archived products are never hard-deleted, preserving their data for historical order references.
Multi-Currency Pricing
Prices live in a separateproduct_prices table so that a single product can be sold in multiple currencies without duplicating the product row.
- Each product can have at most one price per currency, enforced by the unique constraint
product_prices_product_currency_uq. - Amounts are stored in minor units (cents, centavos) as integers — never floating-point — to avoid rounding errors.
- The currency field is a 3-character ISO 4217 string.
amountMinor: 2999, currency: "USD". CUP 1500.00 would be stored as amountMinor: 150000, currency: "CUP".
At checkout, the backend resolves the price for the requested currency server-side. If no price exists for the requested currency, checkout is rejected with error code PRICE_NOT_AVAILABLE.
Product Images
Images are stored in theproduct_images table with an explicit ordering position field:
| Column | Type | Notes |
|---|---|---|
id | UUID | Primary key |
productId | UUID | FK → products.id (CASCADE delete) |
url | text | Absolute URL to the hosted image asset |
alt | text (nullable) | Alternative text for accessibility |
position | integer (default 0) | Sort order; position 0 is the primary image |
position ASC. The primary (hero) image is always position: 0. When re-ordering images via the admin API, update the position values to reflect the desired sequence.
Categories
Categories are stored in thecategories table and linked to products through the product_categories many-to-many join table.
parentId. A category with parentId: null is a root category; any category with a non-null parentId is a subcategory. The public API returns a flat array of all categories — the client application is responsible for building the visual tree from parentId references.
Linking products to categories: Use POST /api/v1/admin/products/:id/categories with a body of { "categoryId": "<uuid>" } to associate an existing category with a product. Use DELETE /api/v1/admin/products/:id/categories/:categoryId to remove a link.