{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/spendesk/json-schema/spendesk-expense-category-field-v2-schema.json",
  "title": "expenseCategoryFieldV2",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/spendesk-expense-categories-api-openapi.yml#/components/schemas/expenseCategoryFieldV2",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "id": {
      "type": "string",
      "description": "The expense category field ID."
    },
    "name": {
      "type": "string",
      "description": "The expense category field name."
    },
    "isRequired": {
      "type": "boolean",
      "description": "Whether the field is mandatory."
    },
    "isSplittable": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "Whether the field is configured as splittable (stored setting). Does not indicate whether analytical split is enabled for the company."
    },
    "archivedAt": {
      "oneOf": [
        {
          "$ref": "#/$defs/dateTime"
        },
        {
          "type": "null"
        }
      ],
      "description": "ISO 8601 UTC timestamp of when the field was archived, or null."
    },
    "createdAt": {
      "oneOf": [
        {
          "$ref": "#/$defs/dateTime"
        },
        {
          "type": "null"
        }
      ],
      "description": "ISO 8601 UTC timestamp of when the field was created, or null."
    },
    "updatedAt": {
      "oneOf": [
        {
          "$ref": "#/$defs/dateTime"
        },
        {
          "type": "null"
        }
      ],
      "description": "ISO 8601 UTC timestamp of when the field was last updated, or null."
    }
  },
  "required": [
    "id",
    "name",
    "isRequired",
    "isSplittable",
    "archivedAt",
    "createdAt",
    "updatedAt"
  ],
  "$defs": {
    "dateTime": {
      "type": "string",
      "format": "date-time",
      "description": "String containing a UTC datetime expressed in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format like `2023-05-12T14:06:40Z`.",
      "title": "dateTime"
    }
  }
}