{
  "components": {
    "examples": {
      "getExplanations-200-applies": {
        "description": "A person's portfolio (USER source) with both product lines evaluated. Seven entries apply, ranked; evaluated has one row per enabled entry, including the ones that did not apply (NOT_APPLICABLE) or could not be checked (INSUFFICIENT_DATA: Swedish car policies never get a partial-cover verdict). Fields without a value are left out: insurance.personal_protection_gap has no evidence and no targets because it is about the whole portfolio.",
        "summary": "Entries apply",
        "value": {
          "computedAt": "2026-11-05T09:14:27.512Z",
          "evaluated": [
            {
              "id": "insurance.travel_covered_twice",
              "outcome": "APPLIES",
              "source": "RULE",
              "version": 1
            },
            {
              "id": "insurance.duplicate_cover",
              "outcome": "NOT_APPLICABLE",
              "source": "RULE",
              "version": 1
            },
            {
              "id": "insurance.renewing_soon",
              "outcome": "APPLIES",
              "source": "RULE",
              "version": 1
            },
            {
              "id": "insurance.partial_vehicle_cover",
              "outcome": "INSUFFICIENT_DATA",
              "source": "RULE",
              "version": 1
            },
            {
              "id": "insurance.personal_protection_gap",
              "outcome": "APPLIES",
              "source": "RULE",
              "version": 1
            },
            {
              "id": "insurance.premium_concentration",
              "outcome": "APPLIES",
              "source": "RULE",
              "version": 1
            },
            {
              "id": "insurance.multiple_insurers",
              "outcome": "APPLIES",
              "source": "RULE",
              "version": 1
            },
            {
              "id": "wealth.high_fee_holding",
              "outcome": "APPLIES",
              "source": "RULE",
              "version": 1
            },
            {
              "id": "wealth.loan_above_typical_rate",
              "outcome": "APPLIES",
              "source": "RULE",
              "version": 1
            }
          ],
          "explanations": [
            {
              "category": "OVERLAP",
              "evidence": {
                "includedInType": "houseContentInsurance",
                "standaloneSubType": "travelInsurance"
              },
              "id": "insurance.travel_covered_twice",
              "rank": 1,
              "source": "RULE",
              "targets": [
                {
                  "collectionId": "e2a8f4c6-1b9d-4f3a-8e7c-5a0b2d6f9e13",
                  "id": "60412873",
                  "kind": "POLICY"
                },
                {
                  "collectionId": "7d3b9e1f-6a2c-4b8d-9f5e-1c4a7e2b8d60",
                  "id": "RS-559301",
                  "kind": "POLICY"
                }
              ],
              "text": {
                "description": "There is a separate travel insurance, and the home insurance also includes travel cover.",
                "title": "Travel may be covered twice"
              },
              "version": 1
            },
            {
              "category": "RENEWAL",
              "evidence": {
                "renewalDate": "2026-12-01",
                "subType": "carInsurance"
              },
              "id": "insurance.renewing_soon",
              "rank": 2,
              "source": "RULE",
              "targets": [
                {
                  "collectionId": "e2a8f4c6-1b9d-4f3a-8e7c-5a0b2d6f9e13",
                  "id": "60412874",
                  "kind": "POLICY"
                }
              ],
              "text": {
                "description": "The renewal date comes from the collected policy.",
                "title": "Car insurance renews on 1 December"
              },
              "version": 1
            },
            {
              "category": "COVERAGE",
              "id": "insurance.personal_protection_gap",
              "rank": 3,
              "source": "RULE",
              "targets": [],
              "text": {
                "description": "There is no life, accident or income cover among the collected policies.",
                "title": "No personal protection found"
              },
              "version": 1
            },
            {
              "category": "CONCENTRATION",
              "evidence": {
                "policiesWithoutPremium": 0,
                "premiumSharePct": 46.3,
                "subType": "carInsurance"
              },
              "id": "insurance.premium_concentration",
              "rank": 4,
              "source": "RULE",
              "targets": [
                {
                  "collectionId": "e2a8f4c6-1b9d-4f3a-8e7c-5a0b2d6f9e13",
                  "id": "60412874",
                  "kind": "POLICY"
                }
              ],
              "text": {
                "description": "The largest share of what is paid for insurance each year.",
                "title": "Car insurance is 46.3 % of the yearly premium"
              },
              "version": 1
            },
            {
              "category": "CONSOLIDATION",
              "evidence": {
                "insurerCount": 2,
                "policiesWithoutInsurer": 0
              },
              "id": "insurance.multiple_insurers",
              "rank": 5,
              "source": "RULE",
              "targets": [],
              "text": {
                "description": "The policies are spread over several insurers.",
                "title": "Policies at 2 insurers"
              },
              "version": 1
            },
            {
              "category": "FEES",
              "evidence": {
                "annualFeeCost": 3448,
                "currency": "SEK",
                "feePct": 1.85,
                "holding": "Nordic Small Cap Fund",
                "isin": "SE0000000037"
              },
              "id": "wealth.high_fee_holding",
              "rank": 6,
              "source": "RULE",
              "targets": [
                {
                  "collectionId": "4f6a9c2e-8b1d-4e7a-a3c5-0d9e2f1b6a84",
                  "id": "a91f3c5e-7d2b-4e8a-b6c4-3e1d9f7a2c58",
                  "kind": "ACCOUNT"
                }
              ],
              "text": {
                "description": "1.9 % a year, about 3,448 SEK per year.",
                "title": "Nordic Small Cap Fund has a high fee"
              },
              "version": 1
            },
            {
              "category": "LOANS",
              "evidence": {
                "currency": "SEK",
                "potentialAnnualSaving": 16800,
                "ratePct": 4.2,
                "typicalRatePct": 3.5
              },
              "id": "wealth.loan_above_typical_rate",
              "rank": 7,
              "source": "RULE",
              "targets": [
                {
                  "collectionId": "4f6a9c2e-8b1d-4e7a-a3c5-0d9e2f1b6a84",
                  "id": "c4e8a2f6-9b3d-4c1e-a7f5-8d2b6e0c4a19",
                  "kind": "ACCOUNT"
                }
              ],
              "text": {
                "description": "4.2 % against a typical 3.5 %, about 16,800 SEK a year in difference.",
                "title": "The loan is priced above the typical rate"
              },
              "version": 1
            }
          ],
          "input": {
            "complete": true,
            "sources": [
              {
                "kind": "USER",
                "sourceId": "b7e4d2a1-5c3f-4a8e-9d16-2f0c8e7a3b95",
                "status": "OK"
              },
              {
                "kind": "COLLECTION",
                "sourceId": "2b8d4f6a-0c3e-4a7b-9e1d-6f4a8c2e0b57",
                "status": "SUPERSEDED"
              },
              {
                "collectedAt": "2026-10-30",
                "kind": "COLLECTION",
                "sourceId": "4f6a9c2e-8b1d-4e7a-a3c5-0d9e2f1b6a84",
                "status": "OK"
              },
              {
                "collectedAt": "2026-10-30",
                "kind": "COLLECTION",
                "sourceId": "9c1e7b3a-2d5f-4c8e-b6a0-7e3d1f9a5c26",
                "status": "OK"
              },
              {
                "kind": "COLLECTION",
                "sourceId": "3a5c7e9b-4d1f-4a6c-8b2e-9f0d3c5a7e41",
                "status": "SUPERSEDED"
              },
              {
                "collectedAt": "2026-10-28",
                "kind": "COLLECTION",
                "sourceId": "7d3b9e1f-6a2c-4b8d-9f5e-1c4a7e2b8d60",
                "status": "OK"
              },
              {
                "collectedAt": "2026-10-28",
                "kind": "COLLECTION",
                "sourceId": "e2a8f4c6-1b9d-4f3a-8e7c-5a0b2d6f9e13",
                "status": "OK"
              }
            ]
          },
          "language": "en",
          "rulesVersions": {
            "insurance": 2,
            "wealth": 1
          },
          "status": "READY"
        }
      },
      "getExplanations-200-collections-sv": {
        "description": "COLLECTION sources: one is replaced by a newer collection from the same company (SUPERSEDED) and one is not this client's (NOT_FOUND), so input.complete is false. None holds wealth products, so the wealth entries are INSUFFICIENT_DATA and rulesVersions carries only insurance. One entry id can apply more than once, once per policy.",
        "summary": "Named collections, Swedish texts",
        "value": {
          "computedAt": "2026-11-05T09:14:27.512Z",
          "evaluated": [
            {
              "id": "insurance.travel_covered_twice",
              "outcome": "APPLIES",
              "source": "RULE",
              "version": 1
            },
            {
              "id": "insurance.duplicate_cover",
              "outcome": "NOT_APPLICABLE",
              "source": "RULE",
              "version": 1
            },
            {
              "id": "insurance.renewing_soon",
              "outcome": "APPLIES",
              "source": "RULE",
              "version": 1
            },
            {
              "id": "insurance.partial_vehicle_cover",
              "outcome": "APPLIES",
              "source": "RULE",
              "version": 1
            },
            {
              "id": "insurance.personal_protection_gap",
              "outcome": "NOT_APPLICABLE",
              "source": "RULE",
              "version": 1
            },
            {
              "id": "insurance.premium_concentration",
              "outcome": "APPLIES",
              "source": "RULE",
              "version": 1
            },
            {
              "id": "insurance.multiple_insurers",
              "outcome": "APPLIES",
              "source": "RULE",
              "version": 1
            },
            {
              "id": "wealth.high_fee_holding",
              "outcome": "INSUFFICIENT_DATA",
              "source": "RULE",
              "version": 1
            },
            {
              "id": "wealth.loan_above_typical_rate",
              "outcome": "INSUFFICIENT_DATA",
              "source": "RULE",
              "version": 1
            }
          ],
          "explanations": [
            {
              "category": "OVERLAP",
              "evidence": {
                "includedInType": "houseContentInsurance",
                "standaloneSubType": "travelInsurance"
              },
              "id": "insurance.travel_covered_twice",
              "rank": 1,
              "source": "RULE",
              "targets": [
                {
                  "collectionId": "e2a8f4c6-1b9d-4f3a-8e7c-5a0b2d6f9e13",
                  "id": "60412873",
                  "kind": "POLICY"
                },
                {
                  "collectionId": "7d3b9e1f-6a2c-4b8d-9f5e-1c4a7e2b8d60",
                  "id": "RS-559301",
                  "kind": "POLICY"
                }
              ],
              "text": {
                "description": "Det finns en separat reseförsäkring, och hemförsäkringen innehåller också reseskydd.",
                "title": "Reseskydd kan finnas två gånger"
              },
              "version": 1
            },
            {
              "category": "RENEWAL",
              "evidence": {
                "renewalDate": "2026-11-01",
                "subType": "villaInsurance"
              },
              "id": "insurance.renewing_soon",
              "rank": 2,
              "source": "RULE",
              "targets": [
                {
                  "collectionId": "e2a8f4c6-1b9d-4f3a-8e7c-5a0b2d6f9e13",
                  "id": "60412873",
                  "kind": "POLICY"
                }
              ],
              "text": {
                "description": "Förnyelsedatumet kommer från den inhämtade försäkringen.",
                "title": "Villaförsäkringen förnyades 1 november"
              },
              "version": 1
            },
            {
              "category": "RENEWAL",
              "evidence": {
                "renewalDate": "2026-11-20",
                "subType": "motorcycleInsurance"
              },
              "id": "insurance.renewing_soon",
              "rank": 3,
              "source": "RULE",
              "targets": [
                {
                  "collectionId": "e2a8f4c6-1b9d-4f3a-8e7c-5a0b2d6f9e13",
                  "id": "60412875",
                  "kind": "POLICY"
                }
              ],
              "text": {
                "description": "Förnyelsedatumet kommer från den inhämtade försäkringen.",
                "title": "Motorcykelförsäkringen förnyas 20 november"
              },
              "version": 1
            },
            {
              "category": "COVERAGE",
              "evidence": {
                "vehicleCoverage": "TRAFFIC"
              },
              "id": "insurance.partial_vehicle_cover",
              "rank": 4,
              "source": "RULE",
              "targets": [
                {
                  "collectionId": "e2a8f4c6-1b9d-4f3a-8e7c-5a0b2d6f9e13",
                  "id": "60412875",
                  "kind": "POLICY"
                }
              ],
              "text": {
                "description": "Fordonsförsäkringen är inte en helförsäkring.",
                "title": "Fordonet har inte helförsäkring"
              },
              "version": 1
            },
            {
              "category": "CONCENTRATION",
              "evidence": {
                "policiesWithoutPremium": 1,
                "premiumSharePct": 41.8,
                "subType": "carInsurance"
              },
              "id": "insurance.premium_concentration",
              "rank": 5,
              "source": "RULE",
              "targets": [
                {
                  "collectionId": "e2a8f4c6-1b9d-4f3a-8e7c-5a0b2d6f9e13",
                  "id": "60412874",
                  "kind": "POLICY"
                }
              ],
              "text": {
                "description": "Den största andelen av det som betalas för försäkringar varje år; 1 försäkring saknar känd premie.",
                "title": "Bilförsäkringen är 41,8 % av den kända årspremien"
              },
              "version": 1
            },
            {
              "category": "CONSOLIDATION",
              "evidence": {
                "insurerCount": 2,
                "policiesWithoutInsurer": 0
              },
              "id": "insurance.multiple_insurers",
              "rank": 6,
              "source": "RULE",
              "targets": [],
              "text": {
                "description": "Försäkringarna är spridda över flera bolag.",
                "title": "Försäkringar hos 2 bolag"
              },
              "version": 1
            }
          ],
          "input": {
            "complete": false,
            "sources": [
              {
                "collectedAt": "2026-10-28",
                "kind": "COLLECTION",
                "sourceId": "e2a8f4c6-1b9d-4f3a-8e7c-5a0b2d6f9e13",
                "status": "OK"
              },
              {
                "collectedAt": "2026-10-28",
                "kind": "COLLECTION",
                "sourceId": "7d3b9e1f-6a2c-4b8d-9f5e-1c4a7e2b8d60",
                "status": "OK"
              },
              {
                "kind": "COLLECTION",
                "sourceId": "3a5c7e9b-4d1f-4a6c-8b2e-9f0d3c5a7e41",
                "status": "SUPERSEDED"
              },
              {
                "kind": "COLLECTION",
                "sourceId": "0e6c2a8f-5b9d-4e1c-a3f7-8d0b4e6c2a95",
                "status": "NOT_FOUND"
              }
            ]
          },
          "language": "sv",
          "rulesVersions": {
            "insurance": 2
          },
          "status": "READY"
        }
      },
      "getExplanations-200-no-data": {
        "description": "The person's wealth collection has nothing readable (NO_DATA) and the insurance collection is past the client's data retention (EXPIRED), so neither product line could be evaluated: status NO_DATA, no explanations and no rulesVersions, and still one INSUFFICIENT_DATA row per enabled entry.",
        "summary": "Nothing could be evaluated",
        "value": {
          "computedAt": "2026-11-05T09:14:27.512Z",
          "evaluated": [
            {
              "id": "insurance.travel_covered_twice",
              "outcome": "INSUFFICIENT_DATA",
              "source": "RULE",
              "version": 1
            },
            {
              "id": "insurance.duplicate_cover",
              "outcome": "INSUFFICIENT_DATA",
              "source": "RULE",
              "version": 1
            },
            {
              "id": "insurance.renewing_soon",
              "outcome": "INSUFFICIENT_DATA",
              "source": "RULE",
              "version": 1
            },
            {
              "id": "insurance.partial_vehicle_cover",
              "outcome": "INSUFFICIENT_DATA",
              "source": "RULE",
              "version": 1
            },
            {
              "id": "insurance.personal_protection_gap",
              "outcome": "INSUFFICIENT_DATA",
              "source": "RULE",
              "version": 1
            },
            {
              "id": "insurance.premium_concentration",
              "outcome": "INSUFFICIENT_DATA",
              "source": "RULE",
              "version": 1
            },
            {
              "id": "insurance.multiple_insurers",
              "outcome": "INSUFFICIENT_DATA",
              "source": "RULE",
              "version": 1
            },
            {
              "id": "wealth.high_fee_holding",
              "outcome": "INSUFFICIENT_DATA",
              "source": "RULE",
              "version": 1
            },
            {
              "id": "wealth.loan_above_typical_rate",
              "outcome": "INSUFFICIENT_DATA",
              "source": "RULE",
              "version": 1
            }
          ],
          "explanations": [],
          "input": {
            "complete": false,
            "sources": [
              {
                "kind": "USER",
                "sourceId": "b7e4d2a1-5c3f-4a8e-9d16-2f0c8e7a3b95",
                "status": "OK"
              },
              {
                "kind": "COLLECTION",
                "sourceId": "4f6a9c2e-8b1d-4e7a-a3c5-0d9e2f1b6a84",
                "status": "NO_DATA"
              },
              {
                "kind": "COLLECTION",
                "sourceId": "e2a8f4c6-1b9d-4f3a-8e7c-5a0b2d6f9e13",
                "status": "EXPIRED"
              }
            ]
          },
          "language": "en",
          "status": "NO_DATA"
        }
      },
      "getExplanations-400-missing-collection-id": {
        "description": "A COLLECTION source needs a collectionId, and a USER source a userId.",
        "summary": "Source without its id",
        "value": {
          "errors": [],
          "message": "A COLLECTION source needs a collectionId",
          "status": "400 BAD_REQUEST",
          "statusCode": 400
        }
      },
      "getExplanations-400-no-sources": {
        "description": "sources is missing or empty.",
        "summary": "No sources",
        "value": {
          "errors": [],
          "message": "At least one source is required",
          "status": "400 BAD_REQUEST",
          "statusCode": 400
        }
      },
      "getExplanations-400-supplied-not-supported": {
        "description": "SUPPLIED sources are in the schema but not supported by the draft yet.",
        "summary": "SUPPLIED source",
        "value": {
          "errors": [],
          "message": "SUPPLIED sources are not supported by the draft yet",
          "status": "400 BAD_REQUEST",
          "statusCode": 400
        }
      },
      "getExplanations-400-too-many-sources": {
        "description": "At most 25 sources per request.",
        "summary": "Too many sources",
        "value": {
          "errors": [],
          "message": "At most 25 sources per request",
          "status": "400 BAD_REQUEST",
          "statusCode": 400
        }
      },
      "getExplanations-400-user-with-collections": {
        "description": "A USER source is a person's whole portfolio, so it must be the only source.",
        "summary": "USER combined with other sources",
        "value": {
          "errors": [],
          "message": "Either one USER source alone, or one or more COLLECTION sources",
          "status": "400 BAD_REQUEST",
          "statusCode": 400
        }
      },
      "getExplanations-404-user-not-found": {
        "description": "The USER source's userId is not a user of this client, or the user is anonymised. A COLLECTION that is not found is not an error: it is reported in input.sources with status NOT_FOUND.",
        "summary": "User not found",
        "value": {
          "errors": [],
          "localizedMessage": "User not found",
          "message": "User not found",
          "status": "404 NOT_FOUND",
          "statusCode": 404
        }
      },
      "getExplanations-422-more-than-one-person": {
        "description": "The COLLECTION sources belong to different people, so they cannot form one portfolio.",
        "summary": "Collections of more than one person",
        "value": {
          "errors": [],
          "message": "The collections belong to more than one person",
          "status": "422 UNPROCESSABLE_ENTITY",
          "statusCode": 422
        }
      },
      "getExplanations-422-same-company-same-time": {
        "description": "Two collections from the same company were collected at the same instant, so neither can be said to replace the other.",
        "summary": "Two collections, same company, same time",
        "value": {
          "errors": [],
          "message": "Collections e2a8f4c6-1b9d-4f3a-8e7c-5a0b2d6f9e13 and 5f2d8b4e-7a1c-4d9f-b3e6-0a8c5f2d7b19 are from the same company and were collected at the same time",
          "status": "422 UNPROCESSABLE_ENTITY",
          "statusCode": 422
        }
      },
      "getExplanations-request-a-person": {
        "description": "One USER source: every wealth and insurance collection the person has, newest per company. A USER source stands alone.",
        "summary": "A person's whole portfolio",
        "value": {
          "language": "en",
          "sources": [
            {
              "kind": "USER",
              "userId": "b7e4d2a1-5c3f-4a8e-9d16-2f0c8e7a3b95"
            }
          ]
        }
      },
      "getExplanations-request-named-collections": {
        "description": "One or more COLLECTION sources that belong to one person. The texts come back in Swedish; an unsupported language falls back to English.",
        "summary": "Named collections, Swedish texts",
        "value": {
          "language": "sv",
          "sources": [
            {
              "collectionId": "e2a8f4c6-1b9d-4f3a-8e7c-5a0b2d6f9e13",
              "kind": "COLLECTION"
            },
            {
              "collectionId": "7d3b9e1f-6a2c-4b8d-9f5e-1c4a7e2b8d60",
              "kind": "COLLECTION"
            },
            {
              "collectionId": "3a5c7e9b-4d1f-4a6c-8b2e-9f0d3c5a7e41",
              "kind": "COLLECTION"
            },
            {
              "collectionId": "0e6c2a8f-5b9d-4e1c-a3f7-8d0b4e6c2a95",
              "kind": "COLLECTION"
            }
          ]
        }
      },
      "getMetrics-200-both-metrics": {
        "description": "A person's wealth and insurance collections (USER source), both metrics. wealth.concentration as in the concentration example; insurance.coverage_held lists each car, condo and villa policy with its covers (shortened here): held true or false, left out when unknown, and peerShare only for a policy compared with its peer group. The house-only villa's group is not compared, so it has covers but no shares.",
        "summary": "Both metrics for a person",
        "value": {
          "input": {
            "complete": true,
            "sources": [
              {
                "kind": "USER",
                "sourceId": "b7e4d2a1-5c3f-4a8e-9d16-2f0c8e7a3b95",
                "status": "OK"
              },
              {
                "kind": "COLLECTION",
                "sourceId": "2b8d4f6a-0c3e-4a7b-9e1d-6f4a8c2e0b57",
                "status": "SUPERSEDED"
              },
              {
                "collectedAt": "2026-10-30",
                "kind": "COLLECTION",
                "sourceId": "4f6a9c2e-8b1d-4e7a-a3c5-0d9e2f1b6a84",
                "status": "OK"
              },
              {
                "collectedAt": "2026-10-30",
                "kind": "COLLECTION",
                "sourceId": "9c1e7b3a-2d5f-4c8e-b6a0-7e3d1f9a5c26",
                "status": "OK"
              },
              {
                "collectedAt": "2026-10-30",
                "kind": "COLLECTION",
                "sourceId": "e2a8f4c6-1b9d-4f3a-8e7c-5a0b2d6f9e13",
                "status": "OK"
              }
            ]
          },
          "metrics": [
            {
              "findings": {
                "benchmarkSnapshotDate": "2026-11-02",
                "fxAsOf": "collected_at",
                "fxRatesAvailable": true,
                "holdingsCountRequired": 2,
                "input": {
                  "inputComplete": true,
                  "productsExcludedByCategory": 1,
                  "productsExcludedStale": 0,
                  "productsIncluded": 2,
                  "productsReceived": 3,
                  "productsUnknownType": 0,
                  "subsetSelected": false
                },
                "peerDataAvailable": true,
                "productLevel": [
                  {
                    "collectionId": "4f6a9c2e-8b1d-4e7a-a3c5-0d9e2f1b6a84",
                    "effectiveHoldingsCount": 2.33,
                    "hhi": 0.4284,
                    "holdingsCount": 4,
                    "holdingsCountSufficient": true,
                    "holdingsExcludedNoFx": 0,
                    "holdingsExcludedNoIsin": 0,
                    "holdingsExcludedNonPositive": 0,
                    "largestPositionPct": 0.5886,
                    "largestPositions": [
                      {
                        "isFund": true,
                        "isin": "SE0000000011",
                        "name": "Global Index Fund",
                        "pct": 0.5886
                      },
                      {
                        "isFund": true,
                        "isin": "SE0000000037",
                        "name": "Nordic Small Cap Fund",
                        "pct": 0.2663
                      },
                      {
                        "isFund": false,
                        "isin": "SE0000000045",
                        "name": "Example Industrials AB B",
                        "pct": 0.088
                      }
                    ],
                    "productId": "a91f3c5e-7d2b-4e8a-b6c4-3e1d9f7a2c58",
                    "top3Pct": 0.9429
                  },
                  {
                    "collectionId": "9c1e7b3a-2d5f-4c8e-b6a0-7e3d1f9a5c26",
                    "effectiveHoldingsCount": 1.32,
                    "hhi": 0.7592,
                    "holdingsCount": 2,
                    "holdingsCountSufficient": true,
                    "holdingsExcludedNoFx": 0,
                    "holdingsExcludedNoIsin": 0,
                    "holdingsExcludedNonPositive": 0,
                    "largestPositionPct": 0.86,
                    "largestPositions": [
                      {
                        "isFund": true,
                        "isin": "SE0000000021",
                        "name": "Generation Fund 1985",
                        "pct": 0.86
                      },
                      {
                        "isFund": true,
                        "isin": "SE0000000060",
                        "name": "Global Bond Fund",
                        "pct": 0.14
                      }
                    ],
                    "productId": "f0b6d4a2-3e8c-4f1a-9d7b-2c5e8a1f6b34",
                    "top3Pct": 1
                  }
                ],
                "userLevel": {
                  "effectiveHoldingsCount": 3.6,
                  "hhi": 0.2775,
                  "holdingsCount": 6,
                  "holdingsCountSufficient": true,
                  "holdingsExcludedNoFx": 0,
                  "holdingsExcludedNoIsin": 0,
                  "holdingsExcludedNonPositive": 0,
                  "largestPositionPct": 0.3583,
                  "largestPositions": [
                    {
                      "isFund": true,
                      "isin": "SE0000000021",
                      "name": "Generation Fund 1985",
                      "pct": 0.3583
                    },
                    {
                      "isFund": true,
                      "isin": "SE0000000011",
                      "name": "Global Index Fund",
                      "pct": 0.3433
                    },
                    {
                      "isFund": true,
                      "isin": "SE0000000037",
                      "name": "Nordic Small Cap Fund",
                      "pct": 0.1553
                    }
                  ],
                  "peer": {
                    "hhiPercentile": 0.45,
                    "largestPositionPercentile": 0.35,
                    "peerMedianEffectiveHoldings": 3.26,
                    "peerMedianHhi": 0.3064,
                    "peerMedianHoldingsCount": 8,
                    "peerMedianLargestPositionPct": 0.4524,
                    "peerMedianTop3Pct": 0.8313,
                    "peerP10Hhi": 0.1101,
                    "peerP25EffectiveHoldings": 1.96,
                    "peerP25Hhi": 0.1808,
                    "peerP25HoldingsCount": 4,
                    "peerP25LargestPositionPct": 0.2965,
                    "peerP25Top3Pct": 0.6305,
                    "peerP75EffectiveHoldings": 5.53,
                    "peerP75Hhi": 0.5105,
                    "peerP75HoldingsCount": 14,
                    "peerP75LargestPositionPct": 0.6631,
                    "peerP75Top3Pct": 0.9833,
                    "peerP90Hhi": 0.7709,
                    "peerP90LargestPositionPct": 0.8721,
                    "peerP90Top3Pct": 1,
                    "segment": "SE_30_44",
                    "segmentUserCount": 12052
                  },
                  "scope": "combined",
                  "top3Pct": 0.8569
                },
                "version": {
                  "api": 1,
                  "kernel": "1.7.0",
                  "methodology": 4
                }
              },
              "name": "wealth.concentration",
              "source": "STATISTICAL",
              "status": "OK",
              "version": 4
            },
            {
              "findings": {
                "benchmarkSnapshotDate": "2026-11-02",
                "peerCountRequired": 200,
                "peerDataAvailable": true,
                "policyLevel": [
                  {
                    "collectionId": "e2a8f4c6-1b9d-4f3a-8e7c-5a0b2d6f9e13",
                    "coverageMatched": true,
                    "covers": [
                      {
                        "group": "BASIC_COVERAGE",
                        "kind": "package",
                        "parameterName": "crisis",
                        "peerShare": 0.92
                      },
                      {
                        "group": "BASIC_COVERAGE",
                        "held": false,
                        "kind": "package",
                        "parameterName": "wrongFuel",
                        "peerShare": 0.83
                      },
                      {
                        "group": "ADD_ON",
                        "held": true,
                        "kind": "add_on",
                        "parameterName": "assistance",
                        "peerShare": 0.46
                      },
                      {
                        "group": "ADD_ON",
                        "held": false,
                        "kind": "add_on",
                        "parameterName": "rental",
                        "peerShare": 0.46
                      },
                      {
                        "group": "DEDUCTIBLE_TERMS",
                        "held": true,
                        "kind": "add_on",
                        "parameterName": "deductibleDiscountAnimalCollision",
                        "peerShare": 0.62
                      }
                    ],
                    "peerGroup": "SE_30_44|car_full",
                    "peerPolicyCount": 25592,
                    "peerStatus": "compared",
                    "policyGroup": "car_full",
                    "productId": "6a1f3c9e-2b7d-4e05-9c84-1d2e3f4a5b6c",
                    "scored": true,
                    "subType": "carInsurance"
                  },
                  {
                    "collectionId": "e2a8f4c6-1b9d-4f3a-8e7c-5a0b2d6f9e13",
                    "coverageMatched": true,
                    "covers": [
                      {
                        "group": "BUILDING_AND_PLOT",
                        "held": true,
                        "kind": "package",
                        "parameterName": "accidentVilla"
                      },
                      {
                        "group": "BUILDING_AND_PLOT",
                        "kind": "package",
                        "parameterName": "extendedLeakageVilla"
                      },
                      {
                        "group": "OTHER",
                        "held": true,
                        "kind": "package",
                        "parameterName": "additionalCostsVilla"
                      }
                    ],
                    "peerStatus": "group_not_compared",
                    "policyGroup": "villa_house_only",
                    "productId": "8b2e4d6f-3c1a-4f97-a5d2-7e9c1b3a5d8f",
                    "scored": true,
                    "subType": "villaInsurance"
                  }
                ]
              },
              "name": "insurance.coverage_held",
              "source": "STATISTICAL",
              "status": "OK",
              "version": 2
            }
          ]
        }
      },
      "getMetrics-200-computed": {
        "description": "A person's wealth portfolio (USER source): an older pension collection is replaced by a newer one from the same company (SUPERSEDED). Shares are fractions (0.3583 is 35.83 %), the mortgage is left out as a loan (productsExcludedByCategory), and peer figures are present because the person's age is known.",
        "summary": "Concentration computed",
        "value": {
          "input": {
            "complete": true,
            "sources": [
              {
                "kind": "USER",
                "sourceId": "b7e4d2a1-5c3f-4a8e-9d16-2f0c8e7a3b95",
                "status": "OK"
              },
              {
                "kind": "COLLECTION",
                "sourceId": "2b8d4f6a-0c3e-4a7b-9e1d-6f4a8c2e0b57",
                "status": "SUPERSEDED"
              },
              {
                "collectedAt": "2026-10-30",
                "kind": "COLLECTION",
                "sourceId": "4f6a9c2e-8b1d-4e7a-a3c5-0d9e2f1b6a84",
                "status": "OK"
              },
              {
                "collectedAt": "2026-10-30",
                "kind": "COLLECTION",
                "sourceId": "9c1e7b3a-2d5f-4c8e-b6a0-7e3d1f9a5c26",
                "status": "OK"
              }
            ]
          },
          "metrics": [
            {
              "findings": {
                "benchmarkSnapshotDate": "2026-11-02",
                "fxAsOf": "collected_at",
                "fxRatesAvailable": true,
                "holdingsCountRequired": 2,
                "input": {
                  "inputComplete": true,
                  "productsExcludedByCategory": 1,
                  "productsExcludedStale": 0,
                  "productsIncluded": 2,
                  "productsReceived": 3,
                  "productsUnknownType": 0,
                  "subsetSelected": false
                },
                "peerDataAvailable": true,
                "productLevel": [
                  {
                    "collectionId": "4f6a9c2e-8b1d-4e7a-a3c5-0d9e2f1b6a84",
                    "effectiveHoldingsCount": 2.33,
                    "hhi": 0.4284,
                    "holdingsCount": 4,
                    "holdingsCountSufficient": true,
                    "holdingsExcludedNoFx": 0,
                    "holdingsExcludedNoIsin": 0,
                    "holdingsExcludedNonPositive": 0,
                    "largestPositionPct": 0.5886,
                    "largestPositions": [
                      {
                        "isFund": true,
                        "isin": "SE0000000011",
                        "name": "Global Index Fund",
                        "pct": 0.5886
                      },
                      {
                        "isFund": true,
                        "isin": "SE0000000037",
                        "name": "Nordic Small Cap Fund",
                        "pct": 0.2663
                      },
                      {
                        "isFund": false,
                        "isin": "SE0000000045",
                        "name": "Example Industrials AB B",
                        "pct": 0.088
                      }
                    ],
                    "productId": "a91f3c5e-7d2b-4e8a-b6c4-3e1d9f7a2c58",
                    "top3Pct": 0.9429
                  },
                  {
                    "collectionId": "9c1e7b3a-2d5f-4c8e-b6a0-7e3d1f9a5c26",
                    "effectiveHoldingsCount": 1.32,
                    "hhi": 0.7592,
                    "holdingsCount": 2,
                    "holdingsCountSufficient": true,
                    "holdingsExcludedNoFx": 0,
                    "holdingsExcludedNoIsin": 0,
                    "holdingsExcludedNonPositive": 0,
                    "largestPositionPct": 0.86,
                    "largestPositions": [
                      {
                        "isFund": true,
                        "isin": "SE0000000021",
                        "name": "Generation Fund 1985",
                        "pct": 0.86
                      },
                      {
                        "isFund": true,
                        "isin": "SE0000000060",
                        "name": "Global Bond Fund",
                        "pct": 0.14
                      }
                    ],
                    "productId": "f0b6d4a2-3e8c-4f1a-9d7b-2c5e8a1f6b34",
                    "top3Pct": 1
                  }
                ],
                "userLevel": {
                  "effectiveHoldingsCount": 3.6,
                  "hhi": 0.2775,
                  "holdingsCount": 6,
                  "holdingsCountSufficient": true,
                  "holdingsExcludedNoFx": 0,
                  "holdingsExcludedNoIsin": 0,
                  "holdingsExcludedNonPositive": 0,
                  "largestPositionPct": 0.3583,
                  "largestPositions": [
                    {
                      "isFund": true,
                      "isin": "SE0000000021",
                      "name": "Generation Fund 1985",
                      "pct": 0.3583
                    },
                    {
                      "isFund": true,
                      "isin": "SE0000000011",
                      "name": "Global Index Fund",
                      "pct": 0.3433
                    },
                    {
                      "isFund": true,
                      "isin": "SE0000000037",
                      "name": "Nordic Small Cap Fund",
                      "pct": 0.1553
                    }
                  ],
                  "peer": {
                    "hhiPercentile": 0.45,
                    "largestPositionPercentile": 0.35,
                    "peerMedianEffectiveHoldings": 3.26,
                    "peerMedianHhi": 0.3064,
                    "peerMedianHoldingsCount": 8,
                    "peerMedianLargestPositionPct": 0.4524,
                    "peerMedianTop3Pct": 0.8313,
                    "peerP10Hhi": 0.1101,
                    "peerP25EffectiveHoldings": 1.96,
                    "peerP25Hhi": 0.1808,
                    "peerP25HoldingsCount": 4,
                    "peerP25LargestPositionPct": 0.2965,
                    "peerP25Top3Pct": 0.6305,
                    "peerP75EffectiveHoldings": 5.53,
                    "peerP75Hhi": 0.5105,
                    "peerP75HoldingsCount": 14,
                    "peerP75LargestPositionPct": 0.6631,
                    "peerP75Top3Pct": 0.9833,
                    "peerP90Hhi": 0.7709,
                    "peerP90LargestPositionPct": 0.8721,
                    "peerP90Top3Pct": 1,
                    "segment": "SE_30_44",
                    "segmentUserCount": 12052
                  },
                  "scope": "combined",
                  "top3Pct": 0.8569
                },
                "version": {
                  "api": 1,
                  "kernel": "1.7.0",
                  "methodology": 4
                }
              },
              "name": "wealth.concentration",
              "source": "STATISTICAL",
              "status": "OK",
              "version": 4
            }
          ]
        }
      },
      "getMetrics-200-covers-held": {
        "description": "Two named collections, insurance.coverage_held only. A full-cover car compared with its peer group (an add-on bought, one not bought, a package cover whose holding is unknown); a house-only villa, a group without peer comparison, so covers without shares; and a condo that matched no package, so every cover's held is unknown (left out) while the peer shares still show what comparable policies hold. Covers are shortened here.",
        "summary": "Covers held computed",
        "value": {
          "input": {
            "complete": true,
            "sources": [
              {
                "collectedAt": "2026-10-30",
                "kind": "COLLECTION",
                "sourceId": "e2a8f4c6-1b9d-4f3a-8e7c-5a0b2d6f9e13",
                "status": "OK"
              },
              {
                "collectedAt": "2026-10-28",
                "kind": "COLLECTION",
                "sourceId": "7d3b9f1c-4e6a-4b28-8c5d-2a1e9f7b3c46",
                "status": "OK"
              }
            ]
          },
          "metrics": [
            {
              "findings": {
                "benchmarkSnapshotDate": "2026-11-02",
                "peerCountRequired": 200,
                "peerDataAvailable": true,
                "policyLevel": [
                  {
                    "collectionId": "e2a8f4c6-1b9d-4f3a-8e7c-5a0b2d6f9e13",
                    "coverageMatched": true,
                    "covers": [
                      {
                        "group": "BASIC_COVERAGE",
                        "kind": "package",
                        "parameterName": "crisis",
                        "peerShare": 0.92
                      },
                      {
                        "group": "BASIC_COVERAGE",
                        "held": false,
                        "kind": "package",
                        "parameterName": "wrongFuel",
                        "peerShare": 0.83
                      },
                      {
                        "group": "ADD_ON",
                        "held": true,
                        "kind": "add_on",
                        "parameterName": "assistance",
                        "peerShare": 0.46
                      },
                      {
                        "group": "ADD_ON",
                        "held": false,
                        "kind": "add_on",
                        "parameterName": "rental",
                        "peerShare": 0.46
                      },
                      {
                        "group": "DEDUCTIBLE_TERMS",
                        "held": true,
                        "kind": "add_on",
                        "parameterName": "deductibleDiscountAnimalCollision",
                        "peerShare": 0.62
                      }
                    ],
                    "peerGroup": "SE_30_44|car_full",
                    "peerPolicyCount": 25592,
                    "peerStatus": "compared",
                    "policyGroup": "car_full",
                    "productId": "6a1f3c9e-2b7d-4e05-9c84-1d2e3f4a5b6c",
                    "scored": true,
                    "subType": "carInsurance"
                  },
                  {
                    "collectionId": "e2a8f4c6-1b9d-4f3a-8e7c-5a0b2d6f9e13",
                    "coverageMatched": true,
                    "covers": [
                      {
                        "group": "BUILDING_AND_PLOT",
                        "held": true,
                        "kind": "package",
                        "parameterName": "accidentVilla"
                      },
                      {
                        "group": "BUILDING_AND_PLOT",
                        "kind": "package",
                        "parameterName": "extendedLeakageVilla"
                      },
                      {
                        "group": "OTHER",
                        "held": true,
                        "kind": "package",
                        "parameterName": "additionalCostsVilla"
                      }
                    ],
                    "peerStatus": "group_not_compared",
                    "policyGroup": "villa_house_only",
                    "productId": "8b2e4d6f-3c1a-4f97-a5d2-7e9c1b3a5d8f",
                    "scored": true,
                    "subType": "villaInsurance"
                  },
                  {
                    "collectionId": "7d3b9f1c-4e6a-4b28-8c5d-2a1e9f7b3c46",
                    "coverageMatched": false,
                    "covers": [
                      {
                        "group": "PERSONAL_BELONGINGS",
                        "kind": "add_on",
                        "parameterName": "accident",
                        "peerShare": 0.64
                      },
                      {
                        "group": "PERSONAL_BELONGINGS",
                        "kind": "package",
                        "parameterName": "extendedElectronic",
                        "peerShare": 0.19
                      },
                      {
                        "group": "YOU_AND_YOUR_FAMILY",
                        "kind": "package",
                        "parameterName": "bullying",
                        "peerShare": 0.07
                      }
                    ],
                    "peerGroup": "SE_30_44|condo",
                    "peerPolicyCount": 23188,
                    "peerStatus": "compared",
                    "policyGroup": "condo",
                    "productId": "3c9d1e7f-5a2b-4c86-b3e1-9f7a2d4c6e01",
                    "scored": true,
                    "subType": "condoInsurance"
                  }
                ]
              },
              "name": "insurance.coverage_held",
              "source": "STATISTICAL",
              "status": "OK",
              "version": 2
            }
          ]
        }
      },
      "getMetrics-200-covers-held-no-data": {
        "description": "The named collection holds no car, condo or villa policy (here only travel and pet insurance), so insurance.coverage_held is NO_DATA with no findings.",
        "summary": "Covers held: no car, condo or villa policy",
        "value": {
          "input": {
            "complete": true,
            "sources": [
              {
                "collectedAt": "2026-10-30",
                "kind": "COLLECTION",
                "sourceId": "e2a8f4c6-1b9d-4f3a-8e7c-5a0b2d6f9e13",
                "status": "OK"
              }
            ]
          },
          "metrics": [
            {
              "name": "insurance.coverage_held",
              "source": "STATISTICAL",
              "status": "NO_DATA"
            }
          ]
        }
      },
      "getMetrics-200-no-data": {
        "description": "The person's only wealth collection has nothing readable (NO_DATA), so input.complete is false and wealth.concentration is NO_DATA with no findings.",
        "summary": "No data",
        "value": {
          "input": {
            "complete": false,
            "sources": [
              {
                "kind": "USER",
                "sourceId": "b7e4d2a1-5c3f-4a8e-9d16-2f0c8e7a3b95",
                "status": "OK"
              },
              {
                "kind": "COLLECTION",
                "sourceId": "4f6a9c2e-8b1d-4e7a-a3c5-0d9e2f1b6a84",
                "status": "NO_DATA"
              }
            ]
          },
          "metrics": [
            {
              "name": "wealth.concentration",
              "source": "STATISTICAL",
              "status": "NO_DATA"
            }
          ]
        }
      },
      "getMetrics-200-not-configured": {
        "description": "The metric is not switched on for this client, or the client has no market. Nothing is read for it, so input.sources is empty and input.complete is left out (null: no source was read).",
        "summary": "Metric not configured",
        "value": {
          "input": {
            "sources": []
          },
          "metrics": [
            {
              "name": "insurance.coverage_held",
              "source": "STATISTICAL",
              "status": "NOT_CONFIGURED"
            }
          ]
        }
      },
      "getMetrics-200-unavailable": {
        "description": "COLLECTION sources: one is an insurance collection (NOT_WEALTH), so input.complete is false. wealth.concentration is UNAVAILABLE because the metrics service gave no usable answer: still 200, with no version and no findings.",
        "summary": "Metric unavailable",
        "value": {
          "input": {
            "complete": false,
            "sources": [
              {
                "collectedAt": "2026-10-30",
                "kind": "COLLECTION",
                "sourceId": "4f6a9c2e-8b1d-4e7a-a3c5-0d9e2f1b6a84",
                "status": "OK"
              },
              {
                "kind": "COLLECTION",
                "sourceId": "e2a8f4c6-1b9d-4f3a-8e7c-5a0b2d6f9e13",
                "status": "NOT_WEALTH"
              }
            ]
          },
          "metrics": [
            {
              "name": "wealth.concentration",
              "source": "STATISTICAL",
              "status": "UNAVAILABLE"
            }
          ]
        }
      },
      "getMetrics-400-missing-collection-id": {
        "description": "A COLLECTION source needs a collectionId, and a USER source a userId.",
        "summary": "Source without its id",
        "value": {
          "errors": [],
          "message": "A COLLECTION source needs a collectionId",
          "status": "400 BAD_REQUEST",
          "statusCode": 400
        }
      },
      "getMetrics-400-no-sources": {
        "description": "sources is missing or empty.",
        "summary": "No sources",
        "value": {
          "errors": [],
          "message": "At least one source is required",
          "status": "400 BAD_REQUEST",
          "statusCode": 400
        }
      },
      "getMetrics-400-supplied-not-supported": {
        "description": "SUPPLIED sources are in the schema but not supported by the draft yet.",
        "summary": "SUPPLIED source",
        "value": {
          "errors": [],
          "message": "SUPPLIED sources are not supported by the draft yet",
          "status": "400 BAD_REQUEST",
          "statusCode": 400
        }
      },
      "getMetrics-400-too-many-sources": {
        "description": "At most 25 sources per request.",
        "summary": "Too many sources",
        "value": {
          "errors": [],
          "message": "At most 25 sources per request",
          "status": "400 BAD_REQUEST",
          "statusCode": 400
        }
      },
      "getMetrics-400-unknown-metric": {
        "description": "A name in metrics is not a supported metric; the message lists the supported ones. wealth.rules is no longer served here: what the rules find is each explanation's evidence on POST /intelligence/explanations.",
        "summary": "Unknown metric",
        "value": {
          "errors": [],
          "message": "Unknown metric 'wealth.rules'; supported: wealth.concentration, insurance.coverage_held",
          "status": "400 BAD_REQUEST",
          "statusCode": 400
        }
      },
      "getMetrics-400-user-needs-wealth-client": {
        "description": "A client outside the wealth product line names wealth.concentration over a USER source. Leave metrics out (the default list then holds the metrics the source may ask for), or name the collections instead.",
        "summary": "wealth.concentration over a USER source, outside the wealth product line",
        "value": {
          "errors": [],
          "message": "wealth.concentration over a USER source needs a client in the wealth product line",
          "status": "400 BAD_REQUEST",
          "statusCode": 400
        }
      },
      "getMetrics-400-user-with-collections": {
        "description": "A USER source is a person's whole portfolio, so it must be the only source.",
        "summary": "USER combined with other sources",
        "value": {
          "errors": [],
          "message": "Either one USER source alone, or one or more COLLECTION sources",
          "status": "400 BAD_REQUEST",
          "statusCode": 400
        }
      },
      "getMetrics-404-user-not-found": {
        "description": "The USER source's userId is not a user of this client, or the user is anonymised. A COLLECTION that is not found is not an error: it is reported in input.sources with status NOT_FOUND.",
        "summary": "User not found",
        "value": {
          "errors": [],
          "localizedMessage": "User not found",
          "message": "User not found",
          "status": "404 NOT_FOUND",
          "statusCode": 404
        }
      },
      "getMetrics-422-more-than-one-person": {
        "description": "The COLLECTION sources belong to different people, so they cannot form one portfolio.",
        "summary": "Collections of more than one person",
        "value": {
          "errors": [],
          "message": "The collections belong to more than one person",
          "status": "422 UNPROCESSABLE_ENTITY",
          "statusCode": 422
        }
      },
      "getMetrics-422-same-company-same-time": {
        "description": "Two collections from the same company were collected at the same instant, so neither can be said to replace the other.",
        "summary": "Two collections, same company, same time",
        "value": {
          "errors": [],
          "message": "Collections e2a8f4c6-1b9d-4f3a-8e7c-5a0b2d6f9e13 and 5f2d8b4e-7a1c-4d9f-b3e6-0a8c5f2d7b19 are from the same company and were collected at the same time",
          "status": "422 UNPROCESSABLE_ENTITY",
          "statusCode": 422
        }
      },
      "getMetrics-request-a-person": {
        "description": "One USER source and the metrics to compute. Leave metrics out to get every metric the source may ask for: both for a client in the wealth product line, insurance.coverage_held alone for any other client.",
        "summary": "A person's portfolio",
        "value": {
          "metrics": [
            "wealth.concentration",
            "insurance.coverage_held"
          ],
          "sources": [
            {
              "kind": "USER",
              "userId": "b7e4d2a1-5c3f-4a8e-9d16-2f0c8e7a3b95"
            }
          ]
        }
      },
      "getMetrics-request-covers-held-by-collections": {
        "description": "COLLECTION sources and insurance.coverage_held only: the car, condo and villa policies in those collections, each with the covers it holds and the share of comparable policies holding each.",
        "summary": "Covers held for named collections",
        "value": {
          "metrics": [
            "insurance.coverage_held"
          ],
          "sources": [
            {
              "collectionId": "e2a8f4c6-1b9d-4f3a-8e7c-5a0b2d6f9e13",
              "kind": "COLLECTION"
            },
            {
              "collectionId": "7d3b9f1c-4e6a-4b28-8c5d-2a1e9f7b3c46",
              "kind": "COLLECTION"
            }
          ]
        }
      },
      "getMetrics-request-named-collections": {
        "description": "COLLECTION sources without a metrics list: every supported metric is computed.",
        "summary": "Named collections, every metric",
        "value": {
          "sources": [
            {
              "collectionId": "4f6a9c2e-8b1d-4e7a-a3c5-0d9e2f1b6a84",
              "kind": "COLLECTION"
            },
            {
              "collectionId": "e2a8f4c6-1b9d-4f3a-8e7c-5a0b2d6f9e13",
              "kind": "COLLECTION"
            }
          ]
        }
      },
      "standard-error-400": {
        "description": "The request body or parameters are invalid.",
        "summary": "Bad Request",
        "value": {
          "errors": [],
          "localizedMessage": "Invalid request",
          "message": "Invalid request",
          "status": "BAD_REQUEST",
          "statusCode": 400
        }
      },
      "standard-error-401": {
        "description": "The credentials are missing or invalid, the calling IP is not on the client's allowlist, or mTLS is enforced and no valid client certificate was sent. An expired session token gets 401 Token expired.",
        "summary": "Unauthorized",
        "value": {
          "errors": [],
          "localizedMessage": "Authentication failed",
          "message": "Authentication failed",
          "status": "UNAUTHORIZED",
          "statusCode": 401
        }
      },
      "standard-error-403": {
        "description": "The client is not allowed to use this endpoint or resource.",
        "summary": "Forbidden",
        "value": {
          "errors": [],
          "localizedMessage": "Not allowed",
          "message": "Not allowed",
          "status": "FORBIDDEN",
          "statusCode": 403
        }
      },
      "standard-error-404": {
        "description": "The requested resource does not exist or has expired.",
        "summary": "Not Found",
        "value": {
          "errors": [],
          "localizedMessage": "Not found",
          "message": "Not found",
          "status": "NOT_FOUND",
          "statusCode": 404
        }
      },
      "standard-error-429": {
        "description": "The client has sent too many requests in a given time window. Retry after a delay using exponential backoff.",
        "summary": "Rate limit exceeded",
        "value": {
          "errors": [],
          "localizedMessage": "Too many requests. Please retry with backoff.",
          "message": "Too many requests. Please retry with backoff.",
          "status": "TOO_MANY_REQUESTS",
          "statusCode": 429
        }
      }
    },
    "schemas": {
      "CoverageHeldBenchmark": {
        "properties": {
          "covers": {
            "additionalProperties": {
              "type": "number"
            },
            "type": "object"
          },
          "policyCount": {
            "format": "int32",
            "type": "integer"
          }
        }
      },
      "CoverageHeldCover": {
        "example": {
          "group": "ADD_ON",
          "held": true,
          "kind": "add_on",
          "parameterName": "assistance",
          "peerShare": 0.46
        },
        "properties": {
          "group": {
            "type": "string"
          },
          "held": {
            "type": "boolean"
          },
          "kind": {
            "description": "package when the cover comes with the package or tier, add_on when it is bought or offered as an add-on. Per cover, never per policy. The list can grow between releases; parse it leniently.",
            "type": "string"
          },
          "parameterName": {
            "type": "string"
          },
          "peerShare": {
            "type": "number"
          }
        }
      },
      "CoverageHeldFindings": {
        "description": "Covers held per car, condo and villa policy from the metrics service, against the share of peers holding each; shares are fractions (0.46 is 46 %). Every field is nullable: null means the metrics service did not report it, a null list is not an empty one, and a null held is unknown, not false.",
        "example": {
          "benchmarkSnapshotDate": "2026-11-02",
          "peerCountRequired": 200,
          "peerDataAvailable": true,
          "policyLevel": [
            {
              "collectionId": "e2a8f4c6-1b9d-4f3a-8e7c-5a0b2d6f9e13",
              "coverageMatched": true,
              "covers": [
                {
                  "group": "BASIC_COVERAGE",
                  "kind": "package",
                  "parameterName": "crisis",
                  "peerShare": 0.92
                },
                {
                  "group": "BASIC_COVERAGE",
                  "held": false,
                  "kind": "package",
                  "parameterName": "wrongFuel",
                  "peerShare": 0.83
                },
                {
                  "group": "ADD_ON",
                  "held": true,
                  "kind": "add_on",
                  "parameterName": "assistance",
                  "peerShare": 0.46
                },
                {
                  "group": "ADD_ON",
                  "held": false,
                  "kind": "add_on",
                  "parameterName": "rental",
                  "peerShare": 0.46
                },
                {
                  "group": "DEDUCTIBLE_TERMS",
                  "held": true,
                  "kind": "add_on",
                  "parameterName": "deductibleDiscountAnimalCollision",
                  "peerShare": 0.62
                }
              ],
              "peerGroup": "SE_30_44|car_full",
              "peerPolicyCount": 25592,
              "peerStatus": "compared",
              "policyGroup": "car_full",
              "productId": "6a1f3c9e-2b7d-4e05-9c84-1d2e3f4a5b6c",
              "scored": true,
              "subType": "carInsurance"
            },
            {
              "collectionId": "e2a8f4c6-1b9d-4f3a-8e7c-5a0b2d6f9e13",
              "coverageMatched": true,
              "covers": [
                {
                  "group": "BUILDING_AND_PLOT",
                  "held": true,
                  "kind": "package",
                  "parameterName": "accidentVilla"
                },
                {
                  "group": "BUILDING_AND_PLOT",
                  "kind": "package",
                  "parameterName": "extendedLeakageVilla"
                },
                {
                  "group": "OTHER",
                  "held": true,
                  "kind": "package",
                  "parameterName": "additionalCostsVilla"
                }
              ],
              "peerStatus": "group_not_compared",
              "policyGroup": "villa_house_only",
              "productId": "8b2e4d6f-3c1a-4f97-a5d2-7e9c1b3a5d8f",
              "scored": true,
              "subType": "villaInsurance"
            }
          ]
        },
        "properties": {
          "benchmarkSnapshotDate": {
            "format": "date",
            "type": "string"
          },
          "benchmarks": {
            "additionalProperties": {
              "$ref": "#/components/schemas/CoverageHeldBenchmark"
            },
            "description": "Not filled by POST /intelligence/metrics: the metrics service returns peer groups' shares only for a lookup without policies, which this API does not send.",
            "type": "object"
          },
          "peerCountRequired": {
            "format": "int32",
            "type": "integer"
          },
          "peerDataAvailable": {
            "type": "boolean"
          },
          "policyLevel": {
            "items": {
              "$ref": "#/components/schemas/CoverageHeldPolicy"
            },
            "type": "array"
          }
        }
      },
      "CoverageHeldPolicy": {
        "description": "One policy's covers. Every field is nullable: null means the metrics service did not report it, a null list is not an empty one, and a null held is unknown, not false.",
        "example": {
          "collectionId": "e2a8f4c6-1b9d-4f3a-8e7c-5a0b2d6f9e13",
          "coverageMatched": true,
          "covers": [
            {
              "group": "BASIC_COVERAGE",
              "kind": "package",
              "parameterName": "crisis",
              "peerShare": 0.92
            },
            {
              "group": "BASIC_COVERAGE",
              "held": false,
              "kind": "package",
              "parameterName": "wrongFuel",
              "peerShare": 0.83
            },
            {
              "group": "ADD_ON",
              "held": true,
              "kind": "add_on",
              "parameterName": "assistance",
              "peerShare": 0.46
            },
            {
              "group": "ADD_ON",
              "held": false,
              "kind": "add_on",
              "parameterName": "rental",
              "peerShare": 0.46
            },
            {
              "group": "DEDUCTIBLE_TERMS",
              "held": true,
              "kind": "add_on",
              "parameterName": "deductibleDiscountAnimalCollision",
              "peerShare": 0.62
            }
          ],
          "peerGroup": "SE_30_44|car_full",
          "peerPolicyCount": 25592,
          "peerStatus": "compared",
          "policyGroup": "car_full",
          "productId": "6a1f3c9e-2b7d-4e05-9c84-1d2e3f4a5b6c",
          "scored": true,
          "subType": "carInsurance"
        },
        "properties": {
          "collectionId": {
            "type": "string"
          },
          "coverageMatched": {
            "type": "boolean"
          },
          "covers": {
            "items": {
              "$ref": "#/components/schemas/CoverageHeldCover"
            },
            "type": "array"
          },
          "peerGroup": {
            "type": "string"
          },
          "peerPolicyCount": {
            "format": "int32",
            "type": "integer"
          },
          "peerStatus": {
            "description": "compared when the policy has peer shares, otherwise why not: not_scored (outside SE), group_unknown (no policy group), group_not_compared (a group without peer data), no_segment (no age), no_snapshot (no peer snapshot yet) or group_below_floor (too few peers). The list can grow between releases; parse it leniently.",
            "type": "string"
          },
          "policyGroup": {
            "description": "The group the policy's covers are read in: car_full, car_half, car_traffic, car_laid_up, condo, villa_contents or villa_house_only. Null when the covers that decide the group are unknown. The list can grow between releases; parse it leniently.",
            "type": "string"
          },
          "productId": {
            "type": "string"
          },
          "scored": {
            "type": "boolean"
          },
          "subType": {
            "type": "string"
          }
        }
      },
      "DuplicateCoverEvidence": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Evidence"
          },
          {
            "properties": {
              "policyCount": {
                "format": "int32",
                "type": "integer"
              },
              "subType": {
                "enum": [
                  "carInsurance",
                  "boatInsurance",
                  "trailerInsurance",
                  "motorcycleInsurance",
                  "mopedInsurance",
                  "caravanInsurance",
                  "motorhomeInsurance",
                  "otherVehicleInsurance",
                  "childInsurance",
                  "pregnancyInsurance",
                  "lifeInsurance",
                  "healthInsurance",
                  "accidentInsurance",
                  "travelInsurance",
                  "condoInsurance",
                  "contentsInsurance",
                  "villaInsurance",
                  "cottageInsurance",
                  "farmInsurance",
                  "catInsurance",
                  "dogInsurance",
                  "horseInsurance",
                  "otherAnimalInsurance",
                  "genericInsurance",
                  "groupInsurance",
                  "incomeInsurance",
                  "sicknessInsurance",
                  "loanInsurance",
                  "landlordInsurance"
                ],
                "type": "string"
              }
            },
            "type": "object"
          }
        ],
        "example": {
          "policyCount": 2,
          "subType": "childInsurance"
        }
      },
      "ErrorResponse": {
        "description": "Standard error response returned by the API when a request fails.",
        "properties": {
          "errors": {
            "description": "Field-level validation errors, empty when not applicable.",
            "items": {
              "$ref": "#/components/schemas/InsurelyInputError"
            },
            "type": "array"
          },
          "localizedMessage": {
            "description": "Localized version of the error message, if available.",
            "example": "Invalid request",
            "type": "string"
          },
          "message": {
            "description": "Human-readable error message.",
            "example": "Invalid request",
            "type": "string"
          },
          "status": {
            "description": "HTTP status name.",
            "example": "BAD_REQUEST",
            "type": "string"
          },
          "statusCode": {
            "description": "HTTP status code.",
            "example": 400,
            "format": "int32",
            "type": "integer"
          }
        }
      },
      "Evidence": {},
      "Explanation": {
        "example": {
          "category": "FEES",
          "evidence": {
            "annualFeeCost": 3448,
            "currency": "SEK",
            "feePct": 1.85,
            "holding": "Nordic Small Cap Fund",
            "isin": "SE0000000037"
          },
          "id": "wealth.high_fee_holding",
          "rank": 6,
          "source": "RULE",
          "targets": [
            {
              "collectionId": "4f6a9c2e-8b1d-4e7a-a3c5-0d9e2f1b6a84",
              "id": "a91f3c5e-7d2b-4e8a-b6c4-3e1d9f7a2c58",
              "kind": "ACCOUNT"
            }
          ],
          "text": {
            "description": "1.9 % a year, about 3,448 SEK per year.",
            "title": "Nordic Small Cap Fund has a high fee"
          },
          "version": 1
        },
        "properties": {
          "category": {
            "enum": [
              "CONCENTRATION",
              "FEES",
              "LOANS",
              "SAVINGS",
              "PERFORMANCE",
              "CONSOLIDATION",
              "RENEWAL",
              "OVERLAP",
              "COVERAGE",
              "CLAIMS",
              "PORTFOLIO",
              "OTHER"
            ],
            "type": "string"
          },
          "evidence": {
            "description": "The facts behind the entry, shaped per id; null for an entry without any",
            "oneOf": [
              {
                "$ref": "#/components/schemas/TravelCoveredTwiceEvidence"
              },
              {
                "$ref": "#/components/schemas/DuplicateCoverEvidence"
              },
              {
                "$ref": "#/components/schemas/RenewingSoonEvidence"
              },
              {
                "$ref": "#/components/schemas/PartialVehicleCoverEvidence"
              },
              {
                "$ref": "#/components/schemas/PremiumConcentrationEvidence"
              },
              {
                "$ref": "#/components/schemas/MultipleInsurersEvidence"
              },
              {
                "$ref": "#/components/schemas/HighFeeHoldingEvidence"
              },
              {
                "$ref": "#/components/schemas/LoanAboveTypicalRateEvidence"
              },
              {
                "$ref": "#/components/schemas/Top5ConcentrationEvidence"
              }
            ]
          },
          "id": {
            "type": "string"
          },
          "rank": {
            "format": "int32",
            "type": "integer"
          },
          "source": {
            "enum": [
              "RULE",
              "STATISTICAL"
            ],
            "type": "string"
          },
          "targets": {
            "items": {
              "$ref": "#/components/schemas/ExplanationTarget"
            },
            "type": "array"
          },
          "text": {
            "$ref": "#/components/schemas/ExplanationText"
          },
          "version": {
            "format": "int32",
            "type": "integer"
          }
        }
      },
      "ExplanationEvaluated": {
        "example": {
          "id": "insurance.travel_covered_twice",
          "outcome": "APPLIES",
          "source": "RULE",
          "version": 1
        },
        "properties": {
          "id": {
            "type": "string"
          },
          "outcome": {
            "enum": [
              "APPLIES",
              "NOT_APPLICABLE",
              "INSUFFICIENT_DATA",
              "NOT_CONFIGURED"
            ],
            "type": "string"
          },
          "source": {
            "enum": [
              "RULE",
              "STATISTICAL"
            ],
            "type": "string"
          },
          "version": {
            "format": "int32",
            "type": "integer"
          }
        }
      },
      "ExplanationRequest": {
        "description": "Sources to resolve into one person's portfolio, evaluated against the client's catalogue of rule-based explanations. No model-written text: every entry is computed by rules and phrased from a fixed template",
        "properties": {
          "language": {
            "description": "ISO 639-1 language of the template texts (en, sv). Unsupported or absent falls back to English; the response says which was used",
            "example": "sv",
            "type": "string"
          },
          "sources": {
            "description": "One USER, or one or more COLLECTIONs",
            "items": {
              "$ref": "#/components/schemas/PortfolioSource"
            },
            "type": "array"
          }
        },
        "required": [
          "sources"
        ]
      },
      "ExplanationResponse": {
        "properties": {
          "computedAt": {
            "format": "date-time",
            "type": "string"
          },
          "evaluated": {
            "items": {
              "$ref": "#/components/schemas/ExplanationEvaluated"
            },
            "type": "array"
          },
          "explanations": {
            "items": {
              "$ref": "#/components/schemas/Explanation"
            },
            "type": "array"
          },
          "input": {
            "$ref": "#/components/schemas/PortfolioMetricsInput"
          },
          "language": {
            "type": "string"
          },
          "rulesVersions": {
            "$ref": "#/components/schemas/ExplanationRulesVersions"
          },
          "status": {
            "enum": [
              "READY",
              "NO_DATA"
            ],
            "type": "string"
          }
        }
      },
      "ExplanationRulesVersions": {
        "example": {
          "insurance": 2,
          "wealth": 1
        },
        "properties": {
          "insurance": {
            "format": "int32",
            "type": "integer"
          },
          "wealth": {
            "format": "int32",
            "type": "integer"
          }
        }
      },
      "ExplanationTarget": {
        "example": {
          "collectionId": "4f6a9c2e-8b1d-4e7a-a3c5-0d9e2f1b6a84",
          "id": "a91f3c5e-7d2b-4e8a-b6c4-3e1d9f7a2c58",
          "kind": "ACCOUNT"
        },
        "properties": {
          "collectionId": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "kind": {
            "enum": [
              "ACCOUNT",
              "POLICY"
            ],
            "type": "string"
          }
        }
      },
      "ExplanationText": {
        "example": {
          "description": "1.9 % a year, about 3,448 SEK per year.",
          "title": "Nordic Small Cap Fund has a high fee"
        },
        "properties": {
          "description": {
            "type": "string"
          },
          "title": {
            "type": "string"
          }
        }
      },
      "HighFeeHoldingEvidence": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Evidence"
          },
          {
            "properties": {
              "annualFeeCost": {
                "type": "number"
              },
              "currency": {
                "type": "string"
              },
              "feePct": {
                "type": "number"
              },
              "holding": {
                "type": "string"
              },
              "isin": {
                "type": "string"
              }
            },
            "type": "object"
          }
        ],
        "example": {
          "annualFeeCost": 3448,
          "currency": "SEK",
          "feePct": 1.85,
          "holding": "Nordic Small Cap Fund",
          "isin": "SE0000000037"
        }
      },
      "InsurelyInputError": {
        "description": "Field-level validation errors, empty when not applicable."
      },
      "LoanAboveTypicalRateEvidence": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Evidence"
          },
          {
            "properties": {
              "currency": {
                "type": "string"
              },
              "potentialAnnualSaving": {
                "type": "number"
              },
              "ratePct": {
                "type": "number"
              },
              "typicalRatePct": {
                "type": "number"
              }
            },
            "type": "object"
          }
        ],
        "example": {
          "currency": "SEK",
          "potentialAnnualSaving": 16800,
          "ratePct": 4.2,
          "typicalRatePct": 3.5
        }
      },
      "MultipleInsurersEvidence": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Evidence"
          },
          {
            "properties": {
              "insurerCount": {
                "format": "int32",
                "type": "integer"
              },
              "policiesWithoutInsurer": {
                "format": "int32",
                "type": "integer"
              }
            },
            "type": "object"
          }
        ],
        "example": {
          "insurerCount": 2,
          "policiesWithoutInsurer": 0
        }
      },
      "PartialVehicleCoverEvidence": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Evidence"
          },
          {
            "properties": {
              "vehicleCoverage": {
                "type": "string"
              }
            },
            "type": "object"
          }
        ],
        "example": {
          "vehicleCoverage": "TRAFFIC"
        }
      },
      "PortfolioMetric": {
        "example": {
          "findings": {
            "benchmarkSnapshotDate": "2026-11-02",
            "fxAsOf": "collected_at",
            "fxRatesAvailable": true,
            "holdingsCountRequired": 2,
            "input": {
              "inputComplete": true,
              "productsExcludedByCategory": 1,
              "productsExcludedStale": 0,
              "productsIncluded": 2,
              "productsReceived": 3,
              "productsUnknownType": 0,
              "subsetSelected": false
            },
            "peerDataAvailable": true,
            "productLevel": [
              {
                "collectionId": "4f6a9c2e-8b1d-4e7a-a3c5-0d9e2f1b6a84",
                "effectiveHoldingsCount": 2.33,
                "hhi": 0.4284,
                "holdingsCount": 4,
                "holdingsCountSufficient": true,
                "holdingsExcludedNoFx": 0,
                "holdingsExcludedNoIsin": 0,
                "holdingsExcludedNonPositive": 0,
                "largestPositionPct": 0.5886,
                "largestPositions": [
                  {
                    "isFund": true,
                    "isin": "SE0000000011",
                    "name": "Global Index Fund",
                    "pct": 0.5886
                  },
                  {
                    "isFund": true,
                    "isin": "SE0000000037",
                    "name": "Nordic Small Cap Fund",
                    "pct": 0.2663
                  },
                  {
                    "isFund": false,
                    "isin": "SE0000000045",
                    "name": "Example Industrials AB B",
                    "pct": 0.088
                  }
                ],
                "productId": "a91f3c5e-7d2b-4e8a-b6c4-3e1d9f7a2c58",
                "top3Pct": 0.9429
              },
              {
                "collectionId": "9c1e7b3a-2d5f-4c8e-b6a0-7e3d1f9a5c26",
                "effectiveHoldingsCount": 1.32,
                "hhi": 0.7592,
                "holdingsCount": 2,
                "holdingsCountSufficient": true,
                "holdingsExcludedNoFx": 0,
                "holdingsExcludedNoIsin": 0,
                "holdingsExcludedNonPositive": 0,
                "largestPositionPct": 0.86,
                "largestPositions": [
                  {
                    "isFund": true,
                    "isin": "SE0000000021",
                    "name": "Generation Fund 1985",
                    "pct": 0.86
                  },
                  {
                    "isFund": true,
                    "isin": "SE0000000060",
                    "name": "Global Bond Fund",
                    "pct": 0.14
                  }
                ],
                "productId": "f0b6d4a2-3e8c-4f1a-9d7b-2c5e8a1f6b34",
                "top3Pct": 1
              }
            ],
            "userLevel": {
              "effectiveHoldingsCount": 3.6,
              "hhi": 0.2775,
              "holdingsCount": 6,
              "holdingsCountSufficient": true,
              "holdingsExcludedNoFx": 0,
              "holdingsExcludedNoIsin": 0,
              "holdingsExcludedNonPositive": 0,
              "largestPositionPct": 0.3583,
              "largestPositions": [
                {
                  "isFund": true,
                  "isin": "SE0000000021",
                  "name": "Generation Fund 1985",
                  "pct": 0.3583
                },
                {
                  "isFund": true,
                  "isin": "SE0000000011",
                  "name": "Global Index Fund",
                  "pct": 0.3433
                },
                {
                  "isFund": true,
                  "isin": "SE0000000037",
                  "name": "Nordic Small Cap Fund",
                  "pct": 0.1553
                }
              ],
              "peer": {
                "hhiPercentile": 0.45,
                "largestPositionPercentile": 0.35,
                "peerMedianEffectiveHoldings": 3.26,
                "peerMedianHhi": 0.3064,
                "peerMedianHoldingsCount": 8,
                "peerMedianLargestPositionPct": 0.4524,
                "peerMedianTop3Pct": 0.8313,
                "peerP10Hhi": 0.1101,
                "peerP25EffectiveHoldings": 1.96,
                "peerP25Hhi": 0.1808,
                "peerP25HoldingsCount": 4,
                "peerP25LargestPositionPct": 0.2965,
                "peerP25Top3Pct": 0.6305,
                "peerP75EffectiveHoldings": 5.53,
                "peerP75Hhi": 0.5105,
                "peerP75HoldingsCount": 14,
                "peerP75LargestPositionPct": 0.6631,
                "peerP75Top3Pct": 0.9833,
                "peerP90Hhi": 0.7709,
                "peerP90LargestPositionPct": 0.8721,
                "peerP90Top3Pct": 1,
                "segment": "SE_30_44",
                "segmentUserCount": 12052
              },
              "scope": "combined",
              "top3Pct": 0.8569
            },
            "version": {
              "api": 1,
              "kernel": "1.7.0",
              "methodology": 4
            }
          },
          "name": "wealth.concentration",
          "source": "STATISTICAL",
          "status": "OK",
          "version": 4
        },
        "properties": {
          "findings": {
            "description": "The metric's findings, one shape per metric; null unless status is OK",
            "oneOf": [
              {
                "$ref": "#/components/schemas/WealthConcentrationFindings"
              },
              {
                "$ref": "#/components/schemas/CoverageHeldFindings"
              }
            ]
          },
          "name": {
            "example": "wealth.concentration",
            "type": "string"
          },
          "source": {
            "enum": [
              "RULE",
              "STATISTICAL"
            ],
            "type": "string"
          },
          "status": {
            "enum": [
              "OK",
              "NO_DATA",
              "UNAVAILABLE",
              "NOT_CONFIGURED"
            ],
            "type": "string"
          },
          "version": {
            "format": "int32",
            "type": "integer"
          }
        }
      },
      "PortfolioMetricsInput": {
        "example": {
          "complete": true,
          "sources": [
            {
              "kind": "USER",
              "sourceId": "b7e4d2a1-5c3f-4a8e-9d16-2f0c8e7a3b95",
              "status": "OK"
            },
            {
              "kind": "COLLECTION",
              "sourceId": "2b8d4f6a-0c3e-4a7b-9e1d-6f4a8c2e0b57",
              "status": "SUPERSEDED"
            },
            {
              "collectedAt": "2026-10-30",
              "kind": "COLLECTION",
              "sourceId": "4f6a9c2e-8b1d-4e7a-a3c5-0d9e2f1b6a84",
              "status": "OK"
            },
            {
              "collectedAt": "2026-10-30",
              "kind": "COLLECTION",
              "sourceId": "9c1e7b3a-2d5f-4c8e-b6a0-7e3d1f9a5c26",
              "status": "OK"
            }
          ]
        },
        "properties": {
          "complete": {
            "description": "Whether every requested source contributed or was deliberately replaced; null when no source was read (on POST /intelligence/metrics, when no requested metric runs)",
            "type": "boolean"
          },
          "sources": {
            "items": {
              "$ref": "#/components/schemas/PortfolioSourceStatus"
            },
            "type": "array"
          }
        }
      },
      "PortfolioMetricsRequest": {
        "description": "Sources to resolve into one portfolio, and the metrics to compute over it",
        "properties": {
          "metrics": {
            "description": "Metric names; when omitted, every supported metric the sources may ask for. wealth.concentration reads the wealth line (over a USER source, for a client in the wealth product line only), insurance.coverage_held the insurance line (car, condo and villa policies)",
            "example": [
              "wealth.concentration",
              "insurance.coverage_held"
            ],
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "sources": {
            "description": "One USER, or one or more COLLECTIONs",
            "items": {
              "$ref": "#/components/schemas/PortfolioSource"
            },
            "type": "array"
          }
        },
        "required": [
          "sources"
        ]
      },
      "PortfolioMetricsResponse": {
        "properties": {
          "input": {
            "$ref": "#/components/schemas/PortfolioMetricsInput"
          },
          "metrics": {
            "items": {
              "$ref": "#/components/schemas/PortfolioMetric"
            },
            "type": "array"
          }
        }
      },
      "PortfolioSource": {
        "example": {
          "kind": "USER",
          "userId": "b7e4d2a1-5c3f-4a8e-9d16-2f0c8e7a3b95"
        },
        "properties": {
          "collectionId": {
            "description": "The collection's id, for kind COLLECTION",
            "type": "string"
          },
          "kind": {
            "enum": [
              "USER",
              "COLLECTION",
              "SUPPLIED"
            ],
            "type": "string"
          },
          "userId": {
            "description": "The user's id, for kind USER",
            "type": "string"
          }
        },
        "required": [
          "kind"
        ]
      },
      "PortfolioSourceStatus": {
        "example": {
          "collectedAt": "2026-10-30",
          "kind": "COLLECTION",
          "sourceId": "4f6a9c2e-8b1d-4e7a-a3c5-0d9e2f1b6a84",
          "status": "OK"
        },
        "properties": {
          "collectedAt": {
            "format": "date",
            "type": "string"
          },
          "kind": {
            "enum": [
              "USER",
              "COLLECTION",
              "SUPPLIED"
            ],
            "type": "string"
          },
          "sourceId": {
            "type": "string"
          },
          "status": {
            "enum": [
              "OK",
              "NOT_FOUND",
              "SUPERSEDED",
              "NOT_WEALTH",
              "NOT_INSURANCE",
              "NO_DATA",
              "EXPIRED"
            ],
            "type": "string"
          }
        }
      },
      "PremiumConcentrationEvidence": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Evidence"
          },
          {
            "properties": {
              "policiesWithoutPremium": {
                "format": "int32",
                "type": "integer"
              },
              "premiumSharePct": {
                "type": "number"
              },
              "subType": {
                "enum": [
                  "carInsurance",
                  "boatInsurance",
                  "trailerInsurance",
                  "motorcycleInsurance",
                  "mopedInsurance",
                  "caravanInsurance",
                  "motorhomeInsurance",
                  "otherVehicleInsurance",
                  "childInsurance",
                  "pregnancyInsurance",
                  "lifeInsurance",
                  "healthInsurance",
                  "accidentInsurance",
                  "travelInsurance",
                  "condoInsurance",
                  "contentsInsurance",
                  "villaInsurance",
                  "cottageInsurance",
                  "farmInsurance",
                  "catInsurance",
                  "dogInsurance",
                  "horseInsurance",
                  "otherAnimalInsurance",
                  "genericInsurance",
                  "groupInsurance",
                  "incomeInsurance",
                  "sicknessInsurance",
                  "loanInsurance",
                  "landlordInsurance"
                ],
                "type": "string"
              }
            },
            "type": "object"
          }
        ],
        "example": {
          "policiesWithoutPremium": 0,
          "premiumSharePct": 46.3,
          "subType": "carInsurance"
        }
      },
      "RenewingSoonEvidence": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Evidence"
          },
          {
            "properties": {
              "renewalDate": {
                "format": "date",
                "type": "string"
              },
              "subType": {
                "enum": [
                  "carInsurance",
                  "boatInsurance",
                  "trailerInsurance",
                  "motorcycleInsurance",
                  "mopedInsurance",
                  "caravanInsurance",
                  "motorhomeInsurance",
                  "otherVehicleInsurance",
                  "childInsurance",
                  "pregnancyInsurance",
                  "lifeInsurance",
                  "healthInsurance",
                  "accidentInsurance",
                  "travelInsurance",
                  "condoInsurance",
                  "contentsInsurance",
                  "villaInsurance",
                  "cottageInsurance",
                  "farmInsurance",
                  "catInsurance",
                  "dogInsurance",
                  "horseInsurance",
                  "otherAnimalInsurance",
                  "genericInsurance",
                  "groupInsurance",
                  "incomeInsurance",
                  "sicknessInsurance",
                  "loanInsurance",
                  "landlordInsurance"
                ],
                "type": "string"
              }
            },
            "type": "object"
          }
        ],
        "example": {
          "renewalDate": "2026-12-01",
          "subType": "carInsurance"
        }
      },
      "Top5ConcentrationEvidence": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Evidence"
          },
          {
            "properties": {
              "distinctInstrumentCount": {
                "format": "int32",
                "type": "integer"
              },
              "top5ConcentrationPct": {
                "type": "number"
              }
            },
            "type": "object"
          }
        ]
      },
      "TravelCoveredTwiceEvidence": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Evidence"
          },
          {
            "properties": {
              "includedInType": {
                "enum": [
                  "vehicleInsurance",
                  "houseContentInsurance",
                  "personInsurance",
                  "animalInsurance",
                  "groupInsurance",
                  "generalInsurance",
                  "incomeInsurance"
                ],
                "type": "string"
              },
              "standaloneSubType": {
                "enum": [
                  "carInsurance",
                  "boatInsurance",
                  "trailerInsurance",
                  "motorcycleInsurance",
                  "mopedInsurance",
                  "caravanInsurance",
                  "motorhomeInsurance",
                  "otherVehicleInsurance",
                  "childInsurance",
                  "pregnancyInsurance",
                  "lifeInsurance",
                  "healthInsurance",
                  "accidentInsurance",
                  "travelInsurance",
                  "condoInsurance",
                  "contentsInsurance",
                  "villaInsurance",
                  "cottageInsurance",
                  "farmInsurance",
                  "catInsurance",
                  "dogInsurance",
                  "horseInsurance",
                  "otherAnimalInsurance",
                  "genericInsurance",
                  "groupInsurance",
                  "incomeInsurance",
                  "sicknessInsurance",
                  "loanInsurance",
                  "landlordInsurance"
                ],
                "type": "string"
              }
            },
            "type": "object"
          }
        ],
        "example": {
          "includedInType": "houseContentInsurance",
          "standaloneSubType": "travelInsurance"
        }
      },
      "WealthConcentrationFindings": {
        "description": "Portfolio concentration from the metrics service: shares are fractions (0.5912 is 59.12 %) and HHI runs from 0 to 1. Every field is nullable: null means the metrics service did not report it, and a null list is not an empty one.",
        "example": {
          "benchmarkSnapshotDate": "2026-11-02",
          "fxAsOf": "collected_at",
          "fxRatesAvailable": true,
          "holdingsCountRequired": 2,
          "input": {
            "inputComplete": true,
            "productsExcludedByCategory": 1,
            "productsExcludedStale": 0,
            "productsIncluded": 2,
            "productsReceived": 3,
            "productsUnknownType": 0,
            "subsetSelected": false
          },
          "peerDataAvailable": true,
          "productLevel": [
            {
              "collectionId": "4f6a9c2e-8b1d-4e7a-a3c5-0d9e2f1b6a84",
              "effectiveHoldingsCount": 2.33,
              "hhi": 0.4284,
              "holdingsCount": 4,
              "holdingsCountSufficient": true,
              "holdingsExcludedNoFx": 0,
              "holdingsExcludedNoIsin": 0,
              "holdingsExcludedNonPositive": 0,
              "largestPositionPct": 0.5886,
              "largestPositions": [
                {
                  "isFund": true,
                  "isin": "SE0000000011",
                  "name": "Global Index Fund",
                  "pct": 0.5886
                },
                {
                  "isFund": true,
                  "isin": "SE0000000037",
                  "name": "Nordic Small Cap Fund",
                  "pct": 0.2663
                },
                {
                  "isFund": false,
                  "isin": "SE0000000045",
                  "name": "Example Industrials AB B",
                  "pct": 0.088
                }
              ],
              "productId": "a91f3c5e-7d2b-4e8a-b6c4-3e1d9f7a2c58",
              "top3Pct": 0.9429
            },
            {
              "collectionId": "9c1e7b3a-2d5f-4c8e-b6a0-7e3d1f9a5c26",
              "effectiveHoldingsCount": 1.32,
              "hhi": 0.7592,
              "holdingsCount": 2,
              "holdingsCountSufficient": true,
              "holdingsExcludedNoFx": 0,
              "holdingsExcludedNoIsin": 0,
              "holdingsExcludedNonPositive": 0,
              "largestPositionPct": 0.86,
              "largestPositions": [
                {
                  "isFund": true,
                  "isin": "SE0000000021",
                  "name": "Generation Fund 1985",
                  "pct": 0.86
                },
                {
                  "isFund": true,
                  "isin": "SE0000000060",
                  "name": "Global Bond Fund",
                  "pct": 0.14
                }
              ],
              "productId": "f0b6d4a2-3e8c-4f1a-9d7b-2c5e8a1f6b34",
              "top3Pct": 1
            }
          ],
          "userLevel": {
            "effectiveHoldingsCount": 3.6,
            "hhi": 0.2775,
            "holdingsCount": 6,
            "holdingsCountSufficient": true,
            "holdingsExcludedNoFx": 0,
            "holdingsExcludedNoIsin": 0,
            "holdingsExcludedNonPositive": 0,
            "largestPositionPct": 0.3583,
            "largestPositions": [
              {
                "isFund": true,
                "isin": "SE0000000021",
                "name": "Generation Fund 1985",
                "pct": 0.3583
              },
              {
                "isFund": true,
                "isin": "SE0000000011",
                "name": "Global Index Fund",
                "pct": 0.3433
              },
              {
                "isFund": true,
                "isin": "SE0000000037",
                "name": "Nordic Small Cap Fund",
                "pct": 0.1553
              }
            ],
            "peer": {
              "hhiPercentile": 0.45,
              "largestPositionPercentile": 0.35,
              "peerMedianEffectiveHoldings": 3.26,
              "peerMedianHhi": 0.3064,
              "peerMedianHoldingsCount": 8,
              "peerMedianLargestPositionPct": 0.4524,
              "peerMedianTop3Pct": 0.8313,
              "peerP10Hhi": 0.1101,
              "peerP25EffectiveHoldings": 1.96,
              "peerP25Hhi": 0.1808,
              "peerP25HoldingsCount": 4,
              "peerP25LargestPositionPct": 0.2965,
              "peerP25Top3Pct": 0.6305,
              "peerP75EffectiveHoldings": 5.53,
              "peerP75Hhi": 0.5105,
              "peerP75HoldingsCount": 14,
              "peerP75LargestPositionPct": 0.6631,
              "peerP75Top3Pct": 0.9833,
              "peerP90Hhi": 0.7709,
              "peerP90LargestPositionPct": 0.8721,
              "peerP90Top3Pct": 1,
              "segment": "SE_30_44",
              "segmentUserCount": 12052
            },
            "scope": "combined",
            "top3Pct": 0.8569
          },
          "version": {
            "api": 1,
            "kernel": "1.7.0",
            "methodology": 4
          }
        },
        "properties": {
          "benchmarkSnapshotDate": {
            "format": "date",
            "type": "string"
          },
          "fxAsOf": {
            "type": "string"
          },
          "fxRatesAvailable": {
            "type": "boolean"
          },
          "holdingsCountRequired": {
            "format": "int32",
            "type": "integer"
          },
          "input": {
            "$ref": "#/components/schemas/WealthConcentrationInput"
          },
          "peerDataAvailable": {
            "type": "boolean"
          },
          "productLevel": {
            "items": {
              "$ref": "#/components/schemas/WealthConcentrationProductMeasures"
            },
            "type": "array"
          },
          "userLevel": {
            "$ref": "#/components/schemas/WealthConcentrationMeasures"
          },
          "version": {
            "$ref": "#/components/schemas/WealthConcentrationVersion"
          }
        }
      },
      "WealthConcentrationInput": {
        "example": {
          "inputComplete": true,
          "productsExcludedByCategory": 1,
          "productsExcludedStale": 0,
          "productsIncluded": 2,
          "productsReceived": 3,
          "productsUnknownType": 0,
          "subsetSelected": false
        },
        "properties": {
          "inputComplete": {
            "type": "boolean"
          },
          "productsExcludedByCategory": {
            "format": "int32",
            "type": "integer"
          },
          "productsExcludedStale": {
            "format": "int32",
            "type": "integer"
          },
          "productsIncluded": {
            "format": "int32",
            "type": "integer"
          },
          "productsReceived": {
            "format": "int32",
            "type": "integer"
          },
          "productsUnknownType": {
            "format": "int32",
            "type": "integer"
          },
          "subsetSelected": {
            "type": "boolean"
          }
        }
      },
      "WealthConcentrationMeasures": {
        "description": "Concentration across every included product; peer is present only when the person's age is known. Every field is nullable: null means the metrics service did not report it, and a null list is not an empty one.",
        "example": {
          "effectiveHoldingsCount": 3.6,
          "hhi": 0.2775,
          "holdingsCount": 6,
          "holdingsCountSufficient": true,
          "holdingsExcludedNoFx": 0,
          "holdingsExcludedNoIsin": 0,
          "holdingsExcludedNonPositive": 0,
          "largestPositionPct": 0.3583,
          "largestPositions": [
            {
              "isFund": true,
              "isin": "SE0000000021",
              "name": "Generation Fund 1985",
              "pct": 0.3583
            },
            {
              "isFund": true,
              "isin": "SE0000000011",
              "name": "Global Index Fund",
              "pct": 0.3433
            },
            {
              "isFund": true,
              "isin": "SE0000000037",
              "name": "Nordic Small Cap Fund",
              "pct": 0.1553
            }
          ],
          "peer": {
            "hhiPercentile": 0.45,
            "largestPositionPercentile": 0.35,
            "peerMedianEffectiveHoldings": 3.26,
            "peerMedianHhi": 0.3064,
            "peerMedianHoldingsCount": 8,
            "peerMedianLargestPositionPct": 0.4524,
            "peerMedianTop3Pct": 0.8313,
            "peerP10Hhi": 0.1101,
            "peerP25EffectiveHoldings": 1.96,
            "peerP25Hhi": 0.1808,
            "peerP25HoldingsCount": 4,
            "peerP25LargestPositionPct": 0.2965,
            "peerP25Top3Pct": 0.6305,
            "peerP75EffectiveHoldings": 5.53,
            "peerP75Hhi": 0.5105,
            "peerP75HoldingsCount": 14,
            "peerP75LargestPositionPct": 0.6631,
            "peerP75Top3Pct": 0.9833,
            "peerP90Hhi": 0.7709,
            "peerP90LargestPositionPct": 0.8721,
            "peerP90Top3Pct": 1,
            "segment": "SE_30_44",
            "segmentUserCount": 12052
          },
          "scope": "combined",
          "top3Pct": 0.8569
        },
        "properties": {
          "effectiveHoldingsCount": {
            "type": "number"
          },
          "hhi": {
            "type": "number"
          },
          "holdingsCount": {
            "format": "int32",
            "type": "integer"
          },
          "holdingsCountSufficient": {
            "type": "boolean"
          },
          "holdingsExcludedNoFx": {
            "format": "int32",
            "type": "integer"
          },
          "holdingsExcludedNoIsin": {
            "format": "int32",
            "type": "integer"
          },
          "holdingsExcludedNonPositive": {
            "format": "int32",
            "type": "integer"
          },
          "largestPositionPct": {
            "type": "number"
          },
          "largestPositions": {
            "items": {
              "$ref": "#/components/schemas/WealthConcentrationPosition"
            },
            "type": "array"
          },
          "peer": {
            "$ref": "#/components/schemas/WealthConcentrationPeer"
          },
          "scope": {
            "type": "string"
          },
          "top3Pct": {
            "type": "number"
          }
        }
      },
      "WealthConcentrationPeer": {
        "example": {
          "hhiPercentile": 0.45,
          "largestPositionPercentile": 0.35,
          "peerMedianEffectiveHoldings": 3.26,
          "peerMedianHhi": 0.3064,
          "peerMedianHoldingsCount": 8,
          "peerMedianLargestPositionPct": 0.4524,
          "peerMedianTop3Pct": 0.8313,
          "peerP10Hhi": 0.1101,
          "peerP25EffectiveHoldings": 1.96,
          "peerP25Hhi": 0.1808,
          "peerP25HoldingsCount": 4,
          "peerP25LargestPositionPct": 0.2965,
          "peerP25Top3Pct": 0.6305,
          "peerP75EffectiveHoldings": 5.53,
          "peerP75Hhi": 0.5105,
          "peerP75HoldingsCount": 14,
          "peerP75LargestPositionPct": 0.6631,
          "peerP75Top3Pct": 0.9833,
          "peerP90Hhi": 0.7709,
          "peerP90LargestPositionPct": 0.8721,
          "peerP90Top3Pct": 1,
          "segment": "SE_30_44",
          "segmentUserCount": 12052
        },
        "properties": {
          "hhiPercentile": {
            "type": "number"
          },
          "largestPositionPercentile": {
            "type": "number"
          },
          "peerMedianEffectiveHoldings": {
            "type": "number"
          },
          "peerMedianHhi": {
            "type": "number"
          },
          "peerMedianHoldingsCount": {
            "type": "number"
          },
          "peerMedianLargestPositionPct": {
            "type": "number"
          },
          "peerMedianTop3Pct": {
            "type": "number"
          },
          "peerP10Hhi": {
            "type": "number"
          },
          "peerP25EffectiveHoldings": {
            "type": "number"
          },
          "peerP25Hhi": {
            "type": "number"
          },
          "peerP25HoldingsCount": {
            "type": "number"
          },
          "peerP25LargestPositionPct": {
            "type": "number"
          },
          "peerP25Top3Pct": {
            "type": "number"
          },
          "peerP75EffectiveHoldings": {
            "type": "number"
          },
          "peerP75Hhi": {
            "type": "number"
          },
          "peerP75HoldingsCount": {
            "type": "number"
          },
          "peerP75LargestPositionPct": {
            "type": "number"
          },
          "peerP75Top3Pct": {
            "type": "number"
          },
          "peerP90Hhi": {
            "type": "number"
          },
          "peerP90LargestPositionPct": {
            "type": "number"
          },
          "peerP90Top3Pct": {
            "type": "number"
          },
          "segment": {
            "type": "string"
          },
          "segmentUserCount": {
            "format": "int32",
            "type": "integer"
          }
        }
      },
      "WealthConcentrationPosition": {
        "example": {
          "isFund": true,
          "isin": "SE0000000021",
          "name": "Generation Fund 1985",
          "pct": 0.3583
        },
        "properties": {
          "isFund": {
            "type": "boolean"
          },
          "isin": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "pct": {
            "type": "number"
          }
        }
      },
      "WealthConcentrationProductMeasures": {
        "description": "One product's concentration. Every field is nullable: null means the metrics service did not report it, and a null list is not an empty one.",
        "example": {
          "collectionId": "4f6a9c2e-8b1d-4e7a-a3c5-0d9e2f1b6a84",
          "effectiveHoldingsCount": 2.33,
          "hhi": 0.4284,
          "holdingsCount": 4,
          "holdingsCountSufficient": true,
          "holdingsExcludedNoFx": 0,
          "holdingsExcludedNoIsin": 0,
          "holdingsExcludedNonPositive": 0,
          "largestPositionPct": 0.5886,
          "largestPositions": [
            {
              "isFund": true,
              "isin": "SE0000000011",
              "name": "Global Index Fund",
              "pct": 0.5886
            },
            {
              "isFund": true,
              "isin": "SE0000000037",
              "name": "Nordic Small Cap Fund",
              "pct": 0.2663
            },
            {
              "isFund": false,
              "isin": "SE0000000045",
              "name": "Example Industrials AB B",
              "pct": 0.088
            }
          ],
          "productId": "a91f3c5e-7d2b-4e8a-b6c4-3e1d9f7a2c58",
          "top3Pct": 0.9429
        },
        "properties": {
          "collectionId": {
            "type": "string"
          },
          "effectiveHoldingsCount": {
            "type": "number"
          },
          "hhi": {
            "type": "number"
          },
          "holdingsCount": {
            "format": "int32",
            "type": "integer"
          },
          "holdingsCountSufficient": {
            "type": "boolean"
          },
          "holdingsExcludedNoFx": {
            "format": "int32",
            "type": "integer"
          },
          "holdingsExcludedNoIsin": {
            "format": "int32",
            "type": "integer"
          },
          "holdingsExcludedNonPositive": {
            "format": "int32",
            "type": "integer"
          },
          "largestPositionPct": {
            "type": "number"
          },
          "largestPositions": {
            "items": {
              "$ref": "#/components/schemas/WealthConcentrationPosition"
            },
            "type": "array"
          },
          "productId": {
            "type": "string"
          },
          "top3Pct": {
            "type": "number"
          }
        }
      },
      "WealthConcentrationVersion": {
        "example": {
          "api": 1,
          "kernel": "1.7.0",
          "methodology": 4
        },
        "properties": {
          "api": {
            "format": "int32",
            "type": "integer"
          },
          "kernel": {
            "type": "string"
          },
          "methodology": {
            "format": "int32",
            "type": "integer"
          }
        }
      }
    },
    "securitySchemes": {
      "authorization-token": {
        "description": "Your API key. Requests are only accepted from IP addresses on the client's allowlist, and with a registered client certificate when mTLS is enforced for the client.",
        "in": "header",
        "name": "authorization-token",
        "type": "apiKey"
      },
      "client-id": {
        "description": "Your client ID, as used by the Prebuilt UI. Server-to-server integrations authenticate with authorization-token instead.",
        "in": "header",
        "name": "client-id",
        "type": "apiKey"
      },
      "jwt-token": {
        "bearerFormat": "JWT",
        "description": "A user session token, sent as `Authorization: Bearer <token>`.",
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "contact": {
      "email": "tech@insurely.com",
      "name": "Insurely",
      "url": "https://insurely.com"
    },
    "description": "",
    "termsOfService": "https://www.insurely.com/sv/privacy-policy",
    "title": "Insurely API",
    "version": "2026-04-01"
  },
  "openapi": "3.1.0",
  "paths": {
    "/intelligence/explanations": {
      "post": {
        "description": "Draft. Resolves the sources to one person's wealth and insurance portfolio, evaluates the client's catalogue of explanations against it, and returns the entries that apply (ranked, with evidence, targets and a fixed template text) together with the outcome of every enabled entry. The entries are deterministic. For clients that enabled it, one optional model-written paragraph (summary) restates the entries; it is marked aiGenerated and is UNAVAILABLE, never an error, when the model fails.",
        "operationId": "getExplanations",
        "parameters": [
          {
            "description": "The API version to use, as YYYY-MM-DD. Must match the version of the endpoint you are targeting. A request without it, or with a version older than the client's minimum API version, is served by the client's minimum API version.",
            "example": "2026-04-01",
            "in": "header",
            "name": "Insurely-Version",
            "required": true,
            "schema": {
              "enum": [
                "2026-04-01"
              ],
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "a-person": {
                  "$ref": "#/components/examples/getExplanations-request-a-person"
                },
                "named-collections": {
                  "$ref": "#/components/examples/getExplanations-request-named-collections"
                }
              },
              "schema": {
                "$ref": "#/components/schemas/ExplanationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "applies": {
                    "$ref": "#/components/examples/getExplanations-200-applies"
                  },
                  "collections-sv": {
                    "$ref": "#/components/examples/getExplanations-200-collections-sv"
                  },
                  "no-data": {
                    "$ref": "#/components/examples/getExplanations-200-no-data"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ExplanationResponse"
                }
              }
            },
            "description": "The entries that apply, ranked, and the outcome of every enabled entry."
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "missing-collection-id": {
                    "$ref": "#/components/examples/getExplanations-400-missing-collection-id"
                  },
                  "no-sources": {
                    "$ref": "#/components/examples/getExplanations-400-no-sources"
                  },
                  "supplied-not-supported": {
                    "$ref": "#/components/examples/getExplanations-400-supplied-not-supported"
                  },
                  "too-many-sources": {
                    "$ref": "#/components/examples/getExplanations-400-too-many-sources"
                  },
                  "user-with-collections": {
                    "$ref": "#/components/examples/getExplanations-400-user-with-collections"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The body is not a valid request, or it has no sources or more than 25, combines a USER source with others, has a source without a kind or its id, or uses a SUPPLIED source, which the draft does not support yet."
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "error": {
                    "$ref": "#/components/examples/standard-error-401"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication failed: the credentials are missing or invalid, the calling IP is not on the client's allowlist, or mTLS is enforced and no valid client certificate was sent. An expired session token gets 401 Token expired."
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "user-not-found": {
                    "$ref": "#/components/examples/getExplanations-404-user-not-found"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The USER source's userId is not a user of this client, or the user is anonymised. A COLLECTION that is not found is not an error: input.sources reports it as NOT_FOUND."
          },
          "422": {
            "content": {
              "application/json": {
                "examples": {
                  "more-than-one-person": {
                    "$ref": "#/components/examples/getExplanations-422-more-than-one-person"
                  },
                  "same-company-same-time": {
                    "$ref": "#/components/examples/getExplanations-422-same-company-same-time"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The sources cannot form one person's portfolio: the collections belong to more than one person, or two collections from the same company were collected at the same time."
          }
        },
        "security": [
          {
            "authorization-token": []
          }
        ],
        "summary": "Rule-based explanations over a person's or a set of collections' products",
        "tags": [
          "Explanations (draft)"
        ]
      }
    },
    "/intelligence/metrics": {
      "post": {
        "description": "Draft. Resolves the sources to one portfolio per product line (newest collection per company) and returns each metric's findings as data, never text.",
        "operationId": "getMetrics",
        "parameters": [
          {
            "description": "The API version to use, as YYYY-MM-DD. Must match the version of the endpoint you are targeting. A request without it, or with a version older than the client's minimum API version, is served by the client's minimum API version.",
            "example": "2026-04-01",
            "in": "header",
            "name": "Insurely-Version",
            "required": true,
            "schema": {
              "enum": [
                "2026-04-01"
              ],
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "a-person": {
                  "$ref": "#/components/examples/getMetrics-request-a-person"
                },
                "covers-held-by-collections": {
                  "$ref": "#/components/examples/getMetrics-request-covers-held-by-collections"
                },
                "named-collections": {
                  "$ref": "#/components/examples/getMetrics-request-named-collections"
                }
              },
              "schema": {
                "$ref": "#/components/schemas/PortfolioMetricsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "both-metrics": {
                    "$ref": "#/components/examples/getMetrics-200-both-metrics"
                  },
                  "computed": {
                    "$ref": "#/components/examples/getMetrics-200-computed"
                  },
                  "covers-held": {
                    "$ref": "#/components/examples/getMetrics-200-covers-held"
                  },
                  "covers-held-no-data": {
                    "$ref": "#/components/examples/getMetrics-200-covers-held-no-data"
                  },
                  "no-data": {
                    "$ref": "#/components/examples/getMetrics-200-no-data"
                  },
                  "not-configured": {
                    "$ref": "#/components/examples/getMetrics-200-not-configured"
                  },
                  "unavailable": {
                    "$ref": "#/components/examples/getMetrics-200-unavailable"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PortfolioMetricsResponse"
                }
              }
            },
            "description": "The requested metrics over the resolved portfolio."
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "missing-collection-id": {
                    "$ref": "#/components/examples/getMetrics-400-missing-collection-id"
                  },
                  "no-sources": {
                    "$ref": "#/components/examples/getMetrics-400-no-sources"
                  },
                  "supplied-not-supported": {
                    "$ref": "#/components/examples/getMetrics-400-supplied-not-supported"
                  },
                  "too-many-sources": {
                    "$ref": "#/components/examples/getMetrics-400-too-many-sources"
                  },
                  "unknown-metric": {
                    "$ref": "#/components/examples/getMetrics-400-unknown-metric"
                  },
                  "user-needs-wealth-client": {
                    "$ref": "#/components/examples/getMetrics-400-user-needs-wealth-client"
                  },
                  "user-with-collections": {
                    "$ref": "#/components/examples/getMetrics-400-user-with-collections"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The body is not a valid request, or it has no sources or more than 25, combines a USER source with others, has a source without a kind or its id, or uses a SUPPLIED source, which the draft does not support yet. Also an unknown metric name, or wealth.concentration over a USER source for a client outside the wealth product line."
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "error": {
                    "$ref": "#/components/examples/standard-error-401"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Authentication failed: the credentials are missing or invalid, the calling IP is not on the client's allowlist, or mTLS is enforced and no valid client certificate was sent. An expired session token gets 401 Token expired."
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "user-not-found": {
                    "$ref": "#/components/examples/getMetrics-404-user-not-found"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The USER source's userId is not a user of this client, or the user is anonymised. A COLLECTION that is not found is not an error: input.sources reports it as NOT_FOUND."
          },
          "422": {
            "content": {
              "application/json": {
                "examples": {
                  "more-than-one-person": {
                    "$ref": "#/components/examples/getMetrics-422-more-than-one-person"
                  },
                  "same-company-same-time": {
                    "$ref": "#/components/examples/getMetrics-422-same-company-same-time"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The sources cannot form one person's portfolio: the collections belong to more than one person, or two collections from the same company were collected at the same time."
          }
        },
        "security": [
          {
            "authorization-token": []
          }
        ],
        "summary": "Statistical metrics over a person's or a set of collections' wealth products and insurance policies",
        "tags": [
          "Portfolio metrics (draft)"
        ]
      }
    }
  },
  "servers": [
    {
      "description": "Production",
      "url": "https://api.insurely.com"
    },
    {
      "description": "Test",
      "url": "https://api.test.insurely.com"
    }
  ],
  "tags": []
}