jaz-cli 2.0.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 +162 -0
- package/assets/skills/api/references/dependencies.md +139 -0
- package/assets/skills/api/references/endpoints.md +1299 -0
- package/assets/skills/api/references/errors.md +751 -0
- package/assets/skills/api/references/feature-glossary.md +216 -0
- package/assets/skills/api/references/field-map.md +428 -0
- package/assets/skills/api/references/full-api-surface.md +699 -0
- package/assets/skills/api/references/search-reference.md +714 -0
- package/assets/skills/conversion/SKILL.md +130 -0
- package/assets/skills/conversion/references/edge-cases.md +174 -0
- package/assets/skills/conversion/references/file-analysis.md +120 -0
- package/assets/skills/conversion/references/file-types.md +501 -0
- package/assets/skills/conversion/references/mapping-rules.md +166 -0
- package/assets/skills/conversion/references/option1-full.md +145 -0
- package/assets/skills/conversion/references/option2-quick.md +197 -0
- package/assets/skills/conversion/references/verification.md +142 -0
- package/dist/commands/init.js +76 -0
- package/dist/commands/update.js +28 -0
- package/dist/commands/versions.js +33 -0
- package/dist/index.js +52 -0
- package/dist/types/index.js +5 -0
- package/dist/utils/github.js +81 -0
- package/dist/utils/logger.js +21 -0
- package/dist/utils/template.js +49 -0
- package/package.json +44 -0
|
@@ -0,0 +1,699 @@
|
|
|
1
|
+
# Jaz API — Complete Endpoint Catalog
|
|
2
|
+
|
|
3
|
+
> Every endpoint in the Jaz/Juan REST API, organized by resource. Includes undocumented
|
|
4
|
+
> endpoints, magic AI features, admin APIs, and advanced search/filter syntax.
|
|
5
|
+
> For request/response examples of core endpoints, see endpoints.md.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Auth Headers
|
|
10
|
+
|
|
11
|
+
| Header | Purpose | Format |
|
|
12
|
+
|--------|---------|--------|
|
|
13
|
+
| `x-jk-api-key` | Standard API key (most common) | `jk-` prefix + 48 hex chars |
|
|
14
|
+
| `x-magic-api-key` | Magic/AI endpoints | Separate key |
|
|
15
|
+
| `PARTNER_API_KEY` | Partner API access | UUID format |
|
|
16
|
+
| `x-tinvio-odin-mgmt-api-key` | Admin management (internal only) | Internal |
|
|
17
|
+
| `Authorization` | Bearer token / passthrough | JWT or platform token |
|
|
18
|
+
|
|
19
|
+
**For external integrations, use `x-jk-api-key`**. Other auth types are for internal/admin use.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Core Accounting Endpoints
|
|
24
|
+
|
|
25
|
+
### Chart of Accounts
|
|
26
|
+
| Method | Path | Description |
|
|
27
|
+
|--------|------|-------------|
|
|
28
|
+
| GET | `/chart-of-accounts` | List all accounts |
|
|
29
|
+
| GET | `/chart-of-accounts/:resourceId` | Get single account |
|
|
30
|
+
| POST | `/chart-of-accounts` | Create single account |
|
|
31
|
+
| POST | `/chart-of-accounts/bulk-upsert` | Bulk create/update (max 100) |
|
|
32
|
+
| POST | `/chart-of-accounts/search` | Advanced search with filters |
|
|
33
|
+
| PUT | `/chart-of-accounts/:resourceId` | Update account |
|
|
34
|
+
| DELETE | `/chart-of-accounts/:resourceId` | Delete account |
|
|
35
|
+
| PUT | `/chart-of-accounts/magic-update` | AI-enhanced update (x-magic-api-key) |
|
|
36
|
+
|
|
37
|
+
### Invoices
|
|
38
|
+
| Method | Path | Description |
|
|
39
|
+
|--------|------|-------------|
|
|
40
|
+
| GET | `/invoices` | List invoices |
|
|
41
|
+
| GET | `/invoices/:resourceId` | Get single invoice |
|
|
42
|
+
| POST | `/invoices` | Create invoice |
|
|
43
|
+
| POST | `/invoices/search` | Advanced search with filters |
|
|
44
|
+
| PUT | `/invoices/:resourceId` | Update invoice |
|
|
45
|
+
| DELETE | `/invoices/:resourceId` | Delete invoice |
|
|
46
|
+
| GET | `/invoices/:resourceId/download` | Download PDF |
|
|
47
|
+
| POST | `/invoices/:resourceId/payments` | Record payment(s) |
|
|
48
|
+
| GET | `/invoices/:resourceId/payments` | List recorded payments |
|
|
49
|
+
| POST | `/invoices/:resourceId/credits` | Apply credit note(s) |
|
|
50
|
+
| GET | `/invoices/:resourceId/credits` | List applied credits |
|
|
51
|
+
| DELETE | `/invoices/:resourceId/credits/:creditsAppliedResourceId` | Reverse credit |
|
|
52
|
+
| GET | `/invoices/:resourceId/attachments` | List attachments |
|
|
53
|
+
| POST | `/invoices/:resourceId/attachments` | Upload attachment |
|
|
54
|
+
| DELETE | `/invoices/:resourceId/attachments/:attachmentResourceId` | Delete attachment |
|
|
55
|
+
| PUT | `/invoices/magic-update` | AI-enhanced update |
|
|
56
|
+
| GET | `/invoices/magic-search` | AI-powered search |
|
|
57
|
+
|
|
58
|
+
### Bills
|
|
59
|
+
| Method | Path | Description |
|
|
60
|
+
|--------|------|-------------|
|
|
61
|
+
| GET | `/bills` | List bills |
|
|
62
|
+
| GET | `/bills/:resourceId` | Get single bill |
|
|
63
|
+
| POST | `/bills` | Create bill (can embed payments) |
|
|
64
|
+
| POST | `/bills/search` | Advanced search with filters |
|
|
65
|
+
| PUT | `/bills/:resourceId` | Update bill |
|
|
66
|
+
| DELETE | `/bills/:resourceId` | Delete bill |
|
|
67
|
+
| POST | `/bills/:resourceId/payments` | Record payment(s) (fixed in PR #112) |
|
|
68
|
+
| GET | `/bills/:resourceId/payments` | List recorded payments |
|
|
69
|
+
| POST | `/bills/:resourceId/credits` | Apply supplier credit note(s) |
|
|
70
|
+
| GET | `/bills/:resourceId/credits` | List applied credits |
|
|
71
|
+
| DELETE | `/bills/:resourceId/credits/:creditsAppliedResourceId` | Reverse credit |
|
|
72
|
+
| GET | `/bills/:resourceId/attachments` | List attachments |
|
|
73
|
+
| POST | `/bills/:resourceId/attachments` | Upload attachment |
|
|
74
|
+
| DELETE | `/bills/:resourceId/attachments/:attachmentResourceId` | Delete attachment |
|
|
75
|
+
| PUT | `/bills/magic-update` | AI-enhanced update |
|
|
76
|
+
| GET | `/bills/magic-search` | AI-powered search |
|
|
77
|
+
|
|
78
|
+
### Customer Credit Notes
|
|
79
|
+
| Method | Path | Description |
|
|
80
|
+
|--------|------|-------------|
|
|
81
|
+
| GET | `/customer-credit-notes` | List |
|
|
82
|
+
| GET | `/customer-credit-notes/:resourceId` | Get by ID |
|
|
83
|
+
| POST | `/customer-credit-notes` | Create |
|
|
84
|
+
| POST | `/customer-credit-notes/search` | Advanced search |
|
|
85
|
+
| PUT | `/customer-credit-notes/:resourceId` | Update |
|
|
86
|
+
| DELETE | `/customer-credit-notes/:resourceId` | Delete |
|
|
87
|
+
| GET | `/customer-credit-notes/:resourceId/download` | Download PDF |
|
|
88
|
+
| POST | `/customer-credit-notes/:resourceId/refunds` | Record refund(s) |
|
|
89
|
+
| GET | `/customer-credit-notes/:resourceId/refunds` | List refunds |
|
|
90
|
+
| PUT | `/customer-credit-notes/magic-update` | AI update |
|
|
91
|
+
|
|
92
|
+
### Supplier Credit Notes
|
|
93
|
+
| Method | Path | Description |
|
|
94
|
+
|--------|------|-------------|
|
|
95
|
+
| GET | `/supplier-credit-notes` | List |
|
|
96
|
+
| GET | `/supplier-credit-notes/:resourceId` | Get by ID |
|
|
97
|
+
| POST | `/supplier-credit-notes` | Create |
|
|
98
|
+
| POST | `/supplier-credit-notes/search` | Advanced search |
|
|
99
|
+
| PUT | `/supplier-credit-notes/:resourceId` | Update |
|
|
100
|
+
| DELETE | `/supplier-credit-notes/:resourceId` | Delete |
|
|
101
|
+
| POST | `/supplier-credit-notes/:resourceId/refunds` | Record refund(s) |
|
|
102
|
+
| GET | `/supplier-credit-notes/:resourceId/refunds` | List refunds |
|
|
103
|
+
| PUT | `/supplier-credit-notes/magic-update` | AI update |
|
|
104
|
+
|
|
105
|
+
### Journals
|
|
106
|
+
| Method | Path | Description |
|
|
107
|
+
|--------|------|-------------|
|
|
108
|
+
| GET | `/journals` | List |
|
|
109
|
+
| GET | `/journals/:resourceId` | Get by ID |
|
|
110
|
+
| POST | `/journals` | Create |
|
|
111
|
+
| POST | `/journals/search` | Advanced search |
|
|
112
|
+
| PUT | `/journals/:resourceId` | Update |
|
|
113
|
+
| DELETE | `/journals/:resourceId` | Delete |
|
|
114
|
+
| GET | `/journals/:resourceId/attachments` | List attachments |
|
|
115
|
+
| POST | `/journals/:resourceId/attachments` | Upload attachment |
|
|
116
|
+
| DELETE | `/journals/:resourceId/attachments/:attachmentResourceId` | Delete attachment |
|
|
117
|
+
| PUT | `/journals/magic-update` | AI update |
|
|
118
|
+
|
|
119
|
+
### Cash Journals
|
|
120
|
+
| Method | Path | Description |
|
|
121
|
+
|--------|------|-------------|
|
|
122
|
+
| POST | `/cash-in-journals` | Create cash-in |
|
|
123
|
+
| GET | `/cash-in-journals` | List cash-in |
|
|
124
|
+
| GET | `/cash-in-journals/:resourceId` | Get cash-in by ID |
|
|
125
|
+
| PUT | `/cash-in-journals/:resourceId` | Update cash-in |
|
|
126
|
+
| PUT | `/cash-in-journals/magic-update` | AI update |
|
|
127
|
+
| POST | `/cash-out-journals` | Create cash-out |
|
|
128
|
+
| GET | `/cash-out-journals` | List cash-out |
|
|
129
|
+
| GET | `/cash-out-journals/:resourceId` | Get cash-out by ID |
|
|
130
|
+
| PUT | `/cash-out-journals/:resourceId` | Update cash-out |
|
|
131
|
+
| PUT | `/cash-out-journals/magic-update` | AI update |
|
|
132
|
+
| POST | `/cash-transfer-journals` | Create cash transfer |
|
|
133
|
+
| GET | `/cash-transfer-journals` | List cash transfers |
|
|
134
|
+
| GET | `/cash-transfer-journals/:resourceId` | Get transfer by ID |
|
|
135
|
+
| POST | `/cashflow-transactions/search` | Search all cash transactions |
|
|
136
|
+
| DELETE | `/cashflow-journals/:resourceId` | Delete any cashflow journal |
|
|
137
|
+
|
|
138
|
+
### Payments (Generic)
|
|
139
|
+
| Method | Path | Description |
|
|
140
|
+
|--------|------|-------------|
|
|
141
|
+
| GET | `/payments/:resourceId` | Get payment record |
|
|
142
|
+
| PUT | `/payments/:resourceId` | Update payment |
|
|
143
|
+
| DELETE | `/payments/:resourceId` | Delete/void payment |
|
|
144
|
+
|
|
145
|
+
### Bank Records
|
|
146
|
+
| Method | Path | Description |
|
|
147
|
+
|--------|------|-------------|
|
|
148
|
+
| POST | `/bank-records/:accountResourceId` | Create bank records (JSON POST) |
|
|
149
|
+
| POST | `/bank-records/:accountResourceId/search` | Search bank entries |
|
|
150
|
+
| POST | `/magic/importBankStatementFromAttachment` | Import bank statement (multipart, see endpoints.md) |
|
|
151
|
+
|
|
152
|
+
### Bank Accounts (Convenience)
|
|
153
|
+
| Method | Path | Description |
|
|
154
|
+
|--------|------|-------------|
|
|
155
|
+
| GET | `/bank-accounts` | List bank-type CoA accounts |
|
|
156
|
+
| GET | `/bank-accounts/:resourceId` | Get bank account by ID |
|
|
157
|
+
|
|
158
|
+
### Bank Rules
|
|
159
|
+
| Method | Path | Description |
|
|
160
|
+
|--------|------|-------------|
|
|
161
|
+
| POST | `/bank-rules` | Create bank rule |
|
|
162
|
+
| GET | `/bank-rules` | List bank rules |
|
|
163
|
+
| GET | `/bank-rules/:resourceId` | Get bank rule by ID |
|
|
164
|
+
| PUT | `/bank-rules/:resourceId` | Update bank rule |
|
|
165
|
+
| DELETE | `/bank-rules/:resourceId` | Delete bank rule |
|
|
166
|
+
| POST | `/bank-rules/search` | Search bank rules |
|
|
167
|
+
|
|
168
|
+
### Auto-Reconciliation
|
|
169
|
+
| Method | Path | Description |
|
|
170
|
+
|--------|------|-------------|
|
|
171
|
+
| POST | `/view-auto-reconciliation` | View auto-reconciliation suggestions |
|
|
172
|
+
|
|
173
|
+
---
|
|
174
|
+
|
|
175
|
+
## Entity Endpoints
|
|
176
|
+
|
|
177
|
+
### Contacts
|
|
178
|
+
| Method | Path | Description |
|
|
179
|
+
|--------|------|-------------|
|
|
180
|
+
| GET | `/contacts` | List |
|
|
181
|
+
| GET | `/contacts/:resourceId` | Get by ID |
|
|
182
|
+
| POST | `/contacts` | Create |
|
|
183
|
+
| POST | `/contacts/search` | Advanced search |
|
|
184
|
+
| PUT | `/contacts/:resourceId` | Update |
|
|
185
|
+
| DELETE | `/contacts/:resourceId` | Delete |
|
|
186
|
+
| PUT | `/contacts/magic-update` | AI update |
|
|
187
|
+
|
|
188
|
+
### Contact Groups
|
|
189
|
+
| Method | Path | Description |
|
|
190
|
+
|--------|------|-------------|
|
|
191
|
+
| GET | `/contact-groups` | List |
|
|
192
|
+
| GET | `/contact-groups/:resourceId` | Get by ID |
|
|
193
|
+
| POST | `/contact-groups` | Create |
|
|
194
|
+
| POST | `/contact-groups/search` | Advanced search |
|
|
195
|
+
| PUT | `/contact-groups/:resourceId` | Update (**known 500 bug**) |
|
|
196
|
+
| DELETE | `/contact-groups/:resourceId` | Delete |
|
|
197
|
+
|
|
198
|
+
### Items
|
|
199
|
+
| Method | Path | Description |
|
|
200
|
+
|--------|------|-------------|
|
|
201
|
+
| GET | `/items` | List standard items |
|
|
202
|
+
| GET | `/items/:resourceId` | Get item by ID |
|
|
203
|
+
| POST | `/items` | Create standard item (requires `itemCode`, `appliesToSale`/`appliesToPurchase`) |
|
|
204
|
+
| PUT | `/items/:resourceId` | Update item |
|
|
205
|
+
| DELETE | `/items/:resourceId` | Delete item |
|
|
206
|
+
| POST | `/items/search` | Advanced search with filters |
|
|
207
|
+
| POST | `/inventory-items` | Create inventory item (needs `unit`, `costingMethod`, `cogsResourceId`, `blockInsufficientDeductions`, `inventoryAccountResourceId`) |
|
|
208
|
+
| GET | `/inventory-items` | List inventory items |
|
|
209
|
+
| GET | `/inventory-item-balance/:resourceId` | Get inventory balance |
|
|
210
|
+
| GET | `/inventory-balances/:balanceStatus` | List by status (**known 500 bug**) |
|
|
211
|
+
| DELETE | (use `/items/:id`) | Delete inventory items via standard items endpoint |
|
|
212
|
+
|
|
213
|
+
### Tax Profiles
|
|
214
|
+
| Method | Path | Description |
|
|
215
|
+
|--------|------|-------------|
|
|
216
|
+
| GET | `/tax-profiles` | List |
|
|
217
|
+
| GET | `/tax-profiles/:resourceId` | Get by ID |
|
|
218
|
+
| POST | `/tax-profiles` | Create |
|
|
219
|
+
| POST | `/tax-profiles/search` | Advanced search |
|
|
220
|
+
| PUT | `/tax-profiles/:resourceId` | Update |
|
|
221
|
+
| DELETE | `/tax-profiles/:resourceId` | Delete |
|
|
222
|
+
| GET | `/tax-types` | List all tax types |
|
|
223
|
+
|
|
224
|
+
### Tags
|
|
225
|
+
| Method | Path | Description |
|
|
226
|
+
|--------|------|-------------|
|
|
227
|
+
| GET | `/tags` | List |
|
|
228
|
+
| GET | `/tags/:resourceId` | Get by ID |
|
|
229
|
+
| POST | `/tags` | Create |
|
|
230
|
+
| POST | `/tags/search` | Advanced search |
|
|
231
|
+
| PUT | `/tags/:resourceId` | Update |
|
|
232
|
+
| DELETE | `/tags/:resourceId` | Delete |
|
|
233
|
+
|
|
234
|
+
### Custom Fields
|
|
235
|
+
| Method | Path | Description |
|
|
236
|
+
|--------|------|-------------|
|
|
237
|
+
| GET | `/custom-fields` | List |
|
|
238
|
+
| GET | `/custom-fields/:resourceId` | Get by ID |
|
|
239
|
+
| POST | `/custom-fields` | Create |
|
|
240
|
+
| POST | `/custom-fields/search` | Advanced search |
|
|
241
|
+
| PUT | `/custom-fields/:resourceId` | Update (**known 500 bug** — requires `appliesTo` but crashes) |
|
|
242
|
+
| DELETE | `/custom-fields/:resourceId` | Delete |
|
|
243
|
+
|
|
244
|
+
---
|
|
245
|
+
|
|
246
|
+
## Organization & Currency Endpoints
|
|
247
|
+
|
|
248
|
+
### Organization
|
|
249
|
+
| Method | Path | Description |
|
|
250
|
+
|--------|------|-------------|
|
|
251
|
+
| GET | `/organization` | Get org details (returns LIST) |
|
|
252
|
+
| GET | `/me` | Test API key (health check) |
|
|
253
|
+
|
|
254
|
+
### Currencies (via /organization/currencies)
|
|
255
|
+
| Method | Path | Description |
|
|
256
|
+
|--------|------|-------------|
|
|
257
|
+
| GET | `/organization/currencies` | List enabled currencies |
|
|
258
|
+
| POST | `/organization/currencies` | Enable currencies (array format) |
|
|
259
|
+
| GET | `/organization/currencies/:currencyCode` | Get by code |
|
|
260
|
+
| DELETE | `/organization/currencies/:currencyCode` | Disable currency |
|
|
261
|
+
|
|
262
|
+
### Currency Rates (via /organization-currencies)
|
|
263
|
+
| Method | Path | Description |
|
|
264
|
+
|--------|------|-------------|
|
|
265
|
+
| POST | `/organization-currencies/:currencyCode/rates` | Set custom rate |
|
|
266
|
+
| GET | `/organization-currencies/:currencyCode/rates` | List rates |
|
|
267
|
+
| GET | `/organization-currencies/:currencyCode/rates/:resourceId` | Get rate |
|
|
268
|
+
| PUT | `/organization-currencies/:currencyCode/rates/:resourceId` | Update rate |
|
|
269
|
+
| DELETE | `/organization-currencies/:currencyCode/rates/:resourceId` | Delete rate |
|
|
270
|
+
|
|
271
|
+
**CRITICAL path difference**: Currency rate management uses `/organization-currencies` (hyphenated), while basic enable/disable uses `/organization/currencies` (nested). Using the wrong path returns 404. POST body: `{ "rate": 0.74, "rateApplicableFrom": "YYYY-MM-DD" }` (rate = 1 base → X foreign; see endpoints.md for direction details). Base currency rates return 400. See endpoints.md for full examples.
|
|
272
|
+
|
|
273
|
+
---
|
|
274
|
+
|
|
275
|
+
## Scheduling Endpoints
|
|
276
|
+
|
|
277
|
+
### Scheduled Invoices
|
|
278
|
+
| Method | Path | Description |
|
|
279
|
+
|--------|------|-------------|
|
|
280
|
+
| POST | `/scheduled/invoices` | Create |
|
|
281
|
+
| GET | `/scheduled/invoices` | List |
|
|
282
|
+
| GET | `/scheduled/invoices/:resourceId` | Get by ID |
|
|
283
|
+
| PUT | `/scheduled/invoices/:resourceId` | Update |
|
|
284
|
+
| DELETE | `/scheduled/invoices/:resourceId` | Delete |
|
|
285
|
+
| POST/GET/DELETE | `/scheduled/invoices/:resourceId/attachments[/:fileId]` | Attachment CRUD |
|
|
286
|
+
|
|
287
|
+
### Scheduled Bills
|
|
288
|
+
| Method | Path | Description |
|
|
289
|
+
|--------|------|-------------|
|
|
290
|
+
| POST | `/scheduled/bills` | Create |
|
|
291
|
+
| GET | `/scheduled/bills` | List |
|
|
292
|
+
| GET | `/scheduled/bills/:resourceId` | Get by ID |
|
|
293
|
+
| PUT | `/scheduled/bills/:resourceId` | Update |
|
|
294
|
+
| DELETE | `/scheduled/bills/:resourceId` | Delete |
|
|
295
|
+
| POST/GET/DELETE | `/scheduled/bills/:resourceId/attachments[/:fileId]` | Attachment CRUD |
|
|
296
|
+
|
|
297
|
+
### Scheduled Journals
|
|
298
|
+
| Method | Path | Description |
|
|
299
|
+
|--------|------|-------------|
|
|
300
|
+
| POST | `/scheduled/journals` | Create |
|
|
301
|
+
| GET | `/scheduled/journals` | List |
|
|
302
|
+
| GET | `/scheduled/journals/:resourceId` | Get by ID |
|
|
303
|
+
| PUT | `/scheduled/journals/:resourceId` | Update |
|
|
304
|
+
| DELETE | `/scheduled/journals/:resourceId` | Delete |
|
|
305
|
+
| POST/GET/DELETE | `/scheduled/journals/:resourceId/attachments[/:attachmentResourceId]` | Attachment CRUD |
|
|
306
|
+
|
|
307
|
+
### Scheduled Subscriptions (Recurring Invoices)
|
|
308
|
+
| Method | Path | Description |
|
|
309
|
+
|--------|------|-------------|
|
|
310
|
+
| POST | `/scheduled/subscriptions` | Create |
|
|
311
|
+
| GET | `/scheduled/subscriptions` | List |
|
|
312
|
+
| GET | `/scheduled/subscriptions/:resourceId` | Get by ID |
|
|
313
|
+
| PUT | `/scheduled/subscriptions/:resourceId` | Update |
|
|
314
|
+
| DELETE | `/scheduled/subscriptions/:resourceId` | Delete |
|
|
315
|
+
| PUT | `/scheduled/cancel-subscriptions/:resourceId` | Cancel (soft delete) |
|
|
316
|
+
| POST/GET/DELETE | `/scheduled/subscriptions/:resourceId/attachments[/:fileId]` | Attachment CRUD |
|
|
317
|
+
|
|
318
|
+
### Search All Scheduled
|
|
319
|
+
| Method | Path | Description |
|
|
320
|
+
|--------|------|-------------|
|
|
321
|
+
| POST | `/scheduled-transaction/search` | Search all scheduled items |
|
|
322
|
+
|
|
323
|
+
---
|
|
324
|
+
|
|
325
|
+
## Reports & Exports
|
|
326
|
+
|
|
327
|
+
### Generate Reports (interactive)
|
|
328
|
+
| Method | Path |
|
|
329
|
+
|--------|------|
|
|
330
|
+
| POST | `/generate-reports/trial-balance` |
|
|
331
|
+
| POST | `/generate-reports/balance-sheet` |
|
|
332
|
+
| POST | `/generate-reports/profit-and-loss` |
|
|
333
|
+
| POST | `/generate-reports/cashflow` |
|
|
334
|
+
| POST | `/generate-reports/general-ledger` |
|
|
335
|
+
| POST | `/generate-reports/cash-balance` |
|
|
336
|
+
| POST | `/generate-reports/vat-ledger` |
|
|
337
|
+
| POST | `/generate-reports/ar-report` |
|
|
338
|
+
| POST | `/generate-reports/ap-report` |
|
|
339
|
+
| POST | `/generate-reports/ar-summary-report` |
|
|
340
|
+
| POST | `/generate-reports/ap-summary-report` |
|
|
341
|
+
| POST | `/generate-reports/bank-balance-summary` |
|
|
342
|
+
| POST | `/generate-reports/bank-reconciliation-summary` |
|
|
343
|
+
| POST | `/generate-reports/bank-reconciliation-details` |
|
|
344
|
+
| POST | `/generate-reports/equity-movement` |
|
|
345
|
+
| POST | `/generate-reports/fixed-assets-summary` |
|
|
346
|
+
| POST | `/generate-reports/fixed-assets-recon-summary` |
|
|
347
|
+
| POST | `/generate-reports/templated-*` | Templated versions of above |
|
|
348
|
+
|
|
349
|
+
### Data Exports (downloadable)
|
|
350
|
+
| Method | Path |
|
|
351
|
+
|--------|------|
|
|
352
|
+
| POST | `/data-exports/trial-balance` |
|
|
353
|
+
| POST | `/data-exports/balance-sheet` |
|
|
354
|
+
| POST | `/data-exports/profit-and-loss` |
|
|
355
|
+
| POST | `/data-exports/cashflow` |
|
|
356
|
+
| POST | `/data-exports/general-ledger` |
|
|
357
|
+
| POST | `/data-exports/sales-summary` |
|
|
358
|
+
| POST | `/data-exports/purchase-summary` |
|
|
359
|
+
| POST | `/data-exports/journal-summary` |
|
|
360
|
+
| POST | `/data-exports/ar-report` |
|
|
361
|
+
| POST | `/data-exports/ap-report` |
|
|
362
|
+
| POST | `/data-exports/ar-details-report` |
|
|
363
|
+
| POST | `/data-exports/ap-details-report` |
|
|
364
|
+
| POST | `/data-exports/bank-reconciliation-*` |
|
|
365
|
+
| POST | `/data-exports/fixed-assets-*` |
|
|
366
|
+
| POST | `/data-exports/sales-book` |
|
|
367
|
+
| POST | `/data-exports/purchase-book` |
|
|
368
|
+
| POST | `/data-exports/cash-receipt-book` |
|
|
369
|
+
| POST | `/data-exports/cash-disbursement-book` |
|
|
370
|
+
| POST | `/data-exports/general-journal-book` |
|
|
371
|
+
| POST | `/data-exports/general-ledger-book` |
|
|
372
|
+
|
|
373
|
+
### Report Packs
|
|
374
|
+
| Method | Path | Description |
|
|
375
|
+
|--------|------|-------------|
|
|
376
|
+
| POST | `/generate-report-packs-pdf` | Generate multiple reports as single PDF |
|
|
377
|
+
|
|
378
|
+
### Statement of Account
|
|
379
|
+
| Method | Path | Description |
|
|
380
|
+
|--------|------|-------------|
|
|
381
|
+
| POST | `/statement-of-account-export` | Generate SOA for contact |
|
|
382
|
+
|
|
383
|
+
---
|
|
384
|
+
|
|
385
|
+
## Magic/AI Endpoints (x-magic-api-key)
|
|
386
|
+
|
|
387
|
+
| Method | Path | Description |
|
|
388
|
+
|--------|------|-------------|
|
|
389
|
+
| POST | `/magic/createBusinessTransactionFromAttachment` | OCR: Convert PDF → transaction |
|
|
390
|
+
| POST | `/magic/importBankStatementFromAttachment` | Convert bank statement → entries |
|
|
391
|
+
| PUT | `/invoices/magic-update` | AI-enhanced invoice update |
|
|
392
|
+
| PUT | `/bills/magic-update` | AI-enhanced bill update |
|
|
393
|
+
| PUT | `/customer-credit-notes/magic-update` | AI-enhanced CN update |
|
|
394
|
+
| PUT | `/supplier-credit-notes/magic-update` | AI-enhanced CN update |
|
|
395
|
+
| PUT | `/journals/magic-update` | AI-enhanced journal update |
|
|
396
|
+
| PUT | `/cash-in-journals/magic-update` | AI-enhanced cash-in update |
|
|
397
|
+
| PUT | `/cash-out-journals/magic-update` | AI-enhanced cash-out update |
|
|
398
|
+
| PUT | `/contacts/magic-update` | AI-enhanced contact update |
|
|
399
|
+
| PUT | `/chart-of-accounts/magic-update` | AI-enhanced CoA update |
|
|
400
|
+
| GET | `/invoices/magic-search` | AI-powered sales search |
|
|
401
|
+
| GET | `/bills/magic-search` | AI-powered purchase search |
|
|
402
|
+
|
|
403
|
+
---
|
|
404
|
+
|
|
405
|
+
## Additional Resources
|
|
406
|
+
|
|
407
|
+
### Capsules (Workspaces)
|
|
408
|
+
| Method | Path | Description |
|
|
409
|
+
|--------|------|-------------|
|
|
410
|
+
| POST | `/capsules` | Create workspace |
|
|
411
|
+
| GET | `/capsules` | List |
|
|
412
|
+
| GET | `/capsules/:resourceId` | Get by ID |
|
|
413
|
+
| POST | `/capsules/search` | Search |
|
|
414
|
+
| PUT | `/capsules/:resourceId` | Update |
|
|
415
|
+
| DELETE | `/capsules/:resourceId` | Delete |
|
|
416
|
+
| POST | `/moveTransactionCapsules` | Move transactions between capsules |
|
|
417
|
+
| POST | `/move-transaction-capsules` | Kebab-case alias (same handler) |
|
|
418
|
+
|
|
419
|
+
### Capsule Types
|
|
420
|
+
| Method | Path | Description |
|
|
421
|
+
|--------|------|-------------|
|
|
422
|
+
| POST | `/capsuleTypes` | Create capsule type |
|
|
423
|
+
| GET | `/capsuleTypes` | List |
|
|
424
|
+
| GET | `/capsuleTypes/:resourceId` | Get by ID |
|
|
425
|
+
| POST | `/capsuleTypes/search` | Search |
|
|
426
|
+
| PUT | `/capsuleTypes/:resourceId` | Update |
|
|
427
|
+
| DELETE | `/capsuleTypes/:resourceId` | Delete |
|
|
428
|
+
| — | `/capsule-types/*` | Kebab-case aliases for all above (same handlers) |
|
|
429
|
+
|
|
430
|
+
### Fixed Assets
|
|
431
|
+
| Method | Path | Description |
|
|
432
|
+
|--------|------|-------------|
|
|
433
|
+
| POST | `/fixed-assets` | Create (**known 500 bug**) |
|
|
434
|
+
| GET | `/fixed-assets` | List |
|
|
435
|
+
| GET | `/fixed-assets/:resourceId` | Get by ID |
|
|
436
|
+
| POST | `/fixed-assets/search` | Search |
|
|
437
|
+
| PUT | `/fixed-assets/:resourceId` | Update |
|
|
438
|
+
| DELETE | `/fixed-assets/:resourceId` | Delete |
|
|
439
|
+
| POST | `/mark-as-sold/fixed-assets` | Mark as sold |
|
|
440
|
+
| POST | `/undo-disposal/fixed-assets/:resourceId` | Undo disposal |
|
|
441
|
+
| POST | `/discard-fixed-assets/:resourceId` | Discard |
|
|
442
|
+
| POST | `/transfer-fixed-assets` | Transfer between entities |
|
|
443
|
+
|
|
444
|
+
### Fixed Asset Types
|
|
445
|
+
| Method | Path | Description |
|
|
446
|
+
|--------|------|-------------|
|
|
447
|
+
| POST | `/fixed-assets-types/search` | Search fixed asset types |
|
|
448
|
+
|
|
449
|
+
### Purchase Items
|
|
450
|
+
| Method | Path | Description |
|
|
451
|
+
|--------|------|-------------|
|
|
452
|
+
| POST | `/purchase-items/search` | Search purchase items |
|
|
453
|
+
|
|
454
|
+
### Nano Classifiers (Tracking Categories)
|
|
455
|
+
| Method | Path | Description |
|
|
456
|
+
|--------|------|-------------|
|
|
457
|
+
| POST | `/nano-classifiers` | Create classifier |
|
|
458
|
+
| GET | `/nano-classifiers` | List |
|
|
459
|
+
| GET | `/nano-classifiers/:resourceId` | Get by ID |
|
|
460
|
+
| PUT | `/nano-classifiers/:resourceId` | Update |
|
|
461
|
+
| DELETE | `/nano-classifiers/:resourceId` | Delete |
|
|
462
|
+
| POST | `/nano-classifiers/search` | Search |
|
|
463
|
+
|
|
464
|
+
### Organization Report Templates
|
|
465
|
+
| Method | Path | Description |
|
|
466
|
+
|--------|------|-------------|
|
|
467
|
+
| POST | `/organization-report-template/search` | Search report templates |
|
|
468
|
+
|
|
469
|
+
### Catalogs
|
|
470
|
+
| Method | Path | Description |
|
|
471
|
+
|--------|------|-------------|
|
|
472
|
+
| POST | `/catalogs` | Create catalog |
|
|
473
|
+
| GET | `/catalogs` | List |
|
|
474
|
+
| GET | `/catalogs/:resourceId` | Get by ID |
|
|
475
|
+
| POST | `/catalogs/search` | Search |
|
|
476
|
+
| PUT | `/catalogs/:resourceId` | Update |
|
|
477
|
+
| DELETE | `/catalogs/:resourceId` | Delete |
|
|
478
|
+
|
|
479
|
+
### Reference Data
|
|
480
|
+
| Method | Path | Description |
|
|
481
|
+
|--------|------|-------------|
|
|
482
|
+
| GET | `/account-classifications` | List all account classification types |
|
|
483
|
+
| GET | `/withholding-tax-codes` | List withholding tax codes |
|
|
484
|
+
| GET | `/search` | Full-text search (Typesense-backed) |
|
|
485
|
+
|
|
486
|
+
### Bookmarks
|
|
487
|
+
| Method | Path | Description |
|
|
488
|
+
|--------|------|-------------|
|
|
489
|
+
| POST | `/organization/bookmarks` | Create bookmark |
|
|
490
|
+
| GET | `/organization/bookmarks` | List |
|
|
491
|
+
| GET | `/organization/bookmarks/:resourceId` | Get by ID |
|
|
492
|
+
| PUT | `/organization/bookmarks/:resourceId` | Update |
|
|
493
|
+
| DELETE | `/organization/bookmarks/:resourceId` | Delete |
|
|
494
|
+
|
|
495
|
+
### Organization Users
|
|
496
|
+
| Method | Path | Description |
|
|
497
|
+
|--------|------|-------------|
|
|
498
|
+
| GET | `/organization-users` | List |
|
|
499
|
+
| GET | `/organization-users/:resourceId` | Get by ID |
|
|
500
|
+
| PUT | `/organization-users/:resourceId` | Update |
|
|
501
|
+
| POST | `/organization-users/search` | Search |
|
|
502
|
+
| POST | `/organization-users/invite` | Invite user |
|
|
503
|
+
| DELETE | `/organization-users/:resourceId` | Delete |
|
|
504
|
+
|
|
505
|
+
### Modules
|
|
506
|
+
| Method | Path | Description |
|
|
507
|
+
|--------|------|-------------|
|
|
508
|
+
| GET | `/modules` | List all modules |
|
|
509
|
+
| GET | `/modules/:resourceId` | Get module by ID |
|
|
510
|
+
|
|
511
|
+
---
|
|
512
|
+
|
|
513
|
+
## Advanced Search Filter Syntax
|
|
514
|
+
|
|
515
|
+
> **Complete reference**: See **[references/search-reference.md](./search-reference.md)** for per-endpoint filter fields, sort fields, and response shapes.
|
|
516
|
+
|
|
517
|
+
All 28 `POST /*/search` endpoints accept this filter structure in the POST body:
|
|
518
|
+
|
|
519
|
+
### String Filters
|
|
520
|
+
```json
|
|
521
|
+
{ "filter": { "reference": { "eq": "INV-001" } } }
|
|
522
|
+
{ "filter": { "reference": { "neq": "DRAFT-001" } } }
|
|
523
|
+
{ "filter": { "reference": { "contains": "INV" } } }
|
|
524
|
+
{ "filter": { "status": { "in": ["ACTIVE", "DRAFT"] } } }
|
|
525
|
+
{ "filter": { "reference": { "likeIn": ["INV%", "BILL%"] } } }
|
|
526
|
+
{ "filter": { "reference": { "reg": ["^INV-.*"] } } }
|
|
527
|
+
{ "filter": { "reference": { "isNull": true } } }
|
|
528
|
+
```
|
|
529
|
+
|
|
530
|
+
### Numeric Filters
|
|
531
|
+
```json
|
|
532
|
+
{ "filter": { "totalAmount": { "eq": 1000 } } }
|
|
533
|
+
{ "filter": { "totalAmount": { "gt": 1000 } } }
|
|
534
|
+
{ "filter": { "totalAmount": { "gte": 500, "lte": 5000 } } }
|
|
535
|
+
{ "filter": { "totalAmount": { "in": [100, 200, 500] } } }
|
|
536
|
+
```
|
|
537
|
+
|
|
538
|
+
### Date Filters (YYYY-MM-DD format)
|
|
539
|
+
```json
|
|
540
|
+
{ "filter": { "valueDate": { "eq": "2026-02-08" } } }
|
|
541
|
+
{ "filter": { "valueDate": { "gte": "2026-01-01", "lte": "2026-12-31" } } }
|
|
542
|
+
{ "filter": { "valueDate": { "between": ["2026-01-01", "2026-03-31"] } } }
|
|
543
|
+
```
|
|
544
|
+
|
|
545
|
+
### DateTime Filters (RFC3339 format — for createdAt, updatedAt, approvedAt, submittedAt)
|
|
546
|
+
```json
|
|
547
|
+
{ "filter": { "createdAt": { "gte": "2026-01-01T00:00:00Z" } } }
|
|
548
|
+
```
|
|
549
|
+
|
|
550
|
+
### Boolean Filters
|
|
551
|
+
```json
|
|
552
|
+
{ "filter": { "appliesToSale": { "eq": true } } }
|
|
553
|
+
```
|
|
554
|
+
|
|
555
|
+
### JSON Filters (for tags, custom fields)
|
|
556
|
+
```json
|
|
557
|
+
{ "filter": { "tags": { "jsonIn": ["tag-resource-id-1"] } } }
|
|
558
|
+
{ "filter": { "tags": { "jsonNotIn": ["tag-resource-id-2"] } } }
|
|
559
|
+
```
|
|
560
|
+
|
|
561
|
+
### Nested Object Filters
|
|
562
|
+
```json
|
|
563
|
+
{ "filter": { "contact": { "name": { "contains": "Acme" } } } }
|
|
564
|
+
{ "filter": { "account": { "code": { "eq": "4000" } } } }
|
|
565
|
+
```
|
|
566
|
+
|
|
567
|
+
### Logical Operators
|
|
568
|
+
```json
|
|
569
|
+
{ "filter": { "and": { "status": { "eq": "ACTIVE" }, "totalAmount": { "gt": 0 } } } }
|
|
570
|
+
{ "filter": { "or": { "status": { "eq": "ACTIVE" }, "status": { "eq": "DRAFT" } } } }
|
|
571
|
+
{ "filter": { "not": { "status": { "eq": "VOIDED" } } } }
|
|
572
|
+
```
|
|
573
|
+
|
|
574
|
+
### andGroup / orGroup (invoices, bills, journals, credit notes)
|
|
575
|
+
```json
|
|
576
|
+
{
|
|
577
|
+
"filter": {
|
|
578
|
+
"andGroup": [
|
|
579
|
+
{ "status": { "eq": "ACTIVE" } },
|
|
580
|
+
{ "totalAmount": { "gt": 0 } }
|
|
581
|
+
]
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
```
|
|
585
|
+
|
|
586
|
+
### Sort
|
|
587
|
+
`sort` is an OBJECT (not a top-level field). `sortBy` MUST be an array on all endpoints (no exceptions). Required when `offset` is present.
|
|
588
|
+
```json
|
|
589
|
+
{ "sort": { "sortBy": ["valueDate"], "order": "DESC" } }
|
|
590
|
+
```
|
|
591
|
+
|
|
592
|
+
### Pagination
|
|
593
|
+
|
|
594
|
+
All list/search endpoints use `limit`/`offset` — NOT `page`/`size`. This applies to both GET (query params) and POST /search (JSON body).
|
|
595
|
+
|
|
596
|
+
| Property | Value |
|
|
597
|
+
|----------|-------|
|
|
598
|
+
| Default limit | 100 |
|
|
599
|
+
| Default offset | 0 |
|
|
600
|
+
| Min limit | 1 |
|
|
601
|
+
| Max limit | 1000 |
|
|
602
|
+
| Max offset | 65536 |
|
|
603
|
+
| Response shape | `{ totalPages, totalElements, data: [...] }` — flat, no outer `data` wrapper |
|
|
604
|
+
| **Exceptions** | `organization-report-template/search`: plain array (no pagination). All other search/list endpoints return the flat paginated shape. |
|
|
605
|
+
|
|
606
|
+
**GET endpoints**: `GET /api/v1/tags?limit=50&offset=0`
|
|
607
|
+
**POST /search**: `{ "limit": 50, "offset": 0 }` (in JSON body)
|
|
608
|
+
|
|
609
|
+
**`page`/`size` are NOT supported** — sending them is silently ignored (returns default results).
|
|
610
|
+
|
|
611
|
+
**Sort required on POST /search**: When `offset` is present in the body (even `offset: 0`), `sort` must also be included.
|
|
612
|
+
|
|
613
|
+
### Date Format Asymmetry (CRITICAL)
|
|
614
|
+
|
|
615
|
+
| Direction | Format | Examples |
|
|
616
|
+
|-----------|--------|----------|
|
|
617
|
+
| Request dates (create/update) | `YYYY-MM-DD` string | `"valueDate": "2026-02-14"` |
|
|
618
|
+
| Request date filters (search) | `YYYY-MM-DD` string | `"valueDate": { "gte": "2026-01-01" }` |
|
|
619
|
+
| Request datetime filters (search) | RFC3339 string | `"createdAt": { "gte": "2026-01-01T00:00:00Z" }` |
|
|
620
|
+
| **ALL response dates** | **int64 epoch milliseconds** | `"valueDate": 1739491200000` |
|
|
621
|
+
|
|
622
|
+
Convert response dates: `new Date(epochMs).toISOString().slice(0,10)` → `"2026-02-14"`
|
|
623
|
+
|
|
624
|
+
---
|
|
625
|
+
|
|
626
|
+
## Payment Method Enum
|
|
627
|
+
|
|
628
|
+
Valid values for `paymentMethod` field:
|
|
629
|
+
```
|
|
630
|
+
CASH, CREDIT_CARD, BANK_TRANSFER, E_WALLET, CHEQUE,
|
|
631
|
+
WITHHOLDING_TAX_CERTIFICATE, CLEARING_SETTLEMENT,
|
|
632
|
+
DEBT_WRITE_OFF, INTER_COMPANY, OTHER, PAYMENT_GATEWAY
|
|
633
|
+
```
|
|
634
|
+
|
|
635
|
+
---
|
|
636
|
+
|
|
637
|
+
## Limits & Constraints
|
|
638
|
+
|
|
639
|
+
| Constraint | Value |
|
|
640
|
+
|-----------|-------|
|
|
641
|
+
| Request timeout | 5 minutes (300s) |
|
|
642
|
+
| Body size limit | 11 MB |
|
|
643
|
+
| Line items per transaction | 200 max |
|
|
644
|
+
| Payments per transaction | 200 max |
|
|
645
|
+
| Tags per transaction | 50 max |
|
|
646
|
+
| Tag name length | 50 chars |
|
|
647
|
+
| CoA bulk upsert batch | 100 max |
|
|
648
|
+
| Search results per page | 1000 max |
|
|
649
|
+
| Filter `in` array | 100 values max |
|
|
650
|
+
| Filter `reg` patterns | 100 max |
|
|
651
|
+
| Journal entries | 2-200 per journal |
|
|
652
|
+
| Cash journal entries | 1-100 per cash journal |
|
|
653
|
+
| Internal notes | 65536 chars max |
|
|
654
|
+
| Reference field | 256 chars max |
|
|
655
|
+
| Contact emails | 50 max per contact |
|
|
656
|
+
| Shipping addresses | 100 max per contact |
|
|
657
|
+
| Sort fields | 25 max per query |
|
|
658
|
+
|
|
659
|
+
---
|
|
660
|
+
|
|
661
|
+
## Platform Features Affecting API Behavior
|
|
662
|
+
|
|
663
|
+
These features exist in the Jaz/Juan platform and may affect API responses or cause unexpected errors.
|
|
664
|
+
|
|
665
|
+
### Approvals
|
|
666
|
+
- Bills and invoices can be submitted for approval workflow
|
|
667
|
+
- Only admin users (AP permission) can approve submitted bills
|
|
668
|
+
- API-created transactions with `saveAsDraft: false` bypass approval workflow
|
|
669
|
+
- Approval records are read-only via API
|
|
670
|
+
|
|
671
|
+
### Lock Dates
|
|
672
|
+
- Organizations can set a lock date preventing changes before that cutoff
|
|
673
|
+
- POST/PUT requests for transactions dated before the lock date will fail
|
|
674
|
+
- Check `lockDate` field in `GET /api/v1/organization` response
|
|
675
|
+
|
|
676
|
+
### Bulk Operations
|
|
677
|
+
- Bulk invoice payments: Record payments for multiple invoices at once
|
|
678
|
+
- Bulk bill payments: Record payments for multiple bills at once
|
|
679
|
+
- Bulk import: Items (max 1000/batch via XLSX), invoices, journals (CSV/XLSX import, not API)
|
|
680
|
+
|
|
681
|
+
### Bank Integrations
|
|
682
|
+
- Aspire and Airwallex direct bank feeds available
|
|
683
|
+
- Bank statement import via `POST /api/v1/magic/importBankStatementFromAttachment` (multipart)
|
|
684
|
+
- Direct bank feeds may create bank records automatically
|
|
685
|
+
|
|
686
|
+
### Inventory
|
|
687
|
+
- Items can be PRODUCT (inventory-tracked) or SERVICE (non-tracked)
|
|
688
|
+
- Inventory items have costing methods: Fixed Cost or Weighted Average Cost (set at creation, cannot change)
|
|
689
|
+
- Stock can block insufficient deductions (orange quantity field indicator)
|
|
690
|
+
- Inventory adjustments via `POST /api/v1/inventory/adjustments`
|
|
691
|
+
|
|
692
|
+
### Capsules (Workspaces)
|
|
693
|
+
- Group transactions by project/workspace
|
|
694
|
+
- Move transactions between capsules via `POST /api/v1/moveTransactionCapsules`
|
|
695
|
+
- Search transactions within capsules
|
|
696
|
+
|
|
697
|
+
---
|
|
698
|
+
|
|
699
|
+
*Last updated: 2026-02-14 — All search/list responses standardized to flat shape (no outer data wrapper). Kebab-case aliases for capsule-types and move-transaction-capsules. Sort now array on all endpoints (no exceptions). Major overhaul: Added 20+ missing endpoints (bank rules, capsule types, nano classifiers, catalogs, reference data, auto-reconciliation). Expanded search filter syntax with all 7 operator types, nested filters, logical operators, andGroup/orGroup, date format asymmetry. Added cross-reference to search-reference.md. All data sourced from Go structs.*
|