Skip to main content

Documentation 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.

These public endpoints power the storefront homepage and product detail pages. No authentication is required for any of them — all responses are aggressively cached so that high-traffic storefronts can serve hundreds of concurrent visitors without hitting the database on every request. The home feed is cached hourly, the menu is cached daily, and individual product pages are cached per slug (with an optional discount campaign code as part of the cache key).

GET /api/ecommerce/home

Returns the full storefront feed including sliders, flash discounts, random categories, and multiple curated product sections. No authentication required. Cache key: home_response_{Y-m-d_H} (refreshed once per hour, 1-month TTL).
curl --request GET \
  --url https://your-domain.com/api/ecommerce/home

Response

{
  "discount_flash": { "...": "..." },
  "discount_flash_products": [ "..." ],
  "sliders_principal": [ "..." ],
  "sliders_secundario": [ "..." ],
  "sliders_products": [ "..." ],
  "categories_randoms": [ "..." ],
  "product_trending_new": [ "..." ],
  "product_trending_featured": [ "..." ],
  "product_trending_top_sellers": [ "..." ],
  "product_last_discounts": [ "..." ],
  "product_last_featured": [ "..." ],
  "product_last_selling": [ "..." ],
  "product_electronics": [ "..." ],
  "product_carusel": [ "..." ],
  "home_views": [ "..." ]
}
FieldDescription
discount_flashActive flash discount campaign object (type_campaing=2), or null if none is running. Includes end_date_format formatted as "Mon DD YYYY HH:mm:ss".
discount_flash_productsArray of product resources eligible for the flash discount (by direct product, category, or brand).
sliders_principalHero/banner sliders (type_slider=1), ordered by id descending.
sliders_secundarioSecondary sliders (type_slider=2), ordered by id ascending.
sliders_productsProduct-highlight sliders (type_slider=3), ordered by id ascending.
categories_randoms5 randomly selected top-level categories with product counts.
product_trending_new8 random published products for the “New Arrivals” section.
product_trending_featured8 random published products for the “Featured” section.
product_trending_top_sellers8 random published products for the “Top Sellers” section.
product_last_discounts3 random published products for the “Last Discounts” section.
product_last_featured3 random published products for the “Last Featured” section.
product_last_selling3 random published products for the “Last Selling” section.
product_electronicsUp to 6 products from categorie_first_id = 1.
product_caruselAll published products from the 5 random categories, used as a carousel.
home_viewsArray of feature-flag objects controlling frontend section visibility (e.g., vista_mantenimiento).

Slider object shape

Each entry in sliders_principal, sliders_secundario, and sliders_products conforms to the following structure:
{
  "id": 1,
  "title": "Summer Sale",
  "subtitle": "Up to 50% off",
  "label": "Shop Now",
  "imagen": "https://objectstorage.example.com/ecommerce/sliders/banner1.webp",
  "link": "/sale",
  "state": 1,
  "color": "#FF5733",
  "type_slider": 1,
  "price_original": 199900,
  "price_campaing": 99900,
  "type_width": "full"
}
id
integer
Unique slider ID.
title
string
Main heading text displayed on the slide.
subtitle
string
Supporting text below the title.
label
string
Call-to-action button label.
imagen
string (URL)
Absolute URL to the slider image stored in OCI Object Storage. null if no image is set.
Relative or absolute URL the slider links to.
state
integer
Visibility flag. 1 = active.
color
string
Hex color code used for overlay or text contrast.
type_slider
integer
1 = principal, 2 = secondary, 3 = product highlight.
price_original
number
Original price shown on the slide (for product-highlight sliders).
price_campaing
number
Campaign/discounted price shown on the slide.
type_width
string
Layout width hint ("full", "half", etc.). May be null.

Category object shape

Each entry in categories_randoms conforms to:
{
  "id": 3,
  "name": "Electronics",
  "product_categorie_firsts_count": 42,
  "imagen": "https://objectstorage.example.com/ecommerce/categories/electronics.webp"
}
id
integer
Category ID.
name
string
Display name of the category.
product_categorie_firsts_count
integer
Number of published products in this top-level category.
imagen
string (URL)
Absolute URL to the category image. null if not set.

GET /api/ecommerce/menu

Returns the three-level category hierarchy used to render the storefront navigation menu. No authentication required. Cache key: menu_response_{Y-m-d} (refreshed once per day, 24-hour TTL).
curl --request GET \
  --url https://your-domain.com/api/ecommerce/menu

Response

{
  "categories_menus": [
    {
      "id": 1,
      "name": "Technology",
      "icon": "laptop",
      "categories": [
        {
          "id": 10,
          "name": "Computers",
          "imagen": "https://objectstorage.example.com/ecommerce/categories/computers.webp",
          "subcategories": [
            {
              "id": 100,
              "name": "Laptops",
              "imagen": "https://objectstorage.example.com/ecommerce/categories/laptops.webp"
            }
          ]
        }
      ]
    }
  ]
}
The menu is a three-level hierarchy:
  1. Department (top-level) — has id, name, and icon.
  2. Category (second-level) — has id, name, and imagen.
  3. Subcategory (third-level) — has id, name, and imagen.
Departments are ordered by their position field descending. Only categories with state=1 are included.

GET /api/ecommerce/product/

Returns the full product detail page data for a single published product identified by its URL slug. No authentication required. Cache key: product_{slug}_{campaing_discount_code} (1-month TTL). The cache key includes the optional campaign code so that discounted and non-discounted views are cached independently.

Path parameters

ParameterTypeDescription
slugstringThe URL-friendly product identifier, e.g. wireless-headphones-pro.

Query parameters

ParameterTypeDescription
campaing_discountstring (optional)Discount campaign code to check. If provided and a matching active discount exists for the product (by product, category, or brand), it is returned in discount_campaing.
curl --request GET \
  --url "https://your-domain.com/api/ecommerce/product/wireless-headphones-pro?campaing_discount=FLASH20"

Response

{
  "message": 200,
  "product": { "...": "..." },
  "product_relateds": [ "..." ],
  "discount_campaing": null,
  "reviews": [
    {
      "id": 5,
      "user": {
        "full_name": "María García",
        "avatar": "https://objectstorage.example.com/ecommerce/avatars/user5.webp"
      },
      "message": "Excellent sound quality, very comfortable.",
      "rating": 5,
      "created_at": "2024-05-10 09:30 AM"
    }
  ],
  "rating_distribution": {
    "5": 60.00,
    "4": 25.00,
    "3": 10.00,
    "2": 5.00,
    "1": 0.00
  }
}
message
integer
200 on success. Returns 403 with message_text: "Producto no encontrado" if the slug does not match a published product.
product
object
Full product resource. See the Products reference for all fields.
product_relateds
array
Up to 8 published products from the same top-level category, excluding the current product.
discount_campaing
object | null
The active discount object matching the campaing_discount query param, or null if no code was supplied or no matching discount was found.
reviews
array
All reviews for the product, ordered newest first. Each review contains:
  • id — review ID
  • user.full_name — reviewer’s full name
  • user.avatar — reviewer’s avatar URL (falls back to a default icon)
  • message — review text
  • rating — integer 1–5
  • created_at — formatted as "YYYY-MM-DD hh:mm AM/PM"
rating_distribution
object
Keys "1" through "5", each holding the percentage (0–100, rounded to 2 decimal places) of reviews at that star level. All values are 0.00 when no reviews exist.

GET /api/ecommerce/config-filter-advance

Returns the configuration data needed to render the advanced product filter panel: all active top-level categories, all active brands, all color properties, and 4 random related products. No authentication required. Not cached.
curl --request GET \
  --url https://your-domain.com/api/ecommerce/config-filter-advance

Response

{
  "categories": [
    { "id": 1, "name": "Electronics", "products_count": 42, "imagen": "https://..." }
  ],
  "brands": [
    { "id": 3, "name": "Sony", "products_count": 18 }
  ],
  "colors": [
    { "id": 7, "name": "Black", "code": "#000000", "products_count": 25 }
  ],
  "product_relateds": [ "..." ]
}
categories
array
Active top-level categories (state=1, no parent) with products_count derived from product_categorie_firsts relationship.
brands
array
Active brands with products_count.
colors
array
Propertie objects that have a non-null code (hex color value). Each entry includes a computed products_count — the number of unique products that use this property in a variation.
product_relateds
array
4 random published products.

POST /api/ecommerce/filter-advance-product

Returns all active published products ordered by newest first. Intended to back the advanced filter/search page on the storefront. No authentication required. Not cached.
curl --request POST \
  --url https://your-domain.com/api/ecommerce/filter-advance-product

Response

{
  "productos": [ "..." ]
}
productos
array
All products with state=2, ordered by id descending. Each item is a full ProductEcommerceResource object. See the Products reference for the full field list.

Build docs developers (and LLMs) love