Light APIv1.0.0

API / Reference / Customer Credits

Archive customer credit

POST https://api.light.inc/v1/customer-credits/{customerCreditId}/archive

Archives the given customer credit

Authorization

Send one of these on every request. See Authentication for how to get credentials.

  • API key

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

  • Bearer token

Path parameters

  • customerCreditId string · uuidrequired

Response

  • id string · uuid

    Unique identifier for the object

  • companyId string · uuid

    ID of the company

  • companyEntityId string · uuid

    ID of the entity

  • amount integer · int64

    Total customer credit amount in cents

  • customerName string

    Name of the customer

  • customerId string · uuid

    ID of the customer

  • status string

    Status of the customer credit

    ⚠️ This enum is not exhaustive; new values may be added in the future.

    One of DRAFT APPROVAL_PENDING APPROVED POSTED PARTIALLY_CLEARED CLEARED ARCHIVED

  • description string

    Description of the customer credit

  • currency string

  • documentDate string · date

    Date when the customer credit was issued

  • valuationDate string · date

    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 array of object

    List of customer credit line items

    • 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

      • amount integer · int64

      • dcSign string

        ⚠️ This enum is not exhaustive; new values may be added in the future.

        One of D C

    • netTransactionAmount object

      • amount integer · int64

      • dcSign string

        ⚠️ This enum is not exhaustive; new values may be added in the future.

        One of D C

    • description string

      Description of the customer credit line item

    • ledgerTaxId string · uuid

      ID of the tax code

    • taxTransactionAmount object

      • amount integer · int64

      • dcSign string

        ⚠️ This enum is not exhaustive; new values may be added in the future.

        One of D C

    • ledgerAccountId string · uuid

      ID of the ledger account

    • avataxCode string

      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

      ID of the accrual template

    • accrualStartDate string · date

      Start date for accrual

    • accrualEndDate string · date

      End date for accrual

    • accrualDefaultDuration integer · int32

      Default duration for accrual in months

  • 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

    ID of the user who last updated the customer credit

  • linkedInvoiceReceivable object

    Invoice payable details

    • id string · uuid

      Unique identifier for the object

    • documentNumber string

      Document number

    • documentDate string · date

      Date the accounting document was issued

    • status string

      Status of the accounting document

      ⚠️ This enum is not exhaustive; new values may be added in the future.

      One of DRAFT APPROVAL_PENDING APPROVED POSTED PARTIALLY_CLEARED CLEARED ARCHIVED

    • amount integer · int64

      The amount of the accounting document in cents

    • currency string