jaz-clio 5.46.13 → 5.47.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/assets/skills/api/SKILL.md +2 -2
- package/assets/skills/api/references/endpoints.md +9 -5
- package/assets/skills/api/references/full-api-surface.md +1 -1
- package/assets/skills/cli/SKILL.md +1 -1
- package/assets/skills/cli/references/command-catalog.md +3 -0
- package/assets/skills/conversion/SKILL.md +1 -1
- package/assets/skills/jaz-kit/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 +341 -341
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: jaz-api
|
|
3
|
-
version: 5.
|
|
3
|
+
version: 5.47.0
|
|
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, 159 production gotchas, error
|
|
@@ -115,7 +115,7 @@ The rest of this skill — field names, gotchas, error catalog, dependency order
|
|
|
115
115
|
28. **CN refunds use the same Payment shape** as invoice/bill payments — `paymentAmount`, `transactionAmount`, `accountResourceId`, `paymentMethod`, `valueDate`, `reference`. The API also accepts aliases `refundAmount`/`refundMethod` (see Rule 53) but prefer canonical `paymentAmount`/`paymentMethod` for consistency.
|
|
116
116
|
|
|
117
117
|
### Inventory Items
|
|
118
|
-
29. **Inventory items
|
|
118
|
+
29. **Inventory items** (`POST /inventory-items`, verified live 2026-09-02): required are `itemCode`, `name`, `unit` (e.g. `"pcs"` — a blank unit returns `ITEM_UNIT_EMPTY_ERROR`), `costingMethod` (`"FIXED"` or `"WAC"`), `cogsResourceId` and `blockInsufficientDeductions` (send `false` explicitly — omitting it 422s, it is not defaulted server-side). Send `name`: the endpoint declares no `name` property and marks `internalName` required, but the API populates `internalName` from the `name` you send. The two account links are TYPE-constrained and the errors name the type: `cogsResourceId` must be **Direct Costs** (`INVALID_ACCOUNT_TYPE_DIRECT_COST`), `purchaseAccountResourceId` must be **Inventory** (`INVALID_ACCOUNT_TYPE_INVENTORY`) — an inventory purchase debits the asset, and COGS is recognised on sale. The API reports `purchaseAccountResourceId`, `saleAccountResourceId`, `appliesToSale` and `appliesToPurchase` as "required if [cogsResourceId] is present" — but `cogsResourceId` is itself always required, so all four are unconditional too. `appliesToSale` and `appliesToPurchase` must both be **`true`**, not merely present: `false` returns `APPLIES_TO_SALE_ERROR` / `APPLIES_TO_PURCHASE_ERROR` ("must be true when cogs selected"), so an inventory-tracked item with COGS is necessarily both sale- and purchase-applicable. There is no `inventoryAccountResourceId` — it appears in no request schema and a create succeeds without it.
|
|
119
119
|
30. **Delete inventory items via `DELETE /items/:id`** — not `/inventory-items/:id`.
|
|
120
120
|
|
|
121
121
|
### Cash Transfers
|
|
@@ -949,7 +949,7 @@ Returns full custom field definition including `applyToSales`, `applyToPurchase`
|
|
|
949
949
|
```json
|
|
950
950
|
// Request:
|
|
951
951
|
{
|
|
952
|
-
"
|
|
952
|
+
"name": "Widget A",
|
|
953
953
|
"itemCode": "WDG-A",
|
|
954
954
|
"unit": "pcs",
|
|
955
955
|
"appliesToSale": true,
|
|
@@ -964,8 +964,7 @@ Returns full custom field definition including `applyToSales`, `applyToPurchase`
|
|
|
964
964
|
"purchaseTaxProfileResourceId": "uuid-tax",
|
|
965
965
|
"costingMethod": "WAC",
|
|
966
966
|
"cogsResourceId": "uuid-direct-costs",
|
|
967
|
-
"blockInsufficientDeductions": false
|
|
968
|
-
"inventoryAccountResourceId": "uuid-inventory-account"
|
|
967
|
+
"blockInsufficientDeductions": false
|
|
969
968
|
}
|
|
970
969
|
|
|
971
970
|
// Response:
|
|
@@ -973,10 +972,15 @@ Returns full custom field definition including `applyToSales`, `applyToPurchase`
|
|
|
973
972
|
```
|
|
974
973
|
|
|
975
974
|
**CRITICAL notes from live testing**:
|
|
975
|
+
- Send `name`, not `internalName`. The endpoint declares no `name` property and marks `internalName` required, but the API populates `internalName` from the `name` you send (verified by readback 2026-09-02)
|
|
976
976
|
- `unit` is REQUIRED (e.g., `"pcs"`, `"box"`, `"kg"`) — omitting causes ITEM_UNIT_EMPTY_ERROR
|
|
977
|
+
- `blockInsufficientDeductions` is REQUIRED and is NOT defaulted server-side — omitting it fails with "blockInsufficientDeductions is a required field"
|
|
977
978
|
- `costingMethod` must be `"FIXED"` or `"WAC"` (NOT `"FIXED_COST"`)
|
|
978
|
-
- `
|
|
979
|
-
- `
|
|
979
|
+
- `cogsResourceId` is required, and MUST point to a Direct Costs account — wrong type causes INVALID_ACCOUNT_TYPE_DIRECT_COST
|
|
980
|
+
- `purchaseAccountResourceId` MUST point to an Inventory-type CoA account (NOT Direct Costs) — wrong type causes INVALID_ACCOUNT_TYPE_INVENTORY. An inventory purchase debits the asset; COGS is recognised on sale
|
|
981
|
+
- Because `cogsResourceId` is always required, so are `purchaseAccountResourceId`, `saleAccountResourceId`, `appliesToSale` and `appliesToPurchase` — the API reports them as "required if [cogsResourceId] is present", but that condition always holds
|
|
982
|
+
- `appliesToSale` and `appliesToPurchase` must both be `true`, not merely present: `false` returns APPLIES_TO_SALE_ERROR / APPLIES_TO_PURCHASE_ERROR, "must be true when cogs selected". An inventory-tracked item with COGS is necessarily both sale- and purchase-applicable
|
|
983
|
+
- There is no `inventoryAccountResourceId` — it appears in no request schema and a create succeeds without it
|
|
980
984
|
- Delete inventory items via `DELETE /items/:id` (NOT `/inventory-items/:id`)
|
|
981
985
|
- `GET /inventory-item-balance/:id` returns balance per item
|
|
982
986
|
- `GET /inventory-balances/:status` currently returns 500 (known bug)
|
|
@@ -259,7 +259,7 @@ Body for all three: `{ items: [{btResourceId: "<uuid>", btType: "SALE|PURCHASE|S
|
|
|
259
259
|
| DELETE | `/items/:resourceId` | Delete item |
|
|
260
260
|
| POST | `/items/search` | Advanced search with filters |
|
|
261
261
|
| POST | `/items/bulk-upsert` | Bulk create/update items (max 500) |
|
|
262
|
-
| POST | `/inventory-items` | Create inventory item (needs `unit`, `costingMethod`, `cogsResourceId
|
|
262
|
+
| POST | `/inventory-items` | Create inventory item (needs `name`, `itemCode`, `unit`, `costingMethod`, `cogsResourceId` (Direct Costs), `purchaseAccountResourceId` (Inventory), `saleAccountResourceId`, `blockInsufficientDeductions`) |
|
|
263
263
|
| GET | `/inventory-items` | List inventory items |
|
|
264
264
|
| GET | `/inventory-item-balance/:resourceId` | Get inventory balance |
|
|
265
265
|
| GET | `/inventory-balances/:balanceStatus` | List by status (**known 500 bug**) |
|
|
@@ -362,6 +362,9 @@ Body shape (all 3): `{ items: [{ btResourceId, btType }] }` with `btType ∈ {SA
|
|
|
362
362
|
|------------|-----------|
|
|
363
363
|
| `items` | `--limit`, `--offset`, `--all`, `--format`, `--json` |
|
|
364
364
|
| `balance <itemId>` | `--json` |
|
|
365
|
+
| `create` | `--item-code`, `--name`, `--unit`, `--costing-method`, `--cogs-account`, `--purchase-account`, `--sale-account`, `--block-insufficient`, `--input` |
|
|
366
|
+
|
|
367
|
+
All seven of `--item-code`, `--name`, `--unit`, `--costing-method`, `--cogs-account`, `--purchase-account` and `--sale-account` are required. `--cogs-account` must be a Direct Costs account and `--purchase-account` an Inventory account. There are no `--sale`/`--purchase` flags: the API rejects either as false once COGS is set, so both are always sent as `true`.
|
|
365
368
|
|
|
366
369
|
---
|
|
367
370
|
|