Overview
- Category
- Construction
- API mode
execute- Processing
- client-side
- Privacy
- no-data-stored
Public descriptor
The descriptor is available without an API key and supplies this tool’s metadata, schemas, modes, and examples.
GET /api/v1/tools/roofing-calculator
Execute availability
This tool has an execute route defined by its descriptor. Server-side execution is currently unavailable, so requests return api_not_launched.
POST /api/v1/tools/roofing-calculator/execute
Authentication is not issued during the preview. A bearer API key is planned for execution after launch.
Input schema
object object; additional properties are not accepted.
length· number · required- Enter the measured length in the unit shown; use the finished dimension rather than a nominal size.
width· number · required- Enter the measured width in the unit shown, using the same measurement basis as length.
pitch· number · required- Enter roof rise per 12 inches of horizontal run, such as 6 for a 6:12 pitch.
waste_percent· number · required- Enter the extra material percentage to allow for cuts, spills, and offcuts.
{
"type": "object",
"properties": {
"length": {
"type": "number",
"description": "Enter the measured length in the unit shown; use the finished dimension rather than a nominal size."
},
"width": {
"type": "number",
"description": "Enter the measured width in the unit shown, using the same measurement basis as length."
},
"pitch": {
"type": "number",
"description": "Enter roof rise per 12 inches of horizontal run, such as 6 for a 6:12 pitch."
},
"waste_percent": {
"type": "number",
"description": "Enter the extra material percentage to allow for cuts, spills, and offcuts."
}
},
"required": [
"length",
"width",
"pitch",
"waste_percent"
],
"additionalProperties": false
}
Output schema
On a successful execution, schema values appear in data.result.values.
roof_area_sq_ft· number- Browser-calculated roof area sq ft.
roofing_squares· number- Browser-calculated roofing squares.
bundles· number- Browser-calculated bundles.
{
"type": "object",
"properties": {
"roof_area_sq_ft": {
"type": "number",
"description": "Browser-calculated roof area sq ft."
},
"roofing_squares": {
"type": "number",
"description": "Browser-calculated roofing squares."
},
"bundles": {
"type": "number",
"description": "Browser-calculated bundles."
}
},
"additionalProperties": false
}
40 ft × 30 ft roof at 6:12 with 10% waste
The request body follows the published input schema. The response below shows the success-envelope shape returned after execution is available.
curl -X POST "https://utilitypages.org/api/v1/tools/roofing-calculator/execute" \
-H "Content-Type: application/json" \
-d '{
"length": 40,
"width": 30,
"pitch": 6,
"waste_percent": 10
}'
{
"ok": true,
"data": {
"slug": "roofing-calculator",
"result": {
"values": {
"roof_area_sq_ft": 1475.799999999999954525264911353588104248046875,
"roofing_squares": 14.7599999999999997868371792719699442386627197265625,
"bundles": 45
},
"display": {
"display": "1475.8"
},
"warnings": [],
"assumptions": [],
"steps": []
}
},
"meta": [],
"request_id": "req_example_123"
}
Errors
api_not_launched· 503- Returned by the current launch gate for every execute request.
invalid_json· 400- Returned when an enabled execute request does not contain valid JSON.
validation_failed· 422- Returned when a request does not satisfy the input schema.
browser_interaction_required· 422- Returned for browser capability tools instead of inventing a server-side result.
tool_not_found· 404- Returned when a requested descriptor slug does not exist.
execution_failed· 503- Returned when an enabled server-side execution cannot complete.