FinCalc API

FinCalc API

Financial calculators as a REST API. Send a calculator its inputs and get a calculated result back.

Compatibility

The major version is in the path (/v2/). Within a major version, these changes may be made at any time and are not breaking. Write your client to tolerate them:

  • New response fields. Ignore fields you do not recognise. Result objects are deliberately not closed.
  • New optional request fields, and loosened request limits.
  • New calculators.
  • Corrected calculations. A fix to the math changes values, not the shape.
  • Anything under x-ui: labels, descriptions, articles, groups, charts, worksheets and response-text rules. This is presentation guidance, not part of the response. Its structure is versioned separately by info.x-fincalc-ui-version.

These are breaking and only happen in a new major version: removing, renaming or retyping a field; adding a required request field; tightening a request limit; changing the default of an optional request field; removing a request enum value; adding a response enum value; changing a value's units or format (money is always an exact decimal string, rates are always decimal fractions); removing a calculator or changing its path or operationId.

Every declared result field is always present. A figure that does not apply to the inputs given is still returned; where a column can be blank its schema admits null. Which figures apply is described by x-ui, not by the response shape.

The answer

Every calculation answers with the same envelope:

JSONCode
{ "result": { "...": "the calculator's own result, as documented on its endpoint" }, "institution": { "...": "what your institution adds: disclaimer, next steps, wording, rates, consent" }, "meta": { "calculator": "auto-loan-accelerated-payoff", "mode": "live", "locale": "en-US", "filled": {}, "excluded": [] } }

result is the calculation. institution carries only what your institution has turned on for that calculator on its API answers screen; meta.excluded says why anything you asked for is missing. See Answers.

Keys

Your institution's Administrators create keys in the FinCalc console, under API keys. A live key (fincalc_live_...) runs the calculators your institution licenses for the API and counts against its quota; a test key (fincalc_test_...) runs any calculator and is never billed. See Authentication.