Skip to content

The application question schema for an instant-quote program

GET
/broker/programs/{program_id}/application-schema
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.

program_id
required
string format: uuid
lob
string
state
string
>= 2 characters <= 2 characters

The projected question schema and the program’s shared questions

Media typeapplication/json
object
program_id
required
string format: uuid
market_id
required
string format: uuid
name
required
string
program_category
required
string
Allowed value: instant_quote
contract_version
required
string
Allowed value: structured_v1
schema_fingerprint
required

Content hash of the served schema; changes when the carrier’s questions change. Per-application fingerprints for checkpoints come from the application-workspace.

string
title
string
nullable
description
string
nullable
sections
required
Array<object>
object
key
required
string
label
required
string
questions
required
Array<object>
object
key
required

Stable answer key; use it as the answer key in application checkpoints.

string
label
required
string
type
required

Normalized field type (e.g. text, number, boolean, select, multiselect, date, group, collection).

string
required
required
boolean
options
Array<object>
nullable
object
value
label
string
help
string
nullable
depends_on

Keys of other questions whose answers decide whether this one applies.

Array<string>
nullable
required_when

Conditional requiredness when declared: {field, op (equals|not_equals|in|not_in|truthy|falsy), value}.

object
one_of_group
string
nullable
repeatable
required

True for collections (answer is a list of items shaped by questions).

boolean
questions
Array<object> recursive
schema_version
required

Content hash of questions.

string
questions
required
Array<object>
object
id
required

The program’s own answer path, stable within the set (an object’s parts are <object>.<part>).

string
key
required

Shared answer key: Hedge’s fact key when the question means that fact in the same form, else program.<program_slug>.<id>.

string
label
required
string
help
required
string
nullable
type
required

list: the answer is a JSON array; rows shaped by item_questions, or plain text values when item_questions is absent.

string
Allowed values: text textarea number currency percent integer boolean select multiselect date state address list
options
required

Choices for select / multiselect (empty otherwise). Send value unchanged; it may be a string, number or boolean.

Array<object>
object
value
required
label
required
string
required
required

Required whenever the question is shown.

boolean
show_if
required
Array<object>

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
key
required
string
nullable
op
required
string
Allowed values: eq ne in not_in truthy falsy gt gte lt lte exists any_of all_of
value
required

Comparison value (JSON)

any_item
boolean
reference

A keyed-row lookup Hedge evaluates natively.

object
conditions
Array<object> recursive
required_if

When present, the question is required only while these conditions hold.

Array<object>

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
key
required
string
nullable
op
required
string
Allowed values: eq ne in not_in truthy falsy gt gte lt lte exists any_of all_of
value
required

Comparison value (JSON)

any_item
boolean
reference

A keyed-row lookup Hedge evaluates natively.

object
conditions
Array<object> recursive
one_of_group

An answer to any question in the same group satisfies the group.

string
section
required
string
nullable
assumed_default
required

The answer Hedge would assume when unanswered, when one is fixed in advance; null otherwise (Hedge then decides from the file at quote time).

nullable
prefill_from
required
string
nullable
item_questions
Array<object> recursive
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)