Skip to content

Product Configs

All configs for a product are retrieved in a single request. They are divided into arrays corresponding to the different options in the sidebar of the product configuration screen. Every config follows the same basic data structure, but the spec may differ.

POST: https://api.{ENV}.dais.com/ioi/v3/product/config/all

curl --location --request POST 'http://api.dev.dais.com/ioi/v3/product/config/all' \
--header 'Authorization: Basic <yourAuthHere>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "productId": "<productId>"
}'
{
    "productId": "3847d175-9ac3-440a-8e53-0e6c54bf6546"
}

Request fields:

PropertyRequiredDescription
productIdtrueUUID of the product to retrieve configs for

Base Config Structure

"<config type>": [
  {
    "id": "a74eedf4-94a9-4b82-b19c-2fbc0cc99138",
    "configIdentity": "<config type>",
    "organizationId": "44677a4c-62ed-40b6-b36f-59bca5088f0c",
    "productId": "3847d175-9ac3-440a-8e53-0e6c54bf6546",
    "spec": {<depends on config type>},
  "updatedTimestamp": "2020-03-21T16:08:13.289Z",
  "version": 0,
  "lastUpdatedBy": {...}
  },
  {...}
]

Config fields:

PropertyDescription
idUUID for this config. Use this value as configId when firing events that require it.
configIdentityWill always be the same as the config type
organizationIdUUID for the organization which owns this config
productIdUUID for the product this config is for
specMay contain additional fields which only apply to some config types. See below
updatedTimestampTimestamp when this config was last updated
versionCurrent version number of this config
lastUpdatedByDetails on the user who last updated this config

POLICY_FORM

The POLICY_FORM array will contain configs for all forms added to a product.

"spec": {
  "name": "Policy Form 1",
  "type": "",
  "formType": "POLICY",
  "productId": "4acaa79e-3645-4fd1-a199-203f8efbd421",
  "ocrMapping": {...}
}

Spec fields:

PropertyDescription
nameForm name
typeFor internal use
formTypeForm type. This corresponds to the options available in the platform when adding a form in product configuration
productIdUUID for this form
ocrMappingFor internal use

ENDORSEMENTS

The ENDORSEMENTS array will contain configs for all endorsement options added to a product.

"spec": {
  "title": "Endorsement 1",
  "description": "Endorsement 1 description",
  "enableEndorsementRules": false,
  "allowEndorsementsInThePast": false
}

Spec fields:

PropertyDescription
titleName of the endorsement option
descriptionDescription of the endorsement option
enableEndorsementRulesBoolean showing whether eligibility requirements have been enabled for this endorsement option
allowEndorsementsInThePastBoolean showing whether backdating is enabled for this endorsement option

CANCELLATIONS

The CANCELLATIONS array will contain configs for all cancellation reasons added to a product.

"spec": {
    "title": "Cancellation Reason 1",
    "description": "Description of cancellation reason 1.",
    "cancellationConfigId": "687c6334-8305-46be-9474-9ea410d50181",
    "cancellationProductId": "70394ed0-bc6c-4573-8f62-60e93d747cf7",
    "enableCancellationRules": false,
    "enableCancellationProduct": true
}

Spec fields:

PropertyDescription
titleName of the cancellation reason
descriptionDescription of the cancellation reason
cancellationConfigIdUUID of the cancellation form config id
cancellationProductIdUUID of the cancellation form productId. This corresponds to productId in the associated form's spec in the POLICY_FORM array.
enableCancellationRulesBoolean showing whether cancellation rules have been enabled
enableCancellationProductBoolean showing whether a cancellation product (form) has been added to the cancellation reason