The application question schema for an instant-quote program
const url = 'https://api.hedgespecialty.com/api/v1/broker/programs/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/application-schema';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.hedgespecialty.com/api/v1/broker/programs/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/application-schema \ --header 'Authorization: Bearer <token>'Exactly the questions Hedge’s carrier integration asks for this
program, the schema the carrier application is filed on, projected
for your own application builder: sections of questions with stable
keys, labels, types, options, help, and depends_on visibility
dependencies. Collect answers against these keys, then save them to
the submission’s application via the application-workspace
checkpoint. Optional lob/state check that the program lists that
line / state.
Served from Hedge’s schema cache only, the schema Hedge’s own
quoting already filed on; this read never calls the carrier. Until
Hedge’s first quote with a program the response is 404
code: application_schema_unavailable (the list endpoint’s
application_schema_available tells you in advance). Programs Hedge
quotes itself have no schema: 404 code: no_application_schema
pointing at GET /broker/markets/{market_id}/requirements.
questions (with schema_version) is the same application in the
shared question shape: exactly the questions the Hedge broker
workspace asks for this program, one flat list in order. key is
the shared answer key: Hedge’s fact key where the program’s question
means the same fact in the same form (so one answer can prefill
every program that asks it), otherwise
program.<program_slug>.<id>. show_if / required_if are the
full condition rules, keyed by key. Pass lob for the coverage
being quoted: programs whose questions depend on the products Hedge
selects for a line (Blitz) resolve them from it. schema_version
changes whenever questions change; cache per schema_version.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Query Parameters
Section titled “Query Parameters”Responses
Section titled “Responses”The projected question schema and the program’s shared questions
object
Content hash of the served schema; changes when the carrier’s questions change. Per-application fingerprints for checkpoints come from the application-workspace.
object
object
Stable answer key; use it as the answer key in application checkpoints.
Normalized field type (e.g. text, number, boolean, select, multiselect, date, group, collection).
object
Keys of other questions whose answers decide whether this one applies.
Conditional requiredness when declared: {field, op (equals|not_equals|in|not_in|truthy|falsy), value}.
object
True for collections (answer is a list of items shaped by questions).
Content hash of questions.
object
The program’s own answer path, stable within the set (an object’s parts are <object>.<part>).
Shared answer key: Hedge’s fact key when the question means that fact in the same form, else program.<program_slug>.<id>.
list: the answer is a JSON array; rows shaped by item_questions, or plain text values when item_questions is absent.
Choices for select / multiselect (empty otherwise). Send value unchanged; it may be a string, number or boolean.
object
Required whenever the question is shown.
One condition on another question’s answer, found by that
question’s key. Conditions in a list are ANDed. Semantics: eq
and in compare type and value exactly; ne / not_in are false
for an unanswered question; truthy is true unless the answer is
null, false, 0, “” or an empty list or object; falsy is exactly
false, 0 or “” (an unanswered question is not falsy); gt /
gte / lt / lte compare numbers; exists is whether the
question is answered. any_of / all_of group conditions (then
key is null). any_item: the answer is a list and one item must
satisfy op / value. A condition whose key no question carries
refers to a fact Hedge sets itself; treat it as unanswered.
object
Comparison value (JSON)
A keyed-row lookup Hedge evaluates natively.
object
When present, the question is required only while these conditions hold.
One condition on another question’s answer, found by that
question’s key. Conditions in a list are ANDed. Semantics: eq
and in compare type and value exactly; ne / not_in are false
for an unanswered question; truthy is true unless the answer is
null, false, 0, “” or an empty list or object; falsy is exactly
false, 0 or “” (an unanswered question is not falsy); gt /
gte / lt / lte compare numbers; exists is whether the
question is answered. any_of / all_of group conditions (then
key is null). any_item: the answer is a list and one item must
satisfy op / value. A condition whose key no question carries
refers to a fact Hedge sets itself; treat it as unanswered.
object
Comparison value (JSON)
A keyed-row lookup Hedge evaluates natively.
object
An answer to any question in the same group satisfies the group.
The answer Hedge would assume when unanswered, when one is fixed in advance; null otherwise (Hedge then decides from the file at quote time).
Example
{ "program_category": "instant_quote", "contract_version": "structured_v1", "questions": [ { "type": "text", "show_if": [ { "op": "eq" } ], "required_if": [ { "op": "eq" } ] } ]}Program not visible to your brokerage or not available for the given line/state (plain detail); not an instant-quote program (code: no_application_schema); or no schema cached yet (code: application_schema_unavailable)