---
title: "Gl Period Accrual Sweep"
method: POST
path: "/companies/{company_id}/gl/periods/{period_id}/accrual-sweep"
tags: ["gl-actions"]
---

# Gl Period Accrual Sweep

`POST /companies/{company_id}/gl/periods/{period_id}/accrual-sweep`

## Request

- Base URL: `https://app.zeno-works.ch` (the document declares no server; this is the origin it was published from)
- URL: `https://app.zeno-works.ch/companies/{company_id}/gl/periods/{period_id}/accrual-sweep`
- Auth: none declared

Run the period-end accrual sweep synchronously (accountant; human-initiated
pre-close action — never scheduled; ``prepare-close-with-ai`` below runs the
same sweep asynchronously via the work queue).

Finds cut-off candidates (schedule-less cross-boundary invoices, late invoices
reaching back into the period), asks the stateless accountant for deterministic
``period_accrual`` proposals, and posts the ones that clear the company's
autonomy policy as ``origin=ai`` (auto-reversing accruals / retro-deferral
reclass + schedule). Held candidates surface in the autonomy activity feed and
stay counted in close-checks. Idempotent per candidate.

## Path parameters

- `company_id` string, required
- `period_id` string, required

## Headers

- `authorization` string, nullable

## Cookies

- `access_token` string, nullable

## Response `200`

Successful Response

- GlAccrualSweepOut: Result of one period-end accrual sweep run (idempotent per candidate).
  - `candidates` integer, required
  - `skipped_fcy` integer, required
  - `posted` integer, required
  - `held` integer, required
  - `shadow` integer, required
  - `journal_entry_ids` string[]

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/zeno-works/apis/zeno-api.md) · [All operations](https://skmtc.dev/zeno-works/apis/zeno-api/llms.txt) · [OpenAPI document](https://skmtc.dev/zeno-works/apis/zeno-api/revisions/1eb93dde146c?raw)
