v1 - Customer Credits

Create customer credit

Creates a new customer credit

post/v1/customer-credits

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

documentNumberstring nullable

Unique customer credit number. If not provided, one will be generated automatically when the invoice is opened.

descriptionstring nullable

Description of the customer credit

currencystring nullable
localCurrencyFxRatenumber nullable

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

groupCurrencyFxRatenumber nullable

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

documentDatestring date nullable

Date when the customer credit was issued

postingDatestring date nullable

Date when the customer credit is posted to the ledger. Defaults to the document date, or today if both dates are omitted

documentTemplateIdstring uuid nullable

ID of the document template that the customer credit will use

areLinesWithTaxboolean

Whether the customer credit 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

customerIdstring uuid nullable

ID of the customer

amountinteger nullable

Total customer credit amount in cents

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 customer credit amount in cents

customerNamestring nullable

Name of the customer

customerIdstring uuid nullable

ID of the customer

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

Status of the customer credit

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

descriptionstring nullable

Description of the customer credit

currencystring
documentDatestring date nullable

Customer-facing issue date override. Null means customer-facing documents use the posting date

postingDatestring date nullable

Date when the customer credit is posted to the ledger

valuationDatestring date nullable

Date used when applying foreign exchange rate

areLinesWithTaxboolean

Whether the customer credit 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 customer credit was created

updatedAtstring date-time

Timestamp when the customer credit was last updated

updatedBystring uuid nullable

ID of the user who last updated the customer credit

paymentReferencestring nullable

Payment reference generated when the customer credit is posted

Example response

{
  "currency": "USD",
  "linkedInvoiceReceivable": {
    "currency": "USD"
  }
}

Changes

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