jaz-clio 4.30.9 → 4.30.10
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 +69 -0
- package/assets/skills/api/references/errors.md +16 -0
- package/assets/skills/api/references/feature-glossary.md +14 -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/subscriptions.js +20 -10
- package/dist/core/api/subscriptions.js +7 -2
- package/dist/core/registry/tools.js +14 -5
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: jaz-api
|
|
3
|
-
version: 4.30.
|
|
3
|
+
version: 4.30.10
|
|
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.
|
|
@@ -243,7 +243,7 @@ Bills, invoices, and credit notes share identical mandatory field specs. Adding
|
|
|
243
243
|
92c. **Valid enums** — `depreciationMethod`: `STRAIGHT_LINE`, `NO_DEPRECIATION`. `category`: `TANGIBLE`, `INTANGIBLE`. Optional string fields (`purchaseBusinessTransactionResourceId`, `accumulatedDepreciationAccountResourceId`, `capsuleResourceId`) can be safely omitted — the API ignores empty values.
|
|
244
244
|
|
|
245
245
|
### Subscriptions & Scheduled Transactions
|
|
246
|
-
93. **Subscription endpoints are under `/scheduled/subscriptions`** — List, GET, POST, PUT, DELETE all at `/api/v1/scheduled/subscriptions[/:id]`. Cancel is at `/api/v1/scheduled/cancel-subscriptions/:id` (different path pattern). **Subscriptions are invoices only** (SALE) — no bills. Different from scheduled invoices: subscriptions auto-prorate partial periods (generate credit notes for mid-period changes), but currency/tax/account are immutable after creation. Use scheduled invoices for fixed-amount recurring invoices where you need per-occurrence flexibility.
|
|
246
|
+
93. **Subscription endpoints are under `/scheduled/subscriptions`** — List, GET, POST, PUT, DELETE all at `/api/v1/scheduled/subscriptions[/:id]`. Cancel is **PUT** (not POST) at `/api/v1/scheduled/cancel-subscriptions/:id` (different path pattern). **Subscriptions are invoices only** (SALE) — no bills. Different from scheduled invoices: subscriptions auto-prorate partial periods (generate credit notes for mid-period changes), but currency/tax/account are immutable after creation. Use scheduled invoices for fixed-amount recurring invoices where you need per-occurrence flexibility. **All subscription CRUD requires `proratedConfig: { proratedAdjustmentLineText: string }`**. Cancel requires `cancelDateType` (`END_OF_CURRENT_PERIOD`, `END_OF_LAST_PERIOD`, `CUSTOM_DATE`) + `proratedAdjustmentLineText` + `resourceId` in body. Must cancel before delete. `businessTransactionType` is NOT in the OAS — the API ignores it.
|
|
247
247
|
94. **Scheduled transaction search does NOT support `createdAt` sort** — `POST /scheduled-transaction/search` sort fields: `startDate`, `nextScheduleDate`, etc. Default to `startDate` DESC. This is a cross-entity search across all scheduled types (invoices, bills, journals, subscriptions).
|
|
248
248
|
|
|
249
249
|
### Universal Search
|
|
@@ -1320,6 +1320,75 @@ Same but with `"bill"` wrapper instead of `"invoice"`.
|
|
|
1320
1320
|
|
|
1321
1321
|
---
|
|
1322
1322
|
|
|
1323
|
+
## 16b. Subscriptions (Recurring Invoices with Auto-Proration)
|
|
1324
|
+
|
|
1325
|
+
Subscriptions auto-generate invoices on schedule with proration support. **Different from scheduled invoices**: subscriptions auto-prorate partial periods (generate credit notes for mid-period changes), but currency/tax/account are immutable after creation. Invoices only — no bills.
|
|
1326
|
+
|
|
1327
|
+
### POST /api/v1/scheduled/subscriptions
|
|
1328
|
+
|
|
1329
|
+
```json
|
|
1330
|
+
// Request:
|
|
1331
|
+
{
|
|
1332
|
+
"repeat": "MONTHLY",
|
|
1333
|
+
"startDate": "2026-04-01",
|
|
1334
|
+
"status": "ACTIVE",
|
|
1335
|
+
"proratedConfig": {
|
|
1336
|
+
"proratedAdjustmentLineText": "Prorated adjustment"
|
|
1337
|
+
},
|
|
1338
|
+
"invoice": {
|
|
1339
|
+
"contactResourceId": "uuid-customer",
|
|
1340
|
+
"reference": "SUB-001",
|
|
1341
|
+
"valueDate": "2026-04-01",
|
|
1342
|
+
"dueDate": "2026-04-30",
|
|
1343
|
+
"lineItems": [
|
|
1344
|
+
{ "name": "Monthly Retainer", "unitPrice": 3000, "quantity": 1, "accountResourceId": "uuid-revenue" }
|
|
1345
|
+
],
|
|
1346
|
+
"saveAsDraft": false
|
|
1347
|
+
}
|
|
1348
|
+
}
|
|
1349
|
+
|
|
1350
|
+
// Response:
|
|
1351
|
+
{ "data": { "resourceId": "uuid" } }
|
|
1352
|
+
```
|
|
1353
|
+
|
|
1354
|
+
**CRITICAL notes**:
|
|
1355
|
+
- `proratedConfig` is **REQUIRED** on create, update, and cancel. Omitting it causes 500 (server null pointer).
|
|
1356
|
+
- `businessTransactionType` is NOT in the OAS — the API ignores it. Don't send it.
|
|
1357
|
+
- Uses `repeat` + `invoice` wrapper — same structure as scheduled invoices (`POST /scheduled/invoices`).
|
|
1358
|
+
- `repeat`: `"WEEKLY"`, `"MONTHLY"`, `"QUARTERLY"`, `"YEARLY"`.
|
|
1359
|
+
- `saveAsDraft: false` is REQUIRED inside the `invoice` wrapper.
|
|
1360
|
+
- Currency, tax, and account details are the SAME for all items and CANNOT be changed after creation.
|
|
1361
|
+
- Mid-period cancellations or amount changes auto-generate prorated credit notes.
|
|
1362
|
+
|
|
1363
|
+
### PUT /api/v1/scheduled/cancel-subscriptions/:id
|
|
1364
|
+
|
|
1365
|
+
Cancel is **PUT** (not POST). Requires body fields — empty `{}` returns 422.
|
|
1366
|
+
|
|
1367
|
+
```json
|
|
1368
|
+
// Request:
|
|
1369
|
+
{
|
|
1370
|
+
"cancelDateType": "END_OF_CURRENT_PERIOD",
|
|
1371
|
+
"proratedAdjustmentLineText": "Prorated adjustment",
|
|
1372
|
+
"resourceId": "uuid-subscription"
|
|
1373
|
+
}
|
|
1374
|
+
|
|
1375
|
+
// Response:
|
|
1376
|
+
{ "data": { "resourceId": "uuid", "status": "SUCCEEDED" } }
|
|
1377
|
+
```
|
|
1378
|
+
|
|
1379
|
+
`cancelDateType` values: `END_OF_CURRENT_PERIOD` (default), `END_OF_LAST_PERIOD`, `CUSTOM_DATE` (requires `endDate: "YYYY-MM-DD"`).
|
|
1380
|
+
|
|
1381
|
+
Note the different path pattern from CRUD: cancel is at `/scheduled/cancel-subscriptions/:id`, not `/scheduled/subscriptions/:id/cancel`. Must cancel before delete — cannot delete ACTIVE subscriptions.
|
|
1382
|
+
|
|
1383
|
+
### Other subscription endpoints
|
|
1384
|
+
|
|
1385
|
+
- `GET /api/v1/scheduled/subscriptions` — List all subscriptions
|
|
1386
|
+
- `GET /api/v1/scheduled/subscriptions/:id` — Get subscription details
|
|
1387
|
+
- `PUT /api/v1/scheduled/subscriptions/:id` — Update subscription (requires `proratedConfig`, `repeat`, `resourceId`)
|
|
1388
|
+
- `DELETE /api/v1/scheduled/subscriptions/:id` — Delete subscription (must be cancelled first)
|
|
1389
|
+
|
|
1390
|
+
---
|
|
1391
|
+
|
|
1323
1392
|
## 17. Reports
|
|
1324
1393
|
|
|
1325
1394
|
### POST /api/v1/generate-reports/trial-balance
|
|
@@ -574,6 +574,22 @@ if (acct.code) ctx.coaIds[acct.code] = acct.resourceId;
|
|
|
574
574
|
|
|
575
575
|
---
|
|
576
576
|
|
|
577
|
+
## Subscriptions Errors
|
|
578
|
+
|
|
579
|
+
### 500 Internal Server Error — missing `proratedConfig`
|
|
580
|
+
**Cause**: `POST /scheduled/subscriptions` and `PUT /scheduled/subscriptions/:id` return 500 when `proratedConfig` is omitted. The server null-pointer dereferences on the missing field. OAS marks it required but the 500 is misleading.
|
|
581
|
+
**Fix**: Always include `proratedConfig: { proratedAdjustmentLineText: "Prorated adjustment" }` in create and update bodies.
|
|
582
|
+
|
|
583
|
+
### 422 on cancel — wrong method or missing fields
|
|
584
|
+
**Cause**: Cancel endpoint is **PUT** `/scheduled/cancel-subscriptions/:id` (not POST). Requires body: `{ cancelDateType, proratedAdjustmentLineText, resourceId }`. Empty `{}` returns 422.
|
|
585
|
+
**Fix**: Use PUT with required fields. `cancelDateType`: `END_OF_CURRENT_PERIOD` (default), `END_OF_LAST_PERIOD`, `CUSTOM_DATE`.
|
|
586
|
+
|
|
587
|
+
### Cannot delete ACTIVE subscription
|
|
588
|
+
**Cause**: `DELETE /scheduled/subscriptions/:id` fails if subscription status is ACTIVE.
|
|
589
|
+
**Fix**: Cancel first, then delete.
|
|
590
|
+
|
|
591
|
+
---
|
|
592
|
+
|
|
577
593
|
## Deposits Errors
|
|
578
594
|
|
|
579
595
|
### 404 — Endpoint does not exist
|
|
@@ -18,6 +18,20 @@ If payment date equals invoice date, it's recorded as a cash transaction (not AR
|
|
|
18
18
|
|
|
19
19
|
---
|
|
20
20
|
|
|
21
|
+
## Subscriptions (Recurring Invoices with Proration)
|
|
22
|
+
|
|
23
|
+
Auto-generates invoices on a recurring schedule (weekly, monthly, quarterly, yearly) with automatic proration for mid-period adjustments. When dates or amounts change, prorated invoices or credit notes are generated for partial periods.
|
|
24
|
+
|
|
25
|
+
**Key differences from scheduled invoices**: Subscriptions auto-prorate (scheduled invoices don't). But currency, tax, and account details must be the same for all line items and cannot be changed after creation (scheduled invoices allow per-occurrence flexibility).
|
|
26
|
+
|
|
27
|
+
Use subscriptions for: software licenses, retainer services, SaaS billing — any recurring revenue where proration matters. Use scheduled invoices for fixed-amount recurring invoices where you need to change line items, tax, or currency per occurrence.
|
|
28
|
+
|
|
29
|
+
**Invoices only** — no bills. `businessTransactionType` must be `"SALE"`.
|
|
30
|
+
|
|
31
|
+
**API**: CRUD `GET/POST/PUT/DELETE /scheduled/subscriptions`, cancel `POST /scheduled/cancel-subscriptions/:id`, search `POST /scheduled-transaction/search` (cross-entity).
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
21
35
|
## Bills
|
|
22
36
|
|
|
23
37
|
Purchase documents from suppliers for goods/services received. Track Accounts Payable with multi-currency FX. Bills follow the same lifecycle as invoices but with reversed RGL logic and admin-only approval workflows. Supports withholding tax (WHT) on line items.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: jaz-conversion
|
|
3
|
-
version: 4.30.
|
|
3
|
+
version: 4.30.10
|
|
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.30.
|
|
3
|
+
version: 4.30.10
|
|
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.30.
|
|
3
|
+
version: 4.30.10
|
|
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.
|
|
@@ -103,17 +103,20 @@ export function registerSubscriptionsCommand(program) {
|
|
|
103
103
|
...(opts.taxProfile && !li.taxProfileResourceId ? { taxProfileResourceId: opts.taxProfile } : {}),
|
|
104
104
|
}));
|
|
105
105
|
}
|
|
106
|
+
// Subscriptions use repeat + invoice wrapper + proratedConfig (required)
|
|
106
107
|
body = {
|
|
107
|
-
|
|
108
|
-
interval: opts.interval,
|
|
108
|
+
repeat: opts.interval,
|
|
109
109
|
startDate: opts.startDate,
|
|
110
110
|
status: 'ACTIVE',
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
111
|
+
proratedConfig: { proratedAdjustmentLineText: 'Prorated adjustment' },
|
|
112
|
+
invoice: {
|
|
113
|
+
contactResourceId: opts.contact,
|
|
114
|
+
reference: opts.ref,
|
|
115
|
+
valueDate: opts.date,
|
|
116
|
+
dueDate: opts.due,
|
|
117
|
+
lineItems,
|
|
118
|
+
saveAsDraft: false,
|
|
119
|
+
},
|
|
117
120
|
};
|
|
118
121
|
if (opts.endDate)
|
|
119
122
|
body.endDate = opts.endDate;
|
|
@@ -163,12 +166,19 @@ export function registerSubscriptionsCommand(program) {
|
|
|
163
166
|
})(opts));
|
|
164
167
|
cmd
|
|
165
168
|
.command('cancel <resourceId>')
|
|
166
|
-
.description('Cancel an active subscription')
|
|
169
|
+
.description('Cancel an active subscription (prorates remaining period)')
|
|
170
|
+
.option('--cancel-date-type <type>', 'END_OF_CURRENT_PERIOD, END_OF_LAST_PERIOD, or CUSTOM_DATE', 'END_OF_CURRENT_PERIOD')
|
|
171
|
+
.option('--end-date <YYYY-MM-DD>', 'Custom cancel date (only with CUSTOM_DATE)')
|
|
172
|
+
.option('--prorated-text <text>', 'Prorated adjustment line text', 'Prorated adjustment')
|
|
167
173
|
.option('--format <type>', 'Output format: table, json, csv, yaml')
|
|
168
174
|
.option('--api-key <key>', 'API key')
|
|
169
175
|
.option('--json', 'JSON output')
|
|
170
176
|
.action((resourceId, opts) => apiAction(async (client) => {
|
|
171
|
-
await cancelSubscription(client, resourceId
|
|
177
|
+
await cancelSubscription(client, resourceId, {
|
|
178
|
+
cancelDateType: opts.cancelDateType,
|
|
179
|
+
proratedAdjustmentLineText: opts.proratedText,
|
|
180
|
+
endDate: opts.endDate,
|
|
181
|
+
});
|
|
172
182
|
if (opts.json) {
|
|
173
183
|
console.log(JSON.stringify({ cancelled: true, resourceId }));
|
|
174
184
|
return;
|
|
@@ -13,8 +13,13 @@ export async function updateSubscription(client, resourceId, data) {
|
|
|
13
13
|
export async function deleteSubscription(client, resourceId) {
|
|
14
14
|
await client.delete(`/api/v1/scheduled/subscriptions/${resourceId}`);
|
|
15
15
|
}
|
|
16
|
-
export async function cancelSubscription(client, resourceId) {
|
|
17
|
-
return client.
|
|
16
|
+
export async function cancelSubscription(client, resourceId, opts) {
|
|
17
|
+
return client.put(`/api/v1/scheduled/cancel-subscriptions/${resourceId}`, {
|
|
18
|
+
resourceId,
|
|
19
|
+
cancelDateType: opts?.cancelDateType ?? 'END_OF_CURRENT_PERIOD',
|
|
20
|
+
proratedAdjustmentLineText: opts?.proratedAdjustmentLineText ?? 'Prorated adjustment',
|
|
21
|
+
...(opts?.endDate ? { endDate: opts.endDate } : {}),
|
|
22
|
+
});
|
|
18
23
|
}
|
|
19
24
|
export async function searchScheduledTransactions(client, params) {
|
|
20
25
|
// Scheduled transactions sort fields: startDate, nextScheduleDate, etc. (no createdAt)
|
|
@@ -3330,10 +3330,14 @@ Use for: software licenses, retainer services, recurring SaaS billing. Invoices
|
|
|
3330
3330
|
accountResourceId,
|
|
3331
3331
|
...(taxProfileResourceId ? { taxProfileResourceId } : {}),
|
|
3332
3332
|
}));
|
|
3333
|
+
// Subscriptions use repeat + invoice wrapper + proratedConfig (required)
|
|
3333
3334
|
const body = {
|
|
3334
|
-
|
|
3335
|
-
|
|
3336
|
-
|
|
3335
|
+
repeat: interval, startDate, status: 'ACTIVE',
|
|
3336
|
+
proratedConfig: { proratedAdjustmentLineText: 'Prorated adjustment' },
|
|
3337
|
+
invoice: {
|
|
3338
|
+
contactResourceId, reference, valueDate, dueDate,
|
|
3339
|
+
lineItems: items, saveAsDraft: false,
|
|
3340
|
+
},
|
|
3337
3341
|
};
|
|
3338
3342
|
if (endDate)
|
|
3339
3343
|
body.endDate = endDate;
|
|
@@ -3360,14 +3364,19 @@ Use for: software licenses, retainer services, recurring SaaS billing. Invoices
|
|
|
3360
3364
|
deleteTool('delete_subscription', 'Delete a subscription. Removes the recurring schedule.', 'subscriptions', (client, id) => deleteSubscription(client, id)),
|
|
3361
3365
|
{
|
|
3362
3366
|
name: 'cancel_subscription',
|
|
3363
|
-
description: 'Cancel an active subscription.
|
|
3367
|
+
description: 'Cancel an active subscription. Prorates remaining period and stops future billing. Must cancel before delete.',
|
|
3364
3368
|
params: {
|
|
3365
3369
|
resourceId: { type: 'string', description: 'Subscription resourceId' },
|
|
3370
|
+
cancelDateType: { type: 'string', enum: ['END_OF_CURRENT_PERIOD', 'END_OF_LAST_PERIOD', 'CUSTOM_DATE'], description: 'When to end (default: END_OF_CURRENT_PERIOD)' },
|
|
3371
|
+
endDate: { type: 'string', description: 'Custom cancel date YYYY-MM-DD (only with CUSTOM_DATE)' },
|
|
3366
3372
|
},
|
|
3367
3373
|
required: ['resourceId'],
|
|
3368
3374
|
group: 'subscriptions',
|
|
3369
3375
|
readOnly: false,
|
|
3370
|
-
execute: async (ctx, input) => cancelSubscription(ctx.client, input.resourceId
|
|
3376
|
+
execute: async (ctx, input) => cancelSubscription(ctx.client, input.resourceId, {
|
|
3377
|
+
cancelDateType: input.cancelDateType,
|
|
3378
|
+
endDate: input.endDate,
|
|
3379
|
+
}),
|
|
3371
3380
|
},
|
|
3372
3381
|
{
|
|
3373
3382
|
name: 'search_scheduled_transactions',
|