{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/plaid/json-schema/plaid-statements-schema.json",
  "title": "Statements entity",
  "description": "A paginated array of account statements.\n\nReturn only statements within the requested window. Returning full history makes the same statement reappear on every extraction.\n",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/plaid-account-statements-api-openapi.yml#/components/schemas/Statements",
  "type": "object",
  "allOf": [
    {
      "$ref": "#/$defs/PaginatedArray"
    },
    {
      "type": "object",
      "properties": {
        "statements": {
          "type": "array",
          "description": "An array of statements, each with its own HATEOAS link to retrieve the account statement\n",
          "items": {
            "$ref": "#/$defs/Statement"
          }
        }
      },
      "required": [
        "statements"
      ]
    }
  ],
  "$defs": {
    "ContentTypes": {
      "title": "Content Types",
      "description": "Types of document formats. (Suggested values)\n",
      "type": "string",
      "enum": [
        "application/pdf",
        "image/gif",
        "image/jpeg",
        "image/tiff",
        "image/png",
        "application/json"
      ]
    },
    "DateString": {
      "title": "Date String",
      "description": "ISO 8601 full-date in format 'YYYY-MM-DD' according\nto [IETF RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6)\n",
      "type": "string",
      "format": "date",
      "maxLength": 10
    },
    "HateoasLink": {
      "title": "HATEOAS Link",
      "description": "HATEOAS (Hypermedia As The Engine Of Application State) link\n",
      "required": [
        "href"
      ],
      "type": "object",
      "properties": {
        "href": {
          "type": "string",
          "format": "uri-reference",
          "description": "The resource URL\n"
        },
        "action": {
          "description": "The HTTP method to use for the request\n",
          "$ref": "#/$defs/HttpAction"
        },
        "rel": {
          "description": "The relation of this link to its containing entity, as defined by the [IETF RFC8288](https://datatracker.ietf.org/doc/html/rfc8288)\n",
          "type": "string"
        },
        "types": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ContentTypes"
          },
          "description": "The content-types that can be used in the Accept header. **Note:** Plaid currently only accepts the PDF (`application/pdf`) content type\n"
        }
      }
    },
    "HateoasLinks": {
      "title": "HATEOAS links array",
      "description": "An array of HATEOAS links\n",
      "type": "array",
      "items": {
        "$ref": "#/$defs/HateoasLink"
      }
    },
    "HttpAction": {
      "title": "HTTP action type",
      "description": "The HTTP method to use for requests\n",
      "type": "string",
      "enum": [
        "GET",
        "POST",
        "PATCH",
        "DELETE",
        "PUT"
      ]
    },
    "Identifier": {
      "title": "Identifier",
      "description": "Value for a unique identifier\n",
      "type": "string",
      "maxLength": 256
    },
    "PageMetadata": {
      "title": "Page Metadata",
      "description": "Contains the opaque identifier, `nextPageKey`, to indicate a paginated result set.\nThe `nextOffset` identifier is deprecated and will be removed with a future major release.\n",
      "type": "object",
      "properties": {
        "nextOffset": {
          "type": "string",
          "deprecated": true,
          "description": "Opaque identifier. Does not need to be numeric or have any specific pattern.\nDeprecated in favor of `nextPageKey`, will be removed with a future major release\n"
        },
        "nextPageKey": {
          "type": "string",
          "description": "Opaque identifier. Does not need to be numeric or have any specific pattern.\nImplementation specific\n"
        },
        "totalElements": {
          "type": "integer",
          "description": "Total number of elements\n"
        }
      }
    },
    "PaginatedArray": {
      "title": "Paginated Array",
      "description": "Base class for results that may be paginated\n",
      "type": "object",
      "properties": {
        "page": {
          "$ref": "#/$defs/PageMetadata"
        }
      }
    },
    "Statement": {
      "title": "Statement entity",
      "description": "An account statement\n",
      "type": "object",
      "properties": {
        "accountId": {
          "$ref": "#/$defs/Identifier",
          "description": "Corresponds to `accountId` in Account entity\n"
        },
        "statementId": {
          "$ref": "#/$defs/Identifier",
          "description": "Long-term persistent identity of the statement. This identity must be unique within your organization\n"
        },
        "statementDate": {
          "$ref": "#/$defs/DateString",
          "description": "The date the statement becomes available to be viewed by the user\n"
        },
        "description": {
          "type": "string",
          "description": "Description of the statement\n"
        },
        "links": {
          "$ref": "#/$defs/HateoasLinks",
          "description": "The HATEOAS links to retrieve this account statement, or to invoke other APIs.\n\n**Note:** Plaid only accepts one link object in this array\n"
        },
        "status": {
          "type": "string",
          "description": "Availability status of statement\n"
        }
      }
    }
  }
}