{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/2x/json-schema/2x-portfolio-list-response-schema.json",
  "title": "PortfolioListResponse",
  "description": "Response model for list of portfolios.",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/2x-portfolios-api-openapi.yml#/components/schemas/PortfolioListResponse",
  "properties": {
    "portfolios": {
      "items": {
        "$ref": "#/$defs/PortfolioResponse"
      },
      "type": "array",
      "title": "Portfolios"
    },
    "total": {
      "type": "integer",
      "title": "Total"
    },
    "customerId": {
      "type": "string",
      "title": "Customerid"
    }
  },
  "type": "object",
  "required": [
    "portfolios",
    "total",
    "customerId"
  ],
  "$defs": {
    "PortfolioResponse": {
      "properties": {
        "id": {
          "type": "string",
          "title": "Id"
        },
        "name": {
          "type": "string",
          "title": "Name"
        },
        "color": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Color"
        },
        "description": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Description"
        },
        "customerId": {
          "type": "string",
          "title": "Customerid"
        },
        "clientCount": {
          "type": "integer",
          "title": "Clientcount",
          "description": "Number of clients in portfolio"
        },
        "userIds": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "title": "Userids",
          "description": "User IDs with access"
        },
        "isSystem": {
          "type": "boolean",
          "title": "Issystem",
          "description": "Whether this is a system portfolio",
          "default": false
        },
        "createdAt": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "title": "Createdat"
        },
        "updatedAt": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "title": "Updatedat"
        }
      },
      "type": "object",
      "required": [
        "id",
        "name",
        "customerId",
        "clientCount"
      ],
      "title": "PortfolioResponse",
      "description": "Response model for portfolio list."
    }
  }
}