API Ecommerce is a production-ready REST API built with Laravel 10 that provides everything you need to power a full-featured online store. It handles customer registration and JWT-based authentication (viaDocumentation 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.
tymon/jwt-auth), a product catalog with categories, brands, attributes, and variations, a shopping cart with coupon support, checkout with MercadoPago payment integration, and a complete admin panel for managing inventory and promotions. Static assets and product images are stored in OCI Object Storage, while all relational data lives in MySQL 8.0. Two distinct user roles — admins (type_user=1) and customers (type_user=2) — are enforced at the authentication layer, keeping storefront and management concerns cleanly separated.
Quickstart
Clone the repo, run migrations, and make your first authenticated API call in under 10 minutes.
Authentication
Learn how to register, log in as admin or customer, refresh tokens, and manage sessions.
Storefront Endpoints
Browse catalog, manage the cart, apply coupons, and place orders as a customer.
Admin Endpoints
Manage products, categories, brands, sliders, discounts, and coupons as an admin.
What you can build
Customer storefront — Build a fully functional shopping experience on top of the/api/ecommerce/ prefix. Customers can browse the home feed and navigation menu, search and filter products by attributes, manage a persistent cart (including coupon redemption), save delivery addresses, and place orders via direct checkout or MercadoPago. Post-purchase, customers can track orders, leave product reviews, and manage their profile including avatar uploads to OCI Object Storage.
Admin panel — Build an internal back-office dashboard backed by the /api/admin/ prefix. Administrators can create and update the full product taxonomy (categories, brands, attributes, specifications, and multi-level variations), upload product images to OCI, configure homepage banners and sliders, define discount rules and coupons, and monitor orders. The admin group is protected by JWT and restricted to accounts with type_user=1, so storefront tokens can never reach management endpoints.
API surface overview
| Prefix | Scope | Auth required |
|---|---|---|
/api/auth/ | Registration, login (admin & customer), token refresh, logout, email verification, password reset | Public (throttled 10 req/min) |
/api/ecommerce/ | Home feed, menus, product detail, advanced filtering | Public |
/api/ecommerce/ (protected) | Cart, addresses, checkout, MercadoPago, orders, reviews, profile | auth:api (customer token) |
/api/admin/ | Categories, attributes, products, brands, variations, specifications, sliders, coupons, discounts, home-view | auth:api (admin token) |
Tech stack
- PHP 8.1+ — minimum runtime requirement
- Laravel 10 (
laravel/framework ^10.10) — routing, ORM, queues, mail - MySQL 8.0 — primary relational data store
- JWT authentication —
tymon/jwt-auth ^2.1with stateless bearer tokens - MercadoPago SDK —
mercadopago/dx-php ^3.0for payment processing - OCI Object Storage — via
league/flysystem-aws-s3-v3 ^3.0for product images and user avatars - Laravel Telescope —
laravel/telescope ^5.20for local request debugging