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

# Select RateCard for a fee component in a contract



## OpenAPI

````yaml POST /billing/contract/feeComponent/ratecard/{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/ratecard/{contract_id}:
    parameters:
      - name: contract_id
        in: path
        required: true
        schema:
          type: string
      - name: X-Valyx-Signature
        in: header
        required: true
        description: Auth key to authenticate the request
        schema:
          type: string
    post:
      tags:
        - billing
      operationId: post_contract_rate_card_relations
      parameters:
        - name: X-Fields
          in: header
          description: An optional fields mask
          schema:
            type: string
            format: mask
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ContractRateCardBulkUpsertionRequestModel'
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContractResponseModel'
components:
  schemas:
    ContractRateCardBulkUpsertionRequestModel:
      type: object
      required:
        - feeComponentId
        - ratecardRelations
      properties:
        feeComponentId:
          type: string
          description: Fee component this bulk upsertion applies to
        ratecardRelations:
          type: array
          description: List of ratecards to associate with the fee component
          items:
            $ref: '#/components/schemas/ContractRateCardRelation'
    ContractResponseModel:
      properties:
        error:
          type: string
        message:
          type: string
        data:
          $ref: '#/components/schemas/ContractPaginatedResponseModel'
      type: object
    ContractRateCardRelation:
      type: object
      required:
        - ratecardId
      properties:
        ratecardId:
          type: string
          description: ID of the ratecard to associate
    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

````