FinCalc API

Send a lead your app collected into your institution's lead handling.


Send a lead

POST
https://api.fincalc.com
/v2/leads

A lead your app collected, for your institution's routing, notifications, CRM and webhooks, as a lead from its own calculator pages. Needs a key with the leads scope and lead capture turned on. Answered 202 with a reference: the lead is captured within a minute or so, and GET /v2/leads/{reference} says what came of it. A test key's lead is marked as a test. Not counted against the quota.

Send a lead › Headers

Idempotency-Key
​string · maxLength: 36 · pattern: ^[A-Za-z0-9_-]{1,36}…

Up to 36 letters, digits, hyphens or underscores. Sending the same lead again with the same key never makes a second one: the answer is the first lead's reference and its status now, with Idempotent-Replayed: true. A different lead under a key already used is refused (422). A key finds its lead for a day after it is captured.

Send a lead › Request Body

email
​string · maxLength: 320 · required

An address mail can reach, such as pat@example.com.

​object · required
name
​string · maxLength: 120

Only where the institution collects a name. With letters in it, and no markup or web addresses.

postalCode
​string · maxLength: 12

Only where the institution collects one. Letters and digits, with spaces or hyphens between.

calculator
​string

The calculator the lead came from, by slug.

locale
​string

The language the person was shown the consent sentence in.

inputs
​object

The calculation's inputs, as you sent them to the calculator: only inputs calculator takes, and only with a calculator.

​object

What your app saw of the person's device, kept with the consent record.

Send a lead › Responses

Taken in, for your institution to capture.

reference
​string · required
status
​string · enum · required
Enum values:
pending
accepted
refused
reason
​string · enum

Why it was refused: lead capture turned off since, the consent sentence changed since the person agreed, a field the institution no longer collects, another capture check, or a capture that kept failing on our side.

Enum values:
capture-off
consent-changed
field-not-collected
refused
failed

A lead's status

GET
https://api.fincalc.com
/v2/leads/{reference}

Whether a lead you sent was captured: pending, accepted, or refused with a reason.

A lead's status › path Parameters

reference
​string · required

From the 202.

A lead's status › Responses

The lead's status.

reference
​string · required
status
​string · enum · required
Enum values:
pending
accepted
refused
reason
​string · enum

Why it was refused: lead capture turned off since, the consent sentence changed since the person agreed, a field the institution no longer collects, another capture check, or a capture that kept failing on our side.

Enum values:
capture-off
consent-changed
field-not-collected
refused
failed