Skip to main content

Endpoint

GET /api/v1/products
Retrieves all products from the system.

Pagination Endpoint

GET /api/v1/products/pagination
Retrieves products with pagination support.

Query Parameters

page
integer
default:"0"
The page number to retrieve (zero-based index). First page is 0.
pageSize
integer
default:"10"
The number of products to return per page.

Response

products
array
Array of product objects

Examples

List All Products

curl -X GET "https://api.furniture.com/api/v1/products" \
  -H "Accept: application/json"

List Products with Pagination

curl -X GET "https://api.furniture.com/api/v1/products/pagination?page=0&pageSize=20" \
  -H "Accept: application/json"

Response Example

[
  {
    "id": 1,
    "name": "Modern Oak Dining Table",
    "description": "Elegant 6-seater dining table made from solid oak wood",
    "sku": "TBL-OAK-001",
    "category_id": 5,
    "price": 899.99,
    "cost_price": 450.00,
    "weight_kg": 45.5,
    "is_active": true,
    "created_at": "2024-01-15T10:30:00",
    "product_dimension_id": 1,
    "product_inventory_id": 1,
    "image_ids": [101, 102, 103]
  },
  {
    "id": 2,
    "name": "Leather Recliner Sofa",
    "description": "Comfortable 3-seater recliner sofa in genuine leather",
    "sku": "SFA-LTH-002",
    "category_id": 3,
    "price": 1299.99,
    "cost_price": 650.00,
    "weight_kg": 85.0,
    "is_active": true,
    "created_at": "2024-01-16T14:20:00",
    "product_dimension_id": 2,
    "product_inventory_id": 2,
    "image_ids": [104, 105]
  }
]

Response Codes

200
Success
Successfully retrieved the list of products

Build docs developers (and LLMs) love