> ## 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.

# Add Fee component to a Contract



## OpenAPI

````yaml POST /billing/contract/feeComponent
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:
    parameters:
      - name: X-Valyx-Signature
        in: header
        required: true
        description: Auth key to authenticate the request
        schema:
          type: string
    post:
      tags:
        - billing
      operationId: post_add_contract_fee_component
      requestBody:
        $ref: '#/components/requestBodies/FeeComponentToContractRequestModel'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContractResponseModel'
      security:
        - X-Valyx-Signature: []
components:
  requestBodies:
    FeeComponentToContractRequestModel:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/FeeComponentToContractRequestModel'
      required: true
  schemas:
    ContractResponseModel:
      properties:
        error:
          type: string
        message:
          type: string
        data:
          $ref: '#/components/schemas/ContractPaginatedResponseModel'
      type: object
    FeeComponentToContractRequestModel:
      required:
        - contractId
        - feeComponentId
      properties:
        feeComponentId:
          type: string
          description: >-
            The unique identifier of the fee component to associate with the
            contract.
        contractId:
          type: string
          description: >-
            The unique identifier of the contract to which the fee component
            will be linked.
      type: object
    ContractPaginatedResponseModel:
      properties:
        totalDocs:
          type: integer
        docs:
          type: array
          items:
            $ref: '#/components/schemas/ContractData'
        hasNext:
          type: boolean
        hasPrev:
          type: boolean
        pageNumber:
          type: integer
        pageSize:
          type: integer
        totalPages:
          type: integer
        prevPageNumber:
          type: integer
        nextPageNumber:
          type: integer
      type: object
    ContractData:
      properties:
        id:
          type: object
        customerId:
          type: object
        contractNumber:
          type: object
        contractTitle:
          type: object
        contractPeriod:
          type: object
        renewalPeriod:
          type: object
        noteContract:
          type: object
        billingFrequency:
          type: object
        usageBillingCycle:
          type: object
        estimateCycle:
          type: object
        billingTime:
          type: object
        startDate:
          type: object
        virtualStartDate:
          type: object
        endDate:
          type: object
        nextBillingDate:
          type: object
        billingDiscounts:
          type: object
        isPreusage:
          type: object
        billingReportLimit:
          type: object
        contractLimit:
          type: object
        creditTermId:
          type: object
        poNumber:
          type: object
        placeOfSupply:
          type: object
        billingAddress:
          type: object
        shippingAddress:
          type: object
        totalInvoicedAmount:
          type: object
        noteInvoice:
          type: object
        terms:
          type: object
        advanceConfig:
          type: object
        invoiceSplitConfig:
          type: object
        gstin:
          type: object
        companyGstin:
          type: object
        currency:
          type: object
        currencyId:
          type: object
        companyId:
          type: object
        createdBy:
          type: object
        updatedBy:
          type: object
        status:
          type: object
        autoRenew:
          type: object
      type: object

````