All endpoints underDocumentation 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.
/api/admin/ require an admin JWT obtained via POST /api/auth/login with a user account where type_user=1. Products are the core resource in API Ecommerce — each product carries a cover image (portada/imagen), a gallery of additional images, associations to categories (up to three levels), a brand, variations, and specifications.
Mutating operations —
store, update, destroy, and delete_imagen — are throttled at 10 requests per minute per token. Exceeding this limit returns HTTP 429.Authentication
Obtain an admin token before calling any admin endpoint:Authorization: Bearer <admin_token> on every admin request.
List / Search Products
Filtering is handled via a dedicatedPOST endpoint so that multiple filter parameters can be sent in a JSON body rather than as query-string values.
| Header | Value |
|---|---|
| Authorization | Bearer <admin_token> |
| Content-Type | application/json |
Full-text search on the product
title column (SQL LIKE %value%).Filter by first-level (top-level / department) category ID.
Filter by second-level category ID.
Filter by third-level (subcategory) ID.
Filter by brand ID.
id ascending.
Total number of products matching the filters (across all pages).
Paginated product collection. Items live under the
data key (Laravel ResourceCollection envelope).Array of product objects for the current page. Each object includes resolved
brand, categorie_first, categorie_second, categorie_third nested objects, a tags array decoded from JSON, an images gallery array, and timestamps.Get Config Data (Dropdowns)
Returns the data needed to populate category and brand dropdowns in an admin UI.| Header | Value |
|---|---|
| Authorization | Bearer <admin_token> |
Active first-level categories (
state = 1, categorie_second_id = NULL, categorie_third_id = NULL).Active second-level categories (
state = 1, categorie_second_id != NULL, categorie_third_id = NULL).Active third-level categories (
state = 1, both categorie_second_id and categorie_third_id set).Active brands (
state = 1).Get Product
The product ID.
Full product resource (via
ProductResource) including resolved brand, categorie_first, categorie_second, categorie_third nested objects, a decoded tags array, and a gallery images array. Variations and specifications are fetched via separate endpoints.Create Product
| Header | Value |
|---|---|
| Authorization | Bearer <admin_token> |
| Content-Type | multipart/form-data |
Product title. Must be unique across all products. The
slug is auto-generated from this value using Str::slug() — do not supply a slug manually.Cover image file (JPEG/PNG). Uploaded to Oracle Cloud Infrastructure (OCI) Object Storage under
juandevops/ecommerce/public/products/. The OCI storage path is saved in the imagen column.Tags array (sent as a multi-value field, e.g.,
multiselect[]=running&multiselect[]=sport). Internally mapped to the tags column as a JSON-encoded string.Stock-keeping unit identifier (optional free-text field).
Price in Colombian Pesos (COP).
Price in US Dollars (USD).
Short summary / meta description shown in product cards.
Full rich-text / HTML product description.
Publication state.
1 = draft, 2 = published.Foreign key to the
brands table.Top-level category ID.
Optional second-level category ID.
Optional third-level category ID.
Total available stock units.
200 on success, 403 if a duplicate title is detected.The newly created product’s ID. Use this to attach images and variations.
Update Product
UsesPOST (not PUT/PATCH) because the request may include a multipart file upload.
The product ID to update.
portada file is provided, the existing cover image is deleted from OCI before the new file is stored. The slug is always regenerated from title on every update.
Response
Delete Product
Product model uses the SoftDeletes trait, so the row is retained with a deleted_at timestamp.
Path parameters
The product ID to delete.
Add Gallery Image
The
imagens (gallery upload) action is not in the throttle list. Only store, update, destroy, and delete_imagen are throttled at 10 req/min.| Header | Value |
|---|---|
| Authorization | Bearer <admin_token> |
| Content-Type | multipart/form-data |
The ID of the product to attach this image to.
Image file to upload to OCI Object Storage under
juandevops/ecommerce/public/products/.The newly created
ProductImage record.Gallery image record ID (use this to delete the image later).
Public URL of the uploaded image on OCI Object Storage.
Delete Gallery Image
ProductImage record.
Path parameters
The gallery image record ID (returned by Add Gallery Image).
Product Specifications
Product specifications are key-value descriptors (e.g., Weight: 200g, Material: Leather) managed via the specifications sub-resource. The full CRUD surface is available at:attributes and properties tables used by variations. See Variations & Attributes for how to manage those lookup tables. Duplicate attribute + property (or attribute + value_add) combinations on the same product are rejected with {"message": 403, "message_text": "Ya existe una especificación con estos datos"}.