Skip to content

API Documentation

Base URL

http://localhost:3000

Authentication

All authenticated endpoints require a Bearer token in the Authorization header.

Seller API

Seller endpoints use seller-specific JWT tokens obtained during login/registration.

Authorization: Bearer <seller_token>

Admin API

Admin endpoints use admin-specific JWT tokens.

Authorization: Bearer <admin_token>

Response Format

Success Response

Data is returned directly without wrapper fields.

json
{
  "field_name": { ... }
}

For list endpoints:

json
{
  "items": [...],
  "count": 100,
  "limit": 20,
  "offset": 0
}

Error Response Format

json
{
  "error": "Human-readable error description",
  "errorCode": "ERROR_CODE"
}

HTTP Status Codes

StatusMeaning
200Success
201Created
204No Content (deleted successfully)
400Bad Request (invalid input)
401Unauthorized (missing/invalid token)
404Not Found
422Validation Error
500Internal Server Error

Time/Date Fields

All timestamps are returned as ISO 8601 strings in UTC format: 2026-05-17T12:00:00Z

Pagination

List endpoints support pagination via limit and offset query parameters.

ParameterTypeDefaultMaxDescription
limitinteger20100Number of items to return
offsetinteger0-Number of items to skip

Directory Structure

docs/api/
  README.md                    # This file
  auth.md                      # Authentication API (login endpoints)
  admin/
    README.md                  # Admin API overview
    me.md                      # Admin profile endpoint
    product-category.md         # Product category management
  seller/
    README.md                  # Seller API overview
    auth.md                   # Seller authentication (register, login, logout, password reset)
    tenant.md                 # Tenant management
    payonner.md               # Payoneer integration
    uploads.md                # File uploads
    product-category.md        # Product categories

API Areas

AreaBase PathDescription
Auth/api/authLogin endpoints
Admin/api/adminAdmin API
Seller/api/sellerSeller API
Tenant/api/tenantTenant management (public)
Private/api/privatePrivate endpoints (auth required)
OpenAPI/openapiExternal callbacks
Hooks/hooksPartner webhooks