Run calculations using any enabled template. Supports all calculator types without requiring endpoint-specific code.
Run a calculation using a template
Validates inputs against template widget definitions, creates a calculation sheet, solves it, and returns results.
path Parameters
codestring · requiredTemplate code, as returned by
GET /v1/templates(e.g.loadsSnowASCE7-16).
Headers
Authorizationstring · requiredThe
Authorizationheader is used to authenticate with the API using your API key. Value is of the formatBearer YOUR_KEY_HERE.
Request Body
projectIdstring · requiredProject UUID to create the sheet in
attributesobject · requiredInput values keyed by referenceId — the keys are the fields[].referenceId values from GET /v1/templates/{code}. Send numbers for number fields, an option string for enum fields, and an array of row objects for table fields. Omitted fields fall back to the template's defaults (or the chosen preset's).
presetstringOptional preset code to apply defaults before user attributes
namestringOptional name for the created sheet
Responses
Calculation completed successfully
sheetIdstringUnique identifier for the created calculation sheet
projectIdstring · uuidThe project the sheet was created in.
sheetUrlstring · uriDirect link to the sheet in the ClearCalcs web app. Always present on a successful response.
templateCodestringTemplate code that was used
inputsobjectEcho of the resolved values the calculation ran with — one entry per settable field, keyed by the same referenceIds as fields[] in GET /v1/templates/{code}. Values are echoed in stored form: numbers as strings, enum choices as their stored value or row index, table fields as row arrays.
resultsobjectCalculation results keyed by referenceId — the keys come from the template schema's outputs[] (GET /v1/templates/{code}), and a given calculation carries the subset applicable to its inputs. Value shape depends on the output kind: numbers, strings, or arrays of row objects for table outputs. Numeric values are returned unrounded.
passedboolean | nullWhether the calculation's checks passed; null when the template defines no pass/fail checks
summaryCheckValue of the template's governing summary check — a pass/fail boolean or a numeric utilisation, depending on the template. Present when the template defines one.
summaryCheckReferenceIdstringreferenceId of the governing check. Present with summaryCheck.
summaryCheckErrorbooleanTrue when the summary check could not be evaluated. Present when the template defines a summary check.
summaryCheckFailReasonsstring[]Reasons the summary check failed. Present only on failure.
warningsobject[]Non-blocking validation warnings, present when any were raised. Unrecognised attribute names are returned as a 422 instead.
List available calculation templates
Returns all calculation templates available for API use, including their codes, names, categories, and whether they have API output configured.
query Parameters
limitinteger · min: 1 · max: 500Return up to this many templates. A page may contain fewer — always read the length of
templatesrather than assuminglimitentries.Default: 100offsetintegerNumber of templates to skip for pagination. An offset past the end returns an empty page with total unchanged.
Default: 0
Headers
Authorizationstring · requiredThe
Authorizationheader is used to authenticate with the API using your API key. Value is of the formatBearer YOUR_KEY_HERE.
Responses
List of available templates
templatesobject[] · requiredtotalinteger · requiredTotal number of templates available to this API key, independent of
limitandoffset. More pages remain whileoffsetplus the number of entries intemplatesis less thantotal.limitinteger · requiredThe
limitapplied to this page.offsetinteger · requiredThe
offsetapplied to this page.
Get template details
Returns detailed information about a specific template, including its input fields and available presets.
path Parameters
codestring · requiredTemplate code, as returned by
GET /v1/templates(e.g.loadsSnowASCE7-16).
Headers
Authorizationstring · requiredThe
Authorizationheader is used to authenticate with the API using your API key. Value is of the formatBearer YOUR_KEY_HERE.
Responses
Template details
idstring · uuidIdentifier of the currently published template version; changes when the template is republished — use
codeas the stable identifierversioninteger | nullThe template version that will serve calculations and sheet creates; null when the template records no version
codestringTemplate code
namestringHuman-readable template name
categorystring | nullTemplate category
descriptionstring | nullBrief description of the template; null when the template provides none
fieldsobject[]Input field definitions for the template
outputsobject[]Everything a calculate call can return: one entry per API output, keyed by referenceId in the calculate response's results object. A given calculation's results carries the subset applicable to its inputs — some outputs are conditional. Empty when the template exposes no API output.
presetsobject[]Available presets for the template
Get template presets
Returns the available presets for a template, including their default values.
path Parameters
codestring · requiredTemplate code, as returned by
GET /v1/templates(e.g.loadsSnowASCE7-16).
Headers
Authorizationstring · requiredThe
Authorizationheader is used to authenticate with the API using your API key. Value is of the formatBearer YOUR_KEY_HERE.
Responses
Template presets
presetsobject[]
Validate inputs against a template
Validates the provided attributes against the template's field definitions without running a calculation. Useful for pre-flight validation before calling the calculate endpoint.
path Parameters
codestring · requiredTemplate code, as returned by
GET /v1/templates(e.g.loadsSnowASCE7-16).
Headers
Authorizationstring · requiredThe
Authorizationheader is used to authenticate with the API using your API key. Value is of the formatBearer YOUR_KEY_HERE.
Request Body
attributesobject · requiredWidget reference IDs and their values to validate
presetstringOptional preset code to apply defaults before validation
Responses
Validation passed
validboolean · enumEnum values:warningsobject[]Non-fatal warnings (e.g., deprecated fields)