The Ecommerce Delivery API is a Node.js/Express backend that powers a complete clothing e-commerce experience. It handles user registration and authentication, product catalog management, the full sales order lifecycle from purchase through delivery, and real-time push notifications via Firebase Cloud Messaging.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/fredy-rizo/ecommerce-delivery/llms.txt
Use this file to discover all available pages before exploring further.
Quickstart
Get the server running locally and make your first API call in minutes
Authentication
Learn how JWT tokens work and how to pass them in every request
API Reference
Browse every endpoint with request/response schemas and curl examples
Sale Lifecycle
Understand order states from pending purchase through final delivery
What the API covers
Users
Registration, email verification, login, profile updates, and role management
Products
Create and manage clothing items with color/size variants, discounts, and image uploads
Sales
Place orders, upload payment proofs, track statuses, and export reports
Notifications
Register FCM device tokens for real-time push notification delivery
Roles & Permissions
Role-based access control with user, admin, company, and promoter tiers
Configuration
Environment variables for MongoDB, JWT, Google Cloud Storage, and email
How it works
Register and verify your account
Create a user account via
POST /api/user/create. A verification code is sent to your email — confirm it with POST /api/user/verify-account to activate the account.Authenticate
Log in with
POST /api/user/login to receive a JWT token. Include this token as Authorization: Bearer <token> on every subsequent request.Browse and purchase products
List available products with
POST /api/product/list-product, then place an order with POST /api/sale/pay/:productId including your size, color, and shipping details.All endpoints use
POST as their HTTP method. Request bodies are JSON unless the endpoint accepts file uploads, in which case multipart/form-data is used.