Will Valjean likely place it
curl -X POST "https://api.valjeanspecialty.com/api/agent/v1/appetite" \ -H "Authorization: Bearer $VALJEAN_KEY" \ -H "Content-Type: application/json" \ -d '{"lines":["GL","LL"],"state":"SC","description":"seafood restaurant with a full bar"}'const res = await fetch("https://api.valjeanspecialty.com/api/agent/v1/appetite", { method: "POST", headers: { Authorization: `Bearer ${process.env.VALJEAN_KEY}`, "Content-Type": "application/json" }, body: JSON.stringify({ "lines": [ "GL", "LL" ], "state": "SC", "description": "seafood restaurant with a full bar" }),});console.log(await res.json());import os, requests
res = requests.post( "https://api.valjeanspecialty.com/api/agent/v1/appetite", headers={"Authorization": f"Bearer {os.environ['VALJEAN_KEY']}"}, json={ "lines": [ "GL", "LL" ], "state": "SC", "description": "seafood restaurant with a full bar" },)print(res.json())Checks Valjean’s appetite on file for the lines, state and class. Counts only markets Valjean can reach (appointed, or at most a possible fit while an appointment is under way). Never names a market. Anything but a good fit includes how_to_send.
Any key (read or read-and-submit).
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
Example
{ "lines": [ "GL", "LL" ], "state": "SC", "description": "seafood restaurant with a full bar"}Responses
Section titled “Responses”OK
object
“unknown” means no appetite is on file for these lines yet: fall back to your own guidance.
One sentence you can show as is.
Markets on file that could write it, capped at 5. Market names are never returned.
E.g. “2 markets”, “5+ markets”, “Not on file yet”.
object
Line code.
What Valjean will need for this risk, in plain words.
The class Valjean matched the risk to, if any.
Two-letter state code.
Lines in the request Valjean didn’t recognise.
Present whenever the fit isn’t “good”: a broker reviews every submission, including ones outside the appetite on file.
object
Where to email the risk instead.
What to include in that email.
Example
{ "fit": "possible", "appetite_on_file": true, "headline": "Possible fit in SC: a broker will confirm.", "market_count": 2, "market_count_label": "2 markets", "lines": [ { "line": "GL", "fit": "good" }, { "line": "LL", "fit": "possible" } ], "notes": [], "needs": [ "Annual sales split: food vs liquor", "Hours of operation and closing time" ], "class_matched": "Hospitality", "state": "SC", "how_to_send": { "email": "submissions@valjeanspecialty.com", "include": [ "Insured name, address and a short description of operations", "Five years of currently valued loss runs" ], "note": "A broker reviews every submission, including ones outside the appetite on file." }}Headers
Section titled “Headers”Example
"per-key";q=120;w=60The 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).
object
object
Machine-readable code, e.g. invalid_request, read_only, not_found, closed, rate_limited.
Plain-English explanation you can show a person.
Validation problems, as “field: problem” (400 invalid_request only).
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.
object
object
Machine-readable code, e.g. invalid_request, read_only, not_found, closed, rate_limited.
Plain-English explanation you can show a person.
Validation problems, as “field: problem” (400 invalid_request only).
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.
object
object
Machine-readable code, e.g. invalid_request, read_only, not_found, closed, rate_limited.
Plain-English explanation you can show a person.
Validation problems, as “field: problem” (400 invalid_request only).
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.
object
object
Machine-readable code, e.g. invalid_request, read_only, not_found, closed, rate_limited.
Plain-English explanation you can show a person.
Validation problems, as “field: problem” (400 invalid_request only).
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.
object
object
Machine-readable code, e.g. invalid_request, read_only, not_found, closed, rate_limited.
Plain-English explanation you can show a person.
Validation problems, as “field: problem” (400 invalid_request only).
Example
{ "error": { "code": "rate_limited", "message": "Too many requests. Try again in a minute." }}Headers
Section titled “Headers”Example
60Seconds 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.
object
object
Machine-readable code, e.g. invalid_request, read_only, not_found, closed, rate_limited.
Plain-English explanation you can show a person.
Validation problems, as “field: problem” (400 invalid_request only).
Example
{ "error": { "code": "server_error", "message": "Something went wrong. Try again shortly." }}
