Skip to main content
POST
/
v1
/
credit-notes
/
{creditNoteId}
/
invoice-payables
/
{invoicePayableId}
Link credit note to invoice payable
curl --request POST \
  --url https://api.light.inc/v1/credit-notes/{creditNoteId}/invoice-payables/{invoicePayableId} \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json;charset=UTF-8' \
  --data '{
  "amount": 123
}'
{
  "companyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "creditNote": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "documentNumber": "<string>",
    "documentDate": "2023-12-25",
    "status": "DRAFT",
    "amount": 123,
    "currency": "USD"
  },
  "invoicePayable": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "documentNumber": "<string>",
    "documentDate": "2023-12-25",
    "status": "DRAFT",
    "amount": 123,
    "currency": "USD"
  },
  "amount": 123,
  "currency": "USD",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <api_key>, where <api_key> is your api key.

Path Parameters

creditNoteId
string<uuid>
required
invoicePayableId
string<uuid>
required

Body

application/json;charset=UTF-8
amount
integer<int64>

Amount to clear in cents

Response

default - application/json;charset=UTF-8

default response

companyId
string<uuid>

ID of the company

creditNote
object

Invoice payable details

invoicePayable
object

Invoice payable details

amount
integer<int64>

Clearing amount in cents

currency
string
Example:

"USD"

createdAt
string<date-time>

Timestamp when the link was created

updatedAt
string<date-time>

Timestamp when the link was last updated