{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/envestnet/json-schema/envestnet-consent-preferences-response-schema.json",
  "title": "ConsentPreferencesResponse",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/envestnet-consents-api-openapi.yml#/components/schemas/ConsentPreferencesResponse",
  "required": [
    "consentId",
    "customDisplayData",
    "preferences"
  ],
  "type": "object",
  "properties": {
    "consentId": {
      "type": "integer",
      "description": "Consent Id generated through POST Consent.",
      "format": "int64"
    },
    "preferences": {
      "$ref": "#/$defs/Preferences"
    },
    "customDisplayData": {
      "$ref": "#/$defs/CustomDisplayData"
    }
  },
  "$defs": {
    "CdrPolicy": {
      "title": "CdrPolicy",
      "required": [
        "description",
        "url"
      ],
      "type": "object",
      "properties": {
        "description": {
          "type": "string",
          "description": "Consumer Data Right Policy"
        },
        "url": {
          "type": "string",
          "description": "https://solutions.yodlee.com/au-cdr.html"
        }
      }
    },
    "ClientTrustedAdvisorTxt": {
      "title": "ClientTrustedAdvisorTxt",
      "required": [
        "description"
      ],
      "type": "object",
      "properties": {
        "description": {
          "type": "string",
          "description": "ClientTrustedAdvisorTxt Description"
        }
      }
    },
    "ConsentConfirmation": {
      "title": "ConsentConfirmation",
      "required": [
        "description",
        "header"
      ],
      "type": "object",
      "properties": {
        "description": {
          "type": "string",
          "description": "Consent confirmation Description"
        },
        "header": {
          "type": "string",
          "description": "Consent confirmation Header"
        }
      }
    },
    "CustomDisplayData": {
      "title": "CustomDisplayData",
      "required": [
        "clientTrustedAdvisorTxt",
        "consentConfirmation",
        "deletePreference",
        "thirdParty",
        "userDataTreatment"
      ],
      "type": "object",
      "properties": {
        "consentConfirmation": {
          "$ref": "#/$defs/ConsentConfirmation"
        },
        "deletePreference": {
          "$ref": "#/$defs/DeletePreference"
        },
        "thirdParty": {
          "$ref": "#/$defs/ThirdParty"
        },
        "clientTrustedAdvisorTxt": {
          "$ref": "#/$defs/ClientTrustedAdvisorTxt"
        },
        "userDataTreatment": {
          "$ref": "#/$defs/UserDataTreatment"
        }
      }
    },
    "DataHandling": {
      "title": "DataHandling",
      "required": [
        "dataList",
        "headerDescription"
      ],
      "type": "object",
      "properties": {
        "dataList": {
          "type": "array",
          "description": "We will apply the CDR de-identificatiion process. <br/> De-identificatied data will be used without further consent.<br/> De-identification of CDR data means your data cannot be associated with your identity after de-identification process takes place.",
          "items": {
            "type": "string"
          }
        },
        "headerDescription": {
          "type": "string",
          "description": "De-identification of data"
        }
      }
    },
    "DeletePreference": {
      "title": "DeletePreference",
      "type": "object",
      "properties": {
        "description": {
          "type": "string",
          "description": "Delete Preference Descritption"
        },
        "alternateDescription": {
          "type": "string",
          "description": "Delete Preference Alternate Descritption"
        },
        "labelDescription": {
          "type": "string",
          "description": "Delete Preference LabelDescritption"
        }
      }
    },
    "Preferences": {
      "title": "Preferences",
      "required": [
        "id",
        "title",
        "type",
        "value"
      ],
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "description": "Id of the preference",
          "format": "int32"
        },
        "label": {
          "type": "string",
          "description": "Detailed description for each preference"
        },
        "title": {
          "type": "string",
          "description": "Type of the preferences <br/> additionalUseOfData<br/> userDataPurge"
        },
        "type": {
          "type": "string",
          "description": "Visual Type of the preference selection"
        },
        "value": {
          "type": "string",
          "description": "Value of the preference"
        }
      }
    },
    "ThirdParty": {
      "title": "ThirdParty",
      "required": [
        "description",
        "header"
      ],
      "type": "object",
      "properties": {
        "description": {
          "type": "string",
          "description": "Third Party Description"
        },
        "header": {
          "type": "string",
          "description": "Third Party Header"
        }
      }
    },
    "UserDataTreatment": {
      "title": "UserDataTreatment",
      "required": [
        "cdrPolicy",
        "dataHandling",
        "description"
      ],
      "type": "object",
      "properties": {
        "dataHandling": {
          "$ref": "#/$defs/DataHandling"
        },
        "cdrPolicy": {
          "$ref": "#/$defs/CdrPolicy"
        },
        "description": {
          "type": "string",
          "description": "After we have finished using your data or you have withdraw your consent to use the data, it will be de-identified as per our"
        }
      }
    }
  }
}