> ## Documentation Index
> Fetch the complete documentation index at: https://docs.light.inc/llms.txt
> Use this file to discover all available pages before exploring further.

# Create credit note line

> Creates a new line item on a credit note in draft status.



## OpenAPI

````yaml /openapi-public.json post /v1/credit-notes/{creditNoteId}/lines
openapi: 3.0.1
info:
  title: Light API
  version: 1.0.0
servers: []
security:
  - apiKeyAuth: []
  - bearerAuth: []
paths:
  /v1/credit-notes/{creditNoteId}/lines:
    post:
      tags:
        - v1 - Credit Notes
      summary: Create credit note line
      description: Creates a new line item on a credit note in draft status.
      operationId: createCreditNoteLine
      parameters:
        - name: creditNoteId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json;charset=UTF-8:
            schema:
              $ref: '#/components/schemas/ExternalCreateCreditNoteLineRequestV1Model'
      responses:
        default:
          description: default response
          content:
            application/json;charset=UTF-8:
              schema:
                $ref: '#/components/schemas/ExternalCreditNoteLineV1Model'
components:
  schemas:
    ExternalCreateCreditNoteLineRequestV1Model:
      type: object
      properties:
        customProperties:
          type: array
          description: List of custom properties for this line
          nullable: true
          items:
            $ref: '#/components/schemas/ExternalSetCustomPropertyRequestV1Model'
        netTransactionAmount:
          $ref: '#/components/schemas/DirectedAmount'
        grossTransactionAmount:
          $ref: '#/components/schemas/DirectedAmount'
        taxTransactionAmount:
          $ref: '#/components/schemas/DirectedAmount'
        description:
          type: string
          description: Line description
          nullable: true
        ledgerTaxId:
          type: string
          description: ID of the tax code
          format: uuid
          nullable: true
        ledgerAccountId:
          type: string
          description: ID of the ledger account
          format: uuid
          nullable: true
        accrualTemplateId:
          type: string
          description: ID of the accrual template
          format: uuid
          nullable: true
        accrualStartDate:
          type: string
          description: Start date for accrual
          format: date
          nullable: true
        accrualEndDate:
          type: string
          description: End date for accrual
          format: date
          nullable: true
    ExternalCreditNoteLineV1Model:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the object
          format: uuid
        companyId:
          type: string
          description: ID of the company
          format: uuid
        creditNoteId:
          type: string
          description: ID of the credit note this line belongs to
          format: uuid
        grossTransactionAmount:
          $ref: '#/components/schemas/DirectedAmount'
        netTransactionAmount:
          $ref: '#/components/schemas/DirectedAmount'
        description:
          type: string
          description: Description of the credit note line item
          nullable: true
        ledgerTaxId:
          type: string
          description: ID of the tax code
          format: uuid
          nullable: true
        taxTransactionAmount:
          $ref: '#/components/schemas/DirectedAmount'
        ledgerAccountId:
          type: string
          description: ID of the ledger account
          format: uuid
          nullable: true
        costCenterId:
          type: string
          description: ID of the cost center
          format: uuid
          nullable: true
        createdAt:
          type: string
          description: Timestamp when the credit note line item was created
          format: date-time
        updatedAt:
          type: string
          description: Timestamp when the credit note line item was last updated
          format: date-time
        accrualTemplateId:
          type: string
          description: ID of the accrual template
          format: uuid
          nullable: true
        accrualStartDate:
          type: string
          description: Start date for accrual
          format: date
          nullable: true
        accrualEndDate:
          type: string
          description: End date for accrual
          format: date
          nullable: true
        accrualDefaultDuration:
          type: integer
          description: Default duration for accrual in months
          format: int32
          nullable: true
    ExternalSetCustomPropertyRequestV1Model:
      type: object
      properties:
        groupId:
          type: string
          description: ID of the custom property group.
          format: uuid
        valueIds:
          type: array
          description: >-
            IDs of the selected custom property values. It behaves as a PUT
            operation, so if empty the existing ones will be effectively
            deleted.
          items:
            type: string
            description: >-
              IDs of the selected custom property values. It behaves as a PUT
              operation, so if empty the existing ones will be effectively
              deleted.
            format: uuid
        inlineValues:
          type: array
          description: >-
            Inline custom property values (used for TEXT/NUMERIC/DATE/etc.
            groups). It behaves as a PUT operation, so if empty or null the
            existing ones will be effectively deleted.
          nullable: true
          items:
            type: string
            description: >-
              Inline custom property values (used for TEXT/NUMERIC/DATE/etc.
              groups). It behaves as a PUT operation, so if empty or null the
              existing ones will be effectively deleted.
            nullable: true
      description: >-
        List of custom properties to set on the vendor. Replaces the existing
        set.
      nullable: true
    DirectedAmount:
      type: object
      properties:
        amount:
          type: integer
          format: int64
        dcSign:
          type: string
          description: >-
            ⚠️ This enum is not exhaustive; new values may be added in the
            future.
          enum:
            - D
            - C
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      description: >-
        Basic authentication header of the form **Basic** **<api_key>**, where
        **<api_key>** is your api key.
      name: Authorization
      in: header
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````