{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/spendesk/json-schema/spendesk-expense-category-v2-schema.json",
  "title": "expenseCategoryV2",
  "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/expenseCategoryV2",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "id": {
      "type": "string",
      "description": "The expense category ID."
    },
    "name": {
      "type": "string",
      "description": "The expense category name."
    },
    "isArchived": {
      "type": "boolean",
      "description": "Whether the expense category is archived."
    },
    "costCenters": {
      "type": "array",
      "description": "Cost centers the expense category is restricted to. An empty array means it is available to every cost center, not none.",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "description": "The cost center ID."
          },
          "name": {
            "type": "string",
            "description": "The cost center name."
          }
        },
        "required": [
          "id",
          "name"
        ]
      }
    }
  },
  "required": [
    "id",
    "name",
    "isArchived",
    "costCenters"
  ]
}