jaz-clio 9.9.1 → 9.10.1

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.
@@ -9,11 +9,12 @@ description: >-
9
9
  schedulers, subscriptions, attachments, claim settings, and Jaz Magic extraction. Also use
10
10
  when building API clients, seeding test data, or adding new endpoint support.
11
11
  Request/response examples, the endpoint catalog, and the search filter, syntax
12
- and enum reference are in the jaz-api-reference skill: load it alongside.
12
+ and enum reference are in the jaz-api-reference skill: load it when the task
13
+ needs one of those.
13
14
  license: MIT
14
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.
15
16
  metadata:
16
- version: "9.9.1"
17
+ version: "9.10.1"
17
18
  ---
18
19
 
19
20
  # Jaz API Skill
@@ -30,13 +31,49 @@ Prefer the configured OAuth connection. Local CLI/MCP shares `clio auth login`;
30
31
 
31
32
  The rest of this skill (field names, gotchas, error catalog, dependency order, search filter syntax) applies regardless of invocation path. Read it for *context*, not for HTTP-call construction unless you're in the third bucket.
32
33
 
33
- ## Reading Order
34
-
35
- Numbers are rule numbers; the [Rule Index](#rule-index) below names the file that holds each one.
36
-
37
- **Core fundamentals (read first, every integration):** Identifiers & Dates 1 to 3; Names & Fields 9 to 13; Transaction Creation 14 to 16; Chart of Accounts 17 to 22; Payments / Cross-Currency 4 to 8; Journals & Cash 23 to 26; Credit Notes & Refunds 27 to 28; Reports 36 to 37; Tax Profile Scoping 100; Transaction References 104; Draft Finalization Pipeline 81 to 88; Jaz Magic / PDF-JPG 57 to 63; Currency Rates 39, 49, 105; Withholding Tax 45, 98.
38
-
39
- **Integration depth (API clients, pipelines, batch jobs, MCP/CLI):** Bulk Upsert (Items/Contacts/Rates); Background Jobs (filter `resourceId` not `jobId`); Export Records; Pagination (38); Search & Filter (50 to 56); Response Shape Gotchas (66 to 73); Cash Entry Response Shape (74 to 77); Entity Resolution (78 to 80); Bank Rules (89 to 90d); Fixed Assets (91 to 92c); Subscriptions & Scheduled (93 to 94); niche endpoints (95 to 102); Journals balance (103); Quick Fix (107, 111); TTB (108); Dynamic Strings (109 to 110); Sub-Resource Shapes (112); Nano-Classifier (113); Scheduler Asymmetry (114); Payment Record CRUD (115 to 117); Bulk Upserts transactions (118 to 122); Reconciliation write-side (123 to 127); Drafts lifecycle (128 to 135); Orders: Sale Quotes / Sale Orders / Purchase Requests / Purchase Orders (`references/orders.md`); Claims: records / lifecycle / bulk + conversion + payouts + Employees + Claim Settings (`references/claims.md`); Report templates and packs (161, `references/report-templates.md`).
34
+ ## Core contract
35
+
36
+ These facts settle most requests without opening another file. The number after each is its rule; open the rule only for its edge cases.
37
+
38
+ **Every request**
39
+ - IDs are `resourceId`, never `id`; a reference to another record is `<resource>ResourceId` (1).
40
+ - Transaction dates are `valueDate`, never `issueDate`, `invoiceDate` or `date`. Request dates are `YYYY-MM-DD` strings (2, 3); response dates come back as epoch milliseconds (52).
41
+ - Line item text is `name`, not `description`. The document number is `reference` (9, 13).
42
+
43
+ **Creating and finalizing**
44
+ - Raw REST: omitting `saveAsDraft` creates a FINALIZED record, while the MCP and CLI tools default to a draft, so send it explicitly (14). With `saveAsDraft: false`, every line item needs `accountResourceId` (15).
45
+ - A foreign-currency invoice, bill, credit note or journal takes `currency: { sourceCurrency: "USD", exchangeRate? }`. A `currencyCode` string is silently ignored and a `currency` string is a 400 (25).
46
+ - A create answers only `{ resourceId }`; GET the record for anything else (68). A cash in, cash out or cash transfer create answers its `parentEntityResourceId`, the ID that DELETE and PUT take (74).
47
+ - A draft is finalized by one PUT with `saveAsDraft: false` and `resourceId` in the body (83, 85). Finalized invoices and bills are `UNPAID`, then `PARTIALLY_PAID` and `PAID`; journals are `ACTIVE`. No resource has a `FINALIZED` or `POSTED` status, and `OVERDUE` is not a status either: find overdue documents with `status in [UNPAID, PARTIALLY_PAID]` plus `dueDate lt <today in the organization's timezone>` (67).
48
+ - Journals carry `journalEntries` with `amount` and `type: "DEBIT" | "CREDIT"` (23). Payments go in `{ payments: [...] }`, each with `paymentAmount` (bank currency), `transactionAmount` (document currency), `accountResourceId`, `paymentMethod`, `reference` and `valueDate` (4, 7, 8). Credit notes are applied through a `credits` array with `amountApplied` (27).
49
+
50
+ **Lists and search**
51
+ - A search body is `{ filter?, sort: { sortBy: ["field"], order: "ASC" | "DESC" }, limit: 1-1000, offset }`. `sortBy` is always an array, and `sort` is required whenever `offset` is sent, even `offset: 0` (43, 50).
52
+ - `offset` is a 0-indexed PAGE number, not a row skip: `offset: 1` is the second page of `limit` rows. A few report and ledger reads take a row offset instead (38).
53
+ - A filter is `{ "<field>": { "<operator>": value } }`, and each field type accepts a fixed set of operators; any other is a 400 (51). Which fields an endpoint filters and sorts on, and the values an enum field accepts, are in jaz-api-reference.
54
+ - List and search responses are `{ totalElements, totalPages, data: [...] }` (54).
55
+
56
+ ## Where to look
57
+
58
+ Open only what the task needs, and open the files it names together rather than one at a time. Read the matching section whole rather than searching for fragments: the required fields and refusals sit in the lines under each example. Load the **jaz-api-reference** skill only for an endpoint's exact request and response, the endpoint catalog, or a search field's filters and values; the files in the middle column are in its `references/`.
59
+
60
+ The rules column names each rule file with the rule numbers that apply to the task.
61
+
62
+ | Task | Request and response (jaz-api-reference) | Rules (this skill's `references/`) |
63
+ |------|------------------------------------------|------------------------------------|
64
+ | Create, update, finalize or pay an invoice, bill, credit note, journal, cash entry or cash transfer | `endpoints-transactions.md` | `rules-fundamentals.md` 1-16, 23-28, 31, 40-41, 45, 47-48; `rules-search-magic-shapes.md` 64, 67-70, 74-77, 80-88; `rules-entities-quick-fix.md` 98, 101-104, 108, 112, 115-116 |
65
+ | Search, filter, sort or page | `search-reference.md` (fields per endpoint), `search-enums.md` (values), `search-syntax.md` (a `query` string) | `rules-fundamentals.md` 38, 43; `rules-search-magic-shapes.md` 50-56, 65 |
66
+ | Contacts, items, chart of accounts, tax profiles, currencies and rates, tags, custom fields, contact groups, inventory, bookmarks, catalogs, nano classifiers | `endpoints-master-data.md` | `rules-fundamentals.md` 10-12, 16-22, 29-30, 34-35e, 39, 46-47, 49; `rules-search-magic-shapes.md` 66, 71-73, 78; `rules-entities-quick-fix.md` 96-97, 99-100, 105-106, 113; `rules-bulk-recon-drafts.md` 136-137c, 140-141 |
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
+ | Reconciliation, drafts lifecycle, transaction bulk upserts | `full-api-surface.md` (catalog) | `rules-bulk-recon-drafts.md` 118-135, 158-160 |
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
+ | 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
+ | 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
+ | An error code or message | | `errors.md` |
73
+ | A field name that is easy to guess wrong | | `field-map.md` |
74
+ | Sale quotes and orders, purchase requests and orders, expense claims | | `orders.md`, `claims.md` |
75
+
76
+ A rule number cited anywhere resolves through the [Rule Index](#rule-index) below.
40
77
 
41
78
  ## When to Use This Skill
42
79
 
@@ -150,11 +150,20 @@ Turn APPROVED claims into journal entries, and record books-only employee payout
150
150
 
151
151
  ## Employees (`employees` namespace)
152
152
 
153
- The expense-claim members. CLI: `clio employees …`. `list = search_employees` (no
154
- bare list endpoint).
155
-
156
- - **`add_employee`**: **`name` and `claimProfileResourceId` are required** (without a
157
- profile: `422 EMPLOYEE_CLAIM_PROFILE_REQUIRED`). `userResourceId` is optional: omit it
153
+ Claims members and payrun employees. CLI: `clio employees`. `list = search_employees`
154
+ (no bare list endpoint).
155
+
156
+ - **Eligibility.** Each employee has **Eligible for Claims** (`isEligibleClaims`) and **Eligible for
157
+ Payruns** (`isEligiblePayruns`); at least one is on. Only claims-eligible employees can be given
158
+ claims or advances, and only payruns-eligible ones can be put in a payrun. Both flags are returned
159
+ by `get_employee` / `search_employees` / `search_employee_balances` and filter as `{"isEligiblePayruns": {"eq": true}}`.
160
+ For a claim or advance picker search `isEligibleClaims` true; for a payrun, `isEligiblePayruns` true.
161
+ Turning one off while in use is refused (see errors.md); turning Claims off keeps the claim profile.
162
+ `update_employee` with a flag left out changes nothing.
163
+ - **`add_employee`**: **`name` is required.** Eligible for Claims needs `claimProfileResourceId`
164
+ (on by default when one is given; without a profile: `422 EMPLOYEE_CLAIM_PROFILE_REQUIRED`).
165
+ Eligible for Payruns is off unless `isEligiblePayruns` is true. A payroll-only employee is
166
+ created with `isEligiblePayruns: true` and no profile. `userResourceId` is optional: omit it
158
167
  for an offline employee with no login. **`userResourceId` is the user's resourceId:
159
168
  read it as the `userResourceId` FIELD on an org-user (`search_org_users`), NOT the
160
169
  org-user record's own `resourceId`; passing the membership id returns
@@ -944,8 +944,36 @@ Two of the seven never reach you through this path: a zero `adjustmentValue` and
944
944
  **Fix**: Use `search_org_users` and read the member's **`userResourceId`** field (not the org-user record's `resourceId`), then retry. Each user links to at most one employee per org. To move a link, relink with `update_employee` `userResourceId` or unlink with `clearFields: ["userResourceId"]`.
945
945
 
946
946
  ### "EMPLOYEE_CLAIM_PROFILE_REQUIRED" (422)
947
- **Cause**: `add_employee` was called without `claimProfileResourceId` ("A claim profile is required for an employee — it carries the employee balance account used to convert and pay claims"). The claim profile is **server-required**; the org default is NOT auto-applied for employees (unlike claims), even when a default profile exists.
948
- **Fix**: Pick a profile via `search_claim_profiles` and pass its `resourceId` as `claimProfileResourceId`. The profile is locked while the employee has unsettled claims.
947
+ **Cause**: An employee with Eligible for Claims on has no claim profile ("An employee eligible for claims needs a claim profile"): `add_employee` with a profile left out and `isEligibleClaims` true, or `update_employee` turning Claims on or removing the profile while it is on. The org default is NOT auto-applied for employees (unlike claims). A profile is needed only while Claims is on.
948
+ **Fix**: Pick a profile via `search_claim_profiles` and pass its `resourceId` as `claimProfileResourceId`. For a payroll-only employee, leave Claims off and send `isEligiblePayruns: true` instead. The profile is locked while the employee has unsettled claims.
949
+
950
+ ### "EMPLOYEE_ELIGIBILITY_REQUIRED" (422)
951
+ **Cause**: The save would leave both Eligible for Claims and Eligible for Payruns off ("Turn on Eligible for Claims, Eligible for Payruns or both"). `add_employee` with no profile and no `isEligiblePayruns` lands here.
952
+ **Fix**: Set `isEligiblePayruns: true`, or give a claim profile for Claims.
953
+
954
+ ### "EMPLOYEE_PAYRUNS_ELIGIBILITY_LOCKED" (422)
955
+ **Cause**: `update_employee` turned Eligible for Payruns off while the employee is in a draft payrun ("The employee is in 1 draft payrun. Remove them from it before turning off Eligible for Payruns.").
956
+ **Fix**: Remove the employee from the draft payrun (`remove_payrun_employees`), then retry. Relay the message as is.
957
+
958
+ ### "EMPLOYEE_CLAIMS_ELIGIBILITY_LOCKED" (422)
959
+ **Cause**: `update_employee` turned Eligible for Claims off while a claim awaits approval or posting, or a claims balance is left (owed, or an advance not yet claimed). The message names everything open ("The employee is still owed SGD 45.00 in claims. Record a payout for the balance before turning off Eligible for Claims.").
960
+ **Fix**: Settle what the message names (approve or reject the claim, record the payout), then retry. Relay the message as is.
961
+
962
+ ### "EMPLOYEE_SETTLEMENT_CHECK_UNAVAILABLE" (422)
963
+ **Cause**: The claim balance could not be verified right now ("Could not verify this employee's claim balance right now, please try again"). Nothing changed.
964
+ **Fix**: Retry the same `update_employee` later.
965
+
966
+ ### "CLAIM_EMPLOYEE_NOT_ELIGIBLE" (422)
967
+ **Cause**: A claim or advance was created, moved, submitted or paid out for an employee who is not eligible for claims ("Jane Lim is not eligible for claims").
968
+ **Fix**: Pick the employee with `search_employees` `isEligibleClaims` true, or turn Eligible for Claims on with `update_employee` (ask the user first).
969
+
970
+ ### "PAYRUN_EMPLOYEE_NOT_ELIGIBLE" (422)
971
+ **Cause**: `add_payrun_employees` named an employee who is not eligible for payruns ("Raj Kumar is not eligible for payruns"). Fill and create-with-populate skip such employees silently.
972
+ **Fix**: Pick the employee with `search_employees` `isEligiblePayruns` true, or turn Eligible for Payruns on with `update_employee` (ask the user first).
973
+
974
+ ### "EMPLOYEE_IMPORT_ELIGIBILITY_REQUIRED" / "EMPLOYEE_IMPORT_ELIGIBILITY_INVALID" (preprocess row error)
975
+ **Cause**: A `preprocess_employees_file` row has no Eligible For value ("Choose Claims, Payruns or Both in Eligible For") or an unknown one ("Use Claims, Payruns or Both, or leave it blank"). Blank is allowed on an existing employee only.
976
+ **Fix**: Set the Eligible For column to Claims, Payruns or Both. If the file has no such column, download the template again. A JSON create row that ends with both flags off is refused whole with `EMPLOYEE_IMPORT_VALIDATION_FAILED`.
949
977
 
950
978
  ### "DUPLICATE_REPORT_TEMPLATE_EXISTS" (422)
951
979
  **Cause**: A report template of the same report type already has this name. Names are unique per report type, ignoring case and treating space and `_` alike ("My P&L" and "my_p&l" collide); the same name on another report type is fine.
@@ -11,7 +11,7 @@ description: >-
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.9.1"
14
+ version: "9.10.1"
15
15
  ---
16
16
 
17
17
  # Clio CLI Skill
@@ -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.9.1"
12
+ version: "9.10.1"
13
13
  ---
14
14
 
15
15
  # Jaz Conversion Skill
@@ -11,11 +11,12 @@ description: >-
11
11
  for each filter field. Load it when building or debugging a request body,
12
12
  checking whether an endpoint exists, writing a search filter, or confirming
13
13
  an enum value. The numbered API rules, error catalog, and field name mapping
14
- live in the jaz-api skill: load both together.
14
+ live in the jaz-api skill: load it with this one, since its core contract
15
+ holds the rules most requests need (statuses, paging, IDs).
15
16
  license: MIT
16
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.
17
18
  metadata:
18
- version: "9.9.1"
19
+ version: "9.10.1"
19
20
  ---
20
21
 
21
22
  # Jaz API Reference Skill
@@ -10,7 +10,7 @@ description: >-
10
10
  license: MIT
11
11
  compatibility: Works with Claude Code, Codex CLI, Cursor, Copilot, Claude Cowork, Claude.ai, and any agent that reads markdown. Multi-organization workflows need the `clio` CLI (`npm i -g jaz-clio`); a single organization works through MCP tools alone. Load alongside jaz-jobs for close playbooks, jaz-recipes for IFRS patterns, jaz-api for payload shapes, jaz-conversion for migrations.
12
12
  metadata:
13
- version: "9.9.1"
13
+ version: "9.10.1"
14
14
  ---
15
15
 
16
16
  # Jaz Kit
@@ -13,7 +13,7 @@ description: >-
13
13
  license: MIT
14
14
  compatibility: Works with Claude Code, Claude Cowork, Claude.ai, and any agent that reads markdown. For canonical report types and the standard analytics surface, load the jaz-api skill alongside this one.
15
15
  metadata:
16
- version: "9.9.1"
16
+ version: "9.10.1"
17
17
  ---
18
18
 
19
19
  # Jaz Pseudo-SQL Skill
@@ -40,7 +40,7 @@ Don't write a pseudo-SQL query from memory. The catalog grows; column names chan
40
40
 
41
41
  | Use this instead | When |
42
42
  |---|---|
43
- | `download_export(exportType='analysis-anomalous-invoices')` etc. | Canonical anomaly / audit / risk reports; they're tuned, parameterized, and faster than re-deriving them in SQL. See jaz-api Rule 141. |
43
+ | `download_export(exportType='analysis-anomalous-invoices')` etc. | Canonical anomaly / audit / risk reports; they're tuned, parameterized, and faster than re-deriving them in SQL. |
44
44
  | `download_export(exportType='trial-balance')` etc. | Statements (TB, BS, P&L, GL, cashflow). The reporting engine handles period closing rules, intercompany eliminations, FX revaluation. SQL would miss these. |
45
45
  | `search_invoices(filter:...)`, `search_bills`, etc. | Listing entities with structured filters. Returns typed objects, supports pagination, faster than SQL. |
46
46
  | `get_invoice(resourceId)` etc. | Single-entity lookup by ID. |
@@ -76,7 +76,7 @@ The pre-terminal states are `PENDING` and `RUNNING`; these are normal during pol
76
76
 
77
77
  If you hit `PSEUDOSQL_VALIDATION_ERROR: unknown table` repeatedly, the underlying data isn't in the curated schema:
78
78
 
79
- - For canonical analytics reports → `download_export(exportType=...)`. See jaz-api Rule 141.
79
+ - For canonical analytics reports → `download_export(exportType=...)`.
80
80
  - For raw entity dumps (e.g., every invoice as a row) → `export_records`.
81
81
  - For one-off entity lookups → `get_invoice` / `get_bill` / etc.
82
82
  - For filtered listings with structured criteria → `search_invoices` / `search_bills` / etc.
@@ -10,7 +10,7 @@ description: >-
10
10
  license: MIT
11
11
  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.
12
12
  metadata:
13
- version: "9.9.1"
13
+ version: "9.10.1"
14
14
  ---
15
15
 
16
16
  # Jobs Skill
@@ -13,7 +13,7 @@ description: >-
13
13
  license: MIT
14
14
  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. For the operational close workflows these recipes plug into (month-end close, GST/VAT filing, year-end close), load the jaz-jobs skill.
15
15
  metadata:
16
- version: "9.9.1"
16
+ version: "9.10.1"
17
17
  ---
18
18
 
19
19
  # Transaction Recipes Skill