# Loyalty Rewards UTA

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

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

## Overview

This feature allows clients to extend their response with the Loyalty Rewards new UTA category, which provides information about mileage rewards accrued through an airline frequent flyer program when a passenger travels on the airline. This does not include credit card reward programs. Loyalty Rewards UTAs are retrieved from Branded Fares Features Tables and data is sourced from Optional Services, including sub codes with Group FF, Sub Group MG, and Description anything other than TA, and/or sub codes with Group BF, Sub Group FR, and Description anything other than PY.

Clients that already utilize the `ticket_attributes_filter` field to filter only a specific subset of UTA categories can extend their filter by adding `loyalty_rewards` to the list. Additionally, clients that utilize the `uta_application_filter` can now use the `loyalty_rewards` field to filter the Loyalty Rewards UTAs by their `application`. For more information on the UTA filters, see the [Requests page](../docs/rh-cons-endpoint#utas-control).

```json
{
    "control": {
        "includes": ["uta"],
        "features": ["loyalty_rewards"],
        "ticket_attributes_filter": [
            ...
            "loyalty_rewards"
        ]
    },
    ...
}
```

## Example Response Structure

Loyalty Rewards UTAs follow the same structure as the other UTA categories which get sourced from Optional Services:

```json
{
  "data": {
    ...
    "loyalty_rewards": [
      {
        "application": "not offered",
        "assessment": "Restriction",
        "code": "06B",
        "commercial_name": "50 PERCENT MILES EARNED",
        "description": "Mileage Accrual not available",
        "group_code": "BF",
        "headline": "50 Percent Miles Earned",
        "id": "377091",
        "large_icon_url": "https://upamedia.atpco.net/icons/62729fb2-e455-4b67-a296-9424e4d2bfac/large/loyalty-program.png?channel_id=ATPCO",
        "small_icon_url": "https://upamedia.atpco.net/icons/62729fb2-e455-4b67-a296-9424e4d2bfac/small/loyalty-program.png?channel_id=ATPCO",
        "sub_group_code": "FR"
      },
      {
        "application": "not offered",
        "assessment": "Restriction",
        "code": "06M",
        "commercial_name": "150 PERCENT MILES EARNED",
        "description": "Mileage Accrual not available",
        "group_code": "BF",
        "headline": "150 Percent Miles Earned",
        "id": "377859",
        "large_icon_url": "https://upamedia.atpco.net/icons/62729fb2-e455-4b67-a296-9424e4d2bfac/large/loyalty-program.png?channel_id=ATPCO",
        "small_icon_url": "https://upamedia.atpco.net/icons/62729fb2-e455-4b67-a296-9424e4d2bfac/small/loyalty-program.png?channel_id=ATPCO",
        "sub_group_code": "FR"
      },
      {
        "application": "not offered",
        "assessment": "Restriction",
        "code": "06E",
        "commercial_name": "115 PERCENT MILES EARNED",
        "description": "Mileage Accrual not available",
        "group_code": "BF",
        "headline": "115 Percent Miles Earned",
        "id": "377603",
        "large_icon_url": "https://upamedia.atpco.net/icons/62729fb2-e455-4b67-a296-9424e4d2bfac/large/loyalty-program.png?channel_id=ATPCO",
        "small_icon_url": "https://upamedia.atpco.net/icons/62729fb2-e455-4b67-a296-9424e4d2bfac/small/loyalty-program.png?channel_id=ATPCO",
        "sub_group_code": "FR"
      },
      {
        "application": "free",
        "assessment": "Benefit",
        "code": "06R",
        "commercial_name": "125 PERCENT MILES EARNED",
        "description": "125 Percent Miles Earned",
        "group_code": "BF",
        "headline": "125 Percent Miles Earned",
        "id": "378145",
        "large_icon_url": "https://upamedia.atpco.net/icons/62729fb2-e455-4b67-a296-9424e4d2bfac/large/loyalty-program.png?channel_id=ATPCO",
        "small_icon_url": "https://upamedia.atpco.net/icons/62729fb2-e455-4b67-a296-9424e4d2bfac/small/loyalty-program.png?channel_id=ATPCO",
        "sub_group_code": "FR"
      }
    ],
    ...
  },
  "itineraries": [
    {
      "data": {
        "legs": [
          {
            "fares": [
              {
                "segments": [
                  {
                    ...
                    "loyalty_rewards": [
                      [
                        "377091",
                        "377347",
                        "377603",
                        "378145"
                      ]
                    ],
                    ...
                  }
                ]
              }
            ],
            ...
          }
        ]
      },
      ...
    }
  ],
  "uuid": "..."
}
```
