Skip to main content
GET
/
products
/
{id}
curl https://api.example.com/products/123
{
  "id": 123,
  "name": "Espresso Coffee",
  "price": 12.99,
  "image": "espresso.jpg",
  "inventory": 50,
  "categoryId": 1,
  "category": {
    "id": 1,
    "name": "Beverages",
    "image": "beverages.jpg"
  }
}
Retrieve detailed information about a specific product by its ID.

Authentication

This endpoint is public and does not require authentication.

Path Parameters

id
integer
required
The unique identifier of the product to retrieve

Response

id
integer
The unique identifier for the product
name
string
The product name
price
number
The product price
image
string
The product image URL or filename
inventory
number
The quantity in stock
categoryId
integer
The category ID
category
object
The category object with full details
curl https://api.example.com/products/123
{
  "id": 123,
  "name": "Espresso Coffee",
  "price": 12.99,
  "image": "espresso.jpg",
  "inventory": 50,
  "categoryId": 1,
  "category": {
    "id": 1,
    "name": "Beverages",
    "image": "beverages.jpg"
  }
}

Errors

statusCode
integer
HTTP status code
message
array
Array of error messages
{
  "statusCode": 404,
  "message": ["Product not found"]
}

Build docs developers (and LLMs) love