{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/altoviz-com/json-schema/altoviz-com-classification-schema.json",
  "title": "Classification",
  "description": "Classification",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/altoviz-com-classifications-api-openapi.yml#/components/schemas/Classification",
  "type": "object",
  "properties": {
    "accountNumber": {
      "type": [
        "string",
        "null"
      ],
      "description": "Account number",
      "readOnly": true
    },
    "defaultVat": {
      "$ref": "#/$defs/Vat"
    },
    "description": {
      "type": [
        "string",
        "null"
      ],
      "description": "Description",
      "readOnly": true
    },
    "id": {
      "type": "integer",
      "description": "Classification ID",
      "format": "int32"
    },
    "isProduct": {
      "type": "boolean",
      "description": "Indicates whether classification is product (should be defined when type is 'Sale')",
      "readOnly": true
    },
    "isService": {
      "type": "boolean",
      "description": "Indicates whether classification is service (should be defined when type is 'Sale')",
      "readOnly": true
    },
    "label": {
      "type": [
        "string",
        "null"
      ],
      "description": "Label",
      "readOnly": true
    },
    "microBusinessDeclarationType": {
      "$ref": "#/$defs/MicroBusinessDeclarationTypes"
    },
    "type": {
      "$ref": "#/$defs/ClassificationType"
    }
  },
  "additionalProperties": false,
  "$defs": {
    "ClassificationType": {
      "enum": [
        "Sale",
        "Expense",
        "Other"
      ],
      "type": "string"
    },
    "MicroBusinessDeclarationTypes": {
      "enum": [
        "Products",
        "Services",
        "OtherServices",
        "Renting",
        "Cipav"
      ],
      "type": "string"
    },
    "Vat": {
      "type": "object",
      "properties": {
        "default": {
          "type": "boolean",
          "description": "Indicatess if this is the default VAT for the region",
          "readOnly": true
        },
        "id": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Vat ID",
          "format": "int32",
          "readOnly": true
        },
        "label": {
          "type": [
            "string",
            "null"
          ],
          "description": "Label",
          "readOnly": true
        },
        "rate": {
          "type": [
            "number",
            "null"
          ],
          "description": "Rate",
          "format": "double"
        },
        "region": {
          "$ref": "#/$defs/VatRegion"
        }
      },
      "additionalProperties": false,
      "description": "Vat"
    },
    "VatRegion": {
      "enum": [
        "FR",
        "EU",
        "IE",
        "DOM",
        "Corse",
        "Monaco"
      ],
      "type": "string"
    }
  }
}