---
title: "Link credit note to invoice payable"
method: POST
path: "/v1/credit-notes/{creditNoteId}/invoice-payables/{invoicePayableId}"
tags: ["v1 - Credit Notes"]
---

# Link credit note to invoice payable

`POST /v1/credit-notes/{creditNoteId}/invoice-payables/{invoicePayableId}`

## Request

- Base URL: `https://light.inc` (the document declares no server; this is the origin it was published from)
- URL: `https://light.inc/v1/credit-notes/{creditNoteId}/invoice-payables/{invoicePayableId}`
- Auth: one of:
  - API key in header `Authorization`
  - HTTP bearer

Links a credit note to an invoice payable for clearing (offsetting balances). Because credit notes cannot be applied in the ledger until the invoice payable is posted, this creates a 'link' record that will be used during posting to automatically clear the credit note balance against the invoice payable balance. Requirements: credit note must be in POSTED status, both documents must belong to the same company entity, same vendor (businessPartnerId), same currency, and clearing amount cannot exceed available balance on either document.

## Path parameters

- `creditNoteId` string, uuid, required
- `invoicePayableId` string, uuid, required

## Request body

- ExternalCreateCreditNoteInvoicePayableRequestV1Model
  - `amount` integer: Amount to clear in cents

## Response `default`

default response

- ExternalCreditNoteInvoicePayableV1Model
  - `companyId` string, uuid: ID of the company
  - `creditNote` ExternalRelatedAccDocV1Model: Invoice payable details
    - `id` string, uuid: Unique identifier for the object
    - `documentNumber` string, nullable: Document number
    - `documentDate` string, date, nullable: Date the accounting document was issued
    - `postingDate` string, date, nullable: Date the accounting document is posted to the ledger
    - `status` 'DRAFT' | 'APPROVAL_PENDING' | 'APPROVED' | 'POSTED' | 'PARTIALLY_CLEARED' | 'CLEARED' | 'ARCHIVED': Status of the accounting document ⚠️ This enum is not exhaustive; new values may be added in the future.
    - `amount` integer, nullable: The amount of the accounting document in cents
    - `currency` string
  - `invoicePayable` ExternalRelatedAccDocV1Model: Invoice payable details
    - `id` string, uuid: Unique identifier for the object
    - `documentNumber` string, nullable: Document number
    - `documentDate` string, date, nullable: Date the accounting document was issued
    - `postingDate` string, date, nullable: Date the accounting document is posted to the ledger
    - `status` 'DRAFT' | 'APPROVAL_PENDING' | 'APPROVED' | 'POSTED' | 'PARTIALLY_CLEARED' | 'CLEARED' | 'ARCHIVED': Status of the accounting document ⚠️ This enum is not exhaustive; new values may be added in the future.
    - `amount` integer, nullable: The amount of the accounting document in cents
    - `currency` string
  - `amount` integer: Clearing amount in cents
  - `currency` string
  - `createdAt` string, date-time: Timestamp when the link was created
  - `updatedAt` string, date-time: Timestamp when the link was last updated

---

[API](https://skmtc.dev/light/apis/light-api.md) - [All operations](https://skmtc.dev/light/apis/light-api/llms.txt) - [OpenAPI document](https://skmtc.dev/light/apis/light-api/revisions/84f51306f648?raw)
