> ## Documentation Index
> Fetch the complete documentation index at: https://docs.valyx.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Fetch fee components of a contract



## OpenAPI

````yaml GET /billing/contract/feeComponent/{contract_id}
openapi: 3.1.0
info:
  title: OpenAPI Valyx API
  description: To demonstrate features in the Valyx
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.valyx.com
security:
  - bearerAuth:
      - demo-api
tags:
  - name: billing
    description: External Billing APIs
  - name: external
    description: External APIs for customers
  - name: invoice
    description: Invoice APIs
  - name: creditNote
    description: Credit Note APIs
paths:
  /billing/contract/feeComponent/{contract_id}:
    parameters:
      - name: contract_id
        in: path
        required: true
        schema:
          type: string
    get:
      tags:
        - billing
      operationId: get_fetch_contract_fee_components
      parameters:
        - name: X-Valyx-Signature
          in: header
          required: true
          description: Auth key for fetching ledger entries
          schema:
            type: string
        - name: X-Fields
          in: header
          description: An optional fields mask
          schema:
            type: string
            format: mask
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/ContractFeeComponentResponseModelListResponseModel
components:
  schemas:
    ContractFeeComponentResponseModelListResponseModel:
      properties:
        error:
          type: string
        message:
          type: string
        data:
          type: array
          items:
            $ref: '#/components/schemas/ContractFeeComponentResponseModelData'
      type: object
    ContractFeeComponentResponseModelData:
      properties:
        id:
          type: string
          description: id
        productId:
          type: string
          description: productId
        productName:
          type: string
          description: productName
        sku:
          type: string
          description: sku
        includedInUsage:
          type: boolean
          description: includedInUsage
        name:
          type: string
          description: name
        description:
          type: string
          description: description
        hsnOrSacCode:
          type: string
          description: hsnOrSacCode
        usage:
          type: number
          description: usage
        billedAmount:
          type: number
          description: billedAmount
        estimatedUsage:
          type: number
          description: estimatedUsage
        estimatedBilledAmount:
          type: number
          description: estimatedBilledAmount
        adjustment:
          type: number
          description: adjustment
        taxRate:
          type: array
          items:
            $ref: '#/components/schemas/ContractFeeComponentResponseModelDatataxRate'
        billLimit:
          $ref: '#/components/schemas/ContractFeeComponentResponseModelDatabillLimit'
        activePeriod:
          $ref: >-
            #/components/schemas/ContractFeeComponentResponseModelDataactivePeriod
        billingFrequency:
          $ref: >-
            #/components/schemas/ContractFeeComponentResponseModelDatabillingFrequency
        unit:
          type: string
          description: unit
        isFlatFee:
          type: boolean
          description: isFlatFee
          default: false
        companyId:
          type: string
          description: companyId
        createdBy:
          type: string
          description: createdBy
        updatedBy:
          type: string
          description: updatedBy
        ratecards:
          type: array
          items:
            $ref: >-
              #/components/schemas/ContractFeeComponentResponseModelDataratecards
      type: object
    ContractFeeComponentResponseModelDatataxRate:
      required:
        - name
        - value
      properties:
        name:
          type: string
          description: name
        value:
          type: number
          description: value
        isActive:
          type: boolean
          description: isActive
          default: true
        taxCategory:
          type: string
          example: GST
          enum:
            - GST
            - CESS
            - SERVICE
            - TDS
            - OTHER
      type: object
    ContractFeeComponentResponseModelDatabillLimit:
      required:
        - isUsageBased
      properties:
        tiers:
          type: array
          items:
            $ref: >-
              #/components/schemas/ContractFeeComponentResponseModelDatabillLimittiers
        isUsageBased:
          type: boolean
          description: isUsageBased
          default: false
        minValue:
          type: number
          description: minValue
        maxValue:
          type: number
          description: maxValue
        isProrated:
          type: boolean
          description: isProrated
      type: object
    ContractFeeComponentResponseModelDataactivePeriod:
      properties:
        startDate:
          type: string
          format: date
          description: startDate
        endDate:
          type: string
          format: date
          description: endDate
      type: object
    ContractFeeComponentResponseModelDatabillingFrequency:
      required:
        - value
      properties:
        unit:
          type: string
          example: DAY
          enum:
            - DAY
            - WEEK
            - MONTH
            - YEAR
        value:
          type: integer
          description: value
      type: object
    ContractFeeComponentResponseModelDataratecards:
      properties:
        id:
          type: object
        name:
          type: object
        ratecardDescription:
          type: object
        feeComponentId:
          type: object
        description:
          type: object
        ratecardDetail:
          type: object
        tags:
          type: object
        companyId:
          type: object
        contractId:
          type: object
        currency:
          type: object
        currencyId:
          type: object
        createdBy:
          type: object
        isDefault:
          type: object
        status:
          type: object
        isTierSplitEnabled:
          type: object
        startDate:
          type: object
        endDate:
          type: object
        fallBackRatecardId:
          type: object
      type: object
    ContractFeeComponentResponseModelDatabillLimittiers:
      required:
        - upTo
      properties:
        minValue:
          type: number
          description: minValue
        maxValue:
          type: number
          description: maxValue
        upTo:
          type: number
          description: upTo
          default: Infinity
      type: object

````