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

Overview

This endpoint retrieves detailed information about a single product using its unique identifier. It is a public endpoint that does not require authentication.

Endpoint

GET /products/:id

Path Parameters

id
integer
required
The unique identifier of the product to retrieve

Authentication

No authentication required. This is a public endpoint.

Response

Returns a single product object.
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"
}

Error Responses

Product Not Found

If the product with the specified ID does not exist:
{
  "error": "Product not found"
}
Status Code: 404 Not Found

Build docs developers (and LLMs) love