{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/envestnet/json-schema/envestnet-create-consent-request-schema.json",
  "title": "CreateConsentRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/envestnet-consents-api-openapi.yml#/components/schemas/CreateConsentRequest",
  "type": "object",
  "properties": {
    "providerId": {
      "type": "integer",
      "description": "Unique identifier for the provider site.(e.g., financial institution sites, biller sites, lender sites, etc.).<br><br><b>Endpoints</b>:<ul><li>POST Consent</li></ul>",
      "format": "int64"
    },
    "dataset": {
      "type": "array",
      "description": "The name of the dataset attribute supported by the provider.If no dataset value is provided, the datasets that are configured for the customer will be considered.The configured dataset can be overridden by providing the dataset as an input.<br><br><b>Endpoints</b>:<ul><li>POST Consent</li></ul>",
      "items": {
        "$ref": "#/$defs/ProvidersDataset"
      }
    },
    "applicationName": {
      "type": "string",
      "description": "The name of the application.If no applicationName is provided in the input, the default applicationName will be considered<br><br><b>Endpoints</b>:<ul><li>POST Consent</li></ul>"
    }
  },
  "$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"
        }
      }
    },
    "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"
        }
      }
    }
  }
}