Light APIv1.0.0

API / Reference / Accounting Release Templates

Create accounting release template

POST https://api.light.inc/v1/accounting-release-templates

Creates a new accounting release template. The ledger accounts and type chosen here are fixed for the lifetime of the template

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

Request body

application/json;charset=UTF-8

  • name string

    Name of the template

  • method string

    How the amount is spread across the release schedule

    • STRAIGHT_LINE_WITH_PARTIAL_ADJUSTMENT - An equal amount each period, with the first and last periods adjusted for partial months
    • REDUCING_BALANCE - A fixed fraction of the remaining balance each period, so the amount declines over time

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

    One of STRAIGHT_LINE_WITH_PARTIAL_ADJUSTMENT REDUCING_BALANCE

  • type string

    The kind of document or asset this template applies to. Cannot be changed after creation

    • AR - Accounts receivable. Releases deferred revenue on invoice receivables
    • AP - Accounts payable. Releases prepaid expenses on invoice payables, credit notes and card transactions
    • JE - Journal entries
    • CONTRACT - Contracts. Releases deferred revenue over the contract term
    • FIXED_ASSET - Fixed assets. Depreciates a capitalised asset over its useful life

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

    One of AR AP JE CONTRACT FIXED_ASSET

  • deferralAccountId string · uuid

    ID of the ledger account holding the not-yet-released balance. Cannot be changed after creation

  • contractAccountId string · uuid

    ID of the ledger account used when the template is applied to a contract. Cannot be changed after creation

  • additionsAccountId string · uuid

    ID of the ledger account credited or debited by each generated release. Defaults to the deferral account. Cannot be changed after creation

  • disposalAccountId string · uuid

    ID of the ledger account used when a fixed asset is disposed of. Cannot be changed after creation

  • profitAccountId string · uuid

    ID of the ledger account for a gain on disposal. Cannot be changed after creation

  • lossAccountId string · uuid

    ID of the ledger account for a loss on disposal. Cannot be changed after creation

  • initialAmountPercentage number

    Fraction of the amount released in the first period, as a decimal between 0 and 1

  • residualAmountPercentage number

    Fraction of the amount left unreleased at the end of the schedule, as a decimal between 0 and 1

  • residualAmount integer · int64

    Absolute amount in cents left unreleased at the end of the schedule. Only for the REDUCING_BALANCE method, and mutually exclusive with reducingRate

  • reducingRate number

    Fraction of the remaining balance released each period, as a decimal between 0 and 1. Only for the REDUCING_BALANCE method, and mutually exclusive with residualAmount

  • accumulatePastReleasesEnabled boolean

    Whether releases for periods that have already passed are posted as a single catch-up amount in the current period

  • defaultDuration integer · int32

    Default number of months the release schedule runs for. Can be overridden per document

  • context string

    Free-text notes on the template

Response

  • id string · uuid

    Unique identifier for the object

  • companyId string · uuid

    ID of the company

  • createdBy string · uuid

    ID of the user who created the template

  • name string

    Name of the template

  • method string

    How the amount is spread across the release schedule

    • STRAIGHT_LINE_WITH_PARTIAL_ADJUSTMENT - An equal amount each period, with the first and last periods adjusted for partial months
    • REDUCING_BALANCE - A fixed fraction of the remaining balance each period, so the amount declines over time

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

    One of STRAIGHT_LINE_WITH_PARTIAL_ADJUSTMENT REDUCING_BALANCE

  • type string

    The kind of document or asset this template applies to. Fixed at creation

    • AR - Accounts receivable. Releases deferred revenue on invoice receivables
    • AP - Accounts payable. Releases prepaid expenses on invoice payables, credit notes and card transactions
    • JE - Journal entries
    • CONTRACT - Contracts. Releases deferred revenue over the contract term
    • FIXED_ASSET - Fixed assets. Depreciates a capitalised asset over its useful life

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

    One of AR AP JE CONTRACT FIXED_ASSET

  • deferralAccountId string · uuid

    ID of the ledger account holding the not-yet-released balance. Fixed at creation

  • contractAccountId string · uuid

    ID of the ledger account used when the template is applied to a contract. Fixed at creation

  • additionsAccountId string · uuid

    ID of the ledger account credited or debited by each generated release. Falls back to the deferral account when not set. Fixed at creation

  • disposalAccountId string · uuid

    ID of the ledger account used when a fixed asset is disposed of. Fixed at creation

  • profitAccountId string · uuid

    ID of the ledger account for a gain on disposal. Fixed at creation

  • lossAccountId string · uuid

    ID of the ledger account for a loss on disposal. Fixed at creation

  • initialAmountPercentage number

    Fraction of the amount released in the first period, as a decimal between 0 and 1

  • residualAmountPercentage number

    Fraction of the amount left unreleased at the end of the schedule, as a decimal between 0 and 1

  • residualAmount integer · int64

    Absolute amount in cents left unreleased at the end of the schedule. Only for the REDUCING_BALANCE method, and mutually exclusive with reducingRate

  • reducingRate number

    Fraction of the remaining balance released each period, as a decimal between 0 and 1. Only for the REDUCING_BALANCE method, and mutually exclusive with residualAmount

  • accumulatePastReleasesEnabled boolean

    Whether releases for periods that have already passed are posted as a single catch-up amount in the current period

  • defaultDuration integer · int32

    Default number of months the release schedule runs for. Can be overridden per document

  • context string

    Free-text notes on the template

  • status string

    Template status

    • ACTIVE - The template can be assigned to new documents and contracts
    • ARCHIVED - The template is archived and can no longer be assigned. Existing releases are unaffected

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

    One of ACTIVE ARCHIVED

  • createdAt string · date-time

    Timestamp when the template was created

  • updatedAt string · date-time

    Timestamp when the template was last updated