Skip to main content
Your system can take a broker’s submission from documents to a bound quote without anyone opening Effective. You create the submission and add the broker’s files or email; an extraction reads them. You accept what it proposes, read the premium, then quote, bind or decline. All of it uses your API key.

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 uw role. Values are written as that member, in that role.
  • curl, jq and uuidgen.
The submission operations are alpha. Check the program is ready for your key before you send submissions:
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 new Idempotency-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, as file parts of a multipart form:
The response lists the new documents, any file the store rejected, and extraction: whether the files started one.
The response is abbreviated and illustrative. A retry with the same 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
Upload the .eml as in option 1, with type message/rfc822, and keep its document’s id as EML_ID:
Then add it to the submission as the broker’s message, with its Message-ID as externalId:
The response lists the email’s 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’s latestExtraction for its id:
If it’s empty, no extraction started. Start one after the last document is added. An empty request reads every document on the submission:
Starting one yourself is safe even when one started on arrival: if an extraction is running, yours waits behind it and reads the documents as they are when it starts. The extraction you started always covers every document. Read the extraction until its status is completed, failed or cancelled. While it’s queued or running, wait the seconds in its Retry-After header before reading again.
A completed extraction lists what it read in documents and what it proposes in result.proposals, each with the place it read it:
The response is abbreviated and illustrative. For a failed extraction, read 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.
The response lists the 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 reserves policy.experience for the underwriter, so the extraction doesn’t propose it, and it needs a reason in because:
An input reserved for a role, sent without 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:
With every input answered, the staffing submission is ready_to_quote, with a premium of $5,000:
The response is abbreviated and illustrative. While the stage is 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 is ready_to_quote, quote the submission. Send rating.seq as basedOn, so the quote is refused if the values changed since you read the premium:
The response is the submission, now quoted, with the quote in quotes:
The response is abbreviated and illustrative. Quotes are named 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 latest log.seq:
The submission is then bound. To decline instead, send why in because:
The submission is then 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:
The stage filter is applied to each page, so a page can hold fewer than 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 gets 403 no_program_role; a workspace administrator can act in any of its roles. See Rule on the proposals.