Skip to content

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#

HTTPPOST
POST https://api.{ENV}.dais.com/ioi/v3/converter/key-pairs/intake-structure

Headers#

HeaderValueRequired
Content-Typeapplication/jsonYes
AuthorizationBearer <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
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>"
}'
JSON
{
  "<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.

JSON
{
  "<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)#

FieldTypeDescription
typestringANSWER for the simple string answers shown here.
answerstringThe answer value from the input map.
qidstringThe 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#

HTTPPOST
POST https://api.{ENV}.dais.com/ioi/v3/custom/client/coterie/product/{productId}/config/{configId}/eval

Path Parameters#

ParameterTypeRequiredDescription
productIdUUIDYesUUID of the product to evaluate.
configIdUUIDYesUUID 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
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>"
      }
    ]
  }
}'
JSON
{
  "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#

FieldTypeDescription
ratingResponse.response_variables.$totalFinalPremiumstringDecimal premium amount.
ratingResponse.response_variables.$policyTermLengthstringInteger duration length. For an annual term, "1" represents one year.
ratingResponse.response_variables.$policyTermTypestring"annual" selects the YEAR scale for premium and duration.
quoteResponse.lineItemsarrayCoverage 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.

JSON
{
  "forms": [
    {
      "contentId": "<UUID of the document content ID>",
      "fileName": "<Document filename>",
      "formNumber": "<Form number>",
      "formVersion": "<Form version>",
      "type": "PDF"
    }
  ]
}

Response Fields#

FieldTypeDescription
formsarrayGenerated form references.
forms[].contentIdUUIDIdentifier of the generated form content.
forms[].fileNamestringGenerated filename.
forms[].formNumberstringForm number from its configuration.
forms[].formVersionstringForm version.
forms[].typestringPDF or HTML.