---
title: "Create customer credit line"
method: POST
path: "/v1/customer-credits/{customerCreditId}/lines"
tags: ["v1 - Customer Credits"]
---

# Create customer credit line

`POST /v1/customer-credits/{customerCreditId}/lines`

## Request

- Base URL: `https://light.inc` (the document declares no server; this is the origin it was published from)
- URL: `https://light.inc/v1/customer-credits/{customerCreditId}/lines`
- Auth: one of:
  - API key in header `Authorization`
  - HTTP bearer

Creates a new line for the given customer credit

## Path parameters

- `customerCreditId` string, uuid, required

## Request body

- ExternalCreateCustomerCreditLineRequestV1Model
  - `productId` string, uuid: ID of the product
  - `quantity` number: Quantity of the product
  - `netTransactionAmount` DirectedAmount
    - `amount` integer
    - `dcSign` 'D' | 'C': ⚠️ This enum is not exhaustive; new values may be added in the future.
  - `grossTransactionAmount` DirectedAmount
    - `amount` integer
    - `dcSign` 'D' | 'C': ⚠️ This enum is not exhaustive; new values may be added in the future.
  - `taxTransactionAmount` DirectedAmount
    - `amount` integer
    - `dcSign` 'D' | 'C': ⚠️ This enum is not exhaustive; new values may be added in the future.
  - `description` string, nullable: Description of the customer credit line item
  - `ledgerTaxId` string, uuid, nullable: ID of the tax code
  - `ledgerAccountId` string, uuid, nullable: ID of the ledger account
  - `avataxCode` string, nullable: Avalara tax code. Used when the customer credit tax engine is AVATAX
  - `customProperties` SetCustomPropertyRequestV1Model[], nullable: List of custom properties associated with the line
    - `groupId` string, uuid
    - `valueIds` string[]
    - `inlineValues` string[]
  - `accrualTemplateId` string, uuid, nullable: ID of the accrual template
  - `accrualStartDate` string, date, nullable: Start date for accrual
  - `accrualEndDate` string, date, nullable: End date for accrual

## Response `default`

default response

- ExternalCustomerCreditLineV1Model
  - `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` DirectedAmount
    - `amount` integer
    - `dcSign` 'D' | 'C': ⚠️ This enum is not exhaustive; new values may be added in the future.
  - `netTransactionAmount` DirectedAmount
    - `amount` integer
    - `dcSign` 'D' | 'C': ⚠️ This enum is not exhaustive; new values may be added in the future.
  - `description` string, nullable: Description of the customer credit line item
  - `ledgerTaxId` string, uuid, nullable: ID of the tax code
  - `taxTransactionAmount` DirectedAmount
    - `amount` integer
    - `dcSign` 'D' | 'C': ⚠️ This enum is not exhaustive; new values may be added in the future.
  - `ledgerAccountId` string, uuid, nullable: ID of the ledger account
  - `avataxCode` string, nullable: Avalara tax code. Used when the customer credit tax engine is AVATAX
  - `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
  - `accrualTemplateId` string, uuid, nullable: ID of the accrual template
  - `accrualStartDate` string, date, nullable: Start date for accrual
  - `accrualEndDate` string, date, nullable: End date for accrual
  - `accrualDefaultDuration` integer, nullable: Default duration for accrual in months

---

[API](https://skmtc.dev/light/apis/light-api.md) - [All operations](https://skmtc.dev/light/apis/light-api/llms.txt) - [OpenAPI document](https://skmtc.dev/light/apis/light-api/revisions/84f51306f648?raw)
