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 products
POST/api/productsCreate a product
GET/api/products/:idGet one product
PATCH/api/products/:idUpdate a product
DELETE/api/products/:idDelete a product

Orders

GET/api/ordersList orders
POST/api/ordersCreate an order
GET/api/orders/:idGet one order
PATCH/api/orders/:idUpdate an order
DELETE/api/orders/:idDelete an order

Health

GET/api/healthLiveness + DB check (no key)