{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/bellatorsi-com/json-schema/bellatorsi-com-account-tier-response-schema.json",
  "title": "AccountTierResponse",
  "description": "Response model for GET /api/v1/account/tier.\n\nNot wrapped in BellatorResponse[T]. This is an identity and capability\nendpoint — no schedule is submitted, no pass/fail evaluation is made,\nand findings/recommendations are not applicable.\n\nAttributes:\n    tier: Lowercase tier identifier.\n    display_name: Human-readable tier display name.\n    limits: Numeric limits for this tier.\n    capabilities: Boolean feature flags for dashboard gating.\n    recommended_routes: Accessible API route templates for this tier.\n    metadata: Audit context — resolution timestamp and API version.",
  "x-generated": "2026-11-02",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/bellatorsi-com-openapi.json#/components/schemas/AccountTierResponse",
  "properties": {
    "tier": {
      "type": "string",
      "title": "Tier",
      "description": "Lowercase tier identifier: demo | free | starter | professional | enterprise | government"
    },
    "display_name": {
      "type": "string",
      "title": "Display Name",
      "description": "Human-readable tier display name."
    },
    "limits": {
      "$ref": "#/$defs/TierLimits"
    },
    "capabilities": {
      "$ref": "#/$defs/TierCapabilities"
    },
    "recommended_routes": {
      "additionalProperties": {
        "type": "string"
      },
      "type": "object",
      "title": "Recommended Routes",
      "description": "Accessible API route templates filtered to this tier's capabilities."
    },
    "metadata": {
      "$ref": "#/$defs/AccountTierMetadata"
    }
  },
  "type": "object",
  "required": [
    "tier",
    "display_name",
    "limits",
    "capabilities",
    "recommended_routes",
    "metadata"
  ],
  "$defs": {
    "AccountTierMetadata": {
      "properties": {
        "resolved_at": {
          "type": "string",
          "title": "Resolved At",
          "description": "UTC ISO 8601 timestamp of tier resolution."
        },
        "api_version": {
          "type": "string",
          "title": "Api Version",
          "description": "API version that produced this response."
        }
      },
      "type": "object",
      "required": [
        "resolved_at",
        "api_version"
      ],
      "title": "AccountTierMetadata",
      "description": "Audit context for the tier resolution.\n\nAttributes:\n    resolved_at: UTC ISO 8601 timestamp when the tier was resolved.\n    api_version: API version that produced this response."
    },
    "TierCapabilities": {
      "properties": {
        "tier1": {
          "type": "boolean",
          "title": "Tier1",
          "description": "Access to Tier 1 APIs: Health, CPM, Validation."
        },
        "forensics": {
          "type": "boolean",
          "title": "Forensics",
          "description": "Access to Tier 2 forensics: Logic Audit, Progress Audit, DCMA 14-Point, DCMA DECM, Resource Analysis."
        },
        "import": {
          "type": "boolean",
          "title": "Import",
          "description": "Access to Import APIs: MPP and XER file parsing."
        },
        "risk": {
          "type": "boolean",
          "title": "Risk",
          "description": "Access to Tier 3 Risk & Simulation APIs (v0.3.0+)."
        },
        "async": {
          "type": "boolean",
          "title": "Async",
          "description": "Async job submission available. True for Starter and above."
        },
        "webhooks": {
          "type": "boolean",
          "title": "Webhooks",
          "description": "Webhook callback registration supported. Same tier gate as async."
        },
        "sandbox_fixture_requests": {
          "type": "boolean",
          "title": "Sandbox Fixture Requests",
          "description": "Sandbox fixture request system available. False for Demo tier only."
        }
      },
      "type": "object",
      "required": [
        "tier1",
        "forensics",
        "import",
        "risk",
        "async",
        "webhooks",
        "sandbox_fixture_requests"
      ],
      "title": "TierCapabilities",
      "description": "Boolean feature flags for dashboard gating.\n\nThe 'async' and 'import' JSON keys are Python reserved words.\nThey are declared as 'async_jobs' and 'import_api' with serialization_alias\nset so the JSON output uses the correct names ('async' and 'import').\nConstruct from Python using async_jobs=True and import_api=True.\n\nAttributes:\n    tier1: Access to Tier 1 APIs: Health Score, CPM, Validation.\n    forensics: Access to Tier 2 forensics endpoints.\n    import_api: Access to Import APIs (MPP, XER). JSON key: \"import\".\n    risk: Access to Tier 3 Risk & Simulation APIs (v0.3.0+).\n    async_jobs: Async job submission available (Starter+). JSON key: \"async\".\n    webhooks: Webhook callback registration supported.\n    sandbox_fixture_requests: Sandbox fixture system available."
    },
    "TierLimits": {
      "properties": {
        "sync_task_limit": {
          "type": "integer",
          "title": "Sync Task Limit",
          "description": "Maximum tasks per synchronous request. Always 1,000 for all tiers."
        },
        "max_task_limit": {
          "type": "integer",
          "title": "Max Task Limit",
          "description": "Maximum tasks per request across sync + async combined. Tier-dependent."
        },
        "payload_limit_mb": {
          "type": "integer",
          "title": "Payload Limit Mb",
          "description": "Maximum request payload size in MB."
        },
        "api_calls_per_month": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Api Calls Per Month",
          "description": "Monthly API call quota. Null for unlimited tiers (Enterprise, Government)."
        },
        "monthly_calls_remaining": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Monthly Calls Remaining",
          "description": "Remaining calls this billing month. Null if Redis unavailable or tier is unlimited."
        }
      },
      "type": "object",
      "required": [
        "sync_task_limit",
        "max_task_limit",
        "payload_limit_mb"
      ],
      "title": "TierLimits",
      "description": "Numeric limits for the authenticated tier.\n\nAttributes:\n    sync_task_limit: Maximum tasks per synchronous request. Always 1,000.\n    max_task_limit: Maximum tasks per request across sync + async combined.\n    payload_limit_mb: Maximum request payload size in megabytes.\n    api_calls_per_month: Monthly API call quota. Null for unlimited tiers.\n    monthly_calls_remaining: Remaining calls this month from Redis.\n        Null if Redis unavailable or tier is unlimited."
    }
  }
}