@invoicetronic/ts-sdk 1.1.7 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1 -1
- package/README.md +2 -2
- package/api.ts +1 -0
- package/common.ts +15 -2
- package/configuration.ts +1 -1
- package/dist/api.d.ts +1 -0
- package/dist/api.js +1 -0
- package/dist/common.d.ts +6 -0
- package/dist/common.js +17 -3
- package/dist/configuration.js +1 -1
- package/dist/esm/api.d.ts +1 -0
- package/dist/esm/api.js +1 -0
- package/dist/esm/common.d.ts +6 -0
- package/dist/esm/common.js +15 -2
- package/dist/esm/configuration.js +1 -1
- package/dist/esm/src/api/company-api.d.ts +35 -30
- package/dist/esm/src/api/company-api.js +34 -27
- package/dist/esm/src/api/export-api.d.ts +115 -0
- package/dist/esm/src/api/export-api.js +179 -0
- package/dist/esm/src/api/log-api.d.ts +10 -10
- package/dist/esm/src/api/log-api.js +8 -8
- package/dist/esm/src/api/receive-api.d.ts +15 -15
- package/dist/esm/src/api/receive-api.js +12 -12
- package/dist/esm/src/api/send-api.d.ts +55 -55
- package/dist/esm/src/api/send-api.js +44 -44
- package/dist/esm/src/api/status-api.d.ts +5 -5
- package/dist/esm/src/api/status-api.js +4 -4
- package/dist/esm/src/api/update-api.d.ts +10 -10
- package/dist/esm/src/api/update-api.js +8 -8
- package/dist/esm/src/api/webhook-api.d.ts +25 -25
- package/dist/esm/src/api/webhook-api.js +20 -20
- package/dist/esm/src/models/event.d.ts +2 -2
- package/dist/esm/src/models/receive.d.ts +3 -3
- package/dist/esm/src/models/send.d.ts +2 -2
- package/dist/esm/src/models/update.d.ts +2 -2
- package/dist/esm/src/models/web-hook-history.d.ts +1 -1
- package/dist/esm/src/models/web-hook.d.ts +2 -2
- package/dist/src/api/company-api.d.ts +35 -30
- package/dist/src/api/company-api.js +34 -27
- package/dist/src/api/export-api.d.ts +115 -0
- package/dist/src/api/export-api.js +186 -0
- package/dist/src/api/log-api.d.ts +10 -10
- package/dist/src/api/log-api.js +8 -8
- package/dist/src/api/receive-api.d.ts +15 -15
- package/dist/src/api/receive-api.js +12 -12
- package/dist/src/api/send-api.d.ts +55 -55
- package/dist/src/api/send-api.js +44 -44
- package/dist/src/api/status-api.d.ts +5 -5
- package/dist/src/api/status-api.js +4 -4
- package/dist/src/api/update-api.d.ts +10 -10
- package/dist/src/api/update-api.js +8 -8
- package/dist/src/api/webhook-api.d.ts +25 -25
- package/dist/src/api/webhook-api.js +20 -20
- package/dist/src/models/event.d.ts +2 -2
- package/dist/src/models/receive.d.ts +3 -3
- package/dist/src/models/send.d.ts +2 -2
- package/dist/src/models/update.d.ts +2 -2
- package/dist/src/models/web-hook-history.d.ts +1 -1
- package/dist/src/models/web-hook.d.ts +2 -2
- package/docs/CompanyApi.md +10 -6
- package/docs/Event.md +2 -2
- package/docs/ExportApi.md +79 -0
- package/docs/LogApi.md +2 -2
- package/docs/Receive.md +3 -3
- package/docs/ReceiveApi.md +4 -3
- package/docs/Send.md +2 -2
- package/docs/SendApi.md +11 -11
- package/docs/StatusApi.md +1 -1
- package/docs/Update.md +2 -2
- package/docs/UpdateApi.md +2 -2
- package/docs/WebHook.md +2 -2
- package/docs/WebHookHistory.md +1 -1
- package/docs/WebhookApi.md +6 -5
- package/package.json +1 -1
- package/src/api/company-api.ts +43 -34
- package/src/api/export-api.ts +211 -0
- package/src/api/log-api.ts +11 -11
- package/src/api/receive-api.ts +16 -16
- package/src/api/send-api.ts +56 -56
- package/src/api/status-api.ts +6 -6
- package/src/api/update-api.ts +11 -11
- package/src/api/webhook-api.ts +26 -26
- package/src/models/event.ts +2 -2
- package/src/models/receive.ts +3 -3
- package/src/models/send.ts +2 -2
- package/src/models/update.ts +2 -2
- package/src/models/web-hook-history.ts +1 -1
- package/src/models/web-hook.ts +2 -2
|
@@ -35,7 +35,7 @@ import { BASE_PATH, BaseAPI, operationServerMap } from '../../base';
|
|
|
35
35
|
export const CompanyApiAxiosParamCreator = function (configuration) {
|
|
36
36
|
return {
|
|
37
37
|
/**
|
|
38
|
-
* Companies are the entities that send and receive invoices.
|
|
38
|
+
* Retrieve a paginated list of companies. **Companies** are the entities that send and receive invoices. They are automatically created from invoice data when invoices are sent or received.
|
|
39
39
|
* @summary List companies
|
|
40
40
|
* @param {number} [page] Page number.
|
|
41
41
|
* @param {number} [pageSize] Items per page. Cannot be greater than 200.
|
|
@@ -76,13 +76,14 @@ export const CompanyApiAxiosParamCreator = function (configuration) {
|
|
|
76
76
|
};
|
|
77
77
|
}),
|
|
78
78
|
/**
|
|
79
|
-
* Companies are the entities that send and receive invoices.
|
|
79
|
+
* Delete a company by its internal id. **Companies** are the entities that send and receive invoices. They are automatically created from invoice data when invoices are sent or received. **Warning:** Deleting a company will permanently remove all associated data, including sent invoices, received invoices, invoice updates from SDI, logs, and webhooks. If the company has any linked invoices, you must explicitly confirm deletion by adding `?force=true` to the request. Without this parameter, the API will return `409 Conflict` with details about the linked data.
|
|
80
80
|
* @summary Delete a company
|
|
81
81
|
* @param {number} id Item id
|
|
82
|
+
* @param {boolean} [force] Force delete including all related data.
|
|
82
83
|
* @param {*} [options] Override http request option.
|
|
83
84
|
* @throws {RequiredError}
|
|
84
85
|
*/
|
|
85
|
-
companyIdDelete: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) {
|
|
86
|
+
companyIdDelete: (id_1, force_1, ...args_1) => __awaiter(this, [id_1, force_1, ...args_1], void 0, function* (id, force, options = {}) {
|
|
86
87
|
// verify required parameter 'id' is not null or undefined
|
|
87
88
|
assertParamExists('companyIdDelete', 'id', id);
|
|
88
89
|
const localVarPath = `/company/{id}`
|
|
@@ -99,6 +100,9 @@ export const CompanyApiAxiosParamCreator = function (configuration) {
|
|
|
99
100
|
// authentication Basic required
|
|
100
101
|
// http basic authentication required
|
|
101
102
|
setBasicAuthToObject(localVarRequestOptions, configuration);
|
|
103
|
+
if (force !== undefined) {
|
|
104
|
+
localVarQueryParameter['force'] = force;
|
|
105
|
+
}
|
|
102
106
|
localVarHeaderParameter['Accept'] = 'application/json';
|
|
103
107
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
104
108
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
@@ -109,7 +113,7 @@ export const CompanyApiAxiosParamCreator = function (configuration) {
|
|
|
109
113
|
};
|
|
110
114
|
}),
|
|
111
115
|
/**
|
|
112
|
-
* Companies are the entities that send and receive invoices.
|
|
116
|
+
* Retrieve a company by its internal id. **Companies** are the entities that send and receive invoices. They are automatically created from invoice data when invoices are sent or received.
|
|
113
117
|
* @summary Get a company by id
|
|
114
118
|
* @param {number} id Item id
|
|
115
119
|
* @param {*} [options] Override http request option.
|
|
@@ -142,7 +146,7 @@ export const CompanyApiAxiosParamCreator = function (configuration) {
|
|
|
142
146
|
};
|
|
143
147
|
}),
|
|
144
148
|
/**
|
|
145
|
-
* Companies are the entities that send and receive invoices.
|
|
149
|
+
* Add a new company. **Companies** are the entities that send and receive invoices. They are automatically created from invoice data when invoices are sent or received.
|
|
146
150
|
* @summary Add a company
|
|
147
151
|
* @param {Company} company
|
|
148
152
|
* @param {*} [options] Override http request option.
|
|
@@ -176,7 +180,7 @@ export const CompanyApiAxiosParamCreator = function (configuration) {
|
|
|
176
180
|
};
|
|
177
181
|
}),
|
|
178
182
|
/**
|
|
179
|
-
* Companies are the entities that send and receive invoices.
|
|
183
|
+
* Update an existing company. **Companies** are the entities that send and receive invoices. They are automatically created from invoice data when invoices are sent or received.
|
|
180
184
|
* @summary Update a company
|
|
181
185
|
* @param {Company} company
|
|
182
186
|
* @param {*} [options] Override http request option.
|
|
@@ -218,7 +222,7 @@ export const CompanyApiFp = function (configuration) {
|
|
|
218
222
|
const localVarAxiosParamCreator = CompanyApiAxiosParamCreator(configuration);
|
|
219
223
|
return {
|
|
220
224
|
/**
|
|
221
|
-
* Companies are the entities that send and receive invoices.
|
|
225
|
+
* Retrieve a paginated list of companies. **Companies** are the entities that send and receive invoices. They are automatically created from invoice data when invoices are sent or received.
|
|
222
226
|
* @summary List companies
|
|
223
227
|
* @param {number} [page] Page number.
|
|
224
228
|
* @param {number} [pageSize] Items per page. Cannot be greater than 200.
|
|
@@ -236,23 +240,24 @@ export const CompanyApiFp = function (configuration) {
|
|
|
236
240
|
});
|
|
237
241
|
},
|
|
238
242
|
/**
|
|
239
|
-
* Companies are the entities that send and receive invoices.
|
|
243
|
+
* Delete a company by its internal id. **Companies** are the entities that send and receive invoices. They are automatically created from invoice data when invoices are sent or received. **Warning:** Deleting a company will permanently remove all associated data, including sent invoices, received invoices, invoice updates from SDI, logs, and webhooks. If the company has any linked invoices, you must explicitly confirm deletion by adding `?force=true` to the request. Without this parameter, the API will return `409 Conflict` with details about the linked data.
|
|
240
244
|
* @summary Delete a company
|
|
241
245
|
* @param {number} id Item id
|
|
246
|
+
* @param {boolean} [force] Force delete including all related data.
|
|
242
247
|
* @param {*} [options] Override http request option.
|
|
243
248
|
* @throws {RequiredError}
|
|
244
249
|
*/
|
|
245
|
-
companyIdDelete(id, options) {
|
|
250
|
+
companyIdDelete(id, force, options) {
|
|
246
251
|
return __awaiter(this, void 0, void 0, function* () {
|
|
247
252
|
var _a, _b, _c;
|
|
248
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.companyIdDelete(id, options);
|
|
253
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.companyIdDelete(id, force, options);
|
|
249
254
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
250
255
|
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['CompanyApi.companyIdDelete']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
251
256
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
252
257
|
});
|
|
253
258
|
},
|
|
254
259
|
/**
|
|
255
|
-
* Companies are the entities that send and receive invoices.
|
|
260
|
+
* Retrieve a company by its internal id. **Companies** are the entities that send and receive invoices. They are automatically created from invoice data when invoices are sent or received.
|
|
256
261
|
* @summary Get a company by id
|
|
257
262
|
* @param {number} id Item id
|
|
258
263
|
* @param {*} [options] Override http request option.
|
|
@@ -268,7 +273,7 @@ export const CompanyApiFp = function (configuration) {
|
|
|
268
273
|
});
|
|
269
274
|
},
|
|
270
275
|
/**
|
|
271
|
-
* Companies are the entities that send and receive invoices.
|
|
276
|
+
* Add a new company. **Companies** are the entities that send and receive invoices. They are automatically created from invoice data when invoices are sent or received.
|
|
272
277
|
* @summary Add a company
|
|
273
278
|
* @param {Company} company
|
|
274
279
|
* @param {*} [options] Override http request option.
|
|
@@ -284,7 +289,7 @@ export const CompanyApiFp = function (configuration) {
|
|
|
284
289
|
});
|
|
285
290
|
},
|
|
286
291
|
/**
|
|
287
|
-
* Companies are the entities that send and receive invoices.
|
|
292
|
+
* Update an existing company. **Companies** are the entities that send and receive invoices. They are automatically created from invoice data when invoices are sent or received.
|
|
288
293
|
* @summary Update a company
|
|
289
294
|
* @param {Company} company
|
|
290
295
|
* @param {*} [options] Override http request option.
|
|
@@ -308,7 +313,7 @@ export const CompanyApiFactory = function (configuration, basePath, axios) {
|
|
|
308
313
|
const localVarFp = CompanyApiFp(configuration);
|
|
309
314
|
return {
|
|
310
315
|
/**
|
|
311
|
-
* Companies are the entities that send and receive invoices.
|
|
316
|
+
* Retrieve a paginated list of companies. **Companies** are the entities that send and receive invoices. They are automatically created from invoice data when invoices are sent or received.
|
|
312
317
|
* @summary List companies
|
|
313
318
|
* @param {number} [page] Page number.
|
|
314
319
|
* @param {number} [pageSize] Items per page. Cannot be greater than 200.
|
|
@@ -320,17 +325,18 @@ export const CompanyApiFactory = function (configuration, basePath, axios) {
|
|
|
320
325
|
return localVarFp.companyGet(page, pageSize, sort, options).then((request) => request(axios, basePath));
|
|
321
326
|
},
|
|
322
327
|
/**
|
|
323
|
-
* Companies are the entities that send and receive invoices.
|
|
328
|
+
* Delete a company by its internal id. **Companies** are the entities that send and receive invoices. They are automatically created from invoice data when invoices are sent or received. **Warning:** Deleting a company will permanently remove all associated data, including sent invoices, received invoices, invoice updates from SDI, logs, and webhooks. If the company has any linked invoices, you must explicitly confirm deletion by adding `?force=true` to the request. Without this parameter, the API will return `409 Conflict` with details about the linked data.
|
|
324
329
|
* @summary Delete a company
|
|
325
330
|
* @param {number} id Item id
|
|
331
|
+
* @param {boolean} [force] Force delete including all related data.
|
|
326
332
|
* @param {*} [options] Override http request option.
|
|
327
333
|
* @throws {RequiredError}
|
|
328
334
|
*/
|
|
329
|
-
companyIdDelete(id, options) {
|
|
330
|
-
return localVarFp.companyIdDelete(id, options).then((request) => request(axios, basePath));
|
|
335
|
+
companyIdDelete(id, force, options) {
|
|
336
|
+
return localVarFp.companyIdDelete(id, force, options).then((request) => request(axios, basePath));
|
|
331
337
|
},
|
|
332
338
|
/**
|
|
333
|
-
* Companies are the entities that send and receive invoices.
|
|
339
|
+
* Retrieve a company by its internal id. **Companies** are the entities that send and receive invoices. They are automatically created from invoice data when invoices are sent or received.
|
|
334
340
|
* @summary Get a company by id
|
|
335
341
|
* @param {number} id Item id
|
|
336
342
|
* @param {*} [options] Override http request option.
|
|
@@ -340,7 +346,7 @@ export const CompanyApiFactory = function (configuration, basePath, axios) {
|
|
|
340
346
|
return localVarFp.companyIdGet(id, options).then((request) => request(axios, basePath));
|
|
341
347
|
},
|
|
342
348
|
/**
|
|
343
|
-
* Companies are the entities that send and receive invoices.
|
|
349
|
+
* Add a new company. **Companies** are the entities that send and receive invoices. They are automatically created from invoice data when invoices are sent or received.
|
|
344
350
|
* @summary Add a company
|
|
345
351
|
* @param {Company} company
|
|
346
352
|
* @param {*} [options] Override http request option.
|
|
@@ -350,7 +356,7 @@ export const CompanyApiFactory = function (configuration, basePath, axios) {
|
|
|
350
356
|
return localVarFp.companyPost(company, options).then((request) => request(axios, basePath));
|
|
351
357
|
},
|
|
352
358
|
/**
|
|
353
|
-
* Companies are the entities that send and receive invoices.
|
|
359
|
+
* Update an existing company. **Companies** are the entities that send and receive invoices. They are automatically created from invoice data when invoices are sent or received.
|
|
354
360
|
* @summary Update a company
|
|
355
361
|
* @param {Company} company
|
|
356
362
|
* @param {*} [options] Override http request option.
|
|
@@ -366,7 +372,7 @@ export const CompanyApiFactory = function (configuration, basePath, axios) {
|
|
|
366
372
|
*/
|
|
367
373
|
export class CompanyApi extends BaseAPI {
|
|
368
374
|
/**
|
|
369
|
-
* Companies are the entities that send and receive invoices.
|
|
375
|
+
* Retrieve a paginated list of companies. **Companies** are the entities that send and receive invoices. They are automatically created from invoice data when invoices are sent or received.
|
|
370
376
|
* @summary List companies
|
|
371
377
|
* @param {number} [page] Page number.
|
|
372
378
|
* @param {number} [pageSize] Items per page. Cannot be greater than 200.
|
|
@@ -378,17 +384,18 @@ export class CompanyApi extends BaseAPI {
|
|
|
378
384
|
return CompanyApiFp(this.configuration).companyGet(page, pageSize, sort, options).then((request) => request(this.axios, this.basePath));
|
|
379
385
|
}
|
|
380
386
|
/**
|
|
381
|
-
* Companies are the entities that send and receive invoices.
|
|
387
|
+
* Delete a company by its internal id. **Companies** are the entities that send and receive invoices. They are automatically created from invoice data when invoices are sent or received. **Warning:** Deleting a company will permanently remove all associated data, including sent invoices, received invoices, invoice updates from SDI, logs, and webhooks. If the company has any linked invoices, you must explicitly confirm deletion by adding `?force=true` to the request. Without this parameter, the API will return `409 Conflict` with details about the linked data.
|
|
382
388
|
* @summary Delete a company
|
|
383
389
|
* @param {number} id Item id
|
|
390
|
+
* @param {boolean} [force] Force delete including all related data.
|
|
384
391
|
* @param {*} [options] Override http request option.
|
|
385
392
|
* @throws {RequiredError}
|
|
386
393
|
*/
|
|
387
|
-
companyIdDelete(id, options) {
|
|
388
|
-
return CompanyApiFp(this.configuration).companyIdDelete(id, options).then((request) => request(this.axios, this.basePath));
|
|
394
|
+
companyIdDelete(id, force, options) {
|
|
395
|
+
return CompanyApiFp(this.configuration).companyIdDelete(id, force, options).then((request) => request(this.axios, this.basePath));
|
|
389
396
|
}
|
|
390
397
|
/**
|
|
391
|
-
* Companies are the entities that send and receive invoices.
|
|
398
|
+
* Retrieve a company by its internal id. **Companies** are the entities that send and receive invoices. They are automatically created from invoice data when invoices are sent or received.
|
|
392
399
|
* @summary Get a company by id
|
|
393
400
|
* @param {number} id Item id
|
|
394
401
|
* @param {*} [options] Override http request option.
|
|
@@ -398,7 +405,7 @@ export class CompanyApi extends BaseAPI {
|
|
|
398
405
|
return CompanyApiFp(this.configuration).companyIdGet(id, options).then((request) => request(this.axios, this.basePath));
|
|
399
406
|
}
|
|
400
407
|
/**
|
|
401
|
-
* Companies are the entities that send and receive invoices.
|
|
408
|
+
* Add a new company. **Companies** are the entities that send and receive invoices. They are automatically created from invoice data when invoices are sent or received.
|
|
402
409
|
* @summary Add a company
|
|
403
410
|
* @param {Company} company
|
|
404
411
|
* @param {*} [options] Override http request option.
|
|
@@ -408,7 +415,7 @@ export class CompanyApi extends BaseAPI {
|
|
|
408
415
|
return CompanyApiFp(this.configuration).companyPost(company, options).then((request) => request(this.axios, this.basePath));
|
|
409
416
|
}
|
|
410
417
|
/**
|
|
411
|
-
* Companies are the entities that send and receive invoices.
|
|
418
|
+
* Update an existing company. **Companies** are the entities that send and receive invoices. They are automatically created from invoice data when invoices are sent or received.
|
|
412
419
|
* @summary Update a company
|
|
413
420
|
* @param {Company} company
|
|
414
421
|
* @param {*} [options] Override http request option.
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Invoicetronic API
|
|
3
|
+
* The [Invoicetronic API][2] is a RESTful service that allows you to send and receive invoices through the Italian [Servizio di Interscambio (SDI)][1], or Interchange Service. The API is designed to be simple and easy to use, abstracting away SDI complexity while providing complete control over the invoice send/receive process. It provides advanced features as encryption at rest, multi-language pre-flight invoice validation, multiple upload formats, webhooks, event logging, client SDKs, and CLI tools. For more information, see [Invoicetronic website][2] [1]: https://www.fatturapa.gov.it/it/sistemainterscambio/cose-il-sdi/ [2]: https://invoicetronic.com/
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1
|
|
6
|
+
* Contact: info@invoicetronic.com
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { Configuration } from '../../configuration';
|
|
13
|
+
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
|
|
14
|
+
import { type RequestArgs, BaseAPI } from '../../base';
|
|
15
|
+
/**
|
|
16
|
+
* ExportApi - axios parameter creator
|
|
17
|
+
*/
|
|
18
|
+
export declare const ExportApiAxiosParamCreator: (configuration?: Configuration) => {
|
|
19
|
+
/**
|
|
20
|
+
* Export invoices as a ZIP archive of FatturaPA XML files, suitable for import into accounting software (TeamSystem, Zucchetti, etc.). **Sent invoices** are only included when they have reached a definitive state (e.g., `Consegnato` for private recipients, `AccettatoDalDestinatario`, `DecorrenzaTermini`, etc.). Invoices still being processed by SDI are excluded. **Received invoices** are always included. Unread invoices are automatically marked as read and counted as operations. ### Period filters You can filter by period using either: - `year` + `month` (e.g., `year=2026&month=3` for March 2026) - `year` + `quarter` (e.g., `year=2026&quarter=1` for Q1 Jan-Mar) - `document_date_from` / `document_date_to` for a custom date range These options are mutually exclusive. The `year` parameter alone is not valid and requires either `month` or `quarter`. ### Response Returns `200` with a ZIP archive, or `204 No Content` if no invoices match the given filters. Files in the archive are organized by company VAT number (`{vat}/send/`, `{vat}/receive/`). ### Rate limiting This endpoint has a dedicated rate limit: only one export request per user can be processed at a time. Concurrent requests will receive a `429 Too Many Requests` response.
|
|
21
|
+
* @summary Export invoices as a ZIP archive
|
|
22
|
+
* @param {ExportGetTypeEnum} [type]
|
|
23
|
+
* @param {number} [companyId] Company id
|
|
24
|
+
* @param {number} [year]
|
|
25
|
+
* @param {number} [month]
|
|
26
|
+
* @param {number} [quarter]
|
|
27
|
+
* @param {string} [documentDateFrom] UTC ISO 8601 (2024-11-29T12:34:56Z)
|
|
28
|
+
* @param {string} [documentDateTo] UTC ISO 8601 (2024-11-29T12:34:56Z)
|
|
29
|
+
* @param {*} [options] Override http request option.
|
|
30
|
+
* @throws {RequiredError}
|
|
31
|
+
*/
|
|
32
|
+
exportGet: (type?: ExportGetTypeEnum, companyId?: number, year?: number, month?: number, quarter?: number, documentDateFrom?: string, documentDateTo?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* ExportApi - functional programming interface
|
|
36
|
+
*/
|
|
37
|
+
export declare const ExportApiFp: (configuration?: Configuration) => {
|
|
38
|
+
/**
|
|
39
|
+
* Export invoices as a ZIP archive of FatturaPA XML files, suitable for import into accounting software (TeamSystem, Zucchetti, etc.). **Sent invoices** are only included when they have reached a definitive state (e.g., `Consegnato` for private recipients, `AccettatoDalDestinatario`, `DecorrenzaTermini`, etc.). Invoices still being processed by SDI are excluded. **Received invoices** are always included. Unread invoices are automatically marked as read and counted as operations. ### Period filters You can filter by period using either: - `year` + `month` (e.g., `year=2026&month=3` for March 2026) - `year` + `quarter` (e.g., `year=2026&quarter=1` for Q1 Jan-Mar) - `document_date_from` / `document_date_to` for a custom date range These options are mutually exclusive. The `year` parameter alone is not valid and requires either `month` or `quarter`. ### Response Returns `200` with a ZIP archive, or `204 No Content` if no invoices match the given filters. Files in the archive are organized by company VAT number (`{vat}/send/`, `{vat}/receive/`). ### Rate limiting This endpoint has a dedicated rate limit: only one export request per user can be processed at a time. Concurrent requests will receive a `429 Too Many Requests` response.
|
|
40
|
+
* @summary Export invoices as a ZIP archive
|
|
41
|
+
* @param {ExportGetTypeEnum} [type]
|
|
42
|
+
* @param {number} [companyId] Company id
|
|
43
|
+
* @param {number} [year]
|
|
44
|
+
* @param {number} [month]
|
|
45
|
+
* @param {number} [quarter]
|
|
46
|
+
* @param {string} [documentDateFrom] UTC ISO 8601 (2024-11-29T12:34:56Z)
|
|
47
|
+
* @param {string} [documentDateTo] UTC ISO 8601 (2024-11-29T12:34:56Z)
|
|
48
|
+
* @param {*} [options] Override http request option.
|
|
49
|
+
* @throws {RequiredError}
|
|
50
|
+
*/
|
|
51
|
+
exportGet(type?: ExportGetTypeEnum, companyId?: number, year?: number, month?: number, quarter?: number, documentDateFrom?: string, documentDateTo?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* ExportApi - factory interface
|
|
55
|
+
*/
|
|
56
|
+
export declare const ExportApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
|
|
57
|
+
/**
|
|
58
|
+
* Export invoices as a ZIP archive of FatturaPA XML files, suitable for import into accounting software (TeamSystem, Zucchetti, etc.). **Sent invoices** are only included when they have reached a definitive state (e.g., `Consegnato` for private recipients, `AccettatoDalDestinatario`, `DecorrenzaTermini`, etc.). Invoices still being processed by SDI are excluded. **Received invoices** are always included. Unread invoices are automatically marked as read and counted as operations. ### Period filters You can filter by period using either: - `year` + `month` (e.g., `year=2026&month=3` for March 2026) - `year` + `quarter` (e.g., `year=2026&quarter=1` for Q1 Jan-Mar) - `document_date_from` / `document_date_to` for a custom date range These options are mutually exclusive. The `year` parameter alone is not valid and requires either `month` or `quarter`. ### Response Returns `200` with a ZIP archive, or `204 No Content` if no invoices match the given filters. Files in the archive are organized by company VAT number (`{vat}/send/`, `{vat}/receive/`). ### Rate limiting This endpoint has a dedicated rate limit: only one export request per user can be processed at a time. Concurrent requests will receive a `429 Too Many Requests` response.
|
|
59
|
+
* @summary Export invoices as a ZIP archive
|
|
60
|
+
* @param {ExportGetTypeEnum} [type]
|
|
61
|
+
* @param {number} [companyId] Company id
|
|
62
|
+
* @param {number} [year]
|
|
63
|
+
* @param {number} [month]
|
|
64
|
+
* @param {number} [quarter]
|
|
65
|
+
* @param {string} [documentDateFrom] UTC ISO 8601 (2024-11-29T12:34:56Z)
|
|
66
|
+
* @param {string} [documentDateTo] UTC ISO 8601 (2024-11-29T12:34:56Z)
|
|
67
|
+
* @param {*} [options] Override http request option.
|
|
68
|
+
* @throws {RequiredError}
|
|
69
|
+
*/
|
|
70
|
+
exportGet(type?: ExportGetTypeEnum, companyId?: number, year?: number, month?: number, quarter?: number, documentDateFrom?: string, documentDateTo?: string, options?: RawAxiosRequestConfig): AxiosPromise<void>;
|
|
71
|
+
};
|
|
72
|
+
/**
|
|
73
|
+
* ExportApi - interface
|
|
74
|
+
*/
|
|
75
|
+
export interface ExportApiInterface {
|
|
76
|
+
/**
|
|
77
|
+
* Export invoices as a ZIP archive of FatturaPA XML files, suitable for import into accounting software (TeamSystem, Zucchetti, etc.). **Sent invoices** are only included when they have reached a definitive state (e.g., `Consegnato` for private recipients, `AccettatoDalDestinatario`, `DecorrenzaTermini`, etc.). Invoices still being processed by SDI are excluded. **Received invoices** are always included. Unread invoices are automatically marked as read and counted as operations. ### Period filters You can filter by period using either: - `year` + `month` (e.g., `year=2026&month=3` for March 2026) - `year` + `quarter` (e.g., `year=2026&quarter=1` for Q1 Jan-Mar) - `document_date_from` / `document_date_to` for a custom date range These options are mutually exclusive. The `year` parameter alone is not valid and requires either `month` or `quarter`. ### Response Returns `200` with a ZIP archive, or `204 No Content` if no invoices match the given filters. Files in the archive are organized by company VAT number (`{vat}/send/`, `{vat}/receive/`). ### Rate limiting This endpoint has a dedicated rate limit: only one export request per user can be processed at a time. Concurrent requests will receive a `429 Too Many Requests` response.
|
|
78
|
+
* @summary Export invoices as a ZIP archive
|
|
79
|
+
* @param {ExportGetTypeEnum} [type]
|
|
80
|
+
* @param {number} [companyId] Company id
|
|
81
|
+
* @param {number} [year]
|
|
82
|
+
* @param {number} [month]
|
|
83
|
+
* @param {number} [quarter]
|
|
84
|
+
* @param {string} [documentDateFrom] UTC ISO 8601 (2024-11-29T12:34:56Z)
|
|
85
|
+
* @param {string} [documentDateTo] UTC ISO 8601 (2024-11-29T12:34:56Z)
|
|
86
|
+
* @param {*} [options] Override http request option.
|
|
87
|
+
* @throws {RequiredError}
|
|
88
|
+
*/
|
|
89
|
+
exportGet(type?: ExportGetTypeEnum, companyId?: number, year?: number, month?: number, quarter?: number, documentDateFrom?: string, documentDateTo?: string, options?: RawAxiosRequestConfig): AxiosPromise<void>;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* ExportApi - object-oriented interface
|
|
93
|
+
*/
|
|
94
|
+
export declare class ExportApi extends BaseAPI implements ExportApiInterface {
|
|
95
|
+
/**
|
|
96
|
+
* Export invoices as a ZIP archive of FatturaPA XML files, suitable for import into accounting software (TeamSystem, Zucchetti, etc.). **Sent invoices** are only included when they have reached a definitive state (e.g., `Consegnato` for private recipients, `AccettatoDalDestinatario`, `DecorrenzaTermini`, etc.). Invoices still being processed by SDI are excluded. **Received invoices** are always included. Unread invoices are automatically marked as read and counted as operations. ### Period filters You can filter by period using either: - `year` + `month` (e.g., `year=2026&month=3` for March 2026) - `year` + `quarter` (e.g., `year=2026&quarter=1` for Q1 Jan-Mar) - `document_date_from` / `document_date_to` for a custom date range These options are mutually exclusive. The `year` parameter alone is not valid and requires either `month` or `quarter`. ### Response Returns `200` with a ZIP archive, or `204 No Content` if no invoices match the given filters. Files in the archive are organized by company VAT number (`{vat}/send/`, `{vat}/receive/`). ### Rate limiting This endpoint has a dedicated rate limit: only one export request per user can be processed at a time. Concurrent requests will receive a `429 Too Many Requests` response.
|
|
97
|
+
* @summary Export invoices as a ZIP archive
|
|
98
|
+
* @param {ExportGetTypeEnum} [type]
|
|
99
|
+
* @param {number} [companyId] Company id
|
|
100
|
+
* @param {number} [year]
|
|
101
|
+
* @param {number} [month]
|
|
102
|
+
* @param {number} [quarter]
|
|
103
|
+
* @param {string} [documentDateFrom] UTC ISO 8601 (2024-11-29T12:34:56Z)
|
|
104
|
+
* @param {string} [documentDateTo] UTC ISO 8601 (2024-11-29T12:34:56Z)
|
|
105
|
+
* @param {*} [options] Override http request option.
|
|
106
|
+
* @throws {RequiredError}
|
|
107
|
+
*/
|
|
108
|
+
exportGet(type?: ExportGetTypeEnum, companyId?: number, year?: number, month?: number, quarter?: number, documentDateFrom?: string, documentDateTo?: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}>>;
|
|
109
|
+
}
|
|
110
|
+
export declare const ExportGetTypeEnum: {
|
|
111
|
+
readonly Send: "Send";
|
|
112
|
+
readonly Receive: "Receive";
|
|
113
|
+
readonly Both: "Both";
|
|
114
|
+
};
|
|
115
|
+
export type ExportGetTypeEnum = typeof ExportGetTypeEnum[keyof typeof ExportGetTypeEnum];
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Invoicetronic API
|
|
5
|
+
* The [Invoicetronic API][2] is a RESTful service that allows you to send and receive invoices through the Italian [Servizio di Interscambio (SDI)][1], or Interchange Service. The API is designed to be simple and easy to use, abstracting away SDI complexity while providing complete control over the invoice send/receive process. It provides advanced features as encryption at rest, multi-language pre-flight invoice validation, multiple upload formats, webhooks, event logging, client SDKs, and CLI tools. For more information, see [Invoicetronic website][2] [1]: https://www.fatturapa.gov.it/it/sistemainterscambio/cose-il-sdi/ [2]: https://invoicetronic.com/
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1
|
|
8
|
+
* Contact: info@invoicetronic.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
18
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
19
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
20
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
import globalAxios from 'axios';
|
|
24
|
+
// URLSearchParams not necessarily used
|
|
25
|
+
// @ts-ignore
|
|
26
|
+
import { URL } from 'url';
|
|
27
|
+
// Some imports not used depending on template conditions
|
|
28
|
+
// @ts-ignore
|
|
29
|
+
import { DUMMY_BASE_URL, setBasicAuthToObject, setSearchParams, toPathString, createRequestFunction } from '../../common';
|
|
30
|
+
// @ts-ignore
|
|
31
|
+
import { BASE_PATH, BaseAPI, operationServerMap } from '../../base';
|
|
32
|
+
/**
|
|
33
|
+
* ExportApi - axios parameter creator
|
|
34
|
+
*/
|
|
35
|
+
export const ExportApiAxiosParamCreator = function (configuration) {
|
|
36
|
+
return {
|
|
37
|
+
/**
|
|
38
|
+
* Export invoices as a ZIP archive of FatturaPA XML files, suitable for import into accounting software (TeamSystem, Zucchetti, etc.). **Sent invoices** are only included when they have reached a definitive state (e.g., `Consegnato` for private recipients, `AccettatoDalDestinatario`, `DecorrenzaTermini`, etc.). Invoices still being processed by SDI are excluded. **Received invoices** are always included. Unread invoices are automatically marked as read and counted as operations. ### Period filters You can filter by period using either: - `year` + `month` (e.g., `year=2026&month=3` for March 2026) - `year` + `quarter` (e.g., `year=2026&quarter=1` for Q1 Jan-Mar) - `document_date_from` / `document_date_to` for a custom date range These options are mutually exclusive. The `year` parameter alone is not valid and requires either `month` or `quarter`. ### Response Returns `200` with a ZIP archive, or `204 No Content` if no invoices match the given filters. Files in the archive are organized by company VAT number (`{vat}/send/`, `{vat}/receive/`). ### Rate limiting This endpoint has a dedicated rate limit: only one export request per user can be processed at a time. Concurrent requests will receive a `429 Too Many Requests` response.
|
|
39
|
+
* @summary Export invoices as a ZIP archive
|
|
40
|
+
* @param {ExportGetTypeEnum} [type]
|
|
41
|
+
* @param {number} [companyId] Company id
|
|
42
|
+
* @param {number} [year]
|
|
43
|
+
* @param {number} [month]
|
|
44
|
+
* @param {number} [quarter]
|
|
45
|
+
* @param {string} [documentDateFrom] UTC ISO 8601 (2024-11-29T12:34:56Z)
|
|
46
|
+
* @param {string} [documentDateTo] UTC ISO 8601 (2024-11-29T12:34:56Z)
|
|
47
|
+
* @param {*} [options] Override http request option.
|
|
48
|
+
* @throws {RequiredError}
|
|
49
|
+
*/
|
|
50
|
+
exportGet: (type_1, companyId_1, year_1, month_1, quarter_1, documentDateFrom_1, documentDateTo_1, ...args_1) => __awaiter(this, [type_1, companyId_1, year_1, month_1, quarter_1, documentDateFrom_1, documentDateTo_1, ...args_1], void 0, function* (type, companyId, year, month, quarter, documentDateFrom, documentDateTo, options = {}) {
|
|
51
|
+
const localVarPath = `/export`;
|
|
52
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
53
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
54
|
+
let baseOptions;
|
|
55
|
+
if (configuration) {
|
|
56
|
+
baseOptions = configuration.baseOptions;
|
|
57
|
+
}
|
|
58
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
59
|
+
const localVarHeaderParameter = {};
|
|
60
|
+
const localVarQueryParameter = {};
|
|
61
|
+
// authentication Basic required
|
|
62
|
+
// http basic authentication required
|
|
63
|
+
setBasicAuthToObject(localVarRequestOptions, configuration);
|
|
64
|
+
if (type !== undefined) {
|
|
65
|
+
localVarQueryParameter['type'] = type;
|
|
66
|
+
}
|
|
67
|
+
if (companyId !== undefined) {
|
|
68
|
+
localVarQueryParameter['company_id'] = companyId;
|
|
69
|
+
}
|
|
70
|
+
if (year !== undefined) {
|
|
71
|
+
localVarQueryParameter['year'] = year;
|
|
72
|
+
}
|
|
73
|
+
if (month !== undefined) {
|
|
74
|
+
localVarQueryParameter['month'] = month;
|
|
75
|
+
}
|
|
76
|
+
if (quarter !== undefined) {
|
|
77
|
+
localVarQueryParameter['quarter'] = quarter;
|
|
78
|
+
}
|
|
79
|
+
if (documentDateFrom !== undefined) {
|
|
80
|
+
localVarQueryParameter['document_date_from'] = (documentDateFrom instanceof Date) ?
|
|
81
|
+
documentDateFrom.toISOString() :
|
|
82
|
+
documentDateFrom;
|
|
83
|
+
}
|
|
84
|
+
if (documentDateTo !== undefined) {
|
|
85
|
+
localVarQueryParameter['document_date_to'] = (documentDateTo instanceof Date) ?
|
|
86
|
+
documentDateTo.toISOString() :
|
|
87
|
+
documentDateTo;
|
|
88
|
+
}
|
|
89
|
+
localVarHeaderParameter['Accept'] = 'application/problem+json';
|
|
90
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
91
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
92
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
93
|
+
return {
|
|
94
|
+
url: toPathString(localVarUrlObj),
|
|
95
|
+
options: localVarRequestOptions,
|
|
96
|
+
};
|
|
97
|
+
}),
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
/**
|
|
101
|
+
* ExportApi - functional programming interface
|
|
102
|
+
*/
|
|
103
|
+
export const ExportApiFp = function (configuration) {
|
|
104
|
+
const localVarAxiosParamCreator = ExportApiAxiosParamCreator(configuration);
|
|
105
|
+
return {
|
|
106
|
+
/**
|
|
107
|
+
* Export invoices as a ZIP archive of FatturaPA XML files, suitable for import into accounting software (TeamSystem, Zucchetti, etc.). **Sent invoices** are only included when they have reached a definitive state (e.g., `Consegnato` for private recipients, `AccettatoDalDestinatario`, `DecorrenzaTermini`, etc.). Invoices still being processed by SDI are excluded. **Received invoices** are always included. Unread invoices are automatically marked as read and counted as operations. ### Period filters You can filter by period using either: - `year` + `month` (e.g., `year=2026&month=3` for March 2026) - `year` + `quarter` (e.g., `year=2026&quarter=1` for Q1 Jan-Mar) - `document_date_from` / `document_date_to` for a custom date range These options are mutually exclusive. The `year` parameter alone is not valid and requires either `month` or `quarter`. ### Response Returns `200` with a ZIP archive, or `204 No Content` if no invoices match the given filters. Files in the archive are organized by company VAT number (`{vat}/send/`, `{vat}/receive/`). ### Rate limiting This endpoint has a dedicated rate limit: only one export request per user can be processed at a time. Concurrent requests will receive a `429 Too Many Requests` response.
|
|
108
|
+
* @summary Export invoices as a ZIP archive
|
|
109
|
+
* @param {ExportGetTypeEnum} [type]
|
|
110
|
+
* @param {number} [companyId] Company id
|
|
111
|
+
* @param {number} [year]
|
|
112
|
+
* @param {number} [month]
|
|
113
|
+
* @param {number} [quarter]
|
|
114
|
+
* @param {string} [documentDateFrom] UTC ISO 8601 (2024-11-29T12:34:56Z)
|
|
115
|
+
* @param {string} [documentDateTo] UTC ISO 8601 (2024-11-29T12:34:56Z)
|
|
116
|
+
* @param {*} [options] Override http request option.
|
|
117
|
+
* @throws {RequiredError}
|
|
118
|
+
*/
|
|
119
|
+
exportGet(type, companyId, year, month, quarter, documentDateFrom, documentDateTo, options) {
|
|
120
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
121
|
+
var _a, _b, _c;
|
|
122
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.exportGet(type, companyId, year, month, quarter, documentDateFrom, documentDateTo, options);
|
|
123
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
124
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ExportApi.exportGet']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
125
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
126
|
+
});
|
|
127
|
+
},
|
|
128
|
+
};
|
|
129
|
+
};
|
|
130
|
+
/**
|
|
131
|
+
* ExportApi - factory interface
|
|
132
|
+
*/
|
|
133
|
+
export const ExportApiFactory = function (configuration, basePath, axios) {
|
|
134
|
+
const localVarFp = ExportApiFp(configuration);
|
|
135
|
+
return {
|
|
136
|
+
/**
|
|
137
|
+
* Export invoices as a ZIP archive of FatturaPA XML files, suitable for import into accounting software (TeamSystem, Zucchetti, etc.). **Sent invoices** are only included when they have reached a definitive state (e.g., `Consegnato` for private recipients, `AccettatoDalDestinatario`, `DecorrenzaTermini`, etc.). Invoices still being processed by SDI are excluded. **Received invoices** are always included. Unread invoices are automatically marked as read and counted as operations. ### Period filters You can filter by period using either: - `year` + `month` (e.g., `year=2026&month=3` for March 2026) - `year` + `quarter` (e.g., `year=2026&quarter=1` for Q1 Jan-Mar) - `document_date_from` / `document_date_to` for a custom date range These options are mutually exclusive. The `year` parameter alone is not valid and requires either `month` or `quarter`. ### Response Returns `200` with a ZIP archive, or `204 No Content` if no invoices match the given filters. Files in the archive are organized by company VAT number (`{vat}/send/`, `{vat}/receive/`). ### Rate limiting This endpoint has a dedicated rate limit: only one export request per user can be processed at a time. Concurrent requests will receive a `429 Too Many Requests` response.
|
|
138
|
+
* @summary Export invoices as a ZIP archive
|
|
139
|
+
* @param {ExportGetTypeEnum} [type]
|
|
140
|
+
* @param {number} [companyId] Company id
|
|
141
|
+
* @param {number} [year]
|
|
142
|
+
* @param {number} [month]
|
|
143
|
+
* @param {number} [quarter]
|
|
144
|
+
* @param {string} [documentDateFrom] UTC ISO 8601 (2024-11-29T12:34:56Z)
|
|
145
|
+
* @param {string} [documentDateTo] UTC ISO 8601 (2024-11-29T12:34:56Z)
|
|
146
|
+
* @param {*} [options] Override http request option.
|
|
147
|
+
* @throws {RequiredError}
|
|
148
|
+
*/
|
|
149
|
+
exportGet(type, companyId, year, month, quarter, documentDateFrom, documentDateTo, options) {
|
|
150
|
+
return localVarFp.exportGet(type, companyId, year, month, quarter, documentDateFrom, documentDateTo, options).then((request) => request(axios, basePath));
|
|
151
|
+
},
|
|
152
|
+
};
|
|
153
|
+
};
|
|
154
|
+
/**
|
|
155
|
+
* ExportApi - object-oriented interface
|
|
156
|
+
*/
|
|
157
|
+
export class ExportApi extends BaseAPI {
|
|
158
|
+
/**
|
|
159
|
+
* Export invoices as a ZIP archive of FatturaPA XML files, suitable for import into accounting software (TeamSystem, Zucchetti, etc.). **Sent invoices** are only included when they have reached a definitive state (e.g., `Consegnato` for private recipients, `AccettatoDalDestinatario`, `DecorrenzaTermini`, etc.). Invoices still being processed by SDI are excluded. **Received invoices** are always included. Unread invoices are automatically marked as read and counted as operations. ### Period filters You can filter by period using either: - `year` + `month` (e.g., `year=2026&month=3` for March 2026) - `year` + `quarter` (e.g., `year=2026&quarter=1` for Q1 Jan-Mar) - `document_date_from` / `document_date_to` for a custom date range These options are mutually exclusive. The `year` parameter alone is not valid and requires either `month` or `quarter`. ### Response Returns `200` with a ZIP archive, or `204 No Content` if no invoices match the given filters. Files in the archive are organized by company VAT number (`{vat}/send/`, `{vat}/receive/`). ### Rate limiting This endpoint has a dedicated rate limit: only one export request per user can be processed at a time. Concurrent requests will receive a `429 Too Many Requests` response.
|
|
160
|
+
* @summary Export invoices as a ZIP archive
|
|
161
|
+
* @param {ExportGetTypeEnum} [type]
|
|
162
|
+
* @param {number} [companyId] Company id
|
|
163
|
+
* @param {number} [year]
|
|
164
|
+
* @param {number} [month]
|
|
165
|
+
* @param {number} [quarter]
|
|
166
|
+
* @param {string} [documentDateFrom] UTC ISO 8601 (2024-11-29T12:34:56Z)
|
|
167
|
+
* @param {string} [documentDateTo] UTC ISO 8601 (2024-11-29T12:34:56Z)
|
|
168
|
+
* @param {*} [options] Override http request option.
|
|
169
|
+
* @throws {RequiredError}
|
|
170
|
+
*/
|
|
171
|
+
exportGet(type, companyId, year, month, quarter, documentDateFrom, documentDateTo, options) {
|
|
172
|
+
return ExportApiFp(this.configuration).exportGet(type, companyId, year, month, quarter, documentDateFrom, documentDateTo, options).then((request) => request(this.axios, this.basePath));
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
export const ExportGetTypeEnum = {
|
|
176
|
+
Send: 'Send',
|
|
177
|
+
Receive: 'Receive',
|
|
178
|
+
Both: 'Both'
|
|
179
|
+
};
|