{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cavuno-com/json-schema/cavuno-com-company-summary-schema.json",
  "title": "CompanySummary",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cavuno-com-companies-api-openapi.yml#/components/schemas/CompanySummary",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Unique identifier for the object. Use this value as the `{id}` path parameter for the company endpoints (e.g. `GET /v1/companies/{id}`)."
    },
    "object": {
      "type": "string",
      "enum": [
        "company"
      ],
      "description": "String representing the object's type. Objects of the same type share the same value."
    },
    "name": {
      "type": "string",
      "description": "Display name of the company."
    },
    "slug": {
      "type": "string",
      "description": "URL-friendly slug for the company."
    },
    "website": {
      "type": [
        "string",
        "null"
      ],
      "description": "Public company website URL, or `null` if not set."
    },
    "logoUrl": {
      "type": [
        "string",
        "null"
      ],
      "description": "URL of the company logo, or `null` if no logo is set. A subsidiary with no logo of its own returns its parent company's logo."
    },
    "summary": {
      "type": [
        "string",
        "null"
      ],
      "description": "One-line summary of the company, or `null` if not set."
    },
    "markets": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 150,
        "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
      },
      "description": "Canonical market slugs assigned to the company."
    },
    "xUrl": {
      "type": [
        "string",
        "null"
      ],
      "description": "X (Twitter) profile URL, or `null` if not set."
    },
    "linkedinUrl": {
      "type": [
        "string",
        "null"
      ],
      "description": "LinkedIn page URL, or `null` if not set."
    },
    "facebookUrl": {
      "type": [
        "string",
        "null"
      ],
      "description": "Facebook page URL, or `null` if not set."
    },
    "instagramUrl": {
      "type": [
        "string",
        "null"
      ],
      "description": "Instagram profile URL, or `null` if not set."
    },
    "createdAt": {
      "type": "string",
      "description": "Time at which the company was created. ISO 8601 datetime."
    },
    "updatedAt": {
      "type": [
        "string",
        "null"
      ],
      "description": "Time at which the company was last updated, or `null` if it has never been updated. ISO 8601 datetime."
    },
    "revision": {
      "type": "integer",
      "minimum": 0,
      "description": "Public Company lifecycle revision. Historical rows may be 0 until rollout backfill."
    },
    "parentCompanyId": {
      "type": [
        "string",
        "null"
      ],
      "description": "The `id` of the company this company is a subsidiary of, or `null` for a top-level company. List a company's subsidiaries with `GET /v1/companies?parentCompanyId={id}`."
    },
    "links": {
      "allOf": [
        {
          "$ref": "#/$defs/ResourceLinks"
        },
        {
          "type": "object",
          "properties": {
            "public": {
              "type": [
                "string",
                "null"
              ],
              "format": "uri",
              "description": "Canonical public URL for this company on the board, or `null` when no slug is set."
            }
          }
        }
      ],
      "description": "Public + admin URLs for this company. `public` may be `null` if the company lacks a slug."
    }
  },
  "required": [
    "id",
    "object",
    "name",
    "slug",
    "website",
    "logoUrl",
    "summary",
    "markets",
    "xUrl",
    "linkedinUrl",
    "facebookUrl",
    "instagramUrl",
    "createdAt",
    "updatedAt",
    "revision",
    "parentCompanyId",
    "links"
  ],
  "$defs": {
    "ResourceLinks": {
      "type": "object",
      "properties": {
        "public": {
          "type": "string",
          "format": "uri",
          "description": "Canonical public URL for this resource on the board. Honours the configured custom domain when present, otherwise uses the board subdomain."
        },
        "admin": {
          "type": "string",
          "format": "uri",
          "description": "URL inside the Cavuno app where the authenticated owner can manage this resource."
        }
      },
      "required": [
        "public",
        "admin"
      ]
    }
  }
}