Skip to content

API Overview

hieuck edited this page Jul 5, 2026 · 1 revision

API Overview

Base URL

When running locally:

http://localhost:4000

Versioning

Use either the URL path or the X-API-Version header:

curl http://localhost:4000/api/v1/health

Default version is 1.

Core endpoints

Endpoint Description
GET / API metadata (name, version)
GET /health Health check + DB status
POST /api/v1/auth/login Login
POST /api/v1/auth/refresh Refresh access token
GET /api/v1/products List products
POST /api/v1/products Create product
GET /api/v1/orders List orders
POST /api/v1/orders Create order

Authentication

Include the access token in the Authorization header:

Authorization: Bearer <access_token>

For service-to-service calls, use X-API-Key with a key created in the admin panel.

OpenAPI / Swagger

Run the API locally and open http://localhost:4000/api/docs for the interactive spec.

Clone this wiki locally