# Fee Application fields for Policies

This feature can be enabled in the API request by including:

```json
"control": {
    "features": [
        "policy_fee_application"
    ]
}
```

## Overview

This feature allows clients to extend their change UTA attribute response with an additional policy information to penalty fees to assess penalty fees for the entire journey. This feature will show the field called **fee_application**. The data for this field is based on the filed fare policy data in Category 31.

This feature only provides additional details for clients to calculate the overall penalty fees for the entire journey should they decide to assess it. Below shows the information for clients to use the fee application values to assess the resulting fees.

## Voluntary Changes Penalty Fees

Once change policy information is returned in the API for each fare component, including fee application details, the data in the Fee Application field will specify how to assess the change fee. For the purposes of this field, a fare component is considered changed if one or more ticketed flights and/or the ticketed price of the fare component have changed. A pricing unit is considered changed if one or more of its fare components is changed.

### Advance Change values

| `fee_application` | Description                                                                                                                                                 |
|-------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 0                 | Not Applicable                                                                                                                                              |
| 1                 | From among all changed fare components, apply the highest change fee.                                                                                       |
| 2                 | From among all fare components, changed and unchanged, apply the highest change fee.                                                                        |
| 3                 | Apply the sum of the change fees of all changed fare components.                                                                                            |
| 4                 | From among all fare components within changed pricing units, apply the highest change fee.                                                                  |
| 5                 | From among all fare components within 1) changed pricing units and 2) pricing units to which a fare component has been added, apply the highest change fee. |

If all fare components have the same value in the Fee Application Field, then proceed with assessing the penalty fee as described in the table above. If that is not the case, then the following processing logic applies when all fare components on the ticket do not have the same values in the Fee Application field (byte 105).

``` txt
1. Is the validating carrier (reissuing carrier) the fare owner of one or more fare components on
   the previous ticket?
   i. If yes:
      a. Determine the highest Fee Application value of all fare components on the previous ticket
         that are owned by the validating carrier according to this hierarchy, reading from left
         to right: 3 -> 2 -> 5 -> 4 -> 1
      b. Process all fare components on the previous itinerary as if each contained the value of
         Fee Application (byte 105) found in Step 1.i.a.
   ii. If no:
      a. Determine the highest Fee Application (byte 105) value of all fare components on the
         previous ticket according to this hierarchy, reading from left to right: 2-> 5 -> 4-> 1 -> 3
      b. Process all fare components on the previous itinerary as if each contained the value
         of Fee Application (byte 105) found in Step 1.ii.a.
```

### Advance Change example response

```json
"advance_change": [
    {
        "assessment": "benefit",
        "description": "Change allowed for free",
        "fee": {
            "amount": 0,
            "currency": "USD"
        },
        "fee_application": 1,
        "headline": "Free",
        "id": "1"
    }
],
```
