Answers
Every calculation answers with the same three parts, whatever your institution has turned on:
Code
resultis the calculation, exactly as the calculator's endpoint in the API reference describes it.institutionis 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.metasays which calculator answered, which kind of key asked (liveortest), the language ofinstitution, 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:
| Source | The value is |
|---|---|
rate | Your institution's rate for it, when its rates item is turned on. |
starting | The starting value your institution set for this calculator's page. |
default | The 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
| Item | In the answer | What it is |
|---|---|---|
disclaimer | disclaimer | The disclaimer your institution's pages show for this calculator, as HTML. Show it beside the figures. |
nextSteps | nextSteps | Its next steps for this answer, such as an Apply link, with your inputs filled into each address. Show any advertisingTerms beside its offer. |
content | content | Its wording: the calculator's title and intro, a label and help text for each input, a label for each result field. |
rates | ratesApplied | Inputs you left out, filled from its rates before the calculation. A value you send always wins. |
consent | consent | Its 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
reason | Meaning |
|---|---|
not-enabled | Your institution hasn't turned this item on for this calculator. |
not-published | Your institution hasn't gone live with anything yet. |
unavailable | It couldn't be worked out just now. The calculation was still answered; try again shortly. |
none-configured | It's turned on, with nothing to show: no next steps set up, no rate feeding this calculator, no consent sentence. |
capture-off | The consent sentence comes with lead capture, which is off. |
not-in-language | Your institution has no wording for this calculator in the language asked for. Wording never crosses languages. |