Skip to main content

API Docs

BookSell uses session-backed endpoints. Authenticated requests should come from the same browser session that holds the Supabase auth cookies.

Base URLs

Production: https://booksell-kr.vercel.app/api

Local: http://localhost:3000/api

Authentication

Protected routes rely on the BookSell web session cookies issued by Supabase.

Cookie: sb-access-token=...; sb-refresh-token=...

Available Routes

Catalog

  • GET /api/ebooks
  • GET /api/ebooks/:id

Payments

  • POST /api/payments/session
  • POST /api/payments/confirm
  • GET /api/payments/paypal/config
  • POST /api/payments/paypal
  • POST /api/payments/paypal/capture

Library

  • GET /api/my-books
  • GET /api/my-books/:id

Seller

  • GET /api/dashboard
  • PUT /api/dashboard/bank
  • POST /api/upload
  • DELETE /api/upload

Categories

Business & FinanceSelf DevelopmentHealth & ScienceHobbies & LifestyleIT & ProgrammingHumanities & SocietyFiction & EssaysOther