jaz-clio 9.6.2 → 9.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/assets/skills/api/SKILL.md +1 -1
- package/assets/skills/api/references/claims.md +3 -2
- package/assets/skills/api/references/endpoints.md +52 -0
- package/assets/skills/api/references/full-api-surface.md +31 -1
- package/assets/skills/cli/SKILL.md +6 -3
- package/assets/skills/cli/references/command-catalog.md +74 -2
- package/assets/skills/conversion/SKILL.md +1 -1
- package/assets/skills/jaz-kit/SKILL.md +1 -1
- package/assets/skills/jaz-pseudo-sql/SKILL.md +1 -1
- package/assets/skills/jobs/SKILL.md +1 -1
- package/assets/skills/transaction-recipes/SKILL.md +1 -1
- package/assets/templates/platform-rules/jaz-agent-rules.md +5 -3
- package/cli.mjs +548 -535
- package/dashboard-routes-manifest.json +368 -38
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
<p align="center">
|
|
4
4
|
<a href="https://www.npmjs.com/package/jaz-clio"><img src="https://img.shields.io/npm/v/jaz-clio?style=for-the-badge&logo=npm" alt="npm"></a>
|
|
5
5
|
<a href="https://www.npmjs.com/package/jaz-clio"><img src="https://img.shields.io/npm/dm/jaz-clio?style=for-the-badge&label=downloads" alt="npm downloads"></a>
|
|
6
|
-
<img src="https://img.shields.io/badge/tools-
|
|
6
|
+
<img src="https://img.shields.io/badge/tools-521-blue?style=for-the-badge" alt="521 tools">
|
|
7
7
|
<a href="https://github.com/teamtinvio/jaz-ai/blob/main/LICENSE"><img src="https://img.shields.io/github/license/teamtinvio/jaz-ai?style=for-the-badge&color=green" alt="License"></a>
|
|
8
8
|
</p>
|
|
9
9
|
|
|
10
10
|
<p align="center"><b>Fastest ledger for agents.</b><br>Jaz accounting on the command line, and inside any AI agent.</p>
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
521 tools · 80 command groups · 7 skills · 13 calculators · 12 job playbooks · 148 field-tested API rules.
|
|
13
13
|
|
|
14
14
|
```bash
|
|
15
15
|
npm install -g jaz-clio
|
|
@@ -71,7 +71,7 @@ clio modules list # which features are swit
|
|
|
71
71
|
clio navigate reports.profit-and-loss # deep link into the Jaz dashboard (offline)
|
|
72
72
|
```
|
|
73
73
|
|
|
74
|
-
|
|
74
|
+
80 command groups, 17 report types, 13 calculators, 12 job playbooks. Every command takes `--json`. Run `clio --help` for the full list.
|
|
75
75
|
|
|
76
76
|
Command groups by area:
|
|
77
77
|
|
|
@@ -109,7 +109,7 @@ that ends up in a journal.
|
|
|
109
109
|
|
|
110
110
|
## MCP server
|
|
111
111
|
|
|
112
|
-
|
|
112
|
+
521 tools for any AI agent that speaks MCP. Runs locally: no cloud, no ports.
|
|
113
113
|
|
|
114
114
|
> **No install at all?** Claude.ai, ChatGPT, Cowork, and Microsoft Copilot Studio can use Jaz through the hosted connector. Add `https://mcp.jaz.ai/mcp` as a custom connector and sign in with OAuth, no key. The local setup below is for terminal use, scripting, and editors that run MCP servers as local processes.
|
|
115
115
|
|
|
@@ -124,8 +124,9 @@ Turn APPROVED claims into journal entries, and record books-only employee payout
|
|
|
124
124
|
gateway transfer; `amount` / `paymentAccountResourceId` / `valueDate` required, `reference`
|
|
125
125
|
auto-generated. Its `payoutFor` is `REIMBURSEMENT` / `ADVANCE` only.
|
|
126
126
|
- **`search_employee_payouts`** lists payouts (filter by employee, reference, payout
|
|
127
|
-
status/type). `payoutType`
|
|
128
|
-
(
|
|
127
|
+
status/type). `payoutType` takes exactly `DIRECT_ENTRY` (a recorded payout),
|
|
128
|
+
`DISBURSEMENT` (a payment gateway payout) and `PAYRUN_PAYOUT` (a payrun's payouts,
|
|
129
|
+
recorded or through the gateway, which the other two leave out); any other value is a 422.
|
|
129
130
|
`DISBURSEMENT` / `DIRECT_ENTRY` rows originate from the gateway/conversion flows and are
|
|
130
131
|
**read-only here** (this surface never disburses); `payoutType` is a different axis from
|
|
131
132
|
`record_employee_payout`'s `payoutFor`. **Note the two views of one row:** a payout you
|
|
@@ -2137,6 +2137,58 @@ POST /api/v1/leases/bulk-update `{ "leases": [{ "resourceId": "uuid", "reference
|
|
|
2137
2137
|
POST /api/v1/generate-reports/leases-summary (the IFRS 16 note; `groupBy` `TYPE`, `STATUS` or `ACCOUNT`), POST /api/v1/generate-reports/leases-recon-summary (register vs GL per lease account; `accountResourceIds` optional); POST /api/v1/data-exports/leases-register, POST /api/v1/data-exports/leases-reconciliation-summary (`accountResourceId` required)
|
|
2138
2138
|
- Reports need `REPORTS:ADMIN`. A liability difference in the reconciliation almost always means a rent bill coded elsewhere, posted in another month, or not booked.
|
|
2139
2139
|
|
|
2140
|
+
## Payrun settings and employee pay (pay types, payrun posting rules, pay profiles, employee pay details)
|
|
2141
|
+
|
|
2142
|
+
Payruns is a separate module: a plan without it answers 402 `plan_upgrade_required`, and the key's user must be an admin of Employees (403 `NOT_HAVE_ENOUGH_PERMISSION`). Routes sit outside the public spec until launch. Dates sent are `YYYY-MM-DD`; dates read back are epoch milliseconds. Every PUT is partial: an omitted key keeps its value, `clear...: true` empties an optional field, and a list sent (`payTypeLines`, `payTypeInputs`) replaces the whole list. The id in the URL is the one used. Every search takes `filter` only: `query` answers 400 `query_not_supported`. `offset` is a 0-indexed page and `sort` is required with it. An empty search reply has no `data` key. A creating POST answers 201 with the full record. Not the claim posting rules (`/posting-rules`).
|
|
2143
|
+
|
|
2144
|
+
### Pay Types
|
|
2145
|
+
POST /api/v1/pay-types, POST /api/v1/pay-types/search, GET|PUT|DELETE /api/v1/pay-types/:resourceId
|
|
2146
|
+
- `category` (required) is one of `EARNING`, `OVERTIME`, `ALLOWANCE`, `ADDITIONAL_PAYMENT` (debit account, add to gross pay), `DEDUCTION`, `EMPLOYEE_CONTRIBUTION`, `EMPLOYEE_TAX` (credit account, reduce net pay), `EMPLOYER_CONTRIBUTION`, `EMPLOYER_TAX` (both accounts). A wrong side is 422 `PAY_TYPE_ACCOUNT_NOT_APPLICABLE`. `name` and `code` are unique (case-insensitive).
|
|
2147
|
+
- A category change must set the new account and clear the old one in the same PUT, and is refused once a draft or finalized payslip line uses the pay type (`categoryLocked`, `PAY_TYPE_IN_USE`). `status` is `ACTIVE` or `INACTIVE`.
|
|
2148
|
+
- DELETE: refused with `PAY_TYPE_IN_USE` while a pay profile, pay detail or payslip uses it (set it `INACTIVE`). It answers `{ "data": { "deleted": true } }`, and `false` when the record is already gone.
|
|
2149
|
+
|
|
2150
|
+
### Payrun Posting Rules
|
|
2151
|
+
POST /api/v1/payrun-posting-rules, POST /api/v1/payrun-posting-rules/search, GET|PUT|DELETE /api/v1/payrun-posting-rules/:resourceId
|
|
2152
|
+
- Required: `name`, `netPayAccountResourceId` (an active, non-controlled account that is not a claim profile's balance account). `innerAxis` is `BY_PAY_TYPE` (default), `BY_CATEGORY` or `BY_ACCOUNT`; `journalDatePolicy` is `PAYMENT_DATE` (default), `PERIOD_END` or `CUSTOM`; `outerAxis` is `ONE_BATCH`. A blank template goes back to its default (`PAYRUN-{period}-{payrunName}` for the reference). `journalReferenceTemplate` holds at most 255 characters (`PAYRUN_POSTING_RULE_REFERENCE_TOO_LONG`). Templates take `{payrunName}`, `{payrunReference}` (the payrun's reference, else its name), `{period}`, `{periodStart}`, `{periodEnd}`, `{paymentDate}`; line descriptions add `{payType}`, `{category}`, `{account}`. Any other token is refused (`PAYRUN_POSTING_RULE_TEMPLATE_UNKNOWN_TOKEN`). A written line description is kept as typed.
|
|
2153
|
+
- One default per organization: the first rule is it, `isDefault: true` moves it. The default cannot be unset or deleted (`PAYRUN_POSTING_RULE_DEFAULT`); a rule a profile or payrun uses cannot be deleted (`PAYRUN_POSTING_RULE_IN_USE`).
|
|
2154
|
+
|
|
2155
|
+
### Pay Profiles
|
|
2156
|
+
POST /api/v1/pay-profiles, POST /api/v1/pay-profiles/search, GET|PUT|DELETE /api/v1/pay-profiles/:resourceId
|
|
2157
|
+
- Required: `name`, `payFrequency` (`WEEKLY`, `FORTNIGHTLY`, `SEMI_MONTHLY`, `MONTHLY`), `currencyCode` (base or an active currency). `payTypeLines` is `[{ payTypeId, amount? }]`, each pay type once, ACTIVE ones only; a line with no `amount` is set per employee. `prorationType` is `CALENDAR_DAYS`, `WORKING_DAYS` (needs `workWeek` 5, 5.5 or 6) or `FIXED_DAYS` (needs `workWeek` and `daysPerMonth` 1 to 31, MONTHLY only). No `payrunPostingRuleResourceId` means the default rule; `clearPayrunPostingRuleResourceId` goes back to it.
|
|
2158
|
+
- `payFrequency` and `currencyCode` lock once an employee is on the profile (`PAY_PROFILE_FREQUENCY_CURRENCY_LOCKED`). A profile an employee is or was on cannot be deleted (`PAY_PROFILE_IN_USE`): set it `INACTIVE`.
|
|
2159
|
+
|
|
2160
|
+
### Employee Pay Details
|
|
2161
|
+
POST /api/v1/employee-pay-details, POST /api/v1/employee-pay-details/bulk-create, POST /api/v1/employee-pay-details/search, PUT /api/v1/employee-pay-details/:resourceId (no GET or DELETE)
|
|
2162
|
+
- Create: `employeeResourceId` (active), `payProfileResourceId` (ACTIVE), `effectiveFromDate` (after the start of the employee's latest pay detail, else 422 `EMPLOYEE_PAY_DETAIL_OVERLAP`), optional `payTypeInputs` `[{ payTypeId, amount }]` and `notes`. A raise is a NEW pay detail from the new date: the previous one ends the day before. A profile line left without an amount needs an input, or populating a payrun skips the employee.
|
|
2163
|
+
- PUT corrects in place: `payTypeInputs` replaces every figure, `effectiveToDate` ends the pay, `clearEffectiveToDate`, `clearNotes`; the dates change on the employee's latest pay detail only (`EMPLOYEE_PAY_DETAIL_NOT_LATEST`).
|
|
2164
|
+
- Bulk create `{ "employeePayDetails": [...] }` (max 500) answers 200 with one `{ employeeResourceId, resourceId }` or `{ employeeResourceId, errorCode, errorMessage }` per row, in order. A refused row does not stop the others: read every row.
|
|
2165
|
+
- Search body takes `filter` (`employeeResourceId`, `payProfileResourceId`, `resourceId`), `sort`, paging and `inForceOn` (`YYYY-MM-DD`: only the pay details in force that day, at most one per employee). Each record carries `lines` and `totals` for one pay period.
|
|
2166
|
+
|
|
2167
|
+
### Payruns
|
|
2168
|
+
POST /api/v1/payruns, POST /api/v1/payruns/search, GET|PUT|DELETE /api/v1/payruns/:resourceId, POST /api/v1/payruns/bulk/delete, POST /api/v1/payruns/:resourceId/employees, POST /api/v1/payruns/:resourceId/employees/remove, PUT /api/v1/payruns/:resourceId/lines, POST /api/v1/payruns/:resourceId/populate, POST /api/v1/payruns/:resourceId/populate/preview, POST /api/v1/payruns/:resourceId/validate, POST /api/v1/payruns/:resourceId/preview-journal, POST /api/v1/payruns/:resourceId/finalize, POST /api/v1/payruns/bulk/finalize, POST /api/v1/payruns/:resourceId/unpost, POST /api/v1/payruns/:resourceId/void, POST /api/v1/payruns/:resourceId/payouts/preview, POST /api/v1/payruns/:resourceId/payouts, POST /api/v1/payruns/payouts/:journalResourceId/void
|
|
2169
|
+
- A payrun is one run for a period, one `payFrequency` and one `currencyCode`, with a payslip per employee. `payrunType` is `REGULAR` (default) or `OFF_CYCLE`; type, frequency and currency cannot change after create. `status` is `DRAFT`, `FINALIZED` or `VOID`; `payoutStatus` is `UNPAID`, `PARTIALLY_PAID` or `PAID`. Several drafts per period are fine, but only one finalized `REGULAR` run per frequency, currency and period (`PAYRUN_REGULAR_PERIOD_EXISTS`).
|
|
2170
|
+
- Create (201, the full run): required `name`, `payFrequency`, `currencyCode`, `periodStartDate`, `periodEndDate`, `paymentDate`. `populate: true` fills it at once. `idempotencyKey` (max 255) makes a re-send return the run already created; the same key with a different request is `PAYRUN_IDEMPOTENCY_KEY_IN_USE`. `reference` is unique ignoring case (`PAYRUN_REFERENCE_IN_USE`); a duplicate is a 422, as on the sales families. `GET /references/next?type=PAYRUN` gives the next number.
|
|
2171
|
+
- PUT is partial and draft only: a finalized run takes one change, its payslip template (`templateResourceId` or `clearTemplateResourceId` sent alone), and Generate Payslips then makes its PDFs with it; any other change to a finalized run, and any change to a void one, is `PAYRUN_NOT_DRAFT`. Clear flags: `clearReference`, `clearInternalNotes`, `clearPayrunPostingRuleResourceId`, `clearTemplateResourceId`. A new period leaves the payslips as they are; refresh them to pro-rate to it.
|
|
2172
|
+
- DELETE answers `{ "data": { "deleted": true } }` for a new draft. A run finalized and then unposted is refused with `PAYRUN_ALREADY_POSTED`: void it instead (`POST /void`). `POST /bulk/delete` `{ resourceIds }` answers 202 with a `jobId` (job type `BULK_DELETE_PAYRUNS`); a run listed twice is refused before any job starts (`PAYRUN_DUPLICATE`), and each failure is a JSON string in the job's `errorDetails`.
|
|
2173
|
+
- Search takes `filter` only (`query` is 400 `query_not_supported`) and `payslip: { employeeResourceId, payoutStatus? }` beside it: only runs with a payslip of that employee. An empty answer has no `data` key. `filter` takes `name`, `reference`, `payrunType`, `status`, `payoutStatus`, `payFrequency`, `currencyCode`, `paymentDate`, `periodStartDate`, `periodEndDate` (day expressions, `YYYY-MM-DD`: `eq`, `gt`, `gte`, `lt`, `lte`, `between`), `employeeCount`, `totalNetPayAmount` and `payrunPostingRuleResourceId`. Sort fields: `resourceId`, `name`, `reference`, `payrunType`, `payFrequency`, `currencyCode`, `periodStartDate`, `periodEndDate`, `paymentDate`, `status`, `payoutStatus`, `payrunPostingRuleResourceId`, `employeeCount`, `totalNetPayAmount`, `createdAt`, `updatedAt`.
|
|
2174
|
+
- Populate (no body) adds every employee not yet in the run whose pay overlaps the period on an active profile with the run's frequency and currency; it never changes an existing payslip, leaves removed employees out (`PAYRUN_EMPLOYEE_REMOVED`) and answers `{ payrun, added, skipped }`, each skipped row with an `errorCode` (an empty list is left out). `populate/preview` answers the same shape and saves nothing; its `added` also lists every active employee with no pay in the period (no `payProfileResourceId`).
|
|
2175
|
+
- Add employees `{ employeeResourceIds }` gives an employee with no pay in the period an empty payslip (every line is added by hand); the first employee who cannot be added refuses the call. Remove moves them out until they are added again.
|
|
2176
|
+
- Validate and preview-journal `{ journalValueDate? }` answer 200 with `{ valid, errors? }` (an empty `errors` is left out): a problem is a 200 reply, not a refusal. Each error has `code` (`PAYSLIP_NO_LINES`, `PAYRUN_NET_PAY_NEGATIVE`, `PAYRUN_PERIOD_LOCKED`, `PAYRUN_REGULAR_PERIOD_EXISTS`, `PAYRUN_NO_PAYSLIPS`, `PAYRUN_JOURNAL_EMPTY` and more), `message` and what it is about. The preview adds the journal: `lines` (debits first, net pay one credit last), `totalDebitAmount`, `totalCreditAmount`. An error may carry `payStartDate` (epoch ms, on `PAYRUN_EMPLOYEE_PAY_STARTS_LATER`) and `contextualAttributes` (`[{ columnName, columnValue }]`, e.g. on `PAYRUN_REGULAR_PERIOD_EXISTS` and `PAYRUN_PERIOD_LOCKED`). Finalize, bulk finalize, validate and preview-journal take an optional `payrunPostingRuleResourceId`; finalizing saves it as the payrun's rule.
|
|
2177
|
+
- Finalize `{ journalValueDate? }` posts one balanced journal, answers the run (`FINALIZED`, one entry in `linkedJournals`) and makes the PDFs afterwards; the first Validate problem refuses it with its code. A finalized run finalizes again unchanged. `POST /bulk/finalize` `{ payruns: [{ payrunResourceId, journalValueDate? }] }` answers 202 (job type `BULK_FINALIZE_PAYRUNS`); a run listed twice is `PAYRUN_DUPLICATE` before any job, a run that cannot go fails on its own in `errorDetails` (job `PARTIAL_SUCCESS`).
|
|
2178
|
+
- Unpost (no body) voids the journal and the run goes back to `DRAFT`; a run already unposted comes back unchanged. Void `{ voidReason }` (required, max 500) cancels it for good and frees the period for a new `REGULAR` run. Both are refused while a payout is live (`PAYRUN_PAYOUT_LINKED`: void the payouts first) or still going through the payment gateway (`PAYRUN_PAYOUT_DISBURSING`: wait for it or cancel it) and into a locked period (`PAYRUN_PERIOD_LOCKED`). A draft never posted cannot be voided (`PAYRUN_VOID_NEVER_POSTED`: delete it); a run unposted earlier cannot be deleted (`PAYRUN_ALREADY_POSTED`: void it).
|
|
2179
|
+
- Payouts (`FINALIZED` runs): body `{ payoutMethod, paymentAccountResourceId (preview: optional, a preview without it works out everything else and leaves the account's checks out; recording needs it, `PAYRUN_PAYOUT_ACCOUNT_REQUIRED`; a wrong account is `PAYRUN_PAYOUT_ACCOUNT_NOT_FOUND` on both), valueDate?, reference?, internalNotes?, payslips?: [{ payslipResourceId, amount?, reference? }], hash? }`. `payoutMethod` `RECORD` books money paid outside Jaz (a journal per payslip, debit net pay account, credit the bank or cash account in the run currency); `DISBURSE` pays through a payment gateway and is NOT used by the clio tools or commands, which always send `RECORD`. No `payslips`: every payslip still owed, in full; part amounts are allowed. `payouts/preview` takes the same body and answers 200 with `{ valid, errors?, payouts[] (netPayAmount, paidAmount, owedAmount, payoutAmount, lines), totalPayoutAmount }`. `POST /payouts` answers 202 (job type `PAYRUN_CREATE_PAYOUTS` for `RECORD`). Errors: `PAYRUN_PAYOUT_EXCEEDS_OWED`, `PAYRUN_PAYOUT_NOTHING_OWED`, `PAYRUN_PAYOUT_ACCOUNT_INVALID_TYPE`, `PAYRUN_PAYOUT_ACCOUNT_CURRENCY_MISMATCH`, `PAYRUN_PAYOUT_NOT_FINALIZED`. The payslip `payoutStatus` goes `UNPAID`, `PARTIALLY_PAID`, `PAID`.
|
|
2180
|
+
- `hash` only dedups while its job runs (the same hash and request returns that job; the same hash with another request is `PAYRUN_PAYOUT_HASH_IN_USE`). Staging, 2026-11-17: the same hash and request sent after the job finished started a second job and recorded a part payout twice. Read the run's `payouts` before sending again.
|
|
2181
|
+
- The run's `payouts` list each payout with `journalResourceId` and `voidable`. `POST /payouts/:journalResourceId/void` `{ voidReason }` voids a recorded one (the payslip owes it again) and answers the run; deleting its cash entry is refused with `PAYRUN_PAYOUT_LINKED_TO_PAYRUN` (void it from the payrun: `void_payrun_payout`); a gateway payout is refused (`PAYRUN_PAYOUT_DISBURSED`). Payrun payouts also appear in `POST /employees/payouts/search` with `payrunResourceId` and `type` `PAYRUN_PAYOUT`; `payoutType` (`DIRECT_ENTRY` for a recorded payout, `DISBURSEMENT` for a payment gateway payout, `PAYRUN_PAYOUT` for a payrun's payouts, recorded or through the gateway, which the other two leave out; any other value is a 422) and `payoutStatus` are bare arrays in that filter, not `{ eq }` or `{ in }`. `POST /employees/balances/search` rows carry `unpaidPay` (net pay finalized runs still owe, per currency).
|
|
2182
|
+
- Save lines `{ payslips: [{ payslipResourceId, lines: [{ resourceId?, payTypeId, amount, description? }], notes?, clearNotes? }] }`: a payslip's `lines` replaces its whole list; amounts 0 or more, 2 decimals. Answers `data` as an ARRAY of the payslips named. Lines added by hand have `origin` `MANUAL`.
|
|
2183
|
+
|
|
2184
|
+
### Payslips
|
|
2185
|
+
POST /api/v1/payslips/search, GET /api/v1/payslips/:resourceId, POST /api/v1/payslips/:resourceId/refresh, POST /api/v1/payruns/:resourceId/payslips/refresh, POST /api/v1/payruns/:resourceId/payslips/generate
|
|
2186
|
+
- Search takes `filter` only; sort `payrun.periodEndDate` and the other `payrun.` dates are valid. An employee's payslips, newest first: `employeeResourceId`, `payrun.status` `FINALIZED`, sort `payrun.periodEndDate` DESC.
|
|
2187
|
+
- A pro-rated payslip carries `proration: { periods: [{ startDate, endDate, daysCounted, daysInPeriod }], changes: [{ date, type }] }` (`type` is `JOINED`, `PAY_CHANGES` or `PAY_ENDS`); each line's proration parts carry `periodDays`.
|
|
2188
|
+
- Refresh (draft only) rebuilds the pay-setup lines from the employee's current pay, pro-rated, replaces hand edits on them and keeps hand-added lines. One payslip answers `{ data: { payslip } }`; an employee with no pay in the period is refused with `PAYRUN_EMPLOYEE_NO_PAY_PROFILE` and the payslip is unchanged. `POST /payruns/:id/payslips/refresh` takes `{ payslipResourceIds? }` (none or empty: every payslip) and answers `{ payrun, refreshed, failed }`; a payslip that cannot be refreshed is in `failed` with an `errorCode`. This route answers on staging but is not in the public spec yet.
|
|
2189
|
+
- Generate (finalized runs only, 202, job type `PAYRUN_GENERATE_PAYSLIPS`) makes the PDFs again for the payslips named or all; the link is in the payslip's `generatedDocuments`. A draft is refused (`PAYRUN_NOT_FINALIZED`).
|
|
2190
|
+
- Not in the REST API: payrun import, emailing payslips, a ZIP of payslips, version history, a custom exchange rate at finalize.
|
|
2191
|
+
|
|
2140
2192
|
## Loans (borrowings; term and on demand)
|
|
2141
2193
|
|
|
2142
2194
|
The register never posts cash: the user records the drawdown receipt (non-current loan account) and every installment IN FULL (current loan account). `annualInterestRate` is percent per **year** (6.5 = 6.5% a year). Hire purchase is a lease, not a loan. Every loan route binds strictly (unknown key = 400). Credentials: the routes act as a user, so a `jk-` key (`x-jk-api-key`), a personal access token or an OAuth sign-in works; a management credential (the 48-character organization `API_KEY` header, the management key, the partner API key) is refused with `USER_NOT_AUTHORITY_PERMISSION`, reads and previews included. Only the loan reports and data exports accept management callers (reports need `REPORTS:ADMIN`; a locked plan answers them 422 `UNAUTHORIZED`, the other routes 403 `NOT_HAVE_ENOUGH_PERMISSION`). `calculate-*` and `preview-schedule` save nothing but need a read-write token: a token limited to read-only scope refuses them, since their paths end neither in `/search` nor `/preview`. Loan search and loan-type search give 400 `query_not_supported` for `query`.
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
> **The endpoints clio wraps (the REST surface is larger).** This file catalogues roughly 200
|
|
4
4
|
> paths, organized by resource, including undocumented endpoints, magic AI features, admin
|
|
5
5
|
> APIs, and advanced search/filter syntax. The committed OpenAPI spec (`spec/openapi.yaml`)
|
|
6
|
-
> carries
|
|
6
|
+
> carries 618 spec paths and 775 spec operations and is the authoritative list; check it before concluding
|
|
7
7
|
> an endpoint does not exist. For request/response examples of core endpoints, see
|
|
8
8
|
> endpoints.md.
|
|
9
9
|
>
|
|
@@ -555,6 +555,36 @@ Body for all three: `{ items: [{btResourceId: "<uuid>", btType: "SALE|PURCHASE|S
|
|
|
555
555
|
| POST | `/terminate/leases/:resourceId` | Take off the books at a month-end, posting the gain or loss |
|
|
556
556
|
| POST | `/undo-termination/leases/:resourceId` | Undo a termination; no body |
|
|
557
557
|
| POST | `/lease-types/search` | Lease types; `query` answers 400 |
|
|
558
|
+
### Payruns, payslips, payrun settings and employee pay
|
|
559
|
+
Needs the Payruns module (402 without it) and an Employees admin user. Searches take `filter` only (`query` answers 400).
|
|
560
|
+
|
|
561
|
+
| Method | Path | Description |
|
|
562
|
+
|--------|------|-------------|
|
|
563
|
+
| POST | `/pay-types`, `/pay-types/search` | Create, search pay types (what a payslip pays or deducts) |
|
|
564
|
+
| GET, PUT, DELETE | `/pay-types/:resourceId` | Get, partial update, delete (`PAY_TYPE_IN_USE`: set INACTIVE) |
|
|
565
|
+
| POST | `/payrun-posting-rules`, `/payrun-posting-rules/search` | Create, search payrun posting rules (not claim posting rules) |
|
|
566
|
+
| GET, PUT, DELETE | `/payrun-posting-rules/:resourceId` | Get, partial update, delete; the default cannot be unset or deleted |
|
|
567
|
+
| POST | `/pay-profiles`, `/pay-profiles/search` | Create, search pay profiles (frequency, currency, lines) |
|
|
568
|
+
| GET, PUT, DELETE | `/pay-profiles/:resourceId` | Get, partial update (`payTypeLines` replaces all), delete |
|
|
569
|
+
| POST | `/employee-pay-details`, `/employee-pay-details/search` | Create (a raise is a new one), search (`inForceOn`) |
|
|
570
|
+
| POST | `/employee-pay-details/bulk-create` | Up to 500; answers 200 with a result per row |
|
|
571
|
+
| PUT | `/employee-pay-details/:resourceId` | Correct in place or end the pay; no GET or DELETE |
|
|
572
|
+
| POST | `/payruns`, `/payruns/search` | Create a draft payrun (`populate`, `idempotencyKey`), search (`payslip` beside `filter`) |
|
|
573
|
+
| GET, PUT, DELETE | `/payruns/:resourceId` | Get with payslips, partial update (draft), delete a new draft |
|
|
574
|
+
| POST | `/payruns/bulk/delete` | Delete several new drafts; a 202 job |
|
|
575
|
+
| POST | `/payruns/:resourceId/employees`, `/payruns/:resourceId/employees/remove` | Add (empty payslip if no pay), remove employees |
|
|
576
|
+
| PUT | `/payruns/:resourceId/lines` | Replace payslips' lines (draft) |
|
|
577
|
+
| POST | `/payruns/:resourceId/populate`, `/payruns/:resourceId/populate/preview` | Fill from pay profiles; preview saves nothing |
|
|
578
|
+
| POST | `/payruns/:resourceId/validate`, `/payruns/:resourceId/preview-journal` | Check a draft and preview its journal; a 200 reply with `valid` and `errors` |
|
|
579
|
+
| POST | `/payruns/:resourceId/finalize`, `/payruns/bulk/finalize` | Post the journal (idempotent); several as a 202 job |
|
|
580
|
+
| POST | `/payruns/:resourceId/unpost`, `/payruns/:resourceId/void` | Back to draft (no body); cancel for good (`voidReason`) |
|
|
581
|
+
| POST | `/payruns/:resourceId/payouts/preview`, `/payruns/:resourceId/payouts` | Preview and record payouts (`payoutMethod` `RECORD` only in clio); the second is a 202 job |
|
|
582
|
+
| POST | `/payruns/payouts/:journalResourceId/void` | Void a recorded payout (`voidReason`) |
|
|
583
|
+
| POST | `/payslips/search`; GET `/payslips/:resourceId` | Search, get (PDF link in `generatedDocuments`) |
|
|
584
|
+
| POST | `/payslips/:resourceId/refresh`, `/payruns/:resourceId/payslips/refresh` | Rebuild one or several draft payslips from current pay (the second is not in the public spec yet) |
|
|
585
|
+
| POST | `/payruns/:resourceId/payslips/generate` | Make PDFs again for a finalized run; a 202 job |
|
|
586
|
+
|
|
587
|
+
|
|
558
588
|
### Loans
|
|
559
589
|
| Method | Path | Description |
|
|
560
590
|
|--------|------|-------------|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: jaz-cli
|
|
3
|
-
version: 9.
|
|
3
|
+
version: 9.7.0
|
|
4
4
|
description: >-
|
|
5
5
|
Use this skill when running Clio CLI commands, building shell scripts with
|
|
6
6
|
Clio, debugging auth issues, understanding --json output, paginating results,
|
|
@@ -8,7 +8,7 @@ description: >-
|
|
|
8
8
|
precedence, output formats, entity resolution, and common workflow patterns.
|
|
9
9
|
Also use when the user asks how to use clio, what commands are available, or
|
|
10
10
|
how to automate accounting tasks from the command line. Covers all
|
|
11
|
-
|
|
11
|
+
80 command groups and 521 tools, including employee-expense claims.
|
|
12
12
|
license: MIT
|
|
13
13
|
compatibility: Requires Node.js >= 18.0.0. Install via npm install -g jaz-clio.
|
|
14
14
|
---
|
|
@@ -17,7 +17,7 @@ compatibility: Requires Node.js >= 18.0.0. Install via npm install -g jaz-clio.
|
|
|
17
17
|
|
|
18
18
|
> **Audience note:** for power users and CI/automation. Load this skill only when you're scripting from a terminal, building shell pipelines, or debugging from `clio --json` output. For day-to-day accounting inside Claude Desktop / Cowork, the MCP tools cover the common flows without dropping to the CLI.
|
|
19
19
|
|
|
20
|
-
You are working with **Clio** (`jaz-clio`), the CLI for the Jaz accounting platform.
|
|
20
|
+
You are working with **Clio** (`jaz-clio`), the CLI for the Jaz accounting platform. 80 command groups, 13 calculators, 12 job playbooks (jaz-jobs skill), 521 tools. Also fully compatible with Juan Accounting (same API, same endpoints).
|
|
21
21
|
|
|
22
22
|
## When to Use This Skill
|
|
23
23
|
|
|
@@ -272,6 +272,9 @@ Sending `lineItems[]` to the FLAT endpoint silently ignores them and creates a $
|
|
|
272
272
|
|
|
273
273
|
**Fixed Assets & Inventory**: `fixed-assets` (alias: `fa`), `inventory` (alias: `inv`)
|
|
274
274
|
|
|
275
|
+
**Payruns (setup)**: `pay-types`, `payrun-posting-rules` (not `posting-rules`, which is claims), `pay-profiles`, `employee-pay-details` (a raise is a new pay detail, not an update)
|
|
276
|
+
**Payruns**: `payruns` (create `--populate`, search `--payslip <json>`, add/remove employees, `save-lines`, `populate`, `validate`, `preview-journal`, `finalize`, `bulk-finalize`, `unpost`, `void`, `preview-payouts`, `record-payouts` (books only), `void-payout`), `payslips` (search, get, `refresh`, `refresh-payrun`, `generate`)
|
|
277
|
+
|
|
275
278
|
**Subscriptions & Schedulers**: `subscriptions` (alias: `subs`), `schedulers`
|
|
276
279
|
|
|
277
280
|
**Reports & Exports**: `reports` (16 report types), `exports`
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Clio Command Catalog
|
|
2
2
|
|
|
3
|
-
Complete reference for all
|
|
3
|
+
Complete reference for all 80 command groups. Organized by domain.
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -373,6 +373,78 @@ The register never posts rent: rent bills and payments are coded to the current
|
|
|
373
373
|
| `preview-rent` | `--input <file>`: checks rent ranges, saves nothing |
|
|
374
374
|
| `flat-rate` | `--rate`, `--financed`, `--term`, `--payment-timing`: hire purchase flat rate to monthly discount rate |
|
|
375
375
|
| `bulk-update` | `--input <file>`: partial rows, each needs `resourceId` and `reference`. Async → jobId |
|
|
376
|
+
### `clio pay-types`: pay types (what a payslip pays or deducts)
|
|
377
|
+
Updates are partial; a `--clear-...` flag empties a field. No natural-language search.
|
|
378
|
+
|
|
379
|
+
| Subcommand | Key flags |
|
|
380
|
+
|------------|-----------|
|
|
381
|
+
| `get <id>` | `--json` |
|
|
382
|
+
| `search` | `--name`, `--code`, `--category`, `--status`, `--debit-account-resource-id`, `--credit-account-resource-id`, `--limit`, `--offset`, `--sort`, `--order` |
|
|
383
|
+
| `create` | `--name`, `--category` (EARNING, OVERTIME, ALLOWANCE, ADDITIONAL_PAYMENT, DEDUCTION, EMPLOYEE_CONTRIBUTION, EMPLOYEE_TAX, EMPLOYER_CONTRIBUTION, EMPLOYER_TAX), `--debit-account` or `--credit-account` by category, `--code`, `--description`, `--status`, `--input` |
|
|
384
|
+
| `update <id>` | the same flags, `--clear-code`, `--clear-description`, `--clear-debit-account`, `--clear-credit-account`. The category locks once a payslip uses the pay type |
|
|
385
|
+
| `delete <id>` | Refused while anything uses it: set `--status INACTIVE` with `update` |
|
|
386
|
+
|
|
387
|
+
### `clio payrun-posting-rules`: how a payrun books its journal (not `clio posting-rules`, which is claims)
|
|
388
|
+
| Subcommand | Key flags |
|
|
389
|
+
|------------|-----------|
|
|
390
|
+
| `get <id>` | `--json` |
|
|
391
|
+
| `search` | `--name`, `--is-default`, `--inner-axis`, `--journal-date-policy`, `--net-pay-account-resource-id`, `--limit`, `--offset`, `--sort`, `--order` |
|
|
392
|
+
| `create` | `--name`, `--net-pay-account`, `--inner-axis`, `--journal-date-policy`, `--reference-template`, `--line-template`, `--default`, `--input` |
|
|
393
|
+
| `update <id>` | the same flags; `--default` moves the default, which cannot be unset or deleted |
|
|
394
|
+
| `delete <id>` | Refused for the default rule and for a rule a profile or payrun uses |
|
|
395
|
+
|
|
396
|
+
### `clio pay-profiles`: shared pay templates
|
|
397
|
+
| Subcommand | Key flags |
|
|
398
|
+
|------------|-----------|
|
|
399
|
+
| `get <id>` | `--json` |
|
|
400
|
+
| `search` | `--name`, `--pay-frequency`, `--currency-code`, `--status`, `--payrun-posting-rule-resource-id`, `--limit`, `--offset`, `--sort`, `--order` |
|
|
401
|
+
| `create` | `--name`, `--frequency`, `--currency`, `--line <payTypeId[=amount]>` (repeat; no amount means set per employee), `--posting-rule`, `--proration`, `--work-week`, `--days-per-month`, `--description`, `--status`, `--input` |
|
|
402
|
+
| `update <id>` | the same flags, `--clear-description`, `--clear-posting-rule`. `--line` replaces every line; frequency and currency lock once employees are on it |
|
|
403
|
+
| `delete <id>` | Refused once any employee is or was on it: set `--status INACTIVE` with `update` |
|
|
404
|
+
|
|
405
|
+
### `clio employee-pay-details`: an employee's pay on a pay profile from a date
|
|
406
|
+
A raise is a new pay detail from the new date (the previous one ends the day before), not an update. No `get` or `delete`: read through `search`.
|
|
407
|
+
|
|
408
|
+
| Subcommand | Key flags |
|
|
409
|
+
|------------|-----------|
|
|
410
|
+
| `search` | `--employee`, `--pay-profile`, `--in-force-on <date>` (one per employee), `--limit`, `--offset`, `--sort`, `--order` |
|
|
411
|
+
| `create` | `--employee`, `--pay-profile`, `--from <date>`, `--figure <payTypeId=amount>` (repeat), `--notes`, `--input` |
|
|
412
|
+
| `bulk-create` | `--input <file>` `{ "employeePayDetails": [...] }` (max 500). Rows save separately; refused rows are listed and the exit code is 1 |
|
|
413
|
+
| `update <id>` | `--from`, `--to` (last day, ends the pay), `--figure` (replaces every figure), `--notes`, `--clear-to`, `--clear-notes`. Dates: the latest pay detail only |
|
|
414
|
+
|
|
415
|
+
### `clio payruns`: employee pay runs (one run per period, frequency and currency)
|
|
416
|
+
Drafts only change: a finalized run is refused (`PAYRUN_NOT_DRAFT`). Type, frequency and currency cannot change after create. Updates are partial; a `--clear-...` flag empties a field. No natural-language search. Period, `employeeCount` and `totalNetPayAmount` filters go through `--filter <json>`.
|
|
417
|
+
|
|
418
|
+
| Subcommand | Key flags |
|
|
419
|
+
|------------|-----------|
|
|
420
|
+
| `get <id>` | `--json` |
|
|
421
|
+
| `search` | `--name`, `--ref`, `--status`, `--payrun-type`, `--payout-status`, `--pay-frequency`, `--currency-code`, `--payment-from`, `--payment-to`, `--payslip <json>` (`{"employeeResourceId":"...","payoutStatus":["UNPAID"]}`, beside the filters), `--filter <json>`, `--limit`, `--offset`, `--sort`, `--order` |
|
|
422
|
+
| `create` | `--name`, `--type` (REGULAR, OFF_CYCLE), `--frequency`, `--currency`, `--from`, `--to`, `--payment-date`, `--populate`, `--ref`, `--posting-rule`, `--template`, `--notes`, `--custom-fields`, `--idempotency-key` (default generated), `--input` |
|
|
423
|
+
| `update <id>` | `--name`, `--from`, `--to`, `--payment-date`, `--ref`, `--posting-rule`, `--template`, `--notes`, `--clear-ref`, `--clear-notes`, `--clear-posting-rule`, `--clear-template`. A new period leaves payslips as they are: run `payslips refresh-payrun` |
|
|
424
|
+
| `delete <id>` | New drafts only; a run finalized then unposted must be voided (`void`) |
|
|
425
|
+
| `bulk-delete` | `--ids <list>`; a 202 job, poll with `clio background-jobs get <jobId>` |
|
|
426
|
+
| `add-employees <id>`, `remove-employees <id>` | `--employees <list>`. An employee with no pay gets an empty payslip: give it lines with `save-lines` |
|
|
427
|
+
| `save-lines <id>` | `--payslip <id>` with repeated `--line <payTypeId=amount>` (they REPLACE the payslip's lines), `--notes`, `--clear-notes`; several payslips or kept lines: `--input` `{ "payslips": [...] }` |
|
|
428
|
+
| `populate <id>` | Fills from pay profiles; existing payslips are not changed. Lists who was added and skipped |
|
|
429
|
+
| `preview-populate <id>` | The same, saving nothing |
|
|
430
|
+
| `validate <id>`, `preview-journal <id>` | `--journal-date`. Check a draft as finalize would and show the journal; save nothing. Problems print as a list |
|
|
431
|
+
| `finalize <id>` | `--journal-date`. Posts the journal; a finalized run is unchanged. Validate first |
|
|
432
|
+
| `bulk-finalize` | `--ids <list>` (`--journal-date`, or `--input` with a date per run); a 202 job, poll with `clio background-jobs get <jobId>` |
|
|
433
|
+
| `unpost <id>` | Back to draft. Refused while a payout is live: void it first |
|
|
434
|
+
| `void <id>` | `--reason <text>` (required). Cancels for good; a draft never posted is refused: delete it |
|
|
435
|
+
| `preview-payouts <id>` | `--account <id>` (bank or cash, run currency), `--value-date`, `--ref`, `--notes`, repeated `--payslip <id[=amount]>` (none: every payslip owed, in full). Saves nothing and moves no money |
|
|
436
|
+
| `record-payouts <id>` | The same flags plus `--hash` (retry key, generated if omitted). Records money paid OUTSIDE Jaz and moves none; always a record, never a gateway payment. A 202 job. Sending again after it finished records again |
|
|
437
|
+
| `void-payout <journalId>` | `--reason <text>` (required). The journal id is in the run's `payouts` (`payruns get`) |
|
|
438
|
+
|
|
439
|
+
### `clio payslips`: payslips of payruns
|
|
440
|
+
| Subcommand | Key flags |
|
|
441
|
+
|------------|-----------|
|
|
442
|
+
| `get <id>` | Lines, amounts and the PDF link (`generatedDocuments`) |
|
|
443
|
+
| `search` | `--payrun`, `--employee`, `--employee-name`, `--pay-profile`, `--payout-status`, `--payrun-status`, `--limit`, `--offset`, `--sort`, `--order` |
|
|
444
|
+
| `refresh <id>` | Rebuild one draft payslip from current pay; hand-added lines stay |
|
|
445
|
+
| `refresh-payrun <payrunId>` | `--payslips <list>` (default all). Payslips that cannot be refreshed are listed and the exit code is 1 |
|
|
446
|
+
| `generate <payrunId>` | `--payslips <list>` (default all). Makes the PDFs of a finalized run again; a 202 job |
|
|
447
|
+
|
|
376
448
|
### `clio loans`: Loans (borrowings), term and on demand
|
|
377
449
|
The register never posts cash: record the drawdown and every installment yourself. `--rate` and `annualInterestRate` are percent per YEAR. Events go forward only and only the latest can be undone; `--preview` calculates and saves nothing.
|
|
378
450
|
|
|
@@ -804,7 +876,7 @@ Valid entity types: INVOICE, BILL, CUSTOMER_CREDIT_NOTE, SUPPLIER_CREDIT_NOTE, S
|
|
|
804
876
|
Universal async tracker: any operation returning a jobId (contacts bulk-upsert, items bulk-upsert, bank import, magic processing) can be polled here.
|
|
805
877
|
|
|
806
878
|
### `clio mcp`: MCP stdio server
|
|
807
|
-
Starts an MCP server for Claude Code / AI tool integration. Exposes all
|
|
879
|
+
Starts an MCP server for Claude Code / AI tool integration. Exposes all 521 operations.
|
|
808
880
|
|
|
809
881
|
### `clio init`: Skill installer
|
|
810
882
|
Installs AI agent skills into your project.
|
|
@@ -4,11 +4,11 @@ Jaz accounting guidance for this workspace. Load the installed Jaz skills for de
|
|
|
4
4
|
|
|
5
5
|
## Discovery
|
|
6
6
|
|
|
7
|
-
Jaz exposes **
|
|
7
|
+
Jaz exposes **521 tools across 61 namespaces**. Your tool list shows **3, 61, or 521** entries depending on packaging; **never infer capability from its length.**
|
|
8
8
|
|
|
9
9
|
- **3**: `search_tools(query)` → `describe_tools(names)` → `execute_tool(name, args)`. Empty query returns the namespace map.
|
|
10
|
-
- **
|
|
11
|
-
- **
|
|
10
|
+
- **61**: namespace routers; call one with `{ operation, arguments }`.
|
|
11
|
+
- **521**: call operations directly by name.
|
|
12
12
|
|
|
13
13
|
**Before telling the user Jaz cannot do something, call `describe_capabilities`** (the capability map, on all three).
|
|
14
14
|
|
|
@@ -27,6 +27,8 @@ No API key needed: `describe_capabilities`, `calculate` (marked `Offline.`), and
|
|
|
27
27
|
|
|
28
28
|
A lease, hire purchase, loan, prepaid expense, deferred revenue or fixed asset kept on the books goes in its register (`leases`, `loans`, `loan_events`, `deferrals`, `fixed_assets`, `fixed_asset_schedules`, `register_reports`), which posts the periodic entries itself, never cash. On a 403 (plan or role) do not fall back to journals: say it is not available, name the alternative (a calculated schedule with manual journals), and wait for the user to ask.
|
|
29
29
|
|
|
30
|
+
Payroll (`payrun_settings`, `payruns`, `payrun_processing`): a raise is a new pay detail; payout tools only record a payment made outside Jaz, and a gateway payment is made in the web app.
|
|
31
|
+
|
|
30
32
|
For what-ifs and for ECL, IAS 37 provisions, fixed deposits, accrued expenses, leave accrual and dividends, **run the calculator, then post its steps**:
|
|
31
33
|
|
|
32
34
|
1. `calculate(type, ...)` → schedule + journal lines (offline).
|