Run a calculator (inputs in the query)
Every other query parameter is an input id, its value written with its unit where it measures something: slabLength=3%20m, slabThickness=4%20in.
Request
- Base URL: https://api.craftquantities.com/v1
- URL: https://api.craftquantities.com/v1/calculate/{slug}
- Auth: none declared
Path parameters
The calculator's slug, such as concrete-calculator.
Query parameters
The unit system inputs left out open in, and the one the page link opens in. The answer comes in both.
Optional. A market whose own opening choice some inputs take (a UK reader's code, an IEC motor), and whose currency symbol prints the caller's own money figures.
Send "base" to pass bare numbers on dimensioned inputs in base units (m, m², L, kg …), as the published test vectors are written. Without it a length, area or volume must carry its unit.
true adds the working: the inputs as the calculator received them, every intermediate figure its own compute reports with its unit, the range check and the unit restatement, ending on the same figures. The answer's figures are identical either way.
full (the default): the whole answer. summary: the result lines, the citation line and the page only — fewer tokens to read.
summary: the result lines, the citation and the page only (fewer tokens); full, the default: the whole answer. A POST body may carry detail instead.
md: the engine's Markdown report as text/markdown (or send Accept: text/markdown); json, the default.
Response
The answer in both systems, with its inputs, sources and citation.
Changes
No recorded changes to this operation across all 1 revision of this API.