{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/security-scorecard/main/json-schema/security-scorecard-portfolio-batch-response-schema.json",
  "title": "PortfolioBatchResponse",
  "x-generated": "2026-10-14",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/security-scorecard-multiscores-api-openapi.yml#/components/schemas/PortfolioBatchResponse",
  "type": "object",
  "properties": {
    "totalCount": {
      "type": "number",
      "description": "Total number of entries"
    },
    "hasMore": {
      "type": "boolean",
      "description": "Whether there are more entries available"
    },
    "offset": {
      "type": "number",
      "description": "Offset used for pagination"
    },
    "limit": {
      "type": "number",
      "description": "Limit used for pagination"
    },
    "count": {
      "type": "number",
      "description": "Number of entries in this response"
    },
    "entries": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/MultiscoreEntry"
      }
    }
  },
  "required": [
    "totalCount",
    "hasMore",
    "offset",
    "limit",
    "count",
    "entries"
  ],
  "$defs": {
    "MultiscoreEntry": {
      "type": "object",
      "properties": {
        "scorecardId": {
          "type": "string",
          "format": "uuid",
          "description": "Scorecard ID (uuid_company_id_key)"
        },
        "multiscoreType": {
          "type": "string",
          "description": "The type of multiscore"
        },
        "score": {
          "type": "number",
          "description": "The multiscore value"
        },
        "effectiveDate": {
          "type": "string",
          "format": "date",
          "description": "The date when this score became effective"
        },
        "riskLevel": {
          "type": "string",
          "description": "The risk level associated with the score"
        },
        "metadata": {
          "type": "object",
          "properties": {
            "enoughData": {
              "type": "boolean",
              "description": "Indicates whether there is enough data for the score calculation"
            }
          },
          "description": "Additional metadata about the multiscore"
        }
      },
      "required": [
        "scorecardId",
        "multiscoreType",
        "score",
        "effectiveDate",
        "riskLevel",
        "metadata"
      ],
      "title": "MultiscoreEntry"
    }
  }
}