{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://docs.demiton.io/registers/bank_accounts/v3.json",
  "title": "bank_accounts contract v3",
  "type": "object",
  "required": [
    "account_name",
    "canonical_key"
  ],
  "properties": {
    "summary": {
      "type": "string",
      "description": "one-line prose digest injected by the projector",
      "x-demiton-requiredness": "optional"
    },
    "currency": {
      "type": "currency",
      "description": "the account's denomination",
      "x-demiton-requiredness": "optional"
    },
    "external_id": {
      "type": "string",
      "description": "the source system's own identifier for the account",
      "x-demiton-requiredness": "optional"
    },
    "account_name": {
      "type": "string",
      "description": "the human label of the account",
      "x-demiton-requiredness": "required"
    },
    "canonical_key": {
      "type": "string",
      "description": "the dedup key the spine used (`BC number`)",
      "x-demiton-requiredness": "required"
    },
    "account_number": {
      "type": "string",
      "description": "the bank's own account number for this account",
      "x-demiton-requiredness": "tenant-specific"
    },
    "legal_entity_id": {
      "type": "string",
      "description": "the company that owns the account",
      "x-demiton-requiredness": "optional",
      "x-demiton-reference": true
    },
    "last_modified_at": {
      "type": "string",
      "description": "when the source last changed the account",
      "x-demiton-requiredness": "optional",
      "x-demiton-unit": "instant",
      "format": "date-time",
      "x-demiton-type": "datetime"
    }
  },
  "x-demiton-register-type": "bank_accounts",
  "x-demiton-contract-version": "3.0.1",
  "x-demiton-store": "tenant",
  "x-demiton-axes": [],
  "x-demiton-measures": [],
  "x-demiton-provenance": {
    "standards": [
      {
        "code": "Construction Contracts Act 2002 (NZ)",
        "title": "Construction Contracts Act 2002 (NZ), 2002 No 46",
        "access": "full_text_verified",
        "clause": "ss 18C, 18D, 18FD",
        "region": "New Zealand",
        "edition": "as at 5 Oct 2023 (incl. Retention Money Amendment Act 2023)",
        "checked_on": "2026-09-14"
      }
    ]
  },
  "description": "Bank accounts registered in your ERP.",
  "x-demiton-contract-url": "https://docs.demiton.io/registers/bank_accounts/",
  "x-demiton-register-catalog": "https://docs.demiton.io/concepts/register-catalog"
}