# Policy Rating API

## Overview

Based on our configuration capabilities, we expose a set of different rating-related APIs for policy transactions. 

By utilizing them, insurance entities can streamline your rating processes, improve operational efficiency, and provide a better customer experience through faster and more accurate policy pricing.

You can refer to this chapter to learn more about the typical API for this part.


## Calculate API

<div class="docs-caution"><span class="docs-admonitions-text">caution</span>

All below calculation sample is given with the assumption that old rating engine is adopted. With the latest InsureMO innovation, there's a new offering called "SPOCK" which can provide a better high-performance calculation experience. For more details about SPOCK, user can refer to [SPOCK introduction](https://docs.insuremo.com/spock/InsureMO_SPOCK_introduction_simplified).

We suggest user to adopt SPOCK for group policy calculation rather than mentioned below. Of course, user can still read below as part of thinking process can be useful for user to adopt SPOCK for rating as well.

</div> 


### Calculate - Business Usage

* Calculate policy and return the result.
* Support various types of calculations, such as premium, SI, commission, and more.


### Calculate - API Path

* {{server}}/quotation/core/quotation/v1/calculate - Not depending on persisted quotation
* {{server}}/proposal/core/proposal/v1/calculateEx - Not depending on persisted proposal
* {{server}}/endo/core/endo/v1/calculateEx - Depending on persisted endorsement
* {{server}}/endo/core/endo/v1/calculateWithoutDbEx - Not depending on persisted endorsement


### Calculate - What I Can Extend

* Maintain the rating calculation structure.
* Maintain the rating calculation algorithm.
* Fetch rate table from the configuration table definition.


### Calculate - Configuration Rating 

Take product TBTI rating for example.

All the NB rating entries are labeled as "**New Business Trans Rating**". In the NB Trans Rating, the Calculation Group called "**Product Premium Calculation**" will invoke the rating related to the product context.

![rating entry](./image/product_cfg_sample/prd_rating_entry.png)

For more details about rating configuration, see [rating engine](https://docs.insuremo.com/irules/app_framework/rating#basic-rating-component-and-ui-operation).

![rating entry](./image/product_cfg_sample/prd_rating.png)


### Proposal Calculate - API Sample

* Sample Request

```
{
    "ProductCode": "TBTI",
    "ProductVersion": "1.0",
    "ProposalDate": "2025-04-15",
    "EffectiveDate": "2025-04-16",
    "ExpiryDate": "2026-04-16",
    "AgentCode": "XXXX00XX",
    "BookCurrencyCode": "USD",
    "PremiumCurrencyCode": "USD",
    "OrgCode": "10002",
    "LocalCurrencyCode": "USD",
    "PremiumBookExchangeRate": 1,
    "PremiumLocalExchangeRate": 1,
    "PolicyLobList": [
        {
            "PolicyRiskList": [
                {
                    "CustomerName": "PrePaid Collection",
                    "IdNo": "IdNo",
                    "IdType": "1",
                    "DateOfBirth": "1988-10-01",
                    "PolicyCoverageList": [
                        {
                            "ProductElementCode": "C100692",
                            "SumInsured": 300000
                        }
                    ],
                    "ProductElementCode": "R10007",
                    "RiskName": "InsuredName"
                }
            ],
            "ProductCode": "TBTI",
            "TotalInsuredCount": 1
        }
    ]
}
```

* Sample Response with policy object 

Added calculation related fields, such as DuePremium, GrossPremium, and other premium related fields at each levels such as Coverage, Risk, Lob and Policy, while also generating multiple installment data based on the installment method.

```
{
    "AdjustedPremium": 10.8,
    "AgentCode": "XXXX00XX",
    "AnnualPremium": 10,
    "BeforeVatPremium": 10,
    "BookCurrencyCode": "USD",
    "BusinessCateCode": "1",
    "BusinessObjectId": 3517051304219,
    "Commission": 1,
    "CommissionRate": 0.1,
    "DuePremium": 10.8,
    "EffectiveDate": "2025-04-16",
    "ExpiryDate": "2026-04-16",
    "FirstDataEntryDate": "2025-04-15T16:07:19",
    "GrossPremium": 10.8,
    "InterestRate": 0,
    "IsPremiumCalcSuccess": "Y",
    "IsRenewable": "Y",
    "IsTakeUpPolicy": "N",
    "LocalCurrencyCode": "USD",
    "OrgCode": "10002",
    "POIRate": 1,
    "PolicyElementId": 11309200128,
    "PolicyId": "11309200128,BB316027BB75724D2CBBA6A2FD7F9DF3",
    "PolicyLobList": [
        {
            "AdjustedPremium": 10.8,
            "BeforeVatPremium": 10,
            "BusinessObjectId": 351861068,
            "DuePremium": 10.8,
            "GrossPremium": 10.8,
            "ParentElementType": "POLICY",
            "ParentPolicyElementId": 11309200128,
            "PolicyElementId": 11309200129,
            "PolicyId": "11309200128,BB316027BB75724D2CBBA6A2FD7F9DF3",
            "PolicyRiskList": [
                {
                    "AdjustedPremium": 10.8,
                    "Age": 36,
                    "BeforeVatPremium": 10,
                    "BusinessObjectId": 351861075,
                    "CustomerName": "PrePaid Collection",
                    "DateOfBirth": "1988-10-01",
                    "DuePremium": 10.8,
                    "GrossPremium": 10.8,
                    "IdNo": "IdNo",
                    "IdType": "1",
                    "ParentElementType": "POLICY_LOB",
                    "ParentPolicyElementId": 11309200129,
                    "PolicyCoverageList": [
                        {
                            "AdjustedPremium": 10.8,
                            "AnnualPremium": 10,
                            "BeforeVatPremium": 10,
                            "BusinessObjectId": 351861078,
                            "CoverageName": "Baggage Loss or Damage",
                            "DuePremium": 10.8,
                            "GrossPremium": 10.8,
                            "IsFinalLevelCt": "Y",
                            "ParentElementType": "INSURED",
                            "ParentPolicyElementId": 11309200130,
                            "PolicyElementId": 11309200131,
                            "PolicyId": "11309200128,BB316027BB75724D2CBBA6A2FD7F9DF3",
                            "PolicyStatus": 2,
                            "ProductElementCode": "C100692",
                            "ProductElementId": 351926030,
                            "SequenceNumber": 1,
                            "SumInsured": 300000,
                            "Vat": 0.8
                        }
                    ],
                    "PolicyElementId": 11309200130,
                    "PolicyId": "11309200128,BB316027BB75724D2CBBA6A2FD7F9DF3",
                    "PolicyStatus": 2,
                    "ProductElementCode": "R10007",
                    "ProductElementId": 351926021,
                    "RiskName": "InsuredName",
                    "SequenceNumber": 1,
                    "SumInsured": 300000,
                    "Vat": 0.8,
                    "TempData": {
                        "Mask-IdNo": "Jmf1vghdrScrTdpdeyKu7w==",
                        "MaskAfter-IdNo": "IdNo"
                    }
                }
            ],
            "PolicyStatus": 2,
            "ProductCode": "TBTI",
            "ProductElementCode": "TBTI",
            "ProductElementId": 351925023,
            "ProductId": 351925022,
            "ProductLobId": 351925023,
            "SequenceNumber": 1,
            "SumInsured": 300000,
            "TechProductCode": "TR_POC",
            "TechProductId": 3516410623456,
            "TotalInsuredCount": 1,
            "Vat": 0.8
        }
    ],
    "PolicyStatus": 1,
    "PolicyStatusForDisplay": 1,
    "PolicyType": "1",
    "PremCalcFactorHash": "20250415_160719_086,JK7tb5g2uUISjeW8XxWPlmhjExod2HwpLktGbH8RiYs=",
    "PremCalcResultHash": "20250415_160719_091,BI3P7VgRtFjM5XQI5MXeTKdf3RM0+h5RpWeDASrndcM=",
    "PremiumBookExchangeRate": 1,
    "PremiumCurrencyCode": "USD",
    "PremiumInterest": 0,
    "PremiumLocalExchangeRate": 1,
    "ProductCode": "TBTI",
    "ProductId": 351925022,
    "ProductVersion": "1.0",
    "ProposalDate": "2025-04-15",
    "ProposalNo": "PABTBTI0001352950",
    "ProposalStatus": "1",
    "QuotationDate": "2025-04-15T16:07:19",
    "SchemaVersion": 2,
    "SumInsured": 300000,
    "TaxInterest": 0,
    "TechProductCode": "TR_POC",
    "TechProductId": 3516410623456,
    "TotalInterest": 0,
    "TotalPremium": 10.8,
    "Vat": 0.8,
    "VatRate": 0.08,
    "VersionSeq": 1
}
```

### Endo Calculate  - API Sample

* Sample Request

```
{
    "@pk": 11383640468,
    "@type": "Endorsement-BasicInfoEndorsement",
    "BeforeRevisionId": 11383530764,
    "BusinessObjectId": 300243915,
    "DataEntryUserId": XXXXX0011XXXXX,
    "DataEntryUserRealName": "autoapitestuser",
    "DataEntryUserStaffCode": "PTY10000047304001",
    "EndoEffectiveDate": "2022-04-22",
    "EndoId": "11383640468,F24CDB9BE99CC3FDCF71F30270465F55",
    "EndoNo": "POTBTI01278425-001",
    "EndoStatus": "120",
    "EndoType": "1",
    "EntryOperId": XXXXX0011XXXXX,
    "IndexNumber": 0,
    "IsLockedByRi": "N",
    "NewPolicy": { NewPolicy},
    "OldPolicy": {OldPolicy},
    "PolicyDiff": "H4sIAAAAAAAA/4uuVsovULJSKkotyElMTlXSUSpILMkACugH5OdkJlf65Cf5ZBaX6Ec7FGTbGhoaWxibGhuYm1jEQuWDMouzsSmwjNV3SSxJ9U9zyiwCmqejlJ+TEpaYU5oKNNrQ0sJC19BA18AQKJ6XWo4QN4eJ18YCAFSUEDCZAAAA",
    "PolicyId": "11383530746,242AEA57BB4C7E53F3B372AF5F288709",
    "PolicyNo": "POTBTI01278425",
    "ProductCode": "TBTI",
    "ProductId": 351925022,
    "VersionSeq": 1,
    "IsAdminChange": "N",
    "SubEndoType": "12"
}
```
* Sample Response
```
{
    "@pk": 11383640468,
    "@type": "Endorsement-BasicInfoEndorsement",
    "AdjustedPremium": 300,
    "BeforeRevisionId": 11383530764,
    "BeforeVatPremium": 300,
    "BusinessObjectId": 300243915,
    "Commission": 30,
    "DataEntryUserId": XXXXX0011XXXXX,
    "DataEntryUserRealName": "autoapitestuser",
    "DataEntryUserStaffCode": "PTY10000047304001",
    "DuePremium": 324,
    "EndoEffectiveDate": "2022-04-22",
    "EndoId": "11383640468,F24CDB9BE99CC3FDCF71F30270465F55",
    "EndoNo": "POTBTI01278425-001",
    "EndoStatus": "120",
    "EndoType": "1",
    "EntryOperId": XXXXX0011XXXXX,
    "GrossPremium": 300,
    "IndexNumber": 0,
    "IsLockedByRi": "N",
    "NewPolicy": {},
    "PolicyDiff": "",
    "PolicyId": "11383530746,242AEA57BB4C7E53F3B372AF5F288709",
    "PolicyNo": "POTBTI01278425",
    "PremCalcFactorHash": "20250613_114643_677,QhqZokBAimgjbfAXEZp9S45ZZMDEVr20B74OgEn50Ok=",
    "PremCalcResultHash": "20250613_114643_679,NydQtvgoVXeGop9KX9evZJqwDL8jMifdG8Ay7V8ghrw=",
    "ProductCode": "TBTI",
    "ProductId": 351925022,
    "ShortRate": 1,
    "Vat": 24,
    "VersionSeq": 1,
    "CommissionRate": 0.1,
    "IsAdminChange": "N",
    "PremiumInterest": 15,
    "SubEndoType": "12",
    "TaxInterest": 1.2,
    "TotalInterest": 16.2,
    "TotalPremium": 340.2
}
```
## Need ReCalculate API
### Need ReCalculate - Business Usage
  After calculated, if some information is updated, the policy need to be calculated again.
  This API helps to check whether need recaculate.

### Need ReCalculate - API Path

* {{server}}/proposal/core/proposal/v1/needRecalculate
* {{server}}/endo/core/endo/v1/needRecalculate

The request of the APIs just same as the proposal/endo load response.

If need recalculate, API returns "Y"， otherwise "N".

## Partial Calculate API

### Partial Calculate - Business Usage

 System supports particial rating from Version 25.01. System always enter from NB Trans or Endo Trans to invoke related rating formulas, in order to suports invoke a single rating formula, the particial calculate API is developed.

* Invoke a single callculation.
* Calculate policy and return the result.
* Support various types of calculations, such as premium, SI, commission, and more.


### Partial Calculate - API Path

* {{server}}/proposal/core/proposal/v1/particalCalculate?calculationCode=TBTI_MSC
* {{server}}/endo/core/endo/v1/particalCalculate?calculationCode=BIE&NBCalculationCode=TBTI_MSC

    * calculationCode, the calculation to invoke
    * NBCalculationCode, for endo, if any new bussiness calculation need to invoke, please set this parameter

### Partial Calculate - What I Can Extend

* Maintain the rating calculation structure.
* Maintain the rating calculation algorithm.
* Fetch rate table from the configuration table definition.

### Partial Calculate - API Sample

#### /proposal/core/proposal/v1/particalCalculate

* Sample Request

```
{
    "ProductCode": "TBTI",
    "ProductVersion": "1.0",
    "ProposalDate": "2024-11-22T00:00:00",
    "EffectiveDate": "2024-11-22T00:00:00",
    "ExpiryDate": "2025-11-21T23:59:59",
    "AgentCode": "{{scCode}}",
    "BookCurrencyCode": "USD",
    "PremiumCurrencyCode": "USD",
    "OrgCode": "10002",
    "LocalCurrencyCode": "USD",
    "PremiumBookExchangeRate": 1,
    "PremiumLocalExchangeRate": 1,
    "CampaignDiscountList": [
        {
            "DiscountType": "01",
            "DiscountCode": "01",
            "Percentage": -0.1,
            "Comments": ""
        },
        {
            "DiscountType": "02",
            "DiscountCode": "03",
            "Percentage": 0,
            "Comments": ""
        }
    ],
    "PolicyLobList": [
        {
            "PolicyRiskList": [
                {
                    "CustomerName": "Customer",
                    "IdNo": "IdNo",
                    "IdType": "1",
                    "DateOfBirth": "1988-10-01",
                    "PolicyCoverageList": [
                        {
                            "ProductElementCode": "C100416",
                            "SumInsured": 300000
                        },
                        {
                            "ProductElementCode": "C100692",
                            "SumInsured": 300000
                        },
                        {
                            "ProductElementCode": "C100715",
                            "SumInsured": 300000
                        }
                    ],
                    "ProductElementCode": "R10007",
                    "RiskName": "InsuredName"
                }
            ],
            "ProductCode": "TBTI",
            "TotalInsuredCount": 1
        }
    ]
}
```

* Sample Response

```
{
    "@type": "Policy-POLICY",
    "AdjustedPremium": 1004.4,
    "AgentCode": "XXXX00XX",
    "BeforeVatPremium": 930,
    "BookCurrencyCode": "USD",
    "BusinessCateCode": "1",
    "BusinessObjectId": 3517051304219,
    "DuePremium": 1004.4,
    "EffectiveDate": "2024-11-22",
    "ExpiryDate": "2025-11-21T23:59:59",
    "GrossPremium": 1004.4,
    "LocalCurrencyCode": "USD",
    "OrgCode": "10002",
    "PolicyType": "1",
    "PremiumBookExchangeRate": 1,
    "PremiumCurrencyCode": "USD",
    "PremiumLocalExchangeRate": 1,
    "ProductCode": "TBTI",
    "ProductId": 351925022,
    "ProductVersion": "1.0",
    "ProposalDate": "2024-11-22",
    "SchemaVersion": 2,
    "SumInsured": 900000,
    "TechProductCode": "TR_POC",
    "TechProductId": 3516410623456,
    "Vat": 74.4,
    "VersionSeq": 0,
    "AnnualPremium": 930,
    "CampaignDiscountList": [
        {
            "@type": "CampaignDiscount-CampaignDiscount",
            "BusinessObjectId": 544076088,
            "PolicyStatus": 2,
            "SequenceNumber": 1,
            "Comments": "",
            "DiscountCode": "01",
            "DiscountType": "01",
            "Percentage": -0.1
        },
        {
            "@type": "CampaignDiscount-CampaignDiscount",
            "BusinessObjectId": 544076088,
            "PolicyStatus": 2,
            "SequenceNumber": 2,
            "Comments": "",
            "DiscountCode": "03",
            "DiscountType": "02",
            "Percentage": 0
        }
    ],
    "PolicyLobList": [
        {
            "@type": "PolicyLob-TR_POC",
            "AdjustedPremium": 1004.4,
            "BeforeVatPremium": 930,
            "BusinessObjectId": 351861068,
            "DuePremium": 1004.4,
            "GrossPremium": 1004.4,
            "PolicyStatus": 2,
            "ProductCode": "TBTI",
            "ProductElementCode": "TBTI",
            "ProductElementId": 351925023,
            "ProductId": 351925022,
            "ProductLobId": 351925023,
            "SequenceNumber": 1,
            "SumInsured": 900000,
            "TechProductCode": "TR_POC",
            "TechProductId": 3516410623456,
            "Vat": 74.4,
            "PolicyRiskList": [
                {
                    "@type": "PolicyRisk-R10007",
                    "AdjustedPremium": 1004.4,
                    "BeforeVatPremium": 930,
                    "BusinessObjectId": 351861075,
                    "DuePremium": 1004.4,
                    "GrossPremium": 1004.4,
                    "PolicyStatus": 2,
                    "ProductElementCode": "R10007",
                    "ProductElementId": 351926021,
                    "RiskName": "InsuredName",
                    "SequenceNumber": 1,
                    "SumInsured": 900000,
                    "Vat": 74.4,
                    "Age": 36,
                    "CustomerName": "Customer",
                    "DateOfBirth": "1988-10-01",
                    "IdNo": "IdNo",
                    "IdType": "1",
                    "PolicyCoverageList": [
                        {
                            "@type": "PolicyCoverage-PolicyCoverage",
                            "AdjustedPremium": 972,
                            "AnnualPremium": 900,
                            "BeforeVatPremium": 900,
                            "BusinessObjectId": 351861078,
                            "DuePremium": 972,
                            "GrossPremium": 972,
                            "PolicyStatus": 2,
                            "ProductElementCode": "C100416",
                            "ProductElementId": 351926024,
                            "SequenceNumber": 1,
                            "SumInsured": 300000,
                            "Vat": 72
                        },
                        {
                            "@type": "PolicyCoverage-PolicyCoverage",
                            "AdjustedPremium": 10.8,
                            "AnnualPremium": 10,
                            "BeforeVatPremium": 10,
                            "BusinessObjectId": 351861078,
                            "DuePremium": 10.8,
                            "GrossPremium": 10.8,
                            "PolicyStatus": 2,
                            "ProductElementCode": "C100692",
                            "ProductElementId": 351926030,
                            "SequenceNumber": 2,
                            "SumInsured": 300000,
                            "Vat": 0.8
                        },
                        {
                            "@type": "PolicyCoverage-PolicyCoverage",
                            "AdjustedPremium": 21.6,
                            "AnnualPremium": 20,
                            "BeforeVatPremium": 20,
                            "BusinessObjectId": 351861078,
                            "DuePremium": 21.6,
                            "GrossPremium": 21.6,
                            "PolicyStatus": 2,
                            "ProductElementCode": "C100715",
                            "ProductElementId": 351926027,
                            "SequenceNumber": 3,
                            "SumInsured": 300000,
                            "Vat": 1.6
                        }
                    ],
                    "TempData": {
                        "Mask-IdNo": "Jmf1vghdrScrTdpdeyKu7w==",
                        "MaskAfter-IdNo": "IdNo"
                    }
                }
            ],
            "TotalInsuredCount": 1
        }
    ],
    "VatRate": 0.08
}
```

#### /endo/core/endo/v1/particalCalculate

* Sample Request

```
{
    "EndoEffectiveDate": "{{NowDate}}",
    "EndoType": 1,
    "SubEndoType": "11",
    "NewPolicy": {{NewPolicy}},
    "OldPolicy": {{OldPolicy}},
    "PolicyNo": "{{PolNewicyNo}}",
    "ProductCode": "TBTI",
    "ProductId": 351925022,
    "IsAdminChange": "Y"
}
```

* Sample Response

```
{
    "@type": "Endorsement-BasicInfoEndorsement",
    "BusinessObjectId": 300243915,
    "EndoEffectiveDate": "2024-11-22",
    "EndoType": "1",
    "IsLockedByRi": "N",
    "NewPolicy": {
        "@pk": 11345880018,
        "@type": "Policy-POLICY",
        "AdjustedPremium": 1004.4,
        "AgentCode": "XXXX00XX",
        "AutoUnderwritingResult": {
            "@pk": 11345880029,
            "@type": "AutoUnderwriting-AutoUnderwriting",
            "AutoUwId": 11345880029,
            "BusinessObjectId": 370103370,
            "PolicyId": "11345880018,D7AE09D74ECA5F45EB5056F1E976156E",
            "ProcessType": "1",
            "UwResultCode": "2",
            "UwTime": "2025-05-20T11:28:36"
        },
        "AutoUwResultCode": "1",
        "BeforeVatPremium": 837,
        "BookCurrencyCode": "USD",
        "BusinessCateCode": "1",
        "BusinessObjectId": 3517051304219,
        "Commission": 83.7,
        "DuePremium": 903.96,
        "EffectiveDate": "2024-11-22",
        "ExpiryDate": "2025-11-21T23:59:59",
        "FirstDataEntryDate": "2025-05-20T11:28:36",
        "GrossPremium": 1004.4,
        "IsPremiumCalcSuccess": "Y",
        "IsRenewable": "Y",
        "IsTakeUpPolicy": "N",
        "IssueDate": "2025-05-20T11:28:36",
        "IssueUserId": XXXXX0011XXXXX,
        "IssueUserRealName": "autoapitestuser",
        "IssueUserStaffCode": "PTY10000047304001",
        "LocalCurrencyCode": "USD",
        "MaxUwLevelCode": "0",
        "OrgCode": "10002",
        "PolicyElementId": 11345880018,
        "PolicyId": "11345880018,D7AE09D74ECA5F45EB5056F1E976156E",
        "PolicyNo": "POTBTI01274671",
        "PolicyStatus": 2,
        "PolicyStatusForDisplay": 2,
        "PolicyType": "1",
        "PremCalcFactorHash": "20250520_112836_236,LltrTyAB8Buot2UlbZ8QmJnh7uvjlescEvfEJ3FVh5I=",
        "PremCalcResultHash": "20250520_112836_239,WZaqoKpNThhvEQJcjEM/7QrGDRiD0FgAXG3qheo/qc8=",
        "PremiumBookExchangeRate": 1,
        "PremiumCurrencyCode": "USD",
        "PremiumLocalExchangeRate": 1,
        "ProductCode": "TBTI",
        "ProductId": 351925022,
        "ProductVersion": "1.0",
        "ProposalDate": "2024-11-22",
        "ProposalNo": "PABTBTI0001360293",
        "ProposalStatus": "3",
        "QuotationDate": "2025-05-20T11:28:36",
        "SchemaVersion": 2,
        "SumInsured": 900000,
        "TechProductCode": "TR_POC",
        "TechProductId": 3516410623456,
        "Vat": 66.96,
        "VersionSeq": 1,
        "AnnualPremium": 930,
        "CampaignDiscount": -0.1,
        "CampaignDiscountAmount": -93,
        "CampaignDiscountList": [
            {
                "@pk": 11345880019,
                "@type": "CampaignDiscount-CampaignDiscount",
                "BusinessObjectId": 544076088,
                "ParentElementType": "POLICY",
                "ParentPolicyElementId": 11345880018,
                "PolicyElementId": 11345880019,
                "PolicyId": "11345880018,D7AE09D74ECA5F45EB5056F1E976156E",
                "PolicyStatus": 2,
                "SequenceNumber": 1,
                "Comments": "",
                "DiscountAmount": -93,
                "DiscountCode": "01",
                "DiscountType": "01",
                "Percentage": -0.1
            },
            {
                "@pk": 11345880020,
                "@type": "CampaignDiscount-CampaignDiscount",
                "BusinessObjectId": 544076088,
                "ParentElementType": "POLICY",
                "ParentPolicyElementId": 11345880018,
                "PolicyElementId": 11345880020,
                "PolicyId": "11345880018,D7AE09D74ECA5F45EB5056F1E976156E",
                "PolicyStatus": 2,
                "SequenceNumber": 2,
                "Comments": "",
                "DiscountCode": "03",
                "DiscountType": "02",
                "LoadingAmount": 0,
                "Percentage": 0
            }
        ],
        "CommissionRate": 0.1,
        "InterestRate": 0.05,
        "POIRate": 1,
        "PolicyLobList": [
            {
                "@pk": 11345880024,
                "@type": "PolicyLob-TR_POC",
                "AdjustedPremium": 1004.4,
                "BeforeVatPremium": 837,
                "BusinessObjectId": 351861068,
                "DuePremium": 903.96,
                "GrossPremium": 1004.4,
                "ParentElementType": "POLICY",
                "ParentPolicyElementId": 11345880018,
                "PolicyElementId": 11345880024,
                "PolicyId": "11345880018,D7AE09D74ECA5F45EB5056F1E976156E",
                "PolicyStatus": 2,
                "ProductCode": "TBTI",
                "ProductElementCode": "TBTI",
                "ProductElementId": 351925023,
                "ProductId": 351925022,
                "ProductLobId": 351925023,
                "SequenceNumber": 1,
                "SumInsured": 900000,
                "TechProductCode": "TR_POC",
                "TechProductId": 3516410623456,
                "Vat": 66.96,
                "PolicyRiskList": [
                    {
                        "@pk": 11345880025,
                        "@type": "PolicyRisk-R10007",
                        "AdjustedPremium": 1004.4,
                        "BeforeVatPremium": 837,
                        "BusinessObjectId": 351861075,
                        "DuePremium": 903.96,
                        "GrossPremium": 1004.4,
                        "ParentElementType": "POLICY_LOB",
                        "ParentPolicyElementId": 11345880024,
                        "PolicyElementId": 11345880025,
                        "PolicyId": "11345880018,D7AE09D74ECA5F45EB5056F1E976156E",
                        "PolicyStatus": 2,
                        "ProductElementCode": "R10007",
                        "ProductElementId": 351926021,
                        "RiskName": "InsuredName",
                        "SequenceNumber": 1,
                        "SumInsured": 900000,
                        "Vat": 66.96,
                        "Age": 36,
                        "CustomerName": "Customer",
                        "DateOfBirth": "1988-10-01",
                        "IdNo": "IdNo",
                        "IdType": "1",
                        "PolicyCoverageList": [
                            {
                                "@pk": 11345880026,
                                "@type": "PolicyCoverage-PolicyCoverage",
                                "AdjustedPremium": 972,
                                "AnnualPremium": 900,
                                "BeforeVatPremium": 810,
                                "BusinessObjectId": 351861078,
                                "Commission": 0,
                                "DuePremium": 874.8,
                                "GrossPremium": 972,
                                "IsFinalLevelCt": "Y",
                                "ParentElementType": "INSURED",
                                "ParentPolicyElementId": 11345880025,
                                "PolicyElementId": 11345880026,
                                "PolicyId": "11345880018,D7AE09D74ECA5F45EB5056F1E976156E",
                                "PolicyStatus": 2,
                                "ProductElementCode": "C100416",
                                "ProductElementId": 351926024,
                                "SequenceNumber": 1,
                                "SumInsured": 300000,
                                "TempData": {},
                                "Vat": 64.8,
                                "AdjustedPremiumDelta": 0,
                                "BeforeVatPremiumDelta": 0,
                                "CampaignDiscountAmount": -90,
                                "CommissionDelta": 0,
                                "CoverageName": "Accident Death & Dismemberment",
                                "DuePremiumDelta": 0,
                                "GrossPremiumDelta": 0,
                                "ShortRate": 1,
                                "SumInsuredDelta": 0,
                                "TotalDiscountLoadingAmount": -90,
                                "UWLoadingAmount": 0,
                                "VatDelta": 0
                            },
                            {
                                "@pk": 11345880027,
                                "@type": "PolicyCoverage-PolicyCoverage",
                                "AdjustedPremium": 10.8,
                                "AnnualPremium": 10,
                                "BeforeVatPremium": 9,
                                "BusinessObjectId": 351861078,
                                "Commission": 0,
                                "DuePremium": 9.72,
                                "GrossPremium": 10.8,
                                "IsFinalLevelCt": "Y",
                                "ParentElementType": "INSURED",
                                "ParentPolicyElementId": 11345880025,
                                "PolicyElementId": 11345880027,
                                "PolicyId": "11345880018,D7AE09D74ECA5F45EB5056F1E976156E",
                                "PolicyStatus": 2,
                                "ProductElementCode": "C100692",
                                "ProductElementId": 351926030,
                                "SequenceNumber": 2,
                                "SumInsured": 300000,
                                "TempData": {},
                                "Vat": 0.72,
                                "AdjustedPremiumDelta": 0,
                                "BeforeVatPremiumDelta": 0,
                                "CampaignDiscountAmount": -1,
                                "CommissionDelta": 0,
                                "CoverageName": "Baggage Loss or Damage",
                                "DuePremiumDelta": 0,
                                "GrossPremiumDelta": 0,
                                "ShortRate": 1,
                                "SumInsuredDelta": 0,
                                "TotalDiscountLoadingAmount": -1,
                                "UWLoadingAmount": 0,
                                "VatDelta": 0
                            }
                            }
                        ],
                        "TempData": {
                            "Mask-IdNo": "Jmf1vghdrScrTdpdeyKu7w==",
                            "MaskAfter-IdNo": "IdNo"
                        }
                    }
                ],
                "TotalInsuredCount": 1
            }
        ],
        "PremiumInterest": 41.85,
        "TaxInterest": 3.35,
        "TotalDiscountLoading": -0.1,
        "TotalDiscountLoadingAmount": -93,
        "TotalInterest": 45.2,
        "TotalPremium": 949.16,
        "UWLoading": 0,
        "UWLoadingAmount": 0,
        "VatRate": 0.08
    },
    "OldPolicy": {{OldPolicy}},
    "PolicyNo": "POTBTI01274671",
    "ProductCode": "TBTI",
    "ProductId": 351925022,
    "ShortRate": 1,
    "VersionSeq": 0,
    "IsAdminChange": "Y",
    "SubEndoType": "11"
}
```


## Discount And Loading API

### Discount And Loading - Business Usage

Insurance companies may adjust insurance premiums after assessing risks. 

* If the customer belongs to a low-risk group, they may receive discounts (i.e., reduced rates); 
* If the customer belongs to a high-risk group, they may be charged additional fees (i.e., increased rates). 

This chapter introduces how to handle fluctuations in premiums or rates.


### Discount And Loading - API Path

Below API helps to auto link and remove discount based on pre-defined rules. 

* {{server}}/proposal/core/policyDiscountLoading/v1/autoApplyDiscountLoadingToPolicyLevel

Below API helps to create discount model at coverage level and accumulate relevant values to policy level. It's only useful when your client has coverage level discount/loading related reporting or compliance requirement. 

* {{server}}/proposal/core/policyDiscountLoading/v1/applyPolicyLevelDiscountLoadingToCoverage
* {{server}}/proposal/core/policyDiscountLoading/v1/sumCoverageLevelDiscountLoadingToPolicyLevel


### Discount And Loading - What I Can Extend

#### Configure Data Table - DiscountLoadingDef

There's a data table named "DiscountLoadingDef" which allows you to configure rate fluctuation factors and applicable rules.

Below is the basic table structure definition:

| FieldName | Description | Comment |
| ------ | ------ | ------ |
| DiscountLoadingCode | Discount Loading Code |  |
| DiscountLoadingName | Discount Loading Name |  | 
| DiscountLoadingType | Discount Loading Type | L-Loading , D-Discount|  
| ApplyType | How to apply factors to policy | A-Auto apply by definition, U- Add by underwriter, P- Add by special program |
| ApplyProductCodes | Apply to which product, null means all,allow multiple value, split by "," |  | 
| ApplyCoverageCodes | Apply to which coverage, null means all,allow multiple value, split by "," |  | 
| ApplyPlanCodes | Apply to which plan, null means all,allow multiple value, split by "," |  |
| ApplyOrgCodes | Apply to which org,null means all, allow multiple value, split by "," |  | 
| ApplyChannelCodes | Apply to which channel, null means all,allow multiple value, split by "," |  |  
| CustomApplyRule | Custom groovy rules for apply discount, should return true/false |If false is returned, this factor is unavailable.  | 
| DefaultValue | Default Value | |
| MinValue | MinValue when allow user change |  | 
| MaxValue | MaxValue when allow user change |  |  
| ValueOptions | Dropdownlist for value options |  |
| DefaultValueFormula | Formula for default value,return double value |If a default value is set in the DefaultValue field, it will be used as the default. If no default value is set in the DefaultValue field, the data returned by the current field is used as the default. |
| AllowUserChange | Whether allow change the discount/loading value,Y/N |  | 
| CalculateOrder | When there are multiple factors, the execution order |  | 
| CalculateBase | Calculate base on original amount or latest amount |1-Base on original Amount, 2-Base on latest Amount  |
|DiscountLoadingMode | Calculation mode | R- ByRate, A- ByAmount |
|IsValid|Is Valid, Y/N| |
|EffectiveDate | Effective From Date | |
|PolicyDateFieldMode | Which policy date field used as effective date check | Q - By Quotation Date, P - By Proposal Date( usually same as quotation date), E - By Policy Effective Date, c - By Current Date |
|ExpiryDate | ExpiryDate | |

The most important field is "ApplyType"：

* If it's defined as "A-Auto apply by definition", then each time autoApply API is called, it will add/remove relevant discount/loading based on definition. 

* If it's defined as "U- Add by underwriter" or "P- Add by special program", then autoApply API will not do anything and it's up to underwriter manually or special tenant iComposer program to define how and when to add/remove.


Please note that even it's defined as "A-Auto apply by definition", it will only forcibly add/remove discount object itself while it will not refresh the discount value passed from API request. 

#### Discount And Loading - Scenario Study

From business standpoint, there can be three scenarios:

1. If any of the discount/loading attachment and values should always follow definition

You can always call the autoApply API. But you must make sure you should not pass the altered amount values in the request. Possibly adding some read-only validation in your front-end UI.

2. If any of the discount/loading attachment and values should mostly follow definition but it can be modified by underwriter

You can always call the autoApply API. If underwriter changes the amount, you can pass the newly changed amount and API will not override it. However, if underwriter decides to remove the specific piece of discount/loading, you should not remove it but ask them to change the value to 0. 

3. If any of the discount/loading is manually selected by underwriter

You don't need to call the autoApply API. Just let underwriter to select it then pass it into the discount/loading object in the API request. Of course, you might need to load data table to help better display the UI for them to use.

Of course, no matter whatever above scenario is used,still coverage related APIs are still applicable.


### Discount And Loading - Sample Transaction Flow

The following section will explain how to use these APIs with the ApplyType as "A-Auto apply by definition" and the DiscountLoadingMode as "R-ByRate". For example, the configuration table is as follows:

| FieldName | Value | 
| ------ | ------ | 
| DiscountLoadingCode | DiscountloadingTestByRate |
| DiscountLoadingName | DiscountloadingTestByRate |
| DiscountLoadingType |D-Discount |
| ApplyType | A-Auto apply by definition | 
| ApplyProductCodes |TBTI | 
| ApplyCoverageCodes |  |  
| ApplyPlanCodes |  |
| ApplyOrgCodes |  | 
| ApplyChannelCodes |   |  
| DefaultValue |   |
| MinValue | 0.3  | 
| MaxValue | 0  |  
| ValueOptions | 0.5  |
| AllowUserChange | Y  | 
| CalculateOrder | 1  |  
| CalculateBase |  1-Base on original Amount  | 
|DiscountLoadingMode | R- ByRate  |
|IsValid| Y |
|EffectiveDate | 2025-03-01 |
|PolicyDateFieldMode | Q - By Quotation Date |
|ExpiryDate |  |

1. First, create a policy.
2. According to the policy information, query the rate fluctuation information of discounts or loadings applicable to this policy. The API called is "/proposal/core/policyDiscountLoading/v1/autoApplyDiscountLoadingToPolicyLevel". After successful calling, the "PolicyDiscountLoadingList" node will be automatically added to the policy level, and the content of the node is the configuration data in the configuration table.
```
"PolicyDiscountLoadingList": [
        {
            "@type": "PolicyDiscountLoading-PolicyDiscountLoading",
            "BusinessObjectId": 646343877,
            "CalculateBase": "1",
            "CalculateSequence": 1,
            "DiscountLoadingApplyType": "A",
            "DiscountLoadingCode": "DiscountloadingTestByRate",
            "DiscountLoadingMode": "R",
            "DiscountLoadingType": "D",
            "ParentPolicyElementId": 11269060224,
            "PolicyId": "11269060224,4113E37483836B782A59775F7401FC44",
            "PolicyStatus": 2
        }
    ]
```
3. According to business requirements, it is necessary to manually assign the required discount or loading to each discount object in the "PolicyDiscountLoadingList" node. The field used here is "DiscountLoadingRate".
 ```
  "PolicyDiscountLoadingList": [
        {
            "@type": "PolicyDiscountLoading-PolicyDiscountLoading",
            "BusinessObjectId": 646343877,
            "CalculateBase": "1",
            "CalculateSequence": 1,
            "DiscountLoadingApplyType": "A",
            "DiscountLoadingCode": "DiscountloadingTestByRate",
            "DiscountLoadingMode": "R",
            "DiscountLoadingType": "D",
            "ParentPolicyElementId": 11269060224,
            "PolicyId": "11269060224,4113E37483836B782A59775F7401FC44",
            "PolicyStatus": 2,
            "DiscountLoadingRate": 0.3
        }
    ]
 ```
4. Synchronize the rate fluctuation information of the discount at the policy level to the coverage level. The API called is "/proposal/core/policyDiscountLoading/v1/applyPolicyLevelDiscountLoadingToCoverage", which will synchronize the "PolicyDiscountLoadingList" node at the policy level to each coverage at the coverage level.
```
 "PolicyCoverageList": [
    {
        "@pk": 11309200148,
        "@type": "PolicyCoverage-PolicyCoverage",
        "BusinessObjectId": 351861078,
        "IsFinalLevelCt": "Y",
        "ParentElementType": "INSURED",
        "ParentPolicyElementId": 11309200147,
        "PolicyElementId": 11309200148,
        "PolicyId": "11309200145,CE2865143A2BC45F65F2417F12B5F226",
        "PolicyStatus": 2,
        "ProductElementCode": "C100692",
        "ProductElementId": 351926030,
        "SequenceNumber": 1,
        "SumInsured": 500000,
        "PolicyDiscountLoadingDetailList": [
            {
                "@type": "PolicyDiscountLoadingDetail-PolicyDiscountLoadingDetail",
                "BusinessObjectId": 646364333,
                "CalculateBase": "1",
                "CalculateSequence": 1,
                "DiscountLoadingCode": "DiscountloadingTestByRate",
                "DiscountLoadingMode": "R",
                "DiscountLoadingRate": 0.3,
                "DiscountLoadingType": "D",
                "PolicyStatus": 2
            }
        ]
    },
    {
        "@pk": 11309200149,
        "@type": "PolicyCoverage-PolicyCoverage",
        "BusinessObjectId": 351861078,
        "IsFinalLevelCt": "Y",
        "ParentElementType": "INSURED",
        "ParentPolicyElementId": 11309200147,
        "PolicyElementId": 11309200149,
        "PolicyId": "11309200145,CE2865143A2BC45F65F2417F12B5F226",
        "PolicyStatus": 2,
        "ProductElementCode": "C100715",
        "ProductElementId": 351926027,
        "SequenceNumber": 2,
        "SumInsured": 300000,
         "PolicyDiscountLoadingDetailList": [
            {
                "@type": "PolicyDiscountLoadingDetail-PolicyDiscountLoadingDetail",
                "BusinessObjectId": 646364333,
                "CalculateBase": "1",
                "CalculateSequence": 1,
                "DiscountLoadingCode": "DiscountloadingTestByRate",
                "DiscountLoadingMode": "R",
                "DiscountLoadingRate": 0.3,
                "DiscountLoadingType": "D",
                "PolicyStatus": 2
            }
        ]
    }
]

```
5. Calculate the premium; each tenant needs to calculate the discount amount based on the discount rate at the coverage level and store the calculated result in the "TotalAmount" field of the "PolicyDiscountLoadingList" object.
Note that this calculation needs to be done by the tenant in their own Rating.
```
"PolicyCoverageList": [
    {
        "AdjustedPremium": 21.6,
        "AnnualPremium": 20,
        "BeforeVatPremium": 20,
        "BusinessObjectId": 351861078,
        "CoverageName": "Travel Delay",
        "DiscountLoadingDetailData": "[{\"@type\":\"PolicyDiscountLoadingDetail-PolicyDiscountLoadingDetail\",\"BusinessObjectId\":646364333,\"CalculateBase\":\"1\",\"CalculateSequence\":1,\"DiscountLoadingCode\":\"DiscountloadingTestByRate\",\"DiscountLoadingMode\":\"R\",\"DiscountLoadingRate\":0.3,\"DiscountLoadingType\":\"D\",\"ParentPolicyElementId\":11309200149,\"PolicyStatus\":2}]",
        "DuePremium": 21.6,
        "GrossPremium": 21.6,
        "IsFinalLevelCt": "Y",
        "ParentElementType": "INSURED",
        "ParentPolicyElementId": 11309200147,
        "PolicyElementId": 11309200149,
        "PolicyId": "11309200145,CE2865143A2BC45F65F2417F12B5F226",
        "PolicyStatus": 2,
        "ProductElementCode": "C100715",
        "ProductElementId": 351926027,
        "SequenceNumber": 2,
        "SumInsured": 300000,
        "Vat": 1.6,
        "PolicyDiscountLoadingDetailList": [
            {
                "BusinessObjectId": 646364333,
                "CalculateBase": "1",
                "CalculateSequence": 1,
                "DiscountLoadingCode": "DiscountloadingTestByRate",
                "DiscountLoadingMode": "R",
                "DiscountLoadingRate": 0.3,
                "DiscountLoadingType": "D",
                "ParentPolicyElementId": 11309200149,
                "PolicyStatus": 2
            }
        ]
    }
]
```
6. Call the API "/proposal/core/policyDiscountLoading/v1/sumCoverageLevelDiscountLoadingToPolicyLevel", which will summarize the amount of "TotalAmount" on the coverage into the "TotalAmount" field of the "PolicyDiscountLoadingList" object at the policy level.
```
"PolicyDiscountLoadingList": [
        {
            "@pk": 11269060235,
            "@type": "PolicyDiscountLoading-PolicyDiscountLoading",
            "BusinessObjectId": 646343877,
            "CalculateBase": "1",
            "CalculateSequence": 1,
            "DiscountLoadingApplyType": "A",
            "DiscountLoadingCode": "DiscountTest",
            "DiscountLoadingMode": "R",
            "DiscountLoadingRate": 0.3,
            "DiscountLoadingType": "D",
            "ParentElementType": "POLICY",
            "ParentPolicyElementId": 11269060224,
            "PolicyElementId": 11269060235,
            "PolicyId": "11269060224,4113E37483836B782A59775F7401FC44",
            "PolicyStatus": 2,
            "SequenceNumber": 1,
            "TotalAmount": 459
        }
    ]
```

7. The process of Discount & Loading has been completed.

The above introduces the scenario when "DiscountLoadingMode" is set to "R-ByRate". If "DiscountLoadingMode" is selected as "A-ByAmount", the processing flow is essentially the same as described above, with differences in steps 3 and 5.

* Step 3: at this point, assign the required amount to each discount object in the "PolicyDiscountLoadingList" node according to business needs. The field used here is "DiscountLoadingAmount".

* Step 5: it is necessary to allocate the amount in the "DiscountLoadingAmount" at the policy level to all coverages.



### Discount And Loading - API Sample

* {{server}}/proposal/core/policyDiscountLoading/v1/autoApplyDiscountLoadingToPolicyLevel
* Sample Request--Policy Object

```
{
    "AgentCode": "XXXX00XX",
    "BookCurrencyCode": "USD",
    "BusinessCateCode": "1",
    "BusinessObjectId": 3517051304219,
    "EffectiveDate": "2025-04-16",
    "ExpiryDate": "2026-04-16",
    "FirstDataEntryDate": "2025-04-15T17:24:18",
    "IsRenewable": "Y",
    "IsTakeUpPolicy": "N",
    "LocalCurrencyCode": "USD",
    "OrgCode": "10001",
    "PolicyElementId": 11309200145,
    "PolicyId": "11309200145,CE2865143A2BC45F65F2417F12B5F226",
    "PolicyLobList": [
        {
            "BusinessObjectId": 351861068,
            "ParentElementType": "POLICY",
            "ParentPolicyElementId": 11309200145,
            "PolicyElementId": 11309200146,
            "PolicyId": "11309200145,CE2865143A2BC45F65F2417F12B5F226",
            "PolicyRiskList": [
                {
                    "BusinessObjectId": 351861075,
                    "CustomerName": "StatementPayment",
                    "DateOfBirth": "1988-10-01",
                    "IdNo": "IdNo",
                    "IdType": "1",
                    "ParentElementType": "POLICY_LOB",
                    "ParentPolicyElementId": 11309200146,
                    "PolicyCoverageList": [
                        {
                            "BusinessObjectId": 351861078,
                            "IsFinalLevelCt": "Y",
                            "ParentElementType": "INSURED",
                            "ParentPolicyElementId": 11309200147,
                            "PolicyElementId": 11309200148,
                            "PolicyId": "11309200145,CE2865143A2BC45F65F2417F12B5F226",
                            "PolicyStatus": 2,
                            "ProductElementCode": "C100692",
                            "ProductElementId": 351926030,
                            "SequenceNumber": 1,
                            "SumInsured": 500000
                        },
                        {
                            "BusinessObjectId": 351861078,
                            "IsFinalLevelCt": "Y",
                            "ParentElementType": "INSURED",
                            "ParentPolicyElementId": 11309200147,
                            "PolicyElementId": 11309200149,
                            "PolicyId": "11309200145,CE2865143A2BC45F65F2417F12B5F226",
                            "PolicyStatus": 2,
                            "ProductElementCode": "C100715",
                            "ProductElementId": 351926027,
                            "SequenceNumber": 2,
                            "SumInsured": 300000
                        }
                    ],
                    "PolicyElementId": 11309200147,
                    "PolicyId": "11309200145,CE2865143A2BC45F65F2417F12B5F226",
                    "PolicyStatus": 2,
                    "ProductElementCode": "R10007",
                    "ProductElementId": 351926021,
                    "RiskName": "InsuredName",
                    "SequenceNumber": 1,
                    "TempData": {
                        "Mask-IdNo": "Jmf1vghdrScrTdpdeyKu7w==",
                        "MaskAfter-IdNo": "IdNo"
                    }
                }
            ],
            "PolicyStatus": 2,
            "ProductCode": "TBTI",
            "ProductElementCode": "TBTI",
            "ProductElementId": 351925023,
            "ProductId": 351925022,
            "ProductLobId": 351925023,
            "SequenceNumber": 1,
            "TechProductCode": "TR_POC",
            "TechProductId": 3516410623456,
            "TotalInsuredCount": 1
        }
    ],
    "PolicyStatus": 1,
    "PolicyStatusForDisplay": 1,
    "PolicyType": "1",
    "PremiumBookExchangeRate": 1,
    "PremiumCurrencyCode": "USD",
    "PremiumLocalExchangeRate": 1,
    "ProductCode": "TBTI",
    "ProductId": 351925022,
    "ProductVersion": "1.0",
    "ProposalDate": "2025-04-15",
    "ProposalNo": "PABTBTI0001352953",
    "ProposalStatus": "1",
    "QuotationDate": "2025-04-15T17:24:19",
    "SchemaVersion": 2,
    "TechProductCode": "TR_POC",
    "TechProductId": 3516410623456,
    "VersionSeq": 1
}
```
* Sample Response--Add a 'PolicyDiscountLoadingList' node to the policy object

```
{
    "@pk": 11309200145,
    "@type": "Policy-POLICY",
    "AgentCode": "XXXX00XX",
    "BookCurrencyCode": "USD",
    "BusinessCateCode": "1",
    "BusinessObjectId": 3517051304219,
    "EffectiveDate": "2025-04-16",
    "ExpiryDate": "2026-04-16",
    "FirstDataEntryDate": "2025-04-15T17:24:18",
    "IsRenewable": "Y",
    "IsTakeUpPolicy": "N",
    "LocalCurrencyCode": "USD",
    "OrgCode": "10001",
    "PolicyElementId": 11309200145,
    "PolicyId": "11309200145,CE2865143A2BC45F65F2417F12B5F226",
    "PolicyStatus": 1,
    "PolicyStatusForDisplay": 1,
    "PolicyType": "1",
    "PremiumBookExchangeRate": 1,
    "PremiumCurrencyCode": "USD",
    "PremiumLocalExchangeRate": 1,
    "ProductCode": "TBTI",
    "ProductId": 351925022,
    "ProductVersion": "1.0",
    "ProposalDate": "2025-04-15",
    "ProposalNo": "PABTBTI0001352953",
    "ProposalStatus": "1",
    "QuotationDate": "2025-04-15T17:24:19",
    "SchemaVersion": 2,
    "TechProductCode": "TR_POC",
    "TechProductId": 3516410623456,
    "VersionSeq": 1,
    "PolicyDiscountLoadingList": [
        {
            "@type": "PolicyDiscountLoading-PolicyDiscountLoading",
            "BusinessObjectId": 646343877,
            "CalculateBase": "1",
            "CalculateSequence": 1,
            "DiscountLoadingApplyType": "A",
            "DiscountLoadingCode": "DiscountloadingTestByRate",
            "DiscountLoadingMode": "R",
            "DiscountLoadingType": "D",
            "ParentPolicyElementId": 11309200145,
            "PolicyId": "11309200145,CE2865143A2BC45F65F2417F12B5F226",
            "PolicyStatus": 2
        }
    ],
    "PolicyLobList": [
        {
            "@pk": 11309200146,
            "@type": "PolicyLob-TR_POC",
            "BusinessObjectId": 351861068,
            "ParentElementType": "POLICY",
            "ParentPolicyElementId": 11309200145,
            "PolicyElementId": 11309200146,
            "PolicyId": "11309200145,CE2865143A2BC45F65F2417F12B5F226",
            "PolicyStatus": 2,
            "ProductCode": "TBTI",
            "ProductElementCode": "TBTI",
            "ProductElementId": 351925023,
            "ProductId": 351925022,
            "ProductLobId": 351925023,
            "SequenceNumber": 1,
            "TechProductCode": "TR_POC",
            "TechProductId": 3516410623456,
            "PolicyRiskList": [
                {
                    "@pk": 11309200147,
                    "@type": "PolicyRisk-R10007",
                    "BusinessObjectId": 351861075,
                    "ParentElementType": "POLICY_LOB",
                    "ParentPolicyElementId": 11309200146,
                    "PolicyElementId": 11309200147,
                    "PolicyId": "11309200145,CE2865143A2BC45F65F2417F12B5F226",
                    "PolicyStatus": 2,
                    "ProductElementCode": "R10007",
                    "ProductElementId": 351926021,
                    "RiskName": "InsuredName",
                    "SequenceNumber": 1,
                    "CustomerName": "StatementPayment",
                    "DateOfBirth": "1988-10-01",
                    "IdNo": "IdNo",
                    "IdType": "1",
                    "PolicyCoverageList": [
                        {
                            "@pk": 11309200148,
                            "@type": "PolicyCoverage-PolicyCoverage",
                            "BusinessObjectId": 351861078,
                            "IsFinalLevelCt": "Y",
                            "ParentElementType": "INSURED",
                            "ParentPolicyElementId": 11309200147,
                            "PolicyElementId": 11309200148,
                            "PolicyId": "11309200145,CE2865143A2BC45F65F2417F12B5F226",
                            "PolicyStatus": 2,
                            "ProductElementCode": "C100692",
                            "ProductElementId": 351926030,
                            "SequenceNumber": 1,
                            "SumInsured": 500000
                        },
                        {
                            "@pk": 11309200149,
                            "@type": "PolicyCoverage-PolicyCoverage",
                            "BusinessObjectId": 351861078,
                            "IsFinalLevelCt": "Y",
                            "ParentElementType": "INSURED",
                            "ParentPolicyElementId": 11309200147,
                            "PolicyElementId": 11309200149,
                            "PolicyId": "11309200145,CE2865143A2BC45F65F2417F12B5F226",
                            "PolicyStatus": 2,
                            "ProductElementCode": "C100715",
                            "ProductElementId": 351926027,
                            "SequenceNumber": 2,
                            "SumInsured": 300000
                        }
                    ],
                    "TempData": {
                        "Mask-IdNo": "Jmf1vghdrScrTdpdeyKu7w==",
                        "MaskAfter-IdNo": "IdNo"
                    }
                }
            ],
            "TotalInsuredCount": 1
        }
    ]
}
```

* {{server}}/proposal/core/policyDiscountLoading/v1/applyPolicyLevelDiscountLoadingToCoverage
* Sample Request--The response data of the API 'autoApplyDiscountLoadingToPolicyLevel' is the request data of this API

```
{
    "@pk": 11309200145,
    "@type": "Policy-POLICY",
    "AgentCode": "XXXX00XX",
    "BookCurrencyCode": "USD",
    "BusinessCateCode": "1",
    "BusinessObjectId": 3517051304219,
    "EffectiveDate": "2025-04-16",
    "ExpiryDate": "2026-04-16",
    "FirstDataEntryDate": "2025-04-15T17:24:18",
    "IsRenewable": "Y",
    "IsTakeUpPolicy": "N",
    "LocalCurrencyCode": "USD",
    "OrgCode": "10001",
    "PolicyElementId": 11309200145,
    "PolicyId": "11309200145,CE2865143A2BC45F65F2417F12B5F226",
    "PolicyStatus": 1,
    "PolicyStatusForDisplay": 1,
    "PolicyType": "1",
    "PremiumBookExchangeRate": 1,
    "PremiumCurrencyCode": "USD",
    "PremiumLocalExchangeRate": 1,
    "ProductCode": "TBTI",
    "ProductId": 351925022,
    "ProductVersion": "1.0",
    "ProposalDate": "2025-04-15",
    "ProposalNo": "PABTBTI0001352953",
    "ProposalStatus": "1",
    "QuotationDate": "2025-04-15T17:24:19",
    "SchemaVersion": 2,
    "TechProductCode": "TR_POC",
    "TechProductId": 3516410623456,
    "VersionSeq": 1,
    "PolicyDiscountLoadingList": [
        {
            "@type": "PolicyDiscountLoading-PolicyDiscountLoading",
            "BusinessObjectId": 646343877,
            "CalculateBase": "1",
            "CalculateSequence": 1,
            "DiscountLoadingApplyType": "A",
            "DiscountLoadingCode": "DiscountloadingTestByRate",
            "DiscountLoadingMode": "R",
            "DiscountLoadingType": "D",
            "ParentPolicyElementId": 11309200145,
            "PolicyId": "11309200145,CE2865143A2BC45F65F2417F12B5F226",
            "PolicyStatus": 2
        }
    ],
    "PolicyLobList": [
        {
            "@pk": 11309200146,
            "@type": "PolicyLob-TR_POC",
            "BusinessObjectId": 351861068,
            "ParentElementType": "POLICY",
            "ParentPolicyElementId": 11309200145,
            "PolicyElementId": 11309200146,
            "PolicyId": "11309200145,CE2865143A2BC45F65F2417F12B5F226",
            "PolicyStatus": 2,
            "ProductCode": "TBTI",
            "ProductElementCode": "TBTI",
            "ProductElementId": 351925023,
            "ProductId": 351925022,
            "ProductLobId": 351925023,
            "SequenceNumber": 1,
            "TechProductCode": "TR_POC",
            "TechProductId": 3516410623456,
            "PolicyRiskList": [
                {
                    "@pk": 11309200147,
                    "@type": "PolicyRisk-R10007",
                    "BusinessObjectId": 351861075,
                    "ParentElementType": "POLICY_LOB",
                    "ParentPolicyElementId": 11309200146,
                    "PolicyElementId": 11309200147,
                    "PolicyId": "11309200145,CE2865143A2BC45F65F2417F12B5F226",
                    "PolicyStatus": 2,
                    "ProductElementCode": "R10007",
                    "ProductElementId": 351926021,
                    "RiskName": "InsuredName",
                    "SequenceNumber": 1,
                    "CustomerName": "StatementPayment",
                    "DateOfBirth": "1988-10-01",
                    "IdNo": "IdNo",
                    "IdType": "1",
                    "PolicyCoverageList": [
                        {
                            "@pk": 11309200148,
                            "@type": "PolicyCoverage-PolicyCoverage",
                            "BusinessObjectId": 351861078,
                            "IsFinalLevelCt": "Y",
                            "ParentElementType": "INSURED",
                            "ParentPolicyElementId": 11309200147,
                            "PolicyElementId": 11309200148,
                            "PolicyId": "11309200145,CE2865143A2BC45F65F2417F12B5F226",
                            "PolicyStatus": 2,
                            "ProductElementCode": "C100692",
                            "ProductElementId": 351926030,
                            "SequenceNumber": 1,
                            "SumInsured": 500000
                        },
                        {
                            "@pk": 11309200149,
                            "@type": "PolicyCoverage-PolicyCoverage",
                            "BusinessObjectId": 351861078,
                            "IsFinalLevelCt": "Y",
                            "ParentElementType": "INSURED",
                            "ParentPolicyElementId": 11309200147,
                            "PolicyElementId": 11309200149,
                            "PolicyId": "11309200145,CE2865143A2BC45F65F2417F12B5F226",
                            "PolicyStatus": 2,
                            "ProductElementCode": "C100715",
                            "ProductElementId": 351926027,
                            "SequenceNumber": 2,
                            "SumInsured": 300000
                        }
                    ],
                    "TempData": {
                        "Mask-IdNo": "Jmf1vghdrScrTdpdeyKu7w==",
                        "MaskAfter-IdNo": "IdNo"
                    }
                }
            ],
            "TotalInsuredCount": 1
        }
    ]
}
```
* Sample Response--Synchronize the 'PolicyDiscountLoadingList' node at the coverage level

```
{
    "@pk": 11309200145,
    "@type": "Policy-POLICY",
    "AgentCode": "XXXX00XX",
    "BookCurrencyCode": "USD",
    "BusinessCateCode": "1",
    "BusinessObjectId": 3517051304219,
    "EffectiveDate": "2025-04-16",
    "ExpiryDate": "2026-04-16",
    "FirstDataEntryDate": "2025-04-15T17:24:18",
    "IsRenewable": "Y",
    "IsTakeUpPolicy": "N",
    "LocalCurrencyCode": "USD",
    "OrgCode": "10001",
    "PolicyElementId": 11309200145,
    "PolicyId": "11309200145,CE2865143A2BC45F65F2417F12B5F226",
    "PolicyStatus": 1,
    "PolicyStatusForDisplay": 1,
    "PolicyType": "1",
    "PremiumBookExchangeRate": 1,
    "PremiumCurrencyCode": "USD",
    "PremiumLocalExchangeRate": 1,
    "ProductCode": "TBTI",
    "ProductId": 351925022,
    "ProductVersion": "1.0",
    "ProposalDate": "2025-04-15",
    "ProposalNo": "PABTBTI0001352953",
    "ProposalStatus": "1",
    "QuotationDate": "2025-04-15T17:24:19",
    "SchemaVersion": 2,
    "TechProductCode": "TR_POC",
    "TechProductId": 3516410623456,
    "VersionSeq": 1,
    "PolicyDiscountLoadingList": [
        {
            "@type": "PolicyDiscountLoading-PolicyDiscountLoading",
            "BusinessObjectId": 646343877,
            "CalculateBase": "1",
            "CalculateSequence": 1,
            "DiscountLoadingApplyType": "A",
            "DiscountLoadingCode": "DiscountloadingTestByRate",
            "DiscountLoadingMode": "R",
            "DiscountLoadingRate": 0.3,
            "DiscountLoadingType": "D",
            "ParentPolicyElementId": 11309200145,
            "PolicyId": "11309200145,CE2865143A2BC45F65F2417F12B5F226",
            "PolicyStatus": 2,
            "SequenceNumber": 1
        }
    ],
    "PolicyLobList": [
        {
            "@pk": 11309200146,
            "@type": "PolicyLob-TR_POC",
            "BusinessObjectId": 351861068,
            "ParentElementType": "POLICY",
            "ParentPolicyElementId": 11309200145,
            "PolicyElementId": 11309200146,
            "PolicyId": "11309200145,CE2865143A2BC45F65F2417F12B5F226",
            "PolicyStatus": 2,
            "ProductCode": "TBTI",
            "ProductElementCode": "TBTI",
            "ProductElementId": 351925023,
            "ProductId": 351925022,
            "ProductLobId": 351925023,
            "SequenceNumber": 1,
            "TechProductCode": "TR_POC",
            "TechProductId": 3516410623456,
            "PolicyRiskList": [
                {
                    "@pk": 11309200147,
                    "@type": "PolicyRisk-R10007",
                    "BusinessObjectId": 351861075,
                    "ParentElementType": "POLICY_LOB",
                    "ParentPolicyElementId": 11309200146,
                    "PolicyElementId": 11309200147,
                    "PolicyId": "11309200145,CE2865143A2BC45F65F2417F12B5F226",
                    "PolicyStatus": 2,
                    "ProductElementCode": "R10007",
                    "ProductElementId": 351926021,
                    "RiskName": "InsuredName",
                    "SequenceNumber": 1,
                    "CustomerName": "StatementPayment",
                    "DateOfBirth": "1988-10-01",
                    "IdNo": "IdNo",
                    "IdType": "1",
                    "PolicyCoverageList": [
                        {
                            "@pk": 11309200148,
                            "@type": "PolicyCoverage-PolicyCoverage",
                            "BusinessObjectId": 351861078,
                            "IsFinalLevelCt": "Y",
                            "ParentElementType": "INSURED",
                            "ParentPolicyElementId": 11309200147,
                            "PolicyDiscountLoadingDetailList": [
                                {
                                    "@type": "PolicyDiscountLoadingDetail-PolicyDiscountLoadingDetail",
                                    "BusinessObjectId": 646364333,
                                    "CalculateBase": "1",
                                    "CalculateSequence": 1,
                                    "DiscountLoadingCode": "DiscountloadingTestByRate",
                                    "DiscountLoadingMode": "R",
                                    "DiscountLoadingRate": 0.3,
                                    "DiscountLoadingType": "D",
                                    "PolicyStatus": 2
                                }
                            ],
                            "PolicyElementId": 11309200148,
                            "PolicyId": "11309200145,CE2865143A2BC45F65F2417F12B5F226",
                            "PolicyStatus": 2,
                            "ProductElementCode": "C100692",
                            "ProductElementId": 351926030,
                            "SequenceNumber": 1,
                            "SumInsured": 500000
                        },
                        {
                            "@pk": 11309200149,
                            "@type": "PolicyCoverage-PolicyCoverage",
                            "BusinessObjectId": 351861078,
                            "IsFinalLevelCt": "Y",
                            "ParentElementType": "INSURED",
                            "ParentPolicyElementId": 11309200147,
                            "PolicyDiscountLoadingDetailList": [
                                {
                                    "@type": "PolicyDiscountLoadingDetail-PolicyDiscountLoadingDetail",
                                    "BusinessObjectId": 646364333,
                                    "CalculateBase": "1",
                                    "CalculateSequence": 1,
                                    "DiscountLoadingCode": "DiscountloadingTestByRate",
                                    "DiscountLoadingMode": "R",
                                    "DiscountLoadingRate": 0.3,
                                    "DiscountLoadingType": "D",
                                    "PolicyStatus": 2
                                }
                            ],
                            "PolicyElementId": 11309200149,
                            "PolicyId": "11309200145,CE2865143A2BC45F65F2417F12B5F226",
                            "PolicyStatus": 2,
                            "ProductElementCode": "C100715",
                            "ProductElementId": 351926027,
                            "SequenceNumber": 2,
                            "SumInsured": 300000
                        }
                    ],
                    "TempData": {
                        "Mask-IdNo": "Jmf1vghdrScrTdpdeyKu7w==",
                        "MaskAfter-IdNo": "IdNo"
                    }
                }
            ],
            "TotalInsuredCount": 1
        }
    ]
}
```

* {{server}}/proposal/core/policyDiscountLoading/v1/sumCoverageLevelDiscountLoadingToPolicyLevel 
* Sample Request -- Add 'TotalAmount' to 'PolicyDiscountLoadingDetailList' on the coverage

```
{
    "AdjustedPremium": 32.4,
    "AgentCode": "XXXX00XX",
    "AnnualPremium": 30,
    "BeforeVatPremium": 30,
    "BookCurrencyCode": "USD",
    "BusinessCateCode": "1",
    "BusinessObjectId": 3517051304219,
    "Commission": 3,
    "CommissionRate": 0.1,
    "DuePremium": 32.4,
    "EffectiveDate": "2025-04-16",
    "ExpiryDate": "2026-04-16",
    "FirstDataEntryDate": "2025-04-15T17:24:18",
    "GrossPremium": 32.4,
    "InterestRate": 0,
    "IsPremiumCalcSuccess": "Y",
    "IsRenewable": "Y",
    "IsTakeUpPolicy": "N",
    "LocalCurrencyCode": "USD",
    "OrgCode": "10001",
    "POIRate": 1,
    "PolicyDiscountLoadingList": [
        {
            "BusinessObjectId": 646343877,
            "CalculateBase": "1",
            "CalculateSequence": 1,
            "DiscountLoadingApplyType": "A",
            "DiscountLoadingCode": "DiscountloadingTestByRate",
            "DiscountLoadingMode": "R",
            "DiscountLoadingRate": 0.3,
            "DiscountLoadingType": "D",
            "ParentElementType": "POLICY",
            "ParentPolicyElementId": 11309200145,
            "PolicyElementId": 11309120163,
            "PolicyId": "11309200145,CE2865143A2BC45F65F2417F12B5F226",
            "PolicyStatus": 2,
            "SequenceNumber": 1
        }
    ],
    "PolicyElementId": 11309200145,
    "PolicyId": "11309200145,CE2865143A2BC45F65F2417F12B5F226",
    "PolicyLobList": [
        {
            "AdjustedPremium": 32.4,
            "BeforeVatPremium": 30,
            "BusinessObjectId": 351861068,
            "DuePremium": 32.4,
            "GrossPremium": 32.4,
            "ParentElementType": "POLICY",
            "ParentPolicyElementId": 11309200145,
            "PolicyElementId": 11309200146,
            "PolicyFormList": [
                {
                    "BusinessObjectId": 545421343,
                    "CustomFormContent": "Policy holder is subject to 1000 amount of sum Insured.",
                    "CustomFormContentAuto": "Policy holder is subject to 300000 amount of sum Insured.",
                    "CustomFormNo": "F2201716-2023",
                    "CustomFormTitle": "Delay Clause",
                    "IsAutoAttachedForm": "Y",
                    "IsCustomForm": "N",
                    "IsFinalLevelCt": "Y",
                    "IsManuallyModifyContent": "N",
                    "ParentElementType": "POLICY_LOB",
                    "ParentPolicyElementId": 11309200146,
                    "PolicyElementId": 11309120164,
                    "PolicyId": "11309200145,CE2865143A2BC45F65F2417F12B5F226",
                    "PolicyStatus": 2,
                    "ProductElementCode": "F2201716",
                    "ProductElementId": 545420181,
                    "SequenceNumber": 1
                }
            ],
            "PolicyId": "11309200145,CE2865143A2BC45F65F2417F12B5F226",
            "PolicyRiskList": [
                {
                    "AdjustedPremium": 32.4,
                    "Age": 36,
                    "BeforeVatPremium": 30,
                    "BusinessObjectId": 351861075,
                    "CustomerName": "StatementPayment",
                    "DateOfBirth": "1988-10-01",
                    "DuePremium": 32.4,
                    "GrossPremium": 32.4,
                    "IdNo": "IdNo",
                    "IdType": "1",
                    "ParentElementType": "POLICY_LOB",
                    "ParentPolicyElementId": 11309200146,
                    "PolicyCoverageList": [
                        {
                            "AdjustedPremium": 10.8,
                            "AnnualPremium": 10,
                            "BeforeVatPremium": 10,
                            "BusinessObjectId": 351861078,
                            "CoverageName": "Baggage Loss or Damage",
                            "DiscountLoadingDetailData": "[{\"@type\":\"PolicyDiscountLoadingDetail-PolicyDiscountLoadingDetail\",\"BusinessObjectId\":646364333,\"CalculateBase\":\"1\",\"CalculateSequence\":1,\"DiscountLoadingCode\":\"DiscountloadingTestByRate\",\"DiscountLoadingMode\":\"R\",\"DiscountLoadingRate\":0.3,\"DiscountLoadingType\":\"D\",\"ParentPolicyElementId\":11309200148,\"PolicyStatus\":2}]",
                            "DuePremium": 10.8,
                            "GrossPremium": 10.8,
                            "IsFinalLevelCt": "Y",
                            "ParentElementType": "INSURED",
                            "ParentPolicyElementId": 11309200147,
                            "PolicyDiscountLoadingDetailList": [
                                {
                                    "BusinessObjectId": 646364333,
                                    "CalculateBase": "1",
                                    "CalculateSequence": 1,
                                    "DiscountLoadingCode": "DiscountloadingTestByRate",
                                    "DiscountLoadingMode": "R",
                                    "DiscountLoadingRate": 0.3,
                                    "DiscountLoadingType": "D",
                                    "ParentPolicyElementId": 11309200148,
                                    "PolicyStatus": 2,
                                    "TotalAmount": 3
                                }
                            ],
                            "PolicyElementId": 11309200148,
                            "PolicyId": "11309200145,CE2865143A2BC45F65F2417F12B5F226",
                            "PolicyStatus": 2,
                            "ProductElementCode": "C100692",
                            "ProductElementId": 351926030,
                            "SequenceNumber": 1,
                            "SumInsured": 500000,
                            "Vat": 0.8
                        },
                        {
                            "AdjustedPremium": 21.6,
                            "AnnualPremium": 20,
                            "BeforeVatPremium": 20,
                            "BusinessObjectId": 351861078,
                            "CoverageName": "Travel Delay",
                            "DiscountLoadingDetailData": "[{\"@type\":\"PolicyDiscountLoadingDetail-PolicyDiscountLoadingDetail\",\"BusinessObjectId\":646364333,\"CalculateBase\":\"1\",\"CalculateSequence\":1,\"DiscountLoadingCode\":\"DiscountloadingTestByRate\",\"DiscountLoadingMode\":\"R\",\"DiscountLoadingRate\":0.3,\"DiscountLoadingType\":\"D\",\"ParentPolicyElementId\":11309200149,\"PolicyStatus\":2}]",
                            "DuePremium": 21.6,
                            "GrossPremium": 21.6,
                            "IsFinalLevelCt": "Y",
                            "ParentElementType": "INSURED",
                            "ParentPolicyElementId": 11309200147,
                            "PolicyDiscountLoadingDetailList": [
                                {
                                    "BusinessObjectId": 646364333,
                                    "CalculateBase": "1",
                                    "CalculateSequence": 1,
                                    "DiscountLoadingCode": "DiscountloadingTestByRate",
                                    "DiscountLoadingMode": "R",
                                    "DiscountLoadingRate": 0.3,
                                    "DiscountLoadingType": "D",
                                    "ParentPolicyElementId": 11309200149,
                                    "PolicyStatus": 2,
                                    "TotalAmount": 6
                                }
                            ],
                            "PolicyElementId": 11309200149,
                            "PolicyId": "11309200145,CE2865143A2BC45F65F2417F12B5F226",
                            "PolicyStatus": 2,
                            "ProductElementCode": "C100715",
                            "ProductElementId": 351926027,
                            "SequenceNumber": 2,
                            "SumInsured": 300000,
                            "Vat": 1.6
                        }
                    ],
                    "PolicyElementId": 11309200147,
                    "PolicyId": "11309200145,CE2865143A2BC45F65F2417F12B5F226",
                    "PolicyStatus": 2,
                    "ProductElementCode": "R10007",
                    "ProductElementId": 351926021,
                    "RiskName": "InsuredName",
                    "SequenceNumber": 1,
                    "SumInsured": 800000,
                    "Vat": 2.4,
                    "TempData": {
                        "Mask-IdNo": "Jmf1vghdrScrTdpdeyKu7w==",
                        "MaskAfter-IdNo": "IdNo"
                    }
                }
            ],
            "PolicyStatus": 2,
            "ProductCode": "TBTI",
            "ProductElementCode": "TBTI",
            "ProductElementId": 351925023,
            "ProductId": 351925022,
            "ProductLobId": 351925023,
            "SequenceNumber": 1,
            "SumInsured": 800000,
            "TechProductCode": "TR_POC",
            "TechProductId": 3516410623456,
            "TotalInsuredCount": 1,
            "Vat": 2.4
        }
    ],
    "PolicyStatus": 1,
    "PolicyStatusForDisplay": 1,
    "PolicyType": "1",
    "PremCalcFactorHash": "20250415_173328_203,NfX7hcV4GkNl1yE1VOt6qH4sdXSYe62AHCsVkADaBp0=",
    "PremCalcResultHash": "20250415_173328_209,bV76qs2G8FdFPubffIDnajHJ81VOyewHx2q3LfeXVZ4=",
    "PremiumBookExchangeRate": 1,
    "PremiumCurrencyCode": "USD",
    "PremiumInterest": 0,
    "PremiumLocalExchangeRate": 1,
    "ProductCode": "TBTI",
    "ProductId": 351925022,
    "ProductVersion": "1.0",
    "ProposalDate": "2025-04-15",
    "ProposalNo": "PABTBTI0001352953",
    "ProposalStatus": "1",
    "QuotationDate": "2025-04-15T17:24:19",
    "SchemaVersion": 2,
    "SumInsured": 800000,
    "TaxInterest": 0,
    "TechProductCode": "TR_POC",
    "TechProductId": 3516410623456,
    "TotalInterest": 0,
    "TotalPremium": 32.4,
    "Vat": 2.4,
    "VatRate": 0.08,
    "VersionSeq": 2
}
```

* Sample Response -- Summarize the 'TotalAmount' on the 'PolicyDiscountLoadingDetailList' in the coverage to the policy level

```
{
    "@pk": 11309200145,
    "@type": "Policy-POLICY",
    "AdjustedPremium": 32.4,
    "AgentCode": "XXXX00XX",
    "BeforeVatPremium": 30,
    "BookCurrencyCode": "USD",
    "BusinessCateCode": "1",
    "BusinessObjectId": 3517051304219,
    "Commission": 3,
    "DuePremium": 32.4,
    "EffectiveDate": "2025-04-16",
    "ExpiryDate": "2026-04-16",
    "FirstDataEntryDate": "2025-04-15T17:24:18",
    "GrossPremium": 32.4,
    "IsPremiumCalcSuccess": "Y",
    "IsRenewable": "Y",
    "IsTakeUpPolicy": "N",
    "LocalCurrencyCode": "USD",
    "OrgCode": "10001",
    "PolicyElementId": 11309200145,
    "PolicyId": "11309200145,CE2865143A2BC45F65F2417F12B5F226",
    "PolicyStatus": 1,
    "PolicyStatusForDisplay": 1,
    "PolicyType": "1",
    "PremCalcFactorHash": "20250415_173328_203,NfX7hcV4GkNl1yE1VOt6qH4sdXSYe62AHCsVkADaBp0=",
    "PremCalcResultHash": "20250415_173328_209,bV76qs2G8FdFPubffIDnajHJ81VOyewHx2q3LfeXVZ4=",
    "PremiumBookExchangeRate": 1,
    "PremiumCurrencyCode": "USD",
    "PremiumLocalExchangeRate": 1,
    "ProductCode": "TBTI",
    "ProductId": 351925022,
    "ProductVersion": "1.0",
    "ProposalDate": "2025-04-15",
    "ProposalNo": "PABTBTI0001352953",
    "ProposalStatus": "1",
    "QuotationDate": "2025-04-15T17:24:19",
    "SchemaVersion": 2,
    "SumInsured": 800000,
    "TechProductCode": "TR_POC",
    "TechProductId": 3516410623456,
    "Vat": 2.4,
    "VersionSeq": 2,
    "AnnualPremium": 30,
    "CommissionRate": 0.1,
    "InterestRate": 0,
    "POIRate": 1,
    "PolicyDiscountLoadingList": [
        {
            "@pk": 11309120163,
            "@type": "PolicyDiscountLoading-PolicyDiscountLoading",
            "BusinessObjectId": 646343877,
            "CalculateBase": "1",
            "CalculateSequence": 1,
            "DiscountLoadingApplyType": "A",
            "DiscountLoadingCode": "DiscountloadingTestByRate",
            "DiscountLoadingMode": "R",
            "DiscountLoadingRate": 0.3,
            "DiscountLoadingType": "D",
            "ParentElementType": "POLICY",
            "ParentPolicyElementId": 11309200145,
            "PolicyElementId": 11309120163,
            "PolicyId": "11309200145,CE2865143A2BC45F65F2417F12B5F226",
            "PolicyStatus": 2,
            "SequenceNumber": 1,
            "TotalAmount": 9
        }
    ],
    "PolicyLobList": [
        {
            "@pk": 11309200146,
            "@type": "PolicyLob-TR_POC",
            "AdjustedPremium": 32.4,
            "BeforeVatPremium": 30,
            "BusinessObjectId": 351861068,
            "DuePremium": 32.4,
            "GrossPremium": 32.4,
            "ParentElementType": "POLICY",
            "ParentPolicyElementId": 11309200145,
            "PolicyElementId": 11309200146,
            "PolicyId": "11309200145,CE2865143A2BC45F65F2417F12B5F226",
            "PolicyStatus": 2,
            "ProductCode": "TBTI",
            "ProductElementCode": "TBTI",
            "ProductElementId": 351925023,
            "ProductId": 351925022,
            "ProductLobId": 351925023,
            "SequenceNumber": 1,
            "SumInsured": 800000,
            "TechProductCode": "TR_POC",
            "TechProductId": 3516410623456,
            "Vat": 2.4,
            "PolicyFormList": [
                {
                    "@pk": 11309120164,
                    "@type": "PolicyForm-PolicyForm",
                    "BusinessObjectId": 545421343,
                    "CustomFormContent": "Policy holder is subject to 1000 amount of sum Insured.",
                    "CustomFormContentAuto": "Policy holder is subject to 300000 amount of sum Insured.",
                    "CustomFormNo": "F2201716-2023",
                    "CustomFormTitle": "Delay Clause",
                    "IsAutoAttachedForm": "Y",
                    "IsCustomForm": "N",
                    "IsFinalLevelCt": "Y",
                    "IsManuallyModifyContent": "N",
                    "ParentElementType": "POLICY_LOB",
                    "ParentPolicyElementId": 11309200146,
                    "PolicyElementId": 11309120164,
                    "PolicyId": "11309200145,CE2865143A2BC45F65F2417F12B5F226",
                    "PolicyStatus": 2,
                    "ProductElementCode": "F2201716",
                    "ProductElementId": 545420181,
                    "SequenceNumber": 1
                }
            ],
            "PolicyRiskList": [
                {
                    "@pk": 11309200147,
                    "@type": "PolicyRisk-R10007",
                    "AdjustedPremium": 32.4,
                    "BeforeVatPremium": 30,
                    "BusinessObjectId": 351861075,
                    "DuePremium": 32.4,
                    "GrossPremium": 32.4,
                    "ParentElementType": "POLICY_LOB",
                    "ParentPolicyElementId": 11309200146,
                    "PolicyElementId": 11309200147,
                    "PolicyId": "11309200145,CE2865143A2BC45F65F2417F12B5F226",
                    "PolicyStatus": 2,
                    "ProductElementCode": "R10007",
                    "ProductElementId": 351926021,
                    "RiskName": "InsuredName",
                    "SequenceNumber": 1,
                    "SumInsured": 800000,
                    "Vat": 2.4,
                    "Age": 36,
                    "CustomerName": "StatementPayment",
                    "DateOfBirth": "1988-10-01",
                    "IdNo": "IdNo",
                    "IdType": "1",
                    "PolicyCoverageList": [
                        {
                            "@pk": 11309200148,
                            "@type": "PolicyCoverage-PolicyCoverage",
                            "AdjustedPremium": 10.8,
                            "AnnualPremium": 10,
                            "BeforeVatPremium": 10,
                            "BusinessObjectId": 351861078,
                            "DiscountLoadingDetailData": "[{\"@type\":\"PolicyDiscountLoadingDetail-PolicyDiscountLoadingDetail\",\"BusinessObjectId\":646364333,\"CalculateBase\":\"1\",\"CalculateSequence\":1,\"DiscountLoadingCode\":\"DiscountloadingTestByRate\",\"DiscountLoadingMode\":\"R\",\"DiscountLoadingRate\":0.3,\"DiscountLoadingType\":\"D\",\"ParentPolicyElementId\":11309200148,\"PolicyStatus\":2}]",
                            "DuePremium": 10.8,
                            "GrossPremium": 10.8,
                            "IsFinalLevelCt": "Y",
                            "ParentElementType": "INSURED",
                            "ParentPolicyElementId": 11309200147,
                            "PolicyDiscountLoadingDetailList": [
                                {
                                    "@type": "PolicyDiscountLoadingDetail-PolicyDiscountLoadingDetail",
                                    "BusinessObjectId": 646364333,
                                    "CalculateBase": "1",
                                    "CalculateSequence": 1,
                                    "DiscountLoadingCode": "DiscountloadingTestByRate",
                                    "DiscountLoadingMode": "R",
                                    "DiscountLoadingRate": 0.3,
                                    "DiscountLoadingType": "D",
                                    "ParentPolicyElementId": 11309200148,
                                    "PolicyStatus": 2,
                                    "TotalAmount": 3
                                }
                            ],
                            "PolicyElementId": 11309200148,
                            "PolicyId": "11309200145,CE2865143A2BC45F65F2417F12B5F226",
                            "PolicyStatus": 2,
                            "ProductElementCode": "C100692",
                            "ProductElementId": 351926030,
                            "SequenceNumber": 1,
                            "SumInsured": 500000,
                            "Vat": 0.8,
                            "CoverageName": "Baggage Loss or Damage"
                        },
                        {
                            "@pk": 11309200149,
                            "@type": "PolicyCoverage-PolicyCoverage",
                            "AdjustedPremium": 21.6,
                            "AnnualPremium": 20,
                            "BeforeVatPremium": 20,
                            "BusinessObjectId": 351861078,
                            "DiscountLoadingDetailData": "[{\"@type\":\"PolicyDiscountLoadingDetail-PolicyDiscountLoadingDetail\",\"BusinessObjectId\":646364333,\"CalculateBase\":\"1\",\"CalculateSequence\":1,\"DiscountLoadingCode\":\"DiscountloadingTestByRate\",\"DiscountLoadingMode\":\"R\",\"DiscountLoadingRate\":0.3,\"DiscountLoadingType\":\"D\",\"ParentPolicyElementId\":11309200149,\"PolicyStatus\":2}]",
                            "DuePremium": 21.6,
                            "GrossPremium": 21.6,
                            "IsFinalLevelCt": "Y",
                            "ParentElementType": "INSURED",
                            "ParentPolicyElementId": 11309200147,
                            "PolicyDiscountLoadingDetailList": [
                                {
                                    "@type": "PolicyDiscountLoadingDetail-PolicyDiscountLoadingDetail",
                                    "BusinessObjectId": 646364333,
                                    "CalculateBase": "1",
                                    "CalculateSequence": 1,
                                    "DiscountLoadingCode": "DiscountloadingTestByRate",
                                    "DiscountLoadingMode": "R",
                                    "DiscountLoadingRate": 0.3,
                                    "DiscountLoadingType": "D",
                                    "ParentPolicyElementId": 11309200149,
                                    "PolicyStatus": 2,
                                    "TotalAmount": 6
                                }
                            ],
                            "PolicyElementId": 11309200149,
                            "PolicyId": "11309200145,CE2865143A2BC45F65F2417F12B5F226",
                            "PolicyStatus": 2,
                            "ProductElementCode": "C100715",
                            "ProductElementId": 351926027,
                            "SequenceNumber": 2,
                            "SumInsured": 300000,
                            "Vat": 1.6,
                            "CoverageName": "Travel Delay"
                        }
                    ],
                    "TempData": {
                        "Mask-IdNo": "Jmf1vghdrScrTdpdeyKu7w==",
                        "MaskAfter-IdNo": "IdNo"
                    }
                }
            ],
            "TotalInsuredCount": 1
        }
    ],
    "PremiumInterest": 0,
    "TaxInterest": 0,
    "TotalInterest": 0,
    "TotalPremium": 32.4,
    "VatRate": 0.08
}
```

