jaz-clio 9.11.0 → 9.13.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 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-523-blue?style=for-the-badge" alt="523 tools">
6
+ <img src="https://img.shields.io/badge/tools-555-blue?style=for-the-badge" alt="555 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
- 523 tools · 80 command groups · 8 skills · 13 calculators · 12 job playbooks · 148 field-tested API rules.
12
+ 555 tools · 84 command groups · 8 skills · 13 calculators · 12 job playbooks · 152 field-tested API rules.
13
13
 
14
14
  ```bash
15
15
  npm install -g jaz-clio
@@ -66,21 +66,24 @@ clio ledger-find-fix preview --level TRANSACTIONS --input recode.json # find &
66
66
  clio approvals approve <resourceId> --entity invoices # approve a document waiting on you
67
67
  clio sql preview "SELECT invoice_number, balance FROM invoices WHERE balance > 0 LIMIT 10" # read-only pseudo-SQL
68
68
  clio report-templates update "Board P&L" --set colorTheme=calm # customize a report layout
69
+ clio pdf-templates update "Standard Invoice" --set colorTheme=calm # change how invoices print
70
+ clio email-templates create --type INVOICE_PAYMENT_REMINDER --name "Gentle nudge" --subject "{{invoiceReference}} is due soon" --message-file nudge.txt --reminder BEFORE_DUE_DATE=3 # a payment reminder email
69
71
  clio exports download --type profit-and-loss --template "Board P&L" --format PDF --start-date 2026-01-01 --end-date 2026-06-30
72
+ clio transaction-defaults update SALE --prefix SI --due-days 30 # invoice number format and default terms
70
73
  clio modules list # which features are switched on
71
74
  clio navigate reports.profit-and-loss # deep link into the Jaz dashboard (offline)
72
75
  ```
73
76
 
74
- 80 command groups, 17 report types, 13 calculators, 12 job playbooks. Every command takes `--json`. Run `clio --help` for the full list.
77
+ 84 command groups, 17 report types, 13 calculators, 12 job playbooks. Every command takes `--json`. Run `clio --help` for the full list.
75
78
 
76
79
  Command groups by area:
77
80
 
78
- - **Sales and purchases**: `invoices`, `bills`, `customer-credit-notes`, `supplier-credit-notes`, `sale-orders`, `purchase-orders`, `payments`, `unapplied-payments`, `approvals`, `drafts`, `schedulers`, `subscriptions`
81
+ - **Sales and purchases**: `invoices`, `bills`, `customer-credit-notes`, `supplier-credit-notes`, `sale-orders`, `purchase-orders`, `payments`, `unapplied-payments`, `approvals`, `drafts`, `schedulers`, `subscriptions`, `signature-profiles` (e-sign templates)
79
82
  - **Ledger and banking**: `journals`, `cash-in`, `cash-out`, `cash-transfer`, `cashflow`, `bank`, `bank-rules`, `reconciliations` (`recon`), `ledger-find-fix`, `quick-fix`, `fixed-assets` (`fa`)
80
83
  - **Master data**: `accounts`, `contacts`, `contact-groups`, `items`, `purchase-items`, `catalogs`, `inventory` (`inv`), `tags`, `custom-fields`, `nano-classifiers`, `tax-profiles`, `currencies`, `currency-rates`, `capsules`
81
84
  - **Claims**: `claims`, `claim-types`, `claim-profiles`, `posting-rules`, `employees`
82
- - **Reports and data**: `reports`, `exports`, `export-records`, `report-templates`, `pseudo-sql` (`sql`), `filing-submissions`, `background-jobs`
83
- - **Organization**: `org`, `org-users`, `references`, `modules` (`features`), `bookmarks`, `attachments`, `magic`, `jots`, `navigate` (`nav`), `help-center` (`hc`)
85
+ - **Reports and data**: `reports`, `exports`, `export-records`, `report-templates`, `pdf-templates`, `pseudo-sql` (`sql`), `filing-submissions`, `background-jobs`
86
+ - **Organization**: `org`, `org-users`, `email-templates`, `references`, `transaction-defaults`, `modules` (`features`), `bookmarks`, `attachments`, `magic`, `jots`, `navigate` (`nav`), `help-center` (`hc`)
84
87
  - **Calculators and job tools**: `calc` (offline), `jobs`
85
88
  - **Setup and tooling**: `auth`, `init`, `update`, `versions`, `version`, `health`, `completion`, `schema`, `resolve`, `mcp`, `mcp-call`
86
89
 
@@ -109,7 +112,7 @@ that ends up in a journal.
109
112
 
110
113
  ## MCP server
111
114
 
112
- 523 tools for any AI agent that speaks MCP. Runs locally: no cloud, no ports.
115
+ 555 tools for any AI agent that speaks MCP. Runs locally: no cloud, no ports.
113
116
 
114
117
  > **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
118
 
@@ -142,7 +145,7 @@ OAuth can reach the organizations granted at sign-in; `--org` pins one, and with
142
145
 
143
146
  ## Skills
144
147
 
145
- 148 API rules from production testing: field-name maps, error-recovery patterns, response-shape quirks, plus 12 job playbooks. Installable into any agent project, no server involved.
148
+ 152 API rules from production testing: field-name maps, error-recovery patterns, response-shape quirks, plus 12 job playbooks. Installable into any agent project, no server involved.
146
149
 
147
150
  ```bash
148
151
  clio init # auto-detect the agent, install skills + agent-rules
@@ -2,7 +2,7 @@
2
2
  name: jaz-api
3
3
  description: >-
4
4
  Use this skill whenever you call, debug, or review code that touches the Jaz
5
- REST API. Covers field names, response shapes, 148 production gotchas, error
5
+ REST API. Covers field names, response shapes, 152 production gotchas, error
6
6
  recovery (422/400/404/500), search filters, pagination, and edge cases for
7
7
  every endpoint: invoices, bills, credit notes, journals, cash entries,
8
8
  payments, contacts, CoA, items, tax profiles, bank records, fixed assets,
@@ -14,7 +14,7 @@ description: >-
14
14
  license: MIT
15
15
  compatibility: Uses Jaz OAuth by default; organization API keys remain supported. Works with Claude Code, Google Antigravity, OpenAI Codex, GitHub Copilot, Cursor, and any agent that reads markdown.
16
16
  metadata:
17
- version: "9.11.0"
17
+ version: "9.13.0"
18
18
  ---
19
19
 
20
20
  # Jaz API Skill
@@ -67,6 +67,8 @@ The rules column names each rule file with the rule numbers that apply to the ta
67
67
  | Bank records, the cashflow ledger, Jaz Magic extraction, deposits, bank rules | `endpoints-banking-magic.md` | `rules-fundamentals.md` 44, 47-47a; `rules-search-magic-shapes.md` 57-63; `rules-entities-quick-fix.md` 89-90d, 110 |
68
68
  | Reconciliation, drafts lifecycle, transaction bulk upserts | `full-api-surface.md` (catalog) | `rules-bulk-recon-drafts.md` 118-135, 158-160 |
69
69
  | Schedulers, subscriptions, reports, exports, report templates | `endpoints-schedules-reports.md` | `rules-fundamentals.md` 32-33, 36-37a, 42; `rules-entities-quick-fix.md` 93-94, 109, 114; `rules-bulk-recon-drafts.md` 147, 161; `report-templates.md` |
70
+ | PDF templates, email templates, e-sign templates (signature profiles) | `endpoints-schedules-reports.md` | `rules-bulk-recon-drafts.md` 162-164; `pdf-templates.md` |
71
+ | Numbering and transaction defaults (what new documents of a family start from) | `endpoints-master-data.md` | `rules-entities-quick-fix.md` 104; `rules-bulk-recon-drafts.md` 165 |
70
72
  | Fixed assets, deferrals, leases, loans, payroll | `endpoints-assets-payroll.md` | `rules-entities-quick-fix.md` 91-92c, 117; `rules-bulk-recon-drafts.md` 122 |
71
73
  | Quick Fix, Ledger Find & Fix, contacts bulk upsert, background jobs | `endpoints-bulk-edits.md` | `rules-fundamentals.md` (bulk upsert and background jobs sections); `rules-entities-quick-fix.md` 107-107a, 111; `rules-bulk-recon-drafts.md` 119, 136-137c |
72
74
  | An error code or message | | `errors.md` |
@@ -99,7 +101,7 @@ The numbered rules are split by area into four files under `references/`. Number
99
101
  | 1-49 | [references/rules-fundamentals.md](references/rules-fundamentals.md) | Identifiers & dates; payments (cross-currency); names & fields; transaction creation (`saveAsDraft`); chart of accounts; bulk upsert of items, contacts and rates; background jobs; export records; journals & cash; credit notes & refunds; inventory items; cash transfers; schedulers; bookmarks; custom fields; tags; nano classifiers; reports; pagination; currency rates and FX; GET/POST field asymmetries; search sort; bank records; withholding tax; known bugs and non-existent endpoints; deposits; attachments; rate direction |
100
102
  | 50-88 | [references/rules-search-magic-shapes.md](references/rules-search-magic-shapes.md) | Search & filter (`query`, operators, date formats, aliases, response envelopes); Jaz Magic extraction; payment reads and the cashflow ledger; response shape gotchas; cash entry IDs; entity resolution and payment accounts; draft finalization pipeline |
101
103
  | 89-117 | [references/rules-entities-quick-fix.md](references/rules-entities-quick-fix.md) | Bank rules; fixed assets; subscriptions & scheduled transactions; contact groups; inventory balances; withholding codes and 2307 certificates; duplicate detection; tax profile scoping; cash entry PUT and account type; journal balance; transaction references; currency rates; Quick Fix and Ledger Find & Fix; transfer trial balance; dynamic strings; sub-resource shapes; nano-classifier API; scheduler asymmetry; payment records and payment methods |
102
- | 118-161 | [references/rules-bulk-recon-drafts.md](references/rules-bulk-recon-drafts.md) | Transaction bulk upserts; reconciliation actions; drafts lifecycle; contacts bulk upsert and payment terms; contact signals and `validate_drafts`; IFRS 18 account types; CoA bulk upsert; pseudo-SQL; cashflow report; match-to-existing reconciliation; auto-reconciliation suggestions; payment adjustments; report templates |
104
+ | 118-165 | [references/rules-bulk-recon-drafts.md](references/rules-bulk-recon-drafts.md) | Transaction bulk upserts; reconciliation actions; drafts lifecycle; contacts bulk upsert and payment terms; contact signals and `validate_drafts`; IFRS 18 account types; CoA bulk upsert; pseudo-SQL; cashflow report; match-to-existing reconciliation; auto-reconciliation suggestions; payment adjustments; report templates; PDF templates; email templates; signature profiles; transaction defaults and document numbering |
103
105
 
104
106
  ## Supporting Files
105
107
 
@@ -112,6 +114,7 @@ For detailed reference, read these files in this skill directory (the four rule
112
114
  - **[references/orders.md](./references/orders.md)**: Sale quotes, sale orders, purchase requests, purchase orders: lifecycle, linking, conversion, line-item edits
113
115
  - **[references/claims.md](./references/claims.md)**: Expense claims: records, lifecycle, bulk actions, conversion, payouts, employees, claim settings
114
116
  - **[references/report-templates.md](./references/report-templates.md)**: Report templates and packs: layouts, `edits`, defaults, refusals
117
+ - **[references/pdf-templates.md](./references/pdf-templates.md)**: PDF templates: template types, the layout and `settings` merge, defaults, styles, page order, refusals
115
118
  - **[references/bank-rule-column-mapping.md](./references/bank-rule-column-mapping.md)**: Bank-rule column-value mapping (`ColumnValueMapConfig`, column tokens)
116
119
 
117
120
  ### Endpoint and search lookups: the jaz-api-reference skill
@@ -93,7 +93,7 @@ To change a few fields on some lines without resending the document, use `quick_
93
93
  `sale_orders`: `create_sale_order`, `get_sale_order`, `search_sale_orders`, `search_sale_order_line_items`, `update_sale_order`, `accept_sale_quote`, `confirm_sale_order`, `void_sale_order`, `delete_sale_order`, `convert_sale_order_to_invoice`.
94
94
  `purchase_orders`: `create_purchase_order`, `get_purchase_order`, `search_purchase_orders`, `search_purchase_order_line_items`, `update_purchase_order`, `accept_purchase_request`, `confirm_purchase_order`, `void_purchase_order`, `delete_purchase_order`, `convert_purchase_order_to_bill`.
95
95
 
96
- PDF downloads for the documents these convert into: `download_bill_pdf` (`bills`), `download_supplier_credit_note_pdf` (`supplier_credit_notes`), alongside the existing `download_invoice_pdf` / `download_credit_note_pdf`.
96
+ PDF downloads: `download_sale_order_pdf` (`documentType` SALE_QUOTE or SALE_ORDER; a sale order also takes `variant` ORDER_CONFIRMATION or DELIVERY_SLIP) and `download_purchase_order_pdf` (`documentType` PURCHASE_REQUEST or PURCHASE_ORDER) here, and for the documents these convert into: `download_bill_pdf` (`bills`, `variant` APPROVAL_RECORD for the approval record), `download_supplier_credit_note_pdf` (`supplier_credit_notes`), `download_invoice_pdf` (`invoices`, `variant` DELIVERY_SLIP for the delivery slip) and `download_credit_note_pdf`. `download_payment_pdf` (`payments`) gives a payment receipt, payment advice or refund document. Over the API the variant is the `documentType` query parameter.
97
97
 
98
98
  ## CLI (full surface incl. long-tail)
99
99
 
@@ -102,7 +102,11 @@ clio sale-orders list|get|search|search-line-items|create|update|accept|conf
102
102
  |bulk-void|bulk-accept|bulk-confirm|bulk-delete|bulk-upsert-line-items (-t quote|order)
103
103
  clio purchase-orders list|get|search|search-line-items|create|update|accept|confirm|convert-to-bill|void|delete|fast-fix \
104
104
  |bulk-void|bulk-accept|bulk-confirm|bulk-delete|bulk-upsert-line-items (-t request|order)
105
- clio bills download <id> # bill PDF
105
+ clio sale-orders download <id> -t quote|order [--variant ORDER_CONFIRMATION|DELIVERY_SLIP] # --variant: order only
106
+ clio purchase-orders download <id> -t request|order
107
+ clio bills download <id> [--variant APPROVAL_RECORD] # bill PDF, or its approval record
108
+ clio invoices download <id> [--variant DELIVERY_SLIP]
109
+ clio payments download <id> # receipt, payment advice or refund document
106
110
  clio supplier-credit-notes download <id> # supplier CN PDF
107
111
  ```
108
112
 
@@ -0,0 +1,110 @@
1
+ # PDF Templates
2
+
3
+ A PDF template is the print layout of one kind of document. Each organization holds one or more per template type, and exactly one default per type. A document prints with its own template, else its contact's assigned template, else the default of its type.
4
+
5
+ **A document's own template.** Create and update of invoices, customer credit notes, quotes and purchase orders take `template` (MCP: a template's resourceId or exact name, found among the document's type) and send it as `templateResourceId`. Left out, a create takes the contact's template, else the default, and an update keeps the current one. Reads return it as `templateResourceId` (invoices also `deliverySlipTemplateResourceId`); the get tools name each under `templates`. A sale order prints only its confirmation and delivery slip (`orderConfirmationTemplateResourceId`, `deliverySlipTemplateResourceId`, from its contact or the default); a purchase request prints with no template. Neither takes one of its own.
6
+
7
+ Tools (MCP, `pdf_templates` namespace): `list_pdf_templates`, `search_pdf_templates`, `get_pdf_template`, `list_pdf_template_styles`, `list_pdf_template_layout_settings`, `create_pdf_template`, `update_pdf_template`, `set_default_pdf_template`, `upload_template_image`, `delete_pdf_templates`. CLI: `clio pdf-templates` (list, search, get, styles, create, update, set-default, delete). Every tool and command that takes a template takes its **resourceId or exact name**. A name several types use needs `templateType` to narrow it.
8
+
9
+ ## Template types
10
+
11
+ | `templateType` | Document |
12
+ |---|---|
13
+ | `INVOICE` | Invoice |
14
+ | `CUSTOMER_CREDIT` | Customer credit note |
15
+ | `RECEIPT` | Invoice payment receipt |
16
+ | `REFUND` | Credit note refund advice |
17
+ | `CUSTOMER_STATEMENT` | Statement of account |
18
+ | `SALE_QUOTE` | Quote |
19
+ | `PURCHASE_ORDER` | Purchase order |
20
+ | `INVOICE_DELIVERY_SLIP` | Delivery slip printed from an invoice |
21
+ | `ORDER_DELIVERY_SLIP` | Delivery slip printed from a sale order |
22
+ | `SALE_ORDER_CONFIRMATION` | Sale order |
23
+ | `DIRECT_CASH_IN_RECEIPT` | Cash-in receipt |
24
+ | `DIRECT_CASH_OUT_ADVICE` | Cash-out advice |
25
+ | `BILL_PAYMENT_ADVICE` | Bill payment advice |
26
+ | `COLLECTION_REQUEST` | Payment request (pay link and checkout QR) |
27
+ | `PAYSLIP` | Payslip |
28
+
29
+ ## The layout (`templateSettings`)
30
+
31
+ A JSON object, read and written as an object. Its shape is the app's own editor output, about 150 to 200 settings in sections that differ by type. `list_pdf_template_layout_settings` (`GET /api/v1/pdf-templates/layout?templateType=`) lists every one a type can hold: its path, the kind of value (OBJECT, LIST, FILES, BOOLEAN, TEXT, NUMBER, PERCENT, CHOICE), its choices or bounds, when its label is required, and the sets of column widths that must add up to 100. The ones most often changed, with the names the app shows:
32
+
33
+ | Key | Values (the name the app shows) |
34
+ |---|---|
35
+ | `colorTheme` | `default` (Gray), `calm` (Green), `bold` (Midnight), `trust` (Blue), `social` (Pink), `ivory`, `gold`, `peach`; a theme shows only on the Overlay, Smooth and Formal styles |
36
+ | `margins` | `default` (Standard), `compact`, `comfortable` (Relaxed) |
37
+ | `templateFont` | `Inter`, `LatoFont` (Lato), `Roboto`, `Figtree`, `SourceSans3` (Source Sans 3) |
38
+ | `fontSize` | `default`, `smaller`, `larger` |
39
+ | `documentTitle` | `{ title, isUppercase }` (customer statements use `statementDocumentTitle` / `balanceDocumentTitle`) |
40
+ | `documentLogo` | `[{ fileId, fileUrl, fileName, fileType, resourceId }]`, an image already on one of the organization's templates (below); `[]` prints no logo |
41
+ | `headerImageType` | `LOGO`, or `LETTERHEAD` to print `documentLetterhead` across the top |
42
+ | `documentLetterhead` | same shape as `documentLogo` |
43
+
44
+ Every template a tool returns carries `looks`: its style and these settings by the names the app shows (`{ style: "Formal", colorTheme: "Blue" }`). Say those to people, never the codes or keys. In `sideDetailConfigs`, `vatId` is the GST/VAT number and `registrationId` the company registration number: never label one as the other.
45
+
46
+ Other sections: `documentDetailConfigs`, `sideDetailConfigs`, `tableColumnConfigs`, `totalDetailConfigs`, `taxSummaryConfigs`, `footerConfigs` (notes, bank details, online payment), `supportingTableConfigs`, `payslipConfigs`, `deliverySlipConfigs`, and the statement and balance sections. Read a template with `get_pdf_template` to see its own.
47
+
48
+ - **Only what the app's editor sets.** Send only keys and values `list_pdf_template_layout_settings` lists for the type: read it before writing. A setting it does not list cannot be set (say so plainly), never something to try. A refusal lists every problem with the values allowed: pass it on as it reads.
49
+ - **A new logo, letterhead or payment QR is uploaded first, then placed.** `upload_template_image` (`kind` LOGO, LETTERHEAD or PAYMENT_QR; the file attached to the call or a `sourceUrl`) posts the image to `POST /api/v1/pdf-templates/images` and answers `{fileId, fileName, fileType, fileUrl}` with `settings`, the change that puts it on a template (`documentLogo` + `headerImageType`, `documentLetterhead` + `headerImageType`, or `footerConfigs.paymentsSection.qrCode`): pass that to `create_pdf_template` or `update_pdf_template`. An image one of the organization's templates already prints can be reused instead: that entry's `fileId` with its stored `fileUrl`, copied from `get_pdf_template`. Any other file or address is a 422.
50
+ - **Values are checked only where they change.** A layout read and sent back is never refused over a value saved before (old templates can carry `HELVETICA` or `Arial`, which the engine still draws). A changed key or value outside what `list_pdf_template_layout_settings` lists is a 422 naming it.
51
+
52
+ ## What templates cannot do
53
+
54
+ No setting exists for: column order, item images, a SKU column, paper other than A4, footer text on every page, hiding invoice page numbers, a signature line (invoices, credit notes, purchase orders), a fixed terms block, the amount in words on invoices, a PayNow QR with the amount, hex colours (offer the closest theme), exact logo placement (offer the closest style), bill templates. These settings are all the app has: say so plainly ("Invoices cannot show the amount in words. There is no setting for it."), never "not available yet". Read a template before writing; never write to learn a shape, and never create documents on real customers to preview one: say where to open it.
55
+
56
+ ## `settings`: a change, merged
57
+
58
+ The tools take `settings` (CLI: `--set path=value`, `--settings-file`) as a CHANGE, never the whole layout:
59
+ - **Objects merge key by key, at any depth.** `{"documentTitle": {"title": "Tax Invoice"}}` keeps `isUppercase`.
60
+ - **Arrays, values and `null` replace whole.** `{"documentLogo": []}` removes the logo; there is no way to remove a key, only to set it.
61
+ - **Update** merges onto the stored layout and sends all of it (the API replaces the layout in full on update).
62
+ - **Create** sends the change as is, and the API merges it onto the layout of the organization's default template of the type by the same rules. Without `settings`, the new template is a copy of that layout. With no template of the type to start from, `settings` is the whole layout.
63
+
64
+ ## Defaults
65
+
66
+ - **A new template is never the default.** `set_default_pdf_template` (an update with `isDefault: true` on the wire) makes one the default and answers `previousDefault`. Only `true` is accepted: change the default by setting it on the template that should become it.
67
+ - **Create starts from the default template**: its layout (see above) and its style when `styleCode` is left out; with no template of the type, the type's default style.
68
+
69
+ ## Styles
70
+
71
+ `styleCode` is one of the codes `list_pdf_template_styles` returns for the template type (`STYLE_CODE_CLASSIC`, `STYLE_CODE_SMOOTH`, `STYLE_CODE_OVERLAY`, `STYLE_CODE_FORMAL`, `STYLE_CODE_BENTO`, as the catalog offers them per type). Any other code is a 422 listing the valid ones. The `STYLE_ONE` / `STYLE_TWO` / `STYLE_THREE` values some upstream schema names are not used.
72
+
73
+ ## Page order and the second document
74
+
75
+ `templateOrderType` applies to six types; every other type refuses it.
76
+
77
+ | Template type | `templateOrderType` (first = what a new template starts with) |
78
+ |---|---|
79
+ | `RECEIPT` | `RECEIPT_ONLY`, `RECEIPT_FOLLOWED_BY_INVOICE`, `INVOICE_FOLLOWED_BY_RECEIPT` |
80
+ | `REFUND` | `REFUND_ONLY`, `REFUND_FOLLOWED_BY_CUSTOMER_CREDIT`, `CUSTOMER_CREDIT_FOLLOWED_BY_REFUND` |
81
+ | `DIRECT_CASH_IN_RECEIPT`, `DIRECT_CASH_OUT_ADVICE`, `BILL_PAYMENT_ADVICE` | `RECEIPT_ONLY`, `RECEIPT_FOLLOWED_BY_VOUCHER`, `VOUCHER_FOLLOWED_BY_RECEIPT` |
82
+ | `COLLECTION_REQUEST` | `RECEIPT_ONLY` |
83
+
84
+ `parentBtTemplateResourceId` (tools: `parentTemplate`, a name or id) names the template printed as the second document:
85
+ - A `RECEIPT` printed with its invoice names an `INVOICE` template; a `REFUND` printed with its credit note names a `CUSTOMER_CREDIT` template. Left out, it is the organization's default template of that type.
86
+ - A `COLLECTION_REQUEST` may name the `DIRECT_CASH_IN_RECEIPT` template used once the request is paid. `null` (CLI `--no-parent`) removes it.
87
+ - A receipt printed with its invoice, or a refund printed with its credit note, always names one: `null` on an update is refused (422). Name another template, or leave it out to keep the current one. On a create, `null` is the same as leaving it out: the default template.
88
+ - The voucher page of a cash receipt or payment advice is not a template, so those take none.
89
+ - A named template that does not exist, or is of another type, is a 422 (upstream alone would quietly print the default instead).
90
+ - An update that leaves page order and parent out keeps both.
91
+
92
+ ## Refusals
93
+
94
+ | Status, `error_type` | When |
95
+ |---|---|
96
+ | 400 `invalid_request_body` | `templateType` sent on an update: a template's type cannot change. Create one of the other type instead. |
97
+ | 400 `unknown_field` | A field the request does not take, `isDefault` on a create among them. |
98
+ | 422 `pdf_template_locked` | A locked template (`controlFlag: true`) cannot be updated or deleted. Create a new template from it. |
99
+ | 422 `OTHER_TEMPLATE_CANNOT_BE_DEFAULT_WHEN_CUSTOM_TEMPLATE_EXIST` | The organization has a locked template of the type: no other one can be the default. |
100
+ | 422 `DUPLICATE_TEMPLATE` | The name is taken (case, and space against `_`, ignored). |
101
+ | 422 `ORGANIZATION_TEMPLATE_LIMIT_REACHED` | 100 templates of the type already. |
102
+ | 422 `validation_error` | A delete that would leave a type with no template; a bad value in the layout; a style, page order or parent the type does not take. |
103
+
104
+ ## Delete
105
+
106
+ `delete_pdf_templates` takes up to 100 templates and deletes all or none. Refused (nothing deleted) when any is not found, is locked, is the default of its type, or the batch would remove every template of a type. Clio refuses a default before anything is sent and names the others: make another template the default first (`set_default_pdf_template`). The API itself would hand the default to the most recently created remaining template, which nobody chose. Contacts assigned a deleted template print with the default again. Images uploaded for it (logo, letterhead, payment QR) are not deleted: they stay in the organization's file storage (the result says so in `images`).
107
+
108
+ ## Paging
109
+
110
+ Search pages with `limit` (default 20, max 1000) and `offset`, a 0-indexed **page** number. The default template of each type is always listed first, whatever the sort.
@@ -10,7 +10,7 @@ Measured against production on 2026-09-24. Everything below that says "measured"
10
10
 
11
11
  ## The surfaces
12
12
 
13
- Every surface uses the same eight verbs, and each takes a template by **resourceId or exact name**:
13
+ Every surface uses the same verbs, and each takes a template by **resourceId or exact name**:
14
14
 
15
15
  | Verb | MCP tool | CLI | API |
16
16
  |---|---|---|---|
@@ -23,6 +23,7 @@ Every surface uses the same eight verbs, and each takes a template by **resource
23
23
  | make default | `set_default_organization_report_template` | `clio report-templates set-default <template>` | `POST /organization-report-template/{id}/set-default` |
24
24
  | delete | `delete_organization_report_template` | `clio report-templates delete <template>` | `DELETE /organization-report-template/{id}` |
25
25
  | **render** | `download_export` with `template` | `clio exports download --template <template>` | `POST /data-exports/{type}` with `templateResourceId` |
26
+ | **render a pack** | `download_report_pack_pdf` | `clio report-templates download-pack [pack]` | `POST /generate-report-packs-pdf` |
26
27
 
27
28
  Resolve a name to its id on its own with `clio resolve report-template <name>`.
28
29
 
@@ -44,7 +45,7 @@ Resolve a name to its id on its own with `clio resolve report-template <name>`.
44
45
  | `AGED_RECEIVABLES_DETAILS` | Aged receivables, per document | `ar-details-report` | as at a date | no |
45
46
  | `AGED_PAYABLES_SUMMARY` | Aged payables | `ap-report` | as at a date | no |
46
47
  | `AGED_PAYABLES_DETAILS` | Aged payables, per document | `ap-details-report` | as at a date | no |
47
- | `REPORT_PACK` | Several reports in one document | not through the public API | range | no |
48
+ | `REPORT_PACK` | Several reports in one document | `download_report_pack_pdf` (PDF only) | range | no |
48
49
 
49
50
  - Bank balance summary and the two bank reconciliation reports have a fixed layout. No template applies to them.
50
51
  - **`framework`** takes `IAS_1`, `IFRS_18`, `GAAP`, `IND_AS` or `IFRS_SME`, and defaults to `IAS_1`.
@@ -241,11 +242,13 @@ There is no budget column.
241
242
 
242
243
  Cover and notes text may use `{{OrganizationName}}`, `{{PreparedBy}}`, `{{DateFrom}}` and `{{DateTo}}`.
243
244
 
245
+ **The API refuses a pack page the app would not write** (422, every problem at once): a type outside the five, a component without its type's config object, a page `title` under 1 character, a `position` other than `left_aligned` / `center_aligned`, contents `dotLeaders` outside `DOTS` / `DASHES` / `NONE`, and `labelLines` that are not 1 to 5 `{ label, enabled }` with at least one enabled and a label on each enabled one. A pack holds 2 to 20 components, pages included. A value the stored layout holds, sent back unchanged, is kept. **Clio adds a page as the app does**: insert `{ type: "COVER_PAGE" }` (or `TABLE_OF_CONTENTS`, `SIGNATURE_PAGE`, `APPENDIX`) and it gets an id and the app's starting settings (cover title "<pack type> Report", "Table of Contents" with dots, "Signature Page" with one "Prepared By" line, "Appendix"); settings sent beside `type` (`title`, `subtitle`, `labelLines`) go under its config key, and `labelLines` may be names (`["Director", "Secretary"]`), written as five `{ label, enabled }`. A page the pack already holds is sent as it is.
246
+
244
247
  **A pack's reports are recorded twice upstream**: in its `TEMPLATE` components and in `packTemplates`. A report missing from either renders as an error page. Clio keeps them in step with one rule:
245
248
  - **`packTemplates` decides which reports** are in the pack. Give it names or resourceIds, in order. Clio writes both places from it.
246
249
  - **The layout decides everything else**: cover page, contents, signature, styling. Change those with `edits`. Use `insert` (not `set`) to add a component.
247
250
  - **Edits that would change the reports are refused** instead of silently dropping one.
248
- - A new pack starts with its reports and nothing else. Upstream has no default pack layout.
251
+ - A new pack starts with its reports and nothing else (upstream has no default pack layout), so a pack of one report needs a page too.
249
252
  - A pack cannot contain a pack. The first pack an organization creates becomes its default pack.
250
253
 
251
254
  ```bash
@@ -271,7 +274,7 @@ clio report-templates create --name "Board pack" --type REPORT_PACK \
271
274
  | Delete the default of a report type | Refused; set another default first (the error names candidates) |
272
275
  | Delete a pack's last report | Refused by Clio. Upstream deletes it whenever the pack has any other component (a cover page, say), leaving a pack with no reports. |
273
276
  | Delete a report that is in a pack with others | Allowed. It leaves each pack; the answer lists them in `removedFromPacks`. |
274
- | Delete the default pack | Allowed. The newest remaining pack becomes default, named in `newDefault`. |
277
+ | Delete the default pack | Refused by Clio, like every default, naming the other packs: make another the default first. (The API would hand the default to the newest remaining pack.) |
275
278
  | Set default | Every export and dashboard view of that report changes, org-wide. The answer carries `previousDefault` to undo. Already default: nothing is sent. |
276
279
  | A new template straight after create | Can 404 for a moment; the read-back retries briefly |
277
280
  | Two edits to the same template at the same moment | The last write wins: upstream has no version check. Clio re-reads just before writing and re-applies its edits on anything changed since it first read, which keeps an earlier change; it cannot protect against one sent in the same instant. |
@@ -287,6 +290,13 @@ clio report-templates create --name "Board pack" --type REPORT_PACK \
287
290
 
288
291
  `fixed-assets-register` accepts a template id and ignores it.
289
292
 
293
+ **A pack renders through `download_report_pack_pdf` / `clio report-templates download-pack`**, never through an export:
294
+ - It takes the pack by name or resourceId (checked to be a `REPORT_PACK` first), or none for the default pack, and `startDate` / `endDate` (CLI `--start-date` / `--end-date`). Dates left out take the period saved on the pack; a pack saved with a custom period needs both.
295
+ - The answer is `{ data: { fileId, fileName, fileType, fileUrl }, expiresAt }`. `fileName` is the pack name plus `.pdf`; the link opens for 30 minutes.
296
+ - The PDF is built while the call waits, which can take minutes. The API ends a render still running at 5 minutes with a plain-text 503, which Clio reports as a pack too large to render (make it smaller; a retry stops at the same limit). A call that cannot wait that long (an agent tool call is cut off at 25 to 55 seconds) gets no link: `download_report_pack_pdf` then answers `rendered: false` with `whereToSee`, the report packs screen in the app, where the person downloads it. Asking again does not help, because each request renders the whole pack again from the start.
297
+ - It is sent **once**: a re-send renders the whole pack again, and a pack that failed fails the same way.
298
+ - **A section that fails to render is left out of the PDF and the call still succeeds.** The answer does not say which section; open the PDF to check.
299
+
290
300
  ### Search
291
301
 
292
302
  Upstream's search endpoint now honours `isDefault`, `reportCategory`, `resourceId`, `reportType`, `reportTypes` and `templateName` (eq, contains), but still refuses `and` / `or` and sorting by `templateName` (measured 2026-10-01), so `search_organization_report_templates` filters the full list instead. That matches because the list is every template at once. It uses the same filter grammar, plus `templateName`:
@@ -1,4 +1,4 @@
1
- # Jaz API Rules 118-161: Bulk Upserts, Reconciliation, Drafts Lifecycle, Pseudo-SQL, Payment Adjustments, Report Templates
1
+ # Jaz API Rules 118-162: Bulk Upserts, Reconciliation, Drafts Lifecycle, Pseudo-SQL, Payment Adjustments, Report Templates, Signature Profiles
2
2
 
3
3
  Part of the jaz-api skill. [SKILL.md](../SKILL.md) holds the reading order and the index of all four rule files. Rule numbers are stable: tool descriptions, `errors.md` and other skills cite them by number, and a missing number is a retired rule.
4
4
 
@@ -107,4 +107,20 @@ Part of the jaz-api skill. [SKILL.md](../SKILL.md) holds the reading order and t
107
107
 
108
108
  ### Report templates
109
109
 
110
- 161. **Report templates: the saved layout of a report, one default per report type, and packs.** Eight verbs on MCP and CLI (list, get, search, default-configuration, create, update, set-default, delete), each taking a template by **resourceId or exact name**; render one with `download_export` / `clio exports download --template <name>`. `templateConfiguration` is a JSON-encoded string on the wire; Clio hands it over as an object, never shows the server-owned `coaSnapshot` (a copy of the whole chart of accounts, up to 324 KB), and returns a large layout as a key map plus a row outline. Change part of one with `edits` (set / insert / remove by path; updateRow / addRow / removeRow / moveRow by row id), applied all or nothing and refused when they introduce a silent fault (an unknown enum value, a formula naming a missing row, a removed engine total). **Set default changes every export and dashboard view** of that report for the whole organization; the answer carries `previousDefault` to undo it. A pack's reports come from `packTemplates` (names or ids, in order), written to both places the server reads them from. Measured upstream quirks (2026-09-24): an export given a template it cannot use (unknown, or of another report type) answers **HTTP 200 with an empty body**, so Clio checks the template first; for P&L and cashflow only `IAS_1` and `IFRS_18` have a default layout (`GAAP` / `IND_AS` / `IFRS_SME` answer 422 `NO_TEMPLATE_FOUND` without one); profit-and-loss and balance-sheet saves drop keys the server does not model with no error (Clio reports them as `notSaved`); deleting a pack's last report leaves an empty pack whenever the pack has any other component (Clio refuses it); upstream search refuses `and` / `or` and name sort (Clio filters the list). Full reference: `references/report-templates.md`.
110
+ 161. **Report templates: the saved layout of a report, one default per report type, and packs.** Eight verbs on MCP and CLI (list, get, search, default-configuration, create, update, set-default, delete), each taking a template by **resourceId or exact name**; render one with `download_export` / `clio exports download --template <name>`, and a pack as one PDF with `download_report_pack_pdf` / `clio report-templates download-pack <pack>` (a 30-minute link; the render can take minutes, is sent once because every send renders the whole pack again, and leaves out a section that fails without an error). `templateConfiguration` is a JSON-encoded string on the wire; Clio hands it over as an object, never shows the server-owned `coaSnapshot` (a copy of the whole chart of accounts, up to 324 KB), and returns a large layout as a key map plus a row outline. Change part of one with `edits` (set / insert / remove by path; updateRow / addRow / removeRow / moveRow by row id), applied all or nothing and refused when they introduce a silent fault (an unknown enum value, a formula naming a missing row, a removed engine total). **Set default changes every export and dashboard view** of that report for the whole organization; the answer carries `previousDefault` to undo it. A pack's reports come from `packTemplates` (names or ids, in order), written to both places the server reads them from. Measured upstream quirks (2026-09-24): an export given a template it cannot use (unknown, or of another report type) answers **HTTP 200 with an empty body**, so Clio checks the template first; for P&L and cashflow only `IAS_1` and `IFRS_18` have a default layout (`GAAP` / `IND_AS` / `IFRS_SME` answer 422 `NO_TEMPLATE_FOUND` without one); profit-and-loss and balance-sheet saves drop keys the server does not model with no error (Clio reports them as `notSaved`); deleting a pack's last report leaves an empty pack whenever the pack has any other component (Clio refuses it); upstream search refuses `and` / `or` and name sort (Clio filters the list). Full reference: `references/report-templates.md`.
111
+
112
+ ### PDF templates
113
+
114
+ 162. **PDF templates: the print layout of each document type, one default per type.** Eight verbs on MCP and CLI (list, search, get, list styles, create, update, set default, delete), each taking a template by **resourceId or exact name**, plus `list_pdf_template_layout_settings` and `upload_template_image` on MCP, over 15 template types (invoice, credit note, receipt, refund, statement, quote, purchase order, both delivery slips, sale order, cash in, cash out, bill payment advice, payment request, payslip). The layout (`templateSettings`) is an object of ~150 to 200 values that differ by type; `list_pdf_template_layout_settings` lists every key and value a type can hold, and create and update refuse any other (422) unless the template already holds it unchanged. **The tools' `settings` is a change merged onto the whole layout**: objects merge key by key, arrays, values and `null` replace whole; update merges onto the stored layout and sends all of it, while a create sends the change and the API merges it onto the type's default template (so a create without `settings` copies it). **A new template is never the default**; `set_default_pdf_template` makes one and answers `previousDefault`. `styleCode` must be a code `list_pdf_template_styles` returns for the type (`STYLE_CODE_*`). A receipt or refund printed with its invoice or credit note names that template (`parentTemplate`, defaulting to the default one; `null` there is a 422 on update, and only a payment request's can be removed); the page order and parent are kept by an update that leaves them out. A locked template (`controlFlag`) cannot change or be deleted; a delete is all or none and never empties a type; 100 templates per type at most. A new logo, letterhead or payment QR goes up with `upload_template_image` first, which answers the `settings` that put it on a template; otherwise a changed logo or letterhead must be an image already on one of the organization's templates (its `fileId` and stored `fileUrl`, copied from `get_pdf_template`), else 422. Full reference: `references/pdf-templates.md`.
115
+
116
+ ### Email templates
117
+
118
+ 163. **Email templates: the subject, body, copied addresses and schedule of each kind of email, one default per type.** Eight verbs on MCP and CLI (`list_email_template_types`, list, search, get, create, update, set-default, delete; `clio email-templates ...`), each taking a template by **resourceId or exact name** (`templateType` picks between two types that share a name). **Write the body as `message`, plain text with one line per line and `{{placeholders}}` as written**: Clio writes it in the markup the web app's editor reads (`<div id="extract-email-body">`, one `<span>` per line) and reads it back as `message`. Raw `emailBody` HTML is accepted, but a body without that div opens in the app with an EMPTY message, and a person saving it there then wipes it. `list_email_template_types` gives each type's placeholders (a token the type does not fill is sent verbatim to the customer) and the reminder schedule keys. **`INVOICE` and `CUSTOMER_CREDIT_NOTE` emails send the `variants`** (`BALANCE_DUE` while a balance is due, `NO_BALANCE_DUE` once settled), not the template's own subject and message: change the variants; Clio refuses an update of only the template's own subject or message on those types. Only the three reminder types take `reminderSchedules`; only `COLLECTION_REQUEST` takes a receipt template (a `CASH_IN_RECEIPT` one). On update, `[]` empties the copied lists and the reminder schedule, while an empty `variants` is refused. Deactivate with `status: "INACTIVE"` (the default of a type sent with documents stays active, and an INACTIVE template of such a type cannot be made the default); the default of a type cannot be deleted. A contact can name its own template per type in its `*EmailTemplateResourceId` fields. Wire reference: jaz-api-reference `endpoints-schedules-reports.md` section 31.
119
+
120
+ ### Signature profiles (e-sign templates)
121
+
122
+ 164. **Signature profiles are the e-sign templates a sale quote or purchase request is sent for signature with; the send itself is not an API call.** Seven verbs on MCP and CLI (list, search, get, create, update, set-default, delete), each taking a profile by **resourceId or exact name**, plus `upload_signature_profile_appendix` on MCP. Sending for signature, voiding and reminding stay in the app: the send needs a session from the app's interactive signing editor. `docType` is `SALE_QUOTE` or `PURCHASE_REQUEST`, fixed at create; one default per document type, set with set-default (the answer carries `previousDefault`), and the default cannot be deleted. Signers (up to 50) sign in the order listed: `INTERNAL` takes `internalUserId`, which is the organization user's **`userResourceId`** (`search_org_users`), not its org-user `resourceId` (422 when it names no user of the organization); `EXTERNAL` takes `name` + `email`. Email bodies are **plain text** both ways (no `<`): the app stores its own HTML layout and the API hands back only the message. On update, `signers` / `ccObservers` / `defaultAppendices` replace the stored list (`[]` clears), while `reminderSchedule`, `movementAlerts` and each email change only the values sent. `defaultAppendices` are the PDFs merged after the document (up to 10, each once, in order): upload each first (`upload_signature_profile_appendix`, `POST /signature-profiles/appendices`, multipart `file`, a PDF of at most 8 MB) and pass the `{ fileId, fileName, fileType, fileUrl }` it answers as is; a file the profile already holds is kept by sending it back as the read returns it. Any other address is refused (422). `postCompletionAction` `AUTO_ACCEPT_AND_INVOICE` is quotes only and `AUTO_ACCEPT_AND_BILL` purchase requests only. Endpoint reference: jaz-api-reference `endpoints-schedules-reports.md` section 32.
123
+
124
+ ### Transaction defaults (document numbering)
125
+
126
+ 165. **Transaction defaults: what new documents of a family start from, numbering included.** `get_transaction_defaults` / `update_transaction_defaults` (`GET` / `PUT /transaction-defaults/{family}`, `clio transaction-defaults get|update <family>`). `family` is exactly `get_next_reference`'s `type` (SALE = invoices, PURCHASE = bills, both credit notes, JOURNAL_MANUAL, CLAIM, PAYRUN, SALE_QUOTE, SALE_ORDER, PURCHASE_REQUEST, PURCHASE_ORDER); fixed assets, deferrals, leases and loans have none. The update is partial at every level: send only what changes (`null` keeps a value too), and a field outside the family (`dueDateTermDays` on a credit note, `paymentSettings` outside SALE and PURCHASE, `notes` outside SALE, SALE_QUOTE, SALE_ORDER, PURCHASE_REQUEST and PURCHASE_ORDER) is a 422 naming it. `""` clears notes, internal notes, an account, the tax profile or the payment method; `currency` cannot be cleared. **Send all of a family's changes in one update**: the API's read before each write can lag behind, so back-to-back updates of a family can undo each other. The update answers with the defaults as written. The number is prefix + separator + (date when `dateInclusion` is INCLUDE) + sequence, zero padded to the length of `seriesStart`; sequence = `seriesStart` + documents already created − `seriesOffset`. **Changing `seriesStart` alone does not restart numbering**: to make the next number N, set `seriesStart` N and `seriesOffset` to `lastCounter` from `get_next_reference`. Existing documents keep their numbers; `get_next_reference` and every `autoReference` create use the new format at once. A family with no `numbering` in the read uses the built-in format and needs `prefix` + `separator` the first time.
@@ -7,18 +7,18 @@ description: >-
7
7
  precedence, output formats, entity resolution, and common workflow patterns.
8
8
  Also use when the user asks how to use clio, what commands are available, or
9
9
  how to automate accounting tasks from the command line. Covers all
10
- 80 command groups and 523 tools, including employee-expense claims.
10
+ 84 command groups and 555 tools, including employee-expense claims.
11
11
  license: MIT
12
12
  compatibility: Requires Node.js >= 18.0.0. Install via npm install -g jaz-clio.
13
13
  metadata:
14
- version: "9.11.0"
14
+ version: "9.13.0"
15
15
  ---
16
16
 
17
17
  # Clio CLI Skill
18
18
 
19
19
  > **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.
20
20
 
21
- 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), 523 tools. Also fully compatible with Juan Accounting (same API, same endpoints).
21
+ You are working with **Clio** (`jaz-clio`), the CLI for the Jaz accounting platform. 84 command groups, 13 calculators, 12 job playbooks (jaz-jobs skill), 555 tools. Also fully compatible with Juan Accounting (same API, same endpoints).
22
22
 
23
23
  ## When to Use This Skill
24
24
 
@@ -35,7 +35,7 @@ You are working with **Clio** (`jaz-clio`), the CLI for the Jaz accounting platf
35
35
  | Need | Skill |
36
36
  |------|-------|
37
37
  | CLI command syntax, flags, output | **jaz-cli** (this skill) |
38
- | API field names, error codes, 148 API rules | **jaz-api** |
38
+ | API field names, error codes, 152 API rules | **jaz-api** |
39
39
  | Endpoint request/response shapes, search filters, search enums | **jaz-api-reference** |
40
40
  | IFRS transaction recipes (depreciation, leases, loans) | **jaz-recipes** |
41
41
  | Month-end close, bank recon, GST filing workflows | **jaz-jobs** |
@@ -1,6 +1,6 @@
1
1
  # Clio Command Catalog
2
2
 
3
- Complete reference for all 80 command groups. Organized by domain.
3
+ Complete reference for all 84 command groups. Organized by domain.
4
4
 
5
5
  ---
6
6
 
@@ -17,7 +17,7 @@ Complete reference for all 80 command groups. Organized by domain.
17
17
  | `delete <id>` | |
18
18
  | `pay <id>` | `--amount`, `--transaction-amount`, `--account`, `--method`, `--ref`, `--date` |
19
19
  | `apply-credits <id>` | `--credit-note`, `--amount` |
20
- | `download <id>` | `--json`: returns the PDF URL; writes no file |
20
+ | `download <id>` | `--variant DELIVERY_SLIP` for the delivery slip, `--json`: returns the PDF URL; writes no file |
21
21
  | `draft list` | `--max-rows N`, `--ids`, `--json`: ⚠️ fans out 1 attachment lookup per draft (5 in flight); pass `--max-rows 10` for spot checks |
22
22
  | `draft finalize <id>` | `--account`, `--input` |
23
23
  | `bulk-upsert` | `--input <file>`, `--json`: **FLAT** shape, DEPRECATED (one line per row via `itemDescription`+`totalAmount`+`invoiceAccountResourceId`). Async → jobId. `currencyCode` REQUIRED |
@@ -103,10 +103,13 @@ Same subcommands and flags as `cash-in`.
103
103
  | `create` | `--from-account`, `--to-account`, `--amount`, `--date`, `--ref` (generated when omitted), `--input` |
104
104
  | `delete <id>` | |
105
105
 
106
- ### `clio payments`: Payment records (search the ledger with `clio cashflow search`)
106
+ ### `clio payments`: Payment records
107
+ Every `<id>` is a payment record ID (from an invoice or bill paymentRecords, or a credit note refund). A ledger ID from `clio cashflow search` is a different entity and 404s here.
108
+
107
109
  | Subcommand | Key flags |
108
110
  |------------|-----------|
109
111
  | `get <id>` | `--json` |
112
+ | `download <id>` | `--json`: returns the PDF URL (receipt for an invoice payment, payment advice for a bill payment, refund document for a credit note refund); writes no file |
110
113
  | `update <id>` | `--date`, `--reference`, `--input` |
111
114
  | `delete <id>` | |
112
115
 
@@ -563,7 +566,7 @@ Provisioned upstream; no create/update/delete exists.
563
566
 
564
567
  `roleCodes` is the column that matters: a module can be enabled and still deny the caller, because access is per role. "The module is on" and "I can use it" are different questions.
565
568
 
566
- ### `clio report-templates`: Report layouts and report packs (8 tools)
569
+ ### `clio report-templates`: Report layouts and report packs (9 tools)
567
570
  The saved layout of each report (title, fonts, rows, columns, period), one default per report type, and packs that bundle several reports into one document. Every command that takes `<template>` accepts its resourceId or exact name. Full reference: the api skill's `references/report-templates.md`.
568
571
 
569
572
  | Subcommand | Key flags |
@@ -576,6 +579,7 @@ The saved layout of each report (title, fonts, rows, columns, period), one defau
576
579
  | `update <template>` | `--name`; layout flags below; `--report <template>` (repeat: replaces a pack's reports) |
577
580
  | `set-default <template>` | Makes it the default for every export and dashboard view of that report; prints the undo |
578
581
  | `delete <template>` | Refused for a type's default and a pack's last report |
582
+ | `download-pack [pack]` | Renders a pack (default: the default pack) as one PDF and prints a 30-minute link; `--start-date`, `--end-date` (default: the pack's saved period). Can take minutes; a section that fails is left out of the PDF |
579
583
 
580
584
  Layout flags on `create` / `update`:
581
585
  - `--set path=value`: change one value; the value is read as JSON when it parses, else as text (repeatable).
@@ -589,11 +593,89 @@ clio report-templates create --name "Board P&L" --type PROFIT_AND_LOSS --set pdf
589
593
  clio report-templates update "Board P&L" --set colorTheme=calm
590
594
  clio report-templates create --name "Board pack" --type REPORT_PACK --report "Board P&L" --report "Standard Balance Sheet"
591
595
  clio exports download --type profit-and-loss --format PDF --start-date 2026-01-01 --end-date 2026-06-30 --template "Board P&L"
596
+ clio report-templates download-pack "Board pack" --start-date 2026-10-01 --end-date 2026-10-31
592
597
  clio report-templates set-default "Board P&L"
593
598
  ```
594
599
 
595
600
  `list` and `search` return summaries without layouts (`configurationChars` gives each layout's size); `get` returns the layout as an object without the server-owned `coaSnapshot`. Search runs over the full list, so every filter works, `--name` included (upstream's own search refuses `and` / `or` and sorting by name). A write prints what the server did not keep, if anything (`notSaved`): profit-and-loss and balance-sheet layouts drop keys the server does not model.
596
601
 
602
+ ### `clio pdf-templates`: Print layouts of documents (8 tools)
603
+ The PDF layout of each document type (invoice, credit note, receipt, refund, statement, quote, purchase order, delivery slips, sale order, cash in / out, bill payment advice, payment request, payslip), one default per type. Every command that takes `<template>` accepts its resourceId or exact name (`--type` narrows a name several types use). Full reference: the api skill's `references/pdf-templates.md`.
604
+
605
+ | Subcommand | Key flags |
606
+ |------------|-----------|
607
+ | `list` | `--type <T>`, `--json`, `--format` |
608
+ | `search` | `--name`, `--type`, `--default`, `--style`, `--page-order`, `--filter`, `--sort`, `--limit`, `--offset` (a page) |
609
+ | `get <template>` | `--settings-out <file>` (the whole layout), `--json` |
610
+ | `styles` | `--type <T>` (required): the style codes the type takes |
611
+ | `create` | `--type`, `--name` (required); layout flags below; `--style`, `--page-order`, `--parent <template>` |
612
+ | `update <template>` | `--name`; layout flags below; `--style`, `--page-order`, `--parent <template>` or `--no-parent` |
613
+ | `set-default <template>` | Makes it its type's default; prints the undo |
614
+ | `delete <template...>` | All or none; refused for a locked template and the last of a type |
615
+
616
+ Layout flags on `create` / `update` are CHANGES, merged onto the whole layout (the stored one on update, the type's default template on create): objects merge key by key, arrays and values replace whole.
617
+ - `--set path=value`: change one value; the value is read as JSON when it parses, else as text (repeatable).
618
+ - `--settings-file <file>`: a JSON object of changes (a whole layout from `get --settings-out` works too).
619
+
620
+ ```bash
621
+ clio pdf-templates list --type INVOICE
622
+ clio pdf-templates update "Standard Invoice" --set colorTheme=calm --set documentTitle.title="Tax Invoice"
623
+ clio pdf-templates create --type INVOICE --name "Invoice with bank details" --set footerConfigs.enablePaymentsSection=true
624
+ clio pdf-templates set-default "Invoice with bank details"
625
+ clio pdf-templates update "Receipt" --page-order RECEIPT_FOLLOWED_BY_INVOICE --parent "Standard Invoice"
626
+ ```
627
+
628
+ ### `clio email-templates`: The emails sent with documents, and reminders and statements (8 tools)
629
+ The subject, message, copied addresses and (for reminders) schedule of each kind of email, one default per type. Every command that takes `<template>` accepts its resourceId or exact name; `--type` picks between two types that share a name. Rule 163 in the api skill has the details.
630
+
631
+ | Subcommand | Key flags |
632
+ |------------|-----------|
633
+ | `types` | `--type <T>`: the placeholders each type fills and its reminder schedule keys and values |
634
+ | `list` | `--limit` (max 100), `--offset`, `--format`: no bodies |
635
+ | `search` | `--name`, `--type`, `--status`, `--default`, `--filter`, `--sort`, `--order`, `--limit` (max 100), `--offset` |
636
+ | `get <template>` | `--type`, `--html` (each body as HTML too), `--json` |
637
+ | `create` | `--type`, `--name`, `--subject` (required); message flags below |
638
+ | `update <template>` | `--type`, `--name`, `--status ACTIVE\|INACTIVE`, `--no-cc` / `--no-additional-cc` / `--no-reminder` (empty that list); message flags below |
639
+ | `set-default <template>` | Makes it the default for its type; prints the undo. Refused for an INACTIVE template of a type sent with documents |
640
+ | `delete <template>` | Refused for a type's default |
641
+
642
+ Message flags on `create` / `update`:
643
+ - `--message <text>` or `--message-file <file>`: the email text, one line per line, `{{placeholders}}` as written. Written in the markup the web app's editor reads, so the template stays editable there.
644
+ - `--body-file <file>`: the body as HTML, sent as is, instead.
645
+ - `--subject`, `--currency-format`, `--cc <email>` (organization users), `--additional-cc "Name <email>"`, `--reminder KEY[=VALUE]` (each repeatable; a list replaces the stored one), `--receipt-template <template>` (collection requests).
646
+ - `--variants-file <file>`: invoices and credit notes, a JSON list of `{ paymentState, emailSubject, message }`. Their emails send these, not the template's own subject and message.
647
+
648
+ ```bash
649
+ clio email-templates types --type INVOICE_PAYMENT_REMINDER
650
+ clio email-templates create --type INVOICE_PAYMENT_REMINDER --name "Gentle nudge" --subject "{{invoiceReference}} is due soon" --message-file nudge.txt --reminder BEFORE_DUE_DATE=3 --reminder ON_DUE_DATE
651
+ clio email-templates update "Gentle nudge" --status INACTIVE
652
+ clio email-templates set-default "Gentle nudge"
653
+ ```
654
+
655
+ ### `clio signature-profiles`: E-sign templates for quotes and purchase requests (7 tools)
656
+ Who signs a sale quote or purchase request, the invitation, reminder and completion emails, the reminder schedule, expiry and what happens once everyone signed; one default per document type. Every command that takes `<profile>` accepts its resourceId or exact name. Sending a document for signature is done in the app, not here. Rules: the api skill's rule 164.
657
+
658
+ | Subcommand | Key flags |
659
+ |------------|-----------|
660
+ | `list` | `--doc-type SALE_QUOTE\|PURCHASE_REQUEST`, `--json`, `--format` |
661
+ | `get <profile>` | `--json` (emails included) |
662
+ | `search` | `--name`, `--doc-type`, `--filter`, `--sort`, `--order`, paging flags |
663
+ | `create` | `--doc-type`, `--name`, `--invitation-subject`, `--invitation-body` (all needed); `--default`; profile flags below |
664
+ | `update <profile>` | profile flags below; fields left out keep theirs |
665
+ | `set-default <profile>` | Makes it its document type's default; prints the undo |
666
+ | `delete <profile>` | Refused for a document type's default |
667
+
668
+ Profile flags on `create` / `update`: `--input <file>` (the API body as JSON, for schedules and alerts; flags are set on top), `--description`, `--expiry-days`, `--on-expiry`, `--post-completion`, `--signer EXTERNAL:Name:email[:role]` or `--signer INTERNAL:userResourceId[:role]` (repeat, in signing order; replaces the signers), `--cc <email>` (repeat), `--reminder-subject` / `--reminder-body`, `--completion-subject` / `--completion-body`.
669
+
670
+ ```bash
671
+ clio org-users search --email ann@ --json # an internal signer's userResourceId
672
+ clio signature-profiles create --doc-type SALE_QUOTE --name "Large quotes" \
673
+ --signer "EXTERNAL:Jane Tan:jane@example.com" --signer "INTERNAL:<userResourceId>:Director" \
674
+ --invitation-subject "{{senderName}} has sent you a document to sign" --invitation-body "Please sign by {{expiryDate}}."
675
+ clio signature-profiles update "Large quotes" --post-completion AUTO_ACCEPT_AND_INVOICE
676
+ clio signature-profiles set-default "Large quotes"
677
+ ```
678
+
597
679
  ### `clio pseudo-sql` (alias: `sql`): Read-only SQL over the curated reporting tables (6 tools)
598
680
  A restricted SQL subset against Jaz's curated reporting schema, **not** the customer's database. SELECT only, single statement, 16384-char cap; the engine rejects DML, so there is no write verb.
599
681
 
@@ -829,6 +911,12 @@ Batch create via `--input` file or stdin (`{ "entries": [...] }`, 1-100 per call
829
911
  |------------|-----------|
830
912
  | `next` | `--type` (SALE, SALE_CREDIT_NOTE, PURCHASE, PURCHASE_CREDIT_NOTE, FIXED_ASSET, JOURNAL_MANUAL, SALE_QUOTE, SALE_ORDER, PURCHASE_REQUEST, PURCHASE_ORDER, CLAIM), `--json`. Reading does not reserve the number; to number a create, pass the create command its own auto-ref flag |
831
913
 
914
+ ### `clio transaction-defaults`: Numbering format and defaults per family
915
+ | Subcommand | Key flags |
916
+ |------------|-----------|
917
+ | `get <family>` | `--json`. `<family>` takes the `references next --type` values that have defaults: SALE, SALE_CREDIT_NOTE, PURCHASE, PURCHASE_CREDIT_NOTE, JOURNAL_MANUAL, CLAIM, PAYRUN, SALE_QUOTE, SALE_ORDER, PURCHASE_REQUEST, PURCHASE_ORDER |
918
+ | `update <family>` | `--prefix`, `--separator`, `--date-inclusion`, `--series-start`, `--series-offset`, `--currency`, `--due-days`, `--notes`, `--internal-notes`, `--input` (any other field as JSON), `--json`. Only what is sent changes, and `""` clears a note; put all of a family's changes in one command (back-to-back updates can undo each other); check the new format with `references next --type <family>` |
919
+
832
920
  ### `clio org-users`: User management
833
921
  | Subcommand | Key flags |
834
922
  |------------|-----------|
@@ -878,7 +966,7 @@ Valid entity types: INVOICE, BILL, CUSTOMER_CREDIT_NOTE, SUPPLIER_CREDIT_NOTE, S
878
966
  Universal async tracker: any operation returning a jobId (contacts bulk-upsert, items bulk-upsert, bank import, magic processing) can be polled here.
879
967
 
880
968
  ### `clio mcp`: MCP stdio server
881
- Starts an MCP server for Claude Code / AI tool integration. Exposes all 523 operations.
969
+ Starts an MCP server for Claude Code / AI tool integration. Exposes all 555 operations.
882
970
 
883
971
  ### `clio init`: Skill installer
884
972
  Installs AI agent skills into your project.
@@ -9,7 +9,7 @@ description: >-
9
9
  import, or switching accounting software, whenever a customer's prior system
10
10
  is Xero, QuickBooks, Sage, MYOB, or an Excel-based ledger.
11
11
  metadata:
12
- version: "9.11.0"
12
+ version: "9.13.0"
13
13
  ---
14
14
 
15
15
  # Jaz Conversion Skill
@@ -16,7 +16,7 @@ description: >-
16
16
  license: MIT
17
17
  compatibility: Uses Jaz OAuth by default; organization API keys remain supported. Works with Claude Code, Google Antigravity, OpenAI Codex, GitHub Copilot, Cursor, and any agent that reads markdown. Load the jaz-api skill alongside this one.
18
18
  metadata:
19
- version: "9.11.0"
19
+ version: "9.13.0"
20
20
  ---
21
21
 
22
22
  # Jaz API Reference Skill
@@ -26,7 +26,7 @@ The lookup half of the Jaz REST API docs: what each endpoint takes and returns,
26
26
  The **jaz-api** skill holds the rest: the numbered rules (production gotchas), the error catalog, the field name mapping, resource creation order, orders, claims and report templates. Read its rules before writing a request; these pages show the wire, the rules say where it bites.
27
27
 
28
28
  - A rule cited here ("rule 107", "SKILL.md rule 107") is a jaz-api rule. The Rule Index in jaz-api's `SKILL.md` names the file that holds it.
29
- - A file named here without a link (`field-map.md`, `errors.md`, `feature-glossary.md`, `orders.md`, `report-templates.md`, `rules-*.md`) is in jaz-api's `references/`.
29
+ - A file named here without a link (`field-map.md`, `errors.md`, `feature-glossary.md`, `orders.md`, `report-templates.md`, `pdf-templates.md`, `rules-*.md`) is in jaz-api's `references/`.
30
30
  - Inside an MCP host or with the `clio` CLI, call the tools or commands; read these pages for context. Write raw HTTP from them only for a direct integration.
31
31
 
32
32
  ## Files
@@ -37,7 +37,7 @@ The **jaz-api** skill holds the rest: the numbered rules (production gotchas), t
37
37
  | [references/endpoints-master-data.md](references/endpoints-master-data.md) | Organization, chart of accounts, tax profiles, currencies and rates, contacts, items, tags, custom fields, inventory items and balances, contact groups, bookmarks, catalogs, nano classifiers |
38
38
  | [references/endpoints-transactions.md](references/endpoints-transactions.md) | Invoices, bills, journals, cash entries, payments and payment records, credit notes and refunds, cash transfers, attachments, transfer trial balance, approvals, jots, unapplied payments, comments and notifications |
39
39
  | [references/endpoints-banking-magic.md](references/endpoints-banking-magic.md) | Jaz Magic extraction, bank records, the cashflow ledger search, deposits, bank rules |
40
- | [references/endpoints-schedules-reports.md](references/endpoints-schedules-reports.md) | Schedulers, subscriptions, reports, export records, report templates |
40
+ | [references/endpoints-schedules-reports.md](references/endpoints-schedules-reports.md) | Schedulers, subscriptions, reports, export records, report templates, PDF templates, email templates |
41
41
  | [references/endpoints-assets-payroll.md](references/endpoints-assets-payroll.md) | Fixed assets, deferrals, leases, loans, payrun settings and employee pay |
42
42
  | [references/endpoints-bulk-edits.md](references/endpoints-bulk-edits.md) | Quick Fix (with the generated per-entity field lists), Ledger Find & Fix, contacts bulk upsert, background jobs |
43
43
  | [references/full-api-surface.md](references/full-api-surface.md) | Endpoint catalog by resource (about 200 paths, more than the examples cover), limits, platform features that change API behavior |