{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/akeda-ru/json-schema/akeda-ru-core-item-input-schema.json",
  "title": "CoreItemInput",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/akeda-ru-core-accounting-items-api-openapi.yml#/components/schemas/CoreItemInput",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "name"
  ],
  "properties": {
    "code": {
      "type": "string"
    },
    "name": {
      "type": "string",
      "minLength": 1
    },
    "use_cashflow": {
      "type": "boolean",
      "default": false
    },
    "cashflow_section": {
      "type": "string",
      "enum": [
        "operating",
        "investing",
        "financing",
        "transfer"
      ]
    },
    "cashflow_parent_id": {
      "$ref": "#/$defs/UUID"
    },
    "cashflow_sort_order": {
      "type": "integer",
      "default": 0
    },
    "use_pnl": {
      "type": "boolean",
      "default": false
    },
    "internal_turnover": {
      "type": "boolean",
      "default": false,
      "description": "Статья внутреннего оборота между ЦФО; обороты исключаются из сводного ОПиУ (ERP-1493)"
    },
    "pnl_sign": {
      "type": "integer",
      "enum": [
        -1,
        1
      ]
    },
    "pnl_parent_id": {
      "$ref": "#/$defs/UUID"
    },
    "pnl_sort_order": {
      "type": "integer",
      "default": 0
    },
    "vat_kind": {
      "type": "string",
      "enum": [
        "",
        "general",
        "reduced",
        "zero",
        "exempt"
      ],
      "description": "Вид ставки НДС статьи дохода; не передан — не меняется; у статьи не дохода — 400"
    },
    "is_group": {
      "type": "boolean",
      "description": "Сделать узел группой статей (ERP-2529); не передан — не меняется; статья с операциями группой не становится — 409"
    }
  },
  "$defs": {
    "UUID": {
      "type": "string",
      "format": "uuid"
    }
  }
}