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

# Partial Update Credit Memo

> 
        Performs a partial update of an existing accounting credit memo using PATCH semantics.

        This endpoint allows selective modification of credit memo fields without requiring
        a complete credit memo replacement. You can update specific aspects of the credit memo while
        leaving other fields unchanged.

        **Updatable Fields:**
        - Credit memo metadata (dates, messages, descriptions, client, entity, currency)
        - Line items (amounts, accounts, descriptions, departments, products)
        - Reference numbers and contract associations
        - Exchange rates and currency information
        - Custom fields and additional metadata
        - Application status and tracking information
        



## OpenAPI

````yaml https://api.meetcampfire.com/api/schema?format=json patch /coa/api/v1/credit-memo/{id}
openapi: 3.0.3
info:
  title: Campfire Developer APIs
  version: 1.0.0
  description: >
    ## Introduction

    Campfire's developer APIs offer granular access to Campfire's core
    accounting,

    revenue recognition, and financial data features.


    These APIs are designed to be used by developers to build custom
    integrations,

    automate workflows, and perform any other programmatic operations.
servers:
  - url: https://api.meetcampfire.com
    description: Production server
security: []
tags:
  - name: Cash Management
    description: Operations related to accounts, transactions, and other bank-related data.
  - name: Core Accounting
    description: >-
      Operations related to core accounting data, such as the chart of accounts,
      entity management, and the general ledger.
  - name: Revenue Recognition
    description: >-
      Operations related to revenue recognition, contract management, and
      contract data aggregation.
  - name: Accounts Receivable
    description: Operations related to invoicing and the AR subledger
  - name: Accounts Payable
    description: Operations related to billing and the AP subledger.
  - name: Financial Statements
    description: Operations related to financial statement generation and data aggregation.
  - name: Settings
    description: Operations related to system and accounting settings configuration.
paths:
  /coa/api/v1/credit-memo/{id}:
    patch:
      tags:
        - Accounts Receivable
      summary: Partial Update Credit Memo
      description: |2-

                Performs a partial update of an existing accounting credit memo using PATCH semantics.

                This endpoint allows selective modification of credit memo fields without requiring
                a complete credit memo replacement. You can update specific aspects of the credit memo while
                leaving other fields unchanged.

                **Updatable Fields:**
                - Credit memo metadata (dates, messages, descriptions, client, entity, currency)
                - Line items (amounts, accounts, descriptions, departments, products)
                - Reference numbers and contract associations
                - Exchange rates and currency information
                - Custom fields and additional metadata
                - Application status and tracking information
                
      operationId: coa_api_v1_credit_memo_partial_update
      parameters:
        - in: path
          name: id
          schema:
            type: integer
          required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedAccountingCreditMemo'
            examples:
              UpdateCreditMemoAmount:
                value:
                  amount: '750.00'
                  internal_message: >-
                    Adjusted credit amount per client request - approval
                    #CM-2024-456
                summary: Update Credit Memo Amount
                description: >-
                  Partial update to adjust the credit memo amount and add
                  internal notes
              UpdateLineItem:
                value:
                  line_items:
                    - id: line-item-uuid-789
                      description: >-
                        Updated: Credit for Enterprise license overpayment - Q1
                        2024
                      department:
                        id: dept-uuid-accounting
                        name: Accounting Department
                summary: Update Line Item
                description: >-
                  Partial update to modify a specific line item description and
                  department
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedAccountingCreditMemo'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedAccountingCreditMemo'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountingCreditMemo'
              examples:
                UpdateCreditMemoResponse:
                  value:
                    id: 9a4bc225-ebe6-41fa-9a2f-de7947899c6c
                    number: CM-2024-001
                    date: '2024-03-15'
                    amount: '750.00'
                    currency: USD
                    exchange_rate: '1.0000'
                    amount_used: '0.00'
                    amount_available: '750.00'
                    status: open
                    client:
                      id: client-uuid-123
                      name: Acme Corporation
                      currency: USD
                    entity:
                      id: entity-uuid-456
                      name: Tech Solutions LLC
                    internal_message: >-
                      Adjusted credit amount per client request - approval
                      #CM-2024-456
                    client_message: 'Credit for overpayment on Invoice #INV-2024-001'
                    line_items:
                      - id: line-item-uuid-789
                        account:
                          id: account-uuid-revenue
                          name: Revenue - Software Licenses
                          code: '4001'
                        description: Credit for software license overpayment
                        amount: '750.00'
                        department:
                          id: dept-uuid-sales
                          name: Sales Department
                        product:
                          id: product-uuid-license
                          name: Enterprise License
                    applied_payments: []
                    tags:
                      - overpayment
                      - software-license
                    contract: null
                    created_at: '2024-03-15T10:30:00Z'
                    updated_at: '2024-03-16T14:22:00Z'
                  summary: Update Credit Memo Response
                  description: >-
                    Response showing the updated credit memo with modified
                    amount and notes
          description: ''
      security:
        - knoxApiToken: []
components:
  schemas:
    PatchedAccountingCreditMemo:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        lines:
          type: array
          items:
            $ref: '#/components/schemas/AccountingCreditMemoLine'
        payments:
          type: array
          items:
            $ref: '#/components/schemas/AccountingCreditMemoPayment'
          readOnly: true
        amount_remaining:
          type: number
          format: double
          description: Calculate amount remaining from database fields
          readOnly: true
        entity_name:
          type: string
          readOnly: true
        entity_currency:
          type: string
          readOnly: true
        client_name:
          type: string
          readOnly: true
        client_email:
          type: string
          readOnly: true
        contract_name:
          type: string
          readOnly: true
        credit_account_number:
          type: string
          readOnly: true
        credit_account_name:
          type: string
          nullable: true
          description: Combines account number and name in the format "number - name"
          readOnly: true
        attachments:
          type: array
          items:
            $ref: '#/components/schemas/File'
          readOnly: true
        credit_memo_number:
          type: string
        migrated_journal_id:
          type: integer
          writeOnly: true
          nullable: true
        voided_date:
          type: string
          format: date
          readOnly: true
        voided_journal_entry_order:
          type: string
          readOnly: true
        last_modified_at:
          type: string
          format: date-time
          readOnly: true
        is_deleted:
          type: boolean
          readOnly: true
          default: false
        deleted_at:
          type: string
          format: date-time
          readOnly: true
          nullable: true
        chat_uuid:
          type: string
          format: uuid
          writeOnly: true
        search_vector:
          type: string
          readOnly: true
          nullable: true
        search_text:
          type: string
          readOnly: true
          nullable: true
        credit_memo_type:
          $ref: '#/components/schemas/CreditMemoTypeEnum'
        ref_number:
          type: string
          nullable: true
          maxLength: 120
        credit_memo_date:
          type: string
          format: date
        applied_date:
          type: string
          format: date
          nullable: true
        message_on_credit_memo:
          type: string
          nullable: true
        application_status:
          nullable: true
          oneOf:
            - $ref: '#/components/schemas/ApplicationStatusEnum'
            - $ref: '#/components/schemas/BlankEnum'
            - $ref: '#/components/schemas/NullEnum'
        currency:
          type: string
          maxLength: 3
        exchange_rate:
          type: number
          format: double
          maximum: 100000000000000
          minimum: -100000000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
          nullable: true
        exchange_rate_book:
          type: number
          format: double
          maximum: 100000000000000
          minimum: -100000000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
          nullable: true
        created_at:
          type: string
          format: date-time
          readOnly: true
        last_sent_at:
          type: string
          format: date-time
          nullable: true
        anrok_transaction_id:
          type: string
          nullable: true
          description: ID of the negation transaction in Anrok for this credit memo
          maxLength: 255
        integration_id:
          type: string
          nullable: true
          maxLength: 250
        integration_context:
          nullable: true
        vat_number:
          type: string
          nullable: true
          maxLength: 250
        total_amount:
          type: number
          format: double
          maximum: 1000000000000000000
          minimum: -1000000000000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
          description: Sum of all line item amounts
        amount_used:
          type: number
          format: double
          maximum: 1000000000000000000
          minimum: -1000000000000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
          description: Sum of all non-voided payment amounts
        chat_id:
          type: integer
          maximum: 2147483647
          minimum: -2147483648
          nullable: true
        customer:
          type: integer
          readOnly: true
        entity:
          type: integer
        client:
          type: integer
          nullable: true
        credit_account:
          type: integer
          nullable: true
        journal_entry:
          type: integer
          nullable: true
        contract:
          type: integer
          nullable: true
        voided_journal_entry:
          type: integer
          nullable: true
        anrok_connection:
          type: integer
          nullable: true
        avalara_connection:
          type: integer
          nullable: true
        sphere_connection:
          type: integer
          nullable: true
    AccountingCreditMemo:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        lines:
          type: array
          items:
            $ref: '#/components/schemas/AccountingCreditMemoLine'
        payments:
          type: array
          items:
            $ref: '#/components/schemas/AccountingCreditMemoPayment'
          readOnly: true
        amount_remaining:
          type: number
          format: double
          description: Calculate amount remaining from database fields
          readOnly: true
        entity_name:
          type: string
          readOnly: true
        entity_currency:
          type: string
          readOnly: true
        client_name:
          type: string
          readOnly: true
        client_email:
          type: string
          readOnly: true
        contract_name:
          type: string
          readOnly: true
        credit_account_number:
          type: string
          readOnly: true
        credit_account_name:
          type: string
          nullable: true
          description: Combines account number and name in the format "number - name"
          readOnly: true
        attachments:
          type: array
          items:
            $ref: '#/components/schemas/File'
          readOnly: true
        credit_memo_number:
          type: string
        migrated_journal_id:
          type: integer
          writeOnly: true
          nullable: true
        voided_date:
          type: string
          format: date
          readOnly: true
        voided_journal_entry_order:
          type: string
          readOnly: true
        last_modified_at:
          type: string
          format: date-time
          readOnly: true
        is_deleted:
          type: boolean
          readOnly: true
          default: false
        deleted_at:
          type: string
          format: date-time
          readOnly: true
          nullable: true
        chat_uuid:
          type: string
          format: uuid
          writeOnly: true
        search_vector:
          type: string
          readOnly: true
          nullable: true
        search_text:
          type: string
          readOnly: true
          nullable: true
        credit_memo_type:
          $ref: '#/components/schemas/CreditMemoTypeEnum'
        ref_number:
          type: string
          nullable: true
          maxLength: 120
        credit_memo_date:
          type: string
          format: date
        applied_date:
          type: string
          format: date
          nullable: true
        message_on_credit_memo:
          type: string
          nullable: true
        application_status:
          nullable: true
          oneOf:
            - $ref: '#/components/schemas/ApplicationStatusEnum'
            - $ref: '#/components/schemas/BlankEnum'
            - $ref: '#/components/schemas/NullEnum'
        currency:
          type: string
          maxLength: 3
        exchange_rate:
          type: number
          format: double
          maximum: 100000000000000
          minimum: -100000000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
          nullable: true
        exchange_rate_book:
          type: number
          format: double
          maximum: 100000000000000
          minimum: -100000000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
          nullable: true
        created_at:
          type: string
          format: date-time
          readOnly: true
        last_sent_at:
          type: string
          format: date-time
          nullable: true
        anrok_transaction_id:
          type: string
          nullable: true
          description: ID of the negation transaction in Anrok for this credit memo
          maxLength: 255
        integration_id:
          type: string
          nullable: true
          maxLength: 250
        integration_context:
          nullable: true
        vat_number:
          type: string
          nullable: true
          maxLength: 250
        total_amount:
          type: number
          format: double
          maximum: 1000000000000000000
          minimum: -1000000000000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
          description: Sum of all line item amounts
        amount_used:
          type: number
          format: double
          maximum: 1000000000000000000
          minimum: -1000000000000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
          description: Sum of all non-voided payment amounts
        chat_id:
          type: integer
          maximum: 2147483647
          minimum: -2147483648
          nullable: true
        customer:
          type: integer
          readOnly: true
        entity:
          type: integer
        client:
          type: integer
          nullable: true
        credit_account:
          type: integer
          nullable: true
        journal_entry:
          type: integer
          nullable: true
        contract:
          type: integer
          nullable: true
        voided_journal_entry:
          type: integer
          nullable: true
        anrok_connection:
          type: integer
          nullable: true
        avalara_connection:
          type: integer
          nullable: true
        sphere_connection:
          type: integer
          nullable: true
      required:
        - amount_remaining
        - attachments
        - client_email
        - client_name
        - contract_name
        - created_at
        - credit_account_name
        - credit_account_number
        - credit_memo_date
        - customer
        - deleted_at
        - entity
        - entity_currency
        - entity_name
        - id
        - is_deleted
        - last_modified_at
        - lines
        - payments
        - search_text
        - search_vector
        - voided_date
        - voided_journal_entry_order
    AccountingCreditMemoLine:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        credit_memo:
          type: integer
          writeOnly: true
        account_number:
          type: string
          readOnly: true
        account_name:
          type: string
          nullable: true
          description: Combines account number and name in the format "number - name"
          readOnly: true
        product_name:
          type: string
          readOnly: true
        anrok_item_id:
          type: string
          readOnly: true
        department_name:
          type: string
          readOnly: true
        tags:
          type: array
          items:
            $ref: '#/components/schemas/TransactionTag'
          readOnly: true
        tax_rate_name:
          type: string
          readOnly: true
        tax_rate_value:
          type: number
          format: double
          maximum: 1000000
          minimum: -1000000
          exclusiveMaximum: true
          exclusiveMinimum: true
          readOnly: true
        description:
          type: string
          nullable: true
        amount:
          type: number
          format: double
          maximum: 1000000000000000000
          minimum: -1000000000000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
        tax:
          type: number
          format: double
          maximum: 1000000000000000000
          minimum: -1000000000000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
        tax_description:
          type: string
          nullable: true
          maxLength: 250
        tag_ids:
          type: array
          items:
            type: integer
            maximum: 9223372036854776000
            minimum: -9223372036854776000
            format: int64
        tag_group_ids:
          type: array
          items:
            type: integer
            maximum: 9223372036854776000
            minimum: -9223372036854776000
            format: int64
        created_at:
          type: string
          format: date-time
          readOnly: true
        last_modified_at:
          type: string
          format: date-time
          readOnly: true
        customer:
          type: integer
          readOnly: true
        product:
          type: integer
          nullable: true
        account:
          type: integer
        tax_rate:
          type: integer
          nullable: true
        department:
          type: integer
          nullable: true
      required:
        - account
        - account_name
        - account_number
        - anrok_item_id
        - created_at
        - customer
        - department_name
        - id
        - last_modified_at
        - product_name
        - tags
        - tax_rate_name
        - tax_rate_value
    AccountingCreditMemoPayment:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        payment_journal_entry_order:
          type: string
          readOnly: true
        voided_journal_entry_order:
          type: string
          readOnly: true
          nullable: true
        invoice:
          type: string
          readOnly: true
        currency:
          type: string
          maxLength: 3
        amount:
          type: number
          format: double
          maximum: 1000000000000000000
          minimum: -1000000000000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
        payment_date:
          type: string
          format: date
          nullable: true
        created_at:
          type: string
          format: date-time
          readOnly: true
        last_modified_at:
          type: string
          format: date-time
          readOnly: true
        voided_date:
          type: string
          format: date
          nullable: true
        customer:
          type: integer
          readOnly: true
        credit_memo:
          type: integer
        payment_journal_entry:
          type: integer
        payment_transaction:
          type: integer
          nullable: true
        voided_journal_entry:
          type: integer
          nullable: true
      required:
        - created_at
        - credit_memo
        - customer
        - id
        - invoice
        - last_modified_at
        - payment_journal_entry
        - payment_journal_entry_order
        - voided_journal_entry_order
    File:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        customer:
          type: integer
          readOnly: true
        created_at:
          type: string
          format: date-time
          readOnly: true
        created_by:
          type: integer
          nullable: true
          readOnly: true
        created_by_name:
          type: string
          readOnly: true
        created_by_email:
          type: string
          readOnly: true
        last_modified_at:
          type: string
          format: date-time
          readOnly: true
        name:
          type: string
        url:
          type: string
          readOnly: true
        s3_content_type:
          type: string
          nullable: true
        s3_content_length:
          type: integer
          maximum: 2147483647
          minimum: 0
          nullable: true
        s3_path:
          type: string
        object_id:
          type: integer
          maximum: 2147483647
          minimum: 0
          nullable: true
        app:
          type: string
          readOnly: true
        model:
          type: string
          readOnly: true
        is_deleted:
          type: boolean
          readOnly: true
          default: false
        deleted_at:
          type: string
          format: date-time
          readOnly: true
          nullable: true
      required:
        - app
        - created_at
        - created_by
        - created_by_email
        - created_by_name
        - customer
        - deleted_at
        - id
        - is_deleted
        - last_modified_at
        - model
        - name
        - s3_path
        - url
    CreditMemoTypeEnum:
      enum:
        - credit_memo
        - overpayment
      type: string
      description: |-
        * `credit_memo` - Credit Memo
        * `overpayment` - Overpayment
    ApplicationStatusEnum:
      enum:
        - open
        - partially_used
        - used
        - voided
      type: string
      description: |-
        * `open` - Open
        * `partially_used` - Partially Used
        * `used` - Used
        * `voided` - Voided
    BlankEnum:
      enum:
        - ''
    NullEnum:
      enum:
        - null
    TransactionTag:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        group_name:
          type: string
          readOnly: true
        parent_name:
          type: string
          readOnly: true
          nullable: true
        parent:
          type: integer
          nullable: true
        is_deleted:
          type: boolean
          readOnly: true
          default: false
        deleted_at:
          type: string
          format: date-time
          readOnly: true
          nullable: true
        is_active:
          type: boolean
          default: true
        name:
          type: string
          nullable: true
          maxLength: 250
        created_at:
          type: string
          format: date-time
          readOnly: true
        last_modified_at:
          type: string
          format: date-time
          readOnly: true
        customer:
          type: integer
          readOnly: true
        group:
          type: integer
          nullable: true
      required:
        - created_at
        - customer
        - deleted_at
        - group_name
        - id
        - is_deleted
        - last_modified_at
        - name
        - parent_name
  securitySchemes:
    knoxApiToken:
      type: apiKey
      in: header
      name: Authorization
      description: Token-based authentication with required prefix "Token"

````