Interfaces
allphins.get_portfolios()
Get all the portfolios.
A portfolio is a structured collection of risks, policies, and exposures grouped under a common entity or scope. It consolidates risk data to assess aggregated exposure, manage financial liabilities, and analyze scenario outcomes. Portfolios are essential for evaluating risk concentration, tracking exposure trends, and supporting strategic insurance decisions.
| Returns: |
|
|---|
Response structure
| Attribute | Type | Description |
|---|---|---|
id |
UUID | Unique identifier for the object. |
name |
string | Name of the portfolio. |
created_at |
timestamp | Creation date. |
updated_at |
timestamp | Last update date. |
data_update_time |
timestamp | Last data update date. |
renewal_date |
timestamp | Next renewal date. |
premium |
int | Premium in USD. |
max_exposure |
float | Maximum exposure on the portfolio (based on enterd policies). |
policies |
list | List of policies. |
client |
int | ID of the client. |
client_name |
string | Name of the client |
timeline |
string | Status of the portofolio (expired, active, etc...) |
renewal |
string | ID of the next portfolio. |
portfolio_class |
string | Line of business of the portfolio. |
year_of_account |
int | Year of account. |
transaction |
string | Type of transaction: pre_inward, inward, selfward, outward. |
datasource |
list | list of datasources |
allphins.get_policies(portfolio_id=None, status='written', validity='today')
Get the policies, using filtering parameters.
A policy is an agreement under which a client transfers part of its risk exposure to an insurer or reinsurer. The policy structure includes rules for transferring risk, often involving excesses, limits, and sublimits.
| Parameters: |
|
|---|
Allowed values
| Status | Validity |
|---|---|
quote |
today (policies valid today) |
written |
previous_1_1 (policies valid previous 1st of January) |
expired |
|
declined |
|
not_taken_up |
|
work_in_progress |
|
deleted |
To disable status or validity filtering, explicitly set the value to None.
| Returns: |
|
|---|
Response structure
| Attribute | Type | Description |
|---|---|---|
id |
int | Unique identifier for the object. |
type |
string | Policy type: direct, excess_of_loss or quota_share. |
portfolio |
string | ID of the portfolios object. |
portfolio_name |
string | Name of the portfolio |
premium_100 |
float | Premium at 100% share. |
premium_currency |
string | Premium currency. |
usd_premium_100 |
float | USD Premium at 100% share. |
benefits |
list | List of the benefits. |
limit |
float | Policy limit. |
limit_currency |
string | Limit currency. |
usd_limit |
float | USD limit. |
excess |
float | Policy excess. |
excess_currency |
string | Excess currency. |
start_date |
datetime | Start date of the policy. |
end_date |
datetime | End date of the policy. |
dates |
json | Json representation of the start date and end date. |
risk_attached |
bool | Is it a risk attaching policy. |
share |
float | Policy share. |
combined_ratio |
float | Combined ratio of the policy. |
status |
string | Policy status: written, quote, declined, not_taken_up. |
reinstatement |
float | Reinstatement percentage. |
reference |
string | Policy reference. |
description |
float | Policy description. |
tags |
list | List of tags. |
rules |
list | Sublimit rules. |
outward_filter |
json | Outward filters. |
rol |
float | Rol of the policy. |
client_id |
int | Id of the client. |
client_name |
string | Name of the client |
annual_aggregate_deductible_currency |
string | Annual aggregate deductible currency. |
annual_aggregate_deductible |
float | Annual aggregate deductible. |
allphins.get_risks(portfolio_id=None, datasource_id=None, scenario_id=None)
Get the risks, using filtering parameters.
At least one of the parameters must be provided.
A risk represents a potential financial exposure due to an event. Risks are categorized and described by a set of attributes.
Fetching the risks from the API could take a while, depending on the amount of data to retrieve.
| Parameters: |
|
|---|
| Returns: |
|
|---|
Response structure
| Attribute | Type | Description |
|---|---|---|
id |
int | Unique identifier for the object. |
name |
string | Name of the risk. |
start_date |
timestamp | Start date. |
end_date |
timestamp | End date. |
dates |
json | Object representation of the start date and end date. |
gross_exposure |
float | Gross Exposure in USD. |
gross_exposure_raw |
float | Gross Exposure. |
portfolio_id |
string | ID of the portfolio object. |
portfolio_name |
string | Name of the portfolio. |
portfolio_class |
string | Line of business of the portfolio. |
extra_fields |
json | Raw data from the risk import. |
mapped_data |
json | Mapped data from the risk import. |
assured_interest |
float | Assured interest. |
is_assured_interest |
bool | Assured interest. |
mute |
bool | Is the risk muted or not. |
attributes |
list | List of attributes for this risk. |
attributes_array |
list | List of ids of the attributes for this risk. |
cedant_share |
float | Cedant share. |
limit_100 |
float | Limit at 100%. |
excess |
float | Excess. |
premium_100 |
float | Premium at 100%. |
currency |
string | Currency. |
datasource_id |
string | ID of the datasource object. |
datasource_name |
string | Name of the datasource. |
allphins.get_aggregation(scenariolist_id, policies, computation_date=datetime.now().strftime('%Y-%m-%d'))
Get the aggregation for the given scenariolist and policies at the given computation date.
| Parameters: |
|
|---|
| Returns: |
|
|---|
Response structure
| Attribute | Type | Description |
|---|---|---|
id |
int | Unique identifier for the scenario. |
name |
string | Name of the scenario. |
attributes |
list | Attributes list of the scenario. |
meta_data |
list | Meta data of the scenario. |
gross_loss |
float | Gross loss of the scenario in USD. |
retro |
float | Retro for the scenario in USD. |
reinstatement |
float | Reinstatment for the scenario in USD. |
timeline |
list | Timeline for the scenario's gross loss evolution. |
allphins.get_scenario_lists()
Get all the scenario lists.
A scenario is a fictitious or actual event that acts as a filter for risks that could be triggered by it. It is defined as a boolean function of attribute values. For example, Asset = “Sleipner East Complex” and Head of Cover = “PD”; or City = “New York” or “Los Angeles” and Peril = “SRCSS”.
Automatic Scenario List
An Automatic Scenario List is built by selecting a set of attributes and automatically generating all the possible scenarios that correspond to the different attribute values the attributes can take. For example, a “Per Country” Scenario List or “Per Country and Industry” Scenario List.
Custom Scenario
A Custom Scenario is a scenario that does not belong to an Automatic Scenario List but is created to meet specific user needs.
| Returns: |
|
|---|
Response structure
| Attribute | Type | Description |
|---|---|---|
id |
UUID | Unique identifier of the scenario list. |
config |
string | Configuration of the scenario list. |
name |
string | Name of the scenario list. |
description |
string | Description of the scenario list. |
icon |
string | Icon of the scenario list. |
is_featured |
bool | Is the scenario list featured or not. |
section |
string | Section of the scenario list. |
attributes |
list | Attributes of the scenario list, e.g. ['asset'], ['country', 'asset_group'], etc. |
line_of_business |
string | Line of business of the scenario list. |
is_favorite |
bool | Is the scenario list marked as favorite or not. |
perils |
list | List of perils associated with the scenario, e.g. ['Flood', 'Fire'], ['SRCSS'], etc. |
filters |
list | Filters applied to the scenario list. |
agg_keys |
list | Aggregation keys for the scenario list, e.g. ["Asset Category", "Region"], ["Location"], etc. |
damage_ratio |
int | Damage ratio applied the scenario list. |
allphins.get_scenario_list_composition(scenariolist_id, computation_date=datetime.now().strftime('%Y-%m-%d'))
Get layers composition for each scenario of a given scenariolist.
Due to technical limitations, we currently prevent any query if there is more than 500k results.
| Parameters: |
|
|---|
| Returns: |
|
|---|
Response structure
| Attribute | Type | Description |
|---|---|---|
scenario_id |
int | Unique identifier for the scenario. |
scenario_name |
string | Name of the scenario. |
cedant_name |
string | Name of the cedant. |
portfolio_name |
string | Name of the portfolio. |
policy_id |
int | Unique identifier for the policy. |
policy_name |
string | Name of the policy. |
client_loss |
float | Cedant loss of the layer in USD. |
gross_loss |
float | Gross loss of the layer in USD. |
policy_loss |
float | Policy loss. |
status |
string | Status of the layer. |
reference |
string | Reference of the layer. |
allphins.get_cedant_top_agg_per_scenario_list(computation_date=datetime.now().strftime('%Y-%m-%d'))
Get the top aggregation per scenariolist for every cedant at the given computation date.
This method is only available for customer using the following line of business:
- Terror
- Property
- Energy onshore
| Parameters: |
|
|---|
| Returns: |
|
|---|
Response structure
| Attribute | Type | Description |
|---|---|---|
portfolio_id |
UUID | Unique identifier of the portfolio. |
portfolio_name |
string | Name of the portfolio. |
portfolio_year_of_account |
int | Year of account of the portfolio. |
client_name |
string | Name of the client. |
scenario_list_id |
UUID | Unique identifier of the scenario list. |
scenario_list_name |
string | Name of the scenario list. |
scenario_id |
int | Unique identifier of the scenario. |
scenario_name |
string | Name of the scenario. |
exposure |
float | Exposure of the scenario. |
computation_date |
string | Date used of the computation, format YYY-MM-DD. |