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

# Update clearing amount

> Updates the clearing amount of a linked invoice payable



## OpenAPI

````yaml /openapi-public.json patch /v1/credit-notes/{creditNoteId}/invoice-payables/{invoicePayableId}
openapi: 3.0.1
info:
  title: Light API
  version: 1.0.0
servers: []
security:
  - apiKeyAuth: []
  - bearerAuth: []
paths:
  /v1/credit-notes/{creditNoteId}/invoice-payables/{invoicePayableId}:
    patch:
      tags:
        - v1 - Credit Notes
      summary: Update clearing amount
      description: Updates the clearing amount of a linked invoice payable
      operationId: updateLinkedInvoicePayable
      parameters:
        - name: creditNoteId
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: invoicePayableId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json;charset=UTF-8:
            schema:
              $ref: >-
                #/components/schemas/ExternalUpdateCreditNoteInvoicePayableAmountRequestV1Model
      responses:
        default:
          description: default response
          content:
            application/json;charset=UTF-8:
              schema:
                $ref: '#/components/schemas/ExternalCreditNoteInvoicePayableV1Model'
components:
  schemas:
    ExternalUpdateCreditNoteInvoicePayableAmountRequestV1Model:
      type: object
      properties:
        amount:
          type: integer
          description: Updated amount to clear in cents
          format: int64
    ExternalCreditNoteInvoicePayableV1Model:
      type: object
      properties:
        companyId:
          type: string
          description: ID of the company
          format: uuid
        creditNote:
          $ref: '#/components/schemas/ExternalRelatedAccDocV1Model'
        invoicePayable:
          $ref: '#/components/schemas/ExternalRelatedAccDocV1Model'
        amount:
          type: integer
          description: Clearing amount in cents
          format: int64
        currency:
          type: string
          example: USD
        createdAt:
          type: string
          description: Timestamp when the link was created
          format: date-time
        updatedAt:
          type: string
          description: Timestamp when the link was last updated
          format: date-time
    ExternalRelatedAccDocV1Model:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the object
          format: uuid
        documentNumber:
          type: string
          description: Document number
          nullable: true
        documentDate:
          type: string
          description: Date the accounting document was issued
          format: date
          nullable: true
        status:
          type: string
          description: >-
            Status of the accounting document


            ⚠️ This enum is not exhaustive; new values may be added in the
            future.
          nullable: false
          deprecated: false
          enum:
            - DRAFT
            - APPROVAL_PENDING
            - APPROVED
            - POSTED
            - PARTIALLY_CLEARED
            - CLEARED
            - ARCHIVED
        amount:
          type: integer
          description: The amount of the accounting document in cents
          format: int64
          nullable: true
        currency:
          type: string
          example: USD
      description: Invoice payable details
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      description: >-
        Basic authentication header of the form **Basic** **<api_key>**, where
        **<api_key>** is your api key.
      name: Authorization
      in: header
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````