{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/envestnet/json-schema/envestnet-provider-account-request-schema.json",
  "title": "ProviderAccountRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/envestnet-provider-accounts-api-openapi.yml#/components/schemas/ProviderAccountRequest",
  "required": [
    "field"
  ],
  "type": "object",
  "properties": {
    "consentId": {
      "type": "integer",
      "description": "Consent Id generated for the request through POST Consent.<br><br><b>Endpoints</b>:<ul><li>POST Provider Account</li><li>PUT Provider Account</li></ul>",
      "format": "int64"
    },
    "preferences": {
      "$ref": "#/$defs/ProviderAccountPreferences"
    },
    "aggregationSource": {
      "type": "string",
      "enum": [
        "SYSTEM",
        "USER"
      ]
    },
    "field": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Field"
      }
    },
    "datasetName": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "BASIC_AGG_DATA",
          "ADVANCE_AGG_DATA",
          "ACCT_PROFILE",
          "DOCUMENT"
        ]
      }
    },
    "dataset": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ProvidersDataset"
      }
    }
  },
  "$defs": {
    "Attribute": {
      "title": "Attribute",
      "type": "object",
      "properties": {
        "container": {
          "type": "array",
          "description": "Containers for which the attributes are supported.<br><br><b>Endpoints</b>:<ul><li>GET providers</li><li>GET providers/{providerId}</li></ul>",
          "items": {
            "type": "string",
            "enum": [
              "bank",
              "creditCard",
              "investment",
              "insurance",
              "loan",
              "reward",
              "bill",
              "realEstate",
              "otherAssets",
              "otherLiabilities"
            ]
          }
        },
        "fromDate": {
          "type": "string",
          "description": "Applicable only to EBILLS and STATEMENTS attributes of DOCUMENT dataset.<br><br><b>Endpoints</b>:<ul><li>POST providerAccounts</li><li>PUT providerAccounts</li></ul>",
          "readOnly": true
        },
        "toFinYear": {
          "type": "string",
          "description": "Applicable only to TAX attribute of DOCUMENT dataset.<br><br><b>Endpoints</b>:<ul><li>POST providerAccounts</li><li>PUT providerAccounts</li></ul>",
          "readOnly": true
        },
        "fromFinYear": {
          "type": "string",
          "description": "Applicable only to TAX attribute of DOCUMENT dataset.<br><br><b>Endpoints</b>:<ul><li>POST providerAccounts</li><li>PUT providerAccounts</li></ul>",
          "readOnly": true
        },
        "containerAttributes": {
          "$ref": "#/$defs/ContainerAttributes"
        },
        "toDate": {
          "type": "string",
          "description": "Applicable only to EBILLS and STATEMENTS attributes of DOCUMENT dataset.<br><br><b>Endpoints</b>:<ul><li>POST providerAccounts</li><li>PUT providerAccounts</li></ul>",
          "readOnly": true
        },
        "name": {
          "type": "string",
          "description": "Attributes that are supported for a dataset.<br><br><b>Endpoints</b>:<ul><li>GET providers</li><li>GET providers/{providerId}</li></ul>",
          "enum": [
            "BASIC_ACCOUNT_INFO",
            "TRANSACTIONS",
            "STATEMENTS",
            "HOLDINGS",
            "ACCOUNT_DETAILS",
            "TAX",
            "EBILLS",
            "FULL_ACCT_NUMBER",
            "BANK_TRANSFER_CODE",
            "HOLDER_NAME",
            "HOLDER_DETAILS",
            "PAYMENT_PROFILE",
            "PAYMENT_DETAILS",
            "INTEREST_DETAILS",
            "COVERAGE"
          ]
        }
      }
    },
    "ContainerAttributes": {
      "title": "ContainerAttributes",
      "type": "object",
      "properties": {
        "BANK": {
          "$ref": "#/$defs/TransactionDays"
        },
        "LOAN": {
          "$ref": "#/$defs/TransactionDays"
        },
        "CREDITCARD": {
          "$ref": "#/$defs/TransactionDays"
        },
        "INVESTMENT": {
          "$ref": "#/$defs/TransactionDays"
        },
        "INSURANCE": {
          "$ref": "#/$defs/TransactionDays"
        }
      }
    },
    "Field": {
      "title": "Field",
      "type": "object",
      "properties": {
        "image": {
          "type": "string",
          "description": "Image displayed at the endsite.<br><br><b>Endpoints</b>:<ul><li>GET providerAccounts/{providerAccountId}</li></ul>"
        },
        "prefix": {
          "type": "string",
          "description": "The prefix string that has to be displayed before the field value.<br><br><b>Endpoints</b>:<ul><li>GET providerAccounts/{providerAccountId}</li><li>GET providers/{providerId}</li></ul>",
          "readOnly": true
        },
        "minLength": {
          "type": "integer",
          "description": "The minimum length of the login form field.<br><br><b>Endpoints</b>:<ul><li>GET providerAccounts/{providerAccountId}</li><li>GET providers/{providerId}</li></ul>",
          "format": "int64",
          "readOnly": true
        },
        "valueEditable": {
          "type": "string",
          "description": "Indicates whether the field is editable or not.<br><br><b>Endpoints</b>:<ul><li>GET providerAccounts/{providerAccountId}</li><li>GET providers/{providerId}</li></ul>",
          "readOnly": true
        },
        "isOptional": {
          "type": "boolean",
          "description": "Indicates if a field is an optional field or a mandatory field.<br><br><b>Endpoints</b>:<ul><li>GET providerAccounts/{providerAccountId}</li><li>GET providers/{providerId}</li></ul>",
          "readOnly": true
        },
        "suffix": {
          "type": "string",
          "description": "The suffix string that has to be displayed next to the field value.<br><br><b>Endpoints</b>:<ul><li>GET providerAccounts/{providerAccountId}</li><li>GET providers/{providerId}</li></ul>",
          "readOnly": true
        },
        "type": {
          "type": "string",
          "description": "This indicates the display type of the field. For example, text box, image, etc. <br><br><b>Endpoints</b>:<ul><li>GET providerAccounts/{providerAccountId}</li><li>GET providers/{providerId}</li></ul><b>Applicable Values</b><br>",
          "readOnly": true,
          "enum": [
            "text",
            "password",
            "options",
            "checkbox",
            "radio",
            "image",
            "option"
          ]
        },
        "isValueProvided": {
          "type": "boolean",
          "description": "Indicates that the answer to the security question already exists in the Yodlee system.Persuading the user to provide the answer to the security question again during the edit-credential flow can be avoided.<br><br><br><b>Endpoints</b>:<ul><li>GET providerAccounts?include=questions</li><li>GET providerAccounts/{providerAccountId}? include=questions</li></ul>",
          "readOnly": true
        },
        "name": {
          "type": "string",
          "description": "Name of the field.<br><br><b>Endpoints</b>:<ul><li>GET providerAccounts/{providerAccountId}</li><li>GET providers/{providerId}</li></ul>",
          "readOnly": true
        },
        "id": {
          "maxLength": 2147483647,
          "minLength": 1,
          "type": "string",
          "description": "Identifier for the field.<br><br><b>Endpoints</b>:<ul><li>GET providerAccounts/{providerAccountId}</li><li>GET providers/{providerId}</li></ul>"
        },
        "value": {
          "type": "string",
          "description": "Value expected from the user for the field. This will be blank and is expected to be filled and sent back when submitting the login or MFA information.<br><br><b>Endpoints</b>:<ul><li>GET providerAccounts/{providerAccountId}</li><li>GET providers/{providerId}</li></ul>"
        },
        "maxLength": {
          "type": "integer",
          "description": "The maximum length of the login form field.<br><br><b>Endpoints</b>:<ul><li>GET providerAccounts/{providerAccountId}</li><li>GET providers/{providerId}</li></ul>",
          "format": "int64",
          "readOnly": true
        },
        "option": {
          "type": "array",
          "description": "Provides the different values that are available for the user to choose. This field is applicable for drop-down or radio field types.<br><br><b>Endpoints</b>:<ul><li>GET providerAccounts/{providerAccountId}</li><li>GET providers/{providerId}</li></ul>",
          "readOnly": true,
          "items": {
            "$ref": "#/$defs/Option"
          }
        }
      }
    },
    "Option": {
      "title": "Option",
      "type": "object",
      "properties": {
        "displayText": {
          "type": "string",
          "description": "The text that is displayed to the user for that option in the provider site.<br><br><b>Endpoints</b>:<ul><li>GET providerAccounts/{providerAccountId}</li><li>GET providers/{providerId}</li></ul>"
        },
        "optionValue": {
          "type": "string",
          "description": "The value that is associated with the option.<br><br><b>Endpoints</b>:<ul><li>GET providerAccounts/{providerAccountId}</li><li>GET providers/{providerId}</li></ul>"
        },
        "isSelected": {
          "type": "boolean",
          "description": "The option that is selected by default in the provider site.<br><br><b>Endpoints</b>:<ul><li>GET providerAccounts/{providerAccountId}</li><li>GET providers/{providerId}</li></ul>"
        }
      }
    },
    "ProviderAccountPreferences": {
      "title": "ProviderAccountPreferences",
      "type": "object",
      "properties": {
        "isDataExtractsEnabled": {
          "type": "boolean",
          "description": "Indicates if the updates to the provider account should be part of the data extracts event notification or the data extract data retrieval service.<br><br><b>Endpoints</b>:<ul><li>GET providerAccounts?include=preferences</li><li>GET providerAccounts/{providerAccountId}?include=preferences</li></ul>"
        },
        "linkedProviderAccountId": {
          "type": "integer",
          "description": "LinkedproviderAccountd is a providerAccountId linked by the user to the primary provider account. <br>LinkedProviderAccountId and the providerAccountId belongs to the same institution.<br><br><b>Endpoints</b>:<ul><li>POST Provider Account</li><li>PUT Provider Account</li><li>GET Provider Accounts</li></ul>",
          "format": "int64"
        },
        "isAutoRefreshEnabled": {
          "type": "boolean",
          "description": "Indicates if auto-refreshes have to be triggered for the provider account.<br><br><b>Endpoints</b>:<ul><li>GET providerAccounts?include=preferences</li><li>GET providerAccounts/{providerAccountId}?include=preferences</li></ul>"
        }
      }
    },
    "ProvidersDataset": {
      "title": "ProvidersDataset",
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the dataset requested from the provider site<br><br><b>Account Type</b>: Manual<br><b>Endpoints</b>:<ul><li>GET accounts</li><li>GET accounts/{accountId}</li><li>GET providerAccounts</li><li>POST providerAccounts</li><li>PUT providerAccounts/{providerAccountId}</li><li>GET providerAccounts/{providerAccountId}</li><li>GET providers/{providerId}</li><li>GET providers</li></ul><b>Applicable Values</b><br>",
          "enum": [
            "BASIC_AGG_DATA",
            "ADVANCE_AGG_DATA",
            "ACCT_PROFILE",
            "DOCUMENT"
          ]
        },
        "attribute": {
          "type": "array",
          "description": "The name of the dataset attribute suported by the provider.<br><br><b>Endpoints</b>:<ul><li>GET providers/{providerId}</li><li>GET providers</li></ul>",
          "items": {
            "$ref": "#/$defs/Attribute"
          }
        }
      }
    },
    "TransactionDays": {
      "title": "TransactionDays",
      "type": "object",
      "properties": {
        "fullAccountNumberFields": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "paymentAccountNumber",
              "unmaskedAccountNumber"
            ]
          }
        },
        "numberOfTransactionDays": {
          "type": "integer",
          "format": "int32"
        }
      }
    }
  }
}