{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/amp-bank/main/json-schema/amp-bank-response-banking-accounts-balance-list-schema.json",
  "title": "ResponseBankingAccountsBalanceList",
  "x-generated": "2026-10-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amp-bank-banking-account-balances-api-openapi.yml#/components/schemas/ResponseBankingAccountsBalanceList",
  "properties": {
    "data": {
      "$ref": "#/$defs/ResponseBankingAccountsBalanceList_data"
    },
    "links": {
      "$ref": "#/$defs/LinksPaginated"
    },
    "meta": {
      "$ref": "#/$defs/MetaPaginated"
    }
  },
  "required": [
    "data",
    "links",
    "meta"
  ],
  "type": "object",
  "$defs": {
    "BankingAccountId": {
      "description": "A unique identifier for a Banking account, generated according to [CDR ID Permanence](#id-permanence) requirements.",
      "type": "string",
      "x-cds-type": "ASCIIString"
    },
    "BankingBalance": {
      "properties": {
        "accountId": {
          "allOf": [
            {
              "$ref": "#/$defs/BankingAccountId"
            }
          ],
          "description": "Unique identifier for the account."
        },
        "currentBalance": {
          "description": "The balance of the account at this time. Should align to the balance available via other channels such as Internet Banking. Assumed to be negative if the customer has money owing.",
          "type": "string",
          "x-cds-type": "AmountString"
        },
        "availableBalance": {
          "description": "Balance representing the amount of funds available for transfer. Assumed to be zero or positive.",
          "type": "string",
          "x-cds-type": "AmountString"
        },
        "creditLimit": {
          "default": "0.00",
          "description": "Object representing the maximum amount of credit that is available for this account. Assumed to be zero if absent.",
          "type": "string",
          "x-cds-type": "AmountString"
        },
        "amortisedLimit": {
          "default": "0.00",
          "description": "Object representing the available limit amortised according to payment schedule. Assumed to be zero if absent.",
          "type": "string",
          "x-cds-type": "AmountString"
        },
        "currency": {
          "default": "AUD",
          "description": "The currency for the balance amounts. If absent assumed to be `AUD`.",
          "type": "string",
          "x-cds-type": "CurrencyString"
        },
        "purses": {
          "description": "Optional array of balances for the account in other currencies. Included to support accounts that support multi-currency purses such as Travel Cards.",
          "items": {
            "$ref": "#/$defs/BankingBalancePurse"
          },
          "type": "array"
        }
      },
      "required": [
        "accountId",
        "availableBalance",
        "currentBalance"
      ],
      "type": "object"
    },
    "BankingBalancePurse": {
      "properties": {
        "amount": {
          "description": "The balance available for this additional currency purse.",
          "type": "string",
          "x-cds-type": "AmountString"
        },
        "currency": {
          "description": "The currency for the purse.",
          "type": "string",
          "x-cds-type": "CurrencyString"
        }
      },
      "required": [
        "amount"
      ],
      "type": "object"
    },
    "LinksPaginated": {
      "properties": {
        "self": {
          "description": "Fully qualified link that generated the current response document.",
          "type": "string",
          "x-cds-type": "URIString"
        },
        "first": {
          "description": "URI to the first page of this set. Mandatory if this response is not the first page.",
          "type": "string",
          "x-cds-type": "URIString"
        },
        "prev": {
          "description": "URI to the previous page of this set. Mandatory if this response is not the first page.",
          "type": "string",
          "x-cds-type": "URIString"
        },
        "next": {
          "description": "URI to the next page of this set. Mandatory if this response is not the last page.",
          "type": "string",
          "x-cds-type": "URIString"
        },
        "last": {
          "description": "URI to the last page of this set. Mandatory if this response is not the last page.",
          "type": "string",
          "x-cds-type": "URIString"
        }
      },
      "required": [
        "self"
      ],
      "type": "object",
      "x-conditional": [
        "prev",
        "next",
        "first",
        "last"
      ]
    },
    "MetaPaginated": {
      "properties": {
        "totalRecords": {
          "description": "The total number of records in the full set. See [pagination](#pagination).",
          "type": "integer",
          "x-cds-type": "NaturalNumber"
        },
        "totalPages": {
          "description": "The total number of pages in the full set. See [pagination](#pagination).",
          "type": "integer",
          "x-cds-type": "NaturalNumber"
        }
      },
      "required": [
        "totalPages",
        "totalRecords"
      ],
      "type": "object"
    },
    "ResponseBankingAccountsBalanceList_data": {
      "properties": {
        "balances": {
          "description": "The list of balances returned.",
          "items": {
            "$ref": "#/$defs/BankingBalance"
          },
          "type": "array"
        }
      },
      "required": [
        "balances"
      ],
      "type": "object"
    }
  }
}