Skip to main content
PATCH
/
v1
/
credit-notes
/
{creditNoteId}
Update credit note
curl --request PATCH \
  --url https://api.light.inc/v1/credit-notes/{creditNoteId} \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json;charset=UTF-8' \
  --data '
{
  "companyEntityId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "businessPartnerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "documentDate": "2023-12-25",
  "areLinesWithTax": true,
  "customProperties": [
    {
      "groupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "valueIds": [
        "3c90c3cc-0d44-4b50-8888-8dd25736052a"
      ],
      "inlineValues": [
        "<string>"
      ]
    }
  ],
  "description": "<string>",
  "currency": "USD",
  "amount": 123,
  "documentNumber": "<string>"
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "companyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "companyEntityId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "amount": 123,
  "businessPartnerName": "<string>",
  "businessPartnerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "status": "DRAFT",
  "description": "<string>",
  "currency": "USD",
  "postingDate": "2023-12-25",
  "documentDate": "2023-12-25",
  "valuationDate": "2023-12-25",
  "areLinesWithTax": true,
  "lines": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "companyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "creditNoteId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "grossTransactionAmount": {
        "amount": 123,
        "dcSign": "D"
      },
      "netTransactionAmount": {
        "amount": 123,
        "dcSign": "D"
      },
      "description": "<string>",
      "ledgerTaxId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "taxTransactionAmount": {
        "amount": 123,
        "dcSign": "D"
      },
      "ledgerAccountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "costCenterId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z",
      "accrualTemplateId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "accrualStartDate": "2023-12-25",
      "accrualEndDate": "2023-12-25",
      "accrualDefaultDuration": 123
    }
  ],
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "updatedBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "senderEmail": "<string>",
  "documentName": "<string>"
}

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

Body

application/json;charset=UTF-8
companyEntityId
string<uuid> | null

ID of the entity

businessPartnerId
string<uuid> | null

ID of the vendor

documentDate
string<date> | null

Date when the credit note was issued

areLinesWithTax
boolean | null

Whether line amounts include tax. true = tax included (gross), false = tax added on top (net)

customProperties
(object | null)[] | null

List of custom properties

List of custom properties to set on the vendor. Replaces the existing set.

description
string | null

Description of the credit note

currency
string | null
Example:

"USD"

amount
integer<int64> | null

Total credit note amount in cents

documentNumber
string | null

Unique credit note number

Response

default - application/json;charset=UTF-8

default response

id
string<uuid>

Unique identifier for the object

companyId
string<uuid>

ID of the company

companyEntityId
string<uuid> | null

ID of the entity

amount
integer<int64> | null

Total credit note amount in cents

businessPartnerName
string | null

Name of the vendor

businessPartnerId
string<uuid> | null

ID of the vendor

status
enum<string>

Status of the credit note

⚠️ This enum is not exhaustive; new values may be added in the future.

Available options:
DRAFT,
POSTED,
PARTIALLY_CLEARED,
CLEARED,
ARCHIVED
description
string | null

Description of the credit note

currency
string
Example:

"USD"

postingDate
string<date> | null

Date when the credit note should be posted to the ledger

documentDate
string<date> | null

Date when the credit note was issued

valuationDate
string<date> | null

Date used when applying foreign exchange rate

areLinesWithTax
boolean

Whether the credit note line amount is inclusive of tax or not. True means tax is already included in the line amount and will not be added on top, false means tax will be added on top of the line amount

lines
object[]

List of credit note line items

createdAt
string<date-time>

Timestamp when the credit note was created

updatedAt
string<date-time>

Timestamp when the credit note was last updated

updatedBy
string<uuid> | null

ID of the user who last updated the credit note

senderEmail
string | null

The email of the user who sent the document that this credit note was created from

documentName
string | null

The name of the document that this credit note was created from