jaz-clio 4.32.4 → 4.32.5
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/assets/skills/api/SKILL.md +2 -2
- package/assets/skills/api/references/endpoints.md +41 -4
- package/assets/skills/api/references/errors.md +4 -6
- package/assets/skills/api/references/field-map.md +2 -0
- package/assets/skills/conversion/SKILL.md +1 -1
- package/assets/skills/jobs/SKILL.md +1 -1
- package/assets/skills/transaction-recipes/SKILL.md +1 -1
- package/dist/commands/quick-fix.js +0 -16
- package/dist/core/api/quick-fix.js +1 -8
- package/dist/core/registry/tools.js +27 -15
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: jaz-api
|
|
3
|
-
version: 4.32.
|
|
3
|
+
version: 4.32.5
|
|
4
4
|
description: Complete reference for the Jaz REST API — the accounting platform backend. Use this skill whenever building, modifying, debugging, or extending any code that calls the API — including API clients, integrations, data seeding, test data, or new endpoint work. Contains every field name, response shape, error, gotcha, and edge case discovered through live production testing.
|
|
5
5
|
license: MIT
|
|
6
6
|
compatibility: Requires Jaz API key (x-jk-api-key header). Works with Claude Code, Google Antigravity, OpenAI Codex, GitHub Copilot, Cursor, and any agent that reads markdown.
|
|
@@ -281,7 +281,7 @@ Bills, invoices, and credit notes share identical mandatory field specs. Adding
|
|
|
281
281
|
106. **Contact PUT uses `email` (string), not `emails` (array)** — GET returns `emails: [{email, label}]` (array) but PUT accepts `email: "user@example.com"` (string). Sending the `emails` array in PUT body causes 400 "Invalid request body". The CLI and tool executor handle this automatically via read-modify-write with the correct field.
|
|
282
282
|
|
|
283
283
|
### Quick Fix (Bulk Update)
|
|
284
|
-
107. **20 Quick Fix endpoints for bulk-updating transactions and line items** — `POST /api/v1/quick-fix/{entity}` with `{ resourceIds: [...], attributes: {...} }`. Response: `{ updated: string[], failed: [{ resourceId, error, errorCode }] }`. **HTTP status codes**: 200 = complete success (`failed` always empty). **207 Multi-Status** = partial or total failure with per-item detail (same response shape as 200 — check `failed` array). 422 = total failure with no per-item breakdown (rare
|
|
284
|
+
107. **20 Quick Fix endpoints for bulk-updating transactions and line items** — `POST /api/v1/quick-fix/{entity}` with `{ resourceIds: [...], attributes: {...} }`. Only included fields are changed — omitted fields are left unchanged. Response: `{ updated: string[], failed: [{ resourceId, error, errorCode }] }`. **HTTP status codes**: 200 = complete success (`failed` always empty). **207 Multi-Status** = partial or total failure with per-item detail (same response shape as 200 — check `failed` array). 422 = total failure with no per-item breakdown (rare). On 207, retry only `failed` resourceIds. Entities: **ARAP**: invoices, bills, customer-credit-notes, supplier-credit-notes. **Accounting**: journals, cash-entries. **Schedulers**: sale-schedules, purchase-schedules, subscription-schedules, journal-schedules. **Line-item request patterns**: ARAP + accounting use `{ lineItemResourceIds, attributes }`. Schedulers (sale/purchase/subscription) use Pattern C: `{ schedulerUpdates: [{ schedulerResourceId, lineItemUpdates: [{ arrayIndex, ...attrs }] }] }`. **Journal-schedules use Pattern D**: `lineItemResourceId` (UUID) instead of `arrayIndex`. **Field gotchas**: cash entries use `currencySetting` (singular: `{ rateFunctionalToSource, exchangeToken }`), NOT `currencySettings`. Journal schedules have `startDate` in addition to `endDate`/`interval`. Tags: string array, max 50 items, max 50 chars each.
|
|
285
285
|
|
|
286
286
|
### Transfer Trial Balance
|
|
287
287
|
108. **Transfer Trial Balance** (`POST /api/v1/transfer-trial-balance`) creates opening balance entries. Uses `journalEntries` (NOT `lines` — this is a journal type). Always ACTIVE (no draft mode), reference auto-generated as "Transfer Trial Balance", minimum 1 entry, entries cannot have 0 amounts, skips lock date validation. Each entry: `{ accountResourceId, type: "DEBIT"|"CREDIT", amount }`.
|
|
@@ -1895,13 +1895,50 @@ POST /api/v1/quick-fix/sale-schedules/line-items
|
|
|
1895
1895
|
|
|
1896
1896
|
### Updatable Fields
|
|
1897
1897
|
|
|
1898
|
-
|
|
1898
|
+
Only included fields are changed — omitted fields are left unchanged.
|
|
1899
1899
|
|
|
1900
|
-
**
|
|
1900
|
+
**Transaction-level by entity**:
|
|
1901
|
+
- **Invoices**: valueDate, dueDate, invoiceNotes, templateResourceId, contactResourceId, billFrom, billTo, currencySettings, taxCurrencySettings, tags, customFields, capsuleResourceId
|
|
1902
|
+
- **Bills**: valueDate, dueDate, contactResourceId, currencySettings, taxCurrencySettings, tags, customFields, capsuleResourceId
|
|
1903
|
+
- **Customer CNs**: valueDate, notes, templateResourceId, contactResourceId, creditFrom, creditTo, currencySettings, taxCurrencySettings, tags, customFields, capsuleResourceId
|
|
1904
|
+
- **Supplier CNs**: valueDate, contactResourceId, currencySettings, taxCurrencySettings, tags, customFields, capsuleResourceId
|
|
1905
|
+
- **Journals**: valueDate, contactResourceId, tags, internalNotes, capsuleResourceId
|
|
1906
|
+
- **Cash entries**: organizationAccountResourceId, valueDate, contactResourceId, capsuleResourceId, tags, reference, `currencySetting` (SINGULAR: `{ rateFunctionalToSource, exchangeToken }`), taxCurrencySettings
|
|
1907
|
+
- **Sale/subscription schedules**: endDate, interval, invoiceNotes, templateResourceId, contactResourceId, billFrom, billTo, tags, customFields, capsuleResourceId (+ currencySettings/taxCurrencySettings for sale only)
|
|
1908
|
+
- **Purchase schedules**: endDate, interval, contactResourceId, currencySettings, taxCurrencySettings, tags, customFields, capsuleResourceId
|
|
1909
|
+
- **Journal schedules**: startDate, endDate, interval, contactResourceId, tags, internalNotes, capsuleResourceId
|
|
1901
1910
|
|
|
1902
|
-
**
|
|
1911
|
+
**Line items — ARAP (Pattern B)**: name, quantity, unit, unitPrice, discount, itemResourceId, organizationAccountResourceId, taxProfileResourceId, classifierConfig, withholdingTax (bills/supplier-CNs only).
|
|
1903
1912
|
|
|
1904
|
-
**
|
|
1913
|
+
**Line items — journal/cash-entry (Pattern B)**: organizationAccountResourceId, amount, description, taxProfileResourceId, classifierConfig.
|
|
1914
|
+
|
|
1915
|
+
**Line items — schedulers (Pattern C, arrayIndex)**: name, description, sku, unit, unitPrice, quantity, discount, taxProfileResourceId, organizationAccountResourceId, classifierConfig, itemResourceId, withholdingTax (purchase only).
|
|
1916
|
+
|
|
1917
|
+
**Line items — journal-schedules (Pattern D, lineItemResourceId)**: amount, description, organizationAccountResourceId, taxProfileResourceId, classifierConfig, itemResourceId, unit, quantity, pricePerUnit.
|
|
1918
|
+
|
|
1919
|
+
### Pattern D Example (Journal Schedule Line Items)
|
|
1920
|
+
|
|
1921
|
+
```json
|
|
1922
|
+
POST /api/v1/quick-fix/journal-schedules/line-items
|
|
1923
|
+
{
|
|
1924
|
+
"schedulerUpdates": [
|
|
1925
|
+
{
|
|
1926
|
+
"schedulerResourceId": "sched-uuid",
|
|
1927
|
+
"lineItemUpdates": [
|
|
1928
|
+
{
|
|
1929
|
+
"lineItemResourceId": "line-uuid",
|
|
1930
|
+
"amount": 500,
|
|
1931
|
+
"organizationAccountResourceId": "acct-uuid"
|
|
1932
|
+
}
|
|
1933
|
+
]
|
|
1934
|
+
}
|
|
1935
|
+
]
|
|
1936
|
+
}
|
|
1937
|
+
```
|
|
1938
|
+
|
|
1939
|
+
Note: journal-schedules use `lineItemResourceId` (UUID), NOT `arrayIndex`.
|
|
1940
|
+
|
|
1941
|
+
**Tags**: string array, max 50 items, max 50 chars each.
|
|
1905
1942
|
|
|
1906
1943
|
---
|
|
1907
1944
|
|
|
@@ -823,16 +823,14 @@ Journals support a top-level `currency` object to create entries in a foreign cu
|
|
|
823
823
|
|
|
824
824
|
**207 Multi-Status** — Not an error. The API returns 207 when one or more items in the batch failed. Response body is the same shape as 200: `{ updated: [...], failed: [{ resourceId, error, errorCode }] }`. Always check `failed.length` — on partial failure, some items succeeded (`updated`) while others failed (`failed`). Retry pattern: only retry the `failed` resourceIds, not the whole batch.
|
|
825
825
|
|
|
826
|
-
**"
|
|
826
|
+
**"INACTIVE_OR_DELETED_ACCOUNT"** — The account referenced in the update is deleted or inactive. Verify the account UUID is valid and active.
|
|
827
827
|
|
|
828
|
-
**"
|
|
829
|
-
|
|
830
|
-
**"Not allowed to remove pdfTemplate of a sale"** — Same pattern for `templateResourceId` on invoices that have a template.
|
|
831
|
-
|
|
832
|
-
**"Item name is required to bulk update purchase item details"** — Line-item quick-fix requires `name` in attributes. Same "absent = remove" pattern.
|
|
828
|
+
**"Cannot update ACTIVE entry"** — Journal or cash entry is already active. Must void and recreate to change.
|
|
833
829
|
|
|
834
830
|
**"TRANSACTION_LOCKED"** — Transaction is in a locked period. Cannot update.
|
|
835
831
|
|
|
832
|
+
**"Item name is required to bulk update purchase item details"** — Line-item quick-fix for purchase entities requires `name` in attributes.
|
|
833
|
+
|
|
836
834
|
---
|
|
837
835
|
|
|
838
836
|
*Last updated: 2026-03-11 — Cash entry path migration (cash-in-journals → cash-in-entries, etc.), cash entry `lines` canonical. Previous: Quick Fix errors.*
|
|
@@ -573,6 +573,8 @@ Battle-tested patterns from production Jaz API clients:
|
|
|
573
573
|
| `repeat` (schedulers) | `interval` | Quick-fix scheduler attributes use `interval`, NOT `repeat` |
|
|
574
574
|
| `lineItems` | `lineItemResourceIds` | Pass individual line item IDs, not the transaction resourceId |
|
|
575
575
|
| `schedulerResourceId` | `schedulerResourceId` | For scheduler line-item updates (in `schedulerUpdates` array) |
|
|
576
|
+
| `currencySettings` (cash entries) | `currencySetting` | Cash entries use SINGULAR form: `{ rateFunctionalToSource, exchangeToken }` |
|
|
577
|
+
| `arrayIndex` (journal-schedule line items) | `lineItemResourceId` | Journal-schedule line items use UUID, NOT zero-based index (Pattern D vs C) |
|
|
576
578
|
|
|
577
579
|
---
|
|
578
580
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: jaz-conversion
|
|
3
|
-
version: 4.32.
|
|
3
|
+
version: 4.32.5
|
|
4
4
|
description: Accounting data conversion skill — migrates customer data from Xero, QuickBooks, Sage, MYOB, and Excel exports to Jaz. Covers config, quick, and full conversion workflows, Excel parsing, CoA/contact/tax/items mapping, clearing accounts, TTB, and TB verification.
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: jaz-jobs
|
|
3
|
-
version: 4.32.
|
|
3
|
+
version: 4.32.5
|
|
4
4
|
description: 12 accounting jobs for SMB bookkeepers and accountants — month-end, quarter-end, and year-end close playbooks plus 9 ad-hoc operational jobs (bank recon, document collection, GST/VAT filing, payment runs, credit control, supplier recon, audit prep, fixed asset review, statutory filing). Jobs can have paired tools as nested subcommands (e.g., `clio jobs bank-recon match`, `clio jobs document-collection ingest`, `clio jobs statutory-filing sg-cs`). Paired with an interactive CLI blueprint generator (clio jobs).
|
|
5
5
|
license: MIT
|
|
6
6
|
compatibility: Works with Claude Code, Claude Cowork, Claude.ai, and any agent that reads markdown. For API payloads, load the jaz-api skill. For individual transaction patterns, load the jaz-recipes skill.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: jaz-recipes
|
|
3
|
-
version: 4.32.
|
|
3
|
+
version: 4.32.5
|
|
4
4
|
description: 16 IFRS-compliant recipes for complex multi-step accounting in Jaz — prepaid amortization, deferred revenue, loan schedules, IFRS 16 leases, hire purchase, fixed deposits, asset disposal, FX revaluation, ECL provisioning, IAS 37 provisions, dividends, intercompany, and capital WIP. Each recipe includes journal entries, capsule structure, and verification steps. Paired with 13 financial calculators that produce execution-ready blueprints with workings.
|
|
5
5
|
license: MIT
|
|
6
6
|
compatibility: Works with Claude Code, Claude Cowork, Claude.ai, and any agent that reads markdown. For API payloads, load the jaz-api skill alongside this one.
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import chalk from 'chalk';
|
|
2
2
|
import { readFileSync } from 'node:fs';
|
|
3
3
|
import { quickFix, quickFixLineItems, QUICK_FIX_ENTITIES } from '../core/api/quick-fix.js';
|
|
4
|
-
import { QUICK_FIX_ARAP } from '../core/api/quick-fix.js';
|
|
5
4
|
import { apiAction } from './api-action.js';
|
|
6
5
|
function parseJson(source, label) {
|
|
7
6
|
try {
|
|
@@ -85,21 +84,6 @@ Examples:
|
|
|
85
84
|
attrs.organizationAccountResourceId = opts.account;
|
|
86
85
|
if (opts.taxProfile)
|
|
87
86
|
attrs.taxProfileResourceId = opts.taxProfile;
|
|
88
|
-
// ── Pre-flight: require valueDate/dueDate (API treats absent as remove) ──
|
|
89
|
-
if (!opts.lineItems) {
|
|
90
|
-
if (!('valueDate' in attrs)) {
|
|
91
|
-
console.error(chalk.red('valueDate is required in attributes (use --date or include in --attributes)'));
|
|
92
|
-
console.error(chalk.dim('The API currently treats absent fields as "remove". Server-side fix pending.'));
|
|
93
|
-
process.exitCode = 1;
|
|
94
|
-
return;
|
|
95
|
-
}
|
|
96
|
-
if (QUICK_FIX_ARAP.includes(entity) && !('dueDate' in attrs)) {
|
|
97
|
-
console.error(chalk.red('dueDate is required for ARAP entities (use --due or include in --attributes)'));
|
|
98
|
-
console.error(chalk.dim('The API currently treats absent fields as "remove". Server-side fix pending.'));
|
|
99
|
-
process.exitCode = 1;
|
|
100
|
-
return;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
87
|
if (opts.lineItems) {
|
|
104
88
|
const result = await quickFixLineItems(client, entity, {
|
|
105
89
|
lineItemResourceIds: ids,
|
|
@@ -13,14 +13,7 @@ export function normalizeQuickFixResult(raw) {
|
|
|
13
13
|
}
|
|
14
14
|
// ── Transaction-Level Quick Fix ──────────────────────────────────
|
|
15
15
|
export async function quickFix(client, entity, body) {
|
|
16
|
-
const
|
|
17
|
-
// ARAP entities require dueDate alongside valueDate — absent fields are treated as "remove".
|
|
18
|
-
// Default dueDate to valueDate only when key is truly absent (not explicitly set to null).
|
|
19
|
-
const hasDueDate = Object.prototype.hasOwnProperty.call(body.attributes, 'dueDate');
|
|
20
|
-
if (QUICK_FIX_ARAP.includes(entity) && attrs.valueDate && !hasDueDate) {
|
|
21
|
-
attrs.dueDate = attrs.valueDate;
|
|
22
|
-
}
|
|
23
|
-
const raw = await client.post(`/api/v1/quick-fix/${entity}`, { ...body, attributes: attrs });
|
|
16
|
+
const raw = await client.post(`/api/v1/quick-fix/${entity}`, body);
|
|
24
17
|
return normalizeQuickFixResult(raw);
|
|
25
18
|
}
|
|
26
19
|
// ── Line-Item-Level Quick Fix ────────────────────────────────────
|
|
@@ -4037,16 +4037,23 @@ Returns per-contact result: created, skipped (duplicate), or failed.`,
|
|
|
4037
4037
|
// ══════════════════════════════════════════════════════════════
|
|
4038
4038
|
{
|
|
4039
4039
|
name: 'quick_fix_transactions',
|
|
4040
|
-
description: `Bulk-update multiple transactions of the same type in one call. Pass resourceIds + attributes
|
|
4041
|
-
|
|
4042
|
-
|
|
4043
|
-
|
|
4044
|
-
|
|
4045
|
-
|
|
4040
|
+
description: `Bulk-update multiple transactions of the same type in one call. Pass resourceIds + attributes — only included fields are changed, omitted fields are left unchanged.
|
|
4041
|
+
Per-entity attributes:
|
|
4042
|
+
- Invoices: valueDate, dueDate, invoiceNotes, templateResourceId, contactResourceId, billFrom, billTo, currencySettings, taxCurrencySettings, tags, customFields, capsuleResourceId
|
|
4043
|
+
- Bills: valueDate, dueDate, contactResourceId, currencySettings, taxCurrencySettings, tags, customFields, capsuleResourceId
|
|
4044
|
+
- Customer CNs: valueDate, notes, templateResourceId, contactResourceId, creditFrom, creditTo, currencySettings, taxCurrencySettings, tags, customFields, capsuleResourceId
|
|
4045
|
+
- Supplier CNs: valueDate, contactResourceId, currencySettings, taxCurrencySettings, tags, customFields, capsuleResourceId
|
|
4046
|
+
- Journals: valueDate, contactResourceId, tags, internalNotes, capsuleResourceId
|
|
4047
|
+
- Cash entries: organizationAccountResourceId, valueDate, contactResourceId, capsuleResourceId, tags, reference, currencySetting (SINGULAR — { rateFunctionalToSource, exchangeToken }), taxCurrencySettings
|
|
4048
|
+
- Sale/subscription schedules: endDate, interval, invoiceNotes, templateResourceId, contactResourceId, billFrom, billTo, tags, customFields, capsuleResourceId (+ currencySettings/taxCurrencySettings for sale only)
|
|
4049
|
+
- Purchase schedules: endDate, interval, contactResourceId, currencySettings, taxCurrencySettings, tags, customFields, capsuleResourceId
|
|
4050
|
+
- Journal schedules: startDate, endDate, interval, contactResourceId, tags, internalNotes, capsuleResourceId
|
|
4051
|
+
Tags: string array (max 50 items, max 50 chars each), e.g. ["Q1"].
|
|
4052
|
+
Response: { updated: string[], failed: [{ resourceId, error, errorCode }] }. On partial failure (HTTP 207), both arrays may be populated — always check failed.length. On 207, only retry failed resourceIds.`,
|
|
4046
4053
|
params: {
|
|
4047
4054
|
entity: { type: 'string', enum: [...QUICK_FIX_ENTITIES], description: 'Transaction type to update' },
|
|
4048
4055
|
resourceIds: { type: 'array', items: { type: 'string' }, description: 'Array of transaction resourceIds to update' },
|
|
4049
|
-
attributes: { type: 'object', description: 'Fields to update
|
|
4056
|
+
attributes: { type: 'object', description: 'Fields to update — only included fields are changed, omitted fields left unchanged. See tool description for per-entity attribute list.' },
|
|
4050
4057
|
},
|
|
4051
4058
|
required: ['entity', 'resourceIds', 'attributes'],
|
|
4052
4059
|
group: 'quick_fix',
|
|
@@ -4058,18 +4065,23 @@ Example call: { entity: "invoices", resourceIds: ["id1","id2"], attributes: { va
|
|
|
4058
4065
|
},
|
|
4059
4066
|
{
|
|
4060
4067
|
name: 'quick_fix_line_items',
|
|
4061
|
-
description: `Bulk-update line items across multiple transactions.
|
|
4062
|
-
|
|
4063
|
-
|
|
4064
|
-
|
|
4065
|
-
|
|
4066
|
-
|
|
4067
|
-
|
|
4068
|
+
description: `Bulk-update line items across multiple transactions. Only included fields are changed, omitted fields left unchanged.
|
|
4069
|
+
Request patterns by entity type:
|
|
4070
|
+
- ARAP + accounting (invoices, bills, CNs, journals, cash-entries): pass lineItemResourceIds + attributes.
|
|
4071
|
+
- Schedulers (sale/purchase/subscription-schedules): pass schedulerUpdates with arrayIndex per line item (Pattern C).
|
|
4072
|
+
- Journal schedules: pass schedulerUpdates with lineItemResourceId (UUID) per line item — NOT arrayIndex (Pattern D).
|
|
4073
|
+
Line item attributes by type:
|
|
4074
|
+
- Sale (invoices + customer CNs): name, quantity, unit, unitPrice, discount, itemResourceId, organizationAccountResourceId, taxProfileResourceId, classifierConfig
|
|
4075
|
+
- Purchase (bills + supplier CNs): same as sale + withholdingTax
|
|
4076
|
+
- Scheduler (sale/purchase/subscription, Pattern C): name, description, sku, unit, unitPrice, quantity, discount, taxProfileResourceId, organizationAccountResourceId, classifierConfig, itemResourceId, withholdingTax (purchase only). Uses arrayIndex (zero-based).
|
|
4077
|
+
- Journal/cash-entry: organizationAccountResourceId, amount, description, taxProfileResourceId, classifierConfig
|
|
4078
|
+
- Journal-schedule (Pattern D): amount, description, organizationAccountResourceId, taxProfileResourceId, classifierConfig, itemResourceId, unit, quantity, pricePerUnit. Uses lineItemResourceId (UUID).
|
|
4079
|
+
Response: { updated: string[], failed: [{ resourceId, error, errorCode }] }. On partial failure (HTTP 207), check failed.length.`,
|
|
4068
4080
|
params: {
|
|
4069
4081
|
entity: { type: 'string', enum: [...QUICK_FIX_ENTITIES], description: 'Transaction type' },
|
|
4070
4082
|
lineItemResourceIds: { type: 'array', items: { type: 'string' }, description: 'Line item resourceIds to update (ARAP + accounting entities)' },
|
|
4071
4083
|
attributes: { type: 'object', description: 'Fields to update on all specified line items' },
|
|
4072
|
-
schedulerUpdates: { type: 'array', items: { type: 'object' }, description: 'Per-scheduler updates
|
|
4084
|
+
schedulerUpdates: { type: 'array', items: { type: 'object' }, description: 'Per-scheduler updates: [{ schedulerResourceId, lineItemUpdates: [{ arrayIndex, ...fields }] }]. EXCEPTION: journal-schedules use lineItemResourceId (UUID) instead of arrayIndex.' },
|
|
4073
4085
|
},
|
|
4074
4086
|
required: ['entity'],
|
|
4075
4087
|
group: 'quick_fix',
|