{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/arkrel-com/json-schema/arkrel-com-account-import-outcome-schema.json",
  "title": "AccountImportOutcome",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/arkrel-com-chart-of-accounts-api-openapi.yml#/components/schemas/AccountImportOutcome",
  "type": "object",
  "required": [
    "imported",
    "skipped"
  ],
  "properties": {
    "imported": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Account"
      }
    },
    "skipped": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "row_number": {
            "type": "integer"
          },
          "reason": {
            "type": "string"
          }
        }
      }
    }
  },
  "$defs": {
    "Account": {
      "type": "object",
      "required": [
        "id",
        "name",
        "type",
        "source",
        "is_active",
        "created_at",
        "updated_at"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "client_id": {
          "type": [
            "string",
            "null"
          ]
        },
        "code": {
          "type": [
            "string",
            "null"
          ]
        },
        "name": {
          "type": "string"
        },
        "type": {
          "$ref": "#/$defs/AccountType"
        },
        "subtype": {
          "type": [
            "string",
            "null"
          ]
        },
        "tax_line": {
          "type": [
            "string",
            "null"
          ],
          "description": "The IRS Schedule C (Form 1040) line this account maps to, e.g. \"Line 18 Office expense\". Null for every personal account."
        },
        "source": {
          "type": "string",
          "enum": [
            "standard",
            "custom",
            "imported_csv",
            "quickbooks",
            "xero"
          ]
        },
        "external_id": {
          "type": [
            "string",
            "null"
          ]
        },
        "is_active": {
          "type": "boolean"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "updated_at": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "AccountType": {
      "type": "string",
      "enum": [
        "asset",
        "liability",
        "equity",
        "income",
        "expense",
        "personal"
      ],
      "description": "personal is this product's own addition, a personal-spending account, never a business classification, never deductible."
    }
  }
}