Before you start
- An API key for a member who can create and edit underwriting submissions, in a workspace with underwriting turned on. Ask Effective to turn it on.
- A released program that calculates a premium. This guide uses the synthetic staffing program
from Turn guidelines into a program,
uploaded and released as
example-staffing. - The key’s member holds the program’s
uwrole. Values are written as that member, in that role. curl,jqanduuidgen.
ready is true when every condition in conditions holds. Each one that doesn’t says what is
missing in detail, such as a program role your key’s member doesn’t hold. acts lists the
program’s quote (offer), bind (accept) and decline (refuse) acts.
Create the submission
Create the submission on the program. Every create needs a newIdempotency-Key, which becomes
the submission’s id.
Add the broker’s documents
Brokers send a submission as files, or as an email with the files attached. Use the option that matches what you received. Both end with the documents on the submission. Save these two synthetic files for either option:application.txt
loss-runs.txt
Option 1: upload the files
Send the files in one request, asfile parts of a multipart form:
documents, any file the store rejected, and extraction: whether
the files started one.
Idempotency-Key and the same
files adds nothing more. One request takes up to 20 files and 25 MiB. For a larger file, use the
three-call upload.
Option 2: add the broker’s email
Save the broker’s email as an.eml file. This synthetic one carries both files as attachments:
broker-email.eml
.eml as in option 1, with type message/rfc822, and keep its document’s id as
EML_ID:
externalId:
documents: the .eml itself, its body as Email.txt, and each
attachment as a document of its own. Sending the same externalId again answers the same
message.
Brokers can also email the program’s intake address, which makes the submission and adds the
email by itself. See Take in submissions by email.
Read the extraction
Where the workspace starts an extraction when documents arrive, adding them started one. Read the submission’slatestExtraction for its id:
status is completed, failed or cancelled. While it’s
queued or running, wait the seconds in its Retry-After header before reading again.
documents and what it proposes in
result.proposals, each with the place it read it:
failure.code and
failure.message, then start a new one. To be told when an extraction ends instead of reading it,
subscribe a webhook endpoint to
underwriting_submission.extraction.completed and underwriting_submission.extraction.failed.
Accept the proposals
Check the proposals against their quotes, then accept them.{ "all": true } accepts every valid
proposal that isn’t in conflict; to accept some, name them in paths.
accepted, and those skipped with why. Each accepted value is
written to the submission with the quote it was read from.
Set the underwriter’s values
Set any input the documents don’t answer. The staffing program reservespolicy.experience for
the underwriter, so the extraction doesn’t propose it, and it needs a reason in because:
because, answers 422 log_refused with
REASON_REQUIRED.
Read the premium
Get the submission.stage says where it stands, and rating what the program computes:
ready_to_quote, with a premium of
$5,000:
needs_review or needs_info,
questions lists each input the program still asks, the role that answers it, and what the
extraction proposed for it; outstanding lists what the extraction left open. referred means a
rule waits for a sign-off, and ineligible that the answers break a rule, with each one in
declines.
Quote
When the stage isready_to_quote, quote the submission. Send rating.seq as basedOn, so the
quote is refused if the values changed since you read the premium:
quoted, with the quote in quotes:
q1, q2 and so on unless you
send a name. A quote stands while the values it was given on stay the same. The request uses
the program’s offer act; where the program declares several, name one in act.
Bind or decline
Bind a quote that stands, based on the latestlog.seq:
bound. To decline instead, send why in because:
declined. Both end its log. A 409 conflict means a value changed after
the basedOn entry: read the submission again. A 422 log_refused names why the program refused
the act, such as NO_OFFER for a quote that no longer stands, or NOT_DECLINABLE when the
program allows a decline only for a submission its rules found ineligible.
Follow your submissions
List submissions at a stage, newest first, to find the ones that need you:limit submissions and
still return a nextCursor. Keep reading until there is none.
To be told instead, subscribe a webhook endpoint to
underwriting_submission.updated. It is sent each time a value or a decision is written to a
submission. It carries the log’s status and seq; read the submission at subject.$uri for its
stage.
Who can act
Your API key accepts proposals, sets values, quotes, binds and declines as the member it belongs to, in the program role that member holds. A member with no role of the program gets403 no_program_role; a workspace administrator can act in any of its roles. See
Rule on the proposals.