{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/medianfi-com/json-schema/medianfi-com-company-response-schema.json",
  "title": "CompanyResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/medianfi-com-companies-api-openapi.yml#/components/schemas/CompanyResponse",
  "type": "object",
  "properties": {
    "success": {
      "type": "boolean"
    },
    "data": {
      "$ref": "#/$defs/Company"
    }
  },
  "$defs": {
    "Company": {
      "type": "object",
      "properties": {
        "fiscalYearEnd": {
          "type": [
            "string",
            "null"
          ],
          "description": "Fiscal year end as MM-DD (companies.fiscal_year_end). Null means not confirmed; it is never defaulted to 12-31. Writes must be a real MM-DD date (422 otherwise). A value other than 12-31 flags month-end close and statements for review, because non-calendar fiscal years are not supported yet (#2019)."
        },
        "clientStatus": {
          "type": "string",
          "enum": [
            "test",
            "active",
            "inactive"
          ],
          "description": "Lifecycle marker (migration 089). Used by the accountant app to hide internal test tenants in production and filter customer lists by lifecycle stage. 'active' is the default on creation; 'test' is for internal QA / demo companies; 'inactive' is for customers no longer serviced."
        }
      }
    }
  }
}