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

# Link Existing Credit Memo To Contract

> Attach an existing AR credit memo to a contract. The contract gets the
join row plus a CREDIT_MEMO subledger entry that unwinds billing, posted
against the credit memo's GL journal.



## OpenAPI

````yaml https://api.meetcampfire.com/api/schema?format=json post /rev/api/v1/contracts/{id}/link-credit-memo
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.


    ## Rate limits

    API users can make up to **5 requests per second**. This limit is shared
    across

    all endpoints for the same API user. Requests that exceed the limit receive
    a

    `429 Too Many Requests` response. Wait for the number of seconds specified
    in

    the `Retry-After` response header before retrying.
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:
  /rev/api/v1/contracts/{id}/link-credit-memo:
    post:
      tags:
        - Revenue
      summary: Link Existing Credit Memo To Contract
      description: |-
        Attach an existing AR credit memo to a contract. The contract gets the
        join row plus a CREDIT_MEMO subledger entry that unwinds billing, posted
        against the credit memo's GL journal.
      operationId: rev_api_v1_contracts_link_credit_memo_create
      parameters:
        - in: path
          name: id
          schema:
            type: integer
          required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RevenueContractLinkCreditMemo'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/RevenueContractLinkCreditMemo'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/RevenueContractLinkCreditMemo'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RevenueContractCreditMemo'
          description: ''
components:
  schemas:
    RevenueContractLinkCreditMemo:
      type: object
      properties:
        credit_memo:
          type: integer
      required:
        - credit_memo
    RevenueContractCreditMemo:
      type: object
      description: >-
        The join row between a contract and an AR credit memo, with enough of
        the memo to list it.
      properties:
        id:
          type: integer
          readOnly: true
        contract:
          type: integer
          readOnly: true
        contract_name:
          type: string
          readOnly: true
        credit_memo:
          type: integer
          readOnly: true
        credit_memo_number:
          type: string
          readOnly: true
        credit_memo_date:
          type: string
          format: date
          readOnly: true
        currency:
          type: string
          readOnly: true
        total_amount:
          type: number
          format: double
          maximum: 1000000000000000000
          minimum: -1000000000000000000
          exclusiveMaximum: true
          exclusiveMinimum: true
          readOnly: true
        application_status:
          type: string
          readOnly: true
        journal_entry:
          type: integer
          readOnly: true
        created_at:
          type: string
          format: date-time
          readOnly: true
        last_modified_at:
          type: string
          format: date-time
          readOnly: true
      required:
        - application_status
        - contract
        - contract_name
        - created_at
        - credit_memo
        - credit_memo_date
        - credit_memo_number
        - currency
        - id
        - journal_entry
        - last_modified_at
        - total_amount

````