Skip to main content
POST
Fill a library template's draft

Authorizations

Authorization
string
header
required

The org's platform API key.

Path Parameters

id
string
required

The draft id. The first fill creates the draft under this id; it is 1 to 200 letters, digits, '_', '.', ':' or '-'.

Body

application/json
values
object[] | null
required

The values to apply, each with its source. A value the template cannot take comes back in problems and the rest apply.

account
string

The account the document is about, admitted under the caller's scope. A first fill with no account starts a draft about no account on file: it starts from the template's fixed values, and only the seat that made it reads, revises or downloads it. On a revision of that seat draft, an account moves the draft onto it, admitted and read as a first fill is; a draft already on an account keeps it and another is refused.

comparison
string

A saved quote comparison on the account (its id, as quote comparison answers it), read as the caller. On the first fill of a proposal its quote values (carriers, premiums, terms, markets, the premium summary) start the draft, each sourced to the quote document or the comparison; the values sent fill the rest. A comparison the caller cannot read answers comparison_not_found; one on another account, or tied to no account and saved by another user, comparison_other_account; one that fills no value comparison_not_applied, and nothing is saved; on a template of one quote per line, several quotes for a line with no carrier sent answer comparison_options with the lines, and nothing is saved; on a new Renewal Proposal, one quote that renews no policy the account holds answers comparison_new_business, and nothing is saved. The answer's comparison names how many values it filled and its gaps (a premium no template line takes, a line with no carrier chosen). On a revision it starts the same draft again from the account and this comparison: the earlier quotes' values go, the values the producer wrote or the Assistant derived stay unless sent again, and the draft keeps its sections.

Maximum string length: 200
dry_run
boolean

Compute the fill and answer it without saving the draft.

order_sections
string[] | null

Sections in the order they print, by id or title: the ones named lead in that order and the rest follow in the draft's order. A template of fixed pages moves the whole page a named part is on.

Maximum array length: 60
policy_numbers
string[] | null

Policy numbers the producer named. On a first fill or revision, the account's own matching policies select the known values; none matching answers policy_not_found without changing the draft.

Maximum array length: 10
preset
string

A starting point of the template, by id or name (the Renewal Proposal's Brief, Standard, Full or Short; the Commercial and Personal Proposal's Short or Full): the draft prints the sections it keeps. Remove and restore sections apply after it. A template without that starting point is refused with the ones it has.

Maximum string length: 60
remove_sections
string[] | null

Sections to take out, by id or title.

Maximum array length: 60
restore_sections
string[] | null

Sections to put back, by id or title.

Maximum array length: 60
template
string

The library template id (template.list). Required on the first fill, which creates the draft.

Response

OK

data
any
required