Skip to main content
POST
Plan the next question for market rater versions

Authorizations

Authorization
string
header
required

Effective API key. Send Authorization: Bearer sk-eai-...

Body

application/json
programs
object[]
required

Pinned program versions. Each reads only the paths its own contract declares.

Required array length: 1 - 10 elements
answers
object
required

Every answer so far, keyed by root record.

skipped
string[]

Paths the person put off, in order.

after
string | null

The path answered last.

sections
string[]

The order the host shows sections in.

offered
string[]

Document kinds already offered.

confirmed
string[]

The choices paths the person has confirmed. Keep each with the value confirmed and drop one whose value, or whose set of choices, changed.

previous
object[]

Each program’s status from the previous call. changes lists the programs whose status differs now.

Maximum array length: 10
asOf
string<date>

The date answers are as of, YYYY-MM-DD. It fills look-back windows such as “since March 2016”. No rater reads the clock.

fills
object[]

What the host fills from an answer, such as a car’s year and make from its VIN. A question that fills others is asked before them.

Maximum array length: 20
choices
object

What the person buys, by path: a limit, a deductible, a term. Each program is rated at its nearest step, by the shape its contract gives the choice (x-shape): a limit or a per-day amount rounds up in every part, a limit pair up to the smallest pair at least both parts, a deductible down to the largest step at most it, and an included, tier or term choice must match. A choice a program cannot price is not_offered for it, and that program rates its default. When a program does not sell a choice as asked, task.differences says so and overrides takes the person’s pick.

overrides
object[]

The person’s picks for programs that do not sell a choice as asked: each program is priced at its pick in place of its nearest step. Answer each of task.differences with one pick per program (accepting the suggestion is a pick equal to suggested). A pick is ignored, so its choice is asked again, once the choice is no longer asked, or when it names a program outside the basket or a step its program does not sell (a new version may drop one).

Maximum array length: 200

Response

The next question and each version’s status.

asOf
string | null
required

The request’s asOf.

answers
object
required

The answers as Effective read them: a full VIN given at a car’s vin_pattern is cut down to its pattern, with what its decode filled (the car’s vpic_* answers). Send these back on the next call.

task
object
required

The one thing the person does next: answer_screen while an open question is not put off; else confirm_choices while a choice is not confirmed; else review_results, each program where it stands.

open
object[]
required

Every open fact once, with the programs that need it: group programs (two of one insurer) by the union of their paths so a shared fact counts once.

next
object
required

The next question card, the first of questions, or null when every program is settled.

questions
object[]
required

Every open card, in asking order.

ready
string[]
required

The programs that are settled, as programId@version.

changes
object[]
required

Each program whose status differs from previous.

choices
object[]
required

What the person buys across the basket, asked once rather than as cards.

names
object
required

Each list item’s name by its path, such as Policy.vehicles[0]: “the 2020 Toyota RAV4”.

issues
object[]
required

Answers in answers or choices that the basket’s contracts cannot read as sent. Correct each and plan again.

screens
object[]
required

The questions packed into what a host shows at once; next is the first’s first.

progress
object
required

How much is left.

programs
object[]
required