storno-cli 1.0.5
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/LICENSE +53 -0
- package/README.md +257 -0
- package/TOOLS.md +3309 -0
- package/dist/client.d.ts +42 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +162 -0
- package/dist/client.js.map +1 -0
- package/dist/config.d.ts +22 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +30 -0
- package/dist/config.js.map +1 -0
- package/dist/index.d.ts +37 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +172 -0
- package/dist/index.js.map +1 -0
- package/dist/tools/accounting-export.d.ts +14 -0
- package/dist/tools/accounting-export.d.ts.map +1 -0
- package/dist/tools/accounting-export.js +97 -0
- package/dist/tools/accounting-export.js.map +1 -0
- package/dist/tools/admin.d.ts +8 -0
- package/dist/tools/admin.d.ts.map +1 -0
- package/dist/tools/admin.js +98 -0
- package/dist/tools/admin.js.map +1 -0
- package/dist/tools/anaf.d.ts +8 -0
- package/dist/tools/anaf.d.ts.map +1 -0
- package/dist/tools/anaf.js +115 -0
- package/dist/tools/anaf.js.map +1 -0
- package/dist/tools/api-keys.d.ts +8 -0
- package/dist/tools/api-keys.d.ts.map +1 -0
- package/dist/tools/api-keys.js +29 -0
- package/dist/tools/api-keys.js.map +1 -0
- package/dist/tools/auth.d.ts +8 -0
- package/dist/tools/auth.d.ts.map +1 -0
- package/dist/tools/auth.js +187 -0
- package/dist/tools/auth.js.map +1 -0
- package/dist/tools/backup.d.ts +62 -0
- package/dist/tools/backup.d.ts.map +1 -0
- package/dist/tools/backup.js +167 -0
- package/dist/tools/backup.js.map +1 -0
- package/dist/tools/bank-accounts.d.ts +14 -0
- package/dist/tools/bank-accounts.d.ts.map +1 -0
- package/dist/tools/bank-accounts.js +140 -0
- package/dist/tools/bank-accounts.js.map +1 -0
- package/dist/tools/borderou.d.ts +14 -0
- package/dist/tools/borderou.d.ts.map +1 -0
- package/dist/tools/borderou.js +233 -0
- package/dist/tools/borderou.js.map +1 -0
- package/dist/tools/clients.d.ts +14 -0
- package/dist/tools/clients.d.ts.map +1 -0
- package/dist/tools/clients.js +353 -0
- package/dist/tools/clients.js.map +1 -0
- package/dist/tools/companies.d.ts +8 -0
- package/dist/tools/companies.d.ts.map +1 -0
- package/dist/tools/companies.js +211 -0
- package/dist/tools/companies.js.map +1 -0
- package/dist/tools/company-registry.d.ts +31 -0
- package/dist/tools/company-registry.d.ts.map +1 -0
- package/dist/tools/company-registry.js +51 -0
- package/dist/tools/company-registry.js.map +1 -0
- package/dist/tools/cpv-codes.d.ts +17 -0
- package/dist/tools/cpv-codes.d.ts.map +1 -0
- package/dist/tools/cpv-codes.js +28 -0
- package/dist/tools/cpv-codes.js.map +1 -0
- package/dist/tools/dashboard.d.ts +23 -0
- package/dist/tools/dashboard.d.ts.map +1 -0
- package/dist/tools/dashboard.js +37 -0
- package/dist/tools/dashboard.js.map +1 -0
- package/dist/tools/defaults.d.ts +14 -0
- package/dist/tools/defaults.d.ts.map +1 -0
- package/dist/tools/defaults.js +29 -0
- package/dist/tools/defaults.js.map +1 -0
- package/dist/tools/delivery-notes.d.ts +185 -0
- package/dist/tools/delivery-notes.d.ts.map +1 -0
- package/dist/tools/delivery-notes.js +525 -0
- package/dist/tools/delivery-notes.js.map +1 -0
- package/dist/tools/document-series.d.ts +54 -0
- package/dist/tools/document-series.d.ts.map +1 -0
- package/dist/tools/document-series.js +171 -0
- package/dist/tools/document-series.js.map +1 -0
- package/dist/tools/efactura-messages.d.ts +34 -0
- package/dist/tools/efactura-messages.d.ts.map +1 -0
- package/dist/tools/efactura-messages.js +51 -0
- package/dist/tools/efactura-messages.js.map +1 -0
- package/dist/tools/einvoice.d.ts +8 -0
- package/dist/tools/einvoice.d.ts.map +1 -0
- package/dist/tools/einvoice.js +170 -0
- package/dist/tools/einvoice.js.map +1 -0
- package/dist/tools/email-templates.d.ts +14 -0
- package/dist/tools/email-templates.d.ts.map +1 -0
- package/dist/tools/email-templates.js +104 -0
- package/dist/tools/email-templates.js.map +1 -0
- package/dist/tools/exchange-rates.d.ts +14 -0
- package/dist/tools/exchange-rates.d.ts.map +1 -0
- package/dist/tools/exchange-rates.js +55 -0
- package/dist/tools/exchange-rates.js.map +1 -0
- package/dist/tools/exports.d.ts +14 -0
- package/dist/tools/exports.d.ts.map +1 -0
- package/dist/tools/exports.js +25 -0
- package/dist/tools/exports.js.map +1 -0
- package/dist/tools/import.d.ts +14 -0
- package/dist/tools/import.d.ts.map +1 -0
- package/dist/tools/import.js +221 -0
- package/dist/tools/import.js.map +1 -0
- package/dist/tools/invitations.d.ts +8 -0
- package/dist/tools/invitations.d.ts.map +1 -0
- package/dist/tools/invitations.js +70 -0
- package/dist/tools/invitations.js.map +1 -0
- package/dist/tools/invoices.d.ts +14 -0
- package/dist/tools/invoices.d.ts.map +1 -0
- package/dist/tools/invoices.js +1191 -0
- package/dist/tools/invoices.js.map +1 -0
- package/dist/tools/licensing.d.ts +8 -0
- package/dist/tools/licensing.d.ts.map +1 -0
- package/dist/tools/licensing.js +90 -0
- package/dist/tools/licensing.js.map +1 -0
- package/dist/tools/members.d.ts +8 -0
- package/dist/tools/members.d.ts.map +1 -0
- package/dist/tools/members.js +79 -0
- package/dist/tools/members.js.map +1 -0
- package/dist/tools/nc-codes.d.ts +17 -0
- package/dist/tools/nc-codes.d.ts.map +1 -0
- package/dist/tools/nc-codes.js +28 -0
- package/dist/tools/nc-codes.js.map +1 -0
- package/dist/tools/notifications.d.ts +8 -0
- package/dist/tools/notifications.d.ts.map +1 -0
- package/dist/tools/notifications.js +111 -0
- package/dist/tools/notifications.js.map +1 -0
- package/dist/tools/oauth2-clients.d.ts +8 -0
- package/dist/tools/oauth2-clients.d.ts.map +1 -0
- package/dist/tools/oauth2-clients.js +147 -0
- package/dist/tools/oauth2-clients.js.map +1 -0
- package/dist/tools/payments.d.ts +17 -0
- package/dist/tools/payments.d.ts.map +1 -0
- package/dist/tools/payments.js +109 -0
- package/dist/tools/payments.js.map +1 -0
- package/dist/tools/pdf-template-config.d.ts +14 -0
- package/dist/tools/pdf-template-config.d.ts.map +1 -0
- package/dist/tools/pdf-template-config.js +131 -0
- package/dist/tools/pdf-template-config.js.map +1 -0
- package/dist/tools/products.d.ts +40 -0
- package/dist/tools/products.d.ts.map +1 -0
- package/dist/tools/products.js +73 -0
- package/dist/tools/products.js.map +1 -0
- package/dist/tools/proforma-invoices.d.ts +198 -0
- package/dist/tools/proforma-invoices.d.ts.map +1 -0
- package/dist/tools/proforma-invoices.js +378 -0
- package/dist/tools/proforma-invoices.js.map +1 -0
- package/dist/tools/receipts.d.ts +166 -0
- package/dist/tools/receipts.d.ts.map +1 -0
- package/dist/tools/receipts.js +397 -0
- package/dist/tools/receipts.js.map +1 -0
- package/dist/tools/recurring-invoices.d.ts +187 -0
- package/dist/tools/recurring-invoices.d.ts.map +1 -0
- package/dist/tools/recurring-invoices.js +305 -0
- package/dist/tools/recurring-invoices.js.map +1 -0
- package/dist/tools/reports.d.ts +48 -0
- package/dist/tools/reports.d.ts.map +1 -0
- package/dist/tools/reports.js +200 -0
- package/dist/tools/reports.js.map +1 -0
- package/dist/tools/storage-config.d.ts +8 -0
- package/dist/tools/storage-config.d.ts.map +1 -0
- package/dist/tools/storage-config.js +117 -0
- package/dist/tools/storage-config.js.map +1 -0
- package/dist/tools/suppliers.d.ts +14 -0
- package/dist/tools/suppliers.d.ts.map +1 -0
- package/dist/tools/suppliers.js +205 -0
- package/dist/tools/suppliers.js.map +1 -0
- package/dist/tools/system.d.ts +8 -0
- package/dist/tools/system.d.ts.map +1 -0
- package/dist/tools/system.js +24 -0
- package/dist/tools/system.js.map +1 -0
- package/dist/tools/vat-rates.d.ts +14 -0
- package/dist/tools/vat-rates.d.ts.map +1 -0
- package/dist/tools/vat-rates.js +145 -0
- package/dist/tools/vat-rates.js.map +1 -0
- package/dist/tools/webhooks.d.ts +8 -0
- package/dist/tools/webhooks.d.ts.map +1 -0
- package/dist/tools/webhooks.js +305 -0
- package/dist/tools/webhooks.js.map +1 -0
- package/dist/utils/errors.d.ts +18 -0
- package/dist/utils/errors.d.ts.map +1 -0
- package/dist/utils/errors.js +45 -0
- package/dist/utils/errors.js.map +1 -0
- package/dist/utils/pagination.d.ts +9 -0
- package/dist/utils/pagination.d.ts.map +1 -0
- package/dist/utils/pagination.js +10 -0
- package/dist/utils/pagination.js.map +1 -0
- package/package.json +52 -0
package/TOOLS.md
ADDED
|
@@ -0,0 +1,3309 @@
|
|
|
1
|
+
# Storno CLI - Complete Tool Reference
|
|
2
|
+
|
|
3
|
+
This document lists all MCP tools exposed by the Storno CLI server.
|
|
4
|
+
Each tool can be called by any MCP-compatible AI assistant (Claude Code, Cursor, Windsurf, etc.).
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Table of Contents
|
|
9
|
+
|
|
10
|
+
- [Authentication](#authentication)
|
|
11
|
+
- [Companies](#companies)
|
|
12
|
+
- [Invoices](#invoices)
|
|
13
|
+
- [Clients](#clients)
|
|
14
|
+
- [Products](#products)
|
|
15
|
+
- [Payments](#payments)
|
|
16
|
+
- [Invoice Defaults](#invoice-defaults)
|
|
17
|
+
- [VAT Rates](#vat-rates)
|
|
18
|
+
- [Bank Accounts](#bank-accounts)
|
|
19
|
+
- [Document Series](#document-series)
|
|
20
|
+
- [Proforma Invoices](#proforma-invoices)
|
|
21
|
+
- [Recurring Invoices](#recurring-invoices)
|
|
22
|
+
- [Delivery Notes](#delivery-notes)
|
|
23
|
+
- [Receipts](#receipts)
|
|
24
|
+
- [Suppliers](#suppliers)
|
|
25
|
+
- [Exchange Rates](#exchange-rates)
|
|
26
|
+
- [Email Templates](#email-templates)
|
|
27
|
+
- [E-Invoicing (Multi-Country)](#e-invoicing-multi-country)
|
|
28
|
+
- [ANAF Integration](#anaf-integration)
|
|
29
|
+
- [e-Factura Messages](#e-factura-messages)
|
|
30
|
+
- [Dashboard](#dashboard)
|
|
31
|
+
- [Members](#members)
|
|
32
|
+
- [Invitations](#invitations)
|
|
33
|
+
- [Notifications](#notifications)
|
|
34
|
+
- [Webhooks](#webhooks)
|
|
35
|
+
- [API Keys](#api-keys)
|
|
36
|
+
- [OAuth2 Apps](#oauth2-apps)
|
|
37
|
+
- [Reports](#reports)
|
|
38
|
+
- [Exports](#exports)
|
|
39
|
+
- [Admin](#admin)
|
|
40
|
+
- [Licensing](#licensing)
|
|
41
|
+
- [PDF Template Config](#pdf-template-config)
|
|
42
|
+
- [Company Registry](#company-registry)
|
|
43
|
+
- [System](#system)
|
|
44
|
+
- [Accounting Export](#accounting-export)
|
|
45
|
+
- [Backup](#backup)
|
|
46
|
+
- [Borderou (Bank Reconciliation)](#borderou-bank-reconciliation)
|
|
47
|
+
- [Storage Config](#storage-config)
|
|
48
|
+
- [Import](#import)
|
|
49
|
+
- [CPV Codes](#cpv-codes)
|
|
50
|
+
- [NC Codes](#nc-codes)
|
|
51
|
+
|
|
52
|
+
**Total tools: 236**
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## Authentication
|
|
57
|
+
|
|
58
|
+
### `auth_login`
|
|
59
|
+
|
|
60
|
+
Authenticate with the Storno.ro API using email and password. Returns JWT access and refresh tokens, and stores them in the session config for all subsequent requests. Must be called before any other tool if STORNO_TOKEN is not set.
|
|
61
|
+
|
|
62
|
+
**Parameters:**
|
|
63
|
+
|
|
64
|
+
| Name | Type | Required | Description |
|
|
65
|
+
|------|------|----------|-------------|
|
|
66
|
+
| `email` | string | Yes | User email address |
|
|
67
|
+
| `password` | string | Yes | User password |
|
|
68
|
+
|
|
69
|
+
### `auth_register`
|
|
70
|
+
|
|
71
|
+
Create a new Storno.ro user account. A default organization is automatically created. Returns JWT tokens on success.
|
|
72
|
+
|
|
73
|
+
**Parameters:**
|
|
74
|
+
|
|
75
|
+
| Name | Type | Required | Description |
|
|
76
|
+
|------|------|----------|-------------|
|
|
77
|
+
| `email` | string | Yes | Email address for the new account (must be unique) |
|
|
78
|
+
| `password` | string | Yes | Password (minimum 8 characters) |
|
|
79
|
+
| `firstName` | string | No | User's first name |
|
|
80
|
+
| `lastName` | string | No | User's last name |
|
|
81
|
+
|
|
82
|
+
### `auth_refresh`
|
|
83
|
+
|
|
84
|
+
Refresh an expired JWT access token using the refresh token. Both tokens are rotated. The new tokens are stored in the session config. Use when the current token has expired.
|
|
85
|
+
|
|
86
|
+
**Parameters:**
|
|
87
|
+
|
|
88
|
+
| Name | Type | Required | Description |
|
|
89
|
+
|------|------|----------|-------------|
|
|
90
|
+
| `refreshToken` | string | No | Refresh token to use. If omitted, uses the token stored in session config (STORNO_REFRESH_TOKEN). |
|
|
91
|
+
|
|
92
|
+
### `auth_me`
|
|
93
|
+
|
|
94
|
+
Get the current authenticated user profile including organization memberships and subscription plan. Returns flat JSON with user, organization, memberships, and subscription.
|
|
95
|
+
|
|
96
|
+
*No parameters required.*
|
|
97
|
+
|
|
98
|
+
### `auth_update_profile`
|
|
99
|
+
|
|
100
|
+
Update the authenticated user's profile. Can update name, phone, timezone, preferences, or change password (requires currentPassword when changing password).
|
|
101
|
+
|
|
102
|
+
**Parameters:**
|
|
103
|
+
|
|
104
|
+
| Name | Type | Required | Description |
|
|
105
|
+
|------|------|----------|-------------|
|
|
106
|
+
| `firstName` | string | No | User's first name |
|
|
107
|
+
| `lastName` | string | No | User's last name |
|
|
108
|
+
| `phone` | string | No | Phone number (E.164 format recommended, e.g., +40721234567) |
|
|
109
|
+
| `timezone` | string | No | Timezone in IANA format (e.g., Europe/Bucharest) |
|
|
110
|
+
| `preferences` | string | No | User preferences object (language, theme, notifications, etc.) |
|
|
111
|
+
| `password` | string | No | New password (requires currentPassword to also be provided) |
|
|
112
|
+
| `currentPassword` | string | No | Current password (required when changing password) |
|
|
113
|
+
|
|
114
|
+
### `auth_forgot_password`
|
|
115
|
+
|
|
116
|
+
Request a password reset email. Always returns success to prevent user enumeration — the email is only sent if the account exists. The reset link is valid for 1 hour.
|
|
117
|
+
|
|
118
|
+
**Parameters:**
|
|
119
|
+
|
|
120
|
+
| Name | Type | Required | Description |
|
|
121
|
+
|------|------|----------|-------------|
|
|
122
|
+
| `email` | string | Yes | Email address associated with the account |
|
|
123
|
+
|
|
124
|
+
### `auth_reset_password`
|
|
125
|
+
|
|
126
|
+
Reset a user password using the token received via email from auth_forgot_password. The token is single-use and expires after 1 hour. All existing sessions are revoked on success.
|
|
127
|
+
|
|
128
|
+
**Parameters:**
|
|
129
|
+
|
|
130
|
+
| Name | Type | Required | Description |
|
|
131
|
+
|------|------|----------|-------------|
|
|
132
|
+
| `token` | string | Yes | Password reset token received via email link (from URL query parameter) |
|
|
133
|
+
| `password` | string | Yes | New password (minimum 8 characters) |
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## Companies
|
|
138
|
+
|
|
139
|
+
### `companies_list`
|
|
140
|
+
|
|
141
|
+
List all companies belonging to the authenticated user's organization. Returns company details including CIF, addresses, bank info, sync settings, and ANAF token status. Use this to find company UUIDs for the companies_select tool.
|
|
142
|
+
|
|
143
|
+
*No parameters required.*
|
|
144
|
+
|
|
145
|
+
### `companies_get`
|
|
146
|
+
|
|
147
|
+
Get detailed information for a specific company by UUID. Returns all configuration settings, bank info, sync settings, and ANAF token validity status.
|
|
148
|
+
|
|
149
|
+
**Parameters:**
|
|
150
|
+
|
|
151
|
+
| Name | Type | Required | Description |
|
|
152
|
+
|------|------|----------|-------------|
|
|
153
|
+
| `uuid` | string | Yes | Company UUID |
|
|
154
|
+
|
|
155
|
+
### `companies_create`
|
|
156
|
+
|
|
157
|
+
Create a new company by providing its CIF (Romanian tax identification number). The system automatically validates the CIF with ANAF and retrieves official registration data (name, address, VAT status). The CIF can be provided with or without the RO prefix.
|
|
158
|
+
|
|
159
|
+
**Parameters:**
|
|
160
|
+
|
|
161
|
+
| Name | Type | Required | Description |
|
|
162
|
+
|------|------|----------|-------------|
|
|
163
|
+
| `cif` | string | Yes | Romanian tax identification number / CIF (e.g., "12345678" or "RO12345678") |
|
|
164
|
+
|
|
165
|
+
### `companies_update`
|
|
166
|
+
|
|
167
|
+
Update configuration settings for a company. Note: core ANAF data (CIF, registration number, VAT status, official address) cannot be modified as they are synced from official ANAF sources. Only editable fields like contact info, bank details, and sync settings can be changed.
|
|
168
|
+
|
|
169
|
+
**Parameters:**
|
|
170
|
+
|
|
171
|
+
| Name | Type | Required | Description |
|
|
172
|
+
|------|------|----------|-------------|
|
|
173
|
+
| `uuid` | string | Yes | Company UUID |
|
|
174
|
+
| `name` | string | No | Company display name |
|
|
175
|
+
| `bankName` | string | No | Bank name |
|
|
176
|
+
| `bankAccount` | string | No | IBAN account number |
|
|
177
|
+
| `bankBic` | string | No | BIC/SWIFT code |
|
|
178
|
+
| `defaultCurrency` | string | No | Default currency code (e.g., "RON", "EUR") |
|
|
179
|
+
| `phone` | string | No | Contact phone number |
|
|
180
|
+
| `email` | string | No | Contact email address |
|
|
181
|
+
| `syncDaysBack` | number | No | Number of days to sync back from ANAF (1-365) |
|
|
182
|
+
| `efacturaDelayHours` | number | No | Hours to delay e-Factura sync (0-72) |
|
|
183
|
+
| `archiveEnabled` | boolean | No | Enable automatic archiving |
|
|
184
|
+
| `archiveRetentionYears` | number | No | Years to retain archived data (1-50) |
|
|
185
|
+
| `enabledModules` | string[] \| null | No | Array of enabled module keys for sidebar visibility (null = all enabled). Valid keys: `delivery_notes`, `receipts`, `proforma_invoices`, `recurring_invoices`, `reports`, `efactura`, `spv_messages` |
|
|
186
|
+
|
|
187
|
+
### `companies_delete`
|
|
188
|
+
|
|
189
|
+
Permanently delete a company and all associated data (invoices, clients, products, ANAF tokens). This triggers an asynchronous cascade deletion. Only Owner or Admin roles can delete companies. This action cannot be undone.
|
|
190
|
+
|
|
191
|
+
**Parameters:**
|
|
192
|
+
|
|
193
|
+
| Name | Type | Required | Description |
|
|
194
|
+
|------|------|----------|-------------|
|
|
195
|
+
| `uuid` | string | Yes | Company UUID to delete |
|
|
196
|
+
|
|
197
|
+
### `companies_upload_logo`
|
|
198
|
+
|
|
199
|
+
Upload a logo image for a company. Accepts PNG, JPG, or SVG files up to 2MB. The logo appears on PDF documents.
|
|
200
|
+
|
|
201
|
+
**Parameters:**
|
|
202
|
+
|
|
203
|
+
| Name | Type | Required | Description |
|
|
204
|
+
|------|------|----------|-------------|
|
|
205
|
+
| `uuid` | string | Yes | Company UUID |
|
|
206
|
+
| `filePath` | string | Yes | Absolute path to the logo image file (PNG, JPG, or SVG) |
|
|
207
|
+
|
|
208
|
+
### `companies_delete_logo`
|
|
209
|
+
|
|
210
|
+
Remove the logo from a company.
|
|
211
|
+
|
|
212
|
+
**Parameters:**
|
|
213
|
+
|
|
214
|
+
| Name | Type | Required | Description |
|
|
215
|
+
|------|------|----------|-------------|
|
|
216
|
+
| `uuid` | string | Yes | Company UUID |
|
|
217
|
+
|
|
218
|
+
### `companies_set_active`
|
|
219
|
+
|
|
220
|
+
Set the organization-level active company by UUID. Calls `PUT /api/v1/companies/{uuid}/set-active` on the server and returns the updated list of all companies with the new active company reflected. Requires COMPANY_EDIT permission. Use `companies_list` first to find available company UUIDs.
|
|
221
|
+
|
|
222
|
+
**Parameters:**
|
|
223
|
+
|
|
224
|
+
| Name | Type | Required | Description |
|
|
225
|
+
|------|------|----------|-------------|
|
|
226
|
+
| `companyId` | string | Yes | Company UUID to mark as the active company for the organization. |
|
|
227
|
+
|
|
228
|
+
### `companies_select`
|
|
229
|
+
|
|
230
|
+
Select the active company for the current session. This sets the X-Company header used by all subsequent invoice, client, product, and other company-scoped requests. Call companies_list first to find available company UUIDs.
|
|
231
|
+
|
|
232
|
+
**Parameters:**
|
|
233
|
+
|
|
234
|
+
| Name | Type | Required | Description |
|
|
235
|
+
|------|------|----------|-------------|
|
|
236
|
+
| `companyId` | string | Yes | Company UUID to set as the active company for this session. All subsequent API calls will use this company context. |
|
|
237
|
+
|
|
238
|
+
---
|
|
239
|
+
|
|
240
|
+
## Invoices
|
|
241
|
+
|
|
242
|
+
### `invoices_list`
|
|
243
|
+
|
|
244
|
+
List invoices for the active company with pagination, filtering, and sorting. Supports filtering by status (draft/issued/sent_to_provider/validated/rejected/cancelled), direction (incoming/outgoing), date range, client, and search term. Returns paginated results with totals.
|
|
245
|
+
|
|
246
|
+
**Parameters:**
|
|
247
|
+
|
|
248
|
+
| Name | Type | Required | Description |
|
|
249
|
+
|------|------|----------|-------------|
|
|
250
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
251
|
+
| `page` | number | No | Page number (default: 1) |
|
|
252
|
+
| `limit` | number | No | Items per page, max 100 (default: 20) |
|
|
253
|
+
| `search` | string | No | Search term for invoice number or client name |
|
|
254
|
+
| `status` | enum(draft, issued, sent_to_provider, validated, rejected, cancelled) | No | Filter by invoice status |
|
|
255
|
+
| `direction` | enum(incoming, outgoing) | No | Filter by direction: incoming or outgoing invoices |
|
|
256
|
+
| `from` | string | No | Start date filter in ISO 8601 format (YYYY-MM-DD) |
|
|
257
|
+
| `to` | string | No | End date filter in ISO 8601 format (YYYY-MM-DD) |
|
|
258
|
+
| `clientId` | string | No | Filter by client UUID |
|
|
259
|
+
| `sort` | enum(issueDate, number, total, dueDate) | No | Field to sort by (default: issueDate) |
|
|
260
|
+
| `order` | enum(asc, desc) | No | Sort order: asc or desc (default: desc) |
|
|
261
|
+
|
|
262
|
+
### `invoices_get`
|
|
263
|
+
|
|
264
|
+
Get complete details for a specific invoice by UUID, including all line items, payment history, events timeline, attachments, client and supplier info, XML/PDF generation status, and ANAF submission details.
|
|
265
|
+
|
|
266
|
+
**Parameters:**
|
|
267
|
+
|
|
268
|
+
| Name | Type | Required | Description |
|
|
269
|
+
|------|------|----------|-------------|
|
|
270
|
+
| `uuid` | string | Yes | Invoice UUID |
|
|
271
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
272
|
+
|
|
273
|
+
### `invoices_create`
|
|
274
|
+
|
|
275
|
+
Create a new draft invoice. Requires a clientId and at least one line item. The invoice starts in "draft" status and can be edited until issued. Use invoices_issue to finalize and generate XML/PDF.
|
|
276
|
+
|
|
277
|
+
**Parameters:**
|
|
278
|
+
|
|
279
|
+
| Name | Type | Required | Description |
|
|
280
|
+
|------|------|----------|-------------|
|
|
281
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
282
|
+
| `clientId` | string | Yes | Client UUID (from clients_list) |
|
|
283
|
+
| `issueDate` | string | Yes | Invoice issue date in ISO 8601 format (YYYY-MM-DD) |
|
|
284
|
+
| `dueDate` | string | No | Payment due date in ISO 8601 format (YYYY-MM-DD) |
|
|
285
|
+
| `seriesId` | string | No | Invoice series UUID (from document_series_list). Uses default if not provided. |
|
|
286
|
+
| `currency` | string | No | ISO 4217 currency code (default: RON) |
|
|
287
|
+
| `exchangeRate` | number | No | Exchange rate relative to RON (default: 1.0) |
|
|
288
|
+
| `invoiceTypeCode` | string | No | UBL invoice type code: 380=commercial (default), 381=credit note, 384=corrected, 389=self-billed |
|
|
289
|
+
| `notes` | string | No | Public notes visible to the client |
|
|
290
|
+
| `paymentTerms` | string | No | Payment terms description (e.g., "Net 30") |
|
|
291
|
+
| `deliveryLocation` | string | No | Delivery address |
|
|
292
|
+
| `projectReference` | string | No | Project reference number |
|
|
293
|
+
| `orderNumber` | string | No | Purchase order number |
|
|
294
|
+
| `contractNumber` | string | No | Contract reference number |
|
|
295
|
+
| `issuerName` | string | No | Name of person issuing the invoice |
|
|
296
|
+
| `issuerId` | string | No | Issuer ID number |
|
|
297
|
+
| `mentions` | string | No | Additional legal mentions on the invoice |
|
|
298
|
+
| `internalNote` | string | No | Internal note (not visible to the client) |
|
|
299
|
+
| `salesAgent` | string | No | Sales agent name |
|
|
300
|
+
| `deputyName` | string | No | Deputy/representative name |
|
|
301
|
+
| `deputyIdentityCard` | string | No | Deputy ID card number |
|
|
302
|
+
| `deputyAuto` | string | No | Deputy vehicle registration number |
|
|
303
|
+
| `collect` | boolean | No | Create an immediate full payment record (default: false) |
|
|
304
|
+
| `penaltyEnabled` | boolean | No | Enable late payment penalty (default: false) |
|
|
305
|
+
| `penaltyPercentPerDay` | number | No | Daily penalty percentage (e.g., 0.05 for 0.05% per day) |
|
|
306
|
+
| `penaltyGraceDays` | number | No | Grace period in days before penalty starts applying |
|
|
307
|
+
| `autoApplyVatRules` | boolean | No | Auto-apply VAT rules: reverse charge for VIES-valid EU clients, OSS destination rate for non-VIES EU clients (default: false) |
|
|
308
|
+
| `vatIncluded` | boolean | No | When used with `autoApplyVatRules`, sets whether unit prices include VAT on all lines |
|
|
309
|
+
| `lines` | array | Yes | Invoice line items (at least one required) |
|
|
310
|
+
|
|
311
|
+
### `invoices_update`
|
|
312
|
+
|
|
313
|
+
Update an existing draft invoice. Only invoices with status "draft" can be updated. When updating the lines array, the entire array is replaced — include all lines you want to keep. Once issued, use invoices_cancel instead.
|
|
314
|
+
|
|
315
|
+
**Parameters:**
|
|
316
|
+
|
|
317
|
+
| Name | Type | Required | Description |
|
|
318
|
+
|------|------|----------|-------------|
|
|
319
|
+
| `uuid` | string | Yes | Invoice UUID to update |
|
|
320
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
321
|
+
| `clientId` | string | No | Client UUID |
|
|
322
|
+
| `seriesId` | string | No | Invoice series UUID |
|
|
323
|
+
| `issueDate` | string | No | Invoice issue date (YYYY-MM-DD) |
|
|
324
|
+
| `dueDate` | string | No | Payment due date (YYYY-MM-DD) |
|
|
325
|
+
| `currency` | string | No | ISO 4217 currency code |
|
|
326
|
+
| `exchangeRate` | number | No | Exchange rate relative to RON |
|
|
327
|
+
| `invoiceTypeCode` | string | No | UBL invoice type code |
|
|
328
|
+
| `notes` | string | No | Public notes visible to the client |
|
|
329
|
+
| `paymentTerms` | string | No | Payment terms description |
|
|
330
|
+
| `deliveryLocation` | string | No | Delivery address |
|
|
331
|
+
| `projectReference` | string | No | Project reference number |
|
|
332
|
+
| `orderNumber` | string | No | Purchase order number |
|
|
333
|
+
| `contractNumber` | string | No | Contract reference number |
|
|
334
|
+
| `issuerName` | string | No | Name of person issuing the invoice |
|
|
335
|
+
| `issuerId` | string | No | Issuer ID number |
|
|
336
|
+
| `mentions` | string | No | Additional legal mentions |
|
|
337
|
+
| `internalNote` | string | No | Internal note (not visible to client) |
|
|
338
|
+
| `salesAgent` | string | No | Sales agent name |
|
|
339
|
+
| `deputyName` | string | No | Deputy/representative name |
|
|
340
|
+
| `deputyIdentityCard` | string | No | Deputy ID card number |
|
|
341
|
+
| `deputyAuto` | string | No | Deputy vehicle registration |
|
|
342
|
+
| `penaltyEnabled` | boolean | No | Enable late payment penalty |
|
|
343
|
+
| `penaltyPercentPerDay` | number | No | Daily penalty percentage |
|
|
344
|
+
| `penaltyGraceDays` | number | No | Grace period before penalty applies |
|
|
345
|
+
| `autoApplyVatRules` | boolean | No | Auto-apply VAT rules: reverse charge for VIES-valid EU clients, OSS destination rate for non-VIES EU clients (default: false) |
|
|
346
|
+
| `vatIncluded` | boolean | No | When used with `autoApplyVatRules`, sets whether unit prices include VAT on all lines |
|
|
347
|
+
| `lines` | array | No | Invoice line items. WARNING: replaces all existing lines — include every line you want to keep. |
|
|
348
|
+
|
|
349
|
+
### `invoices_delete`
|
|
350
|
+
|
|
351
|
+
Permanently delete a draft invoice. Only invoices with status "draft" can be deleted. This action is irreversible. For issued invoices, use invoices_cancel instead.
|
|
352
|
+
|
|
353
|
+
**Parameters:**
|
|
354
|
+
|
|
355
|
+
| Name | Type | Required | Description |
|
|
356
|
+
|------|------|----------|-------------|
|
|
357
|
+
| `uuid` | string | Yes | Invoice UUID to delete |
|
|
358
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
359
|
+
|
|
360
|
+
### `invoices_issue`
|
|
361
|
+
|
|
362
|
+
Issue a draft invoice. Validates the data, assigns a series number, generates UBL 2.1 XML, generates PDF (Pro plan), and changes status from "draft" to "issued". Once issued, the invoice cannot be edited. Use invoices_submit to send to ANAF e-Factura.
|
|
363
|
+
|
|
364
|
+
**Parameters:**
|
|
365
|
+
|
|
366
|
+
| Name | Type | Required | Description |
|
|
367
|
+
|------|------|----------|-------------|
|
|
368
|
+
| `uuid` | string | Yes | Invoice UUID to issue |
|
|
369
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
370
|
+
|
|
371
|
+
### `invoices_submit`
|
|
372
|
+
|
|
373
|
+
Submit an issued invoice to the ANAF e-Factura system. The invoice must be in "issued" status. Changes status to "sent_to_provider". ANAF validates the invoice asynchronously — poll invoices_get or use invoices_events to check validation result.
|
|
374
|
+
|
|
375
|
+
**Parameters:**
|
|
376
|
+
|
|
377
|
+
| Name | Type | Required | Description |
|
|
378
|
+
|------|------|----------|-------------|
|
|
379
|
+
| `uuid` | string | Yes | Invoice UUID to submit to ANAF |
|
|
380
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
381
|
+
|
|
382
|
+
### `invoices_validate`
|
|
383
|
+
|
|
384
|
+
Validate an invoice before issuing or submitting. Returns a list of errors and warnings. Use mode "quick" for fast validation (basic rules) or "full" for comprehensive UBL Schematron and CIUS-RO compliance checks.
|
|
385
|
+
|
|
386
|
+
**Parameters:**
|
|
387
|
+
|
|
388
|
+
| Name | Type | Required | Description |
|
|
389
|
+
|------|------|----------|-------------|
|
|
390
|
+
| `uuid` | string | Yes | Invoice UUID to validate |
|
|
391
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
392
|
+
| `mode` | enum(quick, full) | No | Validation mode: "quick" for fast basic rules (default), "full" for UBL Schematron + CIUS-RO compliance (slower) |
|
|
393
|
+
|
|
394
|
+
### `invoices_cancel`
|
|
395
|
+
|
|
396
|
+
Cancel an issued invoice. Requires a cancellation reason (minimum 10 characters). Changes status to "cancelled". Cancelled invoices remain in the system for record-keeping. Use invoices_restore to undo an accidental cancellation.
|
|
397
|
+
|
|
398
|
+
**Parameters:**
|
|
399
|
+
|
|
400
|
+
| Name | Type | Required | Description |
|
|
401
|
+
|------|------|----------|-------------|
|
|
402
|
+
| `uuid` | string | Yes | Invoice UUID to cancel |
|
|
403
|
+
| `reason` | string | Yes | Reason for cancellation (minimum 10 characters) |
|
|
404
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
405
|
+
|
|
406
|
+
### `invoices_restore`
|
|
407
|
+
|
|
408
|
+
Restore a cancelled invoice back to "draft" status. Only for accidental cancellations. Cannot restore if the invoice was submitted to ANAF, has credit notes, or has recorded payments. The invoice can then be edited and reissued.
|
|
409
|
+
|
|
410
|
+
**Parameters:**
|
|
411
|
+
|
|
412
|
+
| Name | Type | Required | Description |
|
|
413
|
+
|------|------|----------|-------------|
|
|
414
|
+
| `uuid` | string | Yes | Invoice UUID to restore from cancelled status |
|
|
415
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
416
|
+
|
|
417
|
+
### `invoices_pdf`
|
|
418
|
+
|
|
419
|
+
Download the PDF representation of an invoice. Returns base64-encoded binary data with content type. Requires Pro plan. PDF is generated automatically on issue or on-demand when first requested.
|
|
420
|
+
|
|
421
|
+
**Parameters:**
|
|
422
|
+
|
|
423
|
+
| Name | Type | Required | Description |
|
|
424
|
+
|------|------|----------|-------------|
|
|
425
|
+
| `uuid` | string | Yes | Invoice UUID |
|
|
426
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
427
|
+
|
|
428
|
+
### `invoices_xml`
|
|
429
|
+
|
|
430
|
+
Download the UBL 2.1 XML file for an issued invoice. Returns the XML text content. The XML is the format required for ANAF e-Factura submission and conforms to CIUS-RO and EN 16931 standards.
|
|
431
|
+
|
|
432
|
+
**Parameters:**
|
|
433
|
+
|
|
434
|
+
| Name | Type | Required | Description |
|
|
435
|
+
|------|------|----------|-------------|
|
|
436
|
+
| `uuid` | string | Yes | Invoice UUID |
|
|
437
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
438
|
+
|
|
439
|
+
### `invoices_email`
|
|
440
|
+
|
|
441
|
+
Send an invoice via email with optional PDF and XML attachments. Use invoices_email_defaults first to get pre-filled subject and body. Emails are sent asynchronously via queue. PDF attachment requires Pro plan.
|
|
442
|
+
|
|
443
|
+
**Parameters:**
|
|
444
|
+
|
|
445
|
+
| Name | Type | Required | Description |
|
|
446
|
+
|------|------|----------|-------------|
|
|
447
|
+
| `uuid` | string | Yes | Invoice UUID to email |
|
|
448
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
449
|
+
| `to` | string | Yes | Recipient email address |
|
|
450
|
+
| `cc` | string | No | CC email address (comma-separated for multiple) |
|
|
451
|
+
| `bcc` | string | No | BCC email address (comma-separated for multiple) |
|
|
452
|
+
| `subject` | string | No | Email subject (uses default template if not provided) |
|
|
453
|
+
| `body` | string | No | Email body text (uses default template if not provided) |
|
|
454
|
+
| `attachPdf` | boolean | No | Attach PDF invoice (default: true, requires Pro plan) |
|
|
455
|
+
| `attachXml` | boolean | No | Attach UBL XML file (default: false) |
|
|
456
|
+
| `language` | enum(ro, en) | No | Email template language: ro (default) or en |
|
|
457
|
+
|
|
458
|
+
### `invoices_email_defaults`
|
|
459
|
+
|
|
460
|
+
Get pre-filled email content for an invoice based on the company email template. Returns suggested "to", "cc", "subject", and "body" with template variables already substituted. Use this to populate the email form before calling invoices_email.
|
|
461
|
+
|
|
462
|
+
**Parameters:**
|
|
463
|
+
|
|
464
|
+
| Name | Type | Required | Description |
|
|
465
|
+
|------|------|----------|-------------|
|
|
466
|
+
| `uuid` | string | Yes | Invoice UUID |
|
|
467
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
468
|
+
| `language` | enum(ro, en) | No | Email language: ro (default) or en |
|
|
469
|
+
|
|
470
|
+
### `invoices_email_history`
|
|
471
|
+
|
|
472
|
+
Get the complete history of emails sent for an invoice, including delivery status, open/click tracking, bounce information, and who sent each email. Useful for audit trails and verifying client received the invoice.
|
|
473
|
+
|
|
474
|
+
**Parameters:**
|
|
475
|
+
|
|
476
|
+
| Name | Type | Required | Description |
|
|
477
|
+
|------|------|----------|-------------|
|
|
478
|
+
| `uuid` | string | Yes | Invoice UUID |
|
|
479
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
480
|
+
|
|
481
|
+
### `invoices_events`
|
|
482
|
+
|
|
483
|
+
Get the complete timeline of events for an invoice: status changes, ANAF submissions, validations, emails sent, payments received, and user actions. Useful for audit trails, debugging, and understanding invoice lifecycle history.
|
|
484
|
+
|
|
485
|
+
**Parameters:**
|
|
486
|
+
|
|
487
|
+
| Name | Type | Required | Description |
|
|
488
|
+
|------|------|----------|-------------|
|
|
489
|
+
| `uuid` | string | Yes | Invoice UUID |
|
|
490
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
491
|
+
|
|
492
|
+
### `invoices_attachments`
|
|
493
|
+
|
|
494
|
+
Download a file attachment from an invoice. Returns base64-encoded binary data with the MIME type. Get attachment UUIDs from invoices_get (the "attachments" array). Supports PDF, images, Word, Excel, ZIP, and other file types.
|
|
495
|
+
|
|
496
|
+
**Parameters:**
|
|
497
|
+
|
|
498
|
+
| Name | Type | Required | Description |
|
|
499
|
+
|------|------|----------|-------------|
|
|
500
|
+
| `uuid` | string | Yes | Invoice UUID |
|
|
501
|
+
| `attachmentId` | string | Yes | Attachment UUID (from invoices_get attachments array) |
|
|
502
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
503
|
+
|
|
504
|
+
### `invoices_verify_signature`
|
|
505
|
+
|
|
506
|
+
Verify the ANAF digital signature on a validated invoice. Checks certificate validity, signature cryptographic integrity, and XML content integrity. Requires Pro plan and the invoice must be in "validated" status (ANAF-signed).
|
|
507
|
+
|
|
508
|
+
**Parameters:**
|
|
509
|
+
|
|
510
|
+
| Name | Type | Required | Description |
|
|
511
|
+
|------|------|----------|-------------|
|
|
512
|
+
| `uuid` | string | Yes | Invoice UUID (must be ANAF-validated) |
|
|
513
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
514
|
+
|
|
515
|
+
### `invoices_export_csv`
|
|
516
|
+
|
|
517
|
+
Export a filtered list of invoices to CSV format. Accepts the same filters as invoices_list (status, direction, date range, client, etc.). Returns CSV text with UTF-8 BOM for Excel compatibility. Max 10,000 invoices; use invoices_export_zip for large exports with files.
|
|
518
|
+
|
|
519
|
+
**Parameters:**
|
|
520
|
+
|
|
521
|
+
| Name | Type | Required | Description |
|
|
522
|
+
|------|------|----------|-------------|
|
|
523
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
524
|
+
| `search` | string | No | Search term for invoice number or client name |
|
|
525
|
+
| `status` | enum(draft, issued, sent_to_provider, validated, rejected, cancelled) | No | Filter by invoice status |
|
|
526
|
+
| `direction` | enum(incoming, outgoing) | No | Filter by direction |
|
|
527
|
+
| `from` | string | No | Start date (YYYY-MM-DD) |
|
|
528
|
+
| `to` | string | No | End date (YYYY-MM-DD) |
|
|
529
|
+
| `clientId` | string | No | Filter by client UUID |
|
|
530
|
+
| `sort` | enum(issueDate, number, total, dueDate) | No | Sort field |
|
|
531
|
+
| `order` | enum(asc, desc) | No | Sort order |
|
|
532
|
+
|
|
533
|
+
### `invoices_export_zip`
|
|
534
|
+
|
|
535
|
+
Export a set of invoices (by UUID list) to a ZIP archive containing PDFs, XMLs, and a CSV summary. Processed asynchronously — returns an exportId and statusUrl. Poll the statusUrl or wait for webhook. Requires Pro plan. Max 100 invoices per export.
|
|
536
|
+
|
|
537
|
+
**Parameters:**
|
|
538
|
+
|
|
539
|
+
| Name | Type | Required | Description |
|
|
540
|
+
|------|------|----------|-------------|
|
|
541
|
+
| `invoiceIds` | array | Yes | Array of invoice UUIDs to include in the ZIP (max 100) |
|
|
542
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
543
|
+
| `includePdf` | boolean | No | Include PDF files in ZIP (default: true, requires Pro plan) |
|
|
544
|
+
| `includeXml` | boolean | No | Include UBL XML files in ZIP (default: true) |
|
|
545
|
+
| `includeCsv` | boolean | No | Include CSV summary in ZIP (default: true) |
|
|
546
|
+
| `folderStructure` | enum(flat, by-client, by-month, by-series) | No | ZIP folder organization: flat (default), by-client, by-month, or by-series |
|
|
547
|
+
|
|
548
|
+
### `invoices_bulk_delete`
|
|
549
|
+
|
|
550
|
+
Delete multiple draft invoices in batch. Only draft invoices can be deleted. Returns count of deleted and any errors.
|
|
551
|
+
|
|
552
|
+
**Parameters:**
|
|
553
|
+
|
|
554
|
+
| Name | Type | Required | Description |
|
|
555
|
+
|------|------|----------|-------------|
|
|
556
|
+
| `ids` | array | Yes | Array of invoice UUIDs to delete (1-100) |
|
|
557
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
558
|
+
|
|
559
|
+
### `invoices_bulk_cancel`
|
|
560
|
+
|
|
561
|
+
Cancel multiple invoices in batch with optional reason. Returns count of cancelled and any errors.
|
|
562
|
+
|
|
563
|
+
**Parameters:**
|
|
564
|
+
|
|
565
|
+
| Name | Type | Required | Description |
|
|
566
|
+
|------|------|----------|-------------|
|
|
567
|
+
| `ids` | array | Yes | Array of invoice UUIDs to cancel (1-100) |
|
|
568
|
+
| `reason` | string | No | Cancellation reason applied to all invoices |
|
|
569
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
570
|
+
|
|
571
|
+
### `invoices_bulk_storno`
|
|
572
|
+
|
|
573
|
+
Create storno (refund/credit note) invoices for multiple invoices. Only outgoing, issued/validated invoices are eligible. Returns count of created storno invoices and any errors.
|
|
574
|
+
|
|
575
|
+
**Parameters:**
|
|
576
|
+
|
|
577
|
+
| Name | Type | Required | Description |
|
|
578
|
+
|------|------|----------|-------------|
|
|
579
|
+
| `ids` | array | Yes | Array of invoice UUIDs to create storno for (1-100) |
|
|
580
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
581
|
+
|
|
582
|
+
### `invoices_bulk_mark_paid`
|
|
583
|
+
|
|
584
|
+
Mark multiple invoices as fully paid. Creates payment records for the remaining balance on each invoice.
|
|
585
|
+
|
|
586
|
+
**Parameters:**
|
|
587
|
+
|
|
588
|
+
| Name | Type | Required | Description |
|
|
589
|
+
|------|------|----------|-------------|
|
|
590
|
+
| `ids` | array | Yes | Array of invoice UUIDs to mark as paid (1-100) |
|
|
591
|
+
| `paymentMethod` | string | No | Payment method (default: bank_transfer) |
|
|
592
|
+
| `paidAt` | string | No | Payment date in ISO 8601 format (YYYY-MM-DD). Defaults to today. |
|
|
593
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
594
|
+
|
|
595
|
+
### `invoices_export_saga_xml`
|
|
596
|
+
|
|
597
|
+
Export invoices in Saga XML format for accounting software integration (e.g., Saga C). Accepts the same filters as invoices_list.
|
|
598
|
+
|
|
599
|
+
**Parameters:**
|
|
600
|
+
|
|
601
|
+
| Name | Type | Required | Description |
|
|
602
|
+
|------|------|----------|-------------|
|
|
603
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
604
|
+
| `search` | string | No | Search term for invoice number or client name |
|
|
605
|
+
| `status` | enum(draft, issued, sent_to_provider, validated, rejected, cancelled) | No | Filter by invoice status |
|
|
606
|
+
| `direction` | enum(incoming, outgoing) | No | Filter by direction |
|
|
607
|
+
| `from` | string | No | Start date (YYYY-MM-DD) |
|
|
608
|
+
| `to` | string | No | End date (YYYY-MM-DD) |
|
|
609
|
+
| `clientId` | string | No | Filter by client UUID |
|
|
610
|
+
| `sort` | enum(issueDate, number, total, dueDate) | No | Sort field |
|
|
611
|
+
| `order` | enum(asc, desc) | No | Sort order |
|
|
612
|
+
|
|
613
|
+
### `invoices_export_receipts_saga_xml`
|
|
614
|
+
|
|
615
|
+
Export payment receipts (incasari) in Saga XML format. Exports all outgoing invoice payments for accounting integration.
|
|
616
|
+
|
|
617
|
+
**Parameters:**
|
|
618
|
+
|
|
619
|
+
| Name | Type | Required | Description |
|
|
620
|
+
|------|------|----------|-------------|
|
|
621
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
622
|
+
|
|
623
|
+
### `invoices_export_payments_saga_xml`
|
|
624
|
+
|
|
625
|
+
Export supplier payments (plati) in Saga XML format. Exports all incoming invoice payments for accounting integration.
|
|
626
|
+
|
|
627
|
+
**Parameters:**
|
|
628
|
+
|
|
629
|
+
| Name | Type | Required | Description |
|
|
630
|
+
|------|------|----------|-------------|
|
|
631
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
632
|
+
|
|
633
|
+
### `invoices_export_efactura_zip`
|
|
634
|
+
|
|
635
|
+
Export e-Factura XML files as ZIP archive. For large batches (>100 invoices), processed asynchronously with notification.
|
|
636
|
+
|
|
637
|
+
**Parameters:**
|
|
638
|
+
|
|
639
|
+
| Name | Type | Required | Description |
|
|
640
|
+
|------|------|----------|-------------|
|
|
641
|
+
| `direction` | enum(outgoing, incoming) | Yes | Invoice direction |
|
|
642
|
+
| `dateFrom` | string | No | Start date filter (YYYY-MM-DD) |
|
|
643
|
+
| `dateTo` | string | No | End date filter (YYYY-MM-DD) |
|
|
644
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
645
|
+
|
|
646
|
+
### `invoices_share_links_list`
|
|
647
|
+
|
|
648
|
+
List all share links for an invoice with view counts, expiry info, and status.
|
|
649
|
+
|
|
650
|
+
**Parameters:**
|
|
651
|
+
|
|
652
|
+
| Name | Type | Required | Description |
|
|
653
|
+
|------|------|----------|-------------|
|
|
654
|
+
| `uuid` | string | Yes | Invoice UUID |
|
|
655
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
656
|
+
|
|
657
|
+
### `invoices_share_links_create`
|
|
658
|
+
|
|
659
|
+
Create a new shareable link for an invoice. Returns the share URL, token, and expiry date.
|
|
660
|
+
|
|
661
|
+
**Parameters:**
|
|
662
|
+
|
|
663
|
+
| Name | Type | Required | Description |
|
|
664
|
+
|------|------|----------|-------------|
|
|
665
|
+
| `uuid` | string | Yes | Invoice UUID |
|
|
666
|
+
| `expiryDays` | number | No | Number of days until link expires (default: 30) |
|
|
667
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
668
|
+
|
|
669
|
+
### `invoices_share_links_revoke`
|
|
670
|
+
|
|
671
|
+
Revoke/delete a share link, making it permanently inaccessible.
|
|
672
|
+
|
|
673
|
+
**Parameters:**
|
|
674
|
+
|
|
675
|
+
| Name | Type | Required | Description |
|
|
676
|
+
|------|------|----------|-------------|
|
|
677
|
+
| `uuid` | string | Yes | Invoice UUID |
|
|
678
|
+
| `linkId` | string | Yes | Share link UUID to revoke |
|
|
679
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
680
|
+
|
|
681
|
+
---
|
|
682
|
+
|
|
683
|
+
## Clients
|
|
684
|
+
|
|
685
|
+
### `clients_list`
|
|
686
|
+
|
|
687
|
+
List clients for the active company. Results are grouped alphabetically by name and can be filtered by type (company/individual) or searched by name, CUI/CNP, or email.
|
|
688
|
+
|
|
689
|
+
**Parameters:**
|
|
690
|
+
|
|
691
|
+
| Name | Type | Required | Description |
|
|
692
|
+
|------|------|----------|-------------|
|
|
693
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
694
|
+
| `page` | number | No | Page number (default: 1) |
|
|
695
|
+
| `limit` | number | No | Items per page, max 200 (default: 50) |
|
|
696
|
+
| `search` | string | No | Search term to filter by name, CUI/CNP, or email |
|
|
697
|
+
| `type` | enum(company, individual) | No | Filter by client type: "company" or "individual" |
|
|
698
|
+
|
|
699
|
+
### `clients_get`
|
|
700
|
+
|
|
701
|
+
Get detailed information about a specific client by UUID, including invoice history, delivery note history, receipt history, and document counts.
|
|
702
|
+
|
|
703
|
+
**Parameters:**
|
|
704
|
+
|
|
705
|
+
| Name | Type | Required | Description |
|
|
706
|
+
|------|------|----------|-------------|
|
|
707
|
+
| `uuid` | string | Yes | Client UUID |
|
|
708
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
709
|
+
|
|
710
|
+
### `clients_create`
|
|
711
|
+
|
|
712
|
+
Create a new client manually. Requires at least a name. If a CUI is provided and a client with that CUI already exists, returns the existing client instead of creating a duplicate.
|
|
713
|
+
|
|
714
|
+
**Parameters:**
|
|
715
|
+
|
|
716
|
+
| Name | Type | Required | Description |
|
|
717
|
+
|------|------|----------|-------------|
|
|
718
|
+
| `name` | string | Yes | Client name |
|
|
719
|
+
| `type` | enum(company, individual) | No | Client type (default: company) |
|
|
720
|
+
| `cui` | string | No | Tax identification number (CUI/CIF) |
|
|
721
|
+
| `cnp` | string | No | Personal identification number (for individuals) |
|
|
722
|
+
| `vatCode` | string | No | VAT code (e.g., RO12345678) |
|
|
723
|
+
| `isVatPayer` | boolean | No | Whether the client is a VAT payer |
|
|
724
|
+
| `registrationNumber` | string | No | Trade register number (Nr. Reg. Com.) |
|
|
725
|
+
| `address` | string | No | Street address |
|
|
726
|
+
| `city` | string | No | City |
|
|
727
|
+
| `county` | string | No | County/state |
|
|
728
|
+
| `country` | string | No | ISO country code (default: RO) |
|
|
729
|
+
| `postalCode` | string | No | Postal code |
|
|
730
|
+
| `email` | string | No | Contact email |
|
|
731
|
+
| `phone` | string | No | Contact phone |
|
|
732
|
+
| `bankName` | string | No | Bank name |
|
|
733
|
+
| `bankAccount` | string | No | IBAN or bank account number |
|
|
734
|
+
| `defaultPaymentTermDays` | number | No | Default payment term in days |
|
|
735
|
+
| `contactPerson` | string | No | Contact person name |
|
|
736
|
+
| `notes` | string | No | Internal notes |
|
|
737
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
738
|
+
|
|
739
|
+
### `clients_update`
|
|
740
|
+
|
|
741
|
+
Update an existing client. Only provided fields are updated; omitted fields remain unchanged.
|
|
742
|
+
|
|
743
|
+
**Parameters:**
|
|
744
|
+
|
|
745
|
+
| Name | Type | Required | Description |
|
|
746
|
+
|------|------|----------|-------------|
|
|
747
|
+
| `uuid` | string | Yes | Client UUID to update |
|
|
748
|
+
| `name` | string | No | Client name |
|
|
749
|
+
| `type` | enum(company, individual) | No | Client type |
|
|
750
|
+
| `cui` | string | No | Tax identification number |
|
|
751
|
+
| `cnp` | string | No | Personal identification number |
|
|
752
|
+
| `vatCode` | string | No | VAT code |
|
|
753
|
+
| `isVatPayer` | boolean | No | Whether the client is a VAT payer |
|
|
754
|
+
| `registrationNumber` | string | No | Trade register number |
|
|
755
|
+
| `address` | string | No | Street address |
|
|
756
|
+
| `city` | string | No | City |
|
|
757
|
+
| `county` | string | No | County/state |
|
|
758
|
+
| `country` | string | No | ISO country code |
|
|
759
|
+
| `postalCode` | string | No | Postal code |
|
|
760
|
+
| `email` | string | No | Contact email |
|
|
761
|
+
| `phone` | string | No | Contact phone |
|
|
762
|
+
| `bankName` | string | No | Bank name |
|
|
763
|
+
| `bankAccount` | string | No | IBAN or bank account number |
|
|
764
|
+
| `defaultPaymentTermDays` | number | No | Default payment term in days |
|
|
765
|
+
| `contactPerson` | string | No | Contact person name |
|
|
766
|
+
| `notes` | string | No | Internal notes |
|
|
767
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
768
|
+
|
|
769
|
+
### `clients_delete`
|
|
770
|
+
|
|
771
|
+
Soft-delete a client. The client is marked as deleted but remains in the database for historical records.
|
|
772
|
+
|
|
773
|
+
**Parameters:**
|
|
774
|
+
|
|
775
|
+
| Name | Type | Required | Description |
|
|
776
|
+
|------|------|----------|-------------|
|
|
777
|
+
| `uuid` | string | Yes | Client UUID to delete |
|
|
778
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
779
|
+
|
|
780
|
+
### `clients_bulk_delete`
|
|
781
|
+
|
|
782
|
+
Delete multiple clients in batch. Returns count of deleted and any errors.
|
|
783
|
+
|
|
784
|
+
**Parameters:**
|
|
785
|
+
|
|
786
|
+
| Name | Type | Required | Description |
|
|
787
|
+
|------|------|----------|-------------|
|
|
788
|
+
| `ids` | array | Yes | Array of client UUIDs to delete (1-100) |
|
|
789
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
790
|
+
|
|
791
|
+
### `clients_anaf_lookup`
|
|
792
|
+
|
|
793
|
+
Lookup company details by CUI in ANAF without creating a client. Returns pre-filled form data (name, address, VAT info, etc.) that can be used with clients_create.
|
|
794
|
+
|
|
795
|
+
**Parameters:**
|
|
796
|
+
|
|
797
|
+
| Name | Type | Required | Description |
|
|
798
|
+
|------|------|----------|-------------|
|
|
799
|
+
| `cui` | string | Yes | CUI/CIF to look up (with or without RO prefix) |
|
|
800
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
801
|
+
|
|
802
|
+
### `clients_vies_lookup`
|
|
803
|
+
|
|
804
|
+
Validate a VAT code against the EU VIES system. Returns whether the VAT number is valid and the registered company name/address. Use this to verify EU intra-community VAT numbers before applying reverse charge.
|
|
805
|
+
|
|
806
|
+
**Parameters:**
|
|
807
|
+
|
|
808
|
+
| Name | Type | Required | Description |
|
|
809
|
+
|------|------|----------|-------------|
|
|
810
|
+
| `vatCode` | string | Yes | Full EU VAT code including country prefix (e.g., DE123456789, FR12345678901) |
|
|
811
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
812
|
+
|
|
813
|
+
### `clients_from_registry`
|
|
814
|
+
|
|
815
|
+
Create a client from the ONRC registry with ANAF validation. Looks up the CUI in ANAF and auto-fills all available details. If a client with the same CUI already exists, returns the existing one.
|
|
816
|
+
|
|
817
|
+
**Parameters:**
|
|
818
|
+
|
|
819
|
+
| Name | Type | Required | Description |
|
|
820
|
+
|------|------|----------|-------------|
|
|
821
|
+
| `cui` | string | Yes | CUI/CIF of the company to add (with or without RO prefix) |
|
|
822
|
+
| `name` | string | No | Fallback name if ANAF lookup fails |
|
|
823
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
824
|
+
|
|
825
|
+
### `clients_export_csv`
|
|
826
|
+
|
|
827
|
+
Export all clients as a CSV file. Returns binary CSV data with UTF-8 BOM for Excel compatibility.
|
|
828
|
+
|
|
829
|
+
**Parameters:**
|
|
830
|
+
|
|
831
|
+
| Name | Type | Required | Description |
|
|
832
|
+
|------|------|----------|-------------|
|
|
833
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
834
|
+
|
|
835
|
+
### `clients_export_saga_xml`
|
|
836
|
+
|
|
837
|
+
Export clients in Saga XML format for accounting software integration (e.g., Saga C).
|
|
838
|
+
|
|
839
|
+
**Parameters:**
|
|
840
|
+
|
|
841
|
+
| Name | Type | Required | Description |
|
|
842
|
+
|------|------|----------|-------------|
|
|
843
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
844
|
+
|
|
845
|
+
---
|
|
846
|
+
|
|
847
|
+
## Products
|
|
848
|
+
|
|
849
|
+
### `products_list`
|
|
850
|
+
|
|
851
|
+
List products for the active company. Products are sync-only and are automatically extracted from invoice line items during ANAF synchronization — they cannot be manually created or edited. Results can be filtered by active status and searched by name, code, or description.
|
|
852
|
+
|
|
853
|
+
**Parameters:**
|
|
854
|
+
|
|
855
|
+
| Name | Type | Required | Description |
|
|
856
|
+
|------|------|----------|-------------|
|
|
857
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
858
|
+
| `page` | number | No | Page number (default: 1) |
|
|
859
|
+
| `limit` | number | No | Items per page, max 200 (default: 50) |
|
|
860
|
+
| `search` | string | No | Search term to filter by product name, code, or description |
|
|
861
|
+
| `isActive` | boolean | No | Filter by active status (true = active only, false = inactive only) |
|
|
862
|
+
|
|
863
|
+
### `products_get`
|
|
864
|
+
|
|
865
|
+
Get detailed information about a specific product by UUID, including usage statistics (total usage count, total revenue generated, average quantity, first and last usage dates).
|
|
866
|
+
|
|
867
|
+
**Parameters:**
|
|
868
|
+
|
|
869
|
+
| Name | Type | Required | Description |
|
|
870
|
+
|------|------|----------|-------------|
|
|
871
|
+
| `uuid` | string | Yes | Product UUID |
|
|
872
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
873
|
+
|
|
874
|
+
---
|
|
875
|
+
|
|
876
|
+
## Payments
|
|
877
|
+
|
|
878
|
+
### `payments_list`
|
|
879
|
+
|
|
880
|
+
List all payments recorded for a specific invoice, ordered by payment date (most recent first). Returns payment amount, date, method, reference number, and notes. The sum of payments determines the invoice amountPaid and balance.
|
|
881
|
+
|
|
882
|
+
**Parameters:**
|
|
883
|
+
|
|
884
|
+
| Name | Type | Required | Description |
|
|
885
|
+
|------|------|----------|-------------|
|
|
886
|
+
| `invoiceId` | string | Yes | Invoice UUID to list payments for |
|
|
887
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
888
|
+
|
|
889
|
+
### `payments_create`
|
|
890
|
+
|
|
891
|
+
Record a payment received for an invoice. Updates the invoice amountPaid and balance, and automatically changes invoice status to "partially_paid" or "paid" as appropriate. Supports partial payments with full details (method, reference, notes).
|
|
892
|
+
|
|
893
|
+
**Parameters:**
|
|
894
|
+
|
|
895
|
+
| Name | Type | Required | Description |
|
|
896
|
+
|------|------|----------|-------------|
|
|
897
|
+
| `invoiceId` | string | Yes | Invoice UUID to record payment for |
|
|
898
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
899
|
+
| `amount` | number | Yes | Payment amount (must be greater than 0) |
|
|
900
|
+
| `paymentDate` | string | Yes | Date payment was received in ISO 8601 format (YYYY-MM-DD) |
|
|
901
|
+
| `paymentMethod` | enum(bank_transfer, cash, card, other) | No | Payment method: bank_transfer (default), cash, card, or other |
|
|
902
|
+
| `currency` | string | No | Currency code (ISO 4217). Defaults to invoice currency. Include if payment is in a different currency. |
|
|
903
|
+
| `reference` | string | No | Payment reference number (e.g., bank transfer reference, receipt number) |
|
|
904
|
+
| `notes` | string | No | Additional notes about this payment |
|
|
905
|
+
|
|
906
|
+
### `payments_delete`
|
|
907
|
+
|
|
908
|
+
Permanently delete a recorded payment from an invoice. Updates the invoice amountPaid and balance, and may change the invoice status back to "unpaid" or "partially_paid". This action is irreversible — use with caution for corrections.
|
|
909
|
+
|
|
910
|
+
**Parameters:**
|
|
911
|
+
|
|
912
|
+
| Name | Type | Required | Description |
|
|
913
|
+
|------|------|----------|-------------|
|
|
914
|
+
| `invoiceId` | string | Yes | Invoice UUID |
|
|
915
|
+
| `paymentId` | string | Yes | Payment UUID to delete (from payments_list) |
|
|
916
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
917
|
+
|
|
918
|
+
---
|
|
919
|
+
|
|
920
|
+
## Invoice Defaults
|
|
921
|
+
|
|
922
|
+
### `defaults_invoice`
|
|
923
|
+
|
|
924
|
+
Get all default values and dropdown options needed for invoice creation. Returns VAT rates, currencies with symbols, payment terms (in days), units of measure, payment methods, and current BNR exchange rates for EUR/USD/GBP/CHF relative to RON. Always fetch this before creating invoices — never hardcode these values.
|
|
925
|
+
|
|
926
|
+
**Parameters:**
|
|
927
|
+
|
|
928
|
+
| Name | Type | Required | Description |
|
|
929
|
+
|------|------|----------|-------------|
|
|
930
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
931
|
+
|
|
932
|
+
---
|
|
933
|
+
|
|
934
|
+
## VAT Rates
|
|
935
|
+
|
|
936
|
+
### `vat_rates_list`
|
|
937
|
+
|
|
938
|
+
List all VAT rates configured for the active company, sorted by display position. Returns rate percentage, display label, e-Factura category code, and which rate is the default. Common Romanian rates: 19% (standard), 9% (reduced), 5% (super-reduced), 0% (exempt).
|
|
939
|
+
|
|
940
|
+
**Parameters:**
|
|
941
|
+
|
|
942
|
+
| Name | Type | Required | Description |
|
|
943
|
+
|------|------|----------|-------------|
|
|
944
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
945
|
+
|
|
946
|
+
### `vat_rates_create`
|
|
947
|
+
|
|
948
|
+
Create a new VAT rate for the active company. If isDefault is true, any existing default rate is demoted. If this is the first VAT rate, it automatically becomes the default. Common e-Factura category codes: S=standard, AA=reduced, E=exempt, O=outside scope, Z=zero rated, AE=reverse charge.
|
|
949
|
+
|
|
950
|
+
**Parameters:**
|
|
951
|
+
|
|
952
|
+
| Name | Type | Required | Description |
|
|
953
|
+
|------|------|----------|-------------|
|
|
954
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
955
|
+
| `rate` | number | Yes | VAT percentage (e.g., 19 for 19%, 0 for exempt) |
|
|
956
|
+
| `label` | string | Yes | Display label shown in dropdowns (e.g., "TVA 19%", "Scutit") |
|
|
957
|
+
| `categoryCode` | string | No | e-Factura category code (default: "S"). Options: S, AA, E, O, Z, AE |
|
|
958
|
+
| `isDefault` | boolean | No | Set this as the default VAT rate for new invoice lines (default: false) |
|
|
959
|
+
| `position` | number | No | Display order position in dropdowns (lower = first). Auto-assigned if not provided. |
|
|
960
|
+
|
|
961
|
+
### `vat_rates_update`
|
|
962
|
+
|
|
963
|
+
Update an existing VAT rate. Note: changing the rate percentage does not retroactively affect existing invoices — those preserve the original rate. Only updates display label, category code, default status, or position. At least one field must be provided.
|
|
964
|
+
|
|
965
|
+
**Parameters:**
|
|
966
|
+
|
|
967
|
+
| Name | Type | Required | Description |
|
|
968
|
+
|------|------|----------|-------------|
|
|
969
|
+
| `uuid` | string | Yes | VAT rate UUID to update |
|
|
970
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
971
|
+
| `rate` | number | No | VAT percentage |
|
|
972
|
+
| `label` | string | No | Display label |
|
|
973
|
+
| `categoryCode` | string | No | e-Factura category code (S, AA, E, O, Z, AE) |
|
|
974
|
+
| `isDefault` | boolean | No | Set as default rate (demotes any existing default) |
|
|
975
|
+
| `position` | number | No | Display order position |
|
|
976
|
+
|
|
977
|
+
### `vat_rates_delete`
|
|
978
|
+
|
|
979
|
+
Soft-delete a VAT rate. The rate is marked as deleted but not physically removed, preserving historical invoice integrity. Cannot delete the default rate (set another as default first) or the last remaining rate. Existing invoices are not affected.
|
|
980
|
+
|
|
981
|
+
**Parameters:**
|
|
982
|
+
|
|
983
|
+
| Name | Type | Required | Description |
|
|
984
|
+
|------|------|----------|-------------|
|
|
985
|
+
| `uuid` | string | Yes | VAT rate UUID to delete |
|
|
986
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
987
|
+
|
|
988
|
+
---
|
|
989
|
+
|
|
990
|
+
## Bank Accounts
|
|
991
|
+
|
|
992
|
+
### `bank_accounts_list`
|
|
993
|
+
|
|
994
|
+
List all bank accounts configured for the active company. Returns IBAN, bank name, currency, and which account is the default per currency. Bank accounts appear on invoices as payment instructions.
|
|
995
|
+
|
|
996
|
+
**Parameters:**
|
|
997
|
+
|
|
998
|
+
| Name | Type | Required | Description |
|
|
999
|
+
|------|------|----------|-------------|
|
|
1000
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
1001
|
+
|
|
1002
|
+
### `bank_accounts_create`
|
|
1003
|
+
|
|
1004
|
+
Add a new bank account to the active company. IBAN must be in valid format and unique within the company. If isDefault is true, any existing default account for that currency is demoted. The first account for a currency automatically becomes the default.
|
|
1005
|
+
|
|
1006
|
+
**Parameters:**
|
|
1007
|
+
|
|
1008
|
+
| Name | Type | Required | Description |
|
|
1009
|
+
|------|------|----------|-------------|
|
|
1010
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
1011
|
+
| `iban` | string | Yes | International Bank Account Number in valid IBAN format (e.g., "RO49AAAA1B31007593840000") |
|
|
1012
|
+
| `bankName` | string | No | Name of the bank (e.g., "BCR", "Banca Transilvania", "ING Bank") |
|
|
1013
|
+
| `currency` | string | No | Currency code ISO 4217 (default: "RON"). Use "EUR" for Euro accounts. |
|
|
1014
|
+
| `isDefault` | boolean | No | Set as default account for this currency (default: false) |
|
|
1015
|
+
|
|
1016
|
+
### `bank_accounts_update`
|
|
1017
|
+
|
|
1018
|
+
Update an existing bank account. Can update IBAN, bank name, currency, or default status. If setting isDefault to true, any existing default for that currency is demoted. At least one field must be provided.
|
|
1019
|
+
|
|
1020
|
+
**Parameters:**
|
|
1021
|
+
|
|
1022
|
+
| Name | Type | Required | Description |
|
|
1023
|
+
|------|------|----------|-------------|
|
|
1024
|
+
| `uuid` | string | Yes | Bank account UUID to update |
|
|
1025
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
1026
|
+
| `iban` | string | No | New IBAN (must be valid and unique within company) |
|
|
1027
|
+
| `bankName` | nullable string | No | Bank name (pass null to clear) |
|
|
1028
|
+
| `currency` | string | No | Currency code ISO 4217 |
|
|
1029
|
+
| `isDefault` | boolean | No | Set as default account for this currency |
|
|
1030
|
+
|
|
1031
|
+
### `bank_accounts_delete`
|
|
1032
|
+
|
|
1033
|
+
Permanently delete a bank account. Cannot delete the last bank account for a company or the default account (set another as default first). Existing invoices that referenced this account retain the IBAN in their stored data.
|
|
1034
|
+
|
|
1035
|
+
**Parameters:**
|
|
1036
|
+
|
|
1037
|
+
| Name | Type | Required | Description |
|
|
1038
|
+
|------|------|----------|-------------|
|
|
1039
|
+
| `uuid` | string | Yes | Bank account UUID to delete |
|
|
1040
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
1041
|
+
|
|
1042
|
+
---
|
|
1043
|
+
|
|
1044
|
+
## Document Series
|
|
1045
|
+
|
|
1046
|
+
### `document_series_list`
|
|
1047
|
+
|
|
1048
|
+
List all document series for the active company, optionally filtered by type. Document series define the numbering prefixes for invoices (e.g., "FAC"), proformas ("PRO"), credit notes, and delivery notes. Each series tracks the current and next available number.
|
|
1049
|
+
|
|
1050
|
+
**Parameters:**
|
|
1051
|
+
|
|
1052
|
+
| Name | Type | Required | Description |
|
|
1053
|
+
|------|------|----------|-------------|
|
|
1054
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
1055
|
+
| `type` | enum(invoice, proforma, credit_note, delivery_note) | No | Filter by document type: invoice, proforma, credit_note, or delivery_note |
|
|
1056
|
+
|
|
1057
|
+
### `document_series_create`
|
|
1058
|
+
|
|
1059
|
+
Create a new document series. The prefix must be unique per company and document type. Common patterns: "FAC" for invoices, "FAC2026" for annual series, "PRO" for proformas. Use currentNumber to set the starting number (default: 0, so first document gets number 1).
|
|
1060
|
+
|
|
1061
|
+
**Parameters:**
|
|
1062
|
+
|
|
1063
|
+
| Name | Type | Required | Description |
|
|
1064
|
+
|------|------|----------|-------------|
|
|
1065
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
1066
|
+
| `prefix` | string | Yes | Series prefix (must be unique per company+type). Examples: "FAC", "FAC2026", "PRO", "AVZ" |
|
|
1067
|
+
| `type` | enum(invoice, proforma, credit_note, delivery_note) | Yes | Document type this series is for |
|
|
1068
|
+
| `currentNumber` | number | No | Starting number — the last used number (default: 0, meaning next document gets 1) |
|
|
1069
|
+
| `active` | boolean | No | Whether the series is active and available for new documents (default: true) |
|
|
1070
|
+
|
|
1071
|
+
### `document_series_update`
|
|
1072
|
+
|
|
1073
|
+
Update an existing document series. Only "currentNumber" and "active" can be changed — prefix and type are immutable after creation. Use active=false to deactivate a series (e.g., at end of fiscal year). Changing currentNumber affects the next document number, use with extreme caution to avoid duplicates.
|
|
1074
|
+
|
|
1075
|
+
**Parameters:**
|
|
1076
|
+
|
|
1077
|
+
| Name | Type | Required | Description |
|
|
1078
|
+
|------|------|----------|-------------|
|
|
1079
|
+
| `uuid` | string | Yes | Document series UUID to update |
|
|
1080
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
1081
|
+
| `currentNumber` | number | No | Update the last used number (CAUTION: setting lower than max existing number may create duplicates) |
|
|
1082
|
+
| `active` | boolean | No | Set series active or inactive (inactive = not available for new documents) |
|
|
1083
|
+
|
|
1084
|
+
### `document_series_delete`
|
|
1085
|
+
|
|
1086
|
+
Permanently delete a document series. Cannot delete a series that has been used for any documents. Consider marking as inactive (active=false) instead, to preserve referential integrity and the audit trail. Only delete if the series was created by mistake and never used.
|
|
1087
|
+
|
|
1088
|
+
**Parameters:**
|
|
1089
|
+
|
|
1090
|
+
| Name | Type | Required | Description |
|
|
1091
|
+
|------|------|----------|-------------|
|
|
1092
|
+
| `uuid` | string | Yes | Document series UUID to delete |
|
|
1093
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
1094
|
+
|
|
1095
|
+
### `document_series_set_default`
|
|
1096
|
+
|
|
1097
|
+
Set a document series as the default for its type. The default series is auto-selected when creating new documents of that type. Only one series can be default per type.
|
|
1098
|
+
|
|
1099
|
+
**Parameters:**
|
|
1100
|
+
|
|
1101
|
+
| Name | Type | Required | Description |
|
|
1102
|
+
|------|------|----------|-------------|
|
|
1103
|
+
| `uuid` | string | Yes | Document series UUID to set as default |
|
|
1104
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
1105
|
+
|
|
1106
|
+
---
|
|
1107
|
+
|
|
1108
|
+
## Proforma Invoices
|
|
1109
|
+
|
|
1110
|
+
### `proforma_invoices_list`
|
|
1111
|
+
|
|
1112
|
+
List proforma invoices for the selected company with optional filtering by status, date range, client, and search term. Returns paginated results.
|
|
1113
|
+
|
|
1114
|
+
**Parameters:**
|
|
1115
|
+
|
|
1116
|
+
| Name | Type | Required | Description |
|
|
1117
|
+
|------|------|----------|-------------|
|
|
1118
|
+
| `companyId` | string | No | Company UUID (overrides configured default) |
|
|
1119
|
+
| `page` | number | No | Page number (default: 1) |
|
|
1120
|
+
| `limit` | number | No | Items per page (default: 20, max: 100) |
|
|
1121
|
+
| `search` | string | No | Search term for invoice number or client name |
|
|
1122
|
+
| `status` | enum(draft, sent, accepted, rejected, converted, cancelled) | No | Filter by status |
|
|
1123
|
+
| `from` | string | No | Start date filter (YYYY-MM-DD) |
|
|
1124
|
+
| `to` | string | No | End date filter (YYYY-MM-DD) |
|
|
1125
|
+
| `clientId` | string | No | Filter by client UUID |
|
|
1126
|
+
| `sort` | string | No | Sort field |
|
|
1127
|
+
| `order` | enum(asc, desc) | No | Sort order |
|
|
1128
|
+
|
|
1129
|
+
### `proforma_invoices_get`
|
|
1130
|
+
|
|
1131
|
+
Get complete details for a specific proforma invoice including all line items, client information, and calculated totals.
|
|
1132
|
+
|
|
1133
|
+
**Parameters:**
|
|
1134
|
+
|
|
1135
|
+
| Name | Type | Required | Description |
|
|
1136
|
+
|------|------|----------|-------------|
|
|
1137
|
+
| `uuid` | string | Yes | UUID of the proforma invoice to retrieve |
|
|
1138
|
+
| `companyId` | string | No | Company UUID (overrides configured default) |
|
|
1139
|
+
|
|
1140
|
+
### `proforma_invoices_create`
|
|
1141
|
+
|
|
1142
|
+
Create a new proforma invoice in draft status with line items. Supports multiple currencies, discounts, and optional references.
|
|
1143
|
+
|
|
1144
|
+
**Parameters:**
|
|
1145
|
+
|
|
1146
|
+
| Name | Type | Required | Description |
|
|
1147
|
+
|------|------|----------|-------------|
|
|
1148
|
+
| `companyId` | string | No | Company UUID (overrides configured default) |
|
|
1149
|
+
| `clientId` | string | Yes | UUID of the client |
|
|
1150
|
+
| `seriesId` | string | Yes | UUID of the invoice series configured for proforma invoices |
|
|
1151
|
+
| `issueDate` | string | Yes | Date of issue (YYYY-MM-DD) |
|
|
1152
|
+
| `dueDate` | string | Yes | Payment due date (YYYY-MM-DD) |
|
|
1153
|
+
| `validUntil` | string | Yes | Valid until date (YYYY-MM-DD) |
|
|
1154
|
+
| `currency` | string | Yes | Currency code (e.g., RON, EUR, USD) |
|
|
1155
|
+
| `exchangeRate` | number | No | Exchange rate to base currency (default: 1.0 for RON) |
|
|
1156
|
+
| `invoiceTypeCode` | string | No | Invoice type code (default: "380" - Commercial Invoice) |
|
|
1157
|
+
| `notes` | string | No | Public notes visible to client |
|
|
1158
|
+
| `paymentTerms` | string | No | Payment terms description (e.g., "Net 30") |
|
|
1159
|
+
| `deliveryLocation` | string | No | Delivery address or location |
|
|
1160
|
+
| `projectReference` | string | No | Related project reference |
|
|
1161
|
+
| `orderNumber` | string | No | Client purchase order number |
|
|
1162
|
+
| `contractNumber` | string | No | Related contract number |
|
|
1163
|
+
| `issuerName` | string | No | Name of person issuing the proforma |
|
|
1164
|
+
| `issuerId` | string | No | UUID of the issuer user |
|
|
1165
|
+
| `mentions` | string | No | Additional mentions or notes |
|
|
1166
|
+
| `internalNote` | string | No | Internal note (not visible to client) |
|
|
1167
|
+
| `salesAgent` | string | No | Sales agent name |
|
|
1168
|
+
| `lines` | array | Yes | Array of line items (minimum 1 required) |
|
|
1169
|
+
|
|
1170
|
+
### `proforma_invoices_update`
|
|
1171
|
+
|
|
1172
|
+
Update an existing proforma invoice. Only invoices in draft status can be updated. Replaces all line items with the provided array.
|
|
1173
|
+
|
|
1174
|
+
**Parameters:**
|
|
1175
|
+
|
|
1176
|
+
| Name | Type | Required | Description |
|
|
1177
|
+
|------|------|----------|-------------|
|
|
1178
|
+
| `uuid` | string | Yes | UUID of the proforma invoice to update |
|
|
1179
|
+
| `companyId` | string | No | Company UUID (overrides configured default) |
|
|
1180
|
+
| `clientId` | string | Yes | UUID of the client |
|
|
1181
|
+
| `seriesId` | string | Yes | UUID of the invoice series |
|
|
1182
|
+
| `issueDate` | string | Yes | Date of issue (YYYY-MM-DD) |
|
|
1183
|
+
| `dueDate` | string | Yes | Payment due date (YYYY-MM-DD) |
|
|
1184
|
+
| `validUntil` | string | Yes | Valid until date (YYYY-MM-DD) |
|
|
1185
|
+
| `currency` | string | Yes | Currency code (e.g., RON, EUR, USD) |
|
|
1186
|
+
| `exchangeRate` | number | No | Exchange rate to base currency |
|
|
1187
|
+
| `invoiceTypeCode` | string | No | Invoice type code |
|
|
1188
|
+
| `notes` | string | No | Public notes visible to client |
|
|
1189
|
+
| `paymentTerms` | string | No | Payment terms description |
|
|
1190
|
+
| `deliveryLocation` | string | No | Delivery address or location |
|
|
1191
|
+
| `projectReference` | string | No | Related project reference |
|
|
1192
|
+
| `orderNumber` | string | No | Client purchase order number |
|
|
1193
|
+
| `contractNumber` | string | No | Related contract number |
|
|
1194
|
+
| `issuerName` | string | No | Name of person issuing the proforma |
|
|
1195
|
+
| `issuerId` | string | No | UUID of the issuer user |
|
|
1196
|
+
| `mentions` | string | No | Additional mentions or notes |
|
|
1197
|
+
| `internalNote` | string | No | Internal note (not visible to client) |
|
|
1198
|
+
| `salesAgent` | string | No | Sales agent name |
|
|
1199
|
+
| `lines` | array | Yes | Array of line items (replaces all existing lines) |
|
|
1200
|
+
|
|
1201
|
+
### `proforma_invoices_delete`
|
|
1202
|
+
|
|
1203
|
+
Permanently delete a proforma invoice. Only draft proforma invoices can be deleted. Use cancel for sent/accepted/rejected proformas to preserve audit trail.
|
|
1204
|
+
|
|
1205
|
+
**Parameters:**
|
|
1206
|
+
|
|
1207
|
+
| Name | Type | Required | Description |
|
|
1208
|
+
|------|------|----------|-------------|
|
|
1209
|
+
| `uuid` | string | Yes | UUID of the proforma invoice to delete |
|
|
1210
|
+
| `companyId` | string | No | Company UUID (overrides configured default) |
|
|
1211
|
+
|
|
1212
|
+
### `proforma_invoices_send`
|
|
1213
|
+
|
|
1214
|
+
Mark a proforma invoice as sent to the client. Transitions status from draft to sent. Once sent, the proforma becomes read-only.
|
|
1215
|
+
|
|
1216
|
+
**Parameters:**
|
|
1217
|
+
|
|
1218
|
+
| Name | Type | Required | Description |
|
|
1219
|
+
|------|------|----------|-------------|
|
|
1220
|
+
| `uuid` | string | Yes | UUID of the proforma invoice to mark as sent |
|
|
1221
|
+
| `companyId` | string | No | Company UUID (overrides configured default) |
|
|
1222
|
+
|
|
1223
|
+
### `proforma_invoices_accept`
|
|
1224
|
+
|
|
1225
|
+
Mark a proforma invoice as accepted by the client. Transitions status to accepted. Once accepted, the proforma is ready to be converted to a final invoice.
|
|
1226
|
+
|
|
1227
|
+
**Parameters:**
|
|
1228
|
+
|
|
1229
|
+
| Name | Type | Required | Description |
|
|
1230
|
+
|------|------|----------|-------------|
|
|
1231
|
+
| `uuid` | string | Yes | UUID of the proforma invoice to mark as accepted |
|
|
1232
|
+
| `companyId` | string | No | Company UUID (overrides configured default) |
|
|
1233
|
+
|
|
1234
|
+
### `proforma_invoices_reject`
|
|
1235
|
+
|
|
1236
|
+
Mark a proforma invoice as rejected by the client. Optionally provide a rejection reason and notes. Once rejected, the proforma cannot be converted to an invoice.
|
|
1237
|
+
|
|
1238
|
+
**Parameters:**
|
|
1239
|
+
|
|
1240
|
+
| Name | Type | Required | Description |
|
|
1241
|
+
|------|------|----------|-------------|
|
|
1242
|
+
| `uuid` | string | Yes | UUID of the proforma invoice to mark as rejected |
|
|
1243
|
+
| `companyId` | string | No | Company UUID (overrides configured default) |
|
|
1244
|
+
| `rejectionReason` | string | No | Reason for rejection provided by the client |
|
|
1245
|
+
| `rejectionNotes` | string | No | Internal notes about the rejection |
|
|
1246
|
+
|
|
1247
|
+
### `proforma_invoices_cancel`
|
|
1248
|
+
|
|
1249
|
+
Cancel a proforma invoice. Can be cancelled from any status except converted or already cancelled. Preserves historical record unlike deletion.
|
|
1250
|
+
|
|
1251
|
+
**Parameters:**
|
|
1252
|
+
|
|
1253
|
+
| Name | Type | Required | Description |
|
|
1254
|
+
|------|------|----------|-------------|
|
|
1255
|
+
| `uuid` | string | Yes | UUID of the proforma invoice to cancel |
|
|
1256
|
+
| `companyId` | string | No | Company UUID (overrides configured default) |
|
|
1257
|
+
| `cancellationReason` | string | No | Reason for cancellation |
|
|
1258
|
+
| `cancellationNotes` | string | No | Internal notes about the cancellation |
|
|
1259
|
+
|
|
1260
|
+
### `proforma_invoices_convert`
|
|
1261
|
+
|
|
1262
|
+
Convert a proforma invoice into a final invoice. Creates a new invoice with all proforma data, marks proforma as converted, and links the two documents. Returns both the new invoice and updated proforma.
|
|
1263
|
+
|
|
1264
|
+
**Parameters:**
|
|
1265
|
+
|
|
1266
|
+
| Name | Type | Required | Description |
|
|
1267
|
+
|------|------|----------|-------------|
|
|
1268
|
+
| `uuid` | string | Yes | UUID of the proforma invoice to convert |
|
|
1269
|
+
| `companyId` | string | No | Company UUID (overrides configured default) |
|
|
1270
|
+
| `invoiceSeriesId` | string | No | UUID of invoice series to use (if different from proforma series) |
|
|
1271
|
+
| `issueDate` | string | No | Override issue date for the new invoice (default: today, YYYY-MM-DD) |
|
|
1272
|
+
| `dueDate` | string | No | Override due date for the new invoice (default: proforma due date, YYYY-MM-DD) |
|
|
1273
|
+
|
|
1274
|
+
### `proforma_invoices_pdf`
|
|
1275
|
+
|
|
1276
|
+
Download the PDF of a proforma invoice. Returns base64-encoded binary data. Requires Pro plan.
|
|
1277
|
+
|
|
1278
|
+
**Parameters:**
|
|
1279
|
+
|
|
1280
|
+
| Name | Type | Required | Description |
|
|
1281
|
+
|------|------|----------|-------------|
|
|
1282
|
+
| `uuid` | string | Yes | UUID of the proforma invoice |
|
|
1283
|
+
| `companyId` | string | No | Company UUID (overrides configured default) |
|
|
1284
|
+
|
|
1285
|
+
### `proforma_invoices_bulk_delete`
|
|
1286
|
+
|
|
1287
|
+
Delete multiple proforma invoices in batch. Only draft proformas can be deleted. Returns count of deleted and any errors.
|
|
1288
|
+
|
|
1289
|
+
**Parameters:**
|
|
1290
|
+
|
|
1291
|
+
| Name | Type | Required | Description |
|
|
1292
|
+
|------|------|----------|-------------|
|
|
1293
|
+
| `ids` | array | Yes | Array of proforma invoice UUIDs to delete (1-100) |
|
|
1294
|
+
| `companyId` | string | No | Company UUID (overrides configured default) |
|
|
1295
|
+
|
|
1296
|
+
---
|
|
1297
|
+
|
|
1298
|
+
## Recurring Invoices
|
|
1299
|
+
|
|
1300
|
+
### `recurring_invoices_list`
|
|
1301
|
+
|
|
1302
|
+
List recurring invoice templates for the selected company. Supports filtering by active status and frequency.
|
|
1303
|
+
|
|
1304
|
+
**Parameters:**
|
|
1305
|
+
|
|
1306
|
+
| Name | Type | Required | Description |
|
|
1307
|
+
|------|------|----------|-------------|
|
|
1308
|
+
| `companyId` | string | No | Company UUID (overrides configured default) |
|
|
1309
|
+
| `page` | number | No | Page number (default: 1) |
|
|
1310
|
+
| `limit` | number | No | Items per page (default: 20, max: 100) |
|
|
1311
|
+
| `search` | string | No | Search term to filter by reference or notes |
|
|
1312
|
+
| `isActive` | boolean | No | Filter by active status (true/false) |
|
|
1313
|
+
| `frequency` | enum(weekly, biweekly, monthly, bimonthly, quarterly, semiannual, annual) | No | Filter by generation frequency |
|
|
1314
|
+
|
|
1315
|
+
### `recurring_invoices_get`
|
|
1316
|
+
|
|
1317
|
+
Get detailed information about a specific recurring invoice template including all line items used as a template for generated invoices.
|
|
1318
|
+
|
|
1319
|
+
**Parameters:**
|
|
1320
|
+
|
|
1321
|
+
| Name | Type | Required | Description |
|
|
1322
|
+
|------|------|----------|-------------|
|
|
1323
|
+
| `uuid` | string | Yes | UUID of the recurring invoice template |
|
|
1324
|
+
| `companyId` | string | No | Company UUID (overrides configured default) |
|
|
1325
|
+
|
|
1326
|
+
### `recurring_invoices_create`
|
|
1327
|
+
|
|
1328
|
+
Create a new recurring invoice template. The system will automatically generate invoices based on the specified frequency and schedule. Supports fixed, exchange_rate, and markup pricing rules on line items.
|
|
1329
|
+
|
|
1330
|
+
**Parameters:**
|
|
1331
|
+
|
|
1332
|
+
| Name | Type | Required | Description |
|
|
1333
|
+
|------|------|----------|-------------|
|
|
1334
|
+
| `companyId` | string | No | Company UUID (overrides configured default) |
|
|
1335
|
+
| `clientId` | string | Yes | UUID of the client |
|
|
1336
|
+
| `seriesId` | string | Yes | UUID of the document series |
|
|
1337
|
+
| `reference` | string | No | Human-readable reference for this recurring invoice |
|
|
1338
|
+
| `documentType` | enum(invoice, credit_note) | Yes | Document type to generate |
|
|
1339
|
+
| `currency` | string | Yes | ISO 4217 currency code (e.g., RON, EUR) |
|
|
1340
|
+
| `invoiceTypeCode` | string | Yes | e-Factura invoice type code (e.g., "380") |
|
|
1341
|
+
| `frequency` | enum(weekly, biweekly, monthly, bimonthly, quarterly, semiannual, annual) | Yes | How often to generate invoices |
|
|
1342
|
+
| `frequencyDay` | number | Yes | Day of month for generation (1-31) |
|
|
1343
|
+
| `frequencyMonth` | number | No | Month for annual generation (1-12, required if frequency is annual) |
|
|
1344
|
+
| `nextIssuanceDate` | string | Yes | ISO 8601 date for the first invoice generation (YYYY-MM-DD) |
|
|
1345
|
+
| `stopDate` | string | No | ISO 8601 date to stop generation (YYYY-MM-DD) |
|
|
1346
|
+
| `dueDateType` | enum(fixed, relative) | Yes | How due date is calculated |
|
|
1347
|
+
| `dueDateDays` | number | No | Days after issue date for due date (required if dueDateType is relative) |
|
|
1348
|
+
| `dueDateFixedDay` | number | No | Fixed day of month for due date (1-31, required if dueDateType is fixed) |
|
|
1349
|
+
| `notes` | string | No | Internal notes |
|
|
1350
|
+
| `paymentTerms` | string | No | Payment terms text |
|
|
1351
|
+
| `autoEmailEnabled` | boolean | No | Auto-send email on invoice generation (default: false) |
|
|
1352
|
+
| `autoEmailTime` | string | No | Time to send email (HH:mm, default: "09:00") |
|
|
1353
|
+
| `autoEmailDayOffset` | number | No | Days offset for email sending (default: 0) |
|
|
1354
|
+
| `penaltyEnabled` | boolean | No | Enable late payment penalties (default: false) |
|
|
1355
|
+
| `penaltyPercentPerDay` | number | No | Daily penalty percentage |
|
|
1356
|
+
| `penaltyGraceDays` | number | No | Grace period in days before penalties apply |
|
|
1357
|
+
| `lines` | array | Yes | Array of line items (minimum 1 required) |
|
|
1358
|
+
|
|
1359
|
+
### `recurring_invoices_update`
|
|
1360
|
+
|
|
1361
|
+
Update an existing recurring invoice template. All fields are optional but at least one must be provided. When updating lines, the entire lines array replaces existing lines.
|
|
1362
|
+
|
|
1363
|
+
**Parameters:**
|
|
1364
|
+
|
|
1365
|
+
| Name | Type | Required | Description |
|
|
1366
|
+
|------|------|----------|-------------|
|
|
1367
|
+
| `uuid` | string | Yes | UUID of the recurring invoice template to update |
|
|
1368
|
+
| `companyId` | string | No | Company UUID (overrides configured default) |
|
|
1369
|
+
| `clientId` | string | No | UUID of the client |
|
|
1370
|
+
| `seriesId` | string | No | UUID of the document series |
|
|
1371
|
+
| `reference` | string | No | Human-readable reference |
|
|
1372
|
+
| `documentType` | enum(invoice, credit_note) | No | Document type to generate |
|
|
1373
|
+
| `currency` | string | No | ISO 4217 currency code |
|
|
1374
|
+
| `invoiceTypeCode` | string | No | e-Factura invoice type code |
|
|
1375
|
+
| `frequency` | enum(weekly, biweekly, monthly, bimonthly, quarterly, semiannual, annual) | No | How often to generate invoices |
|
|
1376
|
+
| `frequencyDay` | number | No | Day of month for generation (1-31) |
|
|
1377
|
+
| `frequencyMonth` | number | No | Month for annual generation (1-12) |
|
|
1378
|
+
| `nextIssuanceDate` | string | No | ISO 8601 date for next invoice generation (YYYY-MM-DD) |
|
|
1379
|
+
| `stopDate` | nullable string | No | ISO 8601 date to stop generation (null to remove) |
|
|
1380
|
+
| `dueDateType` | enum(fixed, relative) | No | How due date is calculated |
|
|
1381
|
+
| `dueDateDays` | number | No | Days after issue date for due date |
|
|
1382
|
+
| `dueDateFixedDay` | number | No | Fixed day of month for due date (1-31) |
|
|
1383
|
+
| `notes` | nullable string | No | Internal notes |
|
|
1384
|
+
| `paymentTerms` | nullable string | No | Payment terms text |
|
|
1385
|
+
| `autoEmailEnabled` | boolean | No | Auto-send email on invoice generation |
|
|
1386
|
+
| `autoEmailTime` | string | No | Time to send email (HH:mm) |
|
|
1387
|
+
| `autoEmailDayOffset` | number | No | Days offset for email sending |
|
|
1388
|
+
| `penaltyEnabled` | boolean | No | Enable late payment penalties |
|
|
1389
|
+
| `penaltyPercentPerDay` | number | No | Daily penalty percentage |
|
|
1390
|
+
| `penaltyGraceDays` | number | No | Grace period in days before penalties apply |
|
|
1391
|
+
| `lines` | array | No | Array of line items (replaces all existing lines) |
|
|
1392
|
+
|
|
1393
|
+
### `recurring_invoices_delete`
|
|
1394
|
+
|
|
1395
|
+
Permanently delete a recurring invoice template. Previously generated invoices from this template are not affected. Use toggle to temporarily pause instead.
|
|
1396
|
+
|
|
1397
|
+
**Parameters:**
|
|
1398
|
+
|
|
1399
|
+
| Name | Type | Required | Description |
|
|
1400
|
+
|------|------|----------|-------------|
|
|
1401
|
+
| `uuid` | string | Yes | UUID of the recurring invoice template to delete |
|
|
1402
|
+
| `companyId` | string | No | Company UUID (overrides configured default) |
|
|
1403
|
+
|
|
1404
|
+
### `recurring_invoices_toggle`
|
|
1405
|
+
|
|
1406
|
+
Toggle the active status of a recurring invoice template to pause or resume automatic invoice generation. If active, it will be paused; if paused, it will be resumed.
|
|
1407
|
+
|
|
1408
|
+
**Parameters:**
|
|
1409
|
+
|
|
1410
|
+
| Name | Type | Required | Description |
|
|
1411
|
+
|------|------|----------|-------------|
|
|
1412
|
+
| `uuid` | string | Yes | UUID of the recurring invoice template to toggle |
|
|
1413
|
+
| `companyId` | string | No | Company UUID (overrides configured default) |
|
|
1414
|
+
|
|
1415
|
+
### `recurring_invoices_issue_now`
|
|
1416
|
+
|
|
1417
|
+
Manually trigger immediate invoice generation from a recurring invoice template, bypassing the scheduled generation. Useful for testing configurations or creating one-off invoices. Does not update the nextIssuanceDate.
|
|
1418
|
+
|
|
1419
|
+
**Parameters:**
|
|
1420
|
+
|
|
1421
|
+
| Name | Type | Required | Description |
|
|
1422
|
+
|------|------|----------|-------------|
|
|
1423
|
+
| `uuid` | string | Yes | UUID of the recurring invoice template to issue now |
|
|
1424
|
+
| `companyId` | string | No | Company UUID (overrides configured default) |
|
|
1425
|
+
|
|
1426
|
+
### `recurring_invoices_bulk_delete`
|
|
1427
|
+
|
|
1428
|
+
Delete multiple recurring invoice templates in a single request. Returns the count of deleted items and any errors for items that could not be deleted.
|
|
1429
|
+
|
|
1430
|
+
**Parameters:**
|
|
1431
|
+
|
|
1432
|
+
| Name | Type | Required | Description |
|
|
1433
|
+
|------|------|----------|-------------|
|
|
1434
|
+
| `ids` | array | Yes | Array of recurring invoice UUIDs to delete (1-100) |
|
|
1435
|
+
| `companyId` | string | No | Company UUID (overrides configured default) |
|
|
1436
|
+
|
|
1437
|
+
### `recurring_invoices_bulk_toggle_active`
|
|
1438
|
+
|
|
1439
|
+
Toggle the active/paused status of multiple recurring invoices at once. Set active=true to resume or active=false to pause invoice generation.
|
|
1440
|
+
|
|
1441
|
+
**Parameters:**
|
|
1442
|
+
|
|
1443
|
+
| Name | Type | Required | Description |
|
|
1444
|
+
|------|------|----------|-------------|
|
|
1445
|
+
| `ids` | array | Yes | Array of recurring invoice UUIDs (1-100) |
|
|
1446
|
+
| `active` | boolean | Yes | Set to true to activate, false to pause |
|
|
1447
|
+
| `companyId` | string | No | Company UUID (overrides configured default) |
|
|
1448
|
+
|
|
1449
|
+
### `recurring_invoices_bulk_issue_now`
|
|
1450
|
+
|
|
1451
|
+
Immediately generate invoices from multiple recurring invoice templates. Useful for triggering generation outside the normal schedule. Does not update the nextIssuanceDate.
|
|
1452
|
+
|
|
1453
|
+
**Parameters:**
|
|
1454
|
+
|
|
1455
|
+
| Name | Type | Required | Description |
|
|
1456
|
+
|------|------|----------|-------------|
|
|
1457
|
+
| `ids` | array | Yes | Array of recurring invoice UUIDs (1-100) |
|
|
1458
|
+
| `companyId` | string | No | Company UUID (overrides configured default) |
|
|
1459
|
+
|
|
1460
|
+
---
|
|
1461
|
+
|
|
1462
|
+
## Delivery Notes
|
|
1463
|
+
|
|
1464
|
+
### `delivery_notes_list`
|
|
1465
|
+
|
|
1466
|
+
List delivery notes for the selected company with optional filtering by status, date range, client, and search term. Delivery notes document physical delivery of goods or completion of services.
|
|
1467
|
+
|
|
1468
|
+
**Parameters:**
|
|
1469
|
+
|
|
1470
|
+
| Name | Type | Required | Description |
|
|
1471
|
+
|------|------|----------|-------------|
|
|
1472
|
+
| `companyId` | string | No | Company UUID (overrides configured default) |
|
|
1473
|
+
| `page` | number | No | Page number (default: 1) |
|
|
1474
|
+
| `limit` | number | No | Items per page (default: 20, max: 100) |
|
|
1475
|
+
| `search` | string | No | Search term for delivery note number or client name |
|
|
1476
|
+
| `status` | enum(draft, issued, converted, cancelled) | No | Filter by status |
|
|
1477
|
+
| `from` | string | No | Start date filter (YYYY-MM-DD) |
|
|
1478
|
+
| `to` | string | No | End date filter (YYYY-MM-DD) |
|
|
1479
|
+
| `clientId` | string | No | Filter by client UUID |
|
|
1480
|
+
|
|
1481
|
+
### `delivery_notes_get`
|
|
1482
|
+
|
|
1483
|
+
Get complete details for a specific delivery note including all line items, client information, deputy details, and calculated totals.
|
|
1484
|
+
|
|
1485
|
+
**Parameters:**
|
|
1486
|
+
|
|
1487
|
+
| Name | Type | Required | Description |
|
|
1488
|
+
|------|------|----------|-------------|
|
|
1489
|
+
| `uuid` | string | Yes | UUID of the delivery note to retrieve |
|
|
1490
|
+
| `companyId` | string | No | Company UUID (overrides configured default) |
|
|
1491
|
+
|
|
1492
|
+
### `delivery_notes_create`
|
|
1493
|
+
|
|
1494
|
+
Create a new delivery note in draft status. Delivery notes document physical delivery of goods or services and can later be converted to invoices. Include deputy information for proof of delivery. A default delivery_note series is auto-assigned if neither seriesId nor documentSeriesId is provided.
|
|
1495
|
+
|
|
1496
|
+
**Parameters:**
|
|
1497
|
+
|
|
1498
|
+
| Name | Type | Required | Description |
|
|
1499
|
+
|------|------|----------|-------------|
|
|
1500
|
+
| `companyId` | string | No | Company UUID (overrides configured default) |
|
|
1501
|
+
| `clientId` | string | Yes | UUID of the client |
|
|
1502
|
+
| `seriesId` | string | No | UUID of the delivery note series (uses default series if not provided) |
|
|
1503
|
+
| `documentSeriesId` | string | No | UUID of the document series to use (alternative to seriesId; uses default delivery_note series if neither is provided) |
|
|
1504
|
+
| `issueDate` | string | Yes | Date of issue (YYYY-MM-DD) |
|
|
1505
|
+
| `dueDate` | string | Yes | Due date for invoicing (YYYY-MM-DD) |
|
|
1506
|
+
| `currency` | string | Yes | Currency code (e.g., RON, EUR, USD) |
|
|
1507
|
+
| `exchangeRate` | number | No | Exchange rate to base currency (default: 1.0 for RON) |
|
|
1508
|
+
| `deliveryLocation` | string | No | Full address where goods were delivered |
|
|
1509
|
+
| `projectReference` | string | No | Related project or order reference |
|
|
1510
|
+
| `issuerName` | string | No | Name of person issuing the delivery note |
|
|
1511
|
+
| `issuerId` | string | No | UUID of the issuer user |
|
|
1512
|
+
| `salesAgent` | string | No | Sales agent name |
|
|
1513
|
+
| `deputyName` | string | No | Name of person who received the delivery |
|
|
1514
|
+
| `deputyIdentityCard` | string | No | ID card number of the deputy |
|
|
1515
|
+
| `deputyAuto` | string | No | Vehicle registration number used for delivery |
|
|
1516
|
+
| `notes` | string | No | Public notes about the delivery |
|
|
1517
|
+
| `mentions` | string | No | Additional mentions or instructions |
|
|
1518
|
+
| `internalNote` | string | No | Internal note (not visible to client) |
|
|
1519
|
+
| `lines` | array | Yes | Array of line items (minimum 1 required) |
|
|
1520
|
+
|
|
1521
|
+
### `delivery_notes_update`
|
|
1522
|
+
|
|
1523
|
+
Update an existing delivery note. Delivery notes in draft or issued status can be updated. Replaces all line items with the provided array.
|
|
1524
|
+
|
|
1525
|
+
**Parameters:**
|
|
1526
|
+
|
|
1527
|
+
| Name | Type | Required | Description |
|
|
1528
|
+
|------|------|----------|-------------|
|
|
1529
|
+
| `uuid` | string | Yes | UUID of the delivery note to update |
|
|
1530
|
+
| `companyId` | string | No | Company UUID (overrides configured default) |
|
|
1531
|
+
| `clientId` | string | Yes | UUID of the client |
|
|
1532
|
+
| `seriesId` | string | No | UUID of the delivery note series |
|
|
1533
|
+
| `documentSeriesId` | string | No | UUID of the document series to use (alternative to seriesId) |
|
|
1534
|
+
| `issueDate` | string | Yes | Date of issue (YYYY-MM-DD) |
|
|
1535
|
+
| `dueDate` | string | Yes | Due date for invoicing (YYYY-MM-DD) |
|
|
1536
|
+
| `currency` | string | Yes | Currency code (e.g., RON, EUR, USD) |
|
|
1537
|
+
| `exchangeRate` | number | No | Exchange rate to base currency |
|
|
1538
|
+
| `deliveryLocation` | string | No | Full address where goods were delivered |
|
|
1539
|
+
| `projectReference` | string | No | Related project or order reference |
|
|
1540
|
+
| `issuerName` | string | No | Name of person issuing the delivery note |
|
|
1541
|
+
| `issuerId` | string | No | UUID of the issuer user |
|
|
1542
|
+
| `salesAgent` | string | No | Sales agent name |
|
|
1543
|
+
| `deputyName` | string | No | Name of person who received the delivery |
|
|
1544
|
+
| `deputyIdentityCard` | string | No | ID card number of the deputy |
|
|
1545
|
+
| `deputyAuto` | string | No | Vehicle registration number |
|
|
1546
|
+
| `notes` | string | No | Public notes about the delivery |
|
|
1547
|
+
| `mentions` | string | No | Additional mentions or instructions |
|
|
1548
|
+
| `internalNote` | string | No | Internal note (not visible to client) |
|
|
1549
|
+
| `lines` | array | Yes | Array of line items (replaces all existing lines) |
|
|
1550
|
+
|
|
1551
|
+
### `delivery_notes_delete`
|
|
1552
|
+
|
|
1553
|
+
Permanently delete a delivery note. Only draft delivery notes can be deleted. Use cancel for issued delivery notes to preserve audit trail.
|
|
1554
|
+
|
|
1555
|
+
**Parameters:**
|
|
1556
|
+
|
|
1557
|
+
| Name | Type | Required | Description |
|
|
1558
|
+
|------|------|----------|-------------|
|
|
1559
|
+
| `uuid` | string | Yes | UUID of the delivery note to delete |
|
|
1560
|
+
| `companyId` | string | No | Company UUID (overrides configured default) |
|
|
1561
|
+
|
|
1562
|
+
### `delivery_notes_issue`
|
|
1563
|
+
|
|
1564
|
+
Mark a delivery note as issued when the physical delivery of goods or completion of services occurs. Transitions status from draft to issued. Once issued, the delivery note becomes read-only.
|
|
1565
|
+
|
|
1566
|
+
**Parameters:**
|
|
1567
|
+
|
|
1568
|
+
| Name | Type | Required | Description |
|
|
1569
|
+
|------|------|----------|-------------|
|
|
1570
|
+
| `uuid` | string | Yes | UUID of the delivery note to mark as issued |
|
|
1571
|
+
| `companyId` | string | No | Company UUID (overrides configured default) |
|
|
1572
|
+
|
|
1573
|
+
### `delivery_notes_cancel`
|
|
1574
|
+
|
|
1575
|
+
Cancel a delivery note when delivery will not occur. Can be cancelled from draft or issued status. Preserves historical record unlike deletion. Optionally provide a cancellation reason.
|
|
1576
|
+
|
|
1577
|
+
**Parameters:**
|
|
1578
|
+
|
|
1579
|
+
| Name | Type | Required | Description |
|
|
1580
|
+
|------|------|----------|-------------|
|
|
1581
|
+
| `uuid` | string | Yes | UUID of the delivery note to cancel |
|
|
1582
|
+
| `companyId` | string | No | Company UUID (overrides configured default) |
|
|
1583
|
+
| `cancellationReason` | string | No | Reason for cancellation |
|
|
1584
|
+
| `cancellationNotes` | string | No | Internal notes about the cancellation |
|
|
1585
|
+
|
|
1586
|
+
### `delivery_notes_convert`
|
|
1587
|
+
|
|
1588
|
+
Convert a delivery note into a final invoice. Creates a new invoice with all delivery note data, marks the delivery note as converted, and establishes a link between the two documents. Returns both the new invoice and updated delivery note.
|
|
1589
|
+
|
|
1590
|
+
**Parameters:**
|
|
1591
|
+
|
|
1592
|
+
| Name | Type | Required | Description |
|
|
1593
|
+
|------|------|----------|-------------|
|
|
1594
|
+
| `uuid` | string | Yes | UUID of the delivery note to convert to an invoice |
|
|
1595
|
+
| `companyId` | string | No | Company UUID (overrides configured default) |
|
|
1596
|
+
| `invoiceSeriesId` | string | No | UUID of the invoice series to use (if different from delivery note series) |
|
|
1597
|
+
| `issueDate` | string | No | Override issue date for the new invoice (default: today, YYYY-MM-DD) |
|
|
1598
|
+
| `dueDate` | string | No | Override due date for the new invoice (default: delivery note due date, YYYY-MM-DD) |
|
|
1599
|
+
|
|
1600
|
+
### `delivery_notes_restore`
|
|
1601
|
+
|
|
1602
|
+
Restore a cancelled delivery note back to draft status. Only cancelled delivery notes can be restored. This reverses the cancellation and allows the delivery note to be re-issued.
|
|
1603
|
+
|
|
1604
|
+
**Parameters:**
|
|
1605
|
+
|
|
1606
|
+
| Name | Type | Required | Description |
|
|
1607
|
+
|------|------|----------|-------------|
|
|
1608
|
+
| `uuid` | string | Yes | UUID of the cancelled delivery note to restore |
|
|
1609
|
+
| `companyId` | string | No | Company UUID (overrides configured default) |
|
|
1610
|
+
|
|
1611
|
+
### `delivery_notes_email`
|
|
1612
|
+
|
|
1613
|
+
Send a delivery note to a client via email with the PDF attached. Supports custom subject, body, CC, and BCC recipients.
|
|
1614
|
+
|
|
1615
|
+
**Parameters:**
|
|
1616
|
+
|
|
1617
|
+
| Name | Type | Required | Description |
|
|
1618
|
+
|------|------|----------|-------------|
|
|
1619
|
+
| `uuid` | string | Yes | UUID of the delivery note to send |
|
|
1620
|
+
| `companyId` | string | No | Company UUID (overrides configured default) |
|
|
1621
|
+
| `to` | string | Yes | Recipient email address |
|
|
1622
|
+
| `subject` | string | No | Email subject (auto-generated if omitted) |
|
|
1623
|
+
| `body` | string | No | Email body text (auto-generated if omitted) |
|
|
1624
|
+
| `cc` | array | No | CC email addresses |
|
|
1625
|
+
| `bcc` | array | No | BCC email addresses |
|
|
1626
|
+
|
|
1627
|
+
### `delivery_notes_email_defaults`
|
|
1628
|
+
|
|
1629
|
+
Get pre-filled email content for a delivery note including default recipient, subject, and body text with template variables already substituted.
|
|
1630
|
+
|
|
1631
|
+
**Parameters:**
|
|
1632
|
+
|
|
1633
|
+
| Name | Type | Required | Description |
|
|
1634
|
+
|------|------|----------|-------------|
|
|
1635
|
+
| `uuid` | string | Yes | UUID of the delivery note |
|
|
1636
|
+
| `companyId` | string | No | Company UUID (overrides configured default) |
|
|
1637
|
+
|
|
1638
|
+
### `delivery_notes_email_history`
|
|
1639
|
+
|
|
1640
|
+
Get the email sending history for a delivery note, including all sent emails with their status, timestamps, and recipient information.
|
|
1641
|
+
|
|
1642
|
+
**Parameters:**
|
|
1643
|
+
|
|
1644
|
+
| Name | Type | Required | Description |
|
|
1645
|
+
|------|------|----------|-------------|
|
|
1646
|
+
| `uuid` | string | Yes | UUID of the delivery note |
|
|
1647
|
+
| `companyId` | string | No | Company UUID (overrides configured default) |
|
|
1648
|
+
|
|
1649
|
+
### `delivery_notes_storno`
|
|
1650
|
+
|
|
1651
|
+
Create a storno (return) delivery note with negated quantities from an existing issued delivery note. The storno delivery note is created as a draft and can be issued separately.
|
|
1652
|
+
|
|
1653
|
+
**Parameters:**
|
|
1654
|
+
|
|
1655
|
+
| Name | Type | Required | Description |
|
|
1656
|
+
|------|------|----------|-------------|
|
|
1657
|
+
| `uuid` | string | Yes | UUID of the issued delivery note to create storno for |
|
|
1658
|
+
| `companyId` | string | No | Company UUID (overrides configured default) |
|
|
1659
|
+
|
|
1660
|
+
### `delivery_notes_from_proforma`
|
|
1661
|
+
|
|
1662
|
+
Create a new delivery note from an existing proforma invoice. Copies client, lines, dates, currency, and notes from the proforma. The delivery note is created in draft status.
|
|
1663
|
+
|
|
1664
|
+
**Parameters:**
|
|
1665
|
+
|
|
1666
|
+
| Name | Type | Required | Description |
|
|
1667
|
+
|------|------|----------|-------------|
|
|
1668
|
+
| `proformaId` | string | Yes | UUID of the proforma invoice to create delivery note from |
|
|
1669
|
+
| `companyId` | string | No | Company UUID (overrides configured default) |
|
|
1670
|
+
|
|
1671
|
+
### `delivery_notes_bulk_convert`
|
|
1672
|
+
|
|
1673
|
+
Convert multiple issued delivery notes into a single invoice. All delivery notes must be issued, have the same client, and use the same currency. Creates one invoice combining all lines and marks all delivery notes as invoiced.
|
|
1674
|
+
|
|
1675
|
+
**Parameters:**
|
|
1676
|
+
|
|
1677
|
+
| Name | Type | Required | Description |
|
|
1678
|
+
|------|------|----------|-------------|
|
|
1679
|
+
| `ids` | array | Yes | Array of delivery note UUIDs to convert into a single invoice |
|
|
1680
|
+
| `companyId` | string | No | Company UUID (overrides configured default) |
|
|
1681
|
+
|
|
1682
|
+
### `delivery_notes_submit_etransport`
|
|
1683
|
+
|
|
1684
|
+
Submit an issued delivery note to Romania's ANAF e-Transport system for domestic transport declaration (TTN). The delivery note must be in issued status with e-Transport fields filled (vehicle number, route, transport data, line tariff codes and weights). Submission is asynchronous — the status will update from uploaded to ok (with UIT) or nok (with error).
|
|
1685
|
+
|
|
1686
|
+
**Parameters:**
|
|
1687
|
+
|
|
1688
|
+
| Name | Type | Required | Description |
|
|
1689
|
+
|------|------|----------|-------------|
|
|
1690
|
+
| `uuid` | string | Yes | UUID of the issued delivery note to submit to e-Transport |
|
|
1691
|
+
| `companyId` | string | No | Company UUID (overrides configured default) |
|
|
1692
|
+
|
|
1693
|
+
### `delivery_notes_pdf`
|
|
1694
|
+
|
|
1695
|
+
Generate and download the PDF for a delivery note. Returns the PDF as base64-encoded binary data. Supports optional VAT and price hiding for simplified delivery documents.
|
|
1696
|
+
|
|
1697
|
+
**Parameters:**
|
|
1698
|
+
|
|
1699
|
+
| Name | Type | Required | Description |
|
|
1700
|
+
|------|------|----------|-------------|
|
|
1701
|
+
| `uuid` | string | Yes | UUID of the delivery note |
|
|
1702
|
+
| `companyId` | string | No | Company UUID (overrides configured default) |
|
|
1703
|
+
| `hideVat` | boolean | No | Hide VAT information on the PDF |
|
|
1704
|
+
| `hidePrices` | boolean | No | Hide prices on the PDF |
|
|
1705
|
+
|
|
1706
|
+
### `delivery_notes_validate_etransport`
|
|
1707
|
+
|
|
1708
|
+
Validate a delivery note against the e-Transport XML schema and Schematron rules without submitting to ANAF. Returns validation result with any errors or warnings found. Useful for pre-checking before actual submission.
|
|
1709
|
+
|
|
1710
|
+
**Parameters:**
|
|
1711
|
+
|
|
1712
|
+
| Name | Type | Required | Description |
|
|
1713
|
+
|------|------|----------|-------------|
|
|
1714
|
+
| `uuid` | string | Yes | UUID of the delivery note to validate |
|
|
1715
|
+
| `companyId` | string | No | Company UUID (overrides configured default) |
|
|
1716
|
+
|
|
1717
|
+
---
|
|
1718
|
+
|
|
1719
|
+
## Receipts
|
|
1720
|
+
|
|
1721
|
+
### `receipts_list`
|
|
1722
|
+
|
|
1723
|
+
List receipts (bonuri fiscale) for the selected company with optional filtering by status, date range, client, and search term. Receipts document point-of-sale transactions and can be converted to invoices.
|
|
1724
|
+
|
|
1725
|
+
**Parameters:**
|
|
1726
|
+
|
|
1727
|
+
| Name | Type | Required | Description |
|
|
1728
|
+
|------|------|----------|-------------|
|
|
1729
|
+
| `companyId` | string | No | Company UUID (overrides configured default) |
|
|
1730
|
+
| `page` | number | No | Page number (default: 1) |
|
|
1731
|
+
| `limit` | number | No | Items per page (default: 20, max: 100) |
|
|
1732
|
+
| `search` | string | No | Search term for receipt number or customer name |
|
|
1733
|
+
| `status` | enum(draft, issued, invoiced, cancelled) | No | Filter by status |
|
|
1734
|
+
| `from` | string | No | Start date filter (YYYY-MM-DD) |
|
|
1735
|
+
| `to` | string | No | End date filter (YYYY-MM-DD) |
|
|
1736
|
+
| `clientId` | string | No | Filter by client UUID |
|
|
1737
|
+
|
|
1738
|
+
### `receipts_get`
|
|
1739
|
+
|
|
1740
|
+
Get complete details for a specific receipt (bon fiscal) including all line items, payment breakdown, fiscal data, and calculated totals.
|
|
1741
|
+
|
|
1742
|
+
**Parameters:**
|
|
1743
|
+
|
|
1744
|
+
| Name | Type | Required | Description |
|
|
1745
|
+
|------|------|----------|-------------|
|
|
1746
|
+
| `uuid` | string | Yes | UUID of the receipt to retrieve |
|
|
1747
|
+
| `companyId` | string | No | Company UUID (overrides configured default) |
|
|
1748
|
+
|
|
1749
|
+
### `receipts_create`
|
|
1750
|
+
|
|
1751
|
+
Create a new receipt (bon fiscal) in draft status. Receipts document point-of-sale transactions with payment method details and optional fiscal register information. Can later be issued and converted to invoices. A default receipt series is auto-assigned if neither seriesId nor documentSeriesId is provided.
|
|
1752
|
+
|
|
1753
|
+
**Parameters:**
|
|
1754
|
+
|
|
1755
|
+
| Name | Type | Required | Description |
|
|
1756
|
+
|------|------|----------|-------------|
|
|
1757
|
+
| `companyId` | string | No | Company UUID (overrides configured default) |
|
|
1758
|
+
| `clientId` | string | No | UUID of the client (optional for receipts) |
|
|
1759
|
+
| `seriesId` | string | No | UUID of the receipt series (uses default series if not provided) |
|
|
1760
|
+
| `documentSeriesId` | string | No | UUID of the document series to use (alternative to seriesId; uses default receipt series if neither is provided) |
|
|
1761
|
+
| `issueDate` | string | Yes | Date of issue (YYYY-MM-DD) |
|
|
1762
|
+
| `currency` | string | Yes | Currency code (e.g., RON, EUR, USD) |
|
|
1763
|
+
| `exchangeRate` | number | No | Exchange rate to base currency (default: 1.0 for RON) |
|
|
1764
|
+
| `paymentMethod` | enum(cash, card, meal_ticket, mixed) | No | Payment method used for the transaction |
|
|
1765
|
+
| `cashPayment` | number | No | Amount paid in cash (for mixed payments) |
|
|
1766
|
+
| `cardPayment` | number | No | Amount paid by card (for mixed payments) |
|
|
1767
|
+
| `otherPayment` | number | No | Amount paid by other method, e.g. meal ticket (for mixed payments) |
|
|
1768
|
+
| `cashRegisterName` | string | No | Name or identifier of the cash register / fiscal printer |
|
|
1769
|
+
| `fiscalNumber` | string | No | Fiscal receipt number assigned by the cash register |
|
|
1770
|
+
| `customerName` | string | No | Customer name (when no clientId is provided) |
|
|
1771
|
+
| `customerCif` | string | No | Customer tax ID / CIF (when no clientId is provided) |
|
|
1772
|
+
| `projectReference` | string | No | Related project or order reference |
|
|
1773
|
+
| `issuerName` | string | No | Name of person issuing the receipt |
|
|
1774
|
+
| `issuerId` | string | No | UUID of the issuer user |
|
|
1775
|
+
| `salesAgent` | string | No | Sales agent name |
|
|
1776
|
+
| `notes` | string | No | Public notes on the receipt |
|
|
1777
|
+
| `mentions` | string | No | Additional mentions or instructions |
|
|
1778
|
+
| `internalNote` | string | No | Internal note (not visible to customer) |
|
|
1779
|
+
| `lines` | array | Yes | Array of line items (minimum 1 required) |
|
|
1780
|
+
|
|
1781
|
+
### `receipts_update`
|
|
1782
|
+
|
|
1783
|
+
Update an existing receipt. Receipts in draft or issued status can be updated. Replaces all line items with the provided array.
|
|
1784
|
+
|
|
1785
|
+
**Parameters:**
|
|
1786
|
+
|
|
1787
|
+
| Name | Type | Required | Description |
|
|
1788
|
+
|------|------|----------|-------------|
|
|
1789
|
+
| `uuid` | string | Yes | UUID of the receipt to update |
|
|
1790
|
+
| `companyId` | string | No | Company UUID (overrides configured default) |
|
|
1791
|
+
| `clientId` | string | No | UUID of the client (optional for receipts) |
|
|
1792
|
+
| `seriesId` | string | No | UUID of the receipt series |
|
|
1793
|
+
| `documentSeriesId` | string | No | UUID of the document series to use (alternative to seriesId) |
|
|
1794
|
+
| `issueDate` | string | Yes | Date of issue (YYYY-MM-DD) |
|
|
1795
|
+
| `currency` | string | Yes | Currency code (e.g., RON, EUR, USD) |
|
|
1796
|
+
| `exchangeRate` | number | No | Exchange rate to base currency |
|
|
1797
|
+
| `paymentMethod` | enum(cash, card, meal_ticket, mixed) | No | Payment method used for the transaction |
|
|
1798
|
+
| `cashPayment` | number | No | Amount paid in cash (for mixed payments) |
|
|
1799
|
+
| `cardPayment` | number | No | Amount paid by card (for mixed payments) |
|
|
1800
|
+
| `otherPayment` | number | No | Amount paid by other method, e.g. meal ticket (for mixed payments) |
|
|
1801
|
+
| `cashRegisterName` | string | No | Name or identifier of the cash register / fiscal printer |
|
|
1802
|
+
| `fiscalNumber` | string | No | Fiscal receipt number assigned by the cash register |
|
|
1803
|
+
| `customerName` | string | No | Customer name (when no clientId is provided) |
|
|
1804
|
+
| `customerCif` | string | No | Customer tax ID / CIF (when no clientId is provided) |
|
|
1805
|
+
| `projectReference` | string | No | Related project or order reference |
|
|
1806
|
+
| `issuerName` | string | No | Name of person issuing the receipt |
|
|
1807
|
+
| `issuerId` | string | No | UUID of the issuer user |
|
|
1808
|
+
| `salesAgent` | string | No | Sales agent name |
|
|
1809
|
+
| `notes` | string | No | Public notes on the receipt |
|
|
1810
|
+
| `mentions` | string | No | Additional mentions or instructions |
|
|
1811
|
+
| `internalNote` | string | No | Internal note (not visible to customer) |
|
|
1812
|
+
| `lines` | array | Yes | Array of line items (replaces all existing lines) |
|
|
1813
|
+
|
|
1814
|
+
### `receipts_delete`
|
|
1815
|
+
|
|
1816
|
+
Permanently delete a receipt. Only draft receipts can be deleted. Use cancel for issued receipts to preserve the audit trail.
|
|
1817
|
+
|
|
1818
|
+
**Parameters:**
|
|
1819
|
+
|
|
1820
|
+
| Name | Type | Required | Description |
|
|
1821
|
+
|------|------|----------|-------------|
|
|
1822
|
+
| `uuid` | string | Yes | UUID of the receipt to delete |
|
|
1823
|
+
| `companyId` | string | No | Company UUID (overrides configured default) |
|
|
1824
|
+
|
|
1825
|
+
### `receipts_issue`
|
|
1826
|
+
|
|
1827
|
+
Mark a receipt as issued at the point of sale. Transitions status from draft to issued. Once issued, the receipt becomes read-only and its fiscal data is locked.
|
|
1828
|
+
|
|
1829
|
+
**Parameters:**
|
|
1830
|
+
|
|
1831
|
+
| Name | Type | Required | Description |
|
|
1832
|
+
|------|------|----------|-------------|
|
|
1833
|
+
| `uuid` | string | Yes | UUID of the receipt to mark as issued |
|
|
1834
|
+
| `companyId` | string | No | Company UUID (overrides configured default) |
|
|
1835
|
+
|
|
1836
|
+
### `receipts_cancel`
|
|
1837
|
+
|
|
1838
|
+
Cancel a receipt. Can be cancelled from draft or issued status. Preserves the historical record unlike deletion. Optionally provide a cancellation reason.
|
|
1839
|
+
|
|
1840
|
+
**Parameters:**
|
|
1841
|
+
|
|
1842
|
+
| Name | Type | Required | Description |
|
|
1843
|
+
|------|------|----------|-------------|
|
|
1844
|
+
| `uuid` | string | Yes | UUID of the receipt to cancel |
|
|
1845
|
+
| `companyId` | string | No | Company UUID (overrides configured default) |
|
|
1846
|
+
| `cancellationReason` | string | No | Reason for cancellation |
|
|
1847
|
+
| `cancellationNotes` | string | No | Internal notes about the cancellation |
|
|
1848
|
+
|
|
1849
|
+
### `receipts_convert_to_invoice`
|
|
1850
|
+
|
|
1851
|
+
Convert an issued receipt into a final invoice. Creates a new invoice with all receipt data, marks the receipt as invoiced, and establishes a link between the two documents. Returns both the new invoice and updated receipt.
|
|
1852
|
+
|
|
1853
|
+
**Parameters:**
|
|
1854
|
+
|
|
1855
|
+
| Name | Type | Required | Description |
|
|
1856
|
+
|------|------|----------|-------------|
|
|
1857
|
+
| `uuid` | string | Yes | UUID of the issued receipt to convert to an invoice |
|
|
1858
|
+
| `companyId` | string | No | Company UUID (overrides configured default) |
|
|
1859
|
+
| `invoiceSeriesId` | string | No | UUID of the invoice series to use (if different from receipt series) |
|
|
1860
|
+
| `issueDate` | string | No | Override issue date for the new invoice (default: today, YYYY-MM-DD) |
|
|
1861
|
+
| `dueDate` | string | No | Due date for the new invoice (YYYY-MM-DD) |
|
|
1862
|
+
|
|
1863
|
+
### `receipts_pdf`
|
|
1864
|
+
|
|
1865
|
+
Download the PDF for a receipt (bon fiscal). Returns base64-encoded PDF binary data. The receipt must be in issued or invoiced status.
|
|
1866
|
+
|
|
1867
|
+
**Parameters:**
|
|
1868
|
+
|
|
1869
|
+
| Name | Type | Required | Description |
|
|
1870
|
+
|------|------|----------|-------------|
|
|
1871
|
+
| `uuid` | string | Yes | UUID of the receipt |
|
|
1872
|
+
| `companyId` | string | No | Company UUID (overrides configured default) |
|
|
1873
|
+
|
|
1874
|
+
### `receipts_restore`
|
|
1875
|
+
|
|
1876
|
+
Restore a cancelled receipt back to draft status. Only cancelled receipts can be restored. This reverses the cancellation and allows the receipt to be re-issued.
|
|
1877
|
+
|
|
1878
|
+
**Parameters:**
|
|
1879
|
+
|
|
1880
|
+
| Name | Type | Required | Description |
|
|
1881
|
+
|------|------|----------|-------------|
|
|
1882
|
+
| `uuid` | string | Yes | UUID of the cancelled receipt to restore |
|
|
1883
|
+
| `companyId` | string | No | Company UUID (overrides configured default) |
|
|
1884
|
+
|
|
1885
|
+
### `receipts_email`
|
|
1886
|
+
|
|
1887
|
+
Send a receipt (bon fiscal) to a customer via email with the PDF attached. Supports custom subject, body, CC, and BCC recipients.
|
|
1888
|
+
|
|
1889
|
+
**Parameters:**
|
|
1890
|
+
|
|
1891
|
+
| Name | Type | Required | Description |
|
|
1892
|
+
|------|------|----------|-------------|
|
|
1893
|
+
| `uuid` | string | Yes | UUID of the receipt to send |
|
|
1894
|
+
| `companyId` | string | No | Company UUID (overrides configured default) |
|
|
1895
|
+
| `to` | string | Yes | Recipient email address |
|
|
1896
|
+
| `subject` | string | No | Email subject (auto-generated if omitted) |
|
|
1897
|
+
| `body` | string | No | Email body text (auto-generated if omitted) |
|
|
1898
|
+
| `cc` | array | No | CC email addresses |
|
|
1899
|
+
| `bcc` | array | No | BCC email addresses |
|
|
1900
|
+
|
|
1901
|
+
### `receipts_email_defaults`
|
|
1902
|
+
|
|
1903
|
+
Get pre-filled email content for a receipt including default recipient, subject, and body text with template variables already substituted.
|
|
1904
|
+
|
|
1905
|
+
**Parameters:**
|
|
1906
|
+
|
|
1907
|
+
| Name | Type | Required | Description |
|
|
1908
|
+
|------|------|----------|-------------|
|
|
1909
|
+
| `uuid` | string | Yes | UUID of the receipt |
|
|
1910
|
+
| `companyId` | string | No | Company UUID (overrides configured default) |
|
|
1911
|
+
|
|
1912
|
+
### `receipts_email_history`
|
|
1913
|
+
|
|
1914
|
+
Get the email sending history for a receipt, including all sent emails with their status, timestamps, and recipient information.
|
|
1915
|
+
|
|
1916
|
+
**Parameters:**
|
|
1917
|
+
|
|
1918
|
+
| Name | Type | Required | Description |
|
|
1919
|
+
|------|------|----------|-------------|
|
|
1920
|
+
| `uuid` | string | Yes | UUID of the receipt |
|
|
1921
|
+
| `companyId` | string | No | Company UUID (overrides configured default) |
|
|
1922
|
+
|
|
1923
|
+
---
|
|
1924
|
+
|
|
1925
|
+
## Suppliers
|
|
1926
|
+
|
|
1927
|
+
### `suppliers_list`
|
|
1928
|
+
|
|
1929
|
+
List suppliers for the selected company grouped alphabetically. Suppliers are automatically created from incoming invoices via ANAF e-Factura synchronization. Supports search by name, CUI, or email.
|
|
1930
|
+
|
|
1931
|
+
**Parameters:**
|
|
1932
|
+
|
|
1933
|
+
| Name | Type | Required | Description |
|
|
1934
|
+
|------|------|----------|-------------|
|
|
1935
|
+
| `companyId` | string | No | Company UUID (overrides configured default) |
|
|
1936
|
+
| `page` | number | No | Page number (default: 1) |
|
|
1937
|
+
| `limit` | number | No | Items per page (default: 50, max: 200) |
|
|
1938
|
+
| `search` | string | No | Search term to filter by name, CUI, or email |
|
|
1939
|
+
|
|
1940
|
+
### `suppliers_create`
|
|
1941
|
+
|
|
1942
|
+
Create a new supplier manually. Requires name, county, city, address, and registration number. If a supplier with the same CIF already exists, returns the existing supplier instead.
|
|
1943
|
+
|
|
1944
|
+
**Parameters:**
|
|
1945
|
+
|
|
1946
|
+
| Name | Type | Required | Description |
|
|
1947
|
+
|------|------|----------|-------------|
|
|
1948
|
+
| `companyId` | string | No | Company UUID (overrides configured default) |
|
|
1949
|
+
| `name` | string | Yes | Supplier name |
|
|
1950
|
+
| `cif` | string | No | Tax identification number (CIF) |
|
|
1951
|
+
| `vatCode` | string | No | VAT code (e.g., RO12345678) |
|
|
1952
|
+
| `isVatPayer` | boolean | No | Whether supplier is a VAT payer (default: false) |
|
|
1953
|
+
| `registrationNumber` | string | Yes | Trade registry number (e.g., J40/123/2020) |
|
|
1954
|
+
| `address` | string | Yes | Street address |
|
|
1955
|
+
| `city` | string | Yes | City |
|
|
1956
|
+
| `county` | string | Yes | County |
|
|
1957
|
+
| `country` | string | No | Country code ISO 3166-1 alpha-2 (default: RO) |
|
|
1958
|
+
| `postalCode` | string | No | Postal code |
|
|
1959
|
+
| `email` | string | No | Email address |
|
|
1960
|
+
| `phone` | string | No | Phone number |
|
|
1961
|
+
| `bankName` | string | No | Bank name |
|
|
1962
|
+
| `bankAccount` | string | No | Bank account (IBAN) |
|
|
1963
|
+
| `notes` | string | No | Internal notes |
|
|
1964
|
+
|
|
1965
|
+
### `suppliers_get`
|
|
1966
|
+
|
|
1967
|
+
Get detailed information about a specific supplier including invoice history summary and the last 10 recent incoming invoices. Core data (name, CUI) comes from ANAF and is read-only.
|
|
1968
|
+
|
|
1969
|
+
**Parameters:**
|
|
1970
|
+
|
|
1971
|
+
| Name | Type | Required | Description |
|
|
1972
|
+
|------|------|----------|-------------|
|
|
1973
|
+
| `uuid` | string | Yes | UUID of the supplier to retrieve |
|
|
1974
|
+
| `companyId` | string | No | Company UUID (overrides configured default) |
|
|
1975
|
+
|
|
1976
|
+
### `suppliers_update`
|
|
1977
|
+
|
|
1978
|
+
Update editable fields of a supplier record. Core data (name, CUI) from ANAF cannot be modified. Only contact information, address details, banking details, and internal notes can be updated.
|
|
1979
|
+
|
|
1980
|
+
**Parameters:**
|
|
1981
|
+
|
|
1982
|
+
| Name | Type | Required | Description |
|
|
1983
|
+
|------|------|----------|-------------|
|
|
1984
|
+
| `uuid` | string | Yes | UUID of the supplier to update |
|
|
1985
|
+
| `companyId` | string | No | Company UUID (overrides configured default) |
|
|
1986
|
+
| `email` | nullable string | No | Email address |
|
|
1987
|
+
| `phone` | nullable string | No | Phone number |
|
|
1988
|
+
| `address` | nullable string | No | Street address |
|
|
1989
|
+
| `city` | nullable string | No | City |
|
|
1990
|
+
| `county` | nullable string | No | County |
|
|
1991
|
+
| `country` | string | No | Country code (ISO 3166-1 alpha-2, e.g., "RO") |
|
|
1992
|
+
| `postalCode` | nullable string | No | Postal code |
|
|
1993
|
+
| `bankName` | nullable string | No | Bank name |
|
|
1994
|
+
| `bankAccount` | nullable string | No | Bank account (IBAN) |
|
|
1995
|
+
| `notes` | nullable string | No | Internal notes about this supplier |
|
|
1996
|
+
|
|
1997
|
+
### `suppliers_delete`
|
|
1998
|
+
|
|
1999
|
+
Soft-delete a supplier record. The supplier is marked as deleted but not permanently removed. Existing incoming invoices from this supplier remain intact. If new invoices arrive from this supplier via ANAF sync, the supplier record will be restored automatically.
|
|
2000
|
+
|
|
2001
|
+
**Parameters:**
|
|
2002
|
+
|
|
2003
|
+
| Name | Type | Required | Description |
|
|
2004
|
+
|------|------|----------|-------------|
|
|
2005
|
+
| `uuid` | string | Yes | UUID of the supplier to delete |
|
|
2006
|
+
| `companyId` | string | No | Company UUID (overrides configured default) |
|
|
2007
|
+
|
|
2008
|
+
### `suppliers_export_csv`
|
|
2009
|
+
|
|
2010
|
+
Export all suppliers for the active company as a CSV file. Returns base64-encoded UTF-8 CSV with BOM.
|
|
2011
|
+
|
|
2012
|
+
**Parameters:**
|
|
2013
|
+
|
|
2014
|
+
| Name | Type | Required | Description |
|
|
2015
|
+
|------|------|----------|-------------|
|
|
2016
|
+
| `companyId` | string | No | Company UUID (overrides configured default) |
|
|
2017
|
+
|
|
2018
|
+
### `suppliers_export_saga_xml`
|
|
2019
|
+
|
|
2020
|
+
Export all suppliers in SAGA accounting XML format. Returns base64-encoded XML file compatible with SAGA import.
|
|
2021
|
+
|
|
2022
|
+
**Parameters:**
|
|
2023
|
+
|
|
2024
|
+
| Name | Type | Required | Description |
|
|
2025
|
+
|------|------|----------|-------------|
|
|
2026
|
+
| `companyId` | string | No | Company UUID (overrides configured default) |
|
|
2027
|
+
|
|
2028
|
+
### `suppliers_bulk_delete`
|
|
2029
|
+
|
|
2030
|
+
Soft-delete multiple suppliers in a single request. Returns the count of deleted items and any errors.
|
|
2031
|
+
|
|
2032
|
+
**Parameters:**
|
|
2033
|
+
|
|
2034
|
+
| Name | Type | Required | Description |
|
|
2035
|
+
|------|------|----------|-------------|
|
|
2036
|
+
| `ids` | array | Yes | Array of supplier UUIDs to delete (1-100) |
|
|
2037
|
+
| `companyId` | string | No | Company UUID (overrides configured default) |
|
|
2038
|
+
|
|
2039
|
+
---
|
|
2040
|
+
|
|
2041
|
+
## Exchange Rates
|
|
2042
|
+
|
|
2043
|
+
### `exchange_rates_list`
|
|
2044
|
+
|
|
2045
|
+
Get current BNR (Banca Nationala a Romaniei) exchange rates. Rates are updated daily around 13:00 EET. Returns rates for all supported currencies expressed as: 1 foreign currency = X RON. On weekends and holidays, the last available rates are returned.
|
|
2046
|
+
|
|
2047
|
+
**Parameters:**
|
|
2048
|
+
|
|
2049
|
+
| Name | Type | Required | Description |
|
|
2050
|
+
|------|------|----------|-------------|
|
|
2051
|
+
| `date` | string | No | Specific date for rates (YYYY-MM-DD, defaults to latest available rates) |
|
|
2052
|
+
|
|
2053
|
+
### `exchange_rates_convert`
|
|
2054
|
+
|
|
2055
|
+
Convert an amount between two currencies using current BNR exchange rates. For non-RON to non-RON conversions, cross-rates through RON are calculated. Result is rounded to 2 decimal places.
|
|
2056
|
+
|
|
2057
|
+
**Parameters:**
|
|
2058
|
+
|
|
2059
|
+
| Name | Type | Required | Description |
|
|
2060
|
+
|------|------|----------|-------------|
|
|
2061
|
+
| `from` | string | Yes | Source currency code (ISO 4217, e.g., EUR, USD, RON) |
|
|
2062
|
+
| `to` | string | Yes | Target currency code (ISO 4217, e.g., RON, EUR, USD) |
|
|
2063
|
+
| `amount` | number | Yes | Amount to convert |
|
|
2064
|
+
| `date` | string | No | Specific date for exchange rate (YYYY-MM-DD, defaults to latest rates) |
|
|
2065
|
+
|
|
2066
|
+
---
|
|
2067
|
+
|
|
2068
|
+
## Email Templates
|
|
2069
|
+
|
|
2070
|
+
### `email_templates_list`
|
|
2071
|
+
|
|
2072
|
+
List all email templates configured for the selected company. Templates support dynamic variables like {{invoice_number}}, {{client_name}}, {{total}}, {{currency}}, {{due_date}}, {{issue_date}}, {{company_name}}. If no templates exist, a default template is automatically created.
|
|
2073
|
+
|
|
2074
|
+
**Parameters:**
|
|
2075
|
+
|
|
2076
|
+
| Name | Type | Required | Description |
|
|
2077
|
+
|------|------|----------|-------------|
|
|
2078
|
+
| `companyId` | string | No | Company UUID (overrides configured default) |
|
|
2079
|
+
|
|
2080
|
+
### `email_templates_create`
|
|
2081
|
+
|
|
2082
|
+
Create a new email template for invoice communications. Templates support dynamic variables ({{invoice_number}}, {{client_name}}, {{total}}, {{currency}}, {{due_date}}, {{issue_date}}, {{company_name}}) that are replaced with actual data when emails are sent.
|
|
2083
|
+
|
|
2084
|
+
**Parameters:**
|
|
2085
|
+
|
|
2086
|
+
| Name | Type | Required | Description |
|
|
2087
|
+
|------|------|----------|-------------|
|
|
2088
|
+
| `companyId` | string | No | Company UUID (overrides configured default) |
|
|
2089
|
+
| `name` | string | Yes | Template name for internal reference |
|
|
2090
|
+
| `subject` | string | Yes | Email subject line (supports variables like {{invoice_number}}) |
|
|
2091
|
+
| `body` | string | Yes | Email body content (supports variables and HTML formatting) |
|
|
2092
|
+
| `isDefault` | boolean | No | Set as default template (default: false). Only one template can be default |
|
|
2093
|
+
|
|
2094
|
+
### `email_templates_update`
|
|
2095
|
+
|
|
2096
|
+
Update an existing email template. All fields are optional but at least one must be provided. Setting isDefault to true will unset the current default template.
|
|
2097
|
+
|
|
2098
|
+
**Parameters:**
|
|
2099
|
+
|
|
2100
|
+
| Name | Type | Required | Description |
|
|
2101
|
+
|------|------|----------|-------------|
|
|
2102
|
+
| `uuid` | string | Yes | UUID of the email template to update |
|
|
2103
|
+
| `companyId` | string | No | Company UUID (overrides configured default) |
|
|
2104
|
+
| `name` | string | No | Template name for internal reference |
|
|
2105
|
+
| `subject` | string | No | Email subject line (supports variables) |
|
|
2106
|
+
| `body` | string | No | Email body content (supports variables and HTML formatting) |
|
|
2107
|
+
| `isDefault` | boolean | No | Set as default template. Only one template can be default at a time |
|
|
2108
|
+
|
|
2109
|
+
### `email_templates_delete`
|
|
2110
|
+
|
|
2111
|
+
Permanently delete an email template. Cannot delete the last remaining template or the default template (set another as default first). Emails already sent using this template are not affected.
|
|
2112
|
+
|
|
2113
|
+
**Parameters:**
|
|
2114
|
+
|
|
2115
|
+
| Name | Type | Required | Description |
|
|
2116
|
+
|------|------|----------|-------------|
|
|
2117
|
+
| `uuid` | string | Yes | UUID of the email template to delete |
|
|
2118
|
+
| `companyId` | string | No | Company UUID (overrides configured default) |
|
|
2119
|
+
|
|
2120
|
+
---
|
|
2121
|
+
|
|
2122
|
+
## E-Invoicing (Multi-Country)
|
|
2123
|
+
|
|
2124
|
+
Unified e-invoicing tools supporting 5 EU countries: Romania (ANAF e-Factura), Germany (XRechnung), Italy (SDI), Poland (KSeF), and France (Factur-X). For ANAF-specific token management and sync, see [ANAF Integration](#anaf-integration).
|
|
2125
|
+
|
|
2126
|
+
### `einvoice_providers`
|
|
2127
|
+
|
|
2128
|
+
List all available e-invoicing providers. Returns provider identifiers, labels, and country codes.
|
|
2129
|
+
|
|
2130
|
+
*No parameters required.*
|
|
2131
|
+
|
|
2132
|
+
**Returns:** Array of providers with `value`, `label`, and `country` fields.
|
|
2133
|
+
|
|
2134
|
+
### `einvoice_submit`
|
|
2135
|
+
|
|
2136
|
+
Submit an invoice to an e-invoicing provider. Supports all EU providers: anaf (Romania e-Factura), xrechnung (Germany), sdi (Italy), ksef (Poland), facturx (France). For ANAF, uses the existing e-Factura submission flow. For other providers, generates country-specific XML and optionally submits via API if credentials are configured.
|
|
2137
|
+
|
|
2138
|
+
**Parameters:**
|
|
2139
|
+
|
|
2140
|
+
| Name | Type | Required | Description |
|
|
2141
|
+
|------|------|----------|-------------|
|
|
2142
|
+
| `uuid` | string | Yes | UUID of the invoice to submit |
|
|
2143
|
+
| `provider` | enum(anaf, xrechnung, sdi, ksef, facturx) | Yes | E-invoicing provider |
|
|
2144
|
+
| `companyId` | string | No | Company UUID (overrides configured default) |
|
|
2145
|
+
|
|
2146
|
+
**Provider details:**
|
|
2147
|
+
|
|
2148
|
+
| Provider | Country | Format | API |
|
|
2149
|
+
|----------|---------|--------|-----|
|
|
2150
|
+
| `anaf` | Romania | UBL 2.1 (CIUS-RO) | ANAF SPV (via existing e-Factura flow) |
|
|
2151
|
+
| `xrechnung` | Germany | UBL 2.1 (XRechnung 3.0) | ZRE (optional, needs credentials) |
|
|
2152
|
+
| `sdi` | Italy | FatturaPA XML | SDI (optional, needs cert or intermediary) |
|
|
2153
|
+
| `ksef` | Poland | FA(2) XML | KSeF REST API (optional, needs auth token) |
|
|
2154
|
+
| `facturx` | France | CII XML (Factur-X) | Chorus Pro (optional, B2G only) |
|
|
2155
|
+
|
|
2156
|
+
### `einvoice_submissions`
|
|
2157
|
+
|
|
2158
|
+
List all e-invoice submissions for a specific invoice. Shows submission history across all providers with status, external IDs, error messages, and metadata. Note: ANAF submissions are tracked separately via the existing e-Factura flow.
|
|
2159
|
+
|
|
2160
|
+
**Parameters:**
|
|
2161
|
+
|
|
2162
|
+
| Name | Type | Required | Description |
|
|
2163
|
+
|------|------|----------|-------------|
|
|
2164
|
+
| `uuid` | string | Yes | UUID of the invoice |
|
|
2165
|
+
| `companyId` | string | No | Company UUID (overrides configured default) |
|
|
2166
|
+
|
|
2167
|
+
### `einvoice_config_list`
|
|
2168
|
+
|
|
2169
|
+
List all e-invoice provider configurations for a company. Shows which providers are enabled and their settings.
|
|
2170
|
+
|
|
2171
|
+
**Parameters:**
|
|
2172
|
+
|
|
2173
|
+
| Name | Type | Required | Description |
|
|
2174
|
+
|------|------|----------|-------------|
|
|
2175
|
+
| `companyId` | string | No | Company UUID (overrides configured default) |
|
|
2176
|
+
|
|
2177
|
+
**Provider-specific config fields:**
|
|
2178
|
+
|
|
2179
|
+
| Provider | Config Fields |
|
|
2180
|
+
|----------|--------------|
|
|
2181
|
+
| `anaf` | Managed via ANAF tokens (see `anaf_tokens`) |
|
|
2182
|
+
| `xrechnung` | `clientId`, `clientSecret` (for ZRE API) |
|
|
2183
|
+
| `sdi` | `certPath`, `certPassword` (direct) or `apiEndpoint`, `apiKey` (intermediary) |
|
|
2184
|
+
| `ksef` | `authToken`, `nip` |
|
|
2185
|
+
| `facturx` | `clientId`, `clientSecret`, `siret` (for Chorus Pro) |
|
|
2186
|
+
|
|
2187
|
+
### `einvoice_config_save`
|
|
2188
|
+
|
|
2189
|
+
Create or update an e-invoice provider configuration for a company. Use this to enable a provider and set API credentials.
|
|
2190
|
+
|
|
2191
|
+
**Parameters:**
|
|
2192
|
+
|
|
2193
|
+
| Name | Type | Required | Description |
|
|
2194
|
+
|------|------|----------|-------------|
|
|
2195
|
+
| `provider` | enum(anaf, xrechnung, sdi, ksef, facturx) | Yes | E-invoicing provider to configure |
|
|
2196
|
+
| `enabled` | boolean | No | Whether this provider is active (default: true) |
|
|
2197
|
+
| `config` | object | No | Provider-specific configuration as JSON object |
|
|
2198
|
+
| `companyId` | string | No | Company UUID (overrides configured default) |
|
|
2199
|
+
|
|
2200
|
+
### `einvoice_config_delete`
|
|
2201
|
+
|
|
2202
|
+
Delete an e-invoice provider configuration for a company. Removes the provider settings and disables submissions. Existing submissions are not affected.
|
|
2203
|
+
|
|
2204
|
+
**Parameters:**
|
|
2205
|
+
|
|
2206
|
+
| Name | Type | Required | Description |
|
|
2207
|
+
|------|------|----------|-------------|
|
|
2208
|
+
| `provider` | enum(anaf, xrechnung, sdi, ksef, facturx) | Yes | E-invoicing provider to remove |
|
|
2209
|
+
| `companyId` | string | No | Company UUID (overrides configured default) |
|
|
2210
|
+
|
|
2211
|
+
### `einvoice_config_test`
|
|
2212
|
+
|
|
2213
|
+
Test e-invoice provider connection with given credentials before saving. Validates that the credentials can authenticate with the provider's API. ANAF uses a separate OAuth flow and cannot be tested here.
|
|
2214
|
+
|
|
2215
|
+
**Parameters:**
|
|
2216
|
+
|
|
2217
|
+
| Name | Type | Required | Description |
|
|
2218
|
+
|------|------|----------|-------------|
|
|
2219
|
+
| `provider` | enum(xrechnung, sdi, ksef, facturx) | Yes | E-invoicing provider to test |
|
|
2220
|
+
| `config` | object | Yes | Provider-specific credentials to test |
|
|
2221
|
+
| `companyId` | string | No | Company UUID (overrides configured default) |
|
|
2222
|
+
|
|
2223
|
+
**Config fields per provider:**
|
|
2224
|
+
|
|
2225
|
+
| Provider | Required Config |
|
|
2226
|
+
|----------|----------------|
|
|
2227
|
+
| `xrechnung` | `{clientId, clientSecret}` |
|
|
2228
|
+
| `sdi` | `{apiEndpoint, apiKey}` (intermediary) or `{certPassword}` (direct) |
|
|
2229
|
+
| `ksef` | `{authToken, nip}` |
|
|
2230
|
+
| `facturx` | `{clientId, clientSecret}` |
|
|
2231
|
+
|
|
2232
|
+
**Returns:** `{success: boolean, error: string|null}`
|
|
2233
|
+
|
|
2234
|
+
---
|
|
2235
|
+
|
|
2236
|
+
## ANAF Integration
|
|
2237
|
+
|
|
2238
|
+
### `anaf_status`
|
|
2239
|
+
|
|
2240
|
+
Check the current ANAF integration status for the authenticated user. Returns token count, overall validity, and per-token details including CIF, expiry, and validity for each saved ANAF token.
|
|
2241
|
+
|
|
2242
|
+
*No parameters required.*
|
|
2243
|
+
|
|
2244
|
+
### `anaf_tokens`
|
|
2245
|
+
|
|
2246
|
+
List all ANAF OAuth tokens associated with the authenticated user. Each token enables e-Factura synchronization for a specific company CIF. Returns token ID, CIF, expiry, and validity status.
|
|
2247
|
+
|
|
2248
|
+
*No parameters required.*
|
|
2249
|
+
|
|
2250
|
+
### `anaf_create_token_link`
|
|
2251
|
+
|
|
2252
|
+
Create a device-based authentication token link for completing the ANAF OAuth flow. Returns a unique URL that can be opened in a browser to complete ANAF authentication. Maximum 5 active links per user. Link expires after a short period.
|
|
2253
|
+
|
|
2254
|
+
*No parameters required.*
|
|
2255
|
+
|
|
2256
|
+
### `anaf_delete_token`
|
|
2257
|
+
|
|
2258
|
+
Delete an ANAF OAuth token. This revokes e-Factura synchronization access for the CIF associated with this token. The token ID is an integer obtained from anaf_tokens.
|
|
2259
|
+
|
|
2260
|
+
**Parameters:**
|
|
2261
|
+
|
|
2262
|
+
| Name | Type | Required | Description |
|
|
2263
|
+
|------|------|----------|-------------|
|
|
2264
|
+
| `id` | number | Yes | The ANAF token ID to delete (integer ID from anaf_tokens) |
|
|
2265
|
+
|
|
2266
|
+
### `anaf_validate_cif`
|
|
2267
|
+
|
|
2268
|
+
Validate that an ANAF token has proper access to e-Factura for a specific CIF. Checks organization ownership, ANAF registry, and e-Factura access permissions. Returns validation result with any error messages.
|
|
2269
|
+
|
|
2270
|
+
**Parameters:**
|
|
2271
|
+
|
|
2272
|
+
| Name | Type | Required | Description |
|
|
2273
|
+
|------|------|----------|-------------|
|
|
2274
|
+
| `id` | number | Yes | The ANAF token ID to validate (integer ID from anaf_tokens) |
|
|
2275
|
+
|
|
2276
|
+
### `anaf_sync_trigger`
|
|
2277
|
+
|
|
2278
|
+
Manually trigger e-Factura synchronization for all companies with valid ANAF tokens. Validates token availability and subscription plan rate limits, then dispatches an async sync job to fetch new invoices from ANAF SPV.
|
|
2279
|
+
|
|
2280
|
+
*No parameters required.*
|
|
2281
|
+
|
|
2282
|
+
### `anaf_sync_status`
|
|
2283
|
+
|
|
2284
|
+
Get the current e-Factura synchronization status and configuration. Returns whether sync is enabled, the last successful sync timestamp, token validity, and the sync frequency interval.
|
|
2285
|
+
|
|
2286
|
+
*No parameters required.*
|
|
2287
|
+
|
|
2288
|
+
### `anaf_sync_log`
|
|
2289
|
+
|
|
2290
|
+
Retrieve the recent e-Factura sync activity log showing the last 50 synced invoices. Each entry shows the invoice ID, company CIF, sync timestamp, and status (success, failed, or skipped).
|
|
2291
|
+
|
|
2292
|
+
*No parameters required.*
|
|
2293
|
+
|
|
2294
|
+
---
|
|
2295
|
+
|
|
2296
|
+
## e-Factura Messages
|
|
2297
|
+
|
|
2298
|
+
### `efactura_messages_list`
|
|
2299
|
+
|
|
2300
|
+
List e-Factura messages from the ANAF SPV platform with pagination and filtering. Messages include responses to uploaded invoices, notifications (accepted/rejected), errors, warnings, and informational messages. Useful for troubleshooting invoice upload issues.
|
|
2301
|
+
|
|
2302
|
+
**Parameters:**
|
|
2303
|
+
|
|
2304
|
+
| Name | Type | Required | Description |
|
|
2305
|
+
|------|------|----------|-------------|
|
|
2306
|
+
| `page` | number | No | Page number (default: 1) |
|
|
2307
|
+
| `limit` | number | No | Items per page (default: 20, max: 100) |
|
|
2308
|
+
| `messageType` | enum(response, notification, error, warning, info) | No | Filter by message type |
|
|
2309
|
+
| `status` | enum(ok, error, warning, pending) | No | Filter by message status |
|
|
2310
|
+
|
|
2311
|
+
### `efactura_messages_get`
|
|
2312
|
+
|
|
2313
|
+
Get full details of a specific e-Factura message including both parsed details and raw ANAF response data. Includes related invoice information when available. Useful for diagnosing specific invoice upload errors.
|
|
2314
|
+
|
|
2315
|
+
**Parameters:**
|
|
2316
|
+
|
|
2317
|
+
| Name | Type | Required | Description |
|
|
2318
|
+
|------|------|----------|-------------|
|
|
2319
|
+
| `uuid` | string | Yes | UUID of the e-Factura message to retrieve |
|
|
2320
|
+
|
|
2321
|
+
---
|
|
2322
|
+
|
|
2323
|
+
## Dashboard
|
|
2324
|
+
|
|
2325
|
+
### `dashboard_stats`
|
|
2326
|
+
|
|
2327
|
+
Get comprehensive dashboard statistics for the selected company. Returns invoice counts (total, draft, issued, paid, overdue), revenue amounts (total revenue, VAT, paid, unpaid), monthly breakdown, top clients, top products, recent activity, and payment summary. Supports predefined periods (month, quarter, year) or custom date ranges.
|
|
2328
|
+
|
|
2329
|
+
**Parameters:**
|
|
2330
|
+
|
|
2331
|
+
| Name | Type | Required | Description |
|
|
2332
|
+
|------|------|----------|-------------|
|
|
2333
|
+
| `companyId` | string | No | Company UUID (overrides configured default) |
|
|
2334
|
+
| `period` | enum(month, quarter, year) | No | Predefined time period for statistics |
|
|
2335
|
+
| `from` | string | No | Custom start date (YYYY-MM-DD), used instead of period |
|
|
2336
|
+
| `to` | string | No | Custom end date (YYYY-MM-DD), used instead of period |
|
|
2337
|
+
|
|
2338
|
+
---
|
|
2339
|
+
|
|
2340
|
+
## Members
|
|
2341
|
+
|
|
2342
|
+
### `members_list`
|
|
2343
|
+
|
|
2344
|
+
List all members of the organization with their roles, active status, and allowed company access. Only organization admins and owners can list members.
|
|
2345
|
+
|
|
2346
|
+
*No parameters required.*
|
|
2347
|
+
|
|
2348
|
+
### `members_update`
|
|
2349
|
+
|
|
2350
|
+
Update a member's role, active status, allowed company access, and custom permissions. Cannot change role to OWNER or modify the organization owner. Roles: ADMIN, ACCOUNTANT, EMPLOYEE. Pass permissions as an array of permission strings to set custom permissions, or null to reset to role defaults.
|
|
2351
|
+
|
|
2352
|
+
**Parameters:**
|
|
2353
|
+
|
|
2354
|
+
| Name | Type | Required | Description |
|
|
2355
|
+
|------|------|----------|-------------|
|
|
2356
|
+
| `uuid` | string | Yes | Member UUID to update |
|
|
2357
|
+
| `role` | enum(ADMIN, ACCOUNTANT, EMPLOYEE) | No | New role for the member: ADMIN, ACCOUNTANT, or EMPLOYEE |
|
|
2358
|
+
| `isActive` | boolean | No | Whether the member is active. Deactivated members cannot log in. |
|
|
2359
|
+
| `allowedCompanies` | array | No | Array of company UUIDs the member is allowed to access |
|
|
2360
|
+
| `permissions` | array\|null | No | Custom permissions array (e.g. `["company.view","invoice.create"]`). Pass `null` to reset to role defaults. |
|
|
2361
|
+
|
|
2362
|
+
### `members_delete`
|
|
2363
|
+
|
|
2364
|
+
Deactivate (soft-delete) a member from the organization. Preserves historical data but prevents login. Cannot deactivate yourself, the organization owner, or super admins.
|
|
2365
|
+
|
|
2366
|
+
**Parameters:**
|
|
2367
|
+
|
|
2368
|
+
| Name | Type | Required | Description |
|
|
2369
|
+
|------|------|----------|-------------|
|
|
2370
|
+
| `uuid` | string | Yes | Member UUID to deactivate |
|
|
2371
|
+
|
|
2372
|
+
### `members_permissions_reference`
|
|
2373
|
+
|
|
2374
|
+
Get the permissions reference: all available permissions grouped by category, and role default permissions for each role (owner, admin, accountant, employee). Useful for understanding which permissions exist before setting custom permissions on a member.
|
|
2375
|
+
|
|
2376
|
+
*No parameters required.*
|
|
2377
|
+
|
|
2378
|
+
---
|
|
2379
|
+
|
|
2380
|
+
## Invitations
|
|
2381
|
+
|
|
2382
|
+
### `invitations_list`
|
|
2383
|
+
|
|
2384
|
+
List all pending invitations for the organization. Only returns invitations that have not yet been accepted. Only organization admins and owners can view invitations.
|
|
2385
|
+
|
|
2386
|
+
*No parameters required.*
|
|
2387
|
+
|
|
2388
|
+
### `invitations_create`
|
|
2389
|
+
|
|
2390
|
+
Invite a new user to join the organization by email. An invitation email is sent automatically. Invitations expire after 7 days. Roles: ADMIN, ACCOUNTANT, EMPLOYEE (cannot invite as OWNER).
|
|
2391
|
+
|
|
2392
|
+
**Parameters:**
|
|
2393
|
+
|
|
2394
|
+
| Name | Type | Required | Description |
|
|
2395
|
+
|------|------|----------|-------------|
|
|
2396
|
+
| `email` | string | Yes | Email address of the user to invite |
|
|
2397
|
+
| `role` | enum(ADMIN, ACCOUNTANT, EMPLOYEE) | Yes | Role to assign to the invited user: ADMIN, ACCOUNTANT, or EMPLOYEE |
|
|
2398
|
+
|
|
2399
|
+
### `invitations_delete`
|
|
2400
|
+
|
|
2401
|
+
Cancel a pending invitation. The invitation token is immediately invalidated and cannot be used. Cannot cancel invitations that have already been accepted.
|
|
2402
|
+
|
|
2403
|
+
**Parameters:**
|
|
2404
|
+
|
|
2405
|
+
| Name | Type | Required | Description |
|
|
2406
|
+
|------|------|----------|-------------|
|
|
2407
|
+
| `uuid` | string | Yes | Invitation UUID to cancel |
|
|
2408
|
+
|
|
2409
|
+
### `invitations_resend`
|
|
2410
|
+
|
|
2411
|
+
Resend the invitation email for a pending invitation. Does not extend the expiration date. If the invitation has expired, cancel it and create a new one instead.
|
|
2412
|
+
|
|
2413
|
+
**Parameters:**
|
|
2414
|
+
|
|
2415
|
+
| Name | Type | Required | Description |
|
|
2416
|
+
|------|------|----------|-------------|
|
|
2417
|
+
| `uuid` | string | Yes | Invitation UUID to resend |
|
|
2418
|
+
|
|
2419
|
+
---
|
|
2420
|
+
|
|
2421
|
+
## Notifications
|
|
2422
|
+
|
|
2423
|
+
### `notifications_list`
|
|
2424
|
+
|
|
2425
|
+
Retrieve a paginated list of notifications for the authenticated user. Notification types include: invoice_received, invoice_paid, sync_completed, sync_failed, token_expiring, token_expired, payment_overdue, invitation_received.
|
|
2426
|
+
|
|
2427
|
+
**Parameters:**
|
|
2428
|
+
|
|
2429
|
+
| Name | Type | Required | Description |
|
|
2430
|
+
|------|------|----------|-------------|
|
|
2431
|
+
| `page` | number | No | Page number for pagination (default: 1) |
|
|
2432
|
+
| `limit` | number | No | Number of items per page (default: 20, max: 100) |
|
|
2433
|
+
|
|
2434
|
+
### `notifications_unread_count`
|
|
2435
|
+
|
|
2436
|
+
Get the count of unread notifications for the authenticated user. This lightweight endpoint is suitable for polling to update notification badges.
|
|
2437
|
+
|
|
2438
|
+
*No parameters required.*
|
|
2439
|
+
|
|
2440
|
+
### `notifications_read_all`
|
|
2441
|
+
|
|
2442
|
+
Mark all notifications as read for the authenticated user in a single operation. Resets the unread count to zero. This operation is idempotent.
|
|
2443
|
+
|
|
2444
|
+
*No parameters required.*
|
|
2445
|
+
|
|
2446
|
+
### `notifications_mark_read`
|
|
2447
|
+
|
|
2448
|
+
Mark a specific notification as read. This operation is idempotent — marking an already-read notification has no error. Decrements the unread count by one.
|
|
2449
|
+
|
|
2450
|
+
**Parameters:**
|
|
2451
|
+
|
|
2452
|
+
| Name | Type | Required | Description |
|
|
2453
|
+
|------|------|----------|-------------|
|
|
2454
|
+
| `id` | string | Yes | Notification UUID to mark as read |
|
|
2455
|
+
|
|
2456
|
+
### `notification_preferences_get`
|
|
2457
|
+
|
|
2458
|
+
Get the authenticated user's notification preferences for all event types. Returns per-event settings for email, in-app, push, and WhatsApp channels.
|
|
2459
|
+
|
|
2460
|
+
*No parameters required.*
|
|
2461
|
+
|
|
2462
|
+
### `notification_preferences_update`
|
|
2463
|
+
|
|
2464
|
+
Update notification preferences for specific event types. Event types include: invoice.validated, invoice.rejected, invoice.due_soon, invoice.due_today, invoice.overdue, sync.completed, sync.error, efactura.new_documents, token.expiring_soon, token.refresh_failed, export_ready.
|
|
2465
|
+
|
|
2466
|
+
**Parameters:**
|
|
2467
|
+
|
|
2468
|
+
| Name | Type | Required | Description |
|
|
2469
|
+
|------|------|----------|-------------|
|
|
2470
|
+
| `preferences` | array | Yes | Array of preference objects with eventType, emailEnabled, inAppEnabled, pushEnabled, whatsappEnabled |
|
|
2471
|
+
|
|
2472
|
+
---
|
|
2473
|
+
|
|
2474
|
+
## Webhooks
|
|
2475
|
+
|
|
2476
|
+
### `webhooks_list`
|
|
2477
|
+
|
|
2478
|
+
List all webhook endpoints configured for the current company. Secrets are masked in the listing. Requires X-Company header (companyId param or STORNO_COMPANY_ID env var).
|
|
2479
|
+
|
|
2480
|
+
**Parameters:**
|
|
2481
|
+
|
|
2482
|
+
| Name | Type | Required | Description |
|
|
2483
|
+
|------|------|----------|-------------|
|
|
2484
|
+
| `companyId` | string | No | Company UUID (overrides STORNO_COMPANY_ID env var) |
|
|
2485
|
+
|
|
2486
|
+
### `webhooks_get`
|
|
2487
|
+
|
|
2488
|
+
Retrieve the full configuration of a single webhook endpoint. The secret is always masked in this response — use webhooks_regenerate_secret to obtain a new full secret.
|
|
2489
|
+
|
|
2490
|
+
**Parameters:**
|
|
2491
|
+
|
|
2492
|
+
| Name | Type | Required | Description |
|
|
2493
|
+
|------|------|----------|-------------|
|
|
2494
|
+
| `uuid` | string | Yes | Webhook endpoint UUID |
|
|
2495
|
+
| `companyId` | string | No | Company UUID (overrides STORNO_COMPANY_ID env var) |
|
|
2496
|
+
|
|
2497
|
+
### `webhooks_create`
|
|
2498
|
+
|
|
2499
|
+
Register a new webhook endpoint for the current company. The response includes the full signing secret — store it securely immediately as it will be masked in all subsequent responses. URL must use HTTPS. Use ["*"] for events to subscribe to all event types.
|
|
2500
|
+
|
|
2501
|
+
**Parameters:**
|
|
2502
|
+
|
|
2503
|
+
| Name | Type | Required | Description |
|
|
2504
|
+
|------|------|----------|-------------|
|
|
2505
|
+
| `url` | string | Yes | HTTPS destination URL that will receive POST requests from Storno |
|
|
2506
|
+
| `events` | array | Yes | Array of event type names to subscribe to (e.g. ["invoice.created", "invoice.validated"]). Use ["*"] to subscribe to all events. |
|
|
2507
|
+
| `description` | string | No | Human-readable label for this webhook endpoint |
|
|
2508
|
+
| `isActive` | boolean | No | Whether the webhook is active on creation (default: true) |
|
|
2509
|
+
| `companyId` | string | No | Company UUID (overrides STORNO_COMPANY_ID env var) |
|
|
2510
|
+
|
|
2511
|
+
### `webhooks_update`
|
|
2512
|
+
|
|
2513
|
+
Partially update an existing webhook endpoint. Only provided fields are changed. Providing events replaces the entire subscription list — send the complete desired set each time. URL must use HTTPS.
|
|
2514
|
+
|
|
2515
|
+
**Parameters:**
|
|
2516
|
+
|
|
2517
|
+
| Name | Type | Required | Description |
|
|
2518
|
+
|------|------|----------|-------------|
|
|
2519
|
+
| `uuid` | string | Yes | Webhook endpoint UUID to update |
|
|
2520
|
+
| `url` | string | No | New HTTPS destination URL |
|
|
2521
|
+
| `events` | array | No | Replacement list of event type names (replaces entire list, not additive). Use ["*"] for all events. |
|
|
2522
|
+
| `description` | string | No | Updated human-readable label for this webhook endpoint |
|
|
2523
|
+
| `isActive` | boolean | No | Enable (true) or pause (false) deliveries for this webhook |
|
|
2524
|
+
| `companyId` | string | No | Company UUID (overrides STORNO_COMPANY_ID env var) |
|
|
2525
|
+
|
|
2526
|
+
### `webhooks_delete`
|
|
2527
|
+
|
|
2528
|
+
Permanently delete a webhook endpoint and all its delivery history. This is a hard delete with no recovery. To pause deliveries temporarily, use webhooks_update with isActive: false instead.
|
|
2529
|
+
|
|
2530
|
+
**Parameters:**
|
|
2531
|
+
|
|
2532
|
+
| Name | Type | Required | Description |
|
|
2533
|
+
|------|------|----------|-------------|
|
|
2534
|
+
| `uuid` | string | Yes | Webhook endpoint UUID to permanently delete |
|
|
2535
|
+
| `companyId` | string | No | Company UUID (overrides STORNO_COMPANY_ID env var) |
|
|
2536
|
+
|
|
2537
|
+
### `webhooks_events`
|
|
2538
|
+
|
|
2539
|
+
List all available webhook event types that can be subscribed to, including their descriptions and categories (invoices, payments, clients, sync, proforma). Use this to discover valid event names for webhook configuration.
|
|
2540
|
+
|
|
2541
|
+
*No parameters required.*
|
|
2542
|
+
|
|
2543
|
+
### `webhooks_deliveries`
|
|
2544
|
+
|
|
2545
|
+
Retrieve a paginated list of delivery attempts for a webhook endpoint. Can filter by status (success/failed), event type, and date range. Use webhooks_delivery_detail to inspect full request/response payloads.
|
|
2546
|
+
|
|
2547
|
+
**Parameters:**
|
|
2548
|
+
|
|
2549
|
+
| Name | Type | Required | Description |
|
|
2550
|
+
|------|------|----------|-------------|
|
|
2551
|
+
| `uuid` | string | Yes | Webhook endpoint UUID |
|
|
2552
|
+
| `page` | number | No | Page number for pagination (default: 1) |
|
|
2553
|
+
| `limit` | number | No | Number of items per page (default: 20, max: 100) |
|
|
2554
|
+
| `status` | enum(success, failed) | No | Filter by delivery status: success or failed |
|
|
2555
|
+
| `eventType` | string | No | Filter by event type name (e.g. invoice.validated) |
|
|
2556
|
+
| `from` | string | No | Start date filter in ISO 8601 format (YYYY-MM-DD) |
|
|
2557
|
+
| `to` | string | No | End date filter in ISO 8601 format (YYYY-MM-DD) |
|
|
2558
|
+
| `companyId` | string | No | Company UUID (overrides STORNO_COMPANY_ID env var) |
|
|
2559
|
+
|
|
2560
|
+
### `webhooks_delivery_detail`
|
|
2561
|
+
|
|
2562
|
+
Retrieve the complete details of a single webhook delivery attempt, including the full request payload, request headers (with signature), and the full response received. Use this to debug failed deliveries.
|
|
2563
|
+
|
|
2564
|
+
**Parameters:**
|
|
2565
|
+
|
|
2566
|
+
| Name | Type | Required | Description |
|
|
2567
|
+
|------|------|----------|-------------|
|
|
2568
|
+
| `uuid` | string | Yes | Webhook endpoint UUID |
|
|
2569
|
+
| `deliveryUuid` | string | Yes | Delivery attempt UUID |
|
|
2570
|
+
| `companyId` | string | No | Company UUID (overrides STORNO_COMPANY_ID env var) |
|
|
2571
|
+
|
|
2572
|
+
### `webhooks_regenerate_secret`
|
|
2573
|
+
|
|
2574
|
+
Issue a new HMAC-SHA256 signing secret for a webhook endpoint, immediately invalidating the previous one. The new secret is returned in full only in this response — store it securely. Update your endpoint verification logic before calling this in production.
|
|
2575
|
+
|
|
2576
|
+
**Parameters:**
|
|
2577
|
+
|
|
2578
|
+
| Name | Type | Required | Description |
|
|
2579
|
+
|------|------|----------|-------------|
|
|
2580
|
+
| `uuid` | string | Yes | Webhook endpoint UUID to regenerate the secret for |
|
|
2581
|
+
| `companyId` | string | No | Company UUID (overrides STORNO_COMPANY_ID env var) |
|
|
2582
|
+
|
|
2583
|
+
### `webhooks_test`
|
|
2584
|
+
|
|
2585
|
+
Send a synchronous test delivery to a webhook endpoint and return the outcome immediately. Uses a synthetic webhook.test event payload. The webhook must be active. The delivery is recorded in delivery history.
|
|
2586
|
+
|
|
2587
|
+
**Parameters:**
|
|
2588
|
+
|
|
2589
|
+
| Name | Type | Required | Description |
|
|
2590
|
+
|------|------|----------|-------------|
|
|
2591
|
+
| `uuid` | string | Yes | Webhook endpoint UUID to send the test delivery to |
|
|
2592
|
+
| `eventType` | string | No | Override the test event type name (default: webhook.test) |
|
|
2593
|
+
| `companyId` | string | No | Company UUID (overrides STORNO_COMPANY_ID env var) |
|
|
2594
|
+
|
|
2595
|
+
---
|
|
2596
|
+
|
|
2597
|
+
## API Keys
|
|
2598
|
+
|
|
2599
|
+
### `api_keys_list`
|
|
2600
|
+
|
|
2601
|
+
List all API tokens for the authenticated user within the current organization. Returns both active and revoked tokens sorted by creation date, newest first. The raw token value is never included — only the tokenPrefix for identification.
|
|
2602
|
+
|
|
2603
|
+
*No parameters required.*
|
|
2604
|
+
|
|
2605
|
+
### `api_keys_scopes`
|
|
2606
|
+
|
|
2607
|
+
List all permission scopes available to the current user, grouped by category. Only scopes the user already holds are returned — useful for inspecting what permissions a token can be granted.
|
|
2608
|
+
|
|
2609
|
+
*No parameters required.*
|
|
2610
|
+
|
|
2611
|
+
---
|
|
2612
|
+
|
|
2613
|
+
## OAuth2 Apps
|
|
2614
|
+
|
|
2615
|
+
### `oauth2_clients_list`
|
|
2616
|
+
|
|
2617
|
+
List all registered OAuth2 applications for the current organization. Returns app name, client ID, client type, scopes, status, and creation date.
|
|
2618
|
+
|
|
2619
|
+
*No parameters required.*
|
|
2620
|
+
|
|
2621
|
+
### `oauth2_clients_get`
|
|
2622
|
+
|
|
2623
|
+
Get details of a specific OAuth2 application by its UUID.
|
|
2624
|
+
|
|
2625
|
+
**Parameters:**
|
|
2626
|
+
|
|
2627
|
+
| Name | Type | Required | Description |
|
|
2628
|
+
|------|------|----------|-------------|
|
|
2629
|
+
| `uuid` | string | Yes | OAuth2 app UUID |
|
|
2630
|
+
|
|
2631
|
+
### `oauth2_clients_create`
|
|
2632
|
+
|
|
2633
|
+
Register a new OAuth2 application (third-party integration). Returns the client secret once for confidential clients — store it securely. Cannot be called via API key or OAuth2 token; requires a browser session JWT.
|
|
2634
|
+
|
|
2635
|
+
**Parameters:**
|
|
2636
|
+
|
|
2637
|
+
| Name | Type | Required | Description |
|
|
2638
|
+
|------|------|----------|-------------|
|
|
2639
|
+
| `name` | string | Yes | Human-readable name for the app |
|
|
2640
|
+
| `clientType` | string | No | `confidential` (default, server-side) or `public` (SPA/mobile) |
|
|
2641
|
+
| `redirectUris` | string[] | Yes | Allowed OAuth2 callback URLs |
|
|
2642
|
+
| `scopes` | string[] | Yes | Permission scopes the app can request (must be subset of your permissions) |
|
|
2643
|
+
| `description` | string | No | Optional description of the app |
|
|
2644
|
+
| `websiteUrl` | string | No | App website URL |
|
|
2645
|
+
| `logoUrl` | string | No | App logo URL |
|
|
2646
|
+
|
|
2647
|
+
### `oauth2_clients_update`
|
|
2648
|
+
|
|
2649
|
+
Update an existing OAuth2 application. Only provided fields are changed. Cannot be called via API key or OAuth2 token.
|
|
2650
|
+
|
|
2651
|
+
**Parameters:**
|
|
2652
|
+
|
|
2653
|
+
| Name | Type | Required | Description |
|
|
2654
|
+
|------|------|----------|-------------|
|
|
2655
|
+
| `uuid` | string | Yes | OAuth2 app UUID |
|
|
2656
|
+
| `name` | string | No | New name |
|
|
2657
|
+
| `description` | string | No | New description |
|
|
2658
|
+
| `redirectUris` | string[] | No | New redirect URIs |
|
|
2659
|
+
| `scopes` | string[] | No | New scopes |
|
|
2660
|
+
| `isActive` | boolean | No | Enable/disable the app |
|
|
2661
|
+
| `websiteUrl` | string | No | New website URL |
|
|
2662
|
+
| `logoUrl` | string | No | New logo URL |
|
|
2663
|
+
|
|
2664
|
+
### `oauth2_clients_revoke`
|
|
2665
|
+
|
|
2666
|
+
Revoke an OAuth2 application and all its associated access and refresh tokens. This action is irreversible. Cannot be called via API key or OAuth2 token.
|
|
2667
|
+
|
|
2668
|
+
**Parameters:**
|
|
2669
|
+
|
|
2670
|
+
| Name | Type | Required | Description |
|
|
2671
|
+
|------|------|----------|-------------|
|
|
2672
|
+
| `uuid` | string | Yes | OAuth2 app UUID |
|
|
2673
|
+
|
|
2674
|
+
### `oauth2_clients_rotate_secret`
|
|
2675
|
+
|
|
2676
|
+
Rotate the client secret of a confidential OAuth2 application. Returns the new secret once — store it securely. The old secret is immediately invalidated. Cannot be called via API key or OAuth2 token.
|
|
2677
|
+
|
|
2678
|
+
**Parameters:**
|
|
2679
|
+
|
|
2680
|
+
| Name | Type | Required | Description |
|
|
2681
|
+
|------|------|----------|-------------|
|
|
2682
|
+
| `uuid` | string | Yes | OAuth2 app UUID |
|
|
2683
|
+
|
|
2684
|
+
### `oauth2_clients_scopes`
|
|
2685
|
+
|
|
2686
|
+
List all available permission scopes that can be granted to OAuth2 applications, grouped by category. Only returns scopes the authenticated user holds.
|
|
2687
|
+
|
|
2688
|
+
*No parameters required.*
|
|
2689
|
+
|
|
2690
|
+
---
|
|
2691
|
+
|
|
2692
|
+
## Reports
|
|
2693
|
+
|
|
2694
|
+
### `reports_vat`
|
|
2695
|
+
|
|
2696
|
+
Generate a detailed VAT (TVA) report for a specific month. Returns a summary of sales, purchases, VAT collected, VAT deductible, and net VAT due, along with per-invoice details. Requires X-Company header (companyId param or STORNO_COMPANY_ID env var).
|
|
2697
|
+
|
|
2698
|
+
**Parameters:**
|
|
2699
|
+
|
|
2700
|
+
| Name | Type | Required | Description |
|
|
2701
|
+
|------|------|----------|-------------|
|
|
2702
|
+
| `year` | number | Yes | Report year (e.g. 2026) |
|
|
2703
|
+
| `month` | number | Yes | Report month (1–12) |
|
|
2704
|
+
| `companyId` | string | No | Company UUID (overrides STORNO_COMPANY_ID env var) |
|
|
2705
|
+
|
|
2706
|
+
### `reports_sales_analysis`
|
|
2707
|
+
|
|
2708
|
+
Generate a sales analysis report for a date range. Returns KPI summary (annual total, invoiced, collected, outstanding), monthly revenue trends, recent invoices, top clients, and top products. Requires X-Company header (companyId param or STORNO_COMPANY_ID env var).
|
|
2709
|
+
|
|
2710
|
+
**Parameters:**
|
|
2711
|
+
|
|
2712
|
+
| Name | Type | Required | Description |
|
|
2713
|
+
|------|------|----------|-------------|
|
|
2714
|
+
| `dateFrom` | string | Yes | Start date in YYYY-MM-DD format (e.g. 2026-01-01) |
|
|
2715
|
+
| `dateTo` | string | Yes | End date in YYYY-MM-DD format (e.g. 2026-02-26) |
|
|
2716
|
+
| `companyId` | string | No | Company UUID (overrides STORNO_COMPANY_ID env var) |
|
|
2717
|
+
|
|
2718
|
+
### `balance_analysis`
|
|
2719
|
+
|
|
2720
|
+
Get balance analysis (Analiza Balante) for a year. Returns financial indicators (revenue, expenses, profit, turnover, salaries, etc.), monthly evolution, profitability ratios, top expenses by account, and year-over-year comparison. Data comes from uploaded trial balance PDFs. Requires X-Company header.
|
|
2721
|
+
|
|
2722
|
+
**Parameters:**
|
|
2723
|
+
|
|
2724
|
+
| Name | Type | Required | Description |
|
|
2725
|
+
|------|------|----------|-------------|
|
|
2726
|
+
| `year` | number | Yes | Analysis year (e.g. 2025) |
|
|
2727
|
+
| `companyId` | string | No | Company UUID (overrides STORNO_COMPANY_ID env var) |
|
|
2728
|
+
|
|
2729
|
+
### `balance_list`
|
|
2730
|
+
|
|
2731
|
+
List uploaded trial balances (Balante de verificare) for a year. Shows upload status (pending/processing/completed/failed), month, account count, and source software for each uploaded balance.
|
|
2732
|
+
|
|
2733
|
+
**Parameters:**
|
|
2734
|
+
|
|
2735
|
+
| Name | Type | Required | Description |
|
|
2736
|
+
|------|------|----------|-------------|
|
|
2737
|
+
| `year` | number | Yes | Year to list balances for (e.g. 2025) |
|
|
2738
|
+
| `companyId` | string | No | Company UUID (overrides STORNO_COMPANY_ID env var) |
|
|
2739
|
+
|
|
2740
|
+
### `balance_rows`
|
|
2741
|
+
|
|
2742
|
+
Get the parsed account rows for a trial balance. Returns all account codes, names, and 10 numeric columns (initial/previous/current/total/final debit & credit). Useful for verifying PDF parsing results.
|
|
2743
|
+
|
|
2744
|
+
**Parameters:**
|
|
2745
|
+
|
|
2746
|
+
| Name | Type | Required | Description |
|
|
2747
|
+
|------|------|----------|-------------|
|
|
2748
|
+
| `id` | string | Yes | Trial balance UUID |
|
|
2749
|
+
| `companyId` | string | No | Company UUID (overrides STORNO_COMPANY_ID env var) |
|
|
2750
|
+
|
|
2751
|
+
### `balance_reprocess`
|
|
2752
|
+
|
|
2753
|
+
Reprocess a trial balance PDF. Re-parses the PDF file and updates the account rows. Useful after parser improvements.
|
|
2754
|
+
|
|
2755
|
+
**Parameters:**
|
|
2756
|
+
|
|
2757
|
+
| Name | Type | Required | Description |
|
|
2758
|
+
|------|------|----------|-------------|
|
|
2759
|
+
| `id` | string | Yes | Trial balance UUID to reprocess |
|
|
2760
|
+
| `companyId` | string | No | Company UUID (overrides STORNO_COMPANY_ID env var) |
|
|
2761
|
+
|
|
2762
|
+
### `balance_delete`
|
|
2763
|
+
|
|
2764
|
+
Delete an uploaded trial balance by ID. This soft-deletes the balance and its parsed account rows.
|
|
2765
|
+
|
|
2766
|
+
**Parameters:**
|
|
2767
|
+
|
|
2768
|
+
| Name | Type | Required | Description |
|
|
2769
|
+
|------|------|----------|-------------|
|
|
2770
|
+
| `id` | string | Yes | Trial balance UUID to delete |
|
|
2771
|
+
| `companyId` | string | No | Company UUID (overrides STORNO_COMPANY_ID env var) |
|
|
2772
|
+
|
|
2773
|
+
---
|
|
2774
|
+
|
|
2775
|
+
## Exports
|
|
2776
|
+
|
|
2777
|
+
### `exports_download`
|
|
2778
|
+
|
|
2779
|
+
Download a generated export file (ZIP archive). Export files are single-use and auto-deleted after download. The filename is typically provided by the endpoint that generated the export (e.g. POST /api/v1/invoices/export). Common formats: invoices-export-YYYY-MM.zip, vat-report-YYYY-MM.zip, clients-export-YYYY-MM-DD.zip.
|
|
2780
|
+
|
|
2781
|
+
**Parameters:**
|
|
2782
|
+
|
|
2783
|
+
| Name | Type | Required | Description |
|
|
2784
|
+
|------|------|----------|-------------|
|
|
2785
|
+
| `filename` | string | Yes | Export filename to download (e.g. "invoices-export-2026-02.zip"). Obtained from the export generation endpoint response. |
|
|
2786
|
+
|
|
2787
|
+
---
|
|
2788
|
+
|
|
2789
|
+
## Admin
|
|
2790
|
+
|
|
2791
|
+
### `admin_organizations`
|
|
2792
|
+
|
|
2793
|
+
List all organizations on the platform with pagination and filtering. SUPER_ADMIN only. Returns organization details including owner info, subscription plan, member/company/invoice counts, and ANAF token status.
|
|
2794
|
+
|
|
2795
|
+
**Parameters:**
|
|
2796
|
+
|
|
2797
|
+
| Name | Type | Required | Description |
|
|
2798
|
+
|------|------|----------|-------------|
|
|
2799
|
+
| `page` | number | No | Page number for pagination (default: 1) |
|
|
2800
|
+
| `limit` | number | No | Items per page (default: 50, max: 200) |
|
|
2801
|
+
| `search` | string | No | Search by organization name or owner name/email |
|
|
2802
|
+
| `status` | enum(active, trial, suspended) | No | Filter by organization status: active, trial, or suspended |
|
|
2803
|
+
| `plan` | string | No | Filter by subscription plan type |
|
|
2804
|
+
|
|
2805
|
+
### `admin_stats`
|
|
2806
|
+
|
|
2807
|
+
Get platform-wide statistics including user counts, organization metrics, company sync status, invoice totals, and system info. SUPER_ADMIN only. Results are typically cached for 5 minutes.
|
|
2808
|
+
|
|
2809
|
+
*No parameters required.*
|
|
2810
|
+
|
|
2811
|
+
### `admin_users`
|
|
2812
|
+
|
|
2813
|
+
List all users on the platform with pagination and filtering. SUPER_ADMIN only. Returns user account details, verification status, role, last login timestamp, and organization memberships.
|
|
2814
|
+
|
|
2815
|
+
**Parameters:**
|
|
2816
|
+
|
|
2817
|
+
| Name | Type | Required | Description |
|
|
2818
|
+
|------|------|----------|-------------|
|
|
2819
|
+
| `page` | number | No | Page number for pagination (default: 1) |
|
|
2820
|
+
| `limit` | number | No | Items per page (default: 50, max: 200) |
|
|
2821
|
+
| `search` | string | No | Search by user name or email address |
|
|
2822
|
+
| `status` | enum(active, inactive, verified, unverified) | No | Filter by user status: active, inactive, verified, or unverified |
|
|
2823
|
+
| `role` | string | No | Filter by user system role |
|
|
2824
|
+
|
|
2825
|
+
---
|
|
2826
|
+
|
|
2827
|
+
## Licensing
|
|
2828
|
+
|
|
2829
|
+
### `licensing_create_key`
|
|
2830
|
+
|
|
2831
|
+
Generate a new license key for a self-hosted Storno instance. Only the organization owner can create license keys. The full 64-character license key is returned ONLY ONCE — store it immediately. Each self-hosted instance should use its own key.
|
|
2832
|
+
|
|
2833
|
+
**Parameters:**
|
|
2834
|
+
|
|
2835
|
+
| Name | Type | Required | Description |
|
|
2836
|
+
|------|------|----------|-------------|
|
|
2837
|
+
| `instanceName` | string | No | Human-readable name for the self-hosted instance (e.g. "Production", "Staging") |
|
|
2838
|
+
|
|
2839
|
+
### `licensing_list_keys`
|
|
2840
|
+
|
|
2841
|
+
List all license keys issued for the current organization. Keys are returned with masked values (first and last 8 characters shown). Includes active and revoked keys with lastValidatedAt timestamps to verify self-hosted instances are running. Only the organization owner can list keys.
|
|
2842
|
+
|
|
2843
|
+
*No parameters required.*
|
|
2844
|
+
|
|
2845
|
+
### `licensing_revoke_key`
|
|
2846
|
+
|
|
2847
|
+
Revoke (deactivate) a license key. The associated self-hosted instance will fall back to the Free plan on its next validation cycle (within 24 hours). Revocation is a soft delete — the key record is kept with active: false. Revoked keys cannot be reactivated; generate a new key instead. Only the organization owner can revoke keys.
|
|
2848
|
+
|
|
2849
|
+
**Parameters:**
|
|
2850
|
+
|
|
2851
|
+
| Name | Type | Required | Description |
|
|
2852
|
+
|------|------|----------|-------------|
|
|
2853
|
+
| `id` | string | Yes | UUID of the license key to revoke |
|
|
2854
|
+
|
|
2855
|
+
### `licensing_validate`
|
|
2856
|
+
|
|
2857
|
+
Validate a self-hosted license key and retrieve the current plan, features, and subscription details. This endpoint does NOT require authentication — the license key itself is the credential. Returns plan features, organization name, billing period end, and trial info if applicable. Used by self-hosted instances every 24 hours.
|
|
2858
|
+
|
|
2859
|
+
**Parameters:**
|
|
2860
|
+
|
|
2861
|
+
| Name | Type | Required | Description |
|
|
2862
|
+
|------|------|----------|-------------|
|
|
2863
|
+
| `licenseKey` | string | Yes | 64-character hex license key issued for the self-hosted instance |
|
|
2864
|
+
| `instanceName` | string | No | Human-readable name for this self-hosted instance (stored for identification) |
|
|
2865
|
+
| `instanceUrl` | string | No | Public URL of the self-hosted instance (stored for identification in the dashboard) |
|
|
2866
|
+
|
|
2867
|
+
---
|
|
2868
|
+
|
|
2869
|
+
## Company Registry
|
|
2870
|
+
|
|
2871
|
+
### `company_registry_search`
|
|
2872
|
+
|
|
2873
|
+
Search the Romanian company registry (ONRC) by company name. Returns matching companies with CUI, name, and registration details. Useful for finding a company before creating a client.
|
|
2874
|
+
|
|
2875
|
+
**Parameters:**
|
|
2876
|
+
|
|
2877
|
+
| Name | Type | Required | Description |
|
|
2878
|
+
|------|------|----------|-------------|
|
|
2879
|
+
| `q` | string | Yes | Search query (company name, minimum 2 characters) |
|
|
2880
|
+
| `limit` | number | No | Maximum results to return (default: 10) |
|
|
2881
|
+
|
|
2882
|
+
### `company_registry_cities`
|
|
2883
|
+
|
|
2884
|
+
Get a list of cities for a given Romanian county. Optionally filter by city name. Useful for address auto-complete.
|
|
2885
|
+
|
|
2886
|
+
**Parameters:**
|
|
2887
|
+
|
|
2888
|
+
| Name | Type | Required | Description |
|
|
2889
|
+
|------|------|----------|-------------|
|
|
2890
|
+
| `county` | string | Yes | County code or name (e.g., "B" for Bucharest, "CJ" for Cluj) |
|
|
2891
|
+
| `q` | string | No | Optional search query to filter cities |
|
|
2892
|
+
|
|
2893
|
+
---
|
|
2894
|
+
|
|
2895
|
+
## System
|
|
2896
|
+
|
|
2897
|
+
### `system_health`
|
|
2898
|
+
|
|
2899
|
+
Check the Storno API system health status. Returns database, queue, storage, and service diagnostics when authenticated.
|
|
2900
|
+
|
|
2901
|
+
*No parameters required.*
|
|
2902
|
+
|
|
2903
|
+
### `system_version`
|
|
2904
|
+
|
|
2905
|
+
Get the Storno API version information including release date, minimum requirements, and changelog URL.
|
|
2906
|
+
|
|
2907
|
+
*No parameters required.*
|
|
2908
|
+
|
|
2909
|
+
---
|
|
2910
|
+
|
|
2911
|
+
## Accounting Export
|
|
2912
|
+
|
|
2913
|
+
### `accounting_export_settings_get`
|
|
2914
|
+
|
|
2915
|
+
Get the accounting export configuration for the active company. Returns settings for Saga, Winmentor, and Ciel accounting software integrations.
|
|
2916
|
+
|
|
2917
|
+
**Parameters:**
|
|
2918
|
+
|
|
2919
|
+
| Name | Type | Required | Description |
|
|
2920
|
+
|------|------|----------|-------------|
|
|
2921
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
2922
|
+
|
|
2923
|
+
### `accounting_export_settings_update`
|
|
2924
|
+
|
|
2925
|
+
Update accounting export configuration. Settings are merged with existing config.
|
|
2926
|
+
|
|
2927
|
+
**Parameters:**
|
|
2928
|
+
|
|
2929
|
+
| Name | Type | Required | Description |
|
|
2930
|
+
|------|------|----------|-------------|
|
|
2931
|
+
| `settings` | object | Yes | Accounting export settings to merge |
|
|
2932
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
2933
|
+
|
|
2934
|
+
### `accounting_export_zip`
|
|
2935
|
+
|
|
2936
|
+
Export accounting data as a ZIP archive for import into accounting software (Saga, Winmentor, or Ciel). Contains XML files for clients, suppliers, products, invoices, receipts, and payments.
|
|
2937
|
+
|
|
2938
|
+
**Parameters:**
|
|
2939
|
+
|
|
2940
|
+
| Name | Type | Required | Description |
|
|
2941
|
+
|------|------|----------|-------------|
|
|
2942
|
+
| `target` | enum(saga, winmentor, ciel) | Yes | Target accounting software format |
|
|
2943
|
+
| `dateFrom` | string | No | Start date filter (YYYY-MM-DD) |
|
|
2944
|
+
| `dateTo` | string | No | End date filter (YYYY-MM-DD) |
|
|
2945
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
2946
|
+
|
|
2947
|
+
---
|
|
2948
|
+
|
|
2949
|
+
## Backup
|
|
2950
|
+
|
|
2951
|
+
### `backup_create`
|
|
2952
|
+
|
|
2953
|
+
Create a new backup job for the active company. Processed asynchronously. Returns a job ID to check status.
|
|
2954
|
+
|
|
2955
|
+
**Parameters:**
|
|
2956
|
+
|
|
2957
|
+
| Name | Type | Required | Description |
|
|
2958
|
+
|------|------|----------|-------------|
|
|
2959
|
+
| `includeFiles` | boolean | No | Include uploaded files (PDFs, XMLs) in backup (default: true) |
|
|
2960
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
2961
|
+
|
|
2962
|
+
### `backup_status`
|
|
2963
|
+
|
|
2964
|
+
Get the status of a backup job. Returns progress percentage, current step, and download URL when complete.
|
|
2965
|
+
|
|
2966
|
+
**Parameters:**
|
|
2967
|
+
|
|
2968
|
+
| Name | Type | Required | Description |
|
|
2969
|
+
|------|------|----------|-------------|
|
|
2970
|
+
| `id` | string | Yes | Backup job ID |
|
|
2971
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
2972
|
+
|
|
2973
|
+
### `backup_download`
|
|
2974
|
+
|
|
2975
|
+
Download a completed backup as a ZIP file. Returns base64-encoded binary data.
|
|
2976
|
+
|
|
2977
|
+
**Parameters:**
|
|
2978
|
+
|
|
2979
|
+
| Name | Type | Required | Description |
|
|
2980
|
+
|------|------|----------|-------------|
|
|
2981
|
+
| `id` | string | Yes | Backup job ID |
|
|
2982
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
2983
|
+
|
|
2984
|
+
### `backup_restore`
|
|
2985
|
+
|
|
2986
|
+
Upload a backup ZIP file to restore company data. Runs asynchronously.
|
|
2987
|
+
|
|
2988
|
+
**Parameters:**
|
|
2989
|
+
|
|
2990
|
+
| Name | Type | Required | Description |
|
|
2991
|
+
|------|------|----------|-------------|
|
|
2992
|
+
| `filePath` | string | Yes | Absolute path to the backup ZIP file |
|
|
2993
|
+
| `purgeExisting` | boolean | No | Delete all existing company data before restoring (default: false) |
|
|
2994
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
2995
|
+
|
|
2996
|
+
### `backup_restore_status`
|
|
2997
|
+
|
|
2998
|
+
Get the status of a restore job.
|
|
2999
|
+
|
|
3000
|
+
**Parameters:**
|
|
3001
|
+
|
|
3002
|
+
| Name | Type | Required | Description |
|
|
3003
|
+
|------|------|----------|-------------|
|
|
3004
|
+
| `id` | string | Yes | Restore job ID |
|
|
3005
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
3006
|
+
|
|
3007
|
+
### `backup_history`
|
|
3008
|
+
|
|
3009
|
+
List recent backup jobs for the active company.
|
|
3010
|
+
|
|
3011
|
+
**Parameters:**
|
|
3012
|
+
|
|
3013
|
+
| Name | Type | Required | Description |
|
|
3014
|
+
|------|------|----------|-------------|
|
|
3015
|
+
| `limit` | number | No | Number of results (max 50, default: 20) |
|
|
3016
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
3017
|
+
|
|
3018
|
+
---
|
|
3019
|
+
|
|
3020
|
+
## Borderou (Bank Reconciliation)
|
|
3021
|
+
|
|
3022
|
+
### `borderou_providers`
|
|
3023
|
+
|
|
3024
|
+
List available borderou (bank statement) providers and supported file formats.
|
|
3025
|
+
|
|
3026
|
+
**Parameters:**
|
|
3027
|
+
|
|
3028
|
+
| Name | Type | Required | Description |
|
|
3029
|
+
|------|------|----------|-------------|
|
|
3030
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
3031
|
+
|
|
3032
|
+
### `borderou_upload`
|
|
3033
|
+
|
|
3034
|
+
Upload a bank statement or borderou file (CSV, XLSX, XLS) for transaction import and reconciliation.
|
|
3035
|
+
|
|
3036
|
+
**Parameters:**
|
|
3037
|
+
|
|
3038
|
+
| Name | Type | Required | Description |
|
|
3039
|
+
|------|------|----------|-------------|
|
|
3040
|
+
| `filePath` | string | Yes | Absolute path to the file (CSV, XLSX, or XLS) |
|
|
3041
|
+
| `sourceType` | string | Yes | "borderou" or "bank_statement" |
|
|
3042
|
+
| `provider` | string | Yes | Bank or provider name (from borderou_providers) |
|
|
3043
|
+
| `currency` | string | No | Currency code (default: RON) |
|
|
3044
|
+
| `bordereauNumber` | string | No | Borderou reference number |
|
|
3045
|
+
| `bankAccountId` | string | No | Bank account UUID (for bank_statement type) |
|
|
3046
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
3047
|
+
|
|
3048
|
+
### `borderou_transactions`
|
|
3049
|
+
|
|
3050
|
+
List borderou transactions with pagination.
|
|
3051
|
+
|
|
3052
|
+
**Parameters:**
|
|
3053
|
+
|
|
3054
|
+
| Name | Type | Required | Description |
|
|
3055
|
+
|------|------|----------|-------------|
|
|
3056
|
+
| `page` | number | No | Page number (default: 1) |
|
|
3057
|
+
| `limit` | number | No | Items per page (default: 20) |
|
|
3058
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
3059
|
+
|
|
3060
|
+
### `borderou_transaction_get`
|
|
3061
|
+
|
|
3062
|
+
Get detailed information about a specific borderou transaction.
|
|
3063
|
+
|
|
3064
|
+
**Parameters:**
|
|
3065
|
+
|
|
3066
|
+
| Name | Type | Required | Description |
|
|
3067
|
+
|------|------|----------|-------------|
|
|
3068
|
+
| `id` | string | Yes | Transaction ID |
|
|
3069
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
3070
|
+
|
|
3071
|
+
### `borderou_transaction_update`
|
|
3072
|
+
|
|
3073
|
+
Update a borderou transaction match. Link to an invoice or proforma for reconciliation.
|
|
3074
|
+
|
|
3075
|
+
**Parameters:**
|
|
3076
|
+
|
|
3077
|
+
| Name | Type | Required | Description |
|
|
3078
|
+
|------|------|----------|-------------|
|
|
3079
|
+
| `id` | string | Yes | Transaction ID |
|
|
3080
|
+
| `clientId` | string | No | Client UUID to match |
|
|
3081
|
+
| `invoiceId` | string | No | Invoice UUID to match |
|
|
3082
|
+
| `proformaInvoiceId` | string | No | Proforma invoice UUID to match |
|
|
3083
|
+
| `amount` | number | No | Override matched amount |
|
|
3084
|
+
| `documentType` | enum(invoice, proforma) | No | Document type for matching |
|
|
3085
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
3086
|
+
|
|
3087
|
+
### `borderou_transaction_available_invoices`
|
|
3088
|
+
|
|
3089
|
+
Get invoices or proformas available to match against a transaction.
|
|
3090
|
+
|
|
3091
|
+
**Parameters:**
|
|
3092
|
+
|
|
3093
|
+
| Name | Type | Required | Description |
|
|
3094
|
+
|------|------|----------|-------------|
|
|
3095
|
+
| `id` | string | Yes | Transaction ID |
|
|
3096
|
+
| `search` | string | No | Search by invoice number, client name, or amount |
|
|
3097
|
+
| `type` | enum(invoice, proforma) | No | Filter by document type |
|
|
3098
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
3099
|
+
|
|
3100
|
+
### `borderou_transactions_save`
|
|
3101
|
+
|
|
3102
|
+
Save selected borderou transaction matches. Creates payment records for matched transactions.
|
|
3103
|
+
|
|
3104
|
+
**Parameters:**
|
|
3105
|
+
|
|
3106
|
+
| Name | Type | Required | Description |
|
|
3107
|
+
|------|------|----------|-------------|
|
|
3108
|
+
| `transactionIds` | array | Yes | Array of transaction IDs to save |
|
|
3109
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
3110
|
+
|
|
3111
|
+
### `borderou_transactions_rematch`
|
|
3112
|
+
|
|
3113
|
+
Re-run automatic matching algorithm on selected transactions.
|
|
3114
|
+
|
|
3115
|
+
**Parameters:**
|
|
3116
|
+
|
|
3117
|
+
| Name | Type | Required | Description |
|
|
3118
|
+
|------|------|----------|-------------|
|
|
3119
|
+
| `transactionIds` | array | Yes | Array of transaction IDs to re-match |
|
|
3120
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
3121
|
+
|
|
3122
|
+
---
|
|
3123
|
+
|
|
3124
|
+
## Storage Config
|
|
3125
|
+
|
|
3126
|
+
### `storage_config_get`
|
|
3127
|
+
|
|
3128
|
+
Get the organization's external storage configuration (S3-compatible bucket for PDFs/XMLs).
|
|
3129
|
+
|
|
3130
|
+
*No parameters required.*
|
|
3131
|
+
|
|
3132
|
+
### `storage_config_update`
|
|
3133
|
+
|
|
3134
|
+
Create or update external storage configuration. Supports S3-compatible providers (AWS S3, Cloudflare R2, MinIO, DigitalOcean Spaces).
|
|
3135
|
+
|
|
3136
|
+
**Parameters:**
|
|
3137
|
+
|
|
3138
|
+
| Name | Type | Required | Description |
|
|
3139
|
+
|------|------|----------|-------------|
|
|
3140
|
+
| `provider` | string | Yes | Storage provider (e.g., "s3", "r2", "minio", "spaces") |
|
|
3141
|
+
| `bucket` | string | Yes | Bucket name |
|
|
3142
|
+
| `region` | string | No | AWS region (e.g., "eu-central-1") |
|
|
3143
|
+
| `prefix` | string | No | Key prefix/folder path within the bucket |
|
|
3144
|
+
| `endpoint` | string | No | Custom endpoint URL (for non-AWS providers) |
|
|
3145
|
+
| `accessKeyId` | string | No | Access key ID |
|
|
3146
|
+
| `secretAccessKey` | string | No | Secret access key |
|
|
3147
|
+
| `accountId` | string | No | Account ID (for Cloudflare R2) |
|
|
3148
|
+
| `forcePathStyle` | boolean | No | Use path-style URLs (for MinIO) |
|
|
3149
|
+
| `isActive` | boolean | No | Enable or disable external storage |
|
|
3150
|
+
|
|
3151
|
+
### `storage_config_delete`
|
|
3152
|
+
|
|
3153
|
+
Delete the external storage configuration.
|
|
3154
|
+
|
|
3155
|
+
*No parameters required.*
|
|
3156
|
+
|
|
3157
|
+
### `storage_config_test`
|
|
3158
|
+
|
|
3159
|
+
Test the external storage connection by writing and reading a test file.
|
|
3160
|
+
|
|
3161
|
+
**Parameters:**
|
|
3162
|
+
|
|
3163
|
+
| Name | Type | Required | Description |
|
|
3164
|
+
|------|------|----------|-------------|
|
|
3165
|
+
| `provider` | string | No | Storage provider to test |
|
|
3166
|
+
| `bucket` | string | No | Bucket name |
|
|
3167
|
+
| `region` | string | No | AWS region |
|
|
3168
|
+
| `endpoint` | string | No | Custom endpoint URL |
|
|
3169
|
+
| `accessKeyId` | string | No | Access key ID |
|
|
3170
|
+
| `secretAccessKey` | string | No | Secret access key |
|
|
3171
|
+
| `accountId` | string | No | Account ID |
|
|
3172
|
+
| `forcePathStyle` | boolean | No | Use path-style URLs |
|
|
3173
|
+
|
|
3174
|
+
### `storage_config_providers`
|
|
3175
|
+
|
|
3176
|
+
List available external storage providers with configuration requirements.
|
|
3177
|
+
|
|
3178
|
+
*No parameters required.*
|
|
3179
|
+
|
|
3180
|
+
---
|
|
3181
|
+
|
|
3182
|
+
## Import
|
|
3183
|
+
|
|
3184
|
+
### `import_sources`
|
|
3185
|
+
|
|
3186
|
+
Get available import sources and import types. Returns supported sources (SmartBill, Saga, Oblio, FGO, Facturis, etc.) and import types (clients, products, invoices).
|
|
3187
|
+
|
|
3188
|
+
**Parameters:**
|
|
3189
|
+
|
|
3190
|
+
| Name | Type | Required | Description |
|
|
3191
|
+
|------|------|----------|-------------|
|
|
3192
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
3193
|
+
|
|
3194
|
+
### `import_preview`
|
|
3195
|
+
|
|
3196
|
+
Get a preview of an uploaded import job including detected columns and sample data.
|
|
3197
|
+
|
|
3198
|
+
**Parameters:**
|
|
3199
|
+
|
|
3200
|
+
| Name | Type | Required | Description |
|
|
3201
|
+
|------|------|----------|-------------|
|
|
3202
|
+
| `id` | string | Yes | Import job ID |
|
|
3203
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
3204
|
+
|
|
3205
|
+
### `import_mapping`
|
|
3206
|
+
|
|
3207
|
+
Save column mapping for an import job. Maps CSV columns to Storno fields.
|
|
3208
|
+
|
|
3209
|
+
**Parameters:**
|
|
3210
|
+
|
|
3211
|
+
| Name | Type | Required | Description |
|
|
3212
|
+
|------|------|----------|-------------|
|
|
3213
|
+
| `id` | string | Yes | Import job ID |
|
|
3214
|
+
| `columnMapping` | object | Yes | Object mapping CSV column names to Storno field names |
|
|
3215
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
3216
|
+
|
|
3217
|
+
### `import_execute`
|
|
3218
|
+
|
|
3219
|
+
Execute an import job after mapping is confirmed. Runs asynchronously.
|
|
3220
|
+
|
|
3221
|
+
**Parameters:**
|
|
3222
|
+
|
|
3223
|
+
| Name | Type | Required | Description |
|
|
3224
|
+
|------|------|----------|-------------|
|
|
3225
|
+
| `id` | string | Yes | Import job ID |
|
|
3226
|
+
| `importOptions` | object | No | Optional import options (e.g., skipDuplicates) |
|
|
3227
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
3228
|
+
|
|
3229
|
+
### `import_get`
|
|
3230
|
+
|
|
3231
|
+
Get full status and details of an import job including progress and error details.
|
|
3232
|
+
|
|
3233
|
+
**Parameters:**
|
|
3234
|
+
|
|
3235
|
+
| Name | Type | Required | Description |
|
|
3236
|
+
|------|------|----------|-------------|
|
|
3237
|
+
| `id` | string | Yes | Import job ID |
|
|
3238
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
3239
|
+
|
|
3240
|
+
### `import_upload`
|
|
3241
|
+
|
|
3242
|
+
Upload a file (CSV, XLSX, or XML) to start a new import job. Returns the created job with preview data.
|
|
3243
|
+
|
|
3244
|
+
**Parameters:**
|
|
3245
|
+
|
|
3246
|
+
| Name | Type | Required | Description |
|
|
3247
|
+
|------|------|----------|-------------|
|
|
3248
|
+
| `filePath` | string | Yes | Absolute path to the file (CSV, XLSX, or XML) |
|
|
3249
|
+
| `importType` | string | Yes | Type: clients, products, invoices_issued, invoices_received, recurring_invoices |
|
|
3250
|
+
| `source` | string | Yes | Source app: smartbill, saga, oblio, fgo, facturis_online, easybill, ciel, factureaza, facturare_pro, icefact, bolt, facturis, emag, generic |
|
|
3251
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
3252
|
+
|
|
3253
|
+
### `import_template`
|
|
3254
|
+
|
|
3255
|
+
Download a CSV template for a specific import type. Returns base64-encoded CSV.
|
|
3256
|
+
|
|
3257
|
+
**Parameters:**
|
|
3258
|
+
|
|
3259
|
+
| Name | Type | Required | Description |
|
|
3260
|
+
|------|------|----------|-------------|
|
|
3261
|
+
| `importType` | string | Yes | Type: clients, products, invoices_issued, invoices_received, recurring_invoices |
|
|
3262
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
3263
|
+
|
|
3264
|
+
### `import_history`
|
|
3265
|
+
|
|
3266
|
+
List past import jobs for the active company.
|
|
3267
|
+
|
|
3268
|
+
**Parameters:**
|
|
3269
|
+
|
|
3270
|
+
| Name | Type | Required | Description |
|
|
3271
|
+
|------|------|----------|-------------|
|
|
3272
|
+
| `limit` | number | No | Number of results (max 200, default: 50) |
|
|
3273
|
+
| `companyId` | string | No | Company UUID override (uses active company if not set) |
|
|
3274
|
+
|
|
3275
|
+
---
|
|
3276
|
+
|
|
3277
|
+
## CPV Codes
|
|
3278
|
+
|
|
3279
|
+
### `cpv_codes_search`
|
|
3280
|
+
|
|
3281
|
+
Search CPV (Common Procurement Vocabulary) classification codes. Used in e-Transport declarations and public procurement.
|
|
3282
|
+
|
|
3283
|
+
**Parameters:**
|
|
3284
|
+
|
|
3285
|
+
| Name | Type | Required | Description |
|
|
3286
|
+
|------|------|----------|-------------|
|
|
3287
|
+
| `search` | string | Yes | Search query (CPV code number or description) |
|
|
3288
|
+
| `limit` | number | No | Maximum results (max 100, default: 30) |
|
|
3289
|
+
|
|
3290
|
+
---
|
|
3291
|
+
|
|
3292
|
+
## NC Codes
|
|
3293
|
+
|
|
3294
|
+
### `nc_codes_search`
|
|
3295
|
+
|
|
3296
|
+
Search NC (Combined Nomenclature / NACE) classification codes. Used in e-Transport declarations for goods classification.
|
|
3297
|
+
|
|
3298
|
+
**Parameters:**
|
|
3299
|
+
|
|
3300
|
+
| Name | Type | Required | Description |
|
|
3301
|
+
|------|------|----------|-------------|
|
|
3302
|
+
| `search` | string | Yes | Search query (NC code number or description) |
|
|
3303
|
+
| `limit` | number | No | Maximum results (max 100, default: 30) |
|
|
3304
|
+
|
|
3305
|
+
---
|
|
3306
|
+
|
|
3307
|
+
**Total tools: 234**
|
|
3308
|
+
|
|
3309
|
+
Generated from storno-cli source on 2026-02-24
|