Ecommerce API
SnapCart provides ecommerce-specific API endpoints for products, cart, orders, and customer management.
Products
GET /api/v1/ecommerce/products- List products with filtersGET /api/v1/ecommerce/products/{id}- Get product detailsGET /api/v1/ecommerce/product-categories- List product categoriesGET /api/v1/ecommerce/brands- List brands
Product Filters
bash
GET /api/v1/ecommerce/products?category_id=1&min_price=10&max_price=100&sort_by=price_ascCart
GET /api/v1/ecommerce/cart- Get current cartPOST /api/v1/ecommerce/cart- Add item to cartPUT /api/v1/ecommerce/cart/{id}- Update cart itemDELETE /api/v1/ecommerce/cart/{id}- Remove cart item
Orders
GET /api/v1/ecommerce/orders- List customer ordersGET /api/v1/ecommerce/orders/{id}- Get order detailsPOST /api/v1/ecommerce/orders/tracking- Track an order
Customer
GET /api/v1/ecommerce/customer/profile- Get customer profilePUT /api/v1/ecommerce/customer/profile- Update profileGET /api/v1/ecommerce/customer/addresses- List addressesPOST /api/v1/ecommerce/customer/addresses- Add address
Wishlist
GET /api/v1/ecommerce/wishlist- Get wishlistPOST /api/v1/ecommerce/wishlist- Add to wishlistDELETE /api/v1/ecommerce/wishlist/{id}- Remove from wishlist
TIP
Use the API to build custom mobile apps or integrate with third-party services like ERP or CRM systems.
