This guide walks you from a bare checkout to a running local server where you can authenticate as a customer and hit your first protected endpoint. By the end you will have a JWT bearer token in hand and a successful response fromDocumentation 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.
GET /api/ecommerce/home.
Clone the repository and install PHP dependencies
Clone the project from GitHub and install all Composer packages. PHP 8.1 or higher and Composer 2 must already be installed on your machine.
Configure environment variables
Copy the example environment file and open Edit Then generate the Laravel application key and the JWT secret:
.env in your editor. At minimum set your MySQL credentials and generate the two required secret keys..env and update the database block:php artisan jwt:secret writes a JWT_SECRET value directly into your .env file. Keep this value private — it signs every token the API issues.Run database migrations and seeders
Create all tables and populate them with initial seed data (including any default admin account defined in the seeders).
Start the development server
Boot the built-in Laravel development server on port 8000.The API is now available at
http://127.0.0.1:8000. All route prefixes documented here are relative to that base URL.Register a customer, verify email, and obtain a JWT token
First, register a new customer account. The registration endpoint is public and rate-limited to 10 requests per minute.The API sends a verification email containing a Now log in with the customer login endpoint:A successful login returns a token response:Copy the You should receive the home feed JSON containing featured products, sliders, and categories.
code_user value (stored as uniqd on the user). Verify the account before logging in:access_token value. Now use it to call a protected storefront endpoint:The examples above use the customer login endpoint (
/api/auth/login_ecommerce). If you need to authenticate as an administrator, use /api/auth/login instead — admin and customer tokens are issued through separate endpoints and are not interchangeable. See the Authentication guide for full details on both flows, token refresh, logout, and email verification.