Record the agency's structured answers (partner integrations only)
const url = 'https://api.hedgespecialty.com/api/v1/broker/submissions/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/answers';const options = { method: 'POST', headers: { 'Idempotency-Key': 'example', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"answers":[{"key":"example","value":"example","source":"api_program","program_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","question_id":"example"}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.hedgespecialty.com/api/v1/broker/submissions/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/answers \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'Idempotency-Key: example' \ --data '{ "answers": [ { "key": "example", "value": "example", "source": "api_program", "program_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "question_id": "example" } ] }'For an API partner acting for your brokerage (a token carrying the
partner claim, with broker_submit) on a submission that partner
created, before or after finalize. Any other caller, or a submission
the partner did not create, gets 404.
Each answer is checked, and only a key a question carries is ever
recorded. An api_program answer is checked against the program’s
questions (GET /broker/programs/{program_id}/application-schema):
by question_id, whose question’s key it must send, or by key
alone when one question carries it. Option values are the program’s
own JSON values and are compared exactly (300000 is not
"300000"). A hedge_questions answer is checked against the Hedge
questions (POST /broker/hedge-questions) by key; a select there
takes an option value or its label. Values are type-checked. Program
answers may address only the programs of a rater file, or of a
standard file’s own lanes. An accepted answer is recorded on the
submission as the agency’s own answer under its key, which every
Hedge model, carrier application and rendered supplemental reads. A
program answer also reaches that program’s live carrier session once
one exists. Limits: 500 answers per request, 4,000 characters per
text answer, 20,000 characters of JSON per value (250,000 for a list
value such as a carrier’s location rows).
Idempotency-Key (at most 128 characters) is required. Retrying the
same key with the same body returns the first result; the same key
with a different body is a 409.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Header Parameters
Section titled “Header Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”object
object
JSON value typed per the question.
Required for api_program.
Responses
Section titled “Responses”The accepted count and each refused answer
object
object
Example
{ "rejected": [ { "reason_code": "unknown_key" } ]}Token lacks the broker_submit scope
Not a partner token
idempotency_key_reused (same key, different body) or answers_in_progress (retry the same request)
idempotency_key_required, idempotency_key_invalid, or a body validation error