{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/finbourne/json-schema/finbourne-fee-request-schema.json",
  "title": "FeeRequest",
  "x-generated": "2026-12-01",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/finbourne-lusid-openapi.json#/components/schemas/FeeRequest",
  "required": [
    "accrualCurrency",
    "businessDayConvention",
    "code",
    "displayName",
    "feeTypeId",
    "payableFrequency",
    "startDate",
    "treatment"
  ],
  "type": "object",
  "properties": {
    "code": {
      "maxLength": 64,
      "minLength": 1,
      "pattern": "^[a-zA-Z0-9\\-_]+$",
      "type": "string",
      "description": "The code of the Fee."
    },
    "feeTypeId": {
      "$ref": "#/$defs/ResourceId"
    },
    "displayName": {
      "maxLength": 256,
      "minLength": 1,
      "type": "string",
      "description": "The name of the Fee."
    },
    "description": {
      "maxLength": 1024,
      "minLength": 0,
      "pattern": "^[\\s\\S]*$",
      "type": [
        "string",
        "null"
      ],
      "description": "A description for the Fee."
    },
    "origin": {
      "maxLength": 512,
      "minLength": 1,
      "type": [
        "string",
        "null"
      ],
      "description": "The origin or source of the Fee accrual."
    },
    "calculationBase": {
      "maxLength": 1024,
      "minLength": 0,
      "type": [
        "string",
        "null"
      ],
      "description": "The calculation base for a Fee that is calculated using a percentage (TotalAnnualAccrualAmount and CalculationBase cannot both be present). An arithmetic expression (+, -, *, /, numeric literals) over data points from the valuation point being calculated and from the previous valuation point (via the \"Previous.\" prefix; these resolve to zero at a fund's first valuation point). All values are in the fund currency unless stated otherwise. When the Fee is a NonShareClassSpecific Fee (i.e: when ShareClasses contains no values), the available data points are: \"GAV\", \"NAVPreFees\" (GAV adjusted for external fees, before any fee accruals), \"Amount\" (the previous valuation point's NAV), \"Dealing[dealingFilterId]\", \"BackOut[backOutFilterId]\", \"PnL[pnlFilterId]\", \"ExternalFees[externalFeeFilterId]\", \"Fees[feeCode].Amount|TotalAccrual|PreviousTotalAccrual|CalculationBase\", \"Properties[Fund/scope/code]\" (numeric, non-derived fund properties), and under the \"Previous.\" prefix: \"Previous.GAV\", \"Previous.NAV\", \"Previous.Dealing[id]\", \"Previous.BackOut[id]\", \"Previous.PnL[id]\", \"Previous.ExternalFees[id]\" and \"Previous.Fees[feeCode].Amount|TotalAccrual|CalculationBase\". \"GAV\" is the gross asset value before any external fees, whereas \"Previous.GAV\" is the previous valuation point's reported GAV, which is after any external fees that apply to a PnL bucket; for a like-for-like period comparison use \"NAVPreFees\" against \"Previous.NAV\". \"ExternalFees[id]\" is the sum of the fund level external fees (positive amounts) and the share class external fees (booked as negative movements) matching the filter. Each id must be one the fund configuration defines: a filter id, or on a fund configuration with bucket sets, a bucket id of the apportionment bucket set of the matching bucket type (BackOut is not available with bucket sets). For example: \"10000.00\", \"GAV\", \"GAV - Fees[FeeCode1].Amount\", \"Previous.NAV - Dealing[Redemptions] + Dealing[Subscriptions]\". When the Fee is a ShareClass Fee (i.e: when ShareClasses contains at least one value), the same data points are available for the share class under the \"ShareClass.\" prefix (e.g. \"ShareClass.GAV\", \"ShareClass.Previous.NAV\", \"ShareClass.Fees[FeeCode1].Amount\"), with \"ShareClass.PreviousNAV\" as the previous NAV, plus \"ShareClass.DealingUnits[id]\", \"ShareClass.CapitalRatio\", \"ShareClass.Previous.SharesInIssue\", \"ShareClass.Previous.UnitPrice\", and the share class currency data points \"ShareClass.ShareClassCcyGAV\", \"ShareClass.ShareClassCcyPreviousNAV\", \"ShareClass.ShareClassCcyNAVPreFees\", \"ShareClass.ShareClassCcyGAVPreManagementFees\", \"ShareClass.ShareClassCcyPerformanceFeeGAV\", \"ShareClass.ShareClassToFundFxRate\", \"ShareClass.PreviousShareClassToFundFxRate\", \"ShareClass.Previous.ShareClassCcyGAV\" and \"ShareClass.Previous.ShareClassCcyNAV\". The expression must evaluate to a fund currency amount, so convert any share class currency data point explicitly, e.g. \"ShareClass.Previous.ShareClassCcyNAV * ShareClass.ShareClassToFundFxRate\". \"ShareClass.ExternalFees[id]\" and \"ShareClass.Previous.ExternalFees[id]\" are both the external fees booked to the share class itself. Two pre-defined bases control the order fees are calculated in: fees are calculated in three tiers, and a fee's tier is fixed by its calculation base at creation. \"GAVPreManagementFees\" (NAVPreFees less the accruals of all Ordinary tier fees) makes the fee a Management tier fee, calculated after all Ordinary fees. \"PerformanceFeeGAV\" (NAVPreFees less the accruals of all Ordinary and Management tier fees) makes the fee a Performance tier fee, calculated last. Any other base makes the fee an Ordinary tier fee. Fees in the same tier see the same pre-defined base value regardless of creation order, so each pre-defined base is the value of the fund after all external fees and all earlier tier fees have been applied, and a fee cannot reference the accrual of a fee in a later tier. The ShareClass forms (\"ShareClass.GAVPreManagementFees\", \"ShareClass.PerformanceFeeGAV\") use the share class NAVPreFees less that share class's earlier tier fee accruals, including its capital ratio share of fund level fees; their share class currency forms (\"ShareClass.ShareClassCcyGAVPreManagementFees\", \"ShareClass.ShareClassCcyPerformanceFeeGAV\") put the fee in the same tier. No floor is applied to any calculation base: a negative base produces a negative accrual."
    },
    "accrualCurrency": {
      "maxLength": 5,
      "minLength": 0,
      "pattern": "^[a-zA-Z]*$",
      "type": "string",
      "description": "The accrual currency."
    },
    "treatment": {
      "minLength": 1,
      "type": "string",
      "description": "The accrual period of the Fee, which sets its daily accrual rate: 'Daily' and 'Annually' spread the annual amount evenly over the days in the year, 'Monthly' one twelfth over the days in each calendar month, and 'Quarterly' one quarter over the days in each calendar quarter. A Fee that starts or ends part-way through a period accrues only the days it covers. Available values: Daily, Monthly, Quarterly, Annually."
    },
    "totalAnnualAccrualAmount": {
      "type": [
        "number",
        "null"
      ],
      "description": "The total annual accrued amount for the Fee. (TotalAnnualAccrualAmount and CalculationBase cannot both be present)",
      "format": "double"
    },
    "feeRatePercentage": {
      "type": [
        "number",
        "null"
      ],
      "description": "The annual rate applied to the CalculationBase for a 'FixedPercentage' Fee, expressed as a multiplier rather than a percentage: 0.052 means 5.2% of the base per year. (Required when CalculationBase is present and not compatible with TotalAnnualAccrualAmount)",
      "format": "double"
    },
    "payableFrequency": {
      "minLength": 1,
      "type": "string",
      "description": "The frequency at which the Fee is payable. It cannot be more frequent than the Treatment, so a Fee accrued 'Quarterly' cannot be payable 'Monthly'. Available values: Annually, Quarterly, Monthly."
    },
    "businessDayConvention": {
      "minLength": 1,
      "type": "string",
      "description": "The business day convention to use for Fee calculations on weekends or holidays. Available values: None, P, Previous, F, Following."
    },
    "startDate": {
      "type": "string",
      "description": "The start date of the Fee.",
      "format": "date-time"
    },
    "endDate": {
      "type": [
        "string",
        "null"
      ],
      "description": "The end date of the Fee.",
      "format": "date-time"
    },
    "anchorDate": {
      "$ref": "#/$defs/DayMonth"
    },
    "properties": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": {
        "$ref": "#/$defs/Property"
      },
      "description": "The Fee properties. These will be from the 'Fee' domain."
    },
    "portfolioId": {
      "$ref": "#/$defs/ResourceId"
    },
    "shareClasses": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "string"
      },
      "description": "The short codes of the ShareClasses that the Fee should be applied to. Optional: if this is null or empty, then the Fee will be divided between all the ShareClasses of the Fund according to the capital ratio."
    },
    "feeCalculationType": {
      "type": [
        "string",
        "null"
      ],
      "description": "How the Fee accrual amount is calculated. Supported values: 'FixedAnnual' (a fixed annual amount, requires TotalAnnualAccrualAmount), 'FixedDaily' (a fixed daily amount, requires DailyAccrualAmount), 'FixedPercentage' (a fixed percentage of the CalculationBase, requires FeeRatePercentage), 'VariablePercentage' (a percentage of the CalculationBase resolved from a rate source at each accrual date, requires VariablePercentageSource), 'Tiered' (a single rate applied to the whole CalculationBase, chosen by the tier the base falls in, requires Tiers), 'Blended' (each tier's rate applied to the portion of the CalculationBase within that tier, requires Tiers). Optional: when not provided it is inferred as 'FixedAnnual' if TotalAnnualAccrualAmount is populated and 'FixedPercentage' otherwise, so existing requests keep their behaviour; the new calculation types must be requested explicitly. Available values: FixedAnnual, FixedDaily, FixedPercentage, VariablePercentage, Tiered, Blended."
    },
    "dailyAccrualAmount": {
      "type": [
        "number",
        "null"
      ],
      "description": "The fixed daily accrued amount for a 'FixedDaily' Fee, in the fund currency. The amount accrues for each day of the accrual period with no annualisation or day-count proration; Treatment does not affect it.",
      "format": "double"
    },
    "variablePercentageSource": {
      "maxLength": 512,
      "minLength": 1,
      "type": [
        "string",
        "null"
      ],
      "description": "The source of the rate for a 'VariablePercentage' Fee, in the form \"scope/provider/instrumentIdType/instrumentId\" identifying a Rate quote series in the quote store. The source is split on its first three '/' only, so the instrument id may itself contain '/'. CurrencyPair is not a supported instrument id type: CurrencyPair quotes are FX rates, not fee rates. At each accrual date the most recent rate at or before that date is used; if no rate can be found the valuation point calculation fails. The quote's normalised value (its value divided by any scale factor) is applied like FeeRatePercentage, as a multiplier of the CalculationBase: a rate of 5.2% must normalise to 0.052."
    },
    "variablePercentageSourceOffset": {
      "type": [
        "number",
        "null"
      ],
      "description": "An optional adjustment added to the rate resolved from the VariablePercentageSource, expressed as a factor like FeeRatePercentage (e.g. 0.0025 adds 25 basis points).",
      "format": "double"
    },
    "tiers": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/FeeRateTier"
      },
      "description": "The rate tiers for a 'Tiered' or 'Blended' Fee: between 2 and 10 tiers over the CalculationBase. Every tier except the last must have a Threshold, and thresholds must be positive and strictly increasing; a base equal to a Threshold falls in that tier, and the final tier covers the balance above the last threshold. A 'Tiered' Fee applies the rate of the tier the whole base falls in; a 'Blended' Fee applies each tier's rate to the portion of the base within that tier."
    },
    "feeCap": {
      "type": [
        "number",
        "null"
      ],
      "description": "An optional annual cap on the accrued fee for 'FixedPercentage', 'VariablePercentage', 'Tiered' and 'Blended' Fees, in the fund currency and assessed period-to-date. Each day accrues only up to the amount left under the cap for the current fee year, which runs from one AnchorDate to the next; once the cap is reached nothing further accrues until the next AnchorDate.",
      "format": "double"
    },
    "feeFloor": {
      "type": [
        "number",
        "null"
      ],
      "description": "An optional annual floor on the calculated fee for 'FixedPercentage', 'VariablePercentage', 'Tiered' and 'Blended' Fees, in the fund currency. The annualised fee amount is raised to the floor before being prorated to each accrual day.",
      "format": "double"
    }
  },
  "additionalProperties": false,
  "$defs": {
    "DayMonth": {
      "required": [
        "day",
        "month"
      ],
      "type": "object",
      "properties": {
        "day": {
          "maximum": 31,
          "minimum": 1,
          "type": "integer",
          "description": "Day part of Day, Month for Year End date specification.",
          "format": "int32"
        },
        "month": {
          "maximum": 12,
          "minimum": 1,
          "type": "integer",
          "description": "Month part of Day, Month for Year End date specification.",
          "format": "int32"
        }
      },
      "additionalProperties": false
    },
    "FeeRateTier": {
      "required": [
        "rate"
      ],
      "type": "object",
      "properties": {
        "rate": {
          "type": "number",
          "format": "double"
        },
        "threshold": {
          "type": [
            "number",
            "null"
          ],
          "format": "double"
        }
      },
      "additionalProperties": false
    },
    "LabelValueSet": {
      "required": [
        "values"
      ],
      "type": "object",
      "properties": {
        "values": {
          "minItems": 1,
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "additionalProperties": false,
      "description": "The set of string labels in a multi-value property."
    },
    "MetricValue": {
      "type": "object",
      "properties": {
        "value": {
          "type": "number",
          "description": "The numerical value of the property.",
          "format": "double"
        },
        "unit": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "additionalProperties": false
    },
    "Property": {
      "required": [
        "key"
      ],
      "type": "object",
      "properties": {
        "key": {
          "type": "string",
          "description": "The key of the property. This takes the format {domain}/{scope}/{code} e.g. 'Instrument/system/Name' or 'Transaction/strategy/quantsignal'."
        },
        "value": {
          "$ref": "#/$defs/PropertyValue"
        },
        "effectiveFrom": {
          "type": [
            "string",
            "null"
          ],
          "description": "The effective datetime from which the property is valid.",
          "format": "date-time"
        },
        "effectiveUntil": {
          "type": [
            "string",
            "null"
          ],
          "description": "The effective datetime until which the property is valid. If not supplied this will be valid indefinitely, or until the next 'effectiveFrom' datetime of the property.",
          "format": "date-time"
        },
        "referenceData": {
          "type": [
            "object",
            "null"
          ],
          "additionalProperties": {
            "$ref": "#/$defs/PropertyReferenceDataValue"
          },
          "description": "The ReferenceData linked to the value of the property. The ReferenceData is taken from the DataType on the PropertyDefinition that defines the property.",
          "readOnly": true
        }
      },
      "additionalProperties": false
    },
    "PropertyReferenceDataValue": {
      "type": "object",
      "properties": {
        "stringValue": {
          "maxLength": 512,
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        },
        "numericValue": {
          "type": [
            "number",
            "null"
          ],
          "format": "double"
        }
      },
      "additionalProperties": false,
      "description": "The ReferenceData relevant to the property. The ReferenceData is taken from the DataType on the PropertyDefinition that defines the Property.\r\nOnly ReferenceData where the ReferenceData value matches the Property value is included."
    },
    "PropertyValue": {
      "type": "object",
      "properties": {
        "labelValue": {
          "type": [
            "string",
            "null"
          ],
          "description": "The text value of a property defined as having the 'Label' type."
        },
        "metricValue": {
          "$ref": "#/$defs/MetricValue"
        },
        "labelValueSet": {
          "$ref": "#/$defs/LabelValueSet"
        }
      },
      "additionalProperties": false,
      "description": "The value of the property."
    },
    "ResourceId": {
      "required": [
        "code",
        "scope"
      ],
      "type": "object",
      "properties": {
        "scope": {
          "maxLength": 512,
          "minLength": 1,
          "type": "string",
          "description": "The scope used to identify an entity"
        },
        "code": {
          "maxLength": 512,
          "minLength": 1,
          "type": "string",
          "description": "The code used to identify an entity"
        }
      },
      "additionalProperties": false,
      "description": "Identifiers of an entity"
    }
  }
}