{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/envestnet/json-schema/envestnet-provider-account-response-schema.json",
  "title": "ProviderAccountResponse",
  "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/ProviderAccountResponse",
  "type": "object",
  "properties": {
    "providerAccount": {
      "type": "array",
      "readOnly": true,
      "items": {
        "$ref": "#/$defs/ProviderAccount"
      }
    }
  },
  "$defs": {
    "AccountDataset": {
      "title": "AccountDataset",
      "type": "object",
      "properties": {
        "lastUpdated": {
          "type": "string",
          "description": "Indicate when the dataset is last updated successfully for the given provider account.<br><br><b>Account Type</b>: Aggregated<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></ul>",
          "readOnly": true
        },
        "updateEligibility": {
          "type": "string",
          "description": "Indicate whether the dataset is eligible for update or not.<br><br><b>Account Type</b>: Aggregated<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></ul><b>Applicable Values</b><br>",
          "readOnly": true,
          "enum": [
            "ALLOW_UPDATE",
            "ALLOW_UPDATE_WITH_CREDENTIALS",
            "DISALLOW_UPDATE"
          ]
        },
        "additionalStatus": {
          "type": "string",
          "description": "The status of last update attempted for the dataset. <br><br><b>Account Type</b>: Aggregated<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></ul><b>Applicable Values</b><br>",
          "readOnly": true,
          "enum": [
            "LOGIN_IN_PROGRESS",
            "DATA_RETRIEVAL_IN_PROGRESS",
            "ACCT_SUMMARY_RECEIVED",
            "AVAILABLE_DATA_RETRIEVED",
            "PARTIAL_DATA_RETRIEVED",
            "DATA_RETRIEVAL_FAILED",
            "DATA_NOT_AVAILABLE",
            "ACCOUNT_LOCKED",
            "ADDL_AUTHENTICATION_REQUIRED",
            "BETA_SITE_DEV_IN_PROGRESS",
            "CREDENTIALS_UPDATE_NEEDED",
            "INCORRECT_CREDENTIALS",
            "PROPERTY_VALUE_NOT_AVAILABLE",
            "INVALID_ADDL_INFO_PROVIDED",
            "REQUEST_TIME_OUT",
            "SITE_BLOCKING_ERROR",
            "UNEXPECTED_SITE_ERROR",
            "SITE_NOT_SUPPORTED",
            "SITE_UNAVAILABLE",
            "TECH_ERROR",
            "USER_ACTION_NEEDED_AT_SITE",
            "SITE_SESSION_INVALIDATED",
            "NEW_AUTHENTICATION_REQUIRED",
            "DATASET_NOT_SUPPORTED",
            "ENROLLMENT_REQUIRED_FOR_DATASET",
            "CONSENT_REQUIRED",
            "CONSENT_EXPIRED",
            "CONSENT_REVOKED",
            "INCORRECT_OAUTH_TOKEN",
            "MIGRATION_IN_PROGRESS"
          ]
        },
        "nextUpdateScheduled": {
          "type": "string",
          "description": "Indicates when the next attempt to update the dataset is scheduled.<br><br><b>Account Type</b>: Aggregated<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></ul>",
          "readOnly": true
        },
        "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"
          ]
        },
        "lastUpdateAttempt": {
          "type": "string",
          "description": "Indicate when the last attempt was performed to update the dataset for the given provider account<br><br><b>Account Type</b>: Aggregated<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></ul>",
          "readOnly": true
        }
      }
    },
    "ProviderAccount": {
      "title": "ProviderAccount",
      "type": "object",
      "properties": {
        "preferences": {
          "$ref": "#/$defs/ProviderAccountPreferences"
        },
        "oauthMigrationStatus": {
          "type": "string",
          "description": "Indicates the migration status of the provider account from screen-scraping provider to the Open Banking provider. <br><br><b>Endpoints</b>:<ul><li>GET providerAccounts</li><li>GET providerAccounts/{providerAccountId}</li><li>PUT providerAccounts/{providerAccountId}</li><li>GET dataExtracts/userData</li></ul>",
          "readOnly": true,
          "enum": [
            "IN_PROGRESS",
            "TO_BE_MIGRATED",
            "COMPLETED",
            "MIGRATED"
          ]
        },
        "isManual": {
          "type": "boolean",
          "description": "Indicates whether account is a manual or aggregated provider account.<br><br><b>Endpoints</b>:<ul><li>GET providerAccounts</li><li>POST providerAccounts</li><li>PUT providerAccounts/{providerAccountId}</li><li>GET providerAccounts/{providerAccountId}</li><li>GET dataExtracts/userData</li></ul>",
          "readOnly": true
        },
        "isRealTimeMFA": {
          "type": "boolean",
          "description": "Attribute to specify whether the user has to input(credentials/MFA) for refreshing an account<br><br><b>Endpoints</b>:<ul><li>GET providerAccounts</li><li>GET providerAccounts/{providerAccountId}</li>",
          "readOnly": true
        },
        "lastUpdated": {
          "type": "string",
          "description": "Indicate when the providerAccount is last updated successfully.<br><br><b>Account Type</b>: Aggregated<br><b>Endpoints</b>:<ul><li>GET dataExtracts/userData</li></ul>",
          "readOnly": true
        },
        "consentId": {
          "type": "integer",
          "description": "Consent Id generated through POST Consent.<br><br><b>Endpoints</b>:<ul><li>GET providerAccounts</li><li>POST providerAccounts</li><li>PUT providerAccounts/{providerAccountId}</li><li>GET providerAccounts/{providerAccountId}</li></ul>",
          "format": "int64"
        },
        "createdDate": {
          "type": "string",
          "description": "The date on when the provider account is created in the system.<br><br><b>Endpoints</b>:<ul><li>GET providerAccounts</li><li>POST providerAccounts</li><li>PUT providerAccounts/{providerAccountId}</li><li>GET providerAccounts/{providerAccountId}</li></ul>",
          "readOnly": true
        },
        "aggregationSource": {
          "type": "string",
          "description": "The source through which the providerAccount is added in the system.<br><br><b>Endpoints</b>:<ul><li>GET providerAccounts</li><li>POST providerAccounts</li><li>PUT providerAccounts/{providerAccountId}</li><li>GET providerAccounts/{providerAccountId}</li><li>GET dataExtracts/userData</li></ul><b>Applicable Values</b><br>",
          "readOnly": true,
          "enum": [
            "SYSTEM",
            "USER"
          ]
        },
        "providerId": {
          "type": "integer",
          "description": "Unique identifier for the provider resource. This denotes the provider for which the provider account id is generated by the user.<br><br><b>Endpoints</b>:<ul><li>GET providerAccounts</li><li>POST providerAccounts</li><li>PUT providerAccounts/{providerAccountId}</li><li>GET providerAccounts/{providerAccountId}</li><li>GET dataExtracts/userData</li></ul>",
          "format": "int64",
          "readOnly": true
        },
        "requestId": {
          "type": "string",
          "description": "Unique id generated to indicate the request.<br><br><b>Endpoints</b>:<ul><li>GET providerAccounts</li><li>POST providerAccounts</li><li>PUT providerAccounts/{providerAccountId}</li><li>GET providerAccounts/{providerAccountId}</li></ul>",
          "readOnly": true
        },
        "id": {
          "type": "integer",
          "description": "Unique identifier for the provider account resource. This is created during account addition.<br><br><b>Endpoints</b>:<ul><li>GET providerAccounts</li><li>POST providerAccounts</li><li>PUT providerAccounts/{providerAccountId}</li><li>GET providerAccounts/{providerAccountId}</li><li>GET dataExtracts/userData</li></ul>",
          "format": "int64",
          "readOnly": true
        },
        "authType": {
          "type": "string",
          "description": "The authentication type enabled at the provider site. <br><br><b>Endpoints</b>:<ul><li>GET providers/{providerId}</li><li>GET providers</li></ul><b>Applicable Values</b><br>",
          "readOnly": true,
          "enum": [
            "OAUTH",
            "CREDENTIALS",
            "MFA_CREDENTIALS"
          ]
        },
        "dataset": {
          "type": "array",
          "description": "Logical grouping of dataset attributes into datasets such as Basic Aggregation Data, Account Profile and Documents.<br><br><b>Endpoints</b>:<ul><li>GET providerAccounts</li><li>POST providerAccounts</li><li>PUT providerAccounts/{providerAccountId}</li><li>GET providerAccounts/{providerAccountId}</li><li>GET dataExtracts/userData</li></ul>",
          "readOnly": true,
          "items": {
            "$ref": "#/$defs/AccountDataset"
          }
        },
        "status": {
          "type": "string",
          "description": "The status of last update attempted for the account. <br><br><b>Endpoints</b>:<ul><li>GET providerAccounts</li><li>POST providerAccounts</li><li>PUT providerAccounts/{providerAccountId}</li><li>GET providerAccounts/{providerAccountId}</li><li>GET dataExtracts/userData</li></ul><b>Applicable Values</b><br>",
          "readOnly": true,
          "enum": [
            "LOGIN_IN_PROGRESS",
            "USER_INPUT_REQUIRED",
            "IN_PROGRESS",
            "PARTIAL_SUCCESS",
            "SUCCESS",
            "FAILED",
            "MIGRATION_IN_PROGRESS",
            "DATA_RETRIEVAL_FAILED"
          ]
        }
      }
    },
    "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>"
        }
      }
    }
  }
}