{
  "components": {
    "schemas": {
      "AccountOutput": {
        "additionalProperties": false,
        "properties": {
          "accountName": {
            "maxLength": 120,
            "type": [
              "string",
              "null"
            ]
          },
          "accountNumber": {
            "maxLength": 80,
            "type": "string"
          },
          "cashAmount": {
            "type": "number"
          },
          "country": {
            "maxLength": 2,
            "type": "string"
          },
          "currency": {
            "maxLength": 3,
            "type": "string"
          },
          "dataSourceUpdated": {
            "default": null,
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "externalId": {
            "maxLength": 100,
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "description": "uuid",
            "maxLength": 36,
            "type": "string"
          },
          "investorId": {
            "maxLength": 36,
            "type": "string"
          },
          "lastUpdated": {
            "format": "date-time",
            "type": "string"
          },
          "monthlyDeposit": {
            "default": null,
            "type": [
              "number",
              "null"
            ]
          },
          "positionAmount": {
            "type": "number"
          },
          "positions": {
            "items": {
              "$ref": "#/components/schemas/AccountPositionOutput"
            },
            "type": "array"
          },
          "syncDate": {
            "format": "date-time",
            "type": "string"
          },
          "totalAmount": {
            "type": "number"
          },
          "totalAmountHistory": {
            "additionalProperties": {},
            "type": "object"
          },
          "type": {
            "maxLength": 32,
            "type": "string"
          },
          "vendor": {
            "maxLength": 100,
            "type": "string"
          },
          "vendorId": {
            "maxLength": 100,
            "type": "string"
          }
        },
        "required": [
          "id"
        ],
        "type": "object"
      },
      "AccountOutputArray": {
        "properties": {
          "accounts": {
            "items": {
              "$ref": "#/components/schemas/AccountOutput"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "AccountPayload": {
        "additionalProperties": false,
        "properties": {
          "accountName": {
            "maxLength": 120,
            "type": [
              "string",
              "null"
            ]
          },
          "accountNumber": {
            "maxLength": 80,
            "type": "string"
          },
          "cashAmount": {
            "type": "number"
          },
          "country": {
            "maxLength": 2,
            "type": "string"
          },
          "currency": {
            "maxLength": 3,
            "type": "string"
          },
          "dataSourceUpdated": {
            "default": null,
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "externalId": {
            "maxLength": 100,
            "type": [
              "string",
              "null"
            ]
          },
          "investorId": {
            "maxLength": 36,
            "type": "string"
          },
          "monthlyDeposit": {
            "default": null,
            "type": [
              "number",
              "null"
            ]
          },
          "positions": {
            "items": {
              "$ref": "#/components/schemas/AccountPositionPayload"
            },
            "type": "array"
          },
          "type": {
            "maxLength": 32,
            "type": "string"
          },
          "vendor": {
            "maxLength": 100,
            "type": "string"
          },
          "vendorId": {
            "maxLength": 100,
            "type": "string"
          }
        },
        "type": "object"
      },
      "AccountPositionOutput": {
        "additionalProperties": false,
        "properties": {
          "accountId": {
            "maxLength": 36,
            "type": "string"
          },
          "amount": {
            "type": "number"
          },
          "averageShareCost": {
            "type": "number"
          },
          "externalId": {
            "maxLength": 100,
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "description": "uuid",
            "maxLength": 36,
            "type": "string"
          },
          "isin": {
            "maxLength": 12,
            "minLength": 12,
            "type": "string"
          },
          "lastUpdated": {
            "format": "date-time",
            "type": "string"
          },
          "name": {
            "maxLength": 100,
            "type": "string"
          },
          "pricingDate": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "shares": {
            "type": "number"
          },
          "syncDate": {
            "format": "date-time",
            "type": "string"
          },
          "type": {
            "maxLength": 32,
            "type": "string"
          }
        },
        "type": "object"
      },
      "AccountPositionPayload": {
        "additionalProperties": false,
        "properties": {
          "accountId": {
            "maxLength": 36,
            "type": "string"
          },
          "amount": {
            "type": "number"
          },
          "averageShareCost": {
            "type": "number"
          },
          "externalId": {
            "maxLength": 100,
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "description": "uuid",
            "maxLength": 36,
            "type": "string"
          },
          "isin": {
            "maxLength": 12,
            "minLength": 12,
            "type": "string"
          },
          "name": {
            "maxLength": 100,
            "type": "string"
          },
          "pricingDate": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "shares": {
            "type": "number"
          },
          "type": {
            "maxLength": 32,
            "type": "string"
          }
        },
        "type": "object"
      },
      "AdaptationSchema": {
        "additionalProperties": false,
        "properties": {
          "adapted": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "AdvancedSuitabilityCheckMetaSchemaV2": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "readOnly": true,
            "type": "string"
          },
          "label": {
            "readOnly": true,
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "label"
        ],
        "type": "object"
      },
      "AdvancedSuitabilityDataSchemaV2": {
        "additionalProperties": false,
        "properties": {
          "answers": {
            "additionalProperties": {
              "additionalProperties": {},
              "type": "object"
            },
            "readOnly": true,
            "type": "object"
          },
          "checks_training": {
            "additionalProperties": {
              "type": "boolean"
            },
            "readOnly": true,
            "type": "object"
          }
        },
        "required": [
          "answers",
          "checks_training"
        ],
        "type": "object"
      },
      "AdvancedSuitabilityMetaSchemaV2": {
        "additionalProperties": false,
        "properties": {
          "checks": {
            "items": {
              "$ref": "#/components/schemas/AdvancedSuitabilityCheckMetaSchemaV2"
            },
            "readOnly": true,
            "type": "array"
          },
          "enabled": {
            "readOnly": true,
            "type": "boolean"
          },
          "table_order": {
            "items": {
              "type": "string"
            },
            "readOnly": true,
            "type": "array"
          },
          "tables": {
            "items": {
              "$ref": "#/components/schemas/AdvancedSuitabilityTableMetaSchemaV2"
            },
            "readOnly": true,
            "type": "array"
          }
        },
        "required": [
          "checks",
          "enabled",
          "table_order",
          "tables"
        ],
        "type": "object"
      },
      "AdvancedSuitabilityOptionMetaSchemaV2": {
        "additionalProperties": false,
        "properties": {
          "description": {
            "readOnly": true,
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "readOnly": true,
            "type": "integer"
          },
          "label": {
            "readOnly": true,
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "description",
          "id",
          "label"
        ],
        "type": "object"
      },
      "AdvancedSuitabilityPutDocumentSchemaV2": {
        "additionalProperties": false,
        "properties": {
          "data": {
            "$ref": "#/components/schemas/AdvancedSuitabilityPutSchemaV2"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "AdvancedSuitabilityPutSchemaV2": {
        "additionalProperties": false,
        "properties": {
          "answers": {
            "additionalProperties": {
              "additionalProperties": {},
              "type": "object"
            },
            "type": "object"
          },
          "checks_training": {
            "additionalProperties": {
              "type": "boolean"
            },
            "type": "object"
          }
        },
        "required": [
          "answers",
          "checks_training"
        ],
        "type": "object"
      },
      "AdvancedSuitabilityPutSchemaV21": {
        "additionalProperties": false,
        "properties": {
          "answers": {
            "additionalProperties": {
              "additionalProperties": {},
              "type": "object"
            },
            "type": "object"
          },
          "checks_training": {
            "additionalProperties": {
              "type": "boolean"
            },
            "type": "object"
          }
        },
        "required": [
          "answers",
          "checks_training"
        ],
        "type": "object"
      },
      "AdvancedSuitabilityReadDocumentSchemaV2": {
        "additionalProperties": false,
        "properties": {
          "data": {
            "$ref": "#/components/schemas/AdvancedSuitabilityDataSchemaV2"
          },
          "meta": {
            "$ref": "#/components/schemas/AdvancedSuitabilityMetaSchemaV2"
          }
        },
        "required": [
          "data",
          "meta"
        ],
        "type": "object"
      },
      "AdvancedSuitabilityStatusCheckDetailSchemaV2": {
        "additionalProperties": false,
        "properties": {
          "check_id": {
            "readOnly": true,
            "type": [
              "integer",
              "null"
            ]
          },
          "check_key": {
            "readOnly": true,
            "type": [
              "string",
              "null"
            ]
          },
          "score": {
            "readOnly": true,
            "type": [
              "number",
              "null"
            ]
          },
          "threshold": {
            "readOnly": true,
            "type": [
              "number",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "AdvancedSuitabilityStatusDataSchemaV2": {
        "additionalProperties": false,
        "properties": {
          "products": {
            "items": {
              "$ref": "#/components/schemas/AdvancedSuitabilityStatusProductSchemaV2"
            },
            "readOnly": true,
            "type": "array"
          }
        },
        "required": [
          "products"
        ],
        "type": "object"
      },
      "AdvancedSuitabilityStatusDocumentSchemaV2": {
        "additionalProperties": false,
        "properties": {
          "data": {
            "$ref": "#/components/schemas/AdvancedSuitabilityStatusDataSchemaV2"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "AdvancedSuitabilityStatusInvestorCheckDetailSchemaV2": {
        "additionalProperties": false,
        "properties": {
          "check_key": {
            "readOnly": true,
            "type": [
              "string",
              "null"
            ]
          },
          "input": {
            "readOnly": true,
            "type": [
              "integer",
              "null"
            ]
          },
          "suitable": {
            "readOnly": true,
            "type": [
              "boolean",
              "null"
            ]
          },
          "threshold": {
            "readOnly": true,
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "AdvancedSuitabilityStatusProductSchemaV2": {
        "additionalProperties": false,
        "properties": {
          "details": {
            "items": {
              "$ref": "#/components/schemas/AdvancedSuitabilityStatusCheckDetailSchemaV2"
            },
            "readOnly": true,
            "type": "array"
          },
          "id": {
            "readOnly": true,
            "type": [
              "string",
              "null"
            ]
          },
          "investor_check_details": {
            "items": {
              "$ref": "#/components/schemas/AdvancedSuitabilityStatusInvestorCheckDetailSchemaV2"
            },
            "readOnly": true,
            "type": "array"
          },
          "product_is_suitable": {
            "readOnly": true,
            "type": [
              "boolean",
              "null"
            ]
          },
          "product_is_suitable_in_portfolio": {
            "readOnly": true,
            "type": [
              "boolean",
              "null"
            ]
          }
        },
        "required": [
          "details",
          "investor_check_details"
        ],
        "type": "object"
      },
      "AdvancedSuitabilityTableMetaSchemaV2": {
        "additionalProperties": false,
        "properties": {
          "label": {
            "readOnly": true,
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "readOnly": true,
            "type": "string"
          },
          "options": {
            "items": {
              "$ref": "#/components/schemas/AdvancedSuitabilityOptionMetaSchemaV2"
            },
            "readOnly": true,
            "type": "array"
          }
        },
        "required": [
          "label",
          "name",
          "options"
        ],
        "type": "object"
      },
      "AdviceInformationAnswerInputSchemaV2": {
        "additionalProperties": false,
        "properties": {
          "code": {
            "type": "string"
          },
          "value": {}
        },
        "required": [
          "code",
          "value"
        ],
        "type": "object"
      },
      "AdviceInformationAnswerSchemaV2": {
        "additionalProperties": false,
        "properties": {
          "code": {
            "readOnly": true,
            "type": "string"
          },
          "value": {
            "readOnly": true
          }
        },
        "required": [
          "code",
          "value"
        ],
        "type": "object"
      },
      "AdviceInformationDataSchemaV2": {
        "additionalProperties": false,
        "properties": {
          "advisor_notes": {
            "readOnly": true,
            "type": [
              "string",
              "null"
            ]
          },
          "answers": {
            "items": {
              "$ref": "#/components/schemas/AdviceInformationAnswerSchemaV2"
            },
            "readOnly": true,
            "type": "array"
          }
        },
        "required": [
          "advisor_notes",
          "answers"
        ],
        "type": "object"
      },
      "AdviceInformationDependsOnSchemaV2": {
        "additionalProperties": false,
        "properties": {
          "code": {
            "readOnly": true,
            "type": "string"
          },
          "value": {
            "readOnly": true,
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "code",
          "value"
        ],
        "type": "object"
      },
      "AdviceInformationDocumentSchemaV2": {
        "additionalProperties": false,
        "properties": {
          "data": {
            "$ref": "#/components/schemas/AdviceInformationDataSchemaV2"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "AdviceInformationFieldMetaSchemaV2": {
        "additionalProperties": false,
        "properties": {
          "code": {
            "readOnly": true,
            "type": "string"
          },
          "depends_on": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AdviceInformationDependsOnSchemaV2"
              },
              {
                "type": "null"
              }
            ],
            "readOnly": true
          },
          "info": {
            "readOnly": true,
            "type": [
              "string",
              "null"
            ]
          },
          "label": {
            "readOnly": true,
            "type": [
              "string",
              "null"
            ]
          },
          "multiple": {
            "readOnly": true,
            "type": "boolean"
          },
          "options": {
            "items": {
              "$ref": "#/components/schemas/AdviceInformationOptionSchemaV2"
            },
            "readOnly": true,
            "type": "array"
          },
          "order": {
            "readOnly": true,
            "type": "integer"
          },
          "required": {
            "readOnly": true,
            "type": "boolean"
          },
          "type": {
            "enum": [
              "radioButtons",
              "date",
              "textInput",
              "textarea",
              "checkboxes",
              "dropdown",
              "numberInput",
              "buttonSwitch"
            ],
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "code",
          "info",
          "label",
          "multiple",
          "options",
          "order",
          "required",
          "type"
        ],
        "type": "object"
      },
      "AdviceInformationMetaSchemaV2": {
        "additionalProperties": false,
        "properties": {
          "fields": {
            "items": {
              "$ref": "#/components/schemas/AdviceInformationFieldMetaSchemaV2"
            },
            "readOnly": true,
            "type": "array"
          }
        },
        "required": [
          "fields"
        ],
        "type": "object"
      },
      "AdviceInformationOptionSchemaV2": {
        "additionalProperties": false,
        "properties": {
          "label": {
            "readOnly": true,
            "type": [
              "string",
              "null"
            ]
          },
          "text_field": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AdviceInformationTextFieldSchemaV2"
              },
              {
                "type": "null"
              }
            ],
            "readOnly": true
          },
          "value": {
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "label",
          "value"
        ],
        "type": "object"
      },
      "AdviceInformationTextFieldSchemaV2": {
        "additionalProperties": false,
        "properties": {
          "code": {
            "readOnly": true,
            "type": "string"
          },
          "required": {
            "readOnly": true,
            "type": "boolean"
          }
        },
        "required": [
          "code",
          "required"
        ],
        "type": "object"
      },
      "AdviceInformationUpdateDataSchemaV2": {
        "additionalProperties": false,
        "properties": {
          "advisor_notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "answers": {
            "items": {
              "$ref": "#/components/schemas/AdviceInformationAnswerInputSchemaV2"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "AdviceInformationUpdateSchemaV2": {
        "additionalProperties": false,
        "properties": {
          "data": {
            "$ref": "#/components/schemas/AdviceInformationUpdateDataSchemaV2"
          }
        },
        "type": "object"
      },
      "AdviceListItemResponse": {
        "additionalProperties": false,
        "properties": {
          "adviceInformation": {
            "readOnly": true
          },
          "advisor": {
            "$ref": "#/components/schemas/AdvisorAdviceResponseModel"
          },
          "advisorNotes": {},
          "channel": {
            "readOnly": true
          },
          "completedAt": {
            "format": "date-time",
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "customKnowledgeAndExperienceFields": {
            "items": {
              "$ref": "#/components/schemas/CustomPurposeAndRisk"
            },
            "type": "array"
          },
          "executed": {
            "type": "boolean"
          },
          "externalStatus": {
            "type": [
              "string",
              "null"
            ]
          },
          "financialSituation": {
            "readOnly": true
          },
          "goals": {
            "items": {
              "$ref": "#/components/schemas/GoalSchema"
            },
            "type": "array"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "investorData": {
            "readOnly": true
          },
          "investorId": {
            "format": "uuid",
            "type": "string"
          },
          "knowledgeAndExperienceAdvisorNotes": {
            "type": "string"
          },
          "links": {
            "readOnly": true
          },
          "name": {
            "type": "string"
          },
          "orderExecutionAdvisorNotes": {
            "items": {
              "$ref": "#/components/schemas/NoteSchema"
            },
            "type": "array"
          },
          "orderExecutionInstruments": {
            "items": {
              "$ref": "#/components/schemas/OrderExecutionInstrumentSchema"
            },
            "type": "array"
          },
          "orderInformation": {
            "items": {
              "$ref": "#/components/schemas/InfoSchema"
            },
            "type": "array"
          },
          "proposalAdvisorNotes": {},
          "purposeAndRisk": {
            "$ref": "#/components/schemas/PurposeAndRiskSchema"
          },
          "signed": {
            "readOnly": true
          },
          "status": {
            "readOnly": true
          },
          "sustainability": {
            "$ref": "#/components/schemas/SustainabilitySchema"
          },
          "type": {
            "readOnly": true
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "type": "object"
      },
      "AdviceListResponse": {
        "additionalProperties": false,
        "properties": {
          "advices": {
            "items": {
              "$ref": "#/components/schemas/AdviceListItemResponse"
            },
            "type": "array"
          },
          "has_next": {
            "type": "boolean"
          },
          "has_prev": {
            "type": "boolean"
          },
          "page": {
            "type": "integer"
          },
          "per_page": {
            "type": "integer"
          },
          "total": {
            "type": "integer"
          }
        },
        "type": "object"
      },
      "AdviceResponse": {
        "additionalProperties": false,
        "properties": {
          "adviceInformation": {
            "readOnly": true
          },
          "advisor": {
            "$ref": "#/components/schemas/AdvisorAdviceResponseModel"
          },
          "advisorNotes": {},
          "channel": {
            "readOnly": true
          },
          "completedAt": {
            "format": "date-time",
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "customKnowledgeAndExperienceFields": {
            "items": {
              "$ref": "#/components/schemas/CustomPurposeAndRisk"
            },
            "type": "array"
          },
          "executed": {
            "type": "boolean"
          },
          "externalStatus": {
            "type": [
              "string",
              "null"
            ]
          },
          "externalStatusLog": {
            "items": {
              "$ref": "#/components/schemas/ExternalStatusLogEntry"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "financialSituation": {
            "readOnly": true
          },
          "goals": {
            "items": {
              "$ref": "#/components/schemas/GoalSchema"
            },
            "type": "array"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "investorData": {
            "readOnly": true
          },
          "investorId": {
            "format": "uuid",
            "type": "string"
          },
          "knowledgeAndExperienceAdvisorNotes": {
            "type": "string"
          },
          "links": {
            "readOnly": true
          },
          "name": {
            "type": "string"
          },
          "orderExecutionAdvisorNotes": {
            "items": {
              "$ref": "#/components/schemas/NoteSchema"
            },
            "type": "array"
          },
          "orderExecutionInstruments": {
            "items": {
              "$ref": "#/components/schemas/OrderExecutionInstrumentSchema"
            },
            "type": "array"
          },
          "orderInformation": {
            "items": {
              "$ref": "#/components/schemas/InfoSchema"
            },
            "type": "array"
          },
          "proposalAdvisorNotes": {},
          "purposeAndRisk": {
            "$ref": "#/components/schemas/PurposeAndRiskSchema"
          },
          "signed": {
            "readOnly": true
          },
          "status": {
            "readOnly": true
          },
          "sustainability": {
            "$ref": "#/components/schemas/SustainabilitySchema"
          },
          "type": {
            "readOnly": true
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "type": "object"
      },
      "AdvisorAdviceResponseModel": {
        "additionalProperties": false,
        "properties": {
          "email": {
            "type": "string"
          },
          "externalId": {
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "AdvisoryConfigCategoryResponseSchema": {
        "properties": {
          "CategoryId": {
            "title": "Categoryid",
            "type": "string"
          },
          "EquityShare": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Equityshare"
          },
          "IndexName": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Indexname"
          },
          "MainAssetClass": {
            "title": "Mainassetclass",
            "type": "string"
          },
          "PortfolioRole": {
            "$ref": "#/components/schemas/AdvisoryConfigCategoryResponseSchema.PortfolioRole"
          },
          "SelectionRankerRule": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AdvisoryConfigCategoryResponseSchema.SelectionRules"
              },
              {
                "type": "null"
              }
            ],
            "default": null
          },
          "SubAssetClass": {
            "title": "Subassetclass",
            "type": "string"
          },
          "VisibleCustomPortfolio": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Visiblecustomportfolio"
          },
          "advisoryConfigCategoryId": {
            "title": "Advisoryconfigcategoryid",
            "type": "string"
          },
          "categoryPatchDataset": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Categorypatchdataset"
          },
          "categoryPatchName": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Categorypatchname"
          },
          "categoryPatchTicker": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Categorypatchticker"
          },
          "expectedReturn": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Expectedreturn"
          },
          "expectedRisk": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Expectedrisk"
          },
          "indexDataset": {
            "title": "Indexdataset",
            "type": "string"
          },
          "indexTicker": {
            "title": "Indexticker",
            "type": "string"
          },
          "namespaceId": {
            "title": "Namespaceid",
            "type": "integer"
          }
        },
        "required": [
          "advisoryConfigCategoryId",
          "namespaceId",
          "CategoryId",
          "MainAssetClass",
          "SubAssetClass",
          "indexDataset",
          "indexTicker",
          "PortfolioRole"
        ],
        "title": "AdvisoryConfigCategoryResponseSchema",
        "type": "object"
      },
      "AdvisoryConfigCategoryResponseSchema.PortfolioRole": {
        "enum": [
          "Base",
          "Optional",
          "Theme"
        ],
        "title": "PortfolioRole",
        "type": "string"
      },
      "AdvisoryConfigCategoryResponseSchema.SelectionRules": {
        "enum": [
          "SHARPE_1Y",
          "SHARPE_3Y",
          "SHARPE_5Y",
          "SHARPE_10Y",
          "SHARPE_15Y",
          "SHARPE_20Y",
          "SORTINO_1Y",
          "SORTINO_3Y",
          "SORTINO_5Y",
          "SORTINO_10Y",
          "SORTINO_15Y",
          "SORTINO_20Y",
          "MOMENTUM_1Y",
          "MOMENTUM_3Y",
          "MOMENTUM_5Y",
          "MOMENTUM_10Y",
          "MOMENTUM_15Y",
          "MOMENTUM_20Y"
        ],
        "title": "SelectionRules",
        "type": "string"
      },
      "AssetClass": {
        "additionalProperties": false,
        "properties": {
          "instruments": {
            "items": {
              "$ref": "#/components/schemas/Instrument"
            },
            "type": "array"
          },
          "mainAssetClass": {
            "type": "string"
          },
          "subAssetClass": {
            "type": "string"
          },
          "weight": {
            "type": "number"
          }
        },
        "type": "object"
      },
      "AssetClassAllocationResponse": {
        "description": "Response schema for analyze/asset-class-allocation endpoint",
        "properties": {
          "equityShare": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Equityshare"
          },
          "fixedIncomeShare": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Fixedincomeshare"
          },
          "instrumentAllocation": {
            "items": {
              "$ref": "#/components/schemas/AssetClassAllocationResponse.InstrumentAllocationSchema"
            },
            "title": "Instrumentallocation",
            "type": "array"
          },
          "mainAssetClassAllocation": {
            "items": {
              "$ref": "#/components/schemas/AssetClassAllocationResponse.MainAssetClassAllocation"
            },
            "title": "Mainassetclassallocation",
            "type": "array"
          },
          "portfolioAllocation": {
            "items": {
              "$ref": "#/components/schemas/AssetClassAllocationResponse.PortfolioAllocation"
            },
            "title": "Portfolioallocation",
            "type": "array"
          }
        },
        "required": [
          "instrumentAllocation",
          "portfolioAllocation",
          "mainAssetClassAllocation"
        ],
        "title": "AssetClassAllocationResponse",
        "type": "object"
      },
      "AssetClassAllocationResponse.InstrumentAllocationSchema": {
        "description": "One ``instrumentAllocation`` item, in prod's field names and casing: ``Ticker``, ``ISIN``,\n``Name``, ``FundStandardName``, ``Category`` (C-code) and a dict-shaped ``categoryDistribution``.\n\n``Ticker`` is ``null`` for a category-only or unknown position, ``Category`` for an unknown one.",
        "properties": {
          "Category": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Category **reference code** (the C-code, e.g. `C04`), as on prod. `null` for a position whose category is unknown.",
            "title": "Category"
          },
          "FundStandardName": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Fundstandardname"
          },
          "ISIN": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Isin"
          },
          "Name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Name"
          },
          "Ticker": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Ticker"
          },
          "categoryDistribution": {
            "additionalProperties": {
              "type": "number"
            },
            "description": "Share of the instrument in each category, keyed on the category's SubAssetClass name (prod's shape): `{\"Global equity\": 0.6, \"Nordic bonds\": 0.4}`.",
            "title": "Categorydistribution",
            "type": "object"
          },
          "equityShare": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Equityshare"
          },
          "fixedIncomeShare": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Fixedincomeshare"
          },
          "initialDeposit": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Initialdeposit"
          },
          "recurringAmount": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Recurringamount"
          },
          "weight": {
            "title": "Weight",
            "type": "number"
          }
        },
        "required": [
          "weight"
        ],
        "title": "InstrumentAllocationSchema",
        "type": "object"
      },
      "AssetClassAllocationResponse.MainAssetClassAllocation": {
        "properties": {
          "initialDeposit": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Initialdeposit"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "recurringAmount": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Recurringamount"
          },
          "weight": {
            "title": "Weight",
            "type": "number"
          }
        },
        "required": [
          "name",
          "weight"
        ],
        "title": "MainAssetClassAllocation",
        "type": "object"
      },
      "AssetClassAllocationResponse.PortfolioAllocation": {
        "description": "One ``portfolioAllocation`` item, in prod's field names: ``category`` (C-code) and ``name``.",
        "properties": {
          "category": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Category **reference code** (the C-code, e.g. `C04`), as on prod. `null` for a position whose category is unknown.",
            "title": "Category"
          },
          "initialDeposit": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Initialdeposit"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "The category's SubAssetClass name.",
            "title": "Name"
          },
          "recurringAmount": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Recurringamount"
          },
          "weight": {
            "title": "Weight",
            "type": "number"
          }
        },
        "required": [
          "weight"
        ],
        "title": "PortfolioAllocation",
        "type": "object"
      },
      "AssetClassAllocationSchema": {
        "description": "Payload model for analyze/asset-class-allocation endpoint",
        "properties": {
          "portfolio": {
            "items": {
              "$ref": "#/components/schemas/AssetClassAllocationSchema.AssetClassInstrumentSchema"
            },
            "minItems": 1,
            "title": "Portfolio",
            "type": "array"
          }
        },
        "required": [
          "portfolio"
        ],
        "title": "AssetClassAllocationSchema",
        "type": "object"
      },
      "AssetClassAllocationSchema.AssetClassInstrumentSchema": {
        "description": "Instrument in a portfolio with identifier and weight",
        "properties": {
          "category_id": {
            "anyOf": [
              {
                "maxLength": 5,
                "minLength": 2,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Category reference code (C-code, e.g. `C04`), as on prod.",
            "title": "Category Id"
          },
          "id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Ticker",
            "title": "Id"
          },
          "initial_deposit": {
            "anyOf": [
              {
                "minimum": 0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Initial Deposit"
          },
          "isin": {
            "anyOf": [
              {
                "maxLength": 12,
                "minLength": 12,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Isin"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Name"
          },
          "namespace_id": {
            "anyOf": [
              {
                "minimum": 1,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Namespace Id"
          },
          "recurring_amount": {
            "anyOf": [
              {
                "minimum": 0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Recurring Amount"
          },
          "weight": {
            "exclusiveMinimum": 0,
            "maximum": 100,
            "title": "Weight",
            "type": "number"
          }
        },
        "required": [
          "weight"
        ],
        "title": "AssetClassInstrumentSchema",
        "type": "object"
      },
      "BaseStateSessionGoalPayload": {
        "additionalProperties": false,
        "properties": {
          "data": {
            "additionalProperties": {},
            "type": "object"
          },
          "description": {
            "maxLength": 1000,
            "type": [
              "string",
              "null"
            ]
          },
          "icon": {
            "maxLength": 1000,
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "maxLength": 200,
            "type": "string"
          }
        },
        "type": "object"
      },
      "BulkStateInvestorsPayload": {
        "additionalProperties": false,
        "properties": {
          "investorIds": {
            "description": "list of end investor ids",
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "investorIds"
        ],
        "type": "object"
      },
      "BulkStateSessionPayload": {
        "additionalProperties": false,
        "properties": {
          "session_ids": {
            "description": "list of session ids",
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "session_ids"
        ],
        "type": "object"
      },
      "ClientAuthenticationPayload": {
        "additionalProperties": false,
        "properties": {
          "client_id": {
            "type": "string"
          },
          "client_secret": {
            "type": "string"
          },
          "grant_type": {
            "enum": [
              "client_credentials"
            ],
            "type": "string"
          }
        },
        "required": [
          "client_id",
          "client_secret",
          "grant_type"
        ],
        "type": "object"
      },
      "ClientAuthenticationResponse": {
        "additionalProperties": false,
        "properties": {
          "access_token": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "CostPayload": {
        "description": "Payload model for analyze/cost endpoint",
        "properties": {
          "account": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CostPayload.AccountSchema"
              },
              {
                "type": "null"
              }
            ],
            "default": null
          },
          "costoverride": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CostPayload.CostOverrideSchema"
              },
              {
                "type": "null"
              }
            ],
            "default": null
          },
          "dateOfBirth": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Dateofbirth"
          },
          "horizon": {
            "default": 30,
            "maximum": 100,
            "minimum": 1,
            "title": "Horizon",
            "type": "integer"
          },
          "portfolio": {
            "items": {
              "$ref": "#/components/schemas/CostPayload.CostOverridingInstrumentSchema"
            },
            "minItems": 1,
            "title": "Portfolio",
            "type": "array"
          },
          "savingsplan": {
            "$ref": "#/components/schemas/CostPayload.SavingPlanItems"
          }
        },
        "required": [
          "portfolio"
        ],
        "title": "CostPayload",
        "type": "object"
      },
      "CostPayload.AccountSchema": {
        "properties": {
          "account_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Account Type"
          },
          "capital": {
            "default": 0,
            "minimum": 0,
            "title": "Capital",
            "type": "number"
          },
          "expected_return": {
            "anyOf": [
              {
                "exclusiveMaximum": 1,
                "exclusiveMinimum": 0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Expected Return"
          }
        },
        "title": "AccountSchema",
        "type": "object"
      },
      "CostPayload.CostOverrideSchema": {
        "description": "Schema for cost override data",
        "properties": {
          "custody_fee": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Custody Fee"
          },
          "custody_fee_amount": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Custody Fee Amount"
          },
          "fund_transaction_cost": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Fund Transaction Cost"
          },
          "insurance_cost_amount": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Insurance Cost Amount"
          },
          "insurance_cost_pct": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Insurance Cost Pct"
          },
          "performance_fee": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Performance Fee"
          },
          "platform_fee": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Platform Fee"
          },
          "portfolio_advisory_onboarding_fee": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Portfolio Advisory Onboarding Fee"
          },
          "portfolio_advisory_purchasing_fee": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Portfolio Advisory Purchasing Fee"
          }
        },
        "title": "CostOverrideSchema",
        "type": "object"
      },
      "CostPayload.CostOverridingInstrumentSchema": {
        "description": "Instrument in a portfolio with identifier end weight and fund cost overriding possibility",
        "properties": {
          "account_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Account Type"
          },
          "category_id": {
            "anyOf": [
              {
                "maxLength": 5,
                "minLength": 2,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Category Id"
          },
          "existing_holding": {
            "anyOf": [
              {
                "minimum": 0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Value of pre-existing holdings that don't incur transaction costs",
            "title": "Existing Holding"
          },
          "fund_cost_override": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CostPayload.FundCostOverrideSchema"
              },
              {
                "type": "null"
              }
            ],
            "default": null
          },
          "id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Id"
          },
          "isin": {
            "anyOf": [
              {
                "maxLength": 12,
                "minLength": 12,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Isin"
          },
          "starting_capital": {
            "anyOf": [
              {
                "minimum": 0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Amount of new capital to invest in this instrument",
            "title": "Starting Capital"
          },
          "weight": {
            "exclusiveMinimum": 0,
            "maximum": 100,
            "title": "Weight",
            "type": "number"
          }
        },
        "required": [
          "weight"
        ],
        "title": "CostOverridingInstrumentSchema",
        "type": "object"
      },
      "CostPayload.FundCostOverrideSchema": {
        "description": "Schema for overriding fees in analyze/cost on fund level",
        "properties": {
          "fund_management_fee": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Fund Management Fee"
          },
          "fund_purchasing_fee": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Fund Purchasing Fee"
          },
          "fund_return_commission_paid_to_client": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Fund Return Commission Paid To Client"
          },
          "fund_transaction_cost": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Fund Transaction Cost"
          },
          "performance_fee": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Performance Fee"
          },
          "platform_fee": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Platform Fee"
          }
        },
        "title": "FundCostOverrideSchema",
        "type": "object"
      },
      "CostPayload.SavingPlanItems": {
        "properties": {
          "monthly_savings": {
            "default": 0,
            "minimum": 0,
            "title": "Monthly Savings",
            "type": "number"
          },
          "starting_capital": {
            "anyOf": [
              {
                "minimum": 0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Starting Capital"
          }
        },
        "title": "SavingPlanItems",
        "type": "object"
      },
      "CostResponse": {
        "description": "Response schema for analyze/cost endpoint",
        "properties": {
          "error": {
            "items": {
              "type": "string"
            },
            "title": "Error",
            "type": "array"
          },
          "forecast": {
            "items": {
              "$ref": "#/components/schemas/CostResponse.CostForecastSchema"
            },
            "title": "Forecast",
            "type": "array"
          },
          "summary": {
            "$ref": "#/components/schemas/CostResponse.CostSummarySchema"
          }
        },
        "required": [
          "forecast",
          "summary",
          "error"
        ],
        "title": "CostResponse",
        "type": "object"
      },
      "CostResponse.CostForecastSchema": {
        "description": "Cost forecast data",
        "properties": {
          "acc_custody_fee": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Acc Custody Fee"
          },
          "acc_platform_fee": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Acc Platform Fee"
          },
          "acc_portfolio_advisory_onboarding_fee": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Acc Portfolio Advisory Onboarding Fee"
          },
          "acc_portfolio_advisory_purchasing_fee": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Acc Portfolio Advisory Purchasing Fee"
          },
          "acc_portfolio_commission_paid_to_advisor": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Acc Portfolio Commission Paid To Advisor"
          },
          "acc_portfolio_commission_paid_to_client": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Acc Portfolio Commission Paid To Client"
          },
          "acc_portfolio_insurance_cost": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Acc Portfolio Insurance Cost"
          },
          "acc_portfolio_management_fee": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Acc Portfolio Management Fee"
          },
          "acc_portfolio_performance_fee": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Acc Portfolio Performance Fee"
          },
          "acc_portfolio_purchasing_fee": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Acc Portfolio Purchasing Fee"
          },
          "acc_portfolio_transaction_cost": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Acc Portfolio Transaction Cost"
          },
          "acc_total_cost": {
            "title": "Acc Total Cost",
            "type": "number"
          },
          "acc_total_ongoing_fees": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Acc Total Ongoing Fees"
          },
          "basis_for_cost_calculation": {
            "title": "Basis For Cost Calculation",
            "type": "number"
          },
          "cost_reduction_percent": {
            "title": "Cost Reduction Percent",
            "type": "number"
          },
          "custody_fee": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Custody Fee"
          },
          "date": {
            "title": "Date",
            "type": "string"
          },
          "deposit": {
            "title": "Deposit",
            "type": "number"
          },
          "monthly_cost": {
            "title": "Monthly Cost",
            "type": "number"
          },
          "monthly_return": {
            "title": "Monthly Return",
            "type": "number"
          },
          "platform_fee": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Platform Fee"
          },
          "portfolio_advisory_onboarding_fee": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Portfolio Advisory Onboarding Fee"
          },
          "portfolio_advisory_purchasing_fee": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Portfolio Advisory Purchasing Fee"
          },
          "portfolio_commission_paid_to_advisor": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Portfolio Commission Paid To Advisor"
          },
          "portfolio_commission_paid_to_client": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Portfolio Commission Paid To Client"
          },
          "portfolio_insurance_cost": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Portfolio Insurance Cost"
          },
          "portfolio_management_fee": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Portfolio Management Fee"
          },
          "portfolio_performance_fee": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Portfolio Performance Fee"
          },
          "portfolio_purchasing_fee": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Portfolio Purchasing Fee"
          },
          "portfolio_transaction_cost": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Portfolio Transaction Cost"
          },
          "return": {
            "title": "Return",
            "type": "number"
          },
          "total_ongoing_fees": {
            "title": "Total Ongoing Fees",
            "type": "number"
          },
          "value": {
            "title": "Value",
            "type": "number"
          },
          "value_ex_cost": {
            "title": "Value Ex Cost",
            "type": "number"
          }
        },
        "required": [
          "date",
          "total_ongoing_fees",
          "monthly_return",
          "monthly_cost",
          "acc_total_cost",
          "deposit",
          "cost_reduction_percent",
          "return",
          "value",
          "value_ex_cost",
          "basis_for_cost_calculation"
        ],
        "title": "CostForecastSchema",
        "type": "object"
      },
      "CostResponse.CostSummaryInstrumentsSchema": {
        "description": "Instrument summary data",
        "properties": {
          "Category": {
            "title": "Category",
            "type": "string"
          },
          "Dataset": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Dataset"
          },
          "FundStandardName": {
            "title": "Fundstandardname",
            "type": "string"
          },
          "ISIN": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Isin"
          },
          "Name": {
            "title": "Name",
            "type": "string"
          },
          "Ticker": {
            "title": "Ticker",
            "type": "string"
          },
          "fund_advisory_onboarding_fee": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Fund Advisory Onboarding Fee"
          },
          "fund_advisory_onboarding_fee_amount": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Fund Advisory Onboarding Fee Amount"
          },
          "fund_advisory_purchasing_fee": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Fund Advisory Purchasing Fee"
          },
          "fund_advisory_purchasing_fee_amount": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Fund Advisory Purchasing Fee Amount"
          },
          "fund_custody_fee": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Fund Custody Fee"
          },
          "fund_custody_fee_amount": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Fund Custody Fee Amount"
          },
          "fund_insurance_cost": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Fund Insurance Cost"
          },
          "fund_insurance_cost_amount": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Fund Insurance Cost Amount"
          },
          "fund_management_fee": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Fund Management Fee"
          },
          "fund_performance_fee": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Fund Performance Fee"
          },
          "fund_platform_fee": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Fund Platform Fee"
          },
          "fund_platform_fee_amount": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Fund Platform Fee Amount"
          },
          "fund_purchasing_fee": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Fund Purchasing Fee"
          },
          "fund_return_commission_paid_to_advisor": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Fund Return Commission Paid To Advisor"
          },
          "fund_return_commission_paid_to_client": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Fund Return Commission Paid To Client"
          },
          "fund_total_ongoing_fees": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Fund Total Ongoing Fees"
          },
          "fund_transaction_cost": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Fund Transaction Cost"
          },
          "namespace_id": {
            "title": "Namespace Id",
            "type": "string"
          }
        },
        "required": [
          "Category",
          "Ticker",
          "Name",
          "FundStandardName",
          "namespace_id"
        ],
        "title": "CostSummaryInstrumentsSchema",
        "type": "object"
      },
      "CostResponse.CostSummaryPortfoliosSchema": {
        "description": "Portfolio summary data",
        "properties": {
          "entry_fee": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Entry Fee"
          },
          "platform_fee": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Platform Fee"
          },
          "portfolio_advisory_onboarding_fee": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Portfolio Advisory Onboarding Fee"
          },
          "portfolio_advisory_onboarding_fee_amount": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Portfolio Advisory Onboarding Fee Amount"
          },
          "portfolio_advisory_purchasing_fee": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Portfolio Advisory Purchasing Fee"
          },
          "portfolio_advisory_purchasing_fee_amount": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Portfolio Advisory Purchasing Fee Amount"
          },
          "portfolio_commission_paid_to_advisor": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Portfolio Commission Paid To Advisor"
          },
          "portfolio_commission_paid_to_client": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Portfolio Commission Paid To Client"
          },
          "portfolio_custody_fee": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Portfolio Custody Fee"
          },
          "portfolio_custody_fee_amount": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Portfolio Custody Fee Amount"
          },
          "portfolio_fund_purchase_fee": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Portfolio Fund Purchase Fee"
          },
          "portfolio_insurance_cost": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Portfolio Insurance Cost"
          },
          "portfolio_insurance_cost_amount": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Portfolio Insurance Cost Amount"
          },
          "portfolio_management_fee": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Portfolio Management Fee"
          },
          "portfolio_performance_fee": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Portfolio Performance Fee"
          },
          "portfolio_platform_fee": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Portfolio Platform Fee"
          },
          "portfolio_platform_fee_amount": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Portfolio Platform Fee Amount"
          },
          "portfolio_total_ongoing_fees": {
            "title": "Portfolio Total Ongoing Fees",
            "type": "number"
          },
          "portfolio_transaction_cost": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Portfolio Transaction Cost"
          }
        },
        "required": [
          "portfolio_total_ongoing_fees"
        ],
        "title": "CostSummaryPortfoliosSchema",
        "type": "object"
      },
      "CostResponse.CostSummarySchema": {
        "description": "Complete cost summary data",
        "properties": {
          "instruments": {
            "items": {
              "$ref": "#/components/schemas/CostResponse.CostSummaryInstrumentsSchema"
            },
            "title": "Instruments",
            "type": "array"
          },
          "portfolio": {
            "$ref": "#/components/schemas/CostResponse.CostSummaryPortfoliosSchema"
          }
        },
        "required": [
          "instruments",
          "portfolio"
        ],
        "title": "CostSummarySchema",
        "type": "object"
      },
      "CreateStateSessionGoalPayload": {
        "additionalProperties": false,
        "properties": {
          "data": {
            "additionalProperties": {},
            "type": "object"
          },
          "description": {
            "maxLength": 1000,
            "type": [
              "string",
              "null"
            ]
          },
          "goal_id": {
            "description": "uuid",
            "maxLength": 36,
            "type": "string"
          },
          "icon": {
            "maxLength": 1000,
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "maxLength": 200,
            "type": "string"
          },
          "session_id": {
            "description": "uuid",
            "maxLength": 36,
            "type": "string"
          }
        },
        "required": [
          "data",
          "name"
        ],
        "type": "object"
      },
      "CreateStateSessionPayload": {
        "additionalProperties": false,
        "properties": {
          "advice_type": {
            "enum": [
              "MiFIID II investment Advice",
              "Order Execution"
            ],
            "type": "string"
          },
          "advisor_id": {
            "description": "uuid",
            "maxLength": 36,
            "type": "string"
          },
          "external_status": {
            "default": null,
            "maxLength": 30,
            "type": [
              "string",
              "null"
            ]
          },
          "investor_id": {
            "description": "uuid",
            "maxLength": 36,
            "type": "string"
          },
          "name": {
            "maxLength": 200,
            "type": "string"
          },
          "session_id": {
            "description": "uuid",
            "maxLength": 36,
            "type": "string"
          },
          "survey_status": {
            "default": null,
            "enum": [
              "complete",
              "waiting_for_investor",
              "notification_error",
              "reminder_sent",
              null
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "survey_status_message": {
            "additionalProperties": {},
            "default": null,
            "type": [
              "object",
              "null"
            ]
          }
        },
        "required": [
          "advisor_id",
          "name"
        ],
        "type": "object"
      },
      "CustomDataAndMetaSchema": {
        "additionalProperties": false,
        "properties": {
          "currency": {
            "maxLength": 4,
            "type": "string"
          },
          "data": {
            "items": {
              "$ref": "#/components/schemas/CustomDataUpdateSchema"
            },
            "type": "array"
          },
          "name": {
            "type": "string"
          },
          "ticker": {
            "type": "string"
          },
          "warnings": {
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "currency",
          "data",
          "name",
          "ticker"
        ],
        "type": "object"
      },
      "CustomDataAndMetaUpdateSchema": {
        "additionalProperties": false,
        "properties": {
          "currency": {
            "type": "string"
          },
          "data": {
            "items": {
              "$ref": "#/components/schemas/CustomDataUpdateSchema"
            },
            "type": "array"
          },
          "name": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "CustomDataUpdateSchema": {
        "additionalProperties": false,
        "properties": {
          "date": {
            "format": "date",
            "type": "string"
          },
          "value": {
            "type": "number"
          }
        },
        "required": [
          "date",
          "value"
        ],
        "type": "object"
      },
      "CustomMetaSchema": {
        "additionalProperties": false,
        "properties": {
          "currency": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "ticker": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "CustomProductsListResponse": {
        "additionalProperties": false,
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/CustomMetaSchema"
            },
            "type": "array"
          },
          "page": {
            "description": "Current page number",
            "type": "integer"
          },
          "pageSize": {
            "description": "Number of items per page",
            "type": "integer"
          },
          "total_count": {
            "description": "Total number of items matching the query",
            "type": "integer"
          },
          "total_items": {
            "description": "Number of items returned in this response",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "CustomPurposeAndRisk": {
        "additionalProperties": false,
        "properties": {
          "fieldName": {
            "type": "string"
          },
          "value": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "DeletedInvestorOutput": {
        "additionalProperties": false,
        "properties": {
          "additionalData": {
            "additionalProperties": {},
            "type": "object"
          },
          "address": {
            "maxLength": 200,
            "type": "string"
          },
          "advisorId": {
            "format": "uuid",
            "type": "string"
          },
          "advisorName": {
            "type": "string"
          },
          "city": {
            "maxLength": 200,
            "type": "string"
          },
          "contacts": {
            "items": {
              "additionalProperties": {},
              "type": "object"
            },
            "type": "array"
          },
          "country": {
            "description": "ISO 3166-1 alpha-2",
            "maxLength": 2,
            "type": "string"
          },
          "deletedAt": {
            "format": null,
            "pattern": null,
            "type": "string"
          },
          "email": {
            "maxLength": 100,
            "type": "string"
          },
          "externalId": {
            "maxLength": 50,
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "investorType": {
            "enum": [
              "person",
              "company"
            ],
            "type": "string"
          },
          "kyc": {
            "additionalProperties": {},
            "type": "object"
          },
          "lastActivityDate": {
            "format": null,
            "pattern": null,
            "type": "string"
          },
          "links": {
            "readOnly": true
          },
          "name": {
            "maxLength": 100,
            "type": "string"
          },
          "organizationNumber": {
            "maxLength": 50,
            "type": "string"
          },
          "phone": {
            "maxLength": 20,
            "type": "string"
          },
          "ssn": {
            "maxLength": 30,
            "type": "string"
          },
          "zipCode": {
            "maxLength": 20,
            "type": "string"
          }
        },
        "required": [
          "country",
          "investorType"
        ],
        "type": "object"
      },
      "DeletedInvestorOutputArray": {
        "properties": {
          "deletedInvestors": {
            "items": {
              "$ref": "#/components/schemas/DeletedInvestorOutput"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "DownloadReportFileSchema": {
        "additionalProperties": false,
        "properties": {
          "documentId": {
            "type": "string"
          },
          "documentType": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "DownloadReportInputSchema": {
        "additionalProperties": false,
        "properties": {
          "files": {
            "items": {
              "$ref": "#/components/schemas/DownloadReportFileSchema"
            },
            "minItems": 1,
            "type": "array"
          },
          "version": {
            "type": "string"
          }
        },
        "required": [
          "files"
        ],
        "type": "object"
      },
      "EventListResponseSchema": {
        "additionalProperties": false,
        "properties": {
          "events": {
            "items": {
              "$ref": "#/components/schemas/EventSchema"
            },
            "type": "array"
          }
        },
        "required": [
          "events"
        ],
        "type": "object"
      },
      "EventSchema": {
        "additionalProperties": false,
        "properties": {
          "description": {
            "type": "string"
          },
          "event": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "description",
          "event",
          "name"
        ],
        "type": "object"
      },
      "ExternalStatusLogEntry": {
        "additionalProperties": false,
        "properties": {
          "dateTime": {
            "type": "string"
          },
          "fromStatus": {
            "type": [
              "string",
              "null"
            ]
          },
          "toStatus": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "FileUploadSchema": {
        "additionalProperties": false,
        "properties": {
          "documentName": {
            "description": "Custom name for the document. If not provided, uuid will be generated and set as a name.",
            "type": "string"
          },
          "file": {
            "format": "binary",
            "type": "string"
          }
        },
        "required": [
          "file"
        ],
        "type": "object"
      },
      "FinancialSituationDependsOnSchemaV2": {
        "additionalProperties": false,
        "properties": {
          "code": {
            "readOnly": true,
            "type": "string"
          },
          "condition": {
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "code",
          "condition"
        ],
        "type": "object"
      },
      "FinancialSituationDocumentSchemaV2": {
        "additionalProperties": false,
        "properties": {
          "data": {
            "$ref": "#/components/schemas/FinancialSituationReadSchemaV2"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "FinancialSituationFieldMetaSchemaV2": {
        "additionalProperties": false,
        "properties": {
          "code": {
            "readOnly": true,
            "type": "string"
          },
          "depends_on": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/FinancialSituationDependsOnSchemaV2"
              },
              {
                "type": "null"
              }
            ],
            "readOnly": true
          },
          "label": {
            "readOnly": true,
            "type": [
              "string",
              "null"
            ]
          },
          "priority": {
            "readOnly": true,
            "type": "integer"
          },
          "required": {
            "readOnly": true,
            "type": "boolean"
          },
          "type": {
            "readOnly": true,
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "code",
          "label",
          "priority",
          "required",
          "type"
        ],
        "type": "object"
      },
      "FinancialSituationGroupMetaSchemaV2": {
        "additionalProperties": false,
        "properties": {
          "fields": {
            "items": {
              "$ref": "#/components/schemas/FinancialSituationFieldMetaSchemaV2"
            },
            "readOnly": true,
            "type": "array"
          },
          "require_one": {
            "readOnly": true,
            "type": "boolean"
          },
          "section": {
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "fields",
          "require_one",
          "section"
        ],
        "type": "object"
      },
      "FinancialSituationMetaSchemaV2": {
        "additionalProperties": false,
        "properties": {
          "groups": {
            "items": {
              "$ref": "#/components/schemas/FinancialSituationGroupMetaSchemaV2"
            },
            "readOnly": true,
            "type": "array"
          }
        },
        "required": [
          "groups"
        ],
        "type": "object"
      },
      "FinancialSituationReadDocumentSchemaV2": {
        "additionalProperties": false,
        "properties": {
          "data": {
            "$ref": "#/components/schemas/FinancialSituationReadSchemaV2"
          },
          "meta": {
            "$ref": "#/components/schemas/FinancialSituationMetaSchemaV2"
          }
        },
        "required": [
          "data",
          "meta"
        ],
        "type": "object"
      },
      "FinancialSituationReadSchemaV2": {
        "additionalProperties": false,
        "properties": {
          "advisor_notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "financial_situation": {
            "additionalProperties": {},
            "type": [
              "object",
              "null"
            ]
          }
        },
        "required": [
          "advisor_notes",
          "financial_situation"
        ],
        "type": "object"
      },
      "FinancialSituationUpdateSchemaV2": {
        "additionalProperties": false,
        "properties": {
          "advisor_notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "company_financial_situation": {
            "additionalProperties": {},
            "type": [
              "object",
              "null"
            ]
          },
          "person_financial_situation": {
            "additionalProperties": {},
            "type": [
              "object",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "ForecastV1Payload": {
        "description": "Payload model for analyze/forecast endpoint",
        "properties": {
          "confidence": {
            "default": 0.95,
            "maximum": 0.999,
            "minimum": 0.01,
            "title": "Confidence",
            "type": "number"
          },
          "holding": {
            "default": 100,
            "minimum": 0,
            "title": "Holding",
            "type": "number"
          },
          "horizon": {
            "default": 30,
            "maximum": 100,
            "minimum": 1,
            "title": "Horizon",
            "type": "integer"
          },
          "portfolio": {
            "items": {
              "$ref": "#/components/schemas/ForecastV1Payload.SimpleInstrumentSchema"
            },
            "minItems": 1,
            "title": "Portfolio",
            "type": "array"
          },
          "saving": {
            "default": 0,
            "minimum": 0,
            "title": "Saving",
            "type": "number"
          },
          "use_lognormal": {
            "default": true,
            "title": "Use Lognormal",
            "type": "boolean"
          }
        },
        "required": [
          "portfolio"
        ],
        "title": "ForecastV1Payload",
        "type": "object"
      },
      "ForecastV1Payload.SimpleInstrumentSchema": {
        "description": "Instrument with id identifier and weight",
        "properties": {
          "category_id": {
            "anyOf": [
              {
                "maxLength": 5,
                "minLength": 2,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Category reference code (C-code, e.g. `C04`), as on prod.",
            "title": "Category Id"
          },
          "id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Id"
          },
          "isin": {
            "anyOf": [
              {
                "maxLength": 12,
                "minLength": 12,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Isin"
          },
          "weight": {
            "maximum": 100,
            "minimum": 0,
            "title": "Weight",
            "type": "number"
          }
        },
        "required": [
          "weight"
        ],
        "title": "SimpleInstrumentSchema",
        "type": "object"
      },
      "FundListResponse": {
        "description": "Response schema for listing instruments (prod ``InstrumentsListResponse``)",
        "properties": {
          "funds": {
            "items": {
              "$ref": "#/components/schemas/FundListResponse.FundInstrumentSchema"
            },
            "title": "Funds",
            "type": "array"
          }
        },
        "required": [
          "funds"
        ],
        "title": "FundListResponse",
        "type": "object"
      },
      "FundListResponse.FundInstrumentSchema": {
        "description": "Schema for instrument (prod ``InstrumentSchema``)",
        "properties": {
          "FundStandardName": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Fundstandardname"
          },
          "ISIN": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Isin"
          },
          "Name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Name"
          },
          "SubAssetClasses": {
            "anyOf": [
              {
                "additionalProperties": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "`{category reference code (C-code): SubAssetClass}` for each category the fund is in.",
            "title": "Subassetclasses"
          },
          "Ticker": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Ticker"
          },
          "preferredAccount": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Preferredaccount"
          },
          "risk_score_filter": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Risk Score Filter"
          }
        },
        "title": "FundInstrumentSchema",
        "type": "object"
      },
      "FundMetaResponse": {
        "description": "Response of ``GET /api/v1/fund/meta/\u003cticker\u003e``: the instrument's metadata (prod had no\noutput schema; ``meta`` is free-form). Always carries ``Ticker``, ``ISIN``, ``Name``,\n``FundStandardName`` and, when the category has one, ``EquityShare``; the remaining keys\nare the dataset's metadata fields.",
        "properties": {
          "meta": {
            "additionalProperties": true,
            "title": "Meta",
            "type": "object"
          }
        },
        "required": [
          "meta"
        ],
        "title": "FundMetaResponse",
        "type": "object"
      },
      "GenericAssessmentAdaptationSchema": {
        "additionalProperties": false,
        "properties": {
          "adapted": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "GoalInformationDependsOnMetaSchemaV2": {
        "additionalProperties": false,
        "properties": {
          "code": {
            "readOnly": true,
            "type": "string"
          },
          "value": {
            "readOnly": true,
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "code",
          "value"
        ],
        "type": "object"
      },
      "GoalInformationDocumentSchemaV2": {
        "additionalProperties": false,
        "properties": {
          "data": {
            "$ref": "#/components/schemas/GoalInformationSchemaV2"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "GoalInformationFieldMetaSchemaV2": {
        "additionalProperties": false,
        "properties": {
          "code": {
            "readOnly": true,
            "type": "string"
          },
          "depends_on": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/GoalInformationDependsOnMetaSchemaV2"
              },
              {
                "type": "null"
              }
            ],
            "readOnly": true
          },
          "info": {
            "readOnly": true,
            "type": [
              "string",
              "null"
            ]
          },
          "label": {
            "readOnly": true,
            "type": [
              "string",
              "null"
            ]
          },
          "multiple": {
            "readOnly": true,
            "type": "boolean"
          },
          "options": {
            "items": {
              "$ref": "#/components/schemas/GoalInformationOptionMetaSchemaV2"
            },
            "readOnly": true,
            "type": "array"
          },
          "order": {
            "readOnly": true,
            "type": "integer"
          },
          "popup_info": {
            "readOnly": true,
            "type": [
              "string",
              "null"
            ]
          },
          "required": {
            "readOnly": true,
            "type": "boolean"
          },
          "type": {
            "readOnly": true,
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "code",
          "info",
          "label",
          "multiple",
          "options",
          "order",
          "popup_info",
          "required",
          "type"
        ],
        "type": "object"
      },
      "GoalInformationMetaSchemaV2": {
        "additionalProperties": false,
        "properties": {
          "fields": {
            "items": {
              "$ref": "#/components/schemas/GoalInformationFieldMetaSchemaV2"
            },
            "readOnly": true,
            "type": "array"
          }
        },
        "required": [
          "fields"
        ],
        "type": "object"
      },
      "GoalInformationOptionMetaSchemaV2": {
        "additionalProperties": false,
        "properties": {
          "label": {
            "readOnly": true,
            "type": [
              "string",
              "null"
            ]
          },
          "text_field": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/GoalInformationTextFieldMetaSchemaV2"
              },
              {
                "type": "null"
              }
            ],
            "readOnly": true
          },
          "value": {
            "readOnly": true,
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "label",
          "value"
        ],
        "type": "object"
      },
      "GoalInformationReadDocumentSchemaV2": {
        "additionalProperties": false,
        "properties": {
          "data": {
            "$ref": "#/components/schemas/GoalInformationSchemaV2"
          },
          "meta": {
            "$ref": "#/components/schemas/GoalInformationMetaSchemaV2"
          }
        },
        "required": [
          "data",
          "meta"
        ],
        "type": "object"
      },
      "GoalInformationSchemaV2": {
        "additionalProperties": false,
        "properties": {
          "advisor_notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "answers": {
            "additionalProperties": {},
            "type": "object"
          }
        },
        "type": "object"
      },
      "GoalInformationSchemaV21": {
        "additionalProperties": false,
        "properties": {
          "advisor_notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "answers": {
            "additionalProperties": {},
            "type": "object"
          }
        },
        "type": "object"
      },
      "GoalInformationTextFieldMetaSchemaV2": {
        "additionalProperties": false,
        "properties": {
          "code": {
            "readOnly": true,
            "type": "string"
          },
          "required": {
            "readOnly": true,
            "type": "boolean"
          }
        },
        "required": [
          "code",
          "required"
        ],
        "type": "object"
      },
      "GoalSchema": {
        "additionalProperties": false,
        "properties": {
          "advisedPortfolio": {
            "items": {
              "$ref": "#/components/schemas/AssetClass"
            },
            "type": "array"
          },
          "assetClassAllocationAdvisorNote": {
            "type": "string"
          },
          "capitalNeed": {
            "type": "integer"
          },
          "description": {
            "type": "string"
          },
          "firstDeposit": {
            "type": "integer"
          },
          "fundAllocationAdvisorNote": {
            "type": "string"
          },
          "icon": {
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "initialRiskScore": {
            "type": "string"
          },
          "isPortfolioCustom": {
            "type": "boolean"
          },
          "monthlyDeposit": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "portfolio": {
            "type": "string"
          },
          "productPlatform": {
            "$ref": "#/components/schemas/ProductPlatformSchema"
          },
          "riskScore": {
            "type": "string"
          },
          "themes": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "timeHorizon": {
            "type": "integer"
          },
          "type": {
            "type": "string"
          },
          "withdrawalPlan": {
            "type": "integer"
          }
        },
        "type": "object"
      },
      "HTTPError": {
        "properties": {
          "detail": {
            "type": "object"
          },
          "message": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "HistoricalReturnPayload": {
        "description": "Payload model for analyze/historical-return endpoint",
        "properties": {
          "portfolio": {
            "items": {
              "$ref": "#/components/schemas/HistoricalReturnPayload.InstrumentSchema"
            },
            "minItems": 1,
            "title": "Portfolio",
            "type": "array"
          },
          "savingsplan": {
            "$ref": "#/components/schemas/HistoricalReturnPayload.SavingPlanItems"
          },
          "showStats": {
            "default": false,
            "title": "Showstats",
            "type": "boolean"
          }
        },
        "required": [
          "portfolio"
        ],
        "title": "HistoricalReturnPayload",
        "type": "object"
      },
      "HistoricalReturnPayload.InstrumentSchema": {
        "description": "Instrument in a portfolio with identifier and weight",
        "properties": {
          "category_id": {
            "anyOf": [
              {
                "maxLength": 5,
                "minLength": 2,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Category Id"
          },
          "id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Id"
          },
          "isin": {
            "anyOf": [
              {
                "maxLength": 12,
                "minLength": 12,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Isin"
          },
          "weight": {
            "exclusiveMinimum": 0,
            "maximum": 100,
            "title": "Weight",
            "type": "number"
          }
        },
        "required": [
          "weight"
        ],
        "title": "InstrumentSchema",
        "type": "object"
      },
      "HistoricalReturnPayload.SavingPlanItems": {
        "properties": {
          "monthly_savings": {
            "default": 0,
            "minimum": 0,
            "title": "Monthly Savings",
            "type": "number"
          },
          "starting_capital": {
            "anyOf": [
              {
                "minimum": 0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Starting Capital"
          }
        },
        "title": "SavingPlanItems",
        "type": "object"
      },
      "HistoricalReturnResponse": {
        "description": "Response schema for analyze/historical-return endpoint\n\nAs prod: ``warning`` only when an id could not be analysed, ``portfolioStatistics`` only with\n``showStats``, ``error`` only when the rebase failed; each key is absent otherwise.",
        "properties": {
          "error": {
            "default": null,
            "title": "Error"
          },
          "portfolio": {
            "items": {
              "$ref": "#/components/schemas/HistoricalReturnResponse.HistoricalReturnPortfolioSchema"
            },
            "title": "Portfolio",
            "type": "array"
          },
          "portfolioStatistics": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/HistoricalReturnResponse.HistoricalReturnAdditionalStatisticsSchema"
              },
              {
                "type": "null"
              }
            ],
            "default": null
          },
          "response_time": {
            "default": null,
            "title": "Response Time"
          },
          "statistics": {
            "$ref": "#/components/schemas/HistoricalReturnResponse.HistoricalReturnStatisticsSchema"
          },
          "warning": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Warning"
          }
        },
        "required": [
          "portfolio",
          "statistics"
        ],
        "title": "HistoricalReturnResponse",
        "type": "object"
      },
      "HistoricalReturnResponse.HistoricalReturnAdditionalStatisticsSchema": {
        "description": "Historical return statistics from ffn library",
        "properties": {
          "avg_down_month": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Avg Down Month"
          },
          "avg_drawdown": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Avg Drawdown"
          },
          "avg_drawdown_days": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Avg Drawdown Days"
          },
          "avg_up_month": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Avg Up Month"
          },
          "best_month": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Best Month"
          },
          "best_year": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Best Year"
          },
          "cagr": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Cagr"
          },
          "calmar": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Calmar"
          },
          "five_year": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Five Year"
          },
          "incep": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Incep"
          },
          "max_drawdown": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Max Drawdown"
          },
          "monthly_kurt": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Monthly Kurt"
          },
          "monthly_mean": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Monthly Mean"
          },
          "monthly_sharpe": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Monthly Sharpe"
          },
          "monthly_skew": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Monthly Skew"
          },
          "monthly_sortino": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Monthly Sortino"
          },
          "monthly_vol": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Monthly Vol"
          },
          "mtd": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Mtd"
          },
          "one_year": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "One Year"
          },
          "six_month": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Six Month"
          },
          "ten_year": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Ten Year"
          },
          "three_month": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Three Month"
          },
          "three_year": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Three Year"
          },
          "total_return": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Total Return"
          },
          "twelve_month_win_perc": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Twelve Month Win Perc"
          },
          "win_year_perc": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Win Year Perc"
          },
          "worst_month": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Worst Month"
          },
          "worst_year": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Worst Year"
          },
          "yearly_kurt": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Yearly Kurt"
          },
          "yearly_mean": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Yearly Mean"
          },
          "yearly_sharpe": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Yearly Sharpe"
          },
          "yearly_skew": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Yearly Skew"
          },
          "yearly_sortino": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Yearly Sortino"
          },
          "yearly_vol": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Yearly Vol"
          },
          "ytd": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Ytd"
          }
        },
        "title": "HistoricalReturnAdditionalStatisticsSchema",
        "type": "object"
      },
      "HistoricalReturnResponse.HistoricalReturnPortfolioSchema": {
        "description": "Historical return portfolio date/value pairs",
        "properties": {
          "date": {
            "title": "Date",
            "type": "string"
          },
          "value": {
            "title": "Value",
            "type": "number"
          }
        },
        "required": [
          "date",
          "value"
        ],
        "title": "HistoricalReturnPortfolioSchema",
        "type": "object"
      },
      "HistoricalReturnResponse.HistoricalReturnStatisticsSchema": {
        "description": "Historical return statistics\n\nEvery value is nullable, as on prod: a period longer than the data (e.g. ``ten_year`` for a\nfour-year history) is ``null``.",
        "properties": {
          "cagr": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Cagr"
          },
          "days": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Days"
          },
          "first_data_point": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "First Data Point"
          },
          "five_year": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Five Year"
          },
          "growth": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Growth"
          },
          "last_data_point": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Last Data Point"
          },
          "one_year": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "One Year"
          },
          "ten_year": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Ten Year"
          },
          "three_year": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Three Year"
          },
          "years": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Years"
          }
        },
        "title": "HistoricalReturnStatisticsSchema",
        "type": "object"
      },
      "InfoSchema": {
        "additionalProperties": false,
        "properties": {
          "fieldName": {
            "type": "string"
          },
          "value": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "Instrument": {
        "additionalProperties": false,
        "properties": {
          "firstDeposit": {
            "type": "number"
          },
          "id": {
            "type": "string"
          },
          "monthlyDeposit": {
            "type": "number"
          },
          "suitabilityAssessment": {
            "$ref": "#/components/schemas/InstrumentSuitabilityStatus"
          },
          "title": {
            "type": "string"
          },
          "weight": {
            "type": "number"
          }
        },
        "type": "object"
      },
      "InstrumentSuitability": {
        "additionalProperties": false,
        "properties": {
          "checkId": {
            "type": "integer"
          },
          "checkKey": {
            "type": "string"
          },
          "score": {
            "type": "number"
          },
          "threshold": {
            "type": "number"
          }
        },
        "type": "object"
      },
      "InstrumentSuitabilityStatus": {
        "additionalProperties": false,
        "properties": {
          "details": {
            "items": {
              "$ref": "#/components/schemas/InstrumentSuitability"
            },
            "type": "array"
          },
          "productIsSuitable": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "InvestorSearchPayload": {
        "additionalProperties": false,
        "properties": {
          "idType": {
            "enum": [
              "external_id",
              "ssn",
              "business_id"
            ],
            "type": "string"
          },
          "idValue": {
            "type": "string"
          }
        },
        "required": [
          "idType",
          "idValue"
        ],
        "type": "object"
      },
      "InvestorSearchResponse": {
        "additionalProperties": false,
        "properties": {
          "investors": {
            "items": {
              "$ref": "#/components/schemas/StateInvestorOutput"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "KnowledgeAndExperienceDataSchemaV2": {
        "additionalProperties": false,
        "properties": {
          "advisor_notes": {
            "readOnly": true,
            "type": [
              "string",
              "null"
            ]
          },
          "answers": {
            "additionalProperties": {},
            "readOnly": true,
            "type": "object"
          }
        },
        "required": [
          "advisor_notes",
          "answers"
        ],
        "type": "object"
      },
      "KnowledgeAndExperienceMetaSchemaV2": {
        "additionalProperties": false,
        "properties": {
          "questions": {
            "items": {
              "$ref": "#/components/schemas/KnowledgeAndExperienceQuestionMetaSchemaV2"
            },
            "readOnly": true,
            "type": "array"
          }
        },
        "required": [
          "questions"
        ],
        "type": "object"
      },
      "KnowledgeAndExperienceOptionMetaSchemaV2": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "readOnly": true,
            "type": "integer"
          },
          "label": {
            "readOnly": true,
            "type": [
              "string",
              "null"
            ]
          },
          "order": {
            "readOnly": true,
            "type": "integer"
          }
        },
        "required": [
          "id",
          "label",
          "order"
        ],
        "type": "object"
      },
      "KnowledgeAndExperiencePutDocumentSchemaV2": {
        "additionalProperties": false,
        "properties": {
          "data": {
            "$ref": "#/components/schemas/KnowledgeAndExperiencePutSchemaV2"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "KnowledgeAndExperiencePutSchemaV2": {
        "additionalProperties": false,
        "properties": {
          "advisor_notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "answers": {
            "additionalProperties": {},
            "type": "object"
          }
        },
        "required": [
          "advisor_notes",
          "answers"
        ],
        "type": "object"
      },
      "KnowledgeAndExperiencePutSchemaV21": {
        "additionalProperties": false,
        "properties": {
          "advisor_notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "answers": {
            "additionalProperties": {},
            "type": "object"
          }
        },
        "required": [
          "advisor_notes",
          "answers"
        ],
        "type": "object"
      },
      "KnowledgeAndExperienceQuestionMetaSchemaV2": {
        "additionalProperties": false,
        "properties": {
          "code": {
            "readOnly": true,
            "type": "string"
          },
          "is_multi_select": {
            "readOnly": true,
            "type": "boolean"
          },
          "label": {
            "readOnly": true,
            "type": [
              "string",
              "null"
            ]
          },
          "options": {
            "items": {
              "$ref": "#/components/schemas/KnowledgeAndExperienceOptionMetaSchemaV2"
            },
            "readOnly": true,
            "type": "array"
          },
          "order": {
            "readOnly": true,
            "type": "integer"
          },
          "popup_text": {
            "readOnly": true,
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "code",
          "is_multi_select",
          "label",
          "options",
          "order",
          "popup_text"
        ],
        "type": "object"
      },
      "KnowledgeAndExperienceReadDocumentSchemaV2": {
        "additionalProperties": false,
        "properties": {
          "data": {
            "$ref": "#/components/schemas/KnowledgeAndExperienceDataSchemaV2"
          },
          "meta": {
            "$ref": "#/components/schemas/KnowledgeAndExperienceMetaSchemaV2"
          }
        },
        "required": [
          "data",
          "meta"
        ],
        "type": "object"
      },
      "MetadataSchemaV2": {
        "additionalProperties": false,
        "properties": {
          "data": {
            "additionalProperties": {},
            "description": "Free-form external result (e.g. a pre-order check outcome). Null when unset.",
            "type": [
              "object",
              "null"
            ]
          },
          "meta": {
            "additionalProperties": {},
            "description": "Free-form top-level details.",
            "type": [
              "object",
              "null"
            ]
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "NoteSchema": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string"
          },
          "note": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "OrderExecutionInstrumentSchema": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string"
          },
          "initialDeposit": {
            "type": "number"
          },
          "isin": {
            "type": "string"
          },
          "monthlyDeposit": {
            "type": "number"
          },
          "name": {
            "type": "string"
          },
          "subAssetClass": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "OrderSummaryResponse": {
        "description": "Response schema for analyze/order-summary endpoint",
        "properties": {
          "monthly-orders": {
            "$ref": "#/components/schemas/OrderSummaryResponse.OrderSummaryOrdersSchema"
          },
          "one-time-orders": {
            "$ref": "#/components/schemas/OrderSummaryResponse.OrderSummaryOrdersSchema"
          }
        },
        "required": [
          "one-time-orders",
          "monthly-orders"
        ],
        "title": "OrderSummaryResponse",
        "type": "object"
      },
      "OrderSummaryResponse.OrderSummaryInstrumentSchema": {
        "description": "Instrument in an order summary",
        "properties": {
          "FundStandardName": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Fundstandardname"
          },
          "currency": {
            "title": "Currency",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "isin": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Isin"
          },
          "moneyAmount": {
            "title": "Moneyamount",
            "type": "number"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Name"
          },
          "type": {
            "title": "Type",
            "type": "string"
          },
          "weight": {
            "title": "Weight",
            "type": "number"
          }
        },
        "required": [
          "type",
          "currency",
          "moneyAmount",
          "id",
          "weight"
        ],
        "title": "OrderSummaryInstrumentSchema",
        "type": "object"
      },
      "OrderSummaryResponse.OrderSummaryOrdersSchema": {
        "description": "Buy orders for a single order type",
        "properties": {
          "buy": {
            "items": {
              "$ref": "#/components/schemas/OrderSummaryResponse.OrderSummaryInstrumentSchema"
            },
            "title": "Buy",
            "type": "array"
          }
        },
        "required": [
          "buy"
        ],
        "title": "OrderSummaryOrdersSchema",
        "type": "object"
      },
      "PaginationMetaSchema": {
        "additionalProperties": false,
        "properties": {
          "page": {
            "type": "integer"
          },
          "page_size": {
            "type": "integer"
          },
          "total_count": {
            "type": "integer"
          },
          "total_pages": {
            "type": "integer"
          }
        },
        "required": [
          "page",
          "page_size",
          "total_count",
          "total_pages"
        ],
        "type": "object"
      },
      "PortfolioResponse": {
        "description": "Response schema for Markowitz portfolio",
        "properties": {
          "ExpectedReturn": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Expectedreturn"
          },
          "ExpectedRisk": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Expectedrisk"
          },
          "Portfolio": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/PortfolioResponse.PortfolioItemSchema"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Portfolio"
          }
        },
        "title": "PortfolioResponse",
        "type": "object"
      },
      "PortfolioResponse.AssetClassSchema": {
        "description": "Schema for portfolio asset class",
        "properties": {
          "CategoryId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Categoryid"
          },
          "CategoryName": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Categoryname"
          },
          "EquityShare": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Equityshare"
          },
          "MainAssetClass": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Mainassetclass"
          },
          "SubAssetClass": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Subassetclass"
          }
        },
        "title": "AssetClassSchema",
        "type": "object"
      },
      "PortfolioResponse.PortfolioItemSchema": {
        "description": "Schema for portfolio item",
        "properties": {
          "AssetClass": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PortfolioResponse.AssetClassSchema"
              },
              {
                "type": "null"
              }
            ],
            "default": null
          },
          "Weight": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Weight"
          }
        },
        "title": "PortfolioItemSchema",
        "type": "object"
      },
      "ProblematicTransactionSchema": {
        "additionalProperties": false,
        "properties": {
          "direction": {
            "type": [
              "string",
              "null"
            ]
          },
          "goal_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "isin": {
            "type": [
              "string",
              "null"
            ]
          },
          "missing_account_types": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "order_type": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "direction",
          "isin",
          "missing_account_types",
          "name",
          "order_type"
        ],
        "type": "object"
      },
      "ProductPlatformSchema": {
        "additionalProperties": false,
        "properties": {
          "namespaceId": {
            "type": "integer"
          },
          "productPlatformReasoning": {
            "type": "string"
          },
          "questions": {
            "additionalProperties": {},
            "type": "object"
          }
        },
        "type": "object"
      },
      "PurposeAndRiskSchema": {
        "additionalProperties": false,
        "properties": {
          "advisorNotes": {
            "type": "string"
          },
          "dropInPercent": {
            "type": "integer"
          },
          "dropInStd": {
            "type": "integer"
          },
          "educationWork": {
            "type": "integer"
          },
          "expectationOfRisk": {
            "type": "integer"
          },
          "experience": {},
          "riskStrategy": {
            "type": "integer"
          },
          "suitability": {}
        },
        "type": "object"
      },
      "RecurringTransactionSchema": {
        "additionalProperties": false,
        "properties": {
          "account_external_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "account_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "account_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "account_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "buy": {
            "type": [
              "number",
              "null"
            ]
          },
          "current_amount": {
            "type": [
              "number",
              "null"
            ]
          },
          "direction": {
            "type": [
              "string",
              "null"
            ]
          },
          "end_date": {
            "format": "date",
            "type": [
              "string",
              "null"
            ]
          },
          "frequency": {
            "enum": [
              "daily",
              "weekly",
              "biweekly",
              "monthly",
              "quarterly",
              "yearly"
            ],
            "readOnly": true,
            "type": "string"
          },
          "goal_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "isin": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "order_value_type": {
            "enum": [
              "amount",
              "percent",
              null
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "sell": {
            "type": [
              "number",
              "null"
            ]
          },
          "start_date": {
            "format": "date",
            "type": [
              "string",
              "null"
            ]
          },
          "switch": {
            "type": [
              "number",
              "null"
            ]
          },
          "switch_to": {
            "items": {
              "$ref": "#/components/schemas/SwitchToTargetSchema"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "target_amount": {
            "type": [
              "number",
              "null"
            ]
          },
          "transaction_amount": {
            "type": [
              "number",
              "null"
            ]
          },
          "weight": {
            "type": "number"
          }
        },
        "required": [
          "account_id",
          "account_name",
          "account_number",
          "current_amount",
          "direction",
          "end_date",
          "frequency",
          "isin",
          "name",
          "start_date",
          "target_amount",
          "transaction_amount",
          "weight"
        ],
        "type": "object"
      },
      "RecurringTransferSchema": {
        "additionalProperties": false,
        "properties": {
          "amount": {
            "type": [
              "number",
              "null"
            ]
          },
          "frequency": {
            "enum": [
              "daily",
              "weekly",
              "biweekly",
              "monthly",
              "quarterly",
              "yearly",
              null
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "from_account_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "goal_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "to_account": {
            "type": [
              "string",
              "null"
            ]
          },
          "to_account_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "type": {
            "enum": [
              "internal",
              "deposit",
              "withdrawal",
              "transfer",
              null
            ],
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "ReportFileMetaListSchema": {
        "additionalProperties": false,
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/ReportFileMetaSchema"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "ReportFileMetaSchema": {
        "additionalProperties": false,
        "properties": {
          "createdAt": {
            "type": "string"
          },
          "documentId": {
            "type": "string"
          },
          "documentStatus": {
            "type": "string"
          },
          "documentType": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "RiskExpectationOptionMetaSchemaV2": {
        "additionalProperties": false,
        "properties": {
          "description": {
            "readOnly": true,
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "readOnly": true,
            "type": "integer"
          },
          "image_name": {
            "readOnly": true,
            "type": [
              "string",
              "null"
            ]
          },
          "label": {
            "readOnly": true,
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "description",
          "id",
          "image_name",
          "label"
        ],
        "type": "object"
      },
      "RiskQuestionDocumentSchemaV2": {
        "additionalProperties": false,
        "properties": {
          "data": {
            "$ref": "#/components/schemas/RiskQuestionSchemaV2"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "RiskQuestionMetaSchemaV2": {
        "additionalProperties": false,
        "properties": {
          "expectation_of_risk": {
            "items": {
              "$ref": "#/components/schemas/RiskExpectationOptionMetaSchemaV2"
            },
            "readOnly": true,
            "type": "array"
          },
          "is_risk2_hidden": {
            "readOnly": true,
            "type": "boolean"
          },
          "risk_strategy": {
            "items": {
              "$ref": "#/components/schemas/RiskStrategyOptionMetaSchemaV2"
            },
            "readOnly": true,
            "type": "array"
          }
        },
        "required": [
          "expectation_of_risk",
          "is_risk2_hidden",
          "risk_strategy"
        ],
        "type": "object"
      },
      "RiskQuestionReadDocumentSchemaV2": {
        "additionalProperties": false,
        "properties": {
          "data": {
            "$ref": "#/components/schemas/RiskQuestionSchemaV2"
          },
          "meta": {
            "$ref": "#/components/schemas/RiskQuestionMetaSchemaV2"
          }
        },
        "required": [
          "data",
          "meta"
        ],
        "type": "object"
      },
      "RiskQuestionSchemaV2": {
        "additionalProperties": false,
        "properties": {
          "advisor_notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "expectation_of_risk": {
            "type": [
              "integer",
              "null"
            ]
          },
          "risk_strategy": {
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "required": [
          "advisor_notes",
          "expectation_of_risk",
          "risk_strategy"
        ],
        "type": "object"
      },
      "RiskQuestionSchemaV21": {
        "additionalProperties": false,
        "properties": {
          "advisor_notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "expectation_of_risk": {
            "type": [
              "integer",
              "null"
            ]
          },
          "risk_strategy": {
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "required": [
          "advisor_notes",
          "expectation_of_risk",
          "risk_strategy"
        ],
        "type": "object"
      },
      "RiskReturnResponse": {
        "description": "Response schema for analyze/risk-return endpoint",
        "properties": {
          "return": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Return"
          },
          "risk": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Risk"
          }
        },
        "title": "RiskReturnResponse",
        "type": "object"
      },
      "RiskStrategyOptionMetaSchemaV2": {
        "additionalProperties": false,
        "properties": {
          "description": {
            "readOnly": true,
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "readOnly": true,
            "type": "integer"
          },
          "label": {
            "readOnly": true,
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "description",
          "id",
          "label"
        ],
        "type": "object"
      },
      "RoboPortfolioFrontierResponse": {
        "description": "Response schema for analyze/frontier endpoint\n\n``customer`` is only there when the call carried ``risk`` and ``return`` (as prod).",
        "properties": {
          "customer": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RoboPortfolioFrontierResponse.CustomerMapSchema"
              },
              {
                "type": "null"
              }
            ],
            "default": null
          },
          "frontier": {
            "items": {
              "$ref": "#/components/schemas/RoboPortfolioFrontierResponse.FrontierFieldsSchema"
            },
            "title": "Frontier",
            "type": "array"
          },
          "model_portfolios": {
            "items": {
              "$ref": "#/components/schemas/RoboPortfolioFrontierResponse.ModelPortfolioSchema"
            },
            "title": "Model Portfolios",
            "type": "array"
          }
        },
        "required": [
          "frontier",
          "model_portfolios"
        ],
        "title": "RoboPortfolioFrontierResponse",
        "type": "object"
      },
      "RoboPortfolioFrontierResponse.CustomerMapSchema": {
        "properties": {
          "model_portfolio_nearest_customer": {
            "$ref": "#/components/schemas/RoboPortfolioFrontierResponse.ModelPortfolioSchema"
          },
          "nearest_return_grid": {
            "title": "Nearest Return Grid",
            "type": "integer"
          },
          "nearest_risk_grid": {
            "title": "Nearest Risk Grid",
            "type": "integer"
          }
        },
        "required": [
          "model_portfolio_nearest_customer",
          "nearest_risk_grid",
          "nearest_return_grid"
        ],
        "title": "CustomerMapSchema",
        "type": "object"
      },
      "RoboPortfolioFrontierResponse.FrontierFieldsSchema": {
        "properties": {
          "grid": {
            "title": "Grid",
            "type": "integer"
          },
          "return": {
            "title": "Return",
            "type": "number"
          },
          "risk": {
            "title": "Risk",
            "type": "number"
          }
        },
        "required": [
          "risk",
          "return",
          "grid"
        ],
        "title": "FrontierFieldsSchema",
        "type": "object"
      },
      "RoboPortfolioFrontierResponse.ModelPortfolioSchema": {
        "properties": {
          "nearest_grid": {
            "title": "Nearest Grid",
            "type": "integer"
          },
          "return": {
            "title": "Return",
            "type": "number"
          },
          "risk": {
            "title": "Risk",
            "type": "number"
          },
          "risk_tolerance": {
            "title": "Risk Tolerance",
            "type": "string"
          }
        },
        "required": [
          "risk",
          "return",
          "risk_tolerance",
          "nearest_grid"
        ],
        "title": "ModelPortfolioSchema",
        "type": "object"
      },
      "ScoringPayload": {
        "description": "Payload model for analyze/scoring endpoint",
        "properties": {
          "portfolio": {
            "items": {
              "$ref": "#/components/schemas/ScoringPayload.IdentifierOnlyInstrumentSchema"
            },
            "minItems": 1,
            "title": "Portfolio",
            "type": "array"
          }
        },
        "required": [
          "portfolio"
        ],
        "title": "ScoringPayload",
        "type": "object"
      },
      "ScoringPayload.IdentifierOnlyInstrumentSchema": {
        "description": "Instrument referenced by id or isin only (no category_id or weight)",
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Id"
          },
          "isin": {
            "anyOf": [
              {
                "maxLength": 12,
                "minLength": 12,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Isin"
          }
        },
        "title": "IdentifierOnlyInstrumentSchema",
        "type": "object"
      },
      "ScoringResponse": {
        "description": "Response schema for analyze/scoring endpoint",
        "properties": {
          "portfolio": {
            "items": {
              "$ref": "#/components/schemas/ScoringResponse.ScoringHoldingSchema"
            },
            "title": "Portfolio",
            "type": "array"
          }
        },
        "required": [
          "portfolio"
        ],
        "title": "ScoringResponse",
        "type": "object"
      },
      "ScoringResponse.ScoringHoldingSchema": {
        "description": "Scoring holding data",
        "properties": {
          "advice": {
            "title": "Advice",
            "type": "integer"
          },
          "category": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Category reference code (C-code, e.g. `C04`), as on prod.",
            "title": "Category"
          },
          "category_average": {
            "title": "Category Average",
            "type": "number"
          },
          "category_max": {
            "title": "Category Max",
            "type": "number"
          },
          "category_min": {
            "title": "Category Min",
            "type": "number"
          },
          "category_numbers": {
            "title": "Category Numbers",
            "type": "integer"
          },
          "dataset": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Dataset"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "isin": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Isin"
          },
          "score": {
            "title": "Score",
            "type": "number"
          }
        },
        "required": [
          "id",
          "score",
          "category_min",
          "category_max",
          "category_average",
          "category_numbers",
          "advice"
        ],
        "title": "ScoringHoldingSchema",
        "type": "object"
      },
      "SessionAdviceResponseSchemaV2": {
        "additionalProperties": false,
        "properties": {
          "data": {
            "$ref": "#/components/schemas/AdviceInformationDataSchemaV2"
          },
          "meta": {
            "$ref": "#/components/schemas/AdviceInformationMetaSchemaV2"
          }
        },
        "required": [
          "data",
          "meta"
        ],
        "type": "object"
      },
      "SessionCreateDocumentSchemaV2": {
        "additionalProperties": false,
        "properties": {
          "data": {
            "$ref": "#/components/schemas/SessionCreateResponseSchemaV2"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "SessionCreateRequestSchemaV2": {
        "additionalProperties": false,
        "properties": {
          "advice_type": {
            "enum": [
              "mifid",
              "order_execution"
            ],
            "type": "string"
          },
          "advisor_id": {
            "maxLength": 36,
            "type": "string"
          },
          "external_status": {
            "maxLength": 30,
            "type": [
              "string",
              "null"
            ]
          },
          "investor_id": {
            "maxLength": 36,
            "type": "string"
          },
          "name": {
            "maxLength": 200,
            "type": "string"
          },
          "session_id": {
            "maxLength": 36,
            "type": [
              "string",
              "null"
            ]
          },
          "survey_status": {
            "enum": [
              "waiting_for_investor",
              "reminder_sent",
              "complete",
              "notification_error",
              null
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "survey_status_message": {
            "additionalProperties": {},
            "type": [
              "object",
              "null"
            ]
          }
        },
        "required": [
          "advice_type",
          "advisor_id",
          "investor_id",
          "name"
        ],
        "type": "object"
      },
      "SessionCreateResponseSchemaV2": {
        "additionalProperties": false,
        "properties": {
          "advice_type": {
            "enum": [
              "mifid",
              "order_execution"
            ],
            "readOnly": true,
            "type": "string"
          },
          "advisor_id": {
            "readOnly": true,
            "type": "string"
          },
          "investor_id": {
            "readOnly": true,
            "type": "string"
          },
          "name": {
            "readOnly": true,
            "type": "string"
          },
          "session_id": {
            "readOnly": true,
            "type": "string"
          },
          "status": {
            "enum": [
              "open",
              "complete"
            ],
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "advice_type",
          "advisor_id",
          "investor_id",
          "name",
          "session_id",
          "status"
        ],
        "type": "object"
      },
      "SessionGoalCreateRequestSchemaV2": {
        "additionalProperties": false,
        "properties": {
          "description": {
            "maxLength": 1000,
            "type": [
              "string",
              "null"
            ]
          },
          "horizon_value": {
            "minimum": 0,
            "type": "integer"
          },
          "icon": {
            "maxLength": 1000,
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "maxLength": 200,
            "minLength": 1,
            "type": "string"
          },
          "type": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "horizon_value",
          "name"
        ],
        "type": "object"
      },
      "SessionGoalCreateResponseGoalSchemaV2": {
        "additionalProperties": false,
        "properties": {
          "description": {
            "readOnly": true,
            "type": [
              "string",
              "null"
            ]
          },
          "horizon_value": {
            "readOnly": true,
            "type": "integer"
          },
          "icon": {
            "readOnly": true,
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "readOnly": true,
            "type": "string"
          },
          "initial_risk_class": {
            "readOnly": true,
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "readOnly": true,
            "type": "string"
          },
          "risk_class": {
            "readOnly": true,
            "type": [
              "string",
              "null"
            ]
          },
          "type": {
            "readOnly": true,
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "description",
          "horizon_value",
          "icon",
          "id",
          "initial_risk_class",
          "name",
          "risk_class",
          "type"
        ],
        "type": "object"
      },
      "SessionGoalMutationDocumentSchemaV2": {
        "additionalProperties": false,
        "properties": {
          "data": {
            "$ref": "#/components/schemas/SessionGoalCreateResponseGoalSchemaV2"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "SessionGoalUpdateRequestSchemaV2": {
        "additionalProperties": false,
        "properties": {
          "description": {
            "maxLength": 1000,
            "type": [
              "string",
              "null"
            ]
          },
          "horizon_value": {
            "minimum": 0,
            "type": "integer"
          },
          "icon": {
            "maxLength": 1000,
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "maxLength": 200,
            "minLength": 1,
            "type": "string"
          },
          "type": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "SessionPatchRequestSchema": {
        "additionalProperties": false,
        "properties": {
          "advice_type": {
            "enum": [
              "mifid",
              "order_execution"
            ],
            "type": "string"
          },
          "external_status": {
            "maxLength": 30,
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "maxLength": 200,
            "type": "string"
          },
          "survey_status": {
            "enum": [
              "waiting_for_investor",
              "reminder_sent",
              "complete",
              "notification_error",
              null
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "survey_status_message": {
            "additionalProperties": {},
            "type": [
              "object",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "SessionTransactionsDataSchema": {
        "additionalProperties": false,
        "properties": {
          "holdings": {
            "items": {
              "$ref": "#/components/schemas/TransactionHoldingSchema"
            },
            "type": "array"
          },
          "minimum_required_account_types": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "one_time_transactions": {
            "items": {
              "$ref": "#/components/schemas/TransactionSchema"
            },
            "type": "array"
          },
          "one_time_transfers": {
            "items": {
              "$ref": "#/components/schemas/TransactionTransferSchema"
            },
            "type": "array"
          },
          "problematic_transactions": {
            "items": {
              "$ref": "#/components/schemas/ProblematicTransactionSchema"
            },
            "type": "array"
          },
          "recurring_transactions": {
            "items": {
              "$ref": "#/components/schemas/RecurringTransactionSchema"
            },
            "type": "array"
          },
          "recurring_transfers": {
            "items": {
              "$ref": "#/components/schemas/RecurringTransferSchema"
            },
            "type": "array"
          }
        },
        "required": [
          "holdings",
          "minimum_required_account_types",
          "one_time_transactions",
          "one_time_transfers",
          "problematic_transactions",
          "recurring_transactions",
          "recurring_transfers"
        ],
        "type": "object"
      },
      "SessionTransactionsResponseSchemaV2": {
        "additionalProperties": false,
        "properties": {
          "data": {
            "$ref": "#/components/schemas/SessionTransactionsDataSchema"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "SettingsItem": {
        "additionalProperties": false,
        "properties": {
          "application": {
            "type": "string"
          },
          "default": {},
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "group": {
            "type": [
              "string",
              "null"
            ]
          },
          "is_overruled": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "schema": {},
          "type": {
            "type": [
              "string",
              "null"
            ]
          },
          "value": {}
        },
        "type": "object"
      },
      "SettingsResponse": {
        "additionalProperties": false,
        "properties": {
          "settings": {
            "items": {
              "$ref": "#/components/schemas/SettingsItem"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "SimplePortfolioSchema": {
        "description": "Simple portfolio with a list of id and weight pairs",
        "properties": {
          "portfolio": {
            "items": {
              "$ref": "#/components/schemas/SimplePortfolioSchema.SimpleInstrumentSchema"
            },
            "minItems": 1,
            "title": "Portfolio",
            "type": "array"
          }
        },
        "required": [
          "portfolio"
        ],
        "title": "SimplePortfolioSchema",
        "type": "object"
      },
      "SimplePortfolioSchema.SimpleInstrumentSchema": {
        "description": "Instrument with id identifier and weight",
        "properties": {
          "category_id": {
            "anyOf": [
              {
                "maxLength": 5,
                "minLength": 2,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Category reference code (C-code, e.g. `C04`), as on prod.",
            "title": "Category Id"
          },
          "id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Id"
          },
          "isin": {
            "anyOf": [
              {
                "maxLength": 12,
                "minLength": 12,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Isin"
          },
          "weight": {
            "maximum": 100,
            "minimum": 0,
            "title": "Weight",
            "type": "number"
          }
        },
        "required": [
          "weight"
        ],
        "title": "SimpleInstrumentSchema",
        "type": "object"
      },
      "StateAdvisorDetailsResponse": {
        "additionalProperties": false,
        "properties": {
          "advisor": {
            "$ref": "#/components/schemas/StateAdvisorSchema"
          }
        },
        "type": "object"
      },
      "StateAdvisorListResponse": {
        "additionalProperties": false,
        "properties": {
          "advisors": {
            "items": {
              "$ref": "#/components/schemas/StateAdvisorSchema"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "StateAdvisorSchema": {
        "additionalProperties": false,
        "properties": {
          "advisor_id": {
            "format": "uuid",
            "type": "string"
          },
          "deleted_at": {
            "format": "date-time",
            "type": "string"
          },
          "email": {
            "format": "email",
            "type": [
              "string",
              "null"
            ]
          },
          "external_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "is_deleted": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "StateAdvisorSessionListResponse": {
        "additionalProperties": false,
        "properties": {
          "advisorId": {
            "format": "uuid",
            "type": "string"
          },
          "email": {
            "format": "email",
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "StateInvestorListOutput": {
        "additionalProperties": false,
        "properties": {
          "advisorId": {
            "format": "uuid",
            "type": "string"
          },
          "advisorName": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "externalId": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "investorType": {
            "type": "string"
          },
          "links": {
            "readOnly": true
          },
          "name": {
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "type": "object"
      },
      "StateInvestorListOutputArray": {
        "properties": {
          "investors": {
            "items": {
              "$ref": "#/components/schemas/StateInvestorListOutput"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "StateInvestorOutput": {
        "additionalProperties": false,
        "properties": {
          "additionalData": {
            "additionalProperties": {},
            "type": "object"
          },
          "address": {
            "maxLength": 200,
            "type": "string"
          },
          "advisorId": {
            "format": "uuid",
            "type": "string"
          },
          "advisorName": {
            "type": "string"
          },
          "city": {
            "maxLength": 200,
            "type": "string"
          },
          "contacts": {
            "items": {
              "additionalProperties": {},
              "type": "object"
            },
            "type": "array"
          },
          "country": {
            "description": "ISO 3166-1 alpha-2",
            "maxLength": 2,
            "type": "string"
          },
          "email": {
            "maxLength": 100,
            "type": "string"
          },
          "externalId": {
            "maxLength": 50,
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "investorType": {
            "enum": [
              "person",
              "company"
            ],
            "type": "string"
          },
          "kyc": {
            "additionalProperties": {},
            "type": "object"
          },
          "links": {
            "readOnly": true
          },
          "name": {
            "maxLength": 100,
            "type": "string"
          },
          "organizationNumber": {
            "maxLength": 50,
            "type": "string"
          },
          "phone": {
            "maxLength": 20,
            "type": "string"
          },
          "ssn": {
            "maxLength": 30,
            "type": "string"
          },
          "zipCode": {
            "maxLength": 20,
            "type": "string"
          }
        },
        "required": [
          "country",
          "investorType"
        ],
        "type": "object"
      },
      "StateInvestorPayload": {
        "additionalProperties": false,
        "properties": {
          "additionalData": {
            "additionalProperties": {},
            "type": "object"
          },
          "address": {
            "maxLength": 200,
            "type": "string"
          },
          "advisorId": {
            "maxLength": 36,
            "type": "string"
          },
          "city": {
            "maxLength": 200,
            "type": "string"
          },
          "contacts": {
            "items": {
              "additionalProperties": {},
              "type": "object"
            },
            "type": "array"
          },
          "country": {
            "description": "ISO 3166-1 alpha-2",
            "maxLength": 2,
            "type": "string"
          },
          "email": {
            "maxLength": 100,
            "type": "string"
          },
          "externalId": {
            "maxLength": 50,
            "type": "string"
          },
          "investorType": {
            "enum": [
              "person",
              "company"
            ],
            "type": "string"
          },
          "kyc": {
            "additionalProperties": {},
            "type": "object"
          },
          "name": {
            "maxLength": 100,
            "type": "string"
          },
          "organizationNumber": {
            "maxLength": 50,
            "type": "string"
          },
          "phone": {
            "maxLength": 20,
            "type": "string"
          },
          "ssn": {
            "maxLength": 30,
            "type": "string"
          },
          "zipCode": {
            "maxLength": 20,
            "type": "string"
          }
        },
        "required": [
          "country",
          "investorType"
        ],
        "type": "object"
      },
      "StateSessionCreateResponse": {
        "additionalProperties": false,
        "properties": {
          "advice_type": {
            "readOnly": true
          },
          "advisor": {
            "$ref": "#/components/schemas/StateAdvisorSessionListResponse"
          },
          "channel": {
            "readOnly": true
          },
          "created_date": {
            "type": "string"
          },
          "external_status": {
            "type": [
              "string",
              "null"
            ]
          },
          "investor_id": {
            "format": "uuid",
            "type": "string"
          },
          "last_activity_date": {
            "format": null,
            "pattern": null,
            "type": "string"
          },
          "links": {
            "readOnly": true
          },
          "name": {
            "type": "string"
          },
          "session_id": {
            "format": "uuid",
            "type": "string"
          },
          "signed": {
            "enum": [
              "waiting",
              "signed",
              "declined",
              null
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "readOnly": true
          },
          "survey_status": {
            "type": [
              "string",
              "null"
            ]
          },
          "survey_status_message": {
            "additionalProperties": {},
            "type": [
              "object",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "StateSessionGoalDetailsResponse": {
        "additionalProperties": false,
        "properties": {
          "data": {
            "$ref": "#/components/schemas/StateSessionGoalSchema"
          }
        },
        "type": "object"
      },
      "StateSessionGoalListResponse": {
        "additionalProperties": false,
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/StateSessionGoalSchema"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "StateSessionGoalSchema": {
        "additionalProperties": false,
        "properties": {
          "data": {
            "additionalProperties": {},
            "type": "object"
          },
          "description": {
            "type": "string"
          },
          "goal_id": {
            "type": "string"
          },
          "icon": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "session_id": {
            "type": "string"
          },
          "user_id": {
            "type": "integer"
          }
        },
        "type": "object"
      },
      "SustainabilityAdaptedSchema": {
        "additionalProperties": false,
        "properties": {
          "adapted": {
            "type": "boolean"
          },
          "alignmentCriteria": {
            "items": {
              "$ref": "#/components/schemas/AdaptationSchema"
            },
            "type": "array"
          },
          "genericAssessment": {
            "$ref": "#/components/schemas/GenericAssessmentAdaptationSchema"
          },
          "preferenceCriteria": {
            "items": {
              "$ref": "#/components/schemas/AdaptationSchema"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "SustainabilityAdvisorNotesMetaSchemaV2": {
        "additionalProperties": false,
        "properties": {
          "enabled": {
            "readOnly": true,
            "type": "boolean"
          },
          "required": {
            "readOnly": true,
            "type": "boolean"
          }
        },
        "required": [
          "enabled",
          "required"
        ],
        "type": "object"
      },
      "SustainabilityAlignmentCriteriaMetaSchemaV2": {
        "additionalProperties": false,
        "properties": {
          "slots": {
            "items": {
              "$ref": "#/components/schemas/SustainabilityAlignmentSlotMetaSchemaV2"
            },
            "readOnly": true,
            "type": "array"
          },
          "steps": {
            "items": {
              "$ref": "#/components/schemas/SustainabilityAlignmentStepMetaSchemaV2"
            },
            "readOnly": true,
            "type": "array"
          }
        },
        "required": [
          "slots",
          "steps"
        ],
        "type": "object"
      },
      "SustainabilityAlignmentSlotMetaSchemaV2": {
        "additionalProperties": false,
        "properties": {
          "content": {
            "readOnly": true,
            "type": [
              "string",
              "null"
            ]
          },
          "is_comment_shown": {
            "readOnly": true,
            "type": "boolean"
          },
          "key": {
            "readOnly": true,
            "type": "string"
          },
          "order": {
            "readOnly": true,
            "type": "integer"
          },
          "required": {
            "readOnly": true,
            "type": "boolean"
          },
          "title": {
            "readOnly": true,
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "content",
          "is_comment_shown",
          "key",
          "order",
          "required",
          "title"
        ],
        "type": "object"
      },
      "SustainabilityAlignmentSlotSchemaV2": {
        "additionalProperties": false,
        "properties": {
          "advisor_notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "value": {
            "maximum": 5,
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "required": [
          "advisor_notes",
          "value"
        ],
        "type": "object"
      },
      "SustainabilityAlignmentStepMetaSchemaV2": {
        "additionalProperties": false,
        "properties": {
          "label": {
            "readOnly": true,
            "type": [
              "string",
              "null"
            ]
          },
          "order": {
            "readOnly": true,
            "type": "integer"
          },
          "value": {
            "readOnly": true,
            "type": "integer"
          }
        },
        "required": [
          "label",
          "order",
          "value"
        ],
        "type": "object"
      },
      "SustainabilityDocumentSchemaV2": {
        "additionalProperties": false,
        "properties": {
          "data": {
            "$ref": "#/components/schemas/SustainabilitySchemaV2"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "SustainabilityGenericAssessmentMetaSchemaV2": {
        "additionalProperties": false,
        "properties": {
          "enabled": {
            "readOnly": true,
            "type": "boolean"
          },
          "is_comment_required": {
            "readOnly": true,
            "type": "boolean"
          },
          "is_comment_shown": {
            "readOnly": true,
            "type": "boolean"
          }
        },
        "required": [
          "enabled",
          "is_comment_required",
          "is_comment_shown"
        ],
        "type": "object"
      },
      "SustainabilityGenericSchemaV2": {
        "additionalProperties": false,
        "properties": {
          "answer": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "comment": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "answer",
          "comment"
        ],
        "type": "object"
      },
      "SustainabilityMetaSchemaV2": {
        "additionalProperties": false,
        "properties": {
          "alignment_criteria": {
            "$ref": "#/components/schemas/SustainabilityAlignmentCriteriaMetaSchemaV2",
            "readOnly": true
          },
          "generic_assessment": {
            "$ref": "#/components/schemas/SustainabilityGenericAssessmentMetaSchemaV2",
            "readOnly": true
          },
          "preference_criteria": {
            "$ref": "#/components/schemas/SustainabilityPreferenceCriteriaMetaSchemaV2",
            "readOnly": true
          }
        },
        "required": [
          "alignment_criteria",
          "generic_assessment",
          "preference_criteria"
        ],
        "type": "object"
      },
      "SustainabilityPreferenceCriteriaMetaSchemaV2": {
        "additionalProperties": false,
        "properties": {
          "advisor_notes": {
            "$ref": "#/components/schemas/SustainabilityAdvisorNotesMetaSchemaV2",
            "readOnly": true
          },
          "description": {
            "readOnly": true,
            "type": [
              "string",
              "null"
            ]
          },
          "enabled": {
            "readOnly": true,
            "type": "boolean"
          },
          "header": {
            "readOnly": true,
            "type": [
              "string",
              "null"
            ]
          },
          "themes": {
            "items": {
              "$ref": "#/components/schemas/SustainabilityPreferenceThemeMetaSchemaV2"
            },
            "readOnly": true,
            "type": "array"
          }
        },
        "required": [
          "advisor_notes",
          "description",
          "enabled",
          "header",
          "themes"
        ],
        "type": "object"
      },
      "SustainabilityPreferenceSchemaV2": {
        "additionalProperties": false,
        "properties": {
          "advisor_notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "themes": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "advisor_notes",
          "themes"
        ],
        "type": "object"
      },
      "SustainabilityPreferenceThemeMetaSchemaV2": {
        "additionalProperties": false,
        "properties": {
          "icon": {
            "readOnly": true,
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "readOnly": true,
            "type": "string"
          },
          "title": {
            "readOnly": true,
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "icon",
          "id",
          "title"
        ],
        "type": "object"
      },
      "SustainabilityReadDocumentSchemaV2": {
        "additionalProperties": false,
        "properties": {
          "data": {
            "$ref": "#/components/schemas/SustainabilitySchemaV2"
          },
          "meta": {
            "$ref": "#/components/schemas/SustainabilityMetaSchemaV2"
          }
        },
        "required": [
          "data",
          "meta"
        ],
        "type": "object"
      },
      "SustainabilitySchema": {
        "additionalProperties": false,
        "properties": {
          "alignmentCriteria": {
            "additionalProperties": {},
            "type": "object"
          },
          "alignmentCriteriaAdvisorNotes": {
            "additionalProperties": {},
            "type": "object"
          },
          "genericAssessment": {},
          "offModelQuestions": {
            "additionalProperties": {},
            "type": "object"
          },
          "offModelQuestionsAdvisorNotes": {
            "additionalProperties": {},
            "type": "object"
          },
          "preferenceCriteria": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "preferenceCriteriaAdvisorNotes": {
            "type": "string"
          },
          "sustainabilityAdapted": {
            "$ref": "#/components/schemas/SustainabilityAdaptedSchema"
          }
        },
        "type": "object"
      },
      "SustainabilitySchemaV2": {
        "additionalProperties": false,
        "properties": {
          "alignment_criteria": {
            "additionalProperties": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/SustainabilityAlignmentSlotSchemaV2"
                },
                {
                  "type": "null"
                }
              ]
            },
            "type": [
              "object",
              "null"
            ]
          },
          "generic": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SustainabilityGenericSchemaV2"
              },
              {
                "type": "null"
              }
            ]
          },
          "no_exclusion_preference": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "preference_criteria": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SustainabilityPreferenceSchemaV2"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "alignment_criteria",
          "generic",
          "no_exclusion_preference",
          "preference_criteria"
        ],
        "type": "object"
      },
      "SustainabilitySchemaV21": {
        "additionalProperties": false,
        "properties": {
          "alignment_criteria": {
            "additionalProperties": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/SustainabilityAlignmentSlotSchemaV2"
                },
                {
                  "type": "null"
                }
              ]
            },
            "type": [
              "object",
              "null"
            ]
          },
          "generic": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SustainabilityGenericSchemaV2"
              },
              {
                "type": "null"
              }
            ]
          },
          "no_exclusion_preference": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "preference_criteria": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SustainabilityPreferenceSchemaV2"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "alignment_criteria",
          "generic",
          "no_exclusion_preference",
          "preference_criteria"
        ],
        "type": "object"
      },
      "SwitchToTargetSchema": {
        "additionalProperties": false,
        "properties": {
          "isin": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "percent": {
            "type": "number"
          }
        },
        "required": [
          "isin",
          "name",
          "percent"
        ],
        "type": "object"
      },
      "TransactionHoldingSchema": {
        "additionalProperties": false,
        "properties": {
          "account_id": {
            "type": "string"
          },
          "amount": {
            "type": "number"
          },
          "category": {
            "type": [
              "string",
              "null"
            ]
          },
          "goal_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "isin": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "type": {
            "type": "string"
          }
        },
        "required": [
          "account_id",
          "amount",
          "category",
          "isin",
          "name",
          "type"
        ],
        "type": "object"
      },
      "TransactionSchema": {
        "additionalProperties": false,
        "properties": {
          "account_external_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "account_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "account_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "account_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "buy": {
            "type": [
              "number",
              "null"
            ]
          },
          "current_amount": {
            "type": [
              "number",
              "null"
            ]
          },
          "direction": {
            "type": [
              "string",
              "null"
            ]
          },
          "goal_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "isin": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "order_value_type": {
            "enum": [
              "amount",
              "percent",
              null
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "sell": {
            "type": [
              "number",
              "null"
            ]
          },
          "switch": {
            "type": [
              "number",
              "null"
            ]
          },
          "switch_to": {
            "items": {
              "$ref": "#/components/schemas/SwitchToTargetSchema"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "target_amount": {
            "type": [
              "number",
              "null"
            ]
          },
          "transaction_amount": {
            "type": [
              "number",
              "null"
            ]
          },
          "weight": {
            "type": "number"
          }
        },
        "required": [
          "account_id",
          "account_name",
          "account_number",
          "current_amount",
          "direction",
          "isin",
          "name",
          "target_amount",
          "transaction_amount",
          "weight"
        ],
        "type": "object"
      },
      "TransactionTransferSchema": {
        "additionalProperties": false,
        "properties": {
          "amount": {
            "type": [
              "number",
              "null"
            ]
          },
          "from_account_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "goal_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "to_account": {
            "type": [
              "string",
              "null"
            ]
          },
          "to_account_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "type": {
            "enum": [
              "internal",
              "deposit",
              "withdrawal",
              "transfer",
              null
            ],
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "UpdateSessionStatusPayload": {
        "additionalProperties": false,
        "properties": {
          "executed": {
            "type": "boolean"
          },
          "external_status": {
            "description": "External status",
            "maxLength": 30,
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "description": "Session name",
            "maxLength": 200,
            "type": "string"
          }
        },
        "type": "object"
      },
      "UpdateStateInvestorPayload": {
        "additionalProperties": false,
        "properties": {
          "additionalData": {
            "additionalProperties": {},
            "type": "object"
          },
          "address": {
            "maxLength": 200,
            "type": "string"
          },
          "city": {
            "maxLength": 200,
            "type": "string"
          },
          "contacts": {
            "items": {
              "additionalProperties": {},
              "type": "object"
            },
            "type": "array"
          },
          "country": {
            "description": "ISO 3166-1 alpha-2",
            "maxLength": 2,
            "type": "string"
          },
          "email": {
            "maxLength": 100,
            "type": "string"
          },
          "externalId": {
            "maxLength": 50,
            "type": "string"
          },
          "kyc": {
            "additionalProperties": {},
            "type": "object"
          },
          "name": {
            "maxLength": 100,
            "type": "string"
          },
          "organizationNumber": {
            "maxLength": 50,
            "type": "string"
          },
          "phone": {
            "maxLength": 20,
            "type": "string"
          },
          "ssn": {
            "maxLength": 30,
            "type": "string"
          },
          "zipCode": {
            "maxLength": 20,
            "type": "string"
          }
        },
        "type": "object"
      },
      "ValidationError": {
        "properties": {
          "detail": {
            "properties": {
              "\u003clocation\u003e": {
                "properties": {
                  "\u003cfield_name\u003e": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  }
                },
                "type": "object"
              }
            },
            "type": "object"
          },
          "message": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "WebhookCreateSchema": {
        "additionalProperties": false,
        "properties": {
          "event": {
            "description": "Event name - three parts separated by '.', wildcards are allowed (e.g., 'qap.*.*')",
            "type": "string"
          },
          "headers": {
            "additionalProperties": {
              "type": "string"
            },
            "default": null,
            "description": "Headers for the webhook",
            "type": [
              "object",
              "null"
            ]
          },
          "is_active": {
            "description": "Whether the webhook is active",
            "type": "boolean"
          },
          "secret": {
            "default": null,
            "description": "Secret for signing the webhook payload",
            "type": [
              "string",
              "null"
            ]
          },
          "url": {
            "description": "URL of the webhook",
            "type": "string"
          }
        },
        "required": [
          "event",
          "is_active",
          "url"
        ],
        "type": "object"
      },
      "WebhookListResponseSchema": {
        "additionalProperties": false,
        "properties": {
          "pagination": {
            "$ref": "#/components/schemas/PaginationMetaSchema"
          },
          "webhooks": {
            "items": {
              "$ref": "#/components/schemas/WebhookResponseSchema"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "WebhookResponseSchema": {
        "additionalProperties": false,
        "properties": {
          "event": {
            "type": "string"
          },
          "failures": {
            "type": "integer"
          },
          "headers": {
            "additionalProperties": {},
            "type": [
              "object",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "is_active": {
            "type": "boolean"
          },
          "secret": {
            "type": [
              "string",
              "null"
            ]
          },
          "url": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "WebhookResponseSchema1": {
        "additionalProperties": false,
        "properties": {
          "event": {
            "type": "string"
          },
          "failures": {
            "type": "integer"
          },
          "headers": {
            "additionalProperties": {},
            "type": [
              "object",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "is_active": {
            "type": "boolean"
          },
          "secret": {
            "type": [
              "string",
              "null"
            ]
          },
          "url": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "WebhookTestResponseSchema": {
        "additionalProperties": false,
        "properties": {
          "response_body": {
            "type": [
              "string",
              "null"
            ]
          },
          "response_headers": {
            "additionalProperties": {},
            "type": [
              "object",
              "null"
            ]
          },
          "response_time": {
            "type": "number"
          },
          "status": {
            "enum": [
              "success",
              "error"
            ],
            "type": "string"
          },
          "status_code": {
            "type": "integer"
          },
          "url": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "WebhookUpdateSchema": {
        "additionalProperties": false,
        "properties": {
          "event": {
            "default": null,
            "description": "Event name - three parts separated by '.', wildcards are allowed (e.g., 'qap.*.*')",
            "maxLength": 255,
            "minLength": 3,
            "type": [
              "string",
              "null"
            ]
          },
          "headers": {
            "additionalProperties": {
              "type": "string"
            },
            "default": null,
            "description": "Headers for the webhook",
            "type": [
              "object",
              "null"
            ]
          },
          "is_active": {
            "default": null,
            "description": "Whether the webhook is active",
            "type": [
              "boolean",
              "null"
            ]
          },
          "secret": {
            "default": null,
            "description": "Secret for signing the webhook payload",
            "maxLength": 50,
            "type": [
              "string",
              "null"
            ]
          },
          "url": {
            "default": null,
            "description": "URL of the webhook",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      }
    },
    "securitySchemes": {
      "bearerToken": {
        "bearerFormat": "JWT",
        "description": "Paste an existing access token directly",
        "scheme": "bearer",
        "type": "http"
      },
      "oauth2": {
        "description": "Authenticate with client_id and client_secret",
        "flows": {
          "clientCredentials": {
            "scopes": {},
            "tokenUrl": "/v1/auth/token"
          }
        },
        "type": "oauth2"
      }
    }
  },
  "externalDocs": {
    "description": "API Documentation",
    "url": "https://quantfol.io"
  },
  "info": {
    "contact": {
      "name": "Support Process",
      "url": "https://docs.quantfol.io/support-process"
    },
    "description": "Welcome to Quantfolio's API Documentation! This comprehensive guide is designed to help developers understand, integrate, and effectively utilize the Quantfolio API in their applications. The API provides powerful tools for financial data analysis and investment decision-making, enabling users to harness the full potential of Quantfolio's robust platform.\n",
    "termsOfService": "https://www.quantfol.io/terms-of-service",
    "title": "DeepAlpha Public API (Test)",
    "version": "1.30.0"
  },
  "openapi": "3.1.0",
  "paths": {
    "/v1/advisor": {
      "get": {
        "description": "Permissions required: state, advisor, get",
        "parameters": [
          {
            "description": "Filtering on email",
            "in": "query",
            "name": "email",
            "required": false,
            "schema": {
              "format": "email",
              "type": "string"
            }
          },
          {
            "description": "Filtering on external_id",
            "in": "query",
            "name": "external_id",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StateAdvisorListResponse"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            },
            "description": "Validation error"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "List of active advisors for user",
        "tags": [
          "state"
        ]
      }
    },
    "/v1/advisor/{advisor_id}": {
      "get": {
        "description": "Permissions required: state, advisor/id, delete",
        "parameters": [
          {
            "in": "path",
            "name": "advisor_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StateAdvisorDetailsResponse"
                }
              }
            },
            "description": "Successful response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Not found"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Return requested advisor by specific advisor_id",
        "tags": [
          "state"
        ]
      }
    },
    "/v1/analyze/asset-class-allocation": {
      "post": {
        "parameters": [
          {
            "in": "query",
            "name": "namespace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "description": "Config namespace id",
              "title": "Namespace Id"
            }
          },
          {
            "in": "query",
            "name": "language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "description": "Language code for translation",
              "title": "Language"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AssetClassAllocationSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AssetClassAllocationResponse"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            },
            "description": "Validation error"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Return asset class allocation for the given portfolio",
        "tags": [
          "analyze"
        ]
      }
    },
    "/v1/analyze/cost": {
      "post": {
        "description": "Elements are provided per instrument and aggregated to portfolio level.\nFurther projection into the future is provided, to visualize the effect of total cost on accumulated returns.",
        "parameters": [
          {
            "in": "query",
            "name": "namespace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "description": "Config namespace id",
              "title": "Namespace Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CostPayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CostResponse"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            },
            "description": "Validation error"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Provide all cost element related to saving in a portfolio",
        "tags": [
          "analyze"
        ]
      }
    },
    "/v1/analyze/forecast": {
      "post": {
        "description": "This endpoint takes a portfolio and a saving plan as input. The portfolio is projected forward\nbased in the saving plan (initial amount and monthly contribution).\nExpected risk and return for the portfolio is estimated form historical data.\nEach instrument in the portfolio is mapped to its category benchmark, at this benchmark is used as basis for\ncalculation of expected covariance and expected return.\nFinally, a confidence bound is added around the projection.\nBy default, the confidence bound is based on the model named after Black-Scholes-Merton.",
        "parameters": [
          {
            "in": "query",
            "name": "namespace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "description": "Config namespace id",
              "title": "Namespace Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ForecastV1Payload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            },
            "description": "Validation error"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Project a portfolio into the future.",
        "tags": [
          "analyze"
        ]
      }
    },
    "/v1/analyze/frontier": {
      "get": {
        "description": "Points are evenly spaced along the risk axis (gridded), spanning risk of all model portfolios.\nNumber of point is aligned with number of model portfolios.\nAll model portfolios are provided with risk \u0026 return and mapped to the nearest grid cell.\nIf optional risk and return (for a customer portfolio) is included in the call,\nthis portfolio will be compared to the model portfolio and the nearest model portfolio is returned.\nFurther, the customer portfolio will be aligned with the frontier grid.\nIf the number of model portfolios is n, and the customer portfolio has a higher risk or return\nthan the maximum model portfolio, the grid location will be n+1.\nSimilar, if the customer portfolio has lower risk or return than the lower/left end of the frontier (grid 1),\nthe grid location will be 0.",
        "parameters": [
          {
            "in": "query",
            "name": "namespace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "description": "Config namespace id",
              "title": "Namespace Id"
            }
          },
          {
            "in": "query",
            "name": "risk",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "description": "Expected risk of customer portfolio (in percent 0-100).",
              "title": "Risk"
            }
          },
          {
            "in": "query",
            "name": "return",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "description": "Expected return from customer portfolio (in percent 0-100).",
              "title": "Return"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoboPortfolioFrontierResponse"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            },
            "description": "Validation error"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Evenly spaced points along the (constrained) efficient frontier.",
        "tags": [
          "analyze"
        ]
      }
    },
    "/v1/analyze/historical-return": {
      "post": {
        "description": "This endpoint provides a historical time-series and some key metrics for the portfolio provided in the payload.\nThe portfolio is expressed as a list of id/weight pairs. Weights are assumed to sum to 100.\nThe time series shows (if plotted), how an initial investment of 100 (in quote currency),\nhas evolved until today.\nOptional a saving plan can be provided, and the portfolio value will be re-created according to the plan.\nAlso, portfolio metrics will be affected of the saving plan (monthly contribution).\nIf invalid identifiers (instruments) are provided these will be removed from the portfolio and\na waring will be included in the response. The remaining weights will be scaled to 100.\nIn case where the time series for an instrument do not span last 10 year,\nfor example an instrument with shorter history than 10 year or and instrument that is closed down,\nthis method will extrapolate first and/or last value.",
        "parameters": [
          {
            "in": "query",
            "name": "namespace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "description": "Config namespace id",
              "title": "Namespace Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/HistoricalReturnPayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HistoricalReturnResponse"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            },
            "description": "Validation error"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Historical performance of portfolio last 10 years",
        "tags": [
          "analyze"
        ]
      }
    },
    "/v1/analyze/order-summary": {
      "post": {
        "description": "When providing initial_deposit or monthly_deposit at the portfolio level,\ninstrument weights are required and must sum to 100. The deposit is then\ndistributed across instruments proportionally by weight.\n\nWhen providing deposits at the instrument level, weights are omitted.",
        "parameters": [
          {
            "in": "query",
            "name": "namespace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "description": "Config namespace id",
              "title": "Namespace Id"
            }
          },
          {
            "in": "query",
            "name": "language",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "description": "Language code for translation",
              "title": "Language"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "currency": {
                    "description": "ISO currency code. Default: the tenant's currency.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "purchase_portfolios": {
                    "items": {
                      "additionalProperties": false,
                      "anyOf": [
                        {
                          "required": [
                            "instruments"
                          ]
                        },
                        {
                          "required": [
                            "portfolio"
                          ]
                        }
                      ],
                      "properties": {
                        "initial_deposit": {
                          "description": "One-time amount for the portfolio. Default 0.",
                          "minimum": 0,
                          "type": "number"
                        },
                        "instruments": {
                          "description": "The portfolio's instruments (prod's key).",
                          "items": {
                            "additionalProperties": false,
                            "properties": {
                              "fund_standard_name": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "id": {
                                "description": "Instrument ticker. Give `id` or `isin`, not both.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "initial_deposit": {
                                "description": "One-time amount for this instrument. Default 0.",
                                "minimum": 0,
                                "type": "number"
                              },
                              "isin": {
                                "description": "ISIN (12 characters). Give `id` or `isin`, not both.",
                                "maxLength": 12,
                                "minLength": 12,
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "monthly_deposit": {
                                "description": "Monthly amount for this instrument. Default 0.",
                                "minimum": 0,
                                "type": "number"
                              },
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "weight": {
                                "description": "Weight in percent (0–100).",
                                "maximum": 100,
                                "minimum": 0,
                                "type": [
                                  "number",
                                  "null"
                                ]
                              }
                            },
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "monthly_deposit": {
                          "description": "Monthly amount for the portfolio. Default 0.",
                          "minimum": 0,
                          "type": "number"
                        },
                        "portfolio": {
                          "description": "Alias of `instruments`; send one of the two.",
                          "items": {
                            "additionalProperties": false,
                            "properties": {
                              "fund_standard_name": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "id": {
                                "description": "Instrument ticker. Give `id` or `isin`, not both.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "initial_deposit": {
                                "description": "One-time amount for this instrument. Default 0.",
                                "minimum": 0,
                                "type": "number"
                              },
                              "isin": {
                                "description": "ISIN (12 characters). Give `id` or `isin`, not both.",
                                "maxLength": 12,
                                "minLength": 12,
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "monthly_deposit": {
                                "description": "Monthly amount for this instrument. Default 0.",
                                "minimum": 0,
                                "type": "number"
                              },
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "weight": {
                                "description": "Weight in percent (0–100).",
                                "maximum": 100,
                                "minimum": 0,
                                "type": [
                                  "number",
                                  "null"
                                ]
                              }
                            },
                            "type": "object"
                          },
                          "type": "array"
                        }
                      },
                      "type": "object"
                    },
                    "minItems": 1,
                    "type": "array"
                  }
                },
                "required": [
                  "purchase_portfolios"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderSummaryResponse"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            },
            "description": "Validation error"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Calculate an order summary across multiple portfolios.",
        "tags": [
          "analyze"
        ]
      }
    },
    "/v1/analyze/re-selection": {
      "get": {
        "description": "A Re-selection do not assume anything about risk or optional categories.\nLimitation: incoming tickers must exist in customers universe",
        "parameters": [
          {
            "in": "query",
            "name": "namespace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "description": "Config namespace id",
              "title": "Namespace Id"
            }
          },
          {
            "in": "query",
            "name": "filter",
            "required": true,
            "schema": {
              "description": "Filtering on (ESG), where 1=esg filtering",
              "title": "Filter",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "instruments",
            "required": true,
            "schema": {
              "description": "List of instruments, identified by performance ID",
              "items": {
                "type": "string"
              },
              "title": "Instruments",
              "type": "array"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            },
            "description": "Validation error"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "A reselection checks current instrument holdings against today best ranking of instrument, within same category.",
        "tags": [
          "analyze"
        ]
      }
    },
    "/v1/analyze/risk-return": {
      "post": {
        "description": "This endpoint estimate the expected risk (volatility) and return for a portfolio.\nThe portfolio is given as an input payload, expressed as a list of id and weight pairs.\nThe method use historical data to project the future.",
        "parameters": [
          {
            "in": "query",
            "name": "namespace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "description": "Config namespace id",
              "title": "Namespace Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SimplePortfolioSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RiskReturnResponse"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            },
            "description": "Validation error"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Expected risk and return for a portfolio",
        "tags": [
          "analyze"
        ]
      }
    },
    "/v1/analyze/scoring": {
      "post": {
        "description": "This endpoint provide comparison of an instrument to its benchmark, but also to pairs.\nThe instrument 'score' value is relative to the benchmark. A positive value, indicate a better\nperformance than the benchmark, according to the defined scoring rule.\nThe 'category' statistics, can be used to compare and instrument to its pairs.\nIf the instrument score is higher than the category average, the instrument is performing better than\nthe average pairs.\nThe category min/max and numbers, can also be used to compare the instrument score against\nthe pairs range/distribution.\nBased on comparison against benchmark and pairs, advice is provided.\nIf score is higher than benchmark, advice is given 1 point.\nIf number of pairs is above 5 and the score is higher than the average of its pairs,\nthe advice is increased with 1 point.\nBased on this, the range of outcomes is 0, 1 \u0026 2.",
        "parameters": [
          {
            "in": "query",
            "name": "namespace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "description": "Config namespace id",
              "title": "Namespace Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScoringPayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScoringResponse"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            },
            "description": "Validation error"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Instrument comparison to asset class benchmark and pairs.",
        "tags": [
          "analyze"
        ]
      }
    },
    "/v1/auth/token": {
      "post": {
        "description": "For now only implemented grant_type is `client_credentials`.\nFields for `application` and `tenant_code` might be required depending on the client configuration.\n\nThe expected error_codes for a 401 response is:\n- `CLIENT_AUTHENTICATION_FAILED`\n- `CLIENT_TENANT_NOT_VALID`\n- `CLIENT_APPLICATION_REQUIRED`\n- `CLIENT_APPLICATION_NOT_VALID`\n- `ERROR_TOKEN_GENERATION`",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ClientAuthenticationPayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientAuthenticationResponse"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Unauthorized"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "Enables server-to-server authentication through a different grants.",
        "tags": []
      }
    },
    "/v1/calculator/simple": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "namespace_id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "horizon_in_years",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "holding",
            "required": false,
            "schema": {
              "type": "number"
            }
          },
          {
            "in": "query",
            "name": "inflation",
            "required": false,
            "schema": {
              "type": "number"
            }
          },
          {
            "in": "query",
            "name": "bank_return",
            "required": false,
            "schema": {
              "type": "number"
            }
          },
          {
            "in": "query",
            "name": "return",
            "required": false,
            "schema": {
              "type": "number"
            }
          },
          {
            "in": "query",
            "name": "saving",
            "required": false,
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "projection": {
                      "description": "One row per month-end: an all-zero first row, then the holding after each monthly deposit.",
                      "items": {
                        "properties": {
                          "accum_deposit": {
                            "type": "number"
                          },
                          "accum_returns": {
                            "type": "number"
                          },
                          "accum_returns_bank": {
                            "type": "number"
                          },
                          "date": {
                            "description": "Month-end date (YYYY-MM-DD).",
                            "type": "string"
                          },
                          "total_bank": {
                            "type": "number"
                          },
                          "total_value": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "date",
                          "accum_deposit",
                          "accum_returns",
                          "total_value",
                          "accum_returns_bank",
                          "total_bank"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "projection"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            },
            "description": "Validation error"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Forecast a monthly series based on deposits",
        "tags": [
          "analyze"
        ]
      }
    },
    "/v1/categories/all": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "namespace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "description": "Config namespace id",
              "title": "Namespace Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "Categories": {
                      "items": {
                        "properties": {
                          "CategoryId": {
                            "description": "Category reference code, e.g. `C680`.",
                            "type": "string"
                          },
                          "CategoryName": {
                            "type": "string"
                          },
                          "EquityShare": {
                            "description": "Equity share as a fraction (0–1).",
                            "type": "number"
                          },
                          "MainAssetClass": {
                            "type": "string"
                          },
                          "PortfolioRole": {
                            "type": "string"
                          },
                          "SubAssetClass": {
                            "type": "string"
                          },
                          "VisibleCustomPortfolio": {
                            "type": "boolean"
                          }
                        },
                        "type": "object"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "Categories"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            },
            "description": "Validation error"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Get all AdvisoryConfigCategories for a namespace",
        "tags": [
          "info"
        ]
      }
    },
    "/v1/categories/base": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "namespace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "description": "Config namespace id",
              "title": "Namespace Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "Categories": {
                      "items": {
                        "properties": {
                          "CategoryId": {
                            "description": "Category reference code, e.g. `C680`.",
                            "type": "string"
                          },
                          "CategoryName": {
                            "type": "string"
                          },
                          "EquityShare": {
                            "description": "Equity share as a fraction (0–1).",
                            "type": "number"
                          },
                          "MainAssetClass": {
                            "type": "string"
                          },
                          "PortfolioRole": {
                            "type": "string"
                          },
                          "SubAssetClass": {
                            "type": "string"
                          },
                          "VisibleCustomPortfolio": {
                            "type": "boolean"
                          }
                        },
                        "type": "object"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "Categories"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            },
            "description": "Validation error"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Get all AdvisoryConfigCategories for a namespace",
        "tags": [
          "info"
        ]
      }
    },
    "/v1/deleted/investor/{investor_id}": {
      "delete": {
        "description": "Permissions required: state, deleted/investor/investor_id, delete\nDeleting investor without possibility to restore it. Required soft delete.",
        "parameters": [
          {
            "in": "path",
            "name": "investor_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            },
            "description": "Validation error"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Not found"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Allow hard deleting investor by UUID for user",
        "tags": [
          "state"
        ]
      }
    },
    "/v1/deleted/investors/bulk_delete": {
      "delete": {
        "description": "Permissions required: state, deleted/company/:bulk_delete, delete\nDeleting companies, without possibility to restore it. Required soft delete.",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BulkStateInvestorsPayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            },
            "description": "Validation error"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Allow hard deleting investors by UUID for user",
        "tags": [
          "state"
        ]
      }
    },
    "/v1/deleted/session/{session_id}": {
      "delete": {
        "description": "Permissions required: state, deleted/session/session_id, delete\nDeleting session without possibility to restore it. Required soft delete.",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Not found"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Allow hard deleting session by UUID",
        "tags": [
          "state"
        ]
      }
    },
    "/v1/deleted/sessions/bulk_delete": {
      "delete": {
        "description": "Permissions required: state, deleted/sessions/:bulk_delete, delete\nDeleting sessions, without possibility to restore it. Required soft delete.",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BulkStateSessionPayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            },
            "description": "Validation error"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Allow hard deleting sessions",
        "tags": [
          "state"
        ]
      }
    },
    "/v1/event/": {
      "get": {
        "description": "Returns a list of all possible QAP events with their names and descriptions. These events can be used for webhooks and audit logging.",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventListResponseSchema"
                }
              }
            },
            "description": "Successful response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "List available events",
        "tags": [
          "webhooks"
        ]
      }
    },
    "/v1/fund/list/": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "namespace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "description": "Config namespace id",
              "title": "Namespace Id"
            }
          },
          {
            "in": "query",
            "name": "filter",
            "required": false,
            "schema": {
              "default": 1,
              "description": "Filtering on eligible, where 1=only eligible",
              "title": "Filter",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "category",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "description": "Category to filter (reference code, e.g. `C04`)",
              "title": "Category"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FundListResponse"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            },
            "description": "Validation error"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "List all available funds",
        "tags": [
          "info"
        ]
      }
    },
    "/v1/fund/meta/{ticker}": {
      "get": {
        "description": "This endpoint give meta data for a given instrument",
        "parameters": [
          {
            "in": "path",
            "name": "ticker",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FundMetaResponse"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            },
            "description": "Validation error"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Ticker not in the universe, or no metadata found"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Get metadata for a given instrument.",
        "tags": [
          "info"
        ]
      }
    },
    "/v1/investor": {
      "get": {
        "description": "Permissions required: state, investor, get\nReturn list of active investors, can be filtered by advisor UUID or external ID\nSupports pagination with page and pageSize parameters\nSupports partial name search with query_name parameter (case-insensitive)",
        "parameters": [
          {
            "description": "Filtering on external_id",
            "in": "query",
            "name": "externalId",
            "required": false,
            "schema": {
              "default": "",
              "type": "string"
            }
          },
          {
            "description": "Filtering on advisor_id",
            "in": "query",
            "name": "advisorId",
            "required": false,
            "schema": {
              "default": "",
              "type": "string"
            }
          },
          {
            "description": "Page number for pagination (1-based)",
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Number of items per page",
            "in": "query",
            "name": "pageSize",
            "required": false,
            "schema": {
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Partial investor name search (case-insensitive)",
            "in": "query",
            "name": "queryName",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StateInvestorListOutputArray"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            },
            "description": "Validation error"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Not Found"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "List of active investors for tenants's advisor",
        "tags": [
          "state"
        ]
      },
      "post": {
        "description": "Permissions required: state, investor, post\nNew company will be created, only one investor can be created per request",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StateInvestorPayload"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StateInvestorOutput"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            },
            "description": "Validation error"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Allow creating new investor for user's advisor",
        "tags": [
          "state"
        ]
      }
    },
    "/v1/investor/deleted": {
      "get": {
        "description": "Permissions required: state, deleted/investor, get",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeletedInvestorOutputArray"
                }
              }
            },
            "description": "Successful response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Return deleted investors for tenant",
        "tags": [
          "state"
        ]
      }
    },
    "/v1/investor/search": {
      "post": {
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InvestorSearchPayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvestorSearchResponse"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            },
            "description": "Validation error"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Return list of investors by the given identifier",
        "tags": [
          "state"
        ]
      }
    },
    "/v1/investor/{investor_id}": {
      "delete": {
        "description": "Permissions required: state, investor/id, delete",
        "parameters": [
          {
            "in": "path",
            "name": "investor_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StateInvestorOutput"
                }
              }
            },
            "description": "Successful response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Not found"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Allow deleting investor by UUID for user",
        "tags": [
          "state"
        ]
      },
      "get": {
        "description": "Permissions required: state, investor/id, get",
        "parameters": [
          {
            "in": "path",
            "name": "investor_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StateInvestorOutput"
                }
              }
            },
            "description": "Successful response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Not found"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Return active investor by UUID for advisor",
        "tags": [
          "state"
        ]
      },
      "patch": {
        "description": "Permissions required: state, investor/id, patch\nCompany that already exist will be changed",
        "parameters": [
          {
            "in": "path",
            "name": "investor_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateStateInvestorPayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StateInvestorOutput"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            },
            "description": "Validation error"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Not found"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Allow updating existing investor by UUID for investor",
        "tags": [
          "state"
        ]
      }
    },
    "/v1/investor/{investor_id}/account/{account_id}": {
      "delete": {
        "description": "Permissions required: state, account/id, delete\nDeleting account without possibility to restore it.",
        "parameters": [
          {
            "in": "path",
            "name": "investor_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "account_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Not found"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Allow hard deleting account by UUID for investor",
        "tags": [
          "state"
        ]
      },
      "get": {
        "description": "Permissions required: state, account/id, delete\nDeleting account without possibility to restore it.",
        "parameters": [
          {
            "in": "path",
            "name": "investor_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "account_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountOutput"
                }
              }
            },
            "description": "Successful response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Not found"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Allow hard deleting account by UUID for investor",
        "tags": [
          "state"
        ]
      },
      "patch": {
        "description": "Permissions required: state, account/id, patch\nAccount that already exist will be changed",
        "parameters": [
          {
            "in": "path",
            "name": "investor_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "account_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AccountPayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountOutput"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            },
            "description": "Validation error"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Not found"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Allow updating existing account by UUID for user",
        "tags": [
          "state"
        ]
      }
    },
    "/v1/investor/{investor_id}/accounts": {
      "get": {
        "description": "Permissions required: state, investor_accounts, get\nReturn list of investor accounts",
        "parameters": [
          {
            "in": "path",
            "name": "investor_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountOutputArray"
                }
              }
            },
            "description": "Successful response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Not found"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "List of investor accounts",
        "tags": [
          "state"
        ]
      },
      "post": {
        "description": "Permissions required: state, account, post\nNew investor account will be created, only one account can be created per request",
        "parameters": [
          {
            "in": "path",
            "name": "investor_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AccountPayload"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountOutput"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            },
            "description": "Validation error"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Not found"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Allow creating new account for investor",
        "tags": [
          "state"
        ]
      }
    },
    "/v1/products/attachment": {
      "get": {
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Lists all available KIID documents under the current customer scope",
        "tags": [
          "documents"
        ]
      },
      "post": {
        "parameters": [],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/FileUploadSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            },
            "description": "Validation error"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Lists all available KIID documents under the current customer scope",
        "tags": [
          "documents"
        ]
      }
    },
    "/v1/products/timeseries": {
      "get": {
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomProductsListResponse"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            },
            "description": "Validation error"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "List custom products with pagination and search support.",
        "tags": [
          "timeseries"
        ]
      },
      "post": {
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomDataAndMetaSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomDataAndMetaSchema"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            },
            "description": "Validation error"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Post CustomProduct",
        "tags": [
          "timeseries"
        ]
      }
    },
    "/v1/products/timeseries/{ticker}": {
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "ticker",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomDataAndMetaSchema"
                }
              }
            },
            "description": "Successful response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Not found"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Get CustomProductDetails",
        "tags": [
          "timeseries"
        ]
      },
      "patch": {
        "parameters": [
          {
            "in": "path",
            "name": "ticker",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomDataAndMetaUpdateSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomDataAndMetaSchema"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            },
            "description": "Validation error"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Not found"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Patch CustomProductDetails",
        "tags": [
          "timeseries"
        ]
      }
    },
    "/v1/report/{investor_id}/{session_id}": {
      "get": {
        "description": "Permissions required: state, pdf_report, get",
        "parameters": [
          {
            "in": "path",
            "name": "investor_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportFileMetaListSchema"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            },
            "description": "Validation error"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Not found"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Return session report files metadata",
        "tags": [
          "state"
        ]
      }
    },
    "/v1/report/{investor_id}/{session_id}/download": {
      "post": {
        "description": "Permissions required: state, pdf_report, post\nReport files will be downloaded and merged and returned as one pdf file",
        "parameters": [
          {
            "in": "path",
            "name": "investor_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DownloadReportInputSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            },
            "description": "Validation error"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Not found"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Allow download selected report files",
        "tags": [
          "state"
        ]
      }
    },
    "/v1/risk/generic/": {
      "get": {
        "description": "The objective of this endpoint is to place a customer into the correct risk category.\nThis is initially done based on the (saving) horizon and risk willingness (Question 1, 2 \u0026 3).\nThe selected risk category can be adjusted upwards and downwards, dependent on results of answers from\n question 4 - 7.\nQuestion 4 \u0026 5 relate to initial risk assessment.\nQuestion 6 \u0026 7 are used in combination.\nSee endpoint /risk/generic/meta/ for allowed input values.\nA higher value will result in a higher risk classification. This is a convention.",
        "parameters": [
          {
            "in": "query",
            "name": "horizon",
            "required": true,
            "schema": {
              "description": "Horizon",
              "maximum": 35,
              "minimum": 1,
              "title": "Horizon",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "risk1",
            "required": true,
            "schema": {
              "description": "Risk 1",
              "maximum": 5,
              "minimum": 1,
              "title": "Risk1",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "risk2",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maximum": 5,
                  "minimum": 1,
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "description": "Risk 2",
              "title": "Risk2"
            }
          },
          {
            "in": "query",
            "name": "experience",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maximum": 5,
                  "minimum": 1,
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "description": "Experience",
              "title": "Experience"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "risk": {
                      "description": "Risk class, e.g. `R03`.",
                      "type": "string"
                    }
                  },
                  "required": [
                    "risk"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            },
            "description": "Validation error"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Quantfolio default risk classification model",
        "tags": [
          "risk"
        ]
      }
    },
    "/v1/risk/generic/config/": {
      "get": {
        "description": "This endpoint expose the configuration of the risk model. This consist of a set of matrix and vectors.\nThe dimensions of the matrix and vectors align with the input parameter space used in endpoint risk/generic.\nJSON is not a good language for expressing matrix. Our convention is that each row as a key 'r:int'\nand the values of that row as an array (list).\n(Each row must have identical length to be able to construct a matrix.)",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            },
            "description": "Validation error"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Risk model content exposure",
        "tags": [
          "risk"
        ]
      }
    },
    "/v1/risk/generic/meta/": {
      "get": {
        "description": "This endpoint returns the allowed input to be used in the risk mapping endpoint.\nA higher value will result in a higher risk classification.",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            },
            "description": "Validation error"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Allowed input values for risk assessment",
        "tags": [
          "risk"
        ]
      }
    },
    "/v1/robo/portfolio": {
      "get": {
        "description": "A Portfolio is a weighted combination of asset categories. The weight should sum to 100%.\nBased on input parameters, an optimal portfolio is constructed, maximum return for a given risk.\nNB!!\nThe Swagger documentation is statically generated and do not have access to customer specific configuration,\nso the allowed option may / will differ from this documentation.\nYou will get a 400 response if your input parameters is outside allowed value form configuration.\nUse endpoint \"categories\" to get list of allowed parameter input.",
        "parameters": [
          {
            "in": "query",
            "name": "namespace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "description": "Config namespace id",
              "title": "Namespace Id"
            }
          },
          {
            "in": "query",
            "name": "risk_tolerance",
            "required": true,
            "schema": {
              "description": "Risk willingness, where R01 is the lowest risk, and R40 the highest.",
              "pattern": "^R(0[1-9]|[1-3][0-9]|40)$",
              "title": "Risk Tolerance",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "optionals",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "description": "Optionals. Example C08. Available values: C1-C9999 and c1-c9999 (depending on configuration)",
              "title": "Optionals"
            }
          },
          {
            "in": "query",
            "name": "precision",
            "required": false,
            "schema": {
              "default": 0,
              "description": "Precision (number of decimals in weights). Example 1. Available values: 0-3",
              "title": "Precision",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PortfolioResponse"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            },
            "description": "Validation error"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Markowitz portfolio construction.",
        "tags": [
          "robo"
        ]
      }
    },
    "/v1/robo/portfolio/meta": {
      "get": {
        "description": "This endpoint returns allowed input values for endpoint portfolio construction.\nA list with allowed risk classes and allowed optionals categories is returned.",
        "parameters": [
          {
            "description": "Config namespace id",
            "in": "query",
            "name": "namespace_id",
            "required": false,
            "schema": {
              "default": null,
              "type": [
                "integer",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            },
            "description": "Validation error"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Allowed options for robo/portfolio endpoint",
        "tags": [
          "robo"
        ]
      }
    },
    "/v1/robo/selection": {
      "get": {
        "description": "If input variable categories is None (empty) a selection is provided for each category in the configuration.",
        "parameters": [
          {
            "in": "query",
            "name": "namespace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "description": "Config namespace id",
              "title": "Namespace Id"
            }
          },
          {
            "in": "query",
            "name": "categories",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "description": "Categories. Example C08. Available values: C1-C9999 and c1-c9999 (depending on configuration)",
              "title": "Categories"
            }
          },
          {
            "in": "query",
            "name": "filter",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "items": {
                    "type": "integer"
                  },
                  "type": "array"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "description": "Filtering universe to a specified subset. Value and meaning is custom defined. Multi-select is possible.",
              "title": "Filter"
            }
          },
          {
            "in": "query",
            "name": "no_instruments",
            "required": false,
            "schema": {
              "default": 1,
              "description": "Number of instruments per category",
              "title": "No Instruments",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "Selection": {
                      "items": {
                        "properties": {
                          "CategoryId": {
                            "description": "Category reference code, e.g. `C680`.",
                            "type": "string"
                          },
                          "Instruments": {
                            "items": {
                              "properties": {
                                "Filter": {
                                  "type": "integer"
                                },
                                "ISIN": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "Rank": {
                                  "description": "Rank within the category, as a string.",
                                  "type": "string"
                                },
                                "Ticker": {
                                  "type": "string"
                                }
                              },
                              "type": "object"
                            },
                            "type": "array"
                          }
                        },
                        "type": "object"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "Selection"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            },
            "description": "Validation error"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Selection within multiple categories.",
        "tags": [
          "robo"
        ]
      }
    },
    "/v1/robo/selection/meta": {
      "get": {
        "parameters": [
          {
            "description": "Config namespace id",
            "in": "query",
            "name": "namespace_id",
            "required": false,
            "schema": {
              "default": null,
              "type": [
                "integer",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            },
            "description": "Validation error"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Allowed options for robo/selection endpoint",
        "tags": [
          "robo"
        ]
      }
    },
    "/v1/session": {
      "get": {
        "parameters": [
          {
            "description": "From (including) created_at date",
            "in": "query",
            "name": "created_at_from",
            "required": false,
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "description": "To (excluding) created_at date",
            "in": "query",
            "name": "created_at_to",
            "required": false,
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "description": "From (including) updated_at date",
            "in": "query",
            "name": "updated_at_from",
            "required": false,
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "description": "To (excluding) updated_at date",
            "in": "query",
            "name": "updated_at_to",
            "required": false,
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "description": "From (including) completed_at date",
            "in": "query",
            "name": "completed_at_from",
            "required": false,
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "description": "To (excluding) completed_at date",
            "in": "query",
            "name": "completed_at_to",
            "required": false,
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "description": "Session status open/complete",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "enum": [
                "open",
                "complete"
              ],
              "type": "string"
            }
          },
          {
            "description": "Investor id",
            "in": "query",
            "name": "investor_id",
            "required": false,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Advisor id",
            "in": "query",
            "name": "advisor_id",
            "required": false,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "per_page",
            "required": false,
            "schema": {
              "maximum": 20,
              "minimum": 1,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdviceListResponse"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            },
            "description": "Validation error"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Return complete information about advices (state sessions)",
        "tags": [
          "state"
        ]
      }
    },
    "/v1/session/{advice_id}": {
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "advice_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdviceResponse"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            },
            "description": "Validation error"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Not found"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Return complete information about the given advice (state session)",
        "tags": [
          "state"
        ]
      },
      "patch": {
        "parameters": [
          {
            "in": "path",
            "name": "advice_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateSessionStatusPayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdviceResponse"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            },
            "description": "Validation error"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Not found"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Update parameters of the given advice (state session)",
        "tags": [
          "state"
        ]
      }
    },
    "/v1/session/{session_id}": {
      "delete": {
        "description": "Permissions required: state, session/id, delete",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Not found"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Allow deleting session",
        "tags": [
          "state"
        ]
      }
    },
    "/v1/session/{session_id}/:reopen": {
      "put": {
        "description": "Permissions required: state, session/id/:reopen, put\nA session in a terminal status (complete) is set back to open.",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Not found"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Allow reopening a closed session",
        "tags": [
          "state"
        ]
      }
    },
    "/v1/session/{session_id}/copy": {
      "post": {
        "description": "Permissions required: state, session/id/copy, post",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StateSessionCreateResponse"
                }
              }
            },
            "description": "Successful response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Not found"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Allow copying existing session",
        "tags": [
          "state"
        ]
      }
    },
    "/v1/session/{session_id}/goal": {
      "get": {
        "description": "Permissions required: state, session_goal, get",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StateSessionGoalListResponse"
                }
              }
            },
            "description": "Successful response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Not found"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Return state session goals",
        "tags": [
          "state"
        ]
      },
      "post": {
        "description": "Permissions required: state, session_goal, post\nNew session goal will be created, only one goal can be created per request",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateStateSessionGoalPayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            },
            "description": "Validation error"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Not found"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Allow creating new session goal",
        "tags": [
          "state"
        ]
      }
    },
    "/v1/session/{session_id}/goal/{goal_id}": {
      "delete": {
        "description": "Permissions required: state, session_goal, delete",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "goal_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Not found"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Allow deleting session goal",
        "tags": [
          "state"
        ]
      },
      "get": {
        "description": "Permissions required: state, session_goal, delete",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "goal_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StateSessionGoalDetailsResponse"
                }
              }
            },
            "description": "Successful response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Not found"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Allow deleting session goal",
        "tags": [
          "state"
        ]
      },
      "patch": {
        "description": "Permissions required: state, session_goal, put\nSession goal that already exist will be changed",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "goal_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BaseStateSessionGoalPayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            },
            "description": "Validation error"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Not found"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Allow updating existing session goal",
        "tags": [
          "state"
        ]
      }
    },
    "/v1/state_session": {
      "post": {
        "description": "Permissions required: state, session, post\nNew session will be created, only one session can be created per request",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateStateSessionPayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StateSessionCreateResponse"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            },
            "description": "Validation error"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Allow creating new session",
        "tags": [
          "state"
        ]
      }
    },
    "/v1/webhook": {
      "get": {
        "description": "Get all webhooks for the current tenant or global webhooks",
        "parameters": [
          {
            "description": "Page number (1-based)",
            "in": "query",
            "name": "page[number]",
            "required": false,
            "schema": {
              "default": 1,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Number of items per page (1-100)",
            "in": "query",
            "name": "page[size]",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookListResponseSchema"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            },
            "description": "Validation error"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "List webhooks",
        "tags": [
          "webhooks"
        ]
      },
      "post": {
        "description": "Create a new webhook",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookCreateSchema"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookResponseSchema1"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            },
            "description": "Validation error"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Create webhook",
        "tags": [
          "webhooks"
        ]
      }
    },
    "/v1/webhook/{webhook_id}": {
      "delete": {
        "description": "Delete a webhook",
        "parameters": [
          {
            "in": "path",
            "name": "webhook_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Not found"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Delete webhook",
        "tags": [
          "webhooks"
        ]
      },
      "get": {
        "description": "Get a specific webhook by ID",
        "parameters": [
          {
            "in": "path",
            "name": "webhook_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookResponseSchema1"
                }
              }
            },
            "description": "Successful response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Not found"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Get webhook",
        "tags": [
          "webhooks"
        ]
      },
      "patch": {
        "description": "Update an existing webhook",
        "parameters": [
          {
            "in": "path",
            "name": "webhook_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookUpdateSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookResponseSchema1"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            },
            "description": "Validation error"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Not found"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Update webhook",
        "tags": [
          "webhooks"
        ]
      }
    },
    "/v1/webhook/{webhook_id}/test": {
      "post": {
        "description": "Send a test message to a webhook",
        "parameters": [
          {
            "in": "path",
            "name": "webhook_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookTestResponseSchema"
                }
              }
            },
            "description": "Successful response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Not found"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Test webhook",
        "tags": [
          "webhooks"
        ]
      }
    },
    "/v2/advice_session": {
      "get": {
        "parameters": [
          {
            "description": "Filter sessions created after this date (ISO 8601)",
            "in": "query",
            "name": "filter[created_at][from]",
            "required": false,
            "schema": {
              "default": null,
              "format": "date-time",
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "description": "Filter sessions created before this date (ISO 8601)",
            "in": "query",
            "name": "filter[created_at][to]",
            "required": false,
            "schema": {
              "default": null,
              "format": "date-time",
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "description": "Filter sessions updated after this date (ISO 8601)",
            "in": "query",
            "name": "filter[updated_at][from]",
            "required": false,
            "schema": {
              "default": null,
              "format": "date-time",
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "description": "Filter sessions updated before this date (ISO 8601)",
            "in": "query",
            "name": "filter[updated_at][to]",
            "required": false,
            "schema": {
              "default": null,
              "format": "date-time",
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "description": "Filter sessions completed after this date (ISO 8601)",
            "in": "query",
            "name": "filter[completed_at][from]",
            "required": false,
            "schema": {
              "default": null,
              "format": "date-time",
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "description": "Filter sessions completed before this date (ISO 8601)",
            "in": "query",
            "name": "filter[completed_at][to]",
            "required": false,
            "schema": {
              "default": null,
              "format": "date-time",
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "description": "Filter by session status",
            "in": "query",
            "name": "filter[status]",
            "required": false,
            "schema": {
              "default": null,
              "enum": [
                "open",
                "complete"
              ],
              "type": "string"
            }
          },
          {
            "description": "Filter by external status",
            "in": "query",
            "name": "filter[external_status]",
            "required": false,
            "schema": {
              "default": null,
              "maxLength": 30,
              "type": "string"
            }
          },
          {
            "description": "Filter by signature status",
            "in": "query",
            "name": "filter[signature_status]",
            "required": false,
            "schema": {
              "default": null,
              "enum": [
                "waiting",
                "signed",
                "declined"
              ],
              "type": "string"
            }
          },
          {
            "description": "Filter by investor ID",
            "in": "query",
            "name": "filter[investor_id]",
            "required": false,
            "schema": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "description": "Filter by advisor ID",
            "in": "query",
            "name": "filter[advisor_id]",
            "required": false,
            "schema": {
              "default": null,
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "description": "Page number (1-based)",
            "in": "query",
            "name": "page[number]",
            "required": false,
            "schema": {
              "default": 1,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Number of items per page (1-100)",
            "in": "query",
            "name": "page[size]",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "properties": {
                          "advisor_id": {
                            "type": "string"
                          },
                          "channel": {
                            "type": "string"
                          },
                          "completed_at": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "created_at": {
                            "type": "string"
                          },
                          "external_status": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "id": {
                            "type": "string"
                          },
                          "investor_id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "signature_status": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "status": {
                            "type": "string"
                          },
                          "updated_at": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "advisor_id",
                          "investor_id",
                          "channel",
                          "name",
                          "status",
                          "updated_at",
                          "created_at"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "meta": {
                      "properties": {
                        "advisors": {
                          "items": {
                            "properties": {
                              "email": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "external_id": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "name"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        }
                      },
                      "required": [
                        "advisors"
                      ],
                      "type": "object"
                    },
                    "pagination": {
                      "properties": {
                        "page": {
                          "type": "integer"
                        },
                        "page_size": {
                          "type": "integer"
                        },
                        "total_count": {
                          "type": "integer"
                        },
                        "total_pages": {
                          "type": "integer"
                        }
                      },
                      "required": [
                        "page",
                        "page_size",
                        "total_count",
                        "total_pages"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "data",
                    "meta",
                    "pagination"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Successful response",
            "headers": {}
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            },
            "description": "Validation error"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "[BETA] Get a paginated list of advice sessions with filtering support",
        "tags": [
          "advice_session"
        ]
      },
      "post": {
        "description": "Choose the `advice_type` to set the regulatory track for the session:\n        \n- `mifid` — MiFID II investment advice: a full, personalised\n        suitability assessment (purpose, risk, knowledge \u0026 experience, financial\n        situation, sustainability) before a recommendation is given.\n        \n- `order_execution` — order execution only: the investor places trades\n        without a suitability assessment or personal recommendation.",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SessionCreateRequestSchemaV2"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionCreateDocumentSchemaV2"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            },
            "description": "Validation error"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "[BETA] Start a new advice session for an existing investor.",
        "tags": [
          "advice_session"
        ]
      }
    },
    "/v2/advice_session/{session_id}": {
      "get": {
        "description": "Important note(s) about the response:\n        \nThe `links` field contains URLs to different sections of the advice session.\n        \nThe `advisor_notes` field contains advisor notes for each section.",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "properties": {
                        "advisor_id": {
                          "type": "string"
                        },
                        "advisor_notes": {
                          "additionalProperties": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "description": "Advisor notes per section.",
                          "type": "object"
                        },
                        "channel": {
                          "type": "string"
                        },
                        "completed_at": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "created_at": {
                          "type": "string"
                        },
                        "external_status": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "external_status_log": {
                          "items": {
                            "properties": {
                              "date_time": {
                                "type": "string"
                              },
                              "from_status": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "to_status": {
                                "type": "string"
                              }
                            },
                            "type": "object"
                          },
                          "type": [
                            "array",
                            "null"
                          ]
                        },
                        "id": {
                          "type": "string"
                        },
                        "investor_id": {
                          "type": "string"
                        },
                        "links": {
                          "additionalProperties": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "description": "Advisor notes per section.",
                          "type": "object"
                        },
                        "name": {
                          "type": "string"
                        },
                        "signature_status": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "status": {
                          "type": "string"
                        },
                        "survey_status": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "updated_at": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "advisor_id",
                        "investor_id",
                        "channel",
                        "name",
                        "status",
                        "updated_at",
                        "created_at",
                        "links",
                        "advisor_notes"
                      ],
                      "type": "object"
                    },
                    "meta": {
                      "properties": {
                        "advisor": {
                          "properties": {
                            "email": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "external_id": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "id": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "investor_company": {
                          "description": "The investor, when a company.",
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "investor_person": {
                          "description": "The investor, when a person.",
                          "type": [
                            "object",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "advisor"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Not found"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "[BETA] Retrieve basic information for a specific advice session",
        "tags": [
          "advice_session"
        ]
      },
      "patch": {
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SessionPatchRequestSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "properties": {
                        "advisor_id": {
                          "type": "string"
                        },
                        "advisor_notes": {
                          "additionalProperties": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "description": "Advisor notes per section.",
                          "type": "object"
                        },
                        "channel": {
                          "type": "string"
                        },
                        "completed_at": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "created_at": {
                          "type": "string"
                        },
                        "external_status": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "external_status_log": {
                          "items": {
                            "properties": {
                              "date_time": {
                                "type": "string"
                              },
                              "from_status": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "to_status": {
                                "type": "string"
                              }
                            },
                            "type": "object"
                          },
                          "type": [
                            "array",
                            "null"
                          ]
                        },
                        "id": {
                          "type": "string"
                        },
                        "investor_id": {
                          "type": "string"
                        },
                        "links": {
                          "additionalProperties": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "description": "Advisor notes per section.",
                          "type": "object"
                        },
                        "name": {
                          "type": "string"
                        },
                        "signature_status": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "status": {
                          "type": "string"
                        },
                        "survey_status": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "updated_at": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "advisor_id",
                        "investor_id",
                        "channel",
                        "name",
                        "status",
                        "updated_at",
                        "created_at",
                        "links",
                        "advisor_notes"
                      ],
                      "type": "object"
                    },
                    "meta": {
                      "properties": {
                        "advisor": {
                          "properties": {
                            "email": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "external_id": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "id": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "investor_company": {
                          "description": "The investor, when a company.",
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "investor_person": {
                          "description": "The investor, when a person.",
                          "type": [
                            "object",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "advisor"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            },
            "description": "Validation error"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Not found"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "[BETA] Patch AdviceSession",
        "tags": [
          "advice_session"
        ]
      }
    },
    "/v2/advice_session/{session_id}/advanced_suitability": {
      "get": {
        "description": "`data` holds the stored answers (`answers[table][check] = optionId`) and\n        the per-check `checks_training` acknowledgements. `meta` describes the\n        enabled tables and their selectable options plus the `checks` (rows) — the\n        latter fetched from the external advanced-suitability config and labelled\n        from the tenant's `checksTranslations`.\n        \nWhen the feature is disabled for the tenant, `meta.enabled` is `false`\n        and `meta.tables`/`meta.checks` are empty (stored answers are still\n        echoed).",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Language to fetch the data for (defaults to English if not selected)",
            "in": "query",
            "name": "language",
            "required": false,
            "schema": {
              "default": null,
              "enum": [
                "no",
                "da",
                "de",
                "en",
                "fi",
                "nl",
                "sv"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdvancedSuitabilityReadDocumentSchemaV2"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            },
            "description": "Validation error"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Not found"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "[BETA] Read the advanced-suitability sub-resource for an advice session.",
        "tags": [
          "advice_session"
        ]
      },
      "put": {
        "description": "`answers` maps each table name to `{checkId: optionId}`. Only the five\n        known tables (knowledge, experience, tradingAmount, custom1, custom2) are\n        persisted; any other key is silently ignored so a caller cannot clobber\n        sibling top-level keys inside `advisorInput`. `checks_training` maps each\n        checkId to a training-completed boolean. Both surfaces are replaced\n        wholesale while unrelated `advisorInput` keys are preserved.\n        \nRejected with `400` when the session is already completed.",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdvancedSuitabilityPutSchemaV21"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdvancedSuitabilityPutDocumentSchemaV2"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            },
            "description": "Validation error"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Not found"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "[BETA] Replace the advanced-suitability answers and training acknowledgements.",
        "tags": [
          "advice_session"
        ]
      }
    },
    "/v2/advice_session/{session_id}/advanced_suitability/status": {
      "get": {
        "description": "Builds the per-check inputs from the session's `suitability` answers and\n        the investor's classification, then calls the external Advisory API to\n        determine, per product, whether it is suitable (with per-check scores and\n        thresholds).\n        \nRejected with `400` when advanced suitability is not enabled for the\n        tenant or the investor classification is invalid; upstream errors from the\n        Advisory API are surfaced with their original status code.",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Language to fetch the data for (defaults to English if not selected)",
            "in": "query",
            "name": "language",
            "required": false,
            "schema": {
              "default": null,
              "enum": [
                "no",
                "da",
                "de",
                "en",
                "fi",
                "nl",
                "sv"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdvancedSuitabilityStatusDocumentSchemaV2"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            },
            "description": "Validation error"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Not found"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "[BETA] Compute the advanced-suitability result for the session's stored answers.",
        "tags": [
          "advice_session"
        ]
      }
    },
    "/v2/advice_session/{session_id}/advice_information": {
      "get": {
        "description": "`data` holds the user-editable answers (`{code, value}`); `meta.fields` describes\n        each field's structure and selectable `options`. Derived values (`answered`, the\n        resolved option label) are omitted — compute them from `value` + `meta.fields[].options`.\n        \nFor `checkboxes` fields, `value` is a list. Conditional free-text follow-ups (an\n        option's `text_field`, e.g. `meetingPlaceOther`) appear as their own field carrying\n        `depends_on`.",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Language to fetch the data for (defaults to English if not selected)",
            "in": "query",
            "name": "language",
            "required": false,
            "schema": {
              "default": null,
              "enum": [
                "no",
                "da",
                "de",
                "en",
                "fi",
                "nl",
                "sv"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionAdviceResponseSchemaV2"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            },
            "description": "Validation error"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Not found"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "[BETA] Retrieve advice information for a specific advice session.",
        "tags": [
          "advice_session"
        ]
      },
      "patch": {
        "description": "`fields` is merged into stored state at `advisorInput.adviceInformation`:\n        field codes present overwrite, absent codes keep their stored value, and a\n        code sent as null is stored as null (cleared). Omitting `fields` leaves\n        stored answers unchanged; `advisor_notes` is updated only when present.\n        Sibling keys and other namespaces inside `advisorInput` are preserved.\n\n        Submitted values for configured choice fields are validated against their options;\n        an invalid option code returns 400.\n\n        The request mirrors the GET `data` shape; the response is a data-only echo of the\n        merged state (`{data: {answers, advisor_notes}}`), without the `meta` block.",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdviceInformationUpdateSchemaV2"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdviceInformationDocumentSchemaV2"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            },
            "description": "Validation error"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Not found"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "[BETA] Partially update the advice-information answers for an advice session.",
        "tags": [
          "advice_session"
        ]
      }
    },
    "/v2/advice_session/{session_id}/financial_situation": {
      "get": {
        "description": "A session has a single investor type, so the matching block (person or\n        company) is returned under `data.financial_situation` (null if unset), with the\n        advisor notes. `meta.groups` describes the configured fields for that investor type\n        (sections, labels, input types, required-ness, and any conditional `depends_on`).",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Language to fetch the data for (defaults to English if not selected)",
            "in": "query",
            "name": "language",
            "required": false,
            "schema": {
              "default": null,
              "enum": [
                "no",
                "da",
                "de",
                "en",
                "fi",
                "nl",
                "sv"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FinancialSituationReadDocumentSchemaV2"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            },
            "description": "Validation error"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Not found"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "[BETA] Read the financial-situation sub-resource.",
        "tags": [
          "advice_session"
        ]
      },
      "patch": {
        "description": "The block matching the investor type is merged into storage: field codes\n        present in the body overwrite their stored value, codes that are absent are\n        left untouched, and a code sent as null is stored as null (cleared).\n        Omitting a block leaves it unchanged; `advisor_notes` is updated only when\n        present. Sending a non-null block that does NOT match the investor type\n        returns 400. Sibling keys and other namespaces inside `advisorInput` are\n        preserved. Returns the merged block for the investor type.",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FinancialSituationUpdateSchemaV2"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FinancialSituationDocumentSchemaV2"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            },
            "description": "Validation error"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Not found"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "[BETA] Partially update the financial-situation answers for an advice session.",
        "tags": [
          "advice_session"
        ]
      }
    },
    "/v2/advice_session/{session_id}/goal": {
      "get": {
        "description": "Important note(s) about the response:\n        \nThe `portfolio_data` is not available under list endpoint - use the specific goal endpoint.",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Language to fetch the data for (defaults to English if not selected)",
            "in": "query",
            "name": "language",
            "required": false,
            "schema": {
              "default": null,
              "enum": [
                "no",
                "da",
                "de",
                "en",
                "fi",
                "nl",
                "sv"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "goals": {
                      "items": {
                        "properties": {
                          "description": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "horizon_text": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "horizon_value": {
                            "type": "integer"
                          },
                          "id": {
                            "type": "string"
                          },
                          "initial_risk_class": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "name": {
                            "type": "string"
                          },
                          "platform_id": {
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "platform_questions": {
                            "items": {
                              "properties": {
                                "answer": {
                                  "type": "boolean"
                                },
                                "question": {
                                  "type": "string"
                                }
                              },
                              "type": "object"
                            },
                            "type": [
                              "array",
                              "null"
                            ]
                          },
                          "platform_reasoning": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "portfolio_type": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "risk_class": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "risk_expectation": {
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "risk_willingness": {
                            "type": [
                              "integer",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "horizon_value",
                          "name"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "goals"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            },
            "description": "Validation error"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Not found"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "[BETA] Retrieve all goals in an advice session",
        "tags": [
          "advice_session"
        ]
      },
      "post": {
        "description": "The request body carries a minimal set of fields; `horizon_value`\n        maps to `data.timeHorizon` on the underlying record. Additional goal\n        attributes (risk, portfolio, questionnaire answers, etc.) are set\n        through subsequent update calls.",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SessionGoalCreateRequestSchemaV2"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionGoalMutationDocumentSchemaV2"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            },
            "description": "Validation error"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Not found"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "[BETA] Create a new goal under an advice session.",
        "tags": [
          "advice_session"
        ]
      }
    },
    "/v2/advice_session/{session_id}/goal/{goal_id}": {
      "delete": {
        "description": "The session must be open; deleting a goal from a completed session is rejected.",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "goal_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Not found"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "[BETA] Delete a goal from an advice session. Returns 204 on success.",
        "tags": [
          "advice_session"
        ]
      },
      "get": {
        "description": "The session must be open; deleting a goal from a completed session is rejected.",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "goal_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Language to fetch the data for (defaults to English if not selected)",
            "in": "query",
            "name": "language",
            "required": false,
            "schema": {
              "default": null,
              "enum": [
                "no",
                "da",
                "de",
                "en",
                "fi",
                "nl",
                "sv"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "goal": {
                      "properties": {
                        "description": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "horizon_text": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "horizon_value": {
                          "type": "integer"
                        },
                        "id": {
                          "type": "string"
                        },
                        "initial_risk_class": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "name": {
                          "type": "string"
                        },
                        "platform_id": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        },
                        "platform_questions": {
                          "items": {
                            "properties": {
                              "answer": {
                                "type": "boolean"
                              },
                              "question": {
                                "type": "string"
                              }
                            },
                            "type": "object"
                          },
                          "type": [
                            "array",
                            "null"
                          ]
                        },
                        "platform_reasoning": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "portfolio_data": {
                          "properties": {
                            "asset_class_allocation_advisor_note": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "fund_allocation_advisor_note": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "items": {
                              "items": {
                                "properties": {
                                  "category_id": {
                                    "description": "Category reference code, e.g. `C15`.",
                                    "type": "string"
                                  },
                                  "id": {
                                    "description": "Instrument ticker.",
                                    "type": "string"
                                  },
                                  "initial_deposit": {
                                    "type": "number"
                                  },
                                  "isin": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "main_asset_class": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "recurring_deposit": {
                                    "type": "number"
                                  },
                                  "recurring_deposit_type": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "sub_asset_class": {
                                    "type": "string"
                                  },
                                  "suitability": {
                                    "type": [
                                      "object",
                                      "null"
                                    ]
                                  }
                                },
                                "type": "object"
                              },
                              "type": "array"
                            },
                            "total_amount_initial": {
                              "type": "number"
                            },
                            "total_amount_recurring": {
                              "type": "number"
                            }
                          },
                          "type": "object"
                        },
                        "portfolio_type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "risk_class": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "risk_expectation": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        },
                        "risk_willingness": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "horizon_value",
                        "name"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "goal"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            },
            "description": "Validation error"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Not found"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "[BETA] Delete a goal from an advice session. Returns 204 on success.",
        "tags": [
          "advice_session"
        ]
      },
      "patch": {
        "description": "All fields are optional. `horizon_value` maps to `data.timeHorizon`\n        while preserving the rest of the `data` blob. Passing `null` for\n        `description` or `icon` clears the field; omit a field to leave it\n        unchanged.",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "goal_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SessionGoalUpdateRequestSchemaV2"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionGoalMutationDocumentSchemaV2"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            },
            "description": "Validation error"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Not found"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "[BETA] Update a goal under an advice session.",
        "tags": [
          "advice_session"
        ]
      }
    },
    "/v2/advice_session/{session_id}/goal/{goal_id}/information": {
      "get": {
        "description": "`data.answers` holds the user-editable answers keyed by question code\n        (`null` when unanswered); `data.advisor_notes` carries the section note.\n        `meta.fields` describes the questions configured for the goal's type\n        (`roboAdviceForm.goalInformation.fields`): each field's `label`,\n        `options`, and any conditional dependents (carrying `depends_on`).\n        Resolve an answer's display label from `meta.fields[].options`.",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "goal_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Language to fetch the data for (defaults to English if not selected)",
            "in": "query",
            "name": "language",
            "required": false,
            "schema": {
              "default": null,
              "enum": [
                "no",
                "da",
                "de",
                "en",
                "fi",
                "nl",
                "sv"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GoalInformationReadDocumentSchemaV2"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            },
            "description": "Validation error"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Not found"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "[BETA] Read the goal-information sub-resource for a goal.",
        "tags": [
          "advice_session"
        ]
      },
      "patch": {
        "description": "answers and free-text advisor notes attached to a goal.",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "goal_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GoalInformationSchemaV21"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GoalInformationDocumentSchemaV2"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            },
            "description": "Validation error"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Not found"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "[BETA] Update the goal-information sub-resource for a goal.",
        "tags": [
          "advice_session"
        ]
      }
    },
    "/v2/advice_session/{session_id}/knowledge_and_experience": {
      "get": {
        "description": "`data` holds the user-editable answers (`{code: value}`, one entry per\n        configured question — `null` when unanswered) plus the section's\n        `advisor_notes`. `meta.questions` describes the questions configured for\n        the tenant (`roboAdviceForm.knowledgeAndExperienceQuestions.questions`):\n        each question's `label`, `options`, and whether it is multi-select.\n        Resolve an answer's display label from `meta.questions[].options`.",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Language to fetch the data for (defaults to English if not selected)",
            "in": "query",
            "name": "language",
            "required": false,
            "schema": {
              "default": null,
              "enum": [
                "no",
                "da",
                "de",
                "en",
                "fi",
                "nl",
                "sv"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KnowledgeAndExperienceReadDocumentSchemaV2"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            },
            "description": "Validation error"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Not found"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "[BETA] Read the K\u0026E sub-resource for an advice session.",
        "tags": [
          "advice_session"
        ]
      },
      "put": {
        "description": "For each question code configured for the tenant\n        (`roboAdviceForm.knowledgeAndExperienceQuestions.questions`), the\n        value is taken from the `answers` payload — missing codes get cleared\n        to `null` (PUT-replace semantics over the K\u0026E surface).\n\n        Codes in the payload that are not in the customer config are silently\n        ignored. This is a safety guarantee: a caller cannot use this endpoint\n        to write `expectationOfRisk` or any other top-level key under\n        `advisorInput` that does not belong to K\u0026E. Sibling namespaces and\n        sibling top-level keys inside `advisorInput` are preserved.",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KnowledgeAndExperiencePutSchemaV21"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KnowledgeAndExperiencePutDocumentSchemaV2"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            },
            "description": "Validation error"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Not found"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "[BETA] Replace the K\u0026E answers for an advice session.",
        "tags": [
          "advice_session"
        ]
      }
    },
    "/v2/advice_session/{session_id}/meta": {
      "get": {
        "description": "Returns the stored JSON:API data document (`{data, meta}`). When nothing has\n        been posted yet, returns an empty data document (`{data: null}`), so the frontend\n        always gets a valid document. `data` is free-form — its shape is defined by the\n        external system that posted it.",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetadataSchemaV2"
                }
              }
            },
            "description": "Successful response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Not found"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "[BETA] Retrieve the external metadata posted to a session.",
        "tags": [
          "advice_session"
        ]
      },
      "put": {
        "description": "The body is a JSON:API data document (`{data, meta}`); `data` is required (may be\n        null to clear) and free-form. The whole document is replaced (idempotent). Only\n        allowed while the session is open; posting to a completed/cancelled session returns 400.",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MetadataSchemaV2"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetadataSchemaV2"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            },
            "description": "Validation error"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Action was not permitted"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Not found"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "[BETA] Replace the external metadata for a session.",
        "tags": [
          "advice_session"
        ]
      }
    },
    "/v2/advice_session/{session_id}/risk_question": {
      "get": {
        "description": "`data` holds the two stored option IDs (`expectation_of_risk`,\n        `risk_strategy`) and the section's `advisor_notes`; each is `null` when\n        nothing has been written. `meta` lists the configured options for both\n        questions (with i18n labels resolved by `?language`) plus the\n        `is_risk2_hidden` tenant flag — resolve a stored ID against the matching\n        option list for display.",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Language to fetch the data for (defaults to English if not selected)",
            "in": "query",
            "name": "language",
            "required": false,
            "schema": {
              "default": null,
              "enum": [
                "no",
                "da",
                "de",
                "en",
                "fi",
                "nl",
                "sv"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RiskQuestionReadDocumentSchemaV2"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            },
            "description": "Validation error"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Not found"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "[BETA] Read the risk-question sub-resource for an advice session.",
        "tags": [
          "advice_session"
        ]
      },
      "put": {
        "description": "All three fields required; each accepts `null` to clear the value.\n        Sibling keys and other namespaces inside `advisorInput` are preserved.\n        Integer values are not validated against the customer config (option IDs\n        vary per customer).",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RiskQuestionSchemaV21"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RiskQuestionDocumentSchemaV2"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            },
            "description": "Validation error"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Not found"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "[BETA] Replace the risk-question answers for an advice session.",
        "tags": [
          "advice_session"
        ]
      }
    },
    "/v2/advice_session/{session_id}/sustainability": {
      "get": {
        "description": "`data` holds the current `generic`, `alignment_criteria`, and\n        `preference_criteria` answers (each `null` when nothing has been written\n        for that section). `meta` describes the configured structure for those\n        same three sections (resolved by `?language`): the alignment granulation\n        scale and enabled slots, the selectable preference themes, and the\n        generic-assessment flags. Slot keys in `meta.alignment_criteria.slots`\n        match the keys in `data.alignment_criteria`.",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Language to fetch the data for (defaults to English if not selected)",
            "in": "query",
            "name": "language",
            "required": false,
            "schema": {
              "default": null,
              "enum": [
                "no",
                "da",
                "de",
                "en",
                "fi",
                "nl",
                "sv"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SustainabilityReadDocumentSchemaV2"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            },
            "description": "Validation error"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Not found"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "[BETA] Read the sustainability sub-resource for an advice session.",
        "tags": [
          "advice_session"
        ]
      },
      "put": {
        "description": "Sending `null` for a block removes its container under\n        `advisorInput.sustainability`. Sibling namespaces in the StateData\n        row are preserved.",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SustainabilitySchemaV21"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SustainabilityDocumentSchemaV2"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            },
            "description": "Validation error"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Not found"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "[BETA] Replace the sustainability sub-resource. Each block is required and nullable.",
        "tags": [
          "advice_session"
        ]
      }
    },
    "/v2/advice_session/{session_id}/transactions": {
      "get": {
        "description": "Important note(s) about the response:\n        \nThe transactions are computed by the advisory API, one call per goal, and merged.\n        \nEvery row carries the ``goal_id`` it belongs to; the lists themselves are session-wide.\n        \n``weight`` is each transaction's share of its own goal's orders, so weights sum to\n        roughly 100 per goal rather than across the whole response.\n        \nGoals without a portfolio are skipped; the response holds the remaining goals' rows.",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionTransactionsResponseSchemaV2"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            },
            "description": "Validation error"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Not found"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "[BETA] Retrieve transaction data for a specific advice session",
        "tags": [
          "advice_session"
        ]
      }
    },
    "/v2/categories/{category_id}": {
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "category_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "namespace_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "description": "Config namespace id",
              "title": "Namespace Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdvisoryConfigCategoryResponseSchema"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            },
            "description": "Validation error"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Not found"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "Get a specific AdvisoryConfigCategory by ID",
        "tags": [
          "info"
        ]
      }
    },
    "/v2/settings/{application}": {
      "get": {
        "description": "Return all settings for the given application, merged with the caller's customer-level overrides. Optional query parameters `group` and `type` narrow the result set. Each item includes both the default (`default`) and the effective value (`value`); `is_overruled` is true when the customer overrides the default.\n\nUse `deepalpha` as the `application` path parameter.",
        "parameters": [
          {
            "in": "path",
            "name": "application",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SettingsResponse"
                }
              }
            },
            "description": "Successful response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Authentication error"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPError"
                }
              }
            },
            "description": "Not found"
          }
        },
        "security": [
          {
            "oauth2": []
          },
          {
            "bearerToken": []
          }
        ],
        "summary": "[BETA] List settings for an application",
        "tags": [
          "settings"
        ]
      }
    }
  },
  "servers": [
    {
      "description": "This server",
      "url": "/"
    }
  ]
}