jaz-clio 5.16.0 → 5.16.2
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 -6
- package/assets/skills/api/references/feature-glossary.md +2 -2
- package/assets/skills/api/references/full-api-surface.md +0 -21
- package/assets/skills/cli/SKILL.md +1 -1
- package/assets/skills/conversion/SKILL.md +1 -1
- package/assets/skills/jaz-pseudo-sql/SKILL.md +1 -1
- package/assets/skills/jobs/SKILL.md +1 -1
- package/assets/skills/transaction-recipes/SKILL.md +1 -1
- package/cli.mjs +5 -5
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: jaz-api
|
|
3
|
-
version: 5.16.
|
|
3
|
+
version: 5.16.2
|
|
4
4
|
description: >-
|
|
5
5
|
Use this skill whenever you call, debug, or review code that touches the Jaz
|
|
6
6
|
REST API. Covers field names, response shapes, 141 production gotchas, error
|
|
@@ -196,8 +196,7 @@ The rest of this skill — field names, gotchas, error catalog, dependency order
|
|
|
196
196
|
60. **Response maps transaction types**: Request `INVOICE` → response `SALE`. Request `BILL` → response `PURCHASE`. Request `CUSTOMER_CREDIT_NOTE` → response `SALE_CREDIT_NOTE`. Request `SUPPLIER_CREDIT_NOTE` → response `PURCHASE_CREDIT_NOTE`. S3 paths follow the response type. The response `validFiles[]` array contains `workflowResourceId` for tracking extraction progress via `POST /magic/workflows/search`.
|
|
197
197
|
61. **Extraction is asynchronous** — the API response is immediate (file upload confirmation only). The actual Magic pipeline — OCR, line item extraction, contact matching, CoA learning, and autofill — runs asynchronously. Use `POST /magic/workflows/search` with `filter.resourceId.eq: "<workflowResourceId>"` to check status (SUBMITTED → PROCESSING → COMPLETED/FAILED). When COMPLETED, `businessTransactionDetails.businessTransactionResourceId` contains the created draft BT ID. The `subscriptionFBPath` in the response is a Firebase Realtime Database path for real-time status updates (alternative to polling).
|
|
198
198
|
62. **Accepts PDF and JPG/JPEG** — both file types confirmed working. Handwritten documents are accepted at upload stage (extraction quality varies). `fileType` in response reflects actual format: `"PDF"`, `"JPEG"`.
|
|
199
|
-
63. **
|
|
200
|
-
63b. **Workflow search tracks all magic uploads** — `POST /magic/workflows/search` searches across BT extractions AND bank statement imports. Filter by `resourceId` (eq), `documentType` (SALE, PURCHASE, SALE_CREDIT_NOTE, PURCHASE_CREDIT_NOTE, BANK_STATEMENT), `status` (SUBMITTED, PROCESSING, COMPLETED, FAILED), `fileName` (contains), `fileType`, `createdAt` (date range). Response: paginated `MagicWorkflowItem` with `businessTransactionDetails.businessTransactionResourceId` (the draft BT ID when COMPLETED) or `bankStatementDetails` (for bank imports). Standard search sort: `{ sortBy: ["createdAt"], order: "DESC" }`.
|
|
199
|
+
63. **Workflow search tracks all magic uploads** — `POST /magic/workflows/search` searches across BT extractions AND bank statement imports. Filter by `resourceId` (eq), `documentType` (SALE, PURCHASE, SALE_CREDIT_NOTE, PURCHASE_CREDIT_NOTE, BANK_STATEMENT), `status` (SUBMITTED, PROCESSING, COMPLETED, FAILED), `fileName` (contains), `fileType`, `createdAt` (date range). Response: paginated `MagicWorkflowItem` with `businessTransactionDetails.businessTransactionResourceId` (the draft BT ID when COMPLETED) or `bankStatementDetails` (for bank imports). Standard search sort: `{ sortBy: ["createdAt"], order: "DESC" }`.
|
|
201
200
|
|
|
202
201
|
### Cashflow & Unified Ledger
|
|
203
202
|
64. **No standalone payments list/search** — `GET /payments`, `POST /payments/search`, and `GET /payments` do NOT exist. Per-payment CRUD (`GET/PUT/DELETE /payments/:resourceId`) exists for individual payment records, but to **list or search** payments, use `POST /cashflow-transactions/search` — the unified transaction ledger that spans invoices, bills, credit notes, journals, cash entries, and payments. Filter by `businessTransactionType` (e.g., `SALE`, `PURCHASE`) and `direction` (`PAYIN`, `PAYOUT`). Response dates are epoch milliseconds.
|
|
@@ -326,9 +325,6 @@ Bills, invoices, and credit notes share identical mandatory field specs. Adding
|
|
|
326
325
|
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 }`** — Clio auto-injects this; do not add manually. **`repeat` is required on POST** (valid: `ONE_TIME`, `DAILY`, `WEEKLY`, `MONTHLY`, `YEARLY`) — Clio maps from the `interval` parameter. 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.
|
|
327
326
|
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). Filter by `businessTransactionType` (SALE, PURCHASE, JOURNAL) and/or `schedulerType` (RECURRING, SUBSCRIPTION) to narrow results.
|
|
328
327
|
|
|
329
|
-
### Universal Search
|
|
330
|
-
95. **Universal search uses `query` param (NOT `q`)** — `GET /search?query=<term>` returns categorized results across contacts, invoices, bills, credit notes, journals. Response is a flat object with category keys, each containing an array of matches. No pagination — returns top matches per category.
|
|
331
|
-
|
|
332
328
|
### Contact Groups
|
|
333
329
|
96. **Contact groups have `associatedContacts` array** — Each group contains `{ name, resourceId, associatedContacts: [{ name, resourceId }] }`. Search via `POST /contact-groups/search`. Known bug: PUT returns 500 (Rule 46).
|
|
334
330
|
|
|
@@ -199,7 +199,7 @@ Fixed assets lock their linked line items — cannot edit account, amounts, or e
|
|
|
199
199
|
|
|
200
200
|
**Jaz Magic**: The extraction & autofill engine. When users start from an attachment (PDF, JPG, document image), Jaz Magic is the correct path — it handles OCR, line item detection, contact matching, and CoA auto-mapping via ML learning, producing a complete draft transaction. Contact-level settings control extraction behavior: line items (detailed extraction), summary totals (single amount), or none. Up to 10 images can be merged into a single PDF. **Do not manually parse attachments to construct `POST /invoices` or `POST /bills` — always use Jaz Magic when the input is a file.**
|
|
201
201
|
|
|
202
|
-
**API**: `POST /magic/createBusinessTransactionFromAttachment` (**attachment → draft transaction** — the primary endpoint for file-based creation), `POST /magic/importBankStatementFromAttachment` (bank statements)
|
|
202
|
+
**API**: `POST /magic/createBusinessTransactionFromAttachment` (**attachment → draft transaction** — the primary endpoint for file-based creation), `POST /magic/importBankStatementFromAttachment` (bank statements)
|
|
203
203
|
|
|
204
204
|
---
|
|
205
205
|
|
|
@@ -229,7 +229,7 @@ Fixed assets lock their linked line items — cannot edit account, amounts, or e
|
|
|
229
229
|
|
|
230
230
|
**User Roles**: Admin (full access), Preparer (create drafts, submit for approval), Member (own drafts only). Granular permissions by module (AR, AP, Treasury, Journals).
|
|
231
231
|
|
|
232
|
-
**API**: CRUD `GET/POST/PUT/DELETE /chart-of-accounts`, `POST /chart-of-accounts/bulk-upsert`, `POST /chart-of-accounts/search`, `GET /tax-profiles`, `POST /tax-profiles/search`, CRUD `GET/POST/PUT/DELETE /tags`, `POST /tags/search`, CRUD `GET/POST/PUT/DELETE /custom-fields`, `POST /custom-fields/search`, `POST /organization/currencies` (enable), `DELETE /organization/currencies/:code` (disable), `POST /organization-currencies/:code/rates` (set FX rate, CRUD), `GET /organization` (org details), CRUD `GET/POST/PUT/DELETE /organization/bookmarks`, CRUD `GET/POST/PUT/DELETE /nano-classifiers`, `POST /nano-classifiers/search`, `GET /organization-users`, `POST /organization-users/search`. Reference data: `GET /account-classifications`, `GET /withholding-tax-codes`, `GET /tax-types`, `GET /modules
|
|
232
|
+
**API**: CRUD `GET/POST/PUT/DELETE /chart-of-accounts`, `POST /chart-of-accounts/bulk-upsert`, `POST /chart-of-accounts/search`, `GET /tax-profiles`, `POST /tax-profiles/search`, CRUD `GET/POST/PUT/DELETE /tags`, `POST /tags/search`, CRUD `GET/POST/PUT/DELETE /custom-fields`, `POST /custom-fields/search`, `POST /organization/currencies` (enable), `DELETE /organization/currencies/:code` (disable), `POST /organization-currencies/:code/rates` (set FX rate, CRUD), `GET /organization` (org details), CRUD `GET/POST/PUT/DELETE /organization/bookmarks`, CRUD `GET/POST/PUT/DELETE /nano-classifiers`, `POST /nano-classifiers/search`, `GET /organization-users`, `POST /organization-users/search`. Reference data: `GET /account-classifications`, `GET /withholding-tax-codes`, `GET /tax-types`, `GET /modules`
|
|
233
233
|
|
|
234
234
|
---
|
|
235
235
|
|
|
@@ -29,7 +29,6 @@
|
|
|
29
29
|
| POST | `/chart-of-accounts/search` | Advanced search with filters |
|
|
30
30
|
| PUT | `/chart-of-accounts/:resourceId` | Update account |
|
|
31
31
|
| DELETE | `/chart-of-accounts/:resourceId` | Delete account |
|
|
32
|
-
| PUT | `/chart-of-accounts/magic-update` | AI-enhanced update (x-magic-api-key) |
|
|
33
32
|
|
|
34
33
|
### Invoices
|
|
35
34
|
| Method | Path | Description |
|
|
@@ -49,7 +48,6 @@
|
|
|
49
48
|
| GET | `/invoices/:resourceId/attachments` | List attachments |
|
|
50
49
|
| POST | `/invoices/:resourceId/attachments` | Upload attachment |
|
|
51
50
|
| DELETE | `/invoices/:resourceId/attachments/:attachmentResourceId` | Delete attachment |
|
|
52
|
-
| PUT | `/invoices/magic-update` | AI-enhanced update (x-magic-api-key) |
|
|
53
51
|
| POST | `/invoices/bulk-upsert` | Bulk create/update invoices (max 500) — **async**, returns `{ jobId }`. Natural key: `invoiceReference`. ISO 8601 dates only. |
|
|
54
52
|
| POST | `/invoices/line-items/bulk-upsert` | Bulk create/update invoices with nested line items (max 500) — **async**, returns `{ jobId }`. |
|
|
55
53
|
|
|
@@ -70,7 +68,6 @@
|
|
|
70
68
|
| GET | `/bills/:resourceId/attachments` | List attachments |
|
|
71
69
|
| POST | `/bills/:resourceId/attachments` | Upload attachment |
|
|
72
70
|
| DELETE | `/bills/:resourceId/attachments/:attachmentResourceId` | Delete attachment |
|
|
73
|
-
| PUT | `/bills/magic-update` | AI-enhanced update (x-magic-api-key) |
|
|
74
71
|
| POST | `/bills/bulk-upsert` | Bulk create/update bills (max 500) — **async**, returns `{ jobId }`. Natural key: `billReference`. ISO 8601 dates only. |
|
|
75
72
|
| POST | `/bills/line-items/bulk-upsert` | Bulk create/update bills with nested line items (max 500) — **async**, returns `{ jobId }`. |
|
|
76
73
|
|
|
@@ -107,7 +104,6 @@ Four entities sharing one shape. Replace `{entity}` with `sale-quotes`, `sale-or
|
|
|
107
104
|
| GET | `/customer-credit-notes/:resourceId/download` | Download PDF |
|
|
108
105
|
| POST | `/customer-credit-notes/:resourceId/refunds` | Record refund(s) |
|
|
109
106
|
| GET | `/customer-credit-notes/:resourceId/refunds` | List refunds |
|
|
110
|
-
| PUT | `/customer-credit-notes/magic-update` | AI update |
|
|
111
107
|
| POST | `/customer-credit-notes/bulk-upsert` | Bulk create/update (max 500) — **async**, returns `{ jobId }`. Natural key: `creditNoteReference`. |
|
|
112
108
|
|
|
113
109
|
### Supplier Credit Notes
|
|
@@ -121,7 +117,6 @@ Four entities sharing one shape. Replace `{entity}` with `sale-quotes`, `sale-or
|
|
|
121
117
|
| DELETE | `/supplier-credit-notes/:resourceId` | Delete |
|
|
122
118
|
| POST | `/supplier-credit-notes/:resourceId/refunds` | Record refund(s) |
|
|
123
119
|
| GET | `/supplier-credit-notes/:resourceId/refunds` | List refunds |
|
|
124
|
-
| PUT | `/supplier-credit-notes/magic-update` | AI update |
|
|
125
120
|
| POST | `/supplier-credit-notes/bulk-upsert` | Bulk create/update (max 500) — **async**, returns `{ jobId }`. Natural key: `creditNoteReference`. |
|
|
126
121
|
|
|
127
122
|
### Journals
|
|
@@ -136,7 +131,6 @@ Four entities sharing one shape. Replace `{entity}` with `sale-quotes`, `sale-or
|
|
|
136
131
|
| GET | `/journals/:resourceId/attachments` | List attachments |
|
|
137
132
|
| POST | `/journals/:resourceId/attachments` | Upload attachment |
|
|
138
133
|
| DELETE | `/journals/:resourceId/attachments/:attachmentResourceId` | Delete attachment |
|
|
139
|
-
| PUT | `/journals/magic-update` | AI update |
|
|
140
134
|
| POST | `/journals/bulk-upsert` | Bulk create/update manual journals (max 500) — **async**, returns `{ jobId }`. Natural key: `reference`. Multi-leg `entries[]` per row. ISO 8601 dates only. |
|
|
141
135
|
|
|
142
136
|
### Cash Entries
|
|
@@ -146,12 +140,10 @@ Four entities sharing one shape. Replace `{entity}` with `sale-quotes`, `sale-or
|
|
|
146
140
|
| GET | `/cash-in-entries` | List cash-in |
|
|
147
141
|
| GET | `/cash-in-entries/:resourceId` | Get cash-in by ID |
|
|
148
142
|
| PUT | `/cash-in-entries/:resourceId` | Update cash-in |
|
|
149
|
-
| PUT | `/cash-in-entries/magic-update` | AI update |
|
|
150
143
|
| POST | `/cash-out-entries` | Create cash-out |
|
|
151
144
|
| GET | `/cash-out-entries` | List cash-out |
|
|
152
145
|
| GET | `/cash-out-entries/:resourceId` | Get cash-out by ID |
|
|
153
146
|
| PUT | `/cash-out-entries/:resourceId` | Update cash-out |
|
|
154
|
-
| PUT | `/cash-out-entries/magic-update` | AI update |
|
|
155
147
|
| POST | `/cash-transfers` | Create cash transfer |
|
|
156
148
|
| GET | `/cash-transfers` | List cash transfers |
|
|
157
149
|
| GET | `/cash-transfers/:resourceId` | Get transfer by ID |
|
|
@@ -238,7 +230,6 @@ Body for all three: `{ items: [{btResourceId: "<uuid>", btType: "SALE|PURCHASE|S
|
|
|
238
230
|
| POST | `/contacts/search` | Advanced search |
|
|
239
231
|
| PUT | `/contacts/:resourceId` | Update |
|
|
240
232
|
| DELETE | `/contacts/:resourceId` | Delete |
|
|
241
|
-
| PUT | `/contacts/magic-update` | AI update |
|
|
242
233
|
| POST | `/contacts/bulk-upsert` | Bulk create/update contacts (max 500) — **async**, returns `{ jobId }`. Poll `/background-jobs/search` with `filter.resourceId`. |
|
|
243
234
|
|
|
244
235
|
### Contact Groups
|
|
@@ -450,17 +441,6 @@ Body for all three: `{ items: [{btResourceId: "<uuid>", btType: "SALE|PURCHASE|S
|
|
|
450
441
|
| POST | `/magic/createBusinessTransactionFromAttachment` | **Jaz Magic: Extraction & Autofill.** Upload PDF/JPG → full extraction pipeline (OCR, line items, contact matching, CoA ML learning) → draft transaction with all fields autofilled. Supports `INVOICE`, `BILL`, `CUSTOMER_CREDIT_NOTE`, `SUPPLIER_CREDIT_NOTE`. FILE mode = multipart (`sourceFile` blob), URL mode = JSON (`sourceURL`). Async — returns `workflowResourceId` for tracking via workflow search. Request maps: `INVOICE`→`SALE`, `BILL`→`PURCHASE`, `CUSTOMER_CREDIT_NOTE`→`SALE_CREDIT_NOTE`, `SUPPLIER_CREDIT_NOTE`→`PURCHASE_CREDIT_NOTE`. |
|
|
451
442
|
| POST | `/magic/workflows/search` | **Workflow search.** Track magic upload status across BT extractions and bank imports. Filter by `resourceId`, `documentType` (SALE/PURCHASE/SALE_CREDIT_NOTE/PURCHASE_CREDIT_NOTE/BANK_STATEMENT), `status` (SUBMITTED/PROCESSING/COMPLETED/FAILED), `fileName`, `fileType`, `createdAt`. Response includes `businessTransactionDetails.businessTransactionResourceId` (the draft BT ID) when COMPLETED. |
|
|
452
443
|
| POST | `/magic/importBankStatementFromAttachment` | Convert bank statement → entries |
|
|
453
|
-
| PUT | `/invoices/magic-update` | AI-enhanced invoice update |
|
|
454
|
-
| PUT | `/bills/magic-update` | AI-enhanced bill update |
|
|
455
|
-
| PUT | `/customer-credit-notes/magic-update` | AI-enhanced CN update |
|
|
456
|
-
| PUT | `/supplier-credit-notes/magic-update` | AI-enhanced CN update |
|
|
457
|
-
| PUT | `/journals/magic-update` | AI-enhanced journal update |
|
|
458
|
-
| PUT | `/cash-in-entries/magic-update` | AI-enhanced cash-in update |
|
|
459
|
-
| PUT | `/cash-out-entries/magic-update` | AI-enhanced cash-out update |
|
|
460
|
-
| PUT | `/contacts/magic-update` | AI-enhanced contact update |
|
|
461
|
-
| PUT | `/chart-of-accounts/magic-update` | AI-enhanced CoA update |
|
|
462
|
-
| ~~GET~~ | ~~`/invoices/magic-search`~~ | ~~AI-powered sales search~~ — **Do not use.** Requires `x-magic-api-key`. Use `POST /invoices/search` instead. |
|
|
463
|
-
| ~~GET~~ | ~~`/bills/magic-search`~~ | ~~AI-powered purchase search~~ — **Do not use.** Requires `x-magic-api-key`. Use `POST /bills/search` instead. |
|
|
464
444
|
|
|
465
445
|
---
|
|
466
446
|
|
|
@@ -546,7 +526,6 @@ Body for all three: `{ items: [{btResourceId: "<uuid>", btType: "SALE|PURCHASE|S
|
|
|
546
526
|
|--------|------|-------------|
|
|
547
527
|
| GET | `/account-classifications` | List all account classification types |
|
|
548
528
|
| GET | `/withholding-tax-codes` | List withholding tax codes |
|
|
549
|
-
| GET | `/search` | Full-text search (Typesense-backed) |
|
|
550
529
|
|
|
551
530
|
### Bookmarks
|
|
552
531
|
| Method | Path | Description |
|