Documentation

Answers

Every calculation answers with the same three parts, whatever your institution has turned on:

JSONCode
{ "result": { "...": "..." }, "institution": { "...": "..." }, "meta": { "calculator": "auto-loan-accelerated-payoff", "mode": "live", "locale": "en-US", "filled": { "termMonths": "default", "interestRate": "rate" }, "excluded": [{ "item": "nextSteps", "reason": "not-enabled" }] } }
  • result is the calculation, exactly as the calculator's endpoint in the API reference describes it.
  • institution is what your institution adds beside the figures, the same things its own calculator pages show. It holds only the items that are turned on and that you asked for.
  • meta says which calculator answered, which kind of key asked (live or test), the language of institution, which inputs were filled in for you, and why anything you asked for is missing.

Inputs you leave out: meta.filled

Send only the inputs you have. Each one you leave out, or send as null, is filled as your institution's own calculator page would open, and meta.filled names it with where its value came from:

SourceThe value is
rateYour institution's rate for it, when its rates item is turned on.
startingThe starting value your institution set for this calculator's page.
defaultThe calculator's own default, the one in GET /v2/calculators/{slug}.

A value you send always wins. An input with no default is never filled: if the calculator needs it, the call is refused as invalid-inputs, naming it. Check meta.filled before showing figures as the person's own: a result can rest on a term or a rate they never gave.

Send the inputs as the body itself, not inside an inputs object: {"loanAmount": 300000}, never {"inputs": {"loanAmount": 300000}}. Percentages are decimals, 0.065 for 6.5%; the calculator's description marks them "format": "percent".

What institution can carry

ItemIn the answerWhat it is
disclaimerdisclaimerThe disclaimer your institution's pages show for this calculator, as HTML. Show it beside the figures.
nextStepsnextStepsIts next steps for this answer, such as an Apply link, with your inputs filled into each address. Show any advertisingTerms beside its offer.
contentcontentIts wording: the calculator's title and intro, a label and help text for each input, a label for each result field.
ratesratesAppliedInputs you left out, filled from its rates before the calculation. A value you send always wins.
consentconsentIts lead-capture consent sentence, {id, text}: show the text to the person, and send the id back with the lead when they agree.

Your institution chooses which items each calculator carries, on its API answers screen in the FinCalc console, and the choice goes through its own review before it reaches the API. That screen also shows a sample answer, which is a quick way to see what you will receive.

Asking for less: include

?include=disclaimer,nextSteps keeps just those; ?include=none returns an empty institution. Leaving it out asks for every item. include narrows and never widens: an item your institution has not turned on stays out, however it is asked for. An unknown name is a 400, unknown-include, so a typo is never silently nothing.

Language: locale

?locale=es-US asks for your institution's Spanish wording, disclaimer and consent sentence. It must be one of your institution's languages, or the call is a 400, unsupported-locale that names the ones it has. Leave it out for your institution's own language: that is what an answer is in when locale is absent, whatever the person's own language is. es-us, es_US and es alone all find an institution's es-US; a region is never swapped for another. meta.locale says which one answered. The calculation itself is the same in every language.

Why something is missing: meta.excluded

reasonMeaning
not-enabledYour institution hasn't turned this item on for this calculator.
not-publishedYour institution hasn't gone live with anything yet.
unavailableIt couldn't be worked out just now. The calculation was still answered; try again shortly.
none-configuredIt's turned on, with nothing to show: no next steps set up, no rate feeding this calculator, no consent sentence.
capture-offThe consent sentence comes with lead capture, which is off.
not-in-languageYour institution has no wording for this calculator in the language asked for. Wording never crosses languages.
Last modified on