NeonDB · Prisma · Next.js
E-commerce API
A small REST API for managing products and orders. All endpoints require an API key sent in the x-api-key header (or as a Bearer token).
Authentication
curl https://your-app.vercel.app/api/products \
-H "x-api-key: $API_KEY"Products
GET
/api/productsList productsPOST
/api/productsCreate a productGET
/api/products/:idGet one productPATCH
/api/products/:idUpdate a productDELETE
/api/products/:idDelete a productOrders
GET
/api/ordersList ordersPOST
/api/ordersCreate an orderGET
/api/orders/:idGet one orderPATCH
/api/orders/:idUpdate an orderDELETE
/api/orders/:idDelete an orderHealth
GET
/api/healthLiveness + DB check (no key)