Complete an accounting period task
https://api.light.inc/v1/accounting-periods/{accountingPeriodId}/tasks/{taskId}/complete
Completes the task for the selected company entities. Tasks are completed in this order: the three lock tasks (LOCK_AP, LOCK_AR, LOCK_JE), then the intercompany sign-off (INTERCOMPANY_DOCUMENTS), then the FX revaluation (FX_REVALUATION). A task is COMPLETED once every active company entity (not inactive or archived) has completed it, and IN_PROGRESS before that. FX_REVALUATION also needs the previous period's FX revaluation done for the company entity, posts the FX revaluation documents, and stays IN_PROGRESS before the period's end date. Completing a task again for a company entity that already completed it is a new run, which refreshes the completion's completedBy and completedAt. A COMPLETED task stays COMPLETED when it runs again, even after a new company entity was added, and the checks that cover the whole company run again; when one fails, nothing changes.
Permissions checked: accounting-periods:update and access to every company entity. What a call needs depends on the caller, the record and the request.
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
-
accountingPeriodIdstring · uuidrequired -
taskIdstring · uuidrequired
Headers
-
X-Idempotency-Keystring
Request body
application/json;charset=UTF-8 · required
-
actionstringrequiredUPDATE_ALLfor every active company entity of the company (statusesACTIVEandHIDDEN; notINACTIVEorARCHIVED), orUPDATE_SELECTEDfor the company entities incompanyEntityIds⚠️ This enum is not exhaustive; new values may be added in the future.
One of
UPDATE_ALLUPDATE_SELECTED -
companyEntityIdsarray of string · uuidIDs of the company entities to act for. Read only with
UPDATE_SELECTED, which needs at least one; refused withUPDATE_ALLunless empty -
shouldPostToDisabledAccountsbooleanFor an
FX_REVALUATIONtask: post the revaluation documents even to ledger accounts that are disabled. Without it, a revaluation that needs a disabled ledger account is refused withLEDGER_ACCOUNTS_DISABLED. Ignored by other tasks. Omit for false
Response
The accounting period, with the completed task
-
idstring · uuidUnique identifier for the accounting period
-
companyIdstring · uuidID of the company
-
labelstringDisplay name of the period, such as
October 2026. Null when not set -
typestringDEFAULTfor a regular period (a month, quarter or year, as the company's period settings say).YEAR_END_ADJUSTMENTfor the period dated the fiscal year's last day, which only journal entries post into⚠️ This enum is not exhaustive; new values may be added in the future.
One of
DEFAULTYEAR_END_ADJUSTMENT -
startDatestring · dateFirst day of the period
-
endDatestring · dateLast day of the period, inclusive
-
statusstringCLOSEDblocks every posting assigned to the period: the regular period holding the posting's date, or the year-end adjustment period for journal entries marked for year-end adjustment. A bill dated on the fiscal year's last day uses the final regular period, not the adjustment period.OPENallows postings the period's tasks do not lock⚠️ This enum is not exhaustive; new values may be added in the future.
One of
CLOSEDOPEN -
tasksarray of objectClose tasks of the period. The year-end adjustment period has none
-
idstring · uuidUnique identifier for the task
-
accountingPeriodIdstring · uuidID of the accounting period the task belongs to
-
typestringWhat the task does.
LOCK_APlocks bills and card transactions,LOCK_ARsales invoices,LOCK_JEjournal entries.INTERCOMPANY_DOCUMENTSsigns off intercompany documents,FX_REVALUATIONrevalues foreign currency balances⚠️ This enum is not exhaustive; new values may be added in the future.
One of
FX_REVALUATIONINTERCOMPANY_DOCUMENTSLOCK_APLOCK_ARLOCK_JE -
statusstringPENDINGbefore the task is completed for any company entity.IN_PROGRESSonce it is completed for some company entities, after an undo (possibly with no completions left), or, forFX_REVALUATION, before the period end date.COMPLETEDwhen it is done for every active company entity (not inactive or archived). Read the status from this field, not fromcompletions, which lists only the company entities the caller can see⚠️ This enum is not exhaustive; new values may be added in the future.
One of
COMPLETEDIN_PROGRESSPENDING -
completionsarray of objectCompany entities the task is done for, among those the caller can see
-
companyEntityIdstring · uuidID of the company entity the task is done for
-
completedBystring · uuidID of the principal that completed the task
-
completedAtstring · date-timeTimestamp when the task was completed for the company entity
-
-
createdAtstring · date-timeTimestamp when the task was created
-
updatedAtstring · date-timeTimestamp when the task was last updated
-
-
createdAtstring · date-timeTimestamp when the period was created
-
updatedAtstring · date-timeTimestamp when the period was last updated