Skip to content

What Valjean will need for this risk

POST
/requirements
curl -X POST "https://api.valjeanspecialty.com/api/agent/v1/requirements" \
-H "Authorization: Bearer $VALJEAN_KEY" \
-H "Content-Type: application/json" \
-d '{"lines":["GL","LL"],"state":"SC","description":"bar and grill"}'

Everything the class needs before a file exists: the class checklist plus markets’ own asks, each with a key to answer by later and an answer type.

Any key (read or read-and-submit).

Media typeapplication/json
object
lines
required
Array<string>
>= 1 items <= 6 items
state
required
string
>= 2 characters <= 40 characters
naics
string
/^[0-9]{2,6}$/
description
string
<= 300 characters

Example

{
"lines": [
"GL",
"LL"
],
"state": "SC",
"description": "bar and grill"
}

OK

Media typeapplication/json
object
class_matched
required
string | null
state
required
string
lines
required
Array<string>
items
required
Array<object>
object
key
required

Answer by this key later (PATCH /submissions/{id}/answers).

string
label
required
string
type
required

Playbook item type: document, field, question or photo.

string
level
required

How much it matters.

string
Allowed values: required sometimes recommended some markets
help
required
string | null
answer
required
object
type
required

How to answer. “file” means upload a document instead.

string
Allowed values: text number money percent yes_no choice date file
options

For type “choice”: the allowed answers.

Array<string>

Example

{
"class_matched": "Hospitality",
"state": "SC",
"lines": [
"GL",
"LL"
],
"items": [
{
"key": "sales_split",
"label": "Annual sales split: food vs liquor",
"type": "field",
"level": "required",
"help": null,
"answer": {
"type": "text"
}
},
{
"key": "hours",
"label": "Hours of operation and closing time",
"type": "question",
"level": "required",
"help": null,
"answer": {
"type": "text"
}
},
{
"key": "loss_runs",
"label": "Currently valued loss runs – 5 years",
"type": "document",
"level": "required",
"help": null,
"answer": {
"type": "file"
}
}
]
}
RateLimit-Policy
string
Example
"per-key";q=120;w=60

The rate limit for this key, as an IETF RateLimit-Policy: 120 requests (q) per 60-second window (w), counted across all of Valjean’s servers. Over it, you get 429 with Retry-After.

Fix the request and send it again (invalid_request, invalid_json).

Media typeapplication/json
object
error
required
object
code
required

Machine-readable code, e.g. invalid_request, read_only, not_found, closed, rate_limited.

string
message
required

Plain-English explanation you can show a person.

string
issues

Validation problems, as “field: problem” (400 invalid_request only).

Array<string>

Example

{
"error": {
"code": "invalid_request",
"message": "Check the request.",
"issues": [
"insured.state: Too small: expected string to have >=2 characters"
]
}
}

Key or token missing, wrong, expired or revoked (unauthorized). Don’t retry: get a new key or sign in again.

Media typeapplication/json
object
error
required
object
code
required

Machine-readable code, e.g. invalid_request, read_only, not_found, closed, rate_limited.

string
message
required

Plain-English explanation you can show a person.

string
issues

Validation problems, as “field: problem” (400 invalid_request only).

Array<string>

Example

{
"error": {
"code": "unauthorized",
"message": "This API key isn't valid. Ask your Valjean broker for a new one."
}
}

Not allowed: read_only (a read key tried to submit), agency_not_active (no signed broker agreement), not_offered (instant quotes are off), forbidden (API access off for the agency). Don’t retry.

Media typeapplication/json
object
error
required
object
code
required

Machine-readable code, e.g. invalid_request, read_only, not_found, closed, rate_limited.

string
message
required

Plain-English explanation you can show a person.

string
issues

Validation problems, as “field: problem” (400 invalid_request only).

Array<string>

Example

{
"error": {
"code": "read_only",
"message": "This key can read only. Ask your Valjean broker for a key that can submit."
}
}

Body or file too large (too_large): JSON bodies up to 64 KB, direct uploads 4 MB, upload links 25 MB.

Media typeapplication/json
object
error
required
object
code
required

Machine-readable code, e.g. invalid_request, read_only, not_found, closed, rate_limited.

string
message
required

Plain-English explanation you can show a person.

string
issues

Validation problems, as “field: problem” (400 invalid_request only).

Array<string>

Example

{
"error": {
"code": "too_large",
"message": "Files over 4 MB need an upload link."
}
}

Too many requests (rate_limited): 120 a minute per key, 30 a minute per IP on public endpoints, counted across all of Valjean’s servers. Wait Retry-After seconds.

Media typeapplication/json
object
error
required
object
code
required

Machine-readable code, e.g. invalid_request, read_only, not_found, closed, rate_limited.

string
message
required

Plain-English explanation you can show a person.

string
issues

Validation problems, as “field: problem” (400 invalid_request only).

Array<string>

Example

{
"error": {
"code": "rate_limited",
"message": "Too many requests. Try again in a minute."
}
}
Retry-After
integer
Example
60

Seconds to wait.

Something went wrong on Valjean’s side (server_error). Safe to retry later; creates are idempotent with client_reference or an Idempotency-Key header.

Media typeapplication/json
object
error
required
object
code
required

Machine-readable code, e.g. invalid_request, read_only, not_found, closed, rate_limited.

string
message
required

Plain-English explanation you can show a person.

string
issues

Validation problems, as “field: problem” (400 invalid_request only).

Array<string>

Example

{
"error": {
"code": "server_error",
"message": "Something went wrong. Try again shortly."
}
}