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

# Update a credit note



## OpenAPI

````yaml api-reference/openapi.json put /api/credit-notes/{id}
openapi: 3.0.0
info:
  title: Bigcapital
  description: Financial accounting software
  version: '1.0'
  contact: {}
servers: []
security: []
tags: []
paths:
  /api/credit-notes/{id}:
    put:
      tags:
        - Credit Notes
      summary: Update a credit note
      operationId: CreditNotesController_editCreditNote
      parameters:
        - name: Authorization
          in: header
          description: >-
            Value must be 'Bearer <token>' where <token> is an API key prefixed
            with 'bc_' or a JWT token.
          required: true
          schema:
            type: string
            example: Bearer bc_1234567890abcdef
        - name: organization-id
          in: header
          description: >-
            Required if Authorization is a JWT token. The organization ID to
            operate within.
          required: true
          schema:
            type: string
        - name: id
          required: true
          in: path
          description: Credit note ID
          schema:
            type: number
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EditCreditNoteDto'
      responses:
        '200':
          description: Credit note successfully updated
        '400':
          description: Invalid input data
        '404':
          description: Credit note not found
components:
  schemas:
    EditCreditNoteDto:
      type: object
      properties:
        customerId:
          type: number
          description: The customer ID
          example: 1
        exchangeRate:
          type: number
          example: 3.43
          description: The exchange rate
        creditNoteDate:
          format: date-time
          type: string
          example: '2021-09-01'
          description: The credit note date
        referenceNo:
          type: string
          example: '123'
          description: The reference number
        creditNoteNumber:
          type: string
          example: '123'
          description: The credit note number
        note:
          type: string
          example: '123'
          description: The note
        termsConditions:
          type: string
          example: '123'
          description: The terms and conditions
        open:
          type: boolean
          example: false
          description: The credit note is open
        warehouseId:
          type: number
          example: 1
          description: The warehouse ID
        branchId:
          type: number
          example: 1
          description: The branch ID
        entries:
          example:
            - itemId: 1
              quantity: 1
              rate: 10
              taxRateId: 1
          description: The credit note entries
          type: array
          items:
            type: string
        pdfTemplateId:
          type: number
          example: 1
          description: The pdf template ID
        discount:
          type: number
          description: The discount amount
          example: 10
        discountType:
          type: string
          example: percentage
          description: The discount type
          enum:
            - percentage
            - amount
      required:
        - customerId
        - exchangeRate
        - creditNoteDate
        - referenceNo
        - creditNoteNumber
        - note
        - termsConditions
        - open
        - warehouseId
        - branchId
        - entries
        - pdfTemplateId
        - discount
        - discountType

````