Quick Start
Create a project and run your first wood beam calculation.
This example uses the legacy Timber Beam endpoint, which keeps working for existing integrations. New integrations should use the calculator endpoints.
Prerequisites
- API key from Calcs.com (contact [email protected])
Windows PowerShell: type curl.exe rather than curl. The examples below don't run as pasted in Windows PowerShell 5.1: the \ line breaks don't work there, and PowerShell strips the quotes inside single-quoted JSON, so the API replies Expected property name or '}' in JSON…. For requests with a body, use Invoke-RestMethod with ConvertTo-Json:
Code
Step 1: Create a Project
All calculations belong to a project. Create one first:
Code
Response:
Code
Save the projectId - you'll need it for calculations.
Step 2: Run a Calculation
Calculate a floor joist using the single-call endpoint:
Code
Response:
Code
Done! The beam passes with 83% utilization — the governing check is the combined dead+live load deflection limit (delta_DL+LL_summary).
Understanding the Results
| Field | Description |
|---|---|
passed | Not the verdict: a failing calculation can report true. Read summaryCheck for the verdict. |
utilizationRatio | Demand/capacity ratio (0-1). Lower is better. |
summaryCheck.failReasons | Empty array means no failures |
Units
The typed Timber Beam and Snow Load endpoints take plain numbers, as in the example above. The generic calculator endpoints (POST /v1/templates/{code}/calculate and /validate, PATCH /v1/sheets/{sheetId}, and Bulk Calculate) follow three rules:
- Tag every number you write. Send it as a string with the unit the calculator lists for that field or column in
GET /v1/templates/{code}, for example"24 ft"or"100 kip", table cells included. A field or column whoseunitsis null takes a plain number, and so do a few fields that list units, such as a roof slope listed as:12. On a number field, use exactly the listed unit: a tag in any other unit, even one that converts, is rejected with a 422 that names the unit to send, or asks for the plain number. - Send only the fields you change. On a sheet, everything you leave out keeps its current value; on calculate, it takes the template's default (or the preset's).
- Never send back a number you read from
inputs. Build every number you send, table rows included, from your own values. A number read back may not carry its unit.
Common Issues
"projectId is required" - Create a project first using POST /v1/projects
"Invalid preset" - See the API Reference for valid preset codes
Results show a failing summaryCheck - Check summaryCheck.failReasons for details
Results show NaN utilization - Check your loadsDist format. The correct format is:
Code
For joists: ["Floor Load", 0, "L", "spacing", "TW_s", {"D": [15], "L": [40]}]
For headers/beams: ["Wall Load", 0, "L", 1, "One", {"D": [100], "L": [200]}]
Next Steps
- Timber Beam Guide - Detailed beam documentation
- Snow Load Guide - Snow load calculations
- Generic Templates - Use any calculation template
- API Reference - Full interactive endpoint documentation