Marine Paint API

A powerful REST API for managing marine paint products and orders

View API Documentation

Features

📊

Product Management

Create, update, and manage your paint products with comprehensive inventory tracking.

🛒

Order Management

Handle customer orders with detailed line items, status tracking, and total calculations.

👤

User Authentication

Secure JWT-based authentication with role-based access control for administrators and customers.

📈

Statistics & Reporting

Generate detailed reports and statistics on sales, popular products, and customer orders.

📁

Data Export

Export order data and statistics to CSV format for further analysis and record-keeping.

🔍

Advanced Search

Powerful search capabilities with filtering and pagination for finding specific orders and products.

Documentation

Interactive API Documentation

Our API comes with comprehensive documentation using Swagger UI, allowing you to:

  • Browse all available endpoints
  • See request and response schemas
  • Test API calls directly from your browser
  • Understand authentication requirements
Open Swagger UI
GET /api/orders

Authorization: Bearer {your_token}

Response:
[
  {
    "id": 1,
    "orderNumber": "ORD-1655123456-ABC12",
    "customerId": 101,
    "totalAmount": 2500000,
    "status": "PROCESSING",
    ...
  }
]

Key Endpoints

Authentication

POST /api/auth/register - Register a new user

POST /api/auth/login - Login and get JWT token

GET /api/auth/me - Get current user profile

Products

GET /api/products - List all products

GET /api/products/:id - Get product details

POST /api/products - Create new product (Admin)

PUT /api/products/:id - Update product (Admin)

Orders

GET /api/orders - List all orders

GET /api/orders/:id - Get order details

POST /api/orders - Create new order

PUT /api/orders/:id - Update order status (Admin)

GET /api/orders/search - Search orders with filters

Statistics & Export

GET /api/orders/statistics - Get order statistics (Admin)

GET /api/orders/export/csv - Export orders to CSV

GET /api/orders/items/export/csv - Export order items to CSV (Admin)