# Fare Class Example Requests and Responses

## Full Fare Class Creation Request and Successful Response

### Request

```json
{
  "fareClassCtrl": {
    "carrier": "AA",
    "tariff": "IPRA",
    "rule": "5API",
    "actionCode": "N",
    "fareClass": "DHJHXTUI",
    "fareType": "EIP",
    "normalSpecial": "S",
    "display": "N",
    "owRt": "1",
    "fareClassDetail": [
      {
        "rbdCodeItems": ["AB"],
        "psgrType": "INF"
      }
    ],
    "workUnit": {
      "organization": "AA",
      "workUnitName": "APImaxLen",
      "exclusiveAccess": "Y",
      "emailNotification": "test@atpco.net"
    },
    "batch": {
      "batchEffDt": "20261201",
      "comments": "Intl Pub Tariff"
    }
  }
}
```

### Response

```json
{
  "fareClassCtrl": {
    "workUnit": {
      "workUnitId": "AA-23NOV26-37"
    },
    "carrier": "AA",
    "tariff": "IPRA",
    "rule": "5API",
    "fareClass": "DHJHXTUI",
    "batch": {
      "batchId": "8117368"
    },
    "seqNum": "5000000"
  }
}
```

## Response With Error

The following shows the response when `carrier` fails validation because an invalid code (`"A9"`) was submitted. The response echoes the original request and identifies the field in error:

```json
{
  "msgs": {
    "errors": [
      "Fare Class request is unsuccessful",
      "[carrier] - Request argument has invalid value and/or format"
    ]
  },
  "fareClassCtrl": {
    "carrier": "A9",
    "tariff": "IPRA",
    "rule": "5API",
    "actionCode": "N",
    "fareClass": "DHJHXTUI"
  }
}
```
