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:
Property | Required | Description |
---|---|---|
productId | true | UUID 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:
Property | Description |
---|---|
id | UUID for this config. Use this value as configId when firing events that require it. |
configIdentity | Will always be the same as the config type |
organizationId | UUID for the organization which owns this config |
productId | UUID for the product this config is for |
spec | May contain additional fields which only apply to some config types. See below |
updatedTimestamp | Timestamp when this config was last updated |
version | Current version number of this config |
lastUpdatedBy | Details 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:
Property | Description |
---|---|
name | Form name |
type | For internal use |
formType | Form type. This corresponds to the options available in the platform when adding a form in product configuration |
productId | UUID for this form |
ocrMapping | For 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:
Property | Description |
---|---|
title | Name of the endorsement option |
description | Description of the endorsement option |
enableEndorsementRules | Boolean showing whether eligibility requirements have been enabled for this endorsement option |
allowEndorsementsInThePast | Boolean 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:
Property | Description |
---|---|
title | Name of the cancellation reason |
description | Description of the cancellation reason |
cancellationConfigId | UUID of the cancellation form config id |
cancellationProductId | UUID of the cancellation form productId . This corresponds to productId in the associated form's spec in the POLICY_FORM array. |
enableCancellationRules | Boolean showing whether cancellation rules have been enabled |
enableCancellationProduct | Boolean showing whether a cancellation product (form) has been added to the cancellation reason |