The storefront exposes products via slug-based URLs. Every product detail response is assembled from theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/JuanSCaicedo/Api-Ecommerce/llms.txt
Use this file to discover all available pages before exploring further.
ProductEcommerceResource — a rich JSON object that includes pricing, categorization, variation trees, discount resolution, specifications, and review aggregates. Responses are cached per slug (with a 1-month TTL) so product pages load instantly even under heavy traffic. The cache is automatically flushed whenever a review is created or updated, or an order is placed.
For endpoint routing and request/response documentation, see Home & Discovery. This page documents the shape of the product resource returned by that endpoint and by cart, checkout, and filter responses across the API.
Product Resource Fields
Every product object in the API conforms to theProductEcommerceResource structure defined in app/Http/Resources/Ecommerce/Product/ProductEcommerceResource.php.
Primary key of the product.
Display name of the product, e.g.
"Wireless Headphones Pro".URL-safe identifier used in storefront routes, e.g.
"wireless-headphones-pro".Stock-keeping unit code. Used internally for inventory management.
Price in Colombian Pesos (COP). This is the field name in the full
ProductEcommerceResource. Note: the embedded product summary inside cart items uses price_pen instead (as returned by CartEcommerceResource).Price in US Dollars (USD).
Short summary / excerpt shown in product cards and listing pages.
Absolute URL of the primary product image stored in OCI Object Storage.
null if no image has been uploaded.Publication state.
1 = draft (not visible on storefront), 2 = published (visible). Only products with state=2 are returned by storefront endpoints.Full HTML or plain-text description of the product.
Raw parsed JSON tags array. Each element is an object as stored by the tag input widget.
Flattened list of tag text strings, e.g.
["wireless", "bluetooth", "audio"]. Prefer this over tags for display.Foreign key to the brand.
Embedded brand object:
{ "id": 3, "name": "Sony" }. null if no brand is assigned.Foreign key to the top-level (department) category.
Embedded top-level category:
{ "id": 1, "name": "Electronics" }.Foreign key to the second-level category.
Embedded second-level category:
{ "id": 10, "name": "Computers" }.Foreign key to the third-level (subcategory).
Embedded subcategory:
{ "id": 100, "name": "Laptops" }.Total stock available for the base product (without variations). For variation-based products, per-variation stock is tracked separately inside the
variations array.Creation timestamp formatted as
"YYYY-MM-DD HH:mm:ss".Additional product gallery images. Each element:
{ "id": 12, "imagen": "https://..." }.The best resolved discount for this product. Resolution priority: (1) active flash discount campaign (
type_campaing=2), (2) highest-value regular discount among product-level, category-level, and brand-level discounts. null if no active discount applies.type_discount:1= percentage off,2= fixed amount off.type_campaing:1= regular,2= flash sale.
Average star rating across all reviews, rounded to 2 decimal places.
0 when no reviews exist.Total number of reviews for this product.
Grouped variation tree. See the Variations section below.
Technical specifications. See the Specifications section below.
Variations Object
Variations are grouped by attribute (e.g. “Color”, “Size”) and support one level of nesting (sub-variations). Thevariations array on a product resource contains one element per distinct attribute group.
The attribute this group belongs to (e.g. the ID for “Color”).
Human-readable attribute name, e.g.
"Color", "Size", "Storage".Rendering hint:
"color" (render as color swatch), "text" (render as text button), "imagen" (render as image swatch).Unique variation ID used as
product_variation_id when adding to the cart.The specific property value:
{ "name": "Black", "code": "#000000" }. code is a hex color for color-type attributes, null otherwise.Optional free-text extra value for the variation (e.g. a custom label).
Price surcharge added on top of the base product price for this variation.
Units available for this specific variation.
1 = active, 0 = inactive.Summary of the child attribute group (present when this variation has sub-variations). Contains
attribute_id and attribute.Child variations (anidado / nested). Each element has the same structure as a top-level variation item (
id, attribute_id, attribute, propertie_id, propertie, value_add, add_price, stock, state). Empty array when there are no sub-variations.Specifications Object
Discount Resolution Logic
Thediscount_g field is resolved in this order of priority:
- Flash discount (
type_campaing=2): If any active flash campaign applies to the product (directly, via its category, or via its brand), it takes precedence over all other discounts. - Regular discounts: The highest-value discount among three sources is selected:
discount_product— discount targeting this product directlydiscount_categorie— discount targeting the product’s top-level categorydiscount_brand— discount targeting the product’s brand
null.
Full Example Product JSON
Only products with
state=2 are returned by any storefront endpoint. Products in state=1 (draft) are invisible to customers and will not appear in listings, search results, or direct slug lookups.