Skip to main content
POST
/
v1
/
customer-credits
/
{customerCreditId}
/
lines
Create customer credit line
curl --request POST \
  --url https://api.light.inc/v1/customer-credits/{customerCreditId}/lines \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json;charset=UTF-8' \
  --data '{
  "productId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "quantity": 123,
  "netTransactionAmount": {
    "amount": 123,
    "dcSign": "D"
  },
  "grossTransactionAmount": {
    "amount": 123,
    "dcSign": "D"
  },
  "taxTransactionAmount": {
    "amount": 123,
    "dcSign": "D"
  },
  "description": "<string>",
  "ledgerTaxId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "ledgerAccountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "customProperties": [
    {
      "groupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "valueIds": [
        "3c90c3cc-0d44-4b50-8888-8dd25736052a"
      ],
      "inlineValues": [
        "<string>"
      ]
    }
  ]
}'
{
  "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"
}

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

Body

application/json;charset=UTF-8
productId
string<uuid>

ID of the product

quantity
number

Quantity of the product

netTransactionAmount
object
grossTransactionAmount
object
taxTransactionAmount
object
description
string | null

Description of the customer credit line item

ledgerTaxId
string<uuid> | null

ID of the tax code

ledgerAccountId
string<uuid> | null

ID of the ledger account

customProperties
object[] | null

List of custom properties associated with the line

Response

default - application/json;charset=UTF-8

default response

id
string<uuid>

Unique identifier for the object

companyId
string<uuid>

ID of the company

customerCreditId
string<uuid>

ID of the customer credit this line belongs to

grossTransactionAmount
object
netTransactionAmount
object
description
string | null

Description of the customer credit line item

ledgerTaxId
string<uuid> | null

ID of the tax code

taxTransactionAmount
object
ledgerAccountId
string<uuid> | null

ID of the ledger account

productId
string<uuid>

ID of the product

quantity
number

Quantity of the product

createdAt
string<date-time>

Timestamp when the customer credit was created

updatedAt
string<date-time>

Timestamp when the customer credit was last updated