Utilities
Utility endpoints for data transformation and custom product configuration evaluation.
Convert Key-Pairs to Intake Structure#
Converts a flat key-value map into the structured intake format used throughout the platform for client data, quotes, and events.
Use this when you have answer data in a simple { "key": "value" } format and need to transform it into the intake structure expected by endpoints like PUT /client or POST /event/fire.
Endpoint#
POST https://api.{ENV}.dais.com/ioi/v3/converter/key-pairs/intake-structure
Headers#
| Header | Value | Required |
|---|---|---|
Content-Type | application/json | Yes |
Authorization | Bearer <Access token> or Basic <Base64-encoded API key and secret> | Yes |
x-jwt-assertion | <ID token> | With token authentication |
See Authentication for the headers to use with each authentication method.
Request Body#
A flat JSON object where each key is a question identifier and the value is the answer.
curl --location --request POST 'https://api.{ENV}.dais.com/ioi/v3/converter/key-pairs/intake-structure' \
--header 'Authorization: Basic <Base64-encoded API key and secret>' \
--header 'Content-Type: application/json' \
--data-raw '{
"<Business name question ID>": "<Business name>",
"<Employee count question ID>": "50",
"<State question ID>": "<State code>",
"<Postal code question ID>": "<Postal code>"
}'
{
"<Business name question ID>": "<Business name>",
"<Employee count question ID>": "50",
"<State question ID>": "<State code>",
"<Postal code question ID>": "<Postal code>"
}
Response#
Returns a map of question identifiers to structured answer objects, as used by the client and event APIs. The example below shows the conversion of flat string answers.
{
"<Business name question ID>": {
"type": "ANSWER",
"answer": "<Business name>",
"qid": "<Business name question ID>"
},
"<Employee count question ID>": {
"type": "ANSWER",
"answer": "50",
"qid": "<Employee count question ID>"
},
"<State question ID>": {
"type": "ANSWER",
"answer": "<State code>",
"qid": "<State question ID>"
},
"<Postal code question ID>": {
"type": "ANSWER",
"answer": "<Postal code>",
"qid": "<Postal code question ID>"
}
}
Response Fields (per entry)#
| Field | Type | Description |
|---|---|---|
type | string | ANSWER for the simple string answers shown here. |
answer | string | The answer value from the input map. |
qid | string | The question identifier (same as the input key). |
Evaluate Coterie Product Config#
Evaluates a form configuration for a Coterie product. The endpoint extracts quote premium, duration, and coverage details from the Coterie response, then supplies that quote and the original payload to the configured form evaluation.
Endpoint#
POST https://api.{ENV}.dais.com/ioi/v3/custom/client/coterie/product/{productId}/config/{configId}/eval
Path Parameters#
| Parameter | Type | Required | Description |
|---|---|---|---|
productId | UUID | Yes | UUID of the product to evaluate. |
configId | UUID | Yes | UUID of the configuration form to evaluate. |
Request Body#
Send the Coterie response data needed by the form. The quote extraction reads ratingResponse.response_variables and quoteResponse.lineItems; additional intake fields depend on the configured form. The following example illustrates those structures.
curl --location --request POST 'https://api.{ENV}.dais.com/ioi/v3/custom/client/coterie/product/<UUID of the product ID>/config/<UUID of the configuration ID>/eval' \
--header 'Authorization: Basic <Base64-encoded API key and secret>' \
--header 'Content-Type: application/json' \
--data-raw '{
"userQuoteRequest": {
"legalBusinessName": "<Legal business name>"
},
"ratingResponse": {
"response_variables": {
"$totalFinalPremium": "4200.00",
"$policyTermLength": "1",
"$policyTermType": "annual"
}
},
"quoteResponse": {
"lineItems": [
{
"Amount": 4200.0,
"Description": "<Line item description>"
}
]
}
}'
{
"userQuoteRequest": {
"legalBusinessName": "<Legal business name>"
},
"ratingResponse": {
"response_variables": {
"$totalFinalPremium": "4200.00",
"$policyTermLength": "1",
"$policyTermType": "annual"
}
},
"quoteResponse": {
"lineItems": [
{
"Amount": 4200.0,
"Description": "<Line item description>"
}
]
}
}
Coterie Quote Fields#
| Field | Type | Description |
|---|---|---|
ratingResponse.response_variables.$totalFinalPremium | string | Decimal premium amount. |
ratingResponse.response_variables.$policyTermLength | string | Integer duration length. For an annual term, "1" represents one year. |
ratingResponse.response_variables.$policyTermType | string | "annual" selects the YEAR scale for premium and duration. |
quoteResponse.lineItems | array | Coverage detail items containing Amount and Description. |
If premium or duration extraction fails, the extractor substitutes zero values. If coverage extraction fails, it substitutes an empty list. Supply the expected Coterie structures to avoid those fallbacks.
Response#
Returns 200 OK with generated form references when the evaluation result is available. If the action response has no configuration form evaluation result, the endpoint returns no response body. Do not assume that every successful HTTP response contains a form.
{
"forms": [
{
"contentId": "<UUID of the document content ID>",
"fileName": "<Document filename>",
"formNumber": "<Form number>",
"formVersion": "<Form version>",
"type": "PDF"
}
]
}
Response Fields#
| Field | Type | Description |
|---|---|---|
forms | array | Generated form references. |
forms[].contentId | UUID | Identifier of the generated form content. |
forms[].fileName | string | Generated filename. |
forms[].formNumber | string | Form number from its configuration. |
forms[].formVersion | string | Form version. |
forms[].type | string | PDF or HTML. |