Skip to main content

Get Product Dimensions by ID

Retrieve detailed information about a specific product dimensions record.

Endpoint

GET /api/v1/product-dimensions/{id}

Path Parameters

id
integer
required
The unique identifier of the product dimensions record

Response

id
integer
Unique identifier for the product dimensions
productId
integer
ID of the associated product
lengthCm
number
Length of the product in centimeters
widthCm
number
Width of the product in centimeters
heightCm
number
Height of the product in centimeters
dimensionUnit
string
Unit of measurement for dimensions (e.g., “cm”, “inches”)
createdAt
string
Timestamp when the dimensions record was created

Status Codes

200
OK
Successfully retrieved product dimensions
404
Not Found
Product dimensions not found

Example Request

curl -X GET https://api.example.com/api/v1/product-dimensions/1 \
  -H "Content-Type: application/json"

Example Response

{
  "id": 1,
  "productId": 101,
  "lengthCm": 200.0,
  "widthCm": 90.0,
  "heightCm": 85.0,
  "dimensionUnit": "cm",
  "createdAt": "2024-01-15T10:30:00"
}

Error Response

{
  "status": 404,
  "error": "Not Found",
  "message": "Product dimensions not found with id: 1"
}

Build docs developers (and LLMs) love