Skip to main content
GET
/
products
List Products
curl --request GET \
  --url https://api.example.com/products
{
  "products": [
    {
      "id": 123,
      "name": "<string>",
      "description": "<string>",
      "price": 123,
      "imageUrl": "<string>",
      "stock": 123,
      "categoryId": 123,
      "createdAt": {},
      "updatedAt": {}
    }
  ]
}

Overview

This endpoint returns all products available in the e-commerce catalog. It is a public endpoint that does not require authentication.

Endpoint

GET /products

Authentication

No authentication required. This is a public endpoint.

Response

Returns an array of product objects.
products
array
Array of product objects
id
integer
Unique identifier for the product
name
string
Product name
description
string
Product description
price
decimal
Product price (decimal with 2 decimal places)
imageUrl
string
URL to the product image
stock
integer
Available stock quantity
categoryId
integer
ID of the category this product belongs to
createdAt
datetime
Timestamp when the product was created
updatedAt
datetime
Timestamp when the product was last updated

Example Response

[
  {
    "id": 1,
    "name": "Laptop",
    "description": "High-performance laptop for professionals",
    "price": "1299.99",
    "imageUrl": "https://example.com/uploads/laptop.jpg",
    "stock": 15,
    "categoryId": 2,
    "createdAt": "2026-01-15T10:30:00.000Z",
    "updatedAt": "2026-02-20T14:25:00.000Z"
  },
  {
    "id": 2,
    "name": "Wireless Mouse",
    "description": "Ergonomic wireless mouse with precision tracking",
    "price": "29.99",
    "imageUrl": "https://example.com/uploads/mouse.jpg",
    "stock": 50,
    "categoryId": 3,
    "createdAt": "2026-01-20T09:15:00.000Z",
    "updatedAt": "2026-01-20T09:15:00.000Z"
  }
]

Build docs developers (and LLMs) love