Get All Product Dimensions
This endpoint supports both fetching all records and paginated results using different paths.
Endpoint
GET /api/v1/product-dimensions
Retrieves all product dimensions records in the system.
Response
Array of product dimensions objectsShow ProductDimensionsResponse
Unique identifier for the product dimensions
ID of the associated product
Length of the product in centimeters
Width of the product in centimeters
Height of the product in centimeters
Unit of measurement for dimensions
Timestamp when the record was created
Status Codes
Successfully retrieved list of product dimensions
Example Request
curl -X GET https://api.example.com/api/v1/product-dimensions \
-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"
},
{
"id": 2,
"productId": 102,
"lengthCm": 180.0,
"widthCm": 80.0,
"heightCm": 75.0,
"dimensionUnit": "cm",
"createdAt": "2024-01-16T14:20:00"
}
]
Get Paginated Product Dimensions
Endpoint
GET /api/v1/product-dimensions/pagination
Retrieves product dimensions with pagination support.
Query Parameters
Page number (zero-based index)
Number of records per page
Response
Array of product dimensions objects for the requested pageShow ProductDimensionsResponse
Unique identifier for the product dimensions
ID of the associated product
Length of the product in centimeters
Width of the product in centimeters
Height of the product in centimeters
Unit of measurement for dimensions
Timestamp when the record was created
Status Codes
Successfully retrieved paginated list of product dimensions
Example Request
curl -X GET "https://api.example.com/api/v1/product-dimensions/pagination?page=0&pageSize=10" \
-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"
},
{
"id": 2,
"productId": 102,
"lengthCm": 180.0,
"widthCm": 80.0,
"heightCm": 75.0,
"dimensionUnit": "cm",
"createdAt": "2024-01-16T14:20:00"
}
]
Get Product Dimensions by Product ID
Endpoint
GET /api/v1/product-dimensions/product/{productId}
Retrieves product dimensions for a specific product.
Path Parameters
The ID of the product to retrieve dimensions for
Response
Unique identifier for the product dimensions
ID of the associated product
Length of the product in centimeters
Width of the product in centimeters
Height of the product in centimeters
Unit of measurement for dimensions
Timestamp when the record was created
Status Codes
Successfully retrieved product dimensions
Product dimensions not found for the given product
Example Request
curl -X GET https://api.example.com/api/v1/product-dimensions/product/101 \
-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"
}