Light v1 - Customer Credits API

The v1 - Customer Credits API from Light — 12 operation(s) for v1 - customer credits.

Operations 16

POST /v1/customer-credits/{customerCreditId}/archive Archive customer credit #
GET /v1/customer-credits List customer credits #
POST /v1/customer-credits Create customer credit #
POST /v1/customer-credits/{customerCreditId}/lines Create customer credit line #
DELETE /v1/customer-credits/{customerCreditId}/lines/{lineId} Delete customer credit line #
PATCH /v1/customer-credits/{customerCreditId}/lines/{lineId} Update customer credit line #
GET /v1/customer-credits/{customerCreditId} Get customer credit #
PATCH /v1/customer-credits/{customerCreditId} Update customer credit #
POST /v1/customer-credits/{customerCreditId}/invoice-receivables/{invoiceReceivableId}/link Link customer credit to invoice #
POST /v1/customer-credits/{customerCreditId}/invoice-receivables/{invoiceReceivableId} Link customer credit #
DELETE /v1/customer-credits/{customerCreditId}/invoice-receivables/{invoiceReceivableId} Unlink customer credit #
POST /v1/customer-credits/{customerCreditId}/post-and-send-email Post and send customer credit #
POST /v1/customer-credits/{customerCreditId}/post Post customer credit #
POST /v1/customer-credits/{customerCreditId}/submit-einvoice Submit e-invoice for customer credit #
POST /v1/customer-credits/{customerCreditId}/unarchive Unarchive customer credit #
POST /v1/customer-credits/{customerCreditId}/invoice-receivables/{invoiceReceivableId}/unlink Unlink customer credit from invoice #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/light-v1-customer-credits-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

light-v1-customer-credits-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Light v1 - Customer Credits API
  version: 1.0.0
security:
- apiKeyAuth: []
- bearerAuth: []
tags:
- name: v1 - Customer Credits
paths:
  /v1/customer-credits/{customerCreditId}/archive:
    post:
      tags:
      - v1 - Customer Credits
      summary: Archive customer credit
      description: Archives the given customer credit
      operationId: archiveCustomerCredit
      parameters:
      - name: customerCreditId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        default:
          description: default response
          content:
            application/json;charset=UTF-8:
              schema:
                $ref: '#/components/schemas/ExternalCustomerCreditV1Model'
  /v1/customer-credits:
    get:
      tags:
      - v1 - Customer Credits
      summary: List customer credits
      description: Returns a paginated list of customer credits
      operationId: listCustomerCredits
      parameters:
      - name: sort
        in: query
        schema:
          type: string
          description: "Sort string in the format `field:direction`. To provide multiple sort fields, separate them with commas.\n\nAvailable directions: `asc`, `desc`. \n\nAvailable fields: `amount`, `businessPartnerName`, `documentDate`, `postingDate`, `status`."
          example: amount:desc,createdAt:asc
      - name: filter
        in: query
        schema:
          type: string
          description: "Filter string in the format `field:operator:value`. To provide multiple filters, separate them with commas.\n\nAvailable operators: `eq`, `ne`, `in`, `not_in`, `gt`, `gte`, `lt`, `lte`.\n - For `in` and `not_in` operators, provide multiple values separated by the pipe character (`|`). \n\nAvailable fields: `businessPartnerId`, `companyEntityId`, `currency`, `documentDate`, `einvoiceStatus`, `id`, `postingDate`, `status`, `updatedAt`."
          example: state:in:IN_DRAFT|SCHEDULED|PAID,amount:gte:500,vendorId:ne:null
      - name: limit
        in: query
        description: Maximum number of items to return. Default is 50, maximum is 200.
        schema:
          maximum: 200
          type: integer
          format: int32
      - name: cursor
        in: query
        description: 'The cursor position to start returning results from.

          To opt-in into cursor-based pagination, provide `0` for the initial request.

          For subsequent requests, use `nextCursor` and `prevCursor` from the previous response to navigate.

          Cursor values are opaque and should not be constructed manually.'
        schema:
          type: string
      - name: include
        in: query
        description: Related objects to include on every customer credit. Supported value can be `INVOICE_RECEIVABLE`
        schema:
          uniqueItems: true
          type: array
          items:
            type: string
            description: ⚠️ This enum is not exhaustive; new values may be added in the future.
            enum:
            - INVOICE_RECEIVABLE
      responses:
        default:
          description: default response
          content:
            application/json;charset=UTF-8:
              schema:
                $ref: '#/components/schemas/ExternalCursorPaginatedResponseV1ModelExternalCustomerCreditV1Model'
    post:
      tags:
      - v1 - Customer Credits
      summary: Create customer credit
      description: Creates a new customer credit
      operationId: createCustomerCredit
      parameters:
      - name: X-Idempotency-Key
        in: header
        schema:
          type: string
      requestBody:
        content:
          application/json;charset=UTF-8:
            schema:
              $ref: '#/components/schemas/ExternalCreateCustomerCreditRequestV1Model'
      responses:
        default:
          description: default response
          content:
            application/json;charset=UTF-8:
              schema:
                $ref: '#/components/schemas/ExternalCustomerCreditV1Model'
  /v1/customer-credits/{customerCreditId}/lines:
    post:
      tags:
      - v1 - Customer Credits
      summary: Create customer credit line
      description: Creates a new line for the given customer credit
      operationId: createCustomerCreditLine
      parameters:
      - name: customerCreditId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        content:
          application/json;charset=UTF-8:
            schema:
              $ref: '#/components/schemas/ExternalCreateCustomerCreditLineRequestV1Model'
      responses:
        default:
          description: default response
          content:
            application/json;charset=UTF-8:
              schema:
                $ref: '#/components/schemas/ExternalCustomerCreditLineV1Model'
  /v1/customer-credits/{customerCreditId}/lines/{lineId}:
    delete:
      tags:
      - v1 - Customer Credits
      summary: Delete customer credit line
      description: Deletes the given customer credit line
      operationId: deleteCustomerCreditLine
      parameters:
      - name: customerCreditId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: lineId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        default:
          description: default response
          content:
            application/json;charset=UTF-8: {}
    patch:
      tags:
      - v1 - Customer Credits
      summary: Update customer credit line
      description: Updates the given customer credit line
      operationId: updateCustomerCreditLine
      parameters:
      - name: customerCreditId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: lineId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        content:
          application/json;charset=UTF-8:
            schema:
              $ref: '#/components/schemas/ExternalUpdateCustomerCreditLineRequestV1Model'
      responses:
        default:
          description: default response
          content:
            application/json;charset=UTF-8:
              schema:
                $ref: '#/components/schemas/ExternalCustomerCreditLineV1Model'
  /v1/customer-credits/{customerCreditId}:
    get:
      tags:
      - v1 - Customer Credits
      summary: Get customer credit
      description: Returns a customer credit by ID
      operationId: getCustomerCredit
      parameters:
      - name: customerCreditId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        default:
          description: default response
          content:
            application/json;charset=UTF-8:
              schema:
                $ref: '#/components/schemas/ExternalCustomerCreditV1Model'
    patch:
      tags:
      - v1 - Customer Credits
      summary: Update customer credit
      description: Updates the given customer credit
      operationId: updateCustomerCredit
      parameters:
      - name: X-Idempotency-Key
        in: header
        schema:
          type: string
      - name: customerCreditId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        content:
          application/json;charset=UTF-8:
            schema:
              $ref: '#/components/schemas/ExternalUpdateCustomerCreditRequestV1Model'
      responses:
        default:
          description: default response
          content:
            application/json;charset=UTF-8:
              schema:
                $ref: '#/components/schemas/ExternalCustomerCreditV1Model'
  /v1/customer-credits/{customerCreditId}/invoice-receivables/{invoiceReceivableId}/link:
    post:
      tags:
      - v1 - Customer Credits
      summary: Link customer credit to invoice
      description: Links a customer credit to a sales invoice
      operationId: linkCustomerCreditToInvoice
      parameters:
      - name: customerCreditId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: invoiceReceivableId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        content:
          application/json;charset=UTF-8:
            schema:
              $ref: '#/components/schemas/ExternalLinkCustomerCreditToInvoiceReceivableRequestV1Model'
      responses:
        default:
          description: default response
          content:
            application/json;charset=UTF-8:
              schema:
                $ref: '#/components/schemas/ExternalCustomerCreditInvoiceReceivableV1Model'
  /v1/customer-credits/{customerCreditId}/invoice-receivables/{invoiceReceivableId}:
    post:
      tags:
      - v1 - Customer Credits
      summary: Link customer credit
      description: Links a customer credit to a sales invoice
      operationId: linkCustomerCredit
      parameters:
      - name: customerCreditId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: invoiceReceivableId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        content:
          application/json;charset=UTF-8:
            schema:
              $ref: '#/components/schemas/ExternalLinkCustomerCreditToInvoiceReceivableRequestV1Model'
      responses:
        default:
          description: default response
          content:
            application/json;charset=UTF-8:
              schema:
                $ref: '#/components/schemas/ExternalCustomerCreditInvoiceReceivableV1Model'
    delete:
      tags:
      - v1 - Customer Credits
      summary: Unlink customer credit
      description: 'Deprecated: Use POST /{customerCreditId}/invoice-receivables/{invoiceReceivableId}/unlink instead. Unlinks a customer credit from a sales invoice. If the customer credit has already been applied (CLEARED or PARTIALLY_CLEARED status), this will reverse the clearing entries in the ledger.'
      operationId: unlinkCustomerCredit
      parameters:
      - name: customerCreditId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: invoiceReceivableId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        default:
          description: default response
          content:
            application/json;charset=UTF-8: {}
      deprecated: true
  /v1/customer-credits/{customerCreditId}/post-and-send-email:
    post:
      tags:
      - v1 - Customer Credits
      summary: Post and send customer credit
      description: Posts the customer credit and sends it via email. Optionally submits to e-invoicing if shouldSubmitEInvoice is set.
      operationId: postAndSendCustomerCredit
      parameters:
      - name: customerCreditId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        content:
          application/json;charset=UTF-8:
            schema:
              $ref: '#/components/schemas/ExternalPostAndSendCustomerCreditRequestV1Model'
      responses:
        default:
          description: default response
          content:
            application/json;charset=UTF-8:
              schema:
                $ref: '#/components/schemas/ExternalCustomerCreditV1Model'
  /v1/customer-credits/{customerCreditId}/post:
    post:
      tags:
      - v1 - Customer Credits
      summary: Post customer credit
      description: Posts the given customer credit and applies to invoice if linked
      operationId: postCustomerCredit
      parameters:
      - name: customerCreditId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        content:
          application/json;charset=UTF-8:
            schema:
              $ref: '#/components/schemas/ExternalPostCustomerCreditRequestV1Model'
      responses:
        default:
          description: default response
          content:
            application/json;charset=UTF-8:
              schema:
                $ref: '#/components/schemas/ExternalCustomerCreditV1Model'
  /v1/customer-credits/{customerCreditId}/submit-einvoice:
    post:
      tags:
      - v1 - Customer Credits
      summary: Submit e-invoice for customer credit
      description: Submits an e-invoice for the given customer credit. The customer credit must be posted.
      operationId: submitCustomerCreditEInvoice
      parameters:
      - name: customerCreditId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        default:
          description: default response
          content:
            application/json;charset=UTF-8: {}
  /v1/customer-credits/{customerCreditId}/unarchive:
    post:
      tags:
      - v1 - Customer Credits
      summary: Unarchive customer credit
      description: Unarchives the given customer credit and reverts it to draft
      operationId: unarchiveCustomerCredit
      parameters:
      - name: customerCreditId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: Customer credit unarchived successfully.
          content:
            application/json;charset=UTF-8:
              schema:
                $ref: '#/components/schemas/ExternalCustomerCreditV1Model'
        '400':
          description: Bad request. Customer credit is not archived.
          content:
            application/json;charset=UTF-8:
              schema:
                $ref: '#/components/schemas/ExternalUiClientExceptionV1Model'
  /v1/customer-credits/{customerCreditId}/invoice-receivables/{invoiceReceivableId}/unlink:
    post:
      tags:
      - v1 - Customer Credits
      summary: Unlink customer credit from invoice
      description: Unlinks a customer credit from a sales invoice. If the customer credit has already been applied (CLEARED or PARTIALLY_CLEARED status), this will reverse the clearing entries in the ledger.
      operationId: unlinkCustomerCreditFromInvoice
      parameters:
      - name: customerCreditId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: invoiceReceivableId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        default:
          description: default response
          content:
            application/json;charset=UTF-8: {}
components:
  schemas:
    ExternalRelatedAccDocV1Model:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the object
          format: uuid
        documentNumber:
          type:
          - string
          - 'null'
          description: Document number
        documentDate:
          type:
          - string
          - 'null'
          description: Date the accounting document was issued
          format: date
        status:
          type: string
          description: 'Status of the accounting document


            ⚠️ This enum is not exhaustive; new values may be added in the future.'
          deprecated: false
          enum:
          - DRAFT
          - APPROVAL_PENDING
          - APPROVED
          - POSTED
          - PARTIALLY_CLEARED
          - CLEARED
          - ARCHIVED
        amount:
          type:
          - integer
          - 'null'
          description: The amount of the accounting document in cents
          format: int64
        currency:
          type: string
          example: USD
      description: Invoice payable details
    SetCustomPropertyRequestV1Model:
      type:
      - object
      - 'null'
      properties:
        groupId:
          type: string
          format: uuid
        valueIds:
          type: array
          items:
            type: string
            format: uuid
        inlineValues:
          type: array
          items:
            type: string
      description: List of custom properties to set on the vendor.
    ExternalCreateCustomerCreditRequestV1Model:
      type: object
      properties:
        companyEntityId:
          type:
          - string
          - 'null'
          description: ID of the entity
          format: uuid
        documentNumber:
          type:
          - string
          - 'null'
        description:
          type:
          - string
          - 'null'
          description: Description of the customer credit
        currency:
          type:
          - string
          - 'null'
          example: USD
        localCurrencyFxRate:
          type:
          - number
          - 'null'
          description: Custom foreign exchange rate for the ledger's local currency. If not provided Light uses official ECB rates
        groupCurrencyFxRate:
          type:
          - number
          - 'null'
          description: Custom foreign exchange rate for the ledger's group currency. If not provided Light uses official ECB rates
        documentDate:
          type:
          - string
          - 'null'
          description: Date when the customer credit was issued
          format: date
        documentTemplateId:
          type:
          - string
          - 'null'
          description: ID of the document template that the customer credit will use
          format: uuid
        areLinesWithTax:
          type: boolean
          description: 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
        customerId:
          type:
          - string
          - 'null'
          description: ID of the customer
          format: uuid
        amount:
          type:
          - integer
          - 'null'
          description: Total customer credit amount in cents
          format: int64
        lines:
          type: array
          description: List of customer credit line items
          items:
            $ref: '#/components/schemas/ExternalCreateCustomerCreditLineRequestV1Model'
        customProperties:
          type:
          - array
          - 'null'
          description: List of custom properties associated with the customer credit
          items:
            $ref: '#/components/schemas/SetCustomPropertyRequestV1Model'
    ExternalUiClientExceptionErrorV1Model:
      type: object
      properties:
        type:
          type: string
          description: A string code identifying the error type
        message:
          type: string
          description: A human-readable message providing more details about the error
        path:
          type:
          - array
          - 'null'
          description: Optional path of the error when the error is for a specific field. Used mostly on BAD_REQUEST errors, that path will match the field name on the request object
          items:
            type:
            - string
            - 'null'
            description: Optional path of the error when the error is for a specific field. Used mostly on BAD_REQUEST errors, that path will match the field name on the request object
        context:
          type:
          - object
          - 'null'
          additionalProperties:
            type:
            - object
            - 'null'
            description: Optional context providing additional information about the error. This can include any relevant data that might help in understanding or resolving the error
          description: Optional context providing additional information about the error. This can include any relevant data that might help in understanding or resolving the error
      description: List of errors providing details about what went wrong
    ExternalPostAndSendCustomerCreditRequestV1Model:
      type: object
      properties:
        emailInfo:
          $ref: '#/components/schemas/ExternalCustomerCreditEmailInfoRequestV1Model'
        shouldSubmitEInvoice:
          type:
          - boolean
          - 'null'
          description: 'Whether to submit the customer credit to the e-invoicing system (if configured). If true, the e-credit note will be submitted. If false, it will not. If omitted (null), the system will auto-detect: submit if the linked invoice has an e-invoice ID.'
    ExternalLinkCustomerCreditToInvoiceReceivableRequestV1Model:
      type: object
      properties:
        amount:
          type:
          - integer
          - 'null'
          description: Amount of the customer credit to apply to the sales invoice, in the smallest currency unit. If omitted, the remaining unallocated customer-credit balance is applied, capped by the invoice receivable's remaining balance. Partial allocation is not supported for entities configured with an e-invoicing provider.
          format: int64
    ExternalUiClientExceptionV1Model:
      type:
      - object
      - 'null'
      properties:
        name:
          type: string
          description: The error name
        type:
          type: string
          description: 'The error type


            ⚠️ This enum is not exhaustive; new values may be added in the future.'
          deprecated: false
          enum:
          - BAD_REQUEST
          - UNAUTHORIZED
          - FORBIDDEN
          - NOT_FOUND
          - CONFLICT
          - UNPROCESSABLE_CONTENT
        errors:
          type: array
          description: List of errors providing details about what went wrong
          items:
            $ref: '#/components/schemas/ExternalUiClientExceptionErrorV1Model'
      description: Failure context when vendor onboarding fails.
    ExternalUpdateCustomerCreditRequestV1Model:
      type: object
      properties:
        companyEntityId:
          type:
          - string
          - 'null'
          description: ID of the entity
          format: uuid
        customerId:
          type:
          - string
          - 'null'
          description: ID of the customer
          format: uuid
        documentDate:
          type:
          - string
          - 'null'
          description: Date when the customer credit was issued
          format: date
        areLinesWithTax:
          type:
          - boolean
          - 'null'
          description: 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
        customProperties:
          type:
          - array
          - 'null'
          description: List of custom properties associated with the customer credit
          items:
            $ref: '#/components/schemas/SetCustomPropertyRequestV1Model'
        description:
          type:
          - string
          - 'null'
          description: Description of the customer credit
        currency:
          type:
          - string
          - 'null'
          example: USD
        amount:
          type:
          - integer
          - 'null'
          description: Total customer credit amount in cents
          format: int64
        documentNumber:
          type:
          - string
          - 'null'
        documentTemplateId:
          type:
          - string
          - 'null'
          description: ID of the document template that the customer credit will use
          format: uuid
    ExternalCustomerCreditLineV1Model:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the object
          format: uuid
        companyId:
          type: string
          description: ID of the company
          format: uuid
        customerCreditId:
          type: string
          description: ID of the customer credit this line belongs to
          format: uuid
        grossTransactionAmount:
          $ref: '#/components/schemas/DirectedAmount'
        netTransactionAmount:
          $ref: '#/components/schemas/DirectedAmount'
        description:
          type:
          - string
          - 'null'
          description: Description of the customer credit line item
        ledgerTaxId:
          type:
          - string
          - 'null'
          description: ID of the tax code
          format: uuid
        taxTransactionAmount:
          $ref: '#/components/schemas/DirectedAmount'
        ledgerAccountId:
          type:
          - string
          - 'null'
          description: ID of the ledger account
          format: uuid
        avataxCode:
          type:
          - string
          - 'null'
          description: Avalara tax code. Used when the customer credit tax engine is AVATAX
        productId:
          type: string
          description: ID of the product
          format: uuid
        quantity:
          type: number
          description: Quantity of the product
        createdAt:
          type: string
          description: Timestamp when the customer credit was created
          format: date-time
        updatedAt:
          type: string
          description: Timestamp when the customer credit was last updated
          format: date-time
        accrualTemplateId:
          type:
          - string
          - 'null'
          description: ID of the accrual template
          format: uuid
        accrualStartDate:
          type:
          - string
          - 'null'
          description: Start date for accrual
          format: date
        accrualEndDate:
          type:
          - string
          - 'null'
          description: End date for accrual
          format: date
        accrualDefaultDuration:
          type:
          - integer
          - 'null'
          description: Default duration for accrual in months
          format: int32
    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
    ExternalCustomerCreditV1Model:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the object
          format: uuid
        companyId:
          type: string
          description: ID of the company
          format: uuid
        companyEntityId:
          type:
          - string
          - 'null'
          description: ID of the entity
          format: uuid
        amount:
          type:
          - integer
          - 'null'
          description: Total customer credit amount in cents
          format: int64
        customerName:
          type:
          - string
          - 'null'
          description: Name of the customer
        customerId:
          type:
          - string
          - 'null'
          description: ID of the customer
          format: uuid
        status:
          type: string
          description: 'Status of the customer credit


            ⚠️ This enum is not exhaustive; new values may be added in the future.'
          deprecated: false
          enum:
          - DRAFT
          - APPROVAL_PENDING
          - APPROVED
          - POSTED
          - PARTIALLY_CLEARED
          - CLEARED
          - ARCHIVED
        description:
          type:
          - string
          - 'null'
          description: Description of the customer credit
        currency:
          type: string
          example: USD
        documentDate:
          type:
          - string
          - 'null'
          description: Date when the customer credit was issued
          format: date
        valuationDate:
          type:
          - string
          - 'null'
          description: Date used when applying foreign exchange rate
          format: date
        areLinesWithTax:
          type: boolean
          description: 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:
          type: array
          description: List of customer credit line items
          items:
            $ref: '#/components/schemas/ExternalCustomerCreditLineV1Model'
        createdAt:
          type: string
          description: Timestamp when the customer credit was created
          format: date-time
        updatedAt:
          type: string
          description: Timestamp when the customer credit was last updated
          format: date-time
        updatedBy:
          type:
          - string
          - 'null'
          description: ID of the user who last updated the customer credit
          format: uuid
        linkedInvoiceReceivable:
          $ref: '#/components/schemas/ExternalRelatedAccDocV1Model'
    ExternalCustomerCreditInvoiceReceivableV1Model:
      type: object
      properties:
        companyId:
          type: string
          description: ID of the company
          format: uuid
        customerCredit:
          $ref: '#/components/schemas/ExternalRelatedAccDocV1Model'
        invoiceReceivable:
          $ref: '#/components/schemas/ExternalRelatedAccDocV1Model'
        amount:
          type: integer
          description: Amount of the customer credit applied to the sales invoice, in the smallest currency unit
          format: int64
        linkedAt:
          type: string
          description: Timestamp when the customer credit was linked to the sales invoice
          format: date-time
    ExternalCreateCustomerCreditLineRequestV1Model:
      type: object
      properties:
        productId:
          type: string
          description: ID of the product
          format: uuid
        quantity:
          type: number
          description: Quantity of the product
        netTransactionAmount:
          $ref: '#/components/schemas/DirectedAmount'
        grossTransactionAmount:
          $ref: '#/components/schemas/DirectedAmount'
        taxTransactionAmount:
          $ref: '#/components/schemas/DirectedAmount'
        description:
          type:
          - string
          - 'null'
          description: Description of the customer credit line item
        ledgerTaxId:
          type:
          - string
          - 'null'
          description: ID of the tax code
          format: uuid
        ledgerAccountId:
          type:
          - string
          - 'null'
          description: ID of the ledger account
          format: uuid
        avataxCode:
          type:
          - string
          - 'null'
          description: Avalara tax code. Used when the customer credit tax engine is AVATAX
        customProperties:
          type:
          - array
          - 'null'
          description: List of custom properties associated with the line
          items:
            $ref: '#/components/schemas/SetCustomPropertyRequestV1Model'
        accrualTemplateId:
          type:
          - string
          - 'null'
          description: ID of the accrual template
          format: uuid
        accrualStartDate:
          type:
          - string
          - 'null'
          description: Start date for accrual
          format: date
        accrualEndDate:
          type:
          - string
          - 'null'
          description: End date for accrual
          format: date
    ExternalCustomerCreditEmailInfoRequestV1Model:
      type: object
      properties:
        subject:
          type: string
          description: Email subject line
        replyTo:
          type: string
          description: Reply-to email address
        recipients:
          type: array
          description: List of email addresses to send the customer credit to
          items:
            type: string
            description: List of email addresses to send the customer credit to
        cc:
          type:
          - array
          - 'null'
          description: List of email addresses to CC on the email
          items:
            type:
            - string
            - 'null'
            description: List of email addresses to CC on the e

# --- truncated at 32 KB (35 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/light/refs/heads/main/openapi/light-v1-customer-credits-api-openapi.yml