v1 - Credit Notes

Create credit note

Creates a new credit note in draft status. The credit note can be created with or without line items. When documentNumber is provided, it is used for idempotency — retrying a create with the same documentNumber returns the existing credit note instead of creating a duplicate. The areLinesWithTax field controls whether line amounts include tax (true = gross, tax included) or exclude tax (false = net, tax added on top). A businessPartnerId (vendor) is required if the credit note will be linked to an invoice payable later. The posting date is automatically set to the documentDate.

post/v1/credit-notes

Request

  • Base URL
    https://light.inc (the document declares no server; this is the origin it was published from)
  • Auth
    • API key in header Authorization
    • or HTTP bearer

Headers

X-Idempotency-Keystring

Request body

companyEntityIdstring uuid nullable

ID of the entity

currencystring
documentDatestring date

Date when the credit note was issued

businessPartnerIdstring uuid nullable

ID of the vendor (required if the credit note will be linked to an invoice payable)

descriptionstring nullable

Description of the credit note

amountinteger nullable

Total credit note amount in cents

areLinesWithTaxboolean

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

documentNumberstring nullable

Unique credit note number. When provided, it is also used for idempotency — retrying a create with the same documentNumber returns the existing credit note. If omitted, a number is generated automatically.

localCurrencyFxRateOverridenumber nullable

Custom FX rate for the ledger's local currency. If not provided, Light uses official ECB rates.

groupCurrencyFxRateOverridenumber nullable

Custom FX rate for the ledger's group currency. If not provided, Light uses official ECB rates.

Example request

{
  "currency": "USD"
}

Response

default response

idstring uuid

Unique identifier for the object

companyIdstring uuid

ID of the company

companyEntityIdstring uuid nullable

ID of the entity

amountinteger nullable

Total credit note amount in cents

businessPartnerNamestring nullable

Name of the vendor

businessPartnerIdstring uuid nullable

ID of the vendor

status'DRAFT' | 'APPROVAL_PENDING' | 'APPROVED' | 'POSTED' | 'PARTIALLY_CLEARED' | 'CLEARED' | 'ARCHIVED'

Status of the credit note

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

descriptionstring nullable

Description of the credit note

currencystring
postingDatestring date nullable

Date when the credit note should be posted to the ledger

documentDatestring date nullable

Date when the credit note was issued

valuationDatestring date nullable

Date used when applying foreign exchange rate

areLinesWithTaxboolean

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

createdAtstring date-time

Timestamp when the credit note was created

updatedAtstring date-time

Timestamp when the credit note was last updated

updatedBystring uuid nullable

ID of the user who last updated the credit note

localCurrencyFxRatenumber nullable

FX rate applied for the ledger's local currency

groupCurrencyFxRatenumber nullable

FX rate applied for the ledger's group currency

senderEmailstring nullable

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

documentNamestring nullable

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

Example response

{
  "currency": "USD"
}

Changes

No recorded changes to this operation across all 1 revision of this API.