{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/atlar/json-schema/atlar-bank-statement-schema.json",
  "title": "BankStatement",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/atlar-connections-api-openapi.yml#/components/schemas/BankStatement",
  "type": "object",
  "properties": {
    "organizationId": {
      "$ref": "#/$defs/OrganizationID"
    },
    "connectionId": {
      "type": "string",
      "description": "Unique resource identifier for a Connection.",
      "readOnly": true
    },
    "reportId": {
      "type": "string",
      "description": "Unique resource identifier for the ConnectionReport.",
      "readOnly": true
    },
    "accountId": {
      "$ref": "#/$defs/ResourceID",
      "description": "Unique resource identifier for a connection account.",
      "readOnly": true,
      "x-atlar-inline-ref": true
    },
    "id": {
      "$ref": "#/$defs/ResourceID"
    },
    "type": {
      "$ref": "#/$defs/StatementType"
    },
    "financialDataAccountId": {
      "type": "string",
      "description": "Unique resource identifier for the corresponding financial data account.",
      "readOnly": true
    },
    "metadata": {
      "$ref": "#/$defs/Metadata"
    },
    "version": {
      "$ref": "#/$defs/ResourceVersion"
    },
    "etag": {
      "$ref": "#/$defs/ETag"
    },
    "created": {
      "$ref": "#/$defs/CreatedTimestamp"
    },
    "updated": {
      "$ref": "#/$defs/UpdatedTimestamp"
    }
  },
  "required": [
    "organizationId",
    "connectionId",
    "reportId",
    "id",
    "type",
    "created",
    "updated",
    "version",
    "etag"
  ],
  "$defs": {
    "CreatedTimestamp": {
      "type": "string",
      "format": "date-time",
      "description": "Time at which the resource was created.",
      "readOnly": true
    },
    "ETag": {
      "type": "string",
      "description": "[ETag](https://en.wikipedia.org/wiki/HTTP_ETag) based on the\nresource version. This can be passed along in `If-Match` HTTP\nheader when updating a resource to perform a conditional\nupdate.",
      "pattern": "^version:\\d{1,4}$",
      "readOnly": true
    },
    "Metadata": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": {
        "type": "string"
      },
      "description": "Metadata is a `string-string` key-value container that\ncan be used to store information known at the time of resource\ncreation. This can be retrieved later on, for instance when a\npayment or expected transaction is reconciled with the booked\ntransaction on the bank statement.\n\nMetadata can have at most 20 entries. Keys may have a\nmaximum length of 64 chars and values a maximum length of 512\nchars.\n\nBy default, this field is optional. It is possible to make it\nrequired in the Atlar Dashboard by visiting the [Metadata keys\npage](https://app.atlar.com/metadata-keys). Requirement rules\ncan be specified per API resource. Both the Dashboard and the\nAPI will then enforce these rules and give validation errors\nwhen the required fields are not set.",
      "maxProperties": 20,
      "x-omitempty": true
    },
    "OrganizationID": {
      "type": "string",
      "description": "Unique resource identifier for an Organization."
    },
    "ResourceID": {
      "type": "string",
      "description": "Unique resource identifier.",
      "minLength": 32,
      "maxLength": 64
    },
    "ResourceVersion": {
      "type": "integer",
      "description": "Resource version. Starts at value `1` when the resource is\ncreated and increases by one for each successive update.",
      "minimum": 1,
      "readOnly": true
    },
    "StatementType": {
      "type": "string",
      "enum": [
        "BOOKED",
        "PENDING"
      ]
    },
    "UpdatedTimestamp": {
      "type": "string",
      "format": "date-time",
      "description": "Time at which the resource was last updated.",
      "readOnly": true
    }
  }
}