{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/frihet-io/json-schema/frihet-io-bank-transaction-create-schema.json",
  "title": "BankTransactionCreate",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/frihet-io-banking-api-openapi.yml#/components/schemas/BankTransactionCreate",
  "type": "object",
  "required": [
    "accountId",
    "amount",
    "date",
    "description"
  ],
  "properties": {
    "accountId": {
      "type": "string",
      "description": "ID of the bank account (connection) to attach the transaction to. Must belong to your workspace."
    },
    "amount": {
      "type": "number",
      "description": "Non-zero. Positive for income, negative for expenses."
    },
    "date": {
      "type": "string",
      "format": "date",
      "description": "ISO date (YYYY-MM-DD)."
    },
    "description": {
      "type": "string",
      "minLength": 1,
      "maxLength": 2000
    },
    "currency": {
      "type": "string",
      "minLength": 3,
      "maxLength": 3,
      "description": "ISO 4217 code. Defaults to the account currency or EUR."
    },
    "reference": {
      "type": "string",
      "maxLength": 500
    },
    "category": {
      "type": "string",
      "maxLength": 200
    },
    "counterparty": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "accountNumber": {
          "type": "string"
        },
        "iban": {
          "type": "string"
        }
      },
      "required": [
        "name"
      ]
    }
  }
}