curl --request POST \
--url https://api.usenexio.com/documents/template-drafts/{id}/fill \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"values": [
{
"field": "<string>",
"value": "<unknown>"
}
],
"account": "<string>",
"comparison": "<string>",
"dry_run": true,
"order_sections": [
"<string>"
],
"policy_numbers": [
"<string>"
],
"preset": "<string>",
"remove_sections": [
"<string>"
],
"restore_sections": [
"<string>"
],
"template": "<string>"
}
'import requests
url = "https://api.usenexio.com/documents/template-drafts/{id}/fill"
payload = {
"values": [
{
"field": "<string>",
"value": "<unknown>"
}
],
"account": "<string>",
"comparison": "<string>",
"dry_run": True,
"order_sections": ["<string>"],
"policy_numbers": ["<string>"],
"preset": "<string>",
"remove_sections": ["<string>"],
"restore_sections": ["<string>"],
"template": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
values: [{field: '<string>', value: '<unknown>'}],
account: '<string>',
comparison: '<string>',
dry_run: true,
order_sections: ['<string>'],
policy_numbers: ['<string>'],
preset: '<string>',
remove_sections: ['<string>'],
restore_sections: ['<string>'],
template: '<string>'
})
};
fetch('https://api.usenexio.com/documents/template-drafts/{id}/fill', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": "<unknown>"
}{
"code": "INVALID_ARGUMENT",
"request_id": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>",
"details": "<unknown>",
"errors": [
{
"message": "<string>",
"location": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"reason": "<string>",
"retry_after_ms": 123
}{
"code": "INVALID_ARGUMENT",
"request_id": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>",
"details": "<unknown>",
"errors": [
{
"message": "<string>",
"location": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"reason": "<string>",
"retry_after_ms": 123
}{
"code": "INVALID_ARGUMENT",
"request_id": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>",
"details": "<unknown>",
"errors": [
{
"message": "<string>",
"location": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"reason": "<string>",
"retry_after_ms": 123
}{
"code": "INVALID_ARGUMENT",
"request_id": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>",
"details": "<unknown>",
"errors": [
{
"message": "<string>",
"location": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"reason": "<string>",
"retry_after_ms": 123
}{
"code": "INVALID_ARGUMENT",
"request_id": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>",
"details": "<unknown>",
"errors": [
{
"message": "<string>",
"location": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"reason": "<string>",
"retry_after_ms": 123
}{
"code": "INVALID_ARGUMENT",
"request_id": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>",
"details": "<unknown>",
"errors": [
{
"message": "<string>",
"location": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"reason": "<string>",
"retry_after_ms": 123
}{
"code": "INVALID_ARGUMENT",
"request_id": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>",
"details": "<unknown>",
"errors": [
{
"message": "<string>",
"location": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"reason": "<string>",
"retry_after_ms": 123
}{
"code": "INVALID_ARGUMENT",
"request_id": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>",
"details": "<unknown>",
"errors": [
{
"message": "<string>",
"location": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"reason": "<string>",
"retry_after_ms": 123
}{
"code": "INVALID_ARGUMENT",
"request_id": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>",
"details": "<unknown>",
"errors": [
{
"message": "<string>",
"location": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"reason": "<string>",
"retry_after_ms": 123
}Fill a library template's draft
Starts a library template’s draft for an account, or revises one. The first fill names the template and the account, admitted under the caller’s scope; the draft starts from the template’s fixed values and the known values the account’s records hold, read as the caller, and the values sent apply over them, each with its source. A revision sends only what changes. The answer is the draft as its card shows it, what applied, what filled itself, where the values came from and the problems; named policies that match none answer policy_not_found with the account’s policies. dry_run computes the same answer and saves nothing. Nothing is filed or sent.
curl --request POST \
--url https://api.usenexio.com/documents/template-drafts/{id}/fill \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"values": [
{
"field": "<string>",
"value": "<unknown>"
}
],
"account": "<string>",
"comparison": "<string>",
"dry_run": true,
"order_sections": [
"<string>"
],
"policy_numbers": [
"<string>"
],
"preset": "<string>",
"remove_sections": [
"<string>"
],
"restore_sections": [
"<string>"
],
"template": "<string>"
}
'import requests
url = "https://api.usenexio.com/documents/template-drafts/{id}/fill"
payload = {
"values": [
{
"field": "<string>",
"value": "<unknown>"
}
],
"account": "<string>",
"comparison": "<string>",
"dry_run": True,
"order_sections": ["<string>"],
"policy_numbers": ["<string>"],
"preset": "<string>",
"remove_sections": ["<string>"],
"restore_sections": ["<string>"],
"template": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
values: [{field: '<string>', value: '<unknown>'}],
account: '<string>',
comparison: '<string>',
dry_run: true,
order_sections: ['<string>'],
policy_numbers: ['<string>'],
preset: '<string>',
remove_sections: ['<string>'],
restore_sections: ['<string>'],
template: '<string>'
})
};
fetch('https://api.usenexio.com/documents/template-drafts/{id}/fill', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": "<unknown>"
}{
"code": "INVALID_ARGUMENT",
"request_id": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>",
"details": "<unknown>",
"errors": [
{
"message": "<string>",
"location": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"reason": "<string>",
"retry_after_ms": 123
}{
"code": "INVALID_ARGUMENT",
"request_id": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>",
"details": "<unknown>",
"errors": [
{
"message": "<string>",
"location": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"reason": "<string>",
"retry_after_ms": 123
}{
"code": "INVALID_ARGUMENT",
"request_id": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>",
"details": "<unknown>",
"errors": [
{
"message": "<string>",
"location": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"reason": "<string>",
"retry_after_ms": 123
}{
"code": "INVALID_ARGUMENT",
"request_id": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>",
"details": "<unknown>",
"errors": [
{
"message": "<string>",
"location": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"reason": "<string>",
"retry_after_ms": 123
}{
"code": "INVALID_ARGUMENT",
"request_id": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>",
"details": "<unknown>",
"errors": [
{
"message": "<string>",
"location": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"reason": "<string>",
"retry_after_ms": 123
}{
"code": "INVALID_ARGUMENT",
"request_id": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>",
"details": "<unknown>",
"errors": [
{
"message": "<string>",
"location": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"reason": "<string>",
"retry_after_ms": 123
}{
"code": "INVALID_ARGUMENT",
"request_id": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>",
"details": "<unknown>",
"errors": [
{
"message": "<string>",
"location": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"reason": "<string>",
"retry_after_ms": 123
}{
"code": "INVALID_ARGUMENT",
"request_id": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>",
"details": "<unknown>",
"errors": [
{
"message": "<string>",
"location": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"reason": "<string>",
"retry_after_ms": 123
}{
"code": "INVALID_ARGUMENT",
"request_id": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>",
"details": "<unknown>",
"errors": [
{
"message": "<string>",
"location": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"reason": "<string>",
"retry_after_ms": 123
}Path Parameters
Body
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.
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.
200A 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.
60