{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/compteam-io/json-schema/compteam-io-manual-entry-body-schema.json",
  "title": "ManualEntryBody",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/compteam-io-accounting-api-openapi.yml#/components/schemas/ManualEntryBody",
  "properties": {
    "description": {
      "type": "string",
      "minLength": 1,
      "title": "Description"
    },
    "lines": {
      "items": {
        "$ref": "#/$defs/ManualEntryLine"
      },
      "type": "array",
      "minItems": 2,
      "title": "Lines"
    },
    "entry_date": {
      "anyOf": [
        {
          "type": "string",
          "format": "date"
        },
        {
          "type": "null"
        }
      ],
      "title": "Entry Date"
    }
  },
  "type": "object",
  "required": [
    "description",
    "lines"
  ],
  "$defs": {
    "ManualEntryLine": {
      "properties": {
        "account_code": {
          "type": "string",
          "title": "Account Code"
        },
        "debit": {
          "anyOf": [
            {
              "type": "number",
              "minimum": 0.0
            },
            {
              "type": "string"
            }
          ],
          "title": "Debit",
          "default": "0"
        },
        "credit": {
          "anyOf": [
            {
              "type": "number",
              "minimum": 0.0
            },
            {
              "type": "string"
            }
          ],
          "title": "Credit",
          "default": "0"
        },
        "memo": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Memo"
        }
      },
      "type": "object",
      "required": [
        "account_code"
      ],
      "title": "ManualEntryLine"
    }
  }
}