{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/lemonway/json-schema/lemonway-account-balance-output-schema.json",
  "title": "AccountBalanceOutput",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/lemonway-accounts-admin-api-openapi.yml#/components/schemas/AccountBalanceOutput",
  "type": "object",
  "properties": {
    "accounts": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AccountBalance"
      }
    },
    "_links": {
      "$ref": "#/$defs/Links"
    },
    "error": {
      "$ref": "#/$defs/Error"
    }
  },
  "$defs": {
    "AccountBalance": {
      "type": "object",
      "properties": {
        "id": {
          "description": "Payment account ID",
          "type": "string"
        },
        "balance": {
          "format": "int64",
          "description": "Payment account balance",
          "type": "integer"
        },
        "status": {
          "format": "int32",
          "description": "Payment account status<br/>2 = Registered, KYC incomplete.<br/>3 = Registered, rejected KYC.<br/>5 = Registered, KYC 1 (status given at registration).<br/>6 = Registered, KYC 2.<br/>7 = Registered, KYC 3.<br/>8 = Registered, expired KYC.<br/>10 = Blocked.<br/>12 = Closed.<br/>13 = Registered, status is being updated from KYC 2 to KYC 3.<br/>14 = One-time customer.<br/>15 = Special account for crowdlending.<br/>16 = Technical account.<br/>",
          "enum": [
            2,
            3,
            5,
            6,
            7,
            8,
            10,
            12,
            13,
            14,
            15,
            16
          ],
          "type": "integer"
        }
      }
    },
    "Error": {
      "type": "object",
      "properties": {
        "code": {
          "format": "int32",
          "type": "integer"
        },
        "message": {
          "type": "string"
        },
        "psp": {
          "$ref": "#/$defs/PSP"
        }
      }
    },
    "Link": {
      "type": "object",
      "properties": {
        "href": {
          "type": "string"
        },
        "templated": {
          "type": "boolean",
          "readOnly": true
        },
        "method": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "deprecation": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "profile": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "hreflang": {
          "type": "string"
        }
      }
    },
    "Links": {
      "type": "object",
      "properties": {
        "first": {
          "$ref": "#/$defs/Link"
        },
        "last": {
          "$ref": "#/$defs/Link"
        },
        "previous": {
          "$ref": "#/$defs/Link"
        },
        "next": {
          "$ref": "#/$defs/Link"
        },
        "self": {
          "$ref": "#/$defs/Link"
        }
      }
    },
    "PSP": {
      "type": "object",
      "properties": {
        "message": {
          "description": "Get the Error Message from PSP",
          "type": "string"
        }
      }
    }
  }
}