Skip to main content
GET
/
v1
/
customer-credits
/
{customerCreditId}
Get customer credit
curl --request GET \
  --url https://api.light.inc/v1/customer-credits/{customerCreditId} \
  --header 'Authorization: <api-key>'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "companyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "companyEntityId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "amount": 123,
  "customerName": "<string>",
  "customerId": "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",
      "customerCreditId": "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",
      "productId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "quantity": 123,
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z"
    }
  ],
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "updatedBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "linkedInvoiceReceivable": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "documentNumber": "<string>",
    "documentDate": "2023-12-25",
    "status": "DRAFT",
    "amount": 123,
    "currency": "USD"
  }
}

Authorizations

Authorization
string
header
required

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

Path Parameters

customerCreditId
string<uuid>
required

Response

default - application/json;charset=UTF-8

default response

List of records for the current page

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 | null

Total customer credit amount in cents

customerName
string | null

Name of the customer

customerId
string<uuid> | null

ID of the customer

status
enum<string>

Status of the customer credit

⚠️ 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 customer credit

currency
string
Example:

"USD"

postingDate
string<date> | null

Date when the customer credit should be posted to the ledger

documentDate
string<date> | null

Date when the customer credit was issued

valuationDate
string<date> | null

Date used when applying foreign exchange rate

areLinesWithTax
boolean

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

lines
object[]

List of customer credit line items

createdAt
string<date-time>

Timestamp when the customer credit was created

updatedAt
string<date-time>

Timestamp when the customer credit was last updated

updatedBy
string<uuid> | null

ID of the user who last updated the customer credit

linkedInvoiceReceivable
object | null

The invoice receivable that this customer credit is linked to