{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/journalize-dev/json-schema/journalize-dev-account-balance-response-schema.json",
  "title": "AccountBalanceResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/journalize-dev-accounts-api-openapi.yml#/components/schemas/AccountBalanceResponse",
  "properties": {
    "accepted": {
      "type": "boolean",
      "title": "Accepted"
    },
    "doc": {
      "anyOf": [
        {
          "$ref": "#/$defs/AccountBalanceDoc"
        },
        {
          "type": "null"
        }
      ]
    },
    "errors": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Errors"
    }
  },
  "type": "object",
  "required": [
    "accepted"
  ],
  "$defs": {
    "AccountBalanceDoc": {
      "properties": {
        "account": {
          "type": "string",
          "title": "Account"
        },
        "balance": {
          "items": {
            "$ref": "#/$defs/InventoryPosition"
          },
          "type": "array",
          "title": "Balance"
        }
      },
      "type": "object",
      "required": [
        "account",
        "balance"
      ],
      "title": "AccountBalanceDoc",
      "description": "Doc shape for GET /accounts/balance — a single account's name plus\nits own balance list, not the full list (reports.get_account_balance)."
    },
    "Cost": {
      "properties": {
        "number": {
          "type": "string",
          "title": "Number"
        },
        "currency": {
          "type": "string",
          "title": "Currency"
        },
        "date": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Date"
        },
        "label": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Label"
        }
      },
      "type": "object",
      "required": [
        "number",
        "currency"
      ],
      "title": "Cost"
    },
    "InventoryPosition": {
      "properties": {
        "number": {
          "type": "string",
          "title": "Number"
        },
        "currency": {
          "type": "string",
          "title": "Currency"
        },
        "cost": {
          "anyOf": [
            {
              "$ref": "#/$defs/Cost"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "type": "object",
      "required": [
        "number",
        "currency"
      ],
      "title": "InventoryPosition"
    }
  }
}