Introduction
The Furniture API is a RESTful web service that provides comprehensive management of furniture products, categories, inventory, suppliers, and related resources. The API follows REST principles and returns JSON responses with snake_case property naming.Base URL
All API endpoints are prefixed with:The API runs on port 8082 by default. Make sure to adjust the hostname and port based on your deployment environment.
Interactive Documentation
The API provides interactive Swagger UI documentation for exploring and testing endpoints:- Browse all available endpoints
- View request/response schemas
- Test API calls directly from your browser
- View detailed parameter information
Request/Response Format
Content Type
All requests and responses use JSON format:Naming Convention
The API uses snake_case for JSON property names:All timestamp fields are returned in ISO 8601 format (LocalDateTime).
Common Patterns
CRUD Operations
Most resources follow standard CRUD patterns:| Operation | Method | Endpoint | Status Code |
|---|---|---|---|
| List all | GET | /api/v1/{resource} | 200 |
| Get by ID | GET | /api/v1/{resource}/{id} | 200, 404 |
| Create | POST | /api/v1/{resource} | 201 |
| Update | PUT | /api/v1/{resource}/{id} | 200, 404 |
| Delete | DELETE | /api/v1/{resource}/{id} | 204, 404 |
Create Example
Create operations return a
Location header with the URI of the newly created resource.Update Example
Delete Example
Pagination
Many list endpoints support pagination via query parameters:page- Zero-based page number (default: 0)pageSize- Number of items per page (default: 10)
Paginated endpoints return an array of items. The total count is not included in the response.
Search Endpoints
The API provides various search capabilities:By Name (Partial Match)
By Unique Identifier
By Related Resource
By Status/State
By Range
Filtering
Use query parameters for filtering:Available Resources
The API provides the following main resources:- Products - Furniture products with details, pricing, and SKU
- Categories - Hierarchical product categories
- Inventory - Stock management and availability
- Suppliers - Supplier information and management
- Product Reviews - Customer reviews and ratings
- Product Images - Product image references
- Product Dimensions - Physical dimensions of products
Each resource has its own dedicated documentation page with detailed endpoint information.
CORS Support
All endpoints support Cross-Origin Resource Sharing (CORS) with:Validation
All POST and PUT requests validate input data using Jakarta Validation:- Required fields must be present
- Data types must match the schema
- Format constraints are enforced (e.g., email format, min/max values)