@invoicetronic/ts-sdk 1.7.0 → 1.9.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 +16 -2
- package/api.ts +2 -2
- package/base.ts +2 -2
- package/common.ts +2 -2
- package/configuration.ts +3 -3
- package/dist/api.d.ts +2 -2
- package/dist/api.js +2 -2
- package/dist/base.d.ts +2 -2
- package/dist/base.js +2 -2
- package/dist/common.d.ts +2 -2
- package/dist/common.js +2 -2
- package/dist/configuration.d.ts +2 -2
- package/dist/configuration.js +3 -3
- package/dist/esm/api.d.ts +2 -2
- package/dist/esm/api.js +2 -2
- package/dist/esm/base.d.ts +2 -2
- package/dist/esm/base.js +2 -2
- package/dist/esm/common.d.ts +2 -2
- package/dist/esm/common.js +2 -2
- package/dist/esm/configuration.d.ts +2 -2
- package/dist/esm/configuration.js +3 -3
- package/dist/esm/index.d.ts +2 -2
- package/dist/esm/index.js +2 -2
- package/dist/esm/src/api/company-api.d.ts +2 -2
- package/dist/esm/src/api/company-api.js +2 -2
- package/dist/esm/src/api/export-api.d.ts +2 -2
- package/dist/esm/src/api/export-api.js +2 -2
- package/dist/esm/src/api/health-api.d.ts +2 -2
- package/dist/esm/src/api/health-api.js +2 -2
- package/dist/esm/src/api/log-api.d.ts +2 -2
- package/dist/esm/src/api/log-api.js +2 -2
- package/dist/esm/src/api/receive-api.d.ts +17 -17
- package/dist/esm/src/api/receive-api.js +14 -14
- package/dist/esm/src/api/send-api.d.ts +99 -57
- package/dist/esm/src/api/send-api.js +114 -61
- package/dist/esm/src/api/status-api.d.ts +2 -2
- package/dist/esm/src/api/status-api.js +2 -2
- package/dist/esm/src/api/update-api.d.ts +2 -2
- package/dist/esm/src/api/update-api.js +2 -2
- package/dist/esm/src/api/webhook-api.d.ts +27 -27
- package/dist/esm/src/api/webhook-api.js +22 -22
- package/dist/esm/src/models/company.d.ts +4 -4
- package/dist/esm/src/models/company.js +2 -2
- package/dist/esm/src/models/document-data.d.ts +2 -2
- package/dist/esm/src/models/document-data.js +2 -2
- package/dist/esm/src/models/event.d.ts +3 -3
- package/dist/esm/src/models/event.js +2 -2
- package/dist/esm/src/models/model-error.d.ts +2 -2
- package/dist/esm/src/models/model-error.js +2 -2
- package/dist/esm/src/models/problem-details.d.ts +2 -2
- package/dist/esm/src/models/problem-details.js +2 -2
- package/dist/esm/src/models/receive.d.ts +6 -6
- package/dist/esm/src/models/receive.js +2 -2
- package/dist/esm/src/models/send-reduced.d.ts +18 -2
- package/dist/esm/src/models/send-reduced.js +13 -3
- package/dist/esm/src/models/send.d.ts +22 -6
- package/dist/esm/src/models/send.js +13 -2
- package/dist/esm/src/models/status.d.ts +10 -2
- package/dist/esm/src/models/status.js +2 -2
- package/dist/esm/src/models/update.d.ts +3 -3
- package/dist/esm/src/models/update.js +2 -2
- package/dist/esm/src/models/web-hook-history.d.ts +8 -4
- package/dist/esm/src/models/web-hook-history.js +2 -2
- package/dist/esm/src/models/web-hook.d.ts +9 -5
- package/dist/esm/src/models/web-hook.js +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/src/api/company-api.d.ts +2 -2
- package/dist/src/api/company-api.js +2 -2
- package/dist/src/api/export-api.d.ts +2 -2
- package/dist/src/api/export-api.js +2 -2
- package/dist/src/api/health-api.d.ts +2 -2
- package/dist/src/api/health-api.js +2 -2
- package/dist/src/api/log-api.d.ts +2 -2
- package/dist/src/api/log-api.js +2 -2
- package/dist/src/api/receive-api.d.ts +17 -17
- package/dist/src/api/receive-api.js +14 -14
- package/dist/src/api/send-api.d.ts +99 -57
- package/dist/src/api/send-api.js +115 -62
- package/dist/src/api/status-api.d.ts +2 -2
- package/dist/src/api/status-api.js +2 -2
- package/dist/src/api/update-api.d.ts +2 -2
- package/dist/src/api/update-api.js +2 -2
- package/dist/src/api/webhook-api.d.ts +27 -27
- package/dist/src/api/webhook-api.js +22 -22
- package/dist/src/models/company.d.ts +4 -4
- package/dist/src/models/company.js +2 -2
- package/dist/src/models/document-data.d.ts +2 -2
- package/dist/src/models/document-data.js +2 -2
- package/dist/src/models/event.d.ts +3 -3
- package/dist/src/models/event.js +2 -2
- package/dist/src/models/model-error.d.ts +2 -2
- package/dist/src/models/model-error.js +2 -2
- package/dist/src/models/problem-details.d.ts +2 -2
- package/dist/src/models/problem-details.js +2 -2
- package/dist/src/models/receive.d.ts +6 -6
- package/dist/src/models/receive.js +2 -2
- package/dist/src/models/send-reduced.d.ts +18 -2
- package/dist/src/models/send-reduced.js +14 -2
- package/dist/src/models/send.d.ts +22 -6
- package/dist/src/models/send.js +14 -3
- package/dist/src/models/status.d.ts +10 -2
- package/dist/src/models/status.js +2 -2
- package/dist/src/models/update.d.ts +3 -3
- package/dist/src/models/update.js +2 -2
- package/dist/src/models/web-hook-history.d.ts +8 -4
- package/dist/src/models/web-hook-history.js +2 -2
- package/dist/src/models/web-hook.d.ts +9 -5
- package/dist/src/models/web-hook.js +2 -2
- package/docs/Company.md +4 -4
- package/docs/Event.md +3 -3
- package/docs/Receive.md +12 -12
- package/docs/ReceiveApi.md +3 -3
- package/docs/Send.md +15 -13
- package/docs/SendApi.md +28 -10
- package/docs/SendReduced.md +2 -0
- package/docs/Status.md +4 -0
- package/docs/Update.md +3 -3
- package/docs/WebHook.md +7 -5
- package/docs/WebHookHistory.md +6 -4
- package/docs/WebhookApi.md +5 -5
- package/index.ts +2 -2
- package/package.json +1 -1
- package/src/api/company-api.ts +2 -2
- package/src/api/export-api.ts +2 -2
- package/src/api/health-api.ts +2 -2
- package/src/api/log-api.ts +2 -2
- package/src/api/receive-api.ts +17 -17
- package/src/api/send-api.ts +134 -72
- package/src/api/status-api.ts +2 -2
- package/src/api/update-api.ts +2 -2
- package/src/api/webhook-api.ts +27 -27
- package/src/models/company.ts +4 -4
- package/src/models/document-data.ts +2 -2
- package/src/models/event.ts +3 -3
- package/src/models/model-error.ts +2 -2
- package/src/models/problem-details.ts +2 -2
- package/src/models/receive.ts +6 -6
- package/src/models/send-reduced.ts +21 -2
- package/src/models/send.ts +23 -6
- package/src/models/status.ts +10 -2
- package/src/models/update.ts +3 -3
- package/src/models/web-hook-history.ts +8 -4
- package/src/models/web-hook.ts +9 -5
package/src/api/send-api.ts
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/**
|
|
4
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/
|
|
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] ## Before you start For the full integration guide, tutorials, SDKs and quickstarts, see the **[Documentation](https://invoicetronic.com/en/docs/)**. A few cross-cutting topics worth knowing before integrating: - **[Prerequisites](https://invoicetronic.com/en/docs/prerequisites/)** — what you need to start in Sandbox and what\'s required to move to production. - **[API Keys](https://invoicetronic.com/en/docs/apikeys/)** — how `ik_live_` and `ik_test_` keys select the environment. - **[Sandbox](https://invoicetronic.com/en/docs/sandbox/)** — free test environment that mirrors the live workflow, with no credits consumed. - **[Rate Limiting](https://invoicetronic.com/en/docs/ratelimiting/)** — per-second, per-minute and per-day limits; how to handle `429 Too Many Requests`. - **[Pagination](https://invoicetronic.com/en/docs/pagination/)** — `page` and `page_size` parameters and the `Invoicetronic-Total-Count` response header. - **[CORS](https://invoicetronic.com/en/docs/cors/)** — calling the API from the browser; allowed origins are configured per key. - **[Webhooks](https://invoicetronic.com/en/docs/webhooks/)** — real-time event notifications with HMAC-SHA256 signature validation. - **[Localization](https://invoicetronic.com/en/docs/accept-language/)** — use the `Accept-Language` header to receive error messages in Italian, English or German. [1]: https://www.fatturapa.gov.it/it/sistemainterscambio/cose-il-sdi/ [2]: https://invoicetronic.com/
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document: 1.
|
|
7
|
+
* The version of the OpenAPI document: 1.14.0
|
|
8
8
|
* Contact: info@invoicetronic.com
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -34,15 +34,16 @@ import type { Send } from '../../src/models';
|
|
|
34
34
|
export const SendApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
35
35
|
return {
|
|
36
36
|
/**
|
|
37
|
-
* Add a new invoice by uploading a file. Supported formats are XML (FatturaPA) and P7M (signed). The invoice will be signed (if requested), validated (if requested), and queued for delivery to SDI. Status updates from SDI will be available in the `update` endpoint. **Send** invoices are outbound sales invoices transmitted to customers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/). You can also upload invoices via the [Dashboard](https://dashboard.invoicetronic.com).
|
|
37
|
+
* Add a new invoice by uploading a file. Supported formats are XML (FatturaPA) and P7M (signed). The invoice will be signed (if requested), validated (if requested), and queued for delivery to SDI. Status updates from SDI will be available in the `update` endpoint. **Send** invoices are outbound sales invoices transmitted to customers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/). You can also upload invoices via the [Dashboard](https://dashboard.invoicetronic.com). ### Idempotency To protect against duplicate submissions caused by network retries, you can send an optional `Idempotency-Key` header with any unique, client-generated value (up to 255 characters). - The first request with a given key is processed normally, and its response (status, body and `Location`) is stored for 24 hours. - Any subsequent request that reuses the same key within that window replays the original response instead of sending a second invoice to SDI. - If a request with the same key is still being processed, the retry receives `409 Conflict`. - If the same key is reused with a **different** invoice payload, the request is rejected with `422 Unprocessable Entity`: a given key must always map to the same request. Keys are scoped per account, so different accounts can use the same key value without interfering. If the idempotency store is temporarily unavailable, the request is processed normally without idempotency protection.
|
|
38
38
|
* @summary Add an invoice by file
|
|
39
39
|
* @param {File} file
|
|
40
40
|
* @param {boolean} [validate] Validate the document first, and reject it on failure.
|
|
41
41
|
* @param {SendFilePostSignatureEnum} [signature] Whether to digitally sign the document.
|
|
42
|
+
* @param {string} [idempotencyKey] Optional client-generated key that makes the submission idempotent. Retrying the same request with the same key within 24 hours returns the original response instead of creating a duplicate invoice.
|
|
42
43
|
* @param {*} [options] Override http request option.
|
|
43
44
|
* @throws {RequiredError}
|
|
44
45
|
*/
|
|
45
|
-
sendFilePost: async (file: File, validate?: boolean, signature?: SendFilePostSignatureEnum, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
46
|
+
sendFilePost: async (file: File, validate?: boolean, signature?: SendFilePostSignatureEnum, idempotencyKey?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
46
47
|
// verify required parameter 'file' is not null or undefined
|
|
47
48
|
assertParamExists('sendFilePost', 'file', file)
|
|
48
49
|
const localVarPath = `/send/file`;
|
|
@@ -77,6 +78,9 @@ export const SendApiAxiosParamCreator = function (configuration?: Configuration)
|
|
|
77
78
|
localVarHeaderParameter['Content-Type'] = 'multipart/form-data';
|
|
78
79
|
localVarHeaderParameter['Accept'] = 'application/json';
|
|
79
80
|
|
|
81
|
+
if (idempotencyKey != null) {
|
|
82
|
+
localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey);
|
|
83
|
+
}
|
|
80
84
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
81
85
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
82
86
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
@@ -88,7 +92,7 @@ export const SendApiAxiosParamCreator = function (configuration?: Configuration)
|
|
|
88
92
|
};
|
|
89
93
|
},
|
|
90
94
|
/**
|
|
91
|
-
* Retrieve a paginated list of send invoices. Results can be filtered by various criteria such as company, date ranges, document number, and free-text search (`q`). Returns invoice metadata; set `include_payload` to true to include the full invoice content. **Send** invoices are outbound sales invoices transmitted to customers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/).
|
|
95
|
+
* Retrieve a paginated list of send invoices. Results can be filtered by various criteria such as company, date ranges, document number, current SDI state (`latest_state`), and free-text search (`q`). Use `ids` to fetch specific Send records in a single call (comma-separated, up to 100). Returns invoice metadata; set `include_payload` to true to include the full invoice content. **Send** invoices are outbound sales invoices transmitted to customers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/).
|
|
92
96
|
* @summary List invoices
|
|
93
97
|
* @param {number} [companyId] Company id
|
|
94
98
|
* @param {string} [identifier] SDI identifier.
|
|
@@ -102,7 +106,9 @@ export const SendApiAxiosParamCreator = function (configuration?: Configuration)
|
|
|
102
106
|
* @param {string} [documentDateFrom] UTC ISO 8601 (2024-11-29T12:34:56Z)
|
|
103
107
|
* @param {string} [documentDateTo] UTC ISO 8601 (2024-11-29T12:34:56Z)
|
|
104
108
|
* @param {string} [documentNumber] Document number.
|
|
109
|
+
* @param {SendGetLatestStateEnum} [latestState] Filter by the most recent SDI state for the invoice. Matches the `latest_state` field exposed inline on each Send.
|
|
105
110
|
* @param {boolean} [includePayload] Include payload in the response. Defaults to false.
|
|
111
|
+
* @param {string} [ids] Comma-separated list of Send ids (max 100). Filters the collection to the matching rows; unknown or unauthorized ids are silently skipped.
|
|
106
112
|
* @param {number} [page] Page number.
|
|
107
113
|
* @param {number} [pageSize] Items per page. Cannot be greater than 200.
|
|
108
114
|
* @param {string} [sort] Sort by field. Prefix with \'-\' for descending order.
|
|
@@ -110,7 +116,7 @@ export const SendApiAxiosParamCreator = function (configuration?: Configuration)
|
|
|
110
116
|
* @param {*} [options] Override http request option.
|
|
111
117
|
* @throws {RequiredError}
|
|
112
118
|
*/
|
|
113
|
-
sendGet: async (companyId?: number, identifier?: string, committente?: string, prestatore?: string, fileName?: string, lastUpdateFrom?: string, lastUpdateTo?: string, dateSentFrom?: string, dateSentTo?: string, documentDateFrom?: string, documentDateTo?: string, documentNumber?: string, includePayload?: boolean, page?: number, pageSize?: number, sort?: string, q?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
119
|
+
sendGet: async (companyId?: number, identifier?: string, committente?: string, prestatore?: string, fileName?: string, lastUpdateFrom?: string, lastUpdateTo?: string, dateSentFrom?: string, dateSentTo?: string, documentDateFrom?: string, documentDateTo?: string, documentNumber?: string, latestState?: SendGetLatestStateEnum, includePayload?: boolean, ids?: string, page?: number, pageSize?: number, sort?: string, q?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
114
120
|
const localVarPath = `/send`;
|
|
115
121
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
116
122
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -187,10 +193,18 @@ export const SendApiAxiosParamCreator = function (configuration?: Configuration)
|
|
|
187
193
|
localVarQueryParameter['document_number'] = documentNumber;
|
|
188
194
|
}
|
|
189
195
|
|
|
196
|
+
if (latestState !== undefined) {
|
|
197
|
+
localVarQueryParameter['latest_state'] = latestState;
|
|
198
|
+
}
|
|
199
|
+
|
|
190
200
|
if (includePayload !== undefined) {
|
|
191
201
|
localVarQueryParameter['include_payload'] = includePayload;
|
|
192
202
|
}
|
|
193
203
|
|
|
204
|
+
if (ids !== undefined) {
|
|
205
|
+
localVarQueryParameter['ids'] = ids;
|
|
206
|
+
}
|
|
207
|
+
|
|
194
208
|
if (page !== undefined) {
|
|
195
209
|
localVarQueryParameter['page'] = page;
|
|
196
210
|
}
|
|
@@ -343,15 +357,16 @@ export const SendApiAxiosParamCreator = function (configuration?: Configuration)
|
|
|
343
357
|
};
|
|
344
358
|
},
|
|
345
359
|
/**
|
|
346
|
-
* Add a new invoice using a FatturaPA JSON representation. The invoice will be signed (if requested), validated (if requested), and queued for delivery to SDI. Status updates from SDI will be available in the `update` endpoint. **Send** invoices are outbound sales invoices transmitted to customers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/). You can also upload invoices via the [Dashboard](https://dashboard.invoicetronic.com).
|
|
360
|
+
* Add a new invoice using a FatturaPA JSON representation. Property names mirror the FatturaPA XML schema (PascalCase, e.g. `FatturaElettronicaHeader`). The invoice will be signed (if requested), validated (if requested), and queued for delivery to SDI. Status updates from SDI will be available in the `update` endpoint. **Send** invoices are outbound sales invoices transmitted to customers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/). You can also upload invoices via the [Dashboard](https://dashboard.invoicetronic.com). ### Idempotency To protect against duplicate submissions caused by network retries, you can send an optional `Idempotency-Key` header with any unique, client-generated value (up to 255 characters). - The first request with a given key is processed normally, and its response (status, body and `Location`) is stored for 24 hours. - Any subsequent request that reuses the same key within that window replays the original response instead of sending a second invoice to SDI. - If a request with the same key is still being processed, the retry receives `409 Conflict`. - If the same key is reused with a **different** invoice payload, the request is rejected with `422 Unprocessable Entity`: a given key must always map to the same request. Keys are scoped per account, so different accounts can use the same key value without interfering. If the idempotency store is temporarily unavailable, the request is processed normally without idempotency protection.
|
|
347
361
|
* @summary Add an invoice by json
|
|
348
362
|
* @param {object} body
|
|
349
363
|
* @param {boolean} [validate] Validate the document first, and reject it on failure.
|
|
350
364
|
* @param {SendJsonPostSignatureEnum} [signature] Whether to digitally sign the document.
|
|
365
|
+
* @param {string} [idempotencyKey] Optional client-generated key that makes the submission idempotent. Retrying the same request with the same key within 24 hours returns the original response instead of creating a duplicate invoice.
|
|
351
366
|
* @param {*} [options] Override http request option.
|
|
352
367
|
* @throws {RequiredError}
|
|
353
368
|
*/
|
|
354
|
-
sendJsonPost: async (body: object, validate?: boolean, signature?: SendJsonPostSignatureEnum, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
369
|
+
sendJsonPost: async (body: object, validate?: boolean, signature?: SendJsonPostSignatureEnum, idempotencyKey?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
355
370
|
// verify required parameter 'body' is not null or undefined
|
|
356
371
|
assertParamExists('sendJsonPost', 'body', body)
|
|
357
372
|
const localVarPath = `/send/json`;
|
|
@@ -381,6 +396,9 @@ export const SendApiAxiosParamCreator = function (configuration?: Configuration)
|
|
|
381
396
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
382
397
|
localVarHeaderParameter['Accept'] = 'application/json';
|
|
383
398
|
|
|
399
|
+
if (idempotencyKey != null) {
|
|
400
|
+
localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey);
|
|
401
|
+
}
|
|
384
402
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
385
403
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
386
404
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
@@ -392,15 +410,16 @@ export const SendApiAxiosParamCreator = function (configuration?: Configuration)
|
|
|
392
410
|
};
|
|
393
411
|
},
|
|
394
412
|
/**
|
|
395
|
-
* Add a new invoice using a structured Send object. The invoice will be signed (if requested), validated (if requested), and queued for delivery to SDI. Status updates from SDI will be available in the `update` endpoint. **Send** invoices are outbound sales invoices transmitted to customers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/). You can also upload invoices via the [Dashboard](https://dashboard.invoicetronic.com).
|
|
413
|
+
* Add a new invoice using a structured Send object. The invoice will be signed (if requested), validated (if requested), and queued for delivery to SDI. Status updates from SDI will be available in the `update` endpoint. **Send** invoices are outbound sales invoices transmitted to customers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/). You can also upload invoices via the [Dashboard](https://dashboard.invoicetronic.com). ### Idempotency To protect against duplicate submissions caused by network retries, you can send an optional `Idempotency-Key` header with any unique, client-generated value (up to 255 characters). - The first request with a given key is processed normally, and its response (status, body and `Location`) is stored for 24 hours. - Any subsequent request that reuses the same key within that window replays the original response instead of sending a second invoice to SDI. - If a request with the same key is still being processed, the retry receives `409 Conflict`. - If the same key is reused with a **different** invoice payload, the request is rejected with `422 Unprocessable Entity`: a given key must always map to the same request. Keys are scoped per account, so different accounts can use the same key value without interfering. If the idempotency store is temporarily unavailable, the request is processed normally without idempotency protection.
|
|
396
414
|
* @summary Add an invoice
|
|
397
415
|
* @param {Send} send
|
|
398
416
|
* @param {boolean} [validate] Validate the document first, and reject it on failure.
|
|
399
417
|
* @param {SendPostSignatureEnum} [signature] Whether to digitally sign the document.
|
|
418
|
+
* @param {string} [idempotencyKey] Optional client-generated key that makes the submission idempotent. Retrying the same request with the same key within 24 hours returns the original response instead of creating a duplicate invoice.
|
|
400
419
|
* @param {*} [options] Override http request option.
|
|
401
420
|
* @throws {RequiredError}
|
|
402
421
|
*/
|
|
403
|
-
sendPost: async (send: Send, validate?: boolean, signature?: SendPostSignatureEnum, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
422
|
+
sendPost: async (send: Send, validate?: boolean, signature?: SendPostSignatureEnum, idempotencyKey?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
404
423
|
// verify required parameter 'send' is not null or undefined
|
|
405
424
|
assertParamExists('sendPost', 'send', send)
|
|
406
425
|
const localVarPath = `/send`;
|
|
@@ -430,6 +449,9 @@ export const SendApiAxiosParamCreator = function (configuration?: Configuration)
|
|
|
430
449
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
431
450
|
localVarHeaderParameter['Accept'] = 'application/json';
|
|
432
451
|
|
|
452
|
+
if (idempotencyKey != null) {
|
|
453
|
+
localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey);
|
|
454
|
+
}
|
|
433
455
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
434
456
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
435
457
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
@@ -485,7 +507,7 @@ export const SendApiAxiosParamCreator = function (configuration?: Configuration)
|
|
|
485
507
|
};
|
|
486
508
|
},
|
|
487
509
|
/**
|
|
488
|
-
* Validate a JSON invoice without sending it to SDI. Use this to check for errors before actual submission. Returns validation results with any errors found. **Send** invoices are outbound sales invoices transmitted to customers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/).
|
|
510
|
+
* Validate a FatturaPA JSON invoice without sending it to SDI. Property names mirror the FatturaPA XML schema (PascalCase, e.g. `FatturaElettronicaHeader`). Use this to check for errors before actual submission. Returns validation results with any errors found. **Send** invoices are outbound sales invoices transmitted to customers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/).
|
|
489
511
|
* @summary Validate an invoice by json
|
|
490
512
|
* @param {object} body
|
|
491
513
|
* @param {*} [options] Override http request option.
|
|
@@ -602,15 +624,16 @@ export const SendApiAxiosParamCreator = function (configuration?: Configuration)
|
|
|
602
624
|
};
|
|
603
625
|
},
|
|
604
626
|
/**
|
|
605
|
-
* Add a new invoice using a raw XML document in FatturaPA format. The invoice will be signed (if requested), validated (if requested), and queued for delivery to SDI. Status updates from SDI will be available in the `update` endpoint. **Send** invoices are outbound sales invoices transmitted to customers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/). You can also upload invoices via the [Dashboard](https://dashboard.invoicetronic.com).
|
|
627
|
+
* Add a new invoice using a raw XML document in FatturaPA format. The invoice will be signed (if requested), validated (if requested), and queued for delivery to SDI. Status updates from SDI will be available in the `update` endpoint. **Send** invoices are outbound sales invoices transmitted to customers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/). You can also upload invoices via the [Dashboard](https://dashboard.invoicetronic.com). ### Idempotency To protect against duplicate submissions caused by network retries, you can send an optional `Idempotency-Key` header with any unique, client-generated value (up to 255 characters). - The first request with a given key is processed normally, and its response (status, body and `Location`) is stored for 24 hours. - Any subsequent request that reuses the same key within that window replays the original response instead of sending a second invoice to SDI. - If a request with the same key is still being processed, the retry receives `409 Conflict`. - If the same key is reused with a **different** invoice payload, the request is rejected with `422 Unprocessable Entity`: a given key must always map to the same request. Keys are scoped per account, so different accounts can use the same key value without interfering. If the idempotency store is temporarily unavailable, the request is processed normally without idempotency protection.
|
|
606
628
|
* @summary Add an invoice by xml
|
|
607
629
|
* @param {object} body
|
|
608
630
|
* @param {boolean} [validate] Validate the document first, and reject it on failure.
|
|
609
631
|
* @param {SendXmlPostSignatureEnum} [signature] Whether to digitally sign the document.
|
|
632
|
+
* @param {string} [idempotencyKey] Optional client-generated key that makes the submission idempotent. Retrying the same request with the same key within 24 hours returns the original response instead of creating a duplicate invoice.
|
|
610
633
|
* @param {*} [options] Override http request option.
|
|
611
634
|
* @throws {RequiredError}
|
|
612
635
|
*/
|
|
613
|
-
sendXmlPost: async (body: object, validate?: boolean, signature?: SendXmlPostSignatureEnum, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
636
|
+
sendXmlPost: async (body: object, validate?: boolean, signature?: SendXmlPostSignatureEnum, idempotencyKey?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
614
637
|
// verify required parameter 'body' is not null or undefined
|
|
615
638
|
assertParamExists('sendXmlPost', 'body', body)
|
|
616
639
|
const localVarPath = `/send/xml`;
|
|
@@ -640,6 +663,9 @@ export const SendApiAxiosParamCreator = function (configuration?: Configuration)
|
|
|
640
663
|
localVarHeaderParameter['Content-Type'] = 'application/xml';
|
|
641
664
|
localVarHeaderParameter['Accept'] = 'application/json';
|
|
642
665
|
|
|
666
|
+
if (idempotencyKey != null) {
|
|
667
|
+
localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey);
|
|
668
|
+
}
|
|
643
669
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
644
670
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
645
671
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
@@ -660,22 +686,23 @@ export const SendApiFp = function(configuration?: Configuration) {
|
|
|
660
686
|
const localVarAxiosParamCreator = SendApiAxiosParamCreator(configuration)
|
|
661
687
|
return {
|
|
662
688
|
/**
|
|
663
|
-
* Add a new invoice by uploading a file. Supported formats are XML (FatturaPA) and P7M (signed). The invoice will be signed (if requested), validated (if requested), and queued for delivery to SDI. Status updates from SDI will be available in the `update` endpoint. **Send** invoices are outbound sales invoices transmitted to customers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/). You can also upload invoices via the [Dashboard](https://dashboard.invoicetronic.com).
|
|
689
|
+
* Add a new invoice by uploading a file. Supported formats are XML (FatturaPA) and P7M (signed). The invoice will be signed (if requested), validated (if requested), and queued for delivery to SDI. Status updates from SDI will be available in the `update` endpoint. **Send** invoices are outbound sales invoices transmitted to customers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/). You can also upload invoices via the [Dashboard](https://dashboard.invoicetronic.com). ### Idempotency To protect against duplicate submissions caused by network retries, you can send an optional `Idempotency-Key` header with any unique, client-generated value (up to 255 characters). - The first request with a given key is processed normally, and its response (status, body and `Location`) is stored for 24 hours. - Any subsequent request that reuses the same key within that window replays the original response instead of sending a second invoice to SDI. - If a request with the same key is still being processed, the retry receives `409 Conflict`. - If the same key is reused with a **different** invoice payload, the request is rejected with `422 Unprocessable Entity`: a given key must always map to the same request. Keys are scoped per account, so different accounts can use the same key value without interfering. If the idempotency store is temporarily unavailable, the request is processed normally without idempotency protection.
|
|
664
690
|
* @summary Add an invoice by file
|
|
665
691
|
* @param {File} file
|
|
666
692
|
* @param {boolean} [validate] Validate the document first, and reject it on failure.
|
|
667
693
|
* @param {SendFilePostSignatureEnum} [signature] Whether to digitally sign the document.
|
|
694
|
+
* @param {string} [idempotencyKey] Optional client-generated key that makes the submission idempotent. Retrying the same request with the same key within 24 hours returns the original response instead of creating a duplicate invoice.
|
|
668
695
|
* @param {*} [options] Override http request option.
|
|
669
696
|
* @throws {RequiredError}
|
|
670
697
|
*/
|
|
671
|
-
async sendFilePost(file: File, validate?: boolean, signature?: SendFilePostSignatureEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Send>> {
|
|
672
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.sendFilePost(file, validate, signature, options);
|
|
698
|
+
async sendFilePost(file: File, validate?: boolean, signature?: SendFilePostSignatureEnum, idempotencyKey?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Send>> {
|
|
699
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.sendFilePost(file, validate, signature, idempotencyKey, options);
|
|
673
700
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
674
701
|
const localVarOperationServerBasePath = operationServerMap['SendApi.sendFilePost']?.[localVarOperationServerIndex]?.url;
|
|
675
702
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
676
703
|
},
|
|
677
704
|
/**
|
|
678
|
-
* Retrieve a paginated list of send invoices. Results can be filtered by various criteria such as company, date ranges, document number, and free-text search (`q`). Returns invoice metadata; set `include_payload` to true to include the full invoice content. **Send** invoices are outbound sales invoices transmitted to customers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/).
|
|
705
|
+
* Retrieve a paginated list of send invoices. Results can be filtered by various criteria such as company, date ranges, document number, current SDI state (`latest_state`), and free-text search (`q`). Use `ids` to fetch specific Send records in a single call (comma-separated, up to 100). Returns invoice metadata; set `include_payload` to true to include the full invoice content. **Send** invoices are outbound sales invoices transmitted to customers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/).
|
|
679
706
|
* @summary List invoices
|
|
680
707
|
* @param {number} [companyId] Company id
|
|
681
708
|
* @param {string} [identifier] SDI identifier.
|
|
@@ -689,7 +716,9 @@ export const SendApiFp = function(configuration?: Configuration) {
|
|
|
689
716
|
* @param {string} [documentDateFrom] UTC ISO 8601 (2024-11-29T12:34:56Z)
|
|
690
717
|
* @param {string} [documentDateTo] UTC ISO 8601 (2024-11-29T12:34:56Z)
|
|
691
718
|
* @param {string} [documentNumber] Document number.
|
|
719
|
+
* @param {SendGetLatestStateEnum} [latestState] Filter by the most recent SDI state for the invoice. Matches the `latest_state` field exposed inline on each Send.
|
|
692
720
|
* @param {boolean} [includePayload] Include payload in the response. Defaults to false.
|
|
721
|
+
* @param {string} [ids] Comma-separated list of Send ids (max 100). Filters the collection to the matching rows; unknown or unauthorized ids are silently skipped.
|
|
693
722
|
* @param {number} [page] Page number.
|
|
694
723
|
* @param {number} [pageSize] Items per page. Cannot be greater than 200.
|
|
695
724
|
* @param {string} [sort] Sort by field. Prefix with \'-\' for descending order.
|
|
@@ -697,8 +726,8 @@ export const SendApiFp = function(configuration?: Configuration) {
|
|
|
697
726
|
* @param {*} [options] Override http request option.
|
|
698
727
|
* @throws {RequiredError}
|
|
699
728
|
*/
|
|
700
|
-
async sendGet(companyId?: number, identifier?: string, committente?: string, prestatore?: string, fileName?: string, lastUpdateFrom?: string, lastUpdateTo?: string, dateSentFrom?: string, dateSentTo?: string, documentDateFrom?: string, documentDateTo?: string, documentNumber?: string, includePayload?: boolean, page?: number, pageSize?: number, sort?: string, q?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Send>>> {
|
|
701
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.sendGet(companyId, identifier, committente, prestatore, fileName, lastUpdateFrom, lastUpdateTo, dateSentFrom, dateSentTo, documentDateFrom, documentDateTo, documentNumber, includePayload, page, pageSize, sort, q, options);
|
|
729
|
+
async sendGet(companyId?: number, identifier?: string, committente?: string, prestatore?: string, fileName?: string, lastUpdateFrom?: string, lastUpdateTo?: string, dateSentFrom?: string, dateSentTo?: string, documentDateFrom?: string, documentDateTo?: string, documentNumber?: string, latestState?: SendGetLatestStateEnum, includePayload?: boolean, ids?: string, page?: number, pageSize?: number, sort?: string, q?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Send>>> {
|
|
730
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.sendGet(companyId, identifier, committente, prestatore, fileName, lastUpdateFrom, lastUpdateTo, dateSentFrom, dateSentTo, documentDateFrom, documentDateTo, documentNumber, latestState, includePayload, ids, page, pageSize, sort, q, options);
|
|
702
731
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
703
732
|
const localVarOperationServerBasePath = operationServerMap['SendApi.sendGet']?.[localVarOperationServerIndex]?.url;
|
|
704
733
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
@@ -745,31 +774,33 @@ export const SendApiFp = function(configuration?: Configuration) {
|
|
|
745
774
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
746
775
|
},
|
|
747
776
|
/**
|
|
748
|
-
* Add a new invoice using a FatturaPA JSON representation. The invoice will be signed (if requested), validated (if requested), and queued for delivery to SDI. Status updates from SDI will be available in the `update` endpoint. **Send** invoices are outbound sales invoices transmitted to customers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/). You can also upload invoices via the [Dashboard](https://dashboard.invoicetronic.com).
|
|
777
|
+
* Add a new invoice using a FatturaPA JSON representation. Property names mirror the FatturaPA XML schema (PascalCase, e.g. `FatturaElettronicaHeader`). The invoice will be signed (if requested), validated (if requested), and queued for delivery to SDI. Status updates from SDI will be available in the `update` endpoint. **Send** invoices are outbound sales invoices transmitted to customers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/). You can also upload invoices via the [Dashboard](https://dashboard.invoicetronic.com). ### Idempotency To protect against duplicate submissions caused by network retries, you can send an optional `Idempotency-Key` header with any unique, client-generated value (up to 255 characters). - The first request with a given key is processed normally, and its response (status, body and `Location`) is stored for 24 hours. - Any subsequent request that reuses the same key within that window replays the original response instead of sending a second invoice to SDI. - If a request with the same key is still being processed, the retry receives `409 Conflict`. - If the same key is reused with a **different** invoice payload, the request is rejected with `422 Unprocessable Entity`: a given key must always map to the same request. Keys are scoped per account, so different accounts can use the same key value without interfering. If the idempotency store is temporarily unavailable, the request is processed normally without idempotency protection.
|
|
749
778
|
* @summary Add an invoice by json
|
|
750
779
|
* @param {object} body
|
|
751
780
|
* @param {boolean} [validate] Validate the document first, and reject it on failure.
|
|
752
781
|
* @param {SendJsonPostSignatureEnum} [signature] Whether to digitally sign the document.
|
|
782
|
+
* @param {string} [idempotencyKey] Optional client-generated key that makes the submission idempotent. Retrying the same request with the same key within 24 hours returns the original response instead of creating a duplicate invoice.
|
|
753
783
|
* @param {*} [options] Override http request option.
|
|
754
784
|
* @throws {RequiredError}
|
|
755
785
|
*/
|
|
756
|
-
async sendJsonPost(body: object, validate?: boolean, signature?: SendJsonPostSignatureEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Send>> {
|
|
757
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.sendJsonPost(body, validate, signature, options);
|
|
786
|
+
async sendJsonPost(body: object, validate?: boolean, signature?: SendJsonPostSignatureEnum, idempotencyKey?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Send>> {
|
|
787
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.sendJsonPost(body, validate, signature, idempotencyKey, options);
|
|
758
788
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
759
789
|
const localVarOperationServerBasePath = operationServerMap['SendApi.sendJsonPost']?.[localVarOperationServerIndex]?.url;
|
|
760
790
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
761
791
|
},
|
|
762
792
|
/**
|
|
763
|
-
* Add a new invoice using a structured Send object. The invoice will be signed (if requested), validated (if requested), and queued for delivery to SDI. Status updates from SDI will be available in the `update` endpoint. **Send** invoices are outbound sales invoices transmitted to customers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/). You can also upload invoices via the [Dashboard](https://dashboard.invoicetronic.com).
|
|
793
|
+
* Add a new invoice using a structured Send object. The invoice will be signed (if requested), validated (if requested), and queued for delivery to SDI. Status updates from SDI will be available in the `update` endpoint. **Send** invoices are outbound sales invoices transmitted to customers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/). You can also upload invoices via the [Dashboard](https://dashboard.invoicetronic.com). ### Idempotency To protect against duplicate submissions caused by network retries, you can send an optional `Idempotency-Key` header with any unique, client-generated value (up to 255 characters). - The first request with a given key is processed normally, and its response (status, body and `Location`) is stored for 24 hours. - Any subsequent request that reuses the same key within that window replays the original response instead of sending a second invoice to SDI. - If a request with the same key is still being processed, the retry receives `409 Conflict`. - If the same key is reused with a **different** invoice payload, the request is rejected with `422 Unprocessable Entity`: a given key must always map to the same request. Keys are scoped per account, so different accounts can use the same key value without interfering. If the idempotency store is temporarily unavailable, the request is processed normally without idempotency protection.
|
|
764
794
|
* @summary Add an invoice
|
|
765
795
|
* @param {Send} send
|
|
766
796
|
* @param {boolean} [validate] Validate the document first, and reject it on failure.
|
|
767
797
|
* @param {SendPostSignatureEnum} [signature] Whether to digitally sign the document.
|
|
798
|
+
* @param {string} [idempotencyKey] Optional client-generated key that makes the submission idempotent. Retrying the same request with the same key within 24 hours returns the original response instead of creating a duplicate invoice.
|
|
768
799
|
* @param {*} [options] Override http request option.
|
|
769
800
|
* @throws {RequiredError}
|
|
770
801
|
*/
|
|
771
|
-
async sendPost(send: Send, validate?: boolean, signature?: SendPostSignatureEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Send>> {
|
|
772
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.sendPost(send, validate, signature, options);
|
|
802
|
+
async sendPost(send: Send, validate?: boolean, signature?: SendPostSignatureEnum, idempotencyKey?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Send>> {
|
|
803
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.sendPost(send, validate, signature, idempotencyKey, options);
|
|
773
804
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
774
805
|
const localVarOperationServerBasePath = operationServerMap['SendApi.sendPost']?.[localVarOperationServerIndex]?.url;
|
|
775
806
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
@@ -788,7 +819,7 @@ export const SendApiFp = function(configuration?: Configuration) {
|
|
|
788
819
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
789
820
|
},
|
|
790
821
|
/**
|
|
791
|
-
* Validate a JSON invoice without sending it to SDI. Use this to check for errors before actual submission. Returns validation results with any errors found. **Send** invoices are outbound sales invoices transmitted to customers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/).
|
|
822
|
+
* Validate a FatturaPA JSON invoice without sending it to SDI. Property names mirror the FatturaPA XML schema (PascalCase, e.g. `FatturaElettronicaHeader`). Use this to check for errors before actual submission. Returns validation results with any errors found. **Send** invoices are outbound sales invoices transmitted to customers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/).
|
|
792
823
|
* @summary Validate an invoice by json
|
|
793
824
|
* @param {object} body
|
|
794
825
|
* @param {*} [options] Override http request option.
|
|
@@ -827,16 +858,17 @@ export const SendApiFp = function(configuration?: Configuration) {
|
|
|
827
858
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
828
859
|
},
|
|
829
860
|
/**
|
|
830
|
-
* Add a new invoice using a raw XML document in FatturaPA format. The invoice will be signed (if requested), validated (if requested), and queued for delivery to SDI. Status updates from SDI will be available in the `update` endpoint. **Send** invoices are outbound sales invoices transmitted to customers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/). You can also upload invoices via the [Dashboard](https://dashboard.invoicetronic.com).
|
|
861
|
+
* Add a new invoice using a raw XML document in FatturaPA format. The invoice will be signed (if requested), validated (if requested), and queued for delivery to SDI. Status updates from SDI will be available in the `update` endpoint. **Send** invoices are outbound sales invoices transmitted to customers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/). You can also upload invoices via the [Dashboard](https://dashboard.invoicetronic.com). ### Idempotency To protect against duplicate submissions caused by network retries, you can send an optional `Idempotency-Key` header with any unique, client-generated value (up to 255 characters). - The first request with a given key is processed normally, and its response (status, body and `Location`) is stored for 24 hours. - Any subsequent request that reuses the same key within that window replays the original response instead of sending a second invoice to SDI. - If a request with the same key is still being processed, the retry receives `409 Conflict`. - If the same key is reused with a **different** invoice payload, the request is rejected with `422 Unprocessable Entity`: a given key must always map to the same request. Keys are scoped per account, so different accounts can use the same key value without interfering. If the idempotency store is temporarily unavailable, the request is processed normally without idempotency protection.
|
|
831
862
|
* @summary Add an invoice by xml
|
|
832
863
|
* @param {object} body
|
|
833
864
|
* @param {boolean} [validate] Validate the document first, and reject it on failure.
|
|
834
865
|
* @param {SendXmlPostSignatureEnum} [signature] Whether to digitally sign the document.
|
|
866
|
+
* @param {string} [idempotencyKey] Optional client-generated key that makes the submission idempotent. Retrying the same request with the same key within 24 hours returns the original response instead of creating a duplicate invoice.
|
|
835
867
|
* @param {*} [options] Override http request option.
|
|
836
868
|
* @throws {RequiredError}
|
|
837
869
|
*/
|
|
838
|
-
async sendXmlPost(body: object, validate?: boolean, signature?: SendXmlPostSignatureEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Send>> {
|
|
839
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.sendXmlPost(body, validate, signature, options);
|
|
870
|
+
async sendXmlPost(body: object, validate?: boolean, signature?: SendXmlPostSignatureEnum, idempotencyKey?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Send>> {
|
|
871
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.sendXmlPost(body, validate, signature, idempotencyKey, options);
|
|
840
872
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
841
873
|
const localVarOperationServerBasePath = operationServerMap['SendApi.sendXmlPost']?.[localVarOperationServerIndex]?.url;
|
|
842
874
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
@@ -851,19 +883,20 @@ export const SendApiFactory = function (configuration?: Configuration, basePath?
|
|
|
851
883
|
const localVarFp = SendApiFp(configuration)
|
|
852
884
|
return {
|
|
853
885
|
/**
|
|
854
|
-
* Add a new invoice by uploading a file. Supported formats are XML (FatturaPA) and P7M (signed). The invoice will be signed (if requested), validated (if requested), and queued for delivery to SDI. Status updates from SDI will be available in the `update` endpoint. **Send** invoices are outbound sales invoices transmitted to customers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/). You can also upload invoices via the [Dashboard](https://dashboard.invoicetronic.com).
|
|
886
|
+
* Add a new invoice by uploading a file. Supported formats are XML (FatturaPA) and P7M (signed). The invoice will be signed (if requested), validated (if requested), and queued for delivery to SDI. Status updates from SDI will be available in the `update` endpoint. **Send** invoices are outbound sales invoices transmitted to customers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/). You can also upload invoices via the [Dashboard](https://dashboard.invoicetronic.com). ### Idempotency To protect against duplicate submissions caused by network retries, you can send an optional `Idempotency-Key` header with any unique, client-generated value (up to 255 characters). - The first request with a given key is processed normally, and its response (status, body and `Location`) is stored for 24 hours. - Any subsequent request that reuses the same key within that window replays the original response instead of sending a second invoice to SDI. - If a request with the same key is still being processed, the retry receives `409 Conflict`. - If the same key is reused with a **different** invoice payload, the request is rejected with `422 Unprocessable Entity`: a given key must always map to the same request. Keys are scoped per account, so different accounts can use the same key value without interfering. If the idempotency store is temporarily unavailable, the request is processed normally without idempotency protection.
|
|
855
887
|
* @summary Add an invoice by file
|
|
856
888
|
* @param {File} file
|
|
857
889
|
* @param {boolean} [validate] Validate the document first, and reject it on failure.
|
|
858
890
|
* @param {SendFilePostSignatureEnum} [signature] Whether to digitally sign the document.
|
|
891
|
+
* @param {string} [idempotencyKey] Optional client-generated key that makes the submission idempotent. Retrying the same request with the same key within 24 hours returns the original response instead of creating a duplicate invoice.
|
|
859
892
|
* @param {*} [options] Override http request option.
|
|
860
893
|
* @throws {RequiredError}
|
|
861
894
|
*/
|
|
862
|
-
sendFilePost(file: File, validate?: boolean, signature?: SendFilePostSignatureEnum, options?: RawAxiosRequestConfig): AxiosPromise<Send> {
|
|
863
|
-
return localVarFp.sendFilePost(file, validate, signature, options).then((request) => request(axios, basePath));
|
|
895
|
+
sendFilePost(file: File, validate?: boolean, signature?: SendFilePostSignatureEnum, idempotencyKey?: string, options?: RawAxiosRequestConfig): AxiosPromise<Send> {
|
|
896
|
+
return localVarFp.sendFilePost(file, validate, signature, idempotencyKey, options).then((request) => request(axios, basePath));
|
|
864
897
|
},
|
|
865
898
|
/**
|
|
866
|
-
* Retrieve a paginated list of send invoices. Results can be filtered by various criteria such as company, date ranges, document number, and free-text search (`q`). Returns invoice metadata; set `include_payload` to true to include the full invoice content. **Send** invoices are outbound sales invoices transmitted to customers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/).
|
|
899
|
+
* Retrieve a paginated list of send invoices. Results can be filtered by various criteria such as company, date ranges, document number, current SDI state (`latest_state`), and free-text search (`q`). Use `ids` to fetch specific Send records in a single call (comma-separated, up to 100). Returns invoice metadata; set `include_payload` to true to include the full invoice content. **Send** invoices are outbound sales invoices transmitted to customers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/).
|
|
867
900
|
* @summary List invoices
|
|
868
901
|
* @param {number} [companyId] Company id
|
|
869
902
|
* @param {string} [identifier] SDI identifier.
|
|
@@ -877,7 +910,9 @@ export const SendApiFactory = function (configuration?: Configuration, basePath?
|
|
|
877
910
|
* @param {string} [documentDateFrom] UTC ISO 8601 (2024-11-29T12:34:56Z)
|
|
878
911
|
* @param {string} [documentDateTo] UTC ISO 8601 (2024-11-29T12:34:56Z)
|
|
879
912
|
* @param {string} [documentNumber] Document number.
|
|
913
|
+
* @param {SendGetLatestStateEnum} [latestState] Filter by the most recent SDI state for the invoice. Matches the `latest_state` field exposed inline on each Send.
|
|
880
914
|
* @param {boolean} [includePayload] Include payload in the response. Defaults to false.
|
|
915
|
+
* @param {string} [ids] Comma-separated list of Send ids (max 100). Filters the collection to the matching rows; unknown or unauthorized ids are silently skipped.
|
|
881
916
|
* @param {number} [page] Page number.
|
|
882
917
|
* @param {number} [pageSize] Items per page. Cannot be greater than 200.
|
|
883
918
|
* @param {string} [sort] Sort by field. Prefix with \'-\' for descending order.
|
|
@@ -885,8 +920,8 @@ export const SendApiFactory = function (configuration?: Configuration, basePath?
|
|
|
885
920
|
* @param {*} [options] Override http request option.
|
|
886
921
|
* @throws {RequiredError}
|
|
887
922
|
*/
|
|
888
|
-
sendGet(companyId?: number, identifier?: string, committente?: string, prestatore?: string, fileName?: string, lastUpdateFrom?: string, lastUpdateTo?: string, dateSentFrom?: string, dateSentTo?: string, documentDateFrom?: string, documentDateTo?: string, documentNumber?: string, includePayload?: boolean, page?: number, pageSize?: number, sort?: string, q?: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<Send>> {
|
|
889
|
-
return localVarFp.sendGet(companyId, identifier, committente, prestatore, fileName, lastUpdateFrom, lastUpdateTo, dateSentFrom, dateSentTo, documentDateFrom, documentDateTo, documentNumber, includePayload, page, pageSize, sort, q, options).then((request) => request(axios, basePath));
|
|
923
|
+
sendGet(companyId?: number, identifier?: string, committente?: string, prestatore?: string, fileName?: string, lastUpdateFrom?: string, lastUpdateTo?: string, dateSentFrom?: string, dateSentTo?: string, documentDateFrom?: string, documentDateTo?: string, documentNumber?: string, latestState?: SendGetLatestStateEnum, includePayload?: boolean, ids?: string, page?: number, pageSize?: number, sort?: string, q?: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<Send>> {
|
|
924
|
+
return localVarFp.sendGet(companyId, identifier, committente, prestatore, fileName, lastUpdateFrom, lastUpdateTo, dateSentFrom, dateSentTo, documentDateFrom, documentDateTo, documentNumber, latestState, includePayload, ids, page, pageSize, sort, q, options).then((request) => request(axios, basePath));
|
|
890
925
|
},
|
|
891
926
|
/**
|
|
892
927
|
* Retrieve a send invoice by its internal id. The `id` is unique and assigned by the system when the invoice is created. Returns invoice metadata; set `include_payload` to true to include the full invoice content. **Send** invoices are outbound sales invoices transmitted to customers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/).
|
|
@@ -921,28 +956,30 @@ export const SendApiFactory = function (configuration?: Configuration, basePath?
|
|
|
921
956
|
return localVarFp.sendIdentifierGet(identifier, includePayload, options).then((request) => request(axios, basePath));
|
|
922
957
|
},
|
|
923
958
|
/**
|
|
924
|
-
* Add a new invoice using a FatturaPA JSON representation. The invoice will be signed (if requested), validated (if requested), and queued for delivery to SDI. Status updates from SDI will be available in the `update` endpoint. **Send** invoices are outbound sales invoices transmitted to customers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/). You can also upload invoices via the [Dashboard](https://dashboard.invoicetronic.com).
|
|
959
|
+
* Add a new invoice using a FatturaPA JSON representation. Property names mirror the FatturaPA XML schema (PascalCase, e.g. `FatturaElettronicaHeader`). The invoice will be signed (if requested), validated (if requested), and queued for delivery to SDI. Status updates from SDI will be available in the `update` endpoint. **Send** invoices are outbound sales invoices transmitted to customers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/). You can also upload invoices via the [Dashboard](https://dashboard.invoicetronic.com). ### Idempotency To protect against duplicate submissions caused by network retries, you can send an optional `Idempotency-Key` header with any unique, client-generated value (up to 255 characters). - The first request with a given key is processed normally, and its response (status, body and `Location`) is stored for 24 hours. - Any subsequent request that reuses the same key within that window replays the original response instead of sending a second invoice to SDI. - If a request with the same key is still being processed, the retry receives `409 Conflict`. - If the same key is reused with a **different** invoice payload, the request is rejected with `422 Unprocessable Entity`: a given key must always map to the same request. Keys are scoped per account, so different accounts can use the same key value without interfering. If the idempotency store is temporarily unavailable, the request is processed normally without idempotency protection.
|
|
925
960
|
* @summary Add an invoice by json
|
|
926
961
|
* @param {object} body
|
|
927
962
|
* @param {boolean} [validate] Validate the document first, and reject it on failure.
|
|
928
963
|
* @param {SendJsonPostSignatureEnum} [signature] Whether to digitally sign the document.
|
|
964
|
+
* @param {string} [idempotencyKey] Optional client-generated key that makes the submission idempotent. Retrying the same request with the same key within 24 hours returns the original response instead of creating a duplicate invoice.
|
|
929
965
|
* @param {*} [options] Override http request option.
|
|
930
966
|
* @throws {RequiredError}
|
|
931
967
|
*/
|
|
932
|
-
sendJsonPost(body: object, validate?: boolean, signature?: SendJsonPostSignatureEnum, options?: RawAxiosRequestConfig): AxiosPromise<Send> {
|
|
933
|
-
return localVarFp.sendJsonPost(body, validate, signature, options).then((request) => request(axios, basePath));
|
|
968
|
+
sendJsonPost(body: object, validate?: boolean, signature?: SendJsonPostSignatureEnum, idempotencyKey?: string, options?: RawAxiosRequestConfig): AxiosPromise<Send> {
|
|
969
|
+
return localVarFp.sendJsonPost(body, validate, signature, idempotencyKey, options).then((request) => request(axios, basePath));
|
|
934
970
|
},
|
|
935
971
|
/**
|
|
936
|
-
* Add a new invoice using a structured Send object. The invoice will be signed (if requested), validated (if requested), and queued for delivery to SDI. Status updates from SDI will be available in the `update` endpoint. **Send** invoices are outbound sales invoices transmitted to customers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/). You can also upload invoices via the [Dashboard](https://dashboard.invoicetronic.com).
|
|
972
|
+
* Add a new invoice using a structured Send object. The invoice will be signed (if requested), validated (if requested), and queued for delivery to SDI. Status updates from SDI will be available in the `update` endpoint. **Send** invoices are outbound sales invoices transmitted to customers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/). You can also upload invoices via the [Dashboard](https://dashboard.invoicetronic.com). ### Idempotency To protect against duplicate submissions caused by network retries, you can send an optional `Idempotency-Key` header with any unique, client-generated value (up to 255 characters). - The first request with a given key is processed normally, and its response (status, body and `Location`) is stored for 24 hours. - Any subsequent request that reuses the same key within that window replays the original response instead of sending a second invoice to SDI. - If a request with the same key is still being processed, the retry receives `409 Conflict`. - If the same key is reused with a **different** invoice payload, the request is rejected with `422 Unprocessable Entity`: a given key must always map to the same request. Keys are scoped per account, so different accounts can use the same key value without interfering. If the idempotency store is temporarily unavailable, the request is processed normally without idempotency protection.
|
|
937
973
|
* @summary Add an invoice
|
|
938
974
|
* @param {Send} send
|
|
939
975
|
* @param {boolean} [validate] Validate the document first, and reject it on failure.
|
|
940
976
|
* @param {SendPostSignatureEnum} [signature] Whether to digitally sign the document.
|
|
977
|
+
* @param {string} [idempotencyKey] Optional client-generated key that makes the submission idempotent. Retrying the same request with the same key within 24 hours returns the original response instead of creating a duplicate invoice.
|
|
941
978
|
* @param {*} [options] Override http request option.
|
|
942
979
|
* @throws {RequiredError}
|
|
943
980
|
*/
|
|
944
|
-
sendPost(send: Send, validate?: boolean, signature?: SendPostSignatureEnum, options?: RawAxiosRequestConfig): AxiosPromise<Send> {
|
|
945
|
-
return localVarFp.sendPost(send, validate, signature, options).then((request) => request(axios, basePath));
|
|
981
|
+
sendPost(send: Send, validate?: boolean, signature?: SendPostSignatureEnum, idempotencyKey?: string, options?: RawAxiosRequestConfig): AxiosPromise<Send> {
|
|
982
|
+
return localVarFp.sendPost(send, validate, signature, idempotencyKey, options).then((request) => request(axios, basePath));
|
|
946
983
|
},
|
|
947
984
|
/**
|
|
948
985
|
* Validate an invoice file without sending it to SDI. Supported formats are XML (FatturaPA) and P7M (signed). Use this to check for errors before actual submission. Returns validation results with any errors found. **Send** invoices are outbound sales invoices transmitted to customers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/).
|
|
@@ -955,7 +992,7 @@ export const SendApiFactory = function (configuration?: Configuration, basePath?
|
|
|
955
992
|
return localVarFp.sendValidateFilePost(file, options).then((request) => request(axios, basePath));
|
|
956
993
|
},
|
|
957
994
|
/**
|
|
958
|
-
* Validate a JSON invoice without sending it to SDI. Use this to check for errors before actual submission. Returns validation results with any errors found. **Send** invoices are outbound sales invoices transmitted to customers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/).
|
|
995
|
+
* Validate a FatturaPA JSON invoice without sending it to SDI. Property names mirror the FatturaPA XML schema (PascalCase, e.g. `FatturaElettronicaHeader`). Use this to check for errors before actual submission. Returns validation results with any errors found. **Send** invoices are outbound sales invoices transmitted to customers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/).
|
|
959
996
|
* @summary Validate an invoice by json
|
|
960
997
|
* @param {object} body
|
|
961
998
|
* @param {*} [options] Override http request option.
|
|
@@ -985,16 +1022,17 @@ export const SendApiFactory = function (configuration?: Configuration, basePath?
|
|
|
985
1022
|
return localVarFp.sendValidateXmlPost(body, options).then((request) => request(axios, basePath));
|
|
986
1023
|
},
|
|
987
1024
|
/**
|
|
988
|
-
* Add a new invoice using a raw XML document in FatturaPA format. The invoice will be signed (if requested), validated (if requested), and queued for delivery to SDI. Status updates from SDI will be available in the `update` endpoint. **Send** invoices are outbound sales invoices transmitted to customers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/). You can also upload invoices via the [Dashboard](https://dashboard.invoicetronic.com).
|
|
1025
|
+
* Add a new invoice using a raw XML document in FatturaPA format. The invoice will be signed (if requested), validated (if requested), and queued for delivery to SDI. Status updates from SDI will be available in the `update` endpoint. **Send** invoices are outbound sales invoices transmitted to customers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/). You can also upload invoices via the [Dashboard](https://dashboard.invoicetronic.com). ### Idempotency To protect against duplicate submissions caused by network retries, you can send an optional `Idempotency-Key` header with any unique, client-generated value (up to 255 characters). - The first request with a given key is processed normally, and its response (status, body and `Location`) is stored for 24 hours. - Any subsequent request that reuses the same key within that window replays the original response instead of sending a second invoice to SDI. - If a request with the same key is still being processed, the retry receives `409 Conflict`. - If the same key is reused with a **different** invoice payload, the request is rejected with `422 Unprocessable Entity`: a given key must always map to the same request. Keys are scoped per account, so different accounts can use the same key value without interfering. If the idempotency store is temporarily unavailable, the request is processed normally without idempotency protection.
|
|
989
1026
|
* @summary Add an invoice by xml
|
|
990
1027
|
* @param {object} body
|
|
991
1028
|
* @param {boolean} [validate] Validate the document first, and reject it on failure.
|
|
992
1029
|
* @param {SendXmlPostSignatureEnum} [signature] Whether to digitally sign the document.
|
|
1030
|
+
* @param {string} [idempotencyKey] Optional client-generated key that makes the submission idempotent. Retrying the same request with the same key within 24 hours returns the original response instead of creating a duplicate invoice.
|
|
993
1031
|
* @param {*} [options] Override http request option.
|
|
994
1032
|
* @throws {RequiredError}
|
|
995
1033
|
*/
|
|
996
|
-
sendXmlPost(body: object, validate?: boolean, signature?: SendXmlPostSignatureEnum, options?: RawAxiosRequestConfig): AxiosPromise<Send> {
|
|
997
|
-
return localVarFp.sendXmlPost(body, validate, signature, options).then((request) => request(axios, basePath));
|
|
1034
|
+
sendXmlPost(body: object, validate?: boolean, signature?: SendXmlPostSignatureEnum, idempotencyKey?: string, options?: RawAxiosRequestConfig): AxiosPromise<Send> {
|
|
1035
|
+
return localVarFp.sendXmlPost(body, validate, signature, idempotencyKey, options).then((request) => request(axios, basePath));
|
|
998
1036
|
},
|
|
999
1037
|
};
|
|
1000
1038
|
};
|
|
@@ -1004,18 +1042,19 @@ export const SendApiFactory = function (configuration?: Configuration, basePath?
|
|
|
1004
1042
|
*/
|
|
1005
1043
|
export interface SendApiInterface {
|
|
1006
1044
|
/**
|
|
1007
|
-
* Add a new invoice by uploading a file. Supported formats are XML (FatturaPA) and P7M (signed). The invoice will be signed (if requested), validated (if requested), and queued for delivery to SDI. Status updates from SDI will be available in the `update` endpoint. **Send** invoices are outbound sales invoices transmitted to customers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/). You can also upload invoices via the [Dashboard](https://dashboard.invoicetronic.com).
|
|
1045
|
+
* Add a new invoice by uploading a file. Supported formats are XML (FatturaPA) and P7M (signed). The invoice will be signed (if requested), validated (if requested), and queued for delivery to SDI. Status updates from SDI will be available in the `update` endpoint. **Send** invoices are outbound sales invoices transmitted to customers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/). You can also upload invoices via the [Dashboard](https://dashboard.invoicetronic.com). ### Idempotency To protect against duplicate submissions caused by network retries, you can send an optional `Idempotency-Key` header with any unique, client-generated value (up to 255 characters). - The first request with a given key is processed normally, and its response (status, body and `Location`) is stored for 24 hours. - Any subsequent request that reuses the same key within that window replays the original response instead of sending a second invoice to SDI. - If a request with the same key is still being processed, the retry receives `409 Conflict`. - If the same key is reused with a **different** invoice payload, the request is rejected with `422 Unprocessable Entity`: a given key must always map to the same request. Keys are scoped per account, so different accounts can use the same key value without interfering. If the idempotency store is temporarily unavailable, the request is processed normally without idempotency protection.
|
|
1008
1046
|
* @summary Add an invoice by file
|
|
1009
1047
|
* @param {File} file
|
|
1010
1048
|
* @param {boolean} [validate] Validate the document first, and reject it on failure.
|
|
1011
1049
|
* @param {SendFilePostSignatureEnum} [signature] Whether to digitally sign the document.
|
|
1050
|
+
* @param {string} [idempotencyKey] Optional client-generated key that makes the submission idempotent. Retrying the same request with the same key within 24 hours returns the original response instead of creating a duplicate invoice.
|
|
1012
1051
|
* @param {*} [options] Override http request option.
|
|
1013
1052
|
* @throws {RequiredError}
|
|
1014
1053
|
*/
|
|
1015
|
-
sendFilePost(file: File, validate?: boolean, signature?: SendFilePostSignatureEnum, options?: RawAxiosRequestConfig): AxiosPromise<Send>;
|
|
1054
|
+
sendFilePost(file: File, validate?: boolean, signature?: SendFilePostSignatureEnum, idempotencyKey?: string, options?: RawAxiosRequestConfig): AxiosPromise<Send>;
|
|
1016
1055
|
|
|
1017
1056
|
/**
|
|
1018
|
-
* Retrieve a paginated list of send invoices. Results can be filtered by various criteria such as company, date ranges, document number, and free-text search (`q`). Returns invoice metadata; set `include_payload` to true to include the full invoice content. **Send** invoices are outbound sales invoices transmitted to customers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/).
|
|
1057
|
+
* Retrieve a paginated list of send invoices. Results can be filtered by various criteria such as company, date ranges, document number, current SDI state (`latest_state`), and free-text search (`q`). Use `ids` to fetch specific Send records in a single call (comma-separated, up to 100). Returns invoice metadata; set `include_payload` to true to include the full invoice content. **Send** invoices are outbound sales invoices transmitted to customers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/).
|
|
1019
1058
|
* @summary List invoices
|
|
1020
1059
|
* @param {number} [companyId] Company id
|
|
1021
1060
|
* @param {string} [identifier] SDI identifier.
|
|
@@ -1029,7 +1068,9 @@ export interface SendApiInterface {
|
|
|
1029
1068
|
* @param {string} [documentDateFrom] UTC ISO 8601 (2024-11-29T12:34:56Z)
|
|
1030
1069
|
* @param {string} [documentDateTo] UTC ISO 8601 (2024-11-29T12:34:56Z)
|
|
1031
1070
|
* @param {string} [documentNumber] Document number.
|
|
1071
|
+
* @param {SendGetLatestStateEnum} [latestState] Filter by the most recent SDI state for the invoice. Matches the `latest_state` field exposed inline on each Send.
|
|
1032
1072
|
* @param {boolean} [includePayload] Include payload in the response. Defaults to false.
|
|
1073
|
+
* @param {string} [ids] Comma-separated list of Send ids (max 100). Filters the collection to the matching rows; unknown or unauthorized ids are silently skipped.
|
|
1033
1074
|
* @param {number} [page] Page number.
|
|
1034
1075
|
* @param {number} [pageSize] Items per page. Cannot be greater than 200.
|
|
1035
1076
|
* @param {string} [sort] Sort by field. Prefix with \'-\' for descending order.
|
|
@@ -1037,7 +1078,7 @@ export interface SendApiInterface {
|
|
|
1037
1078
|
* @param {*} [options] Override http request option.
|
|
1038
1079
|
* @throws {RequiredError}
|
|
1039
1080
|
*/
|
|
1040
|
-
sendGet(companyId?: number, identifier?: string, committente?: string, prestatore?: string, fileName?: string, lastUpdateFrom?: string, lastUpdateTo?: string, dateSentFrom?: string, dateSentTo?: string, documentDateFrom?: string, documentDateTo?: string, documentNumber?: string, includePayload?: boolean, page?: number, pageSize?: number, sort?: string, q?: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<Send>>;
|
|
1081
|
+
sendGet(companyId?: number, identifier?: string, committente?: string, prestatore?: string, fileName?: string, lastUpdateFrom?: string, lastUpdateTo?: string, dateSentFrom?: string, dateSentTo?: string, documentDateFrom?: string, documentDateTo?: string, documentNumber?: string, latestState?: SendGetLatestStateEnum, includePayload?: boolean, ids?: string, page?: number, pageSize?: number, sort?: string, q?: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<Send>>;
|
|
1041
1082
|
|
|
1042
1083
|
/**
|
|
1043
1084
|
* Retrieve a send invoice by its internal id. The `id` is unique and assigned by the system when the invoice is created. Returns invoice metadata; set `include_payload` to true to include the full invoice content. **Send** invoices are outbound sales invoices transmitted to customers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/).
|
|
@@ -1069,26 +1110,28 @@ export interface SendApiInterface {
|
|
|
1069
1110
|
sendIdentifierGet(identifier: string, includePayload?: boolean, options?: RawAxiosRequestConfig): AxiosPromise<Send>;
|
|
1070
1111
|
|
|
1071
1112
|
/**
|
|
1072
|
-
* Add a new invoice using a FatturaPA JSON representation. The invoice will be signed (if requested), validated (if requested), and queued for delivery to SDI. Status updates from SDI will be available in the `update` endpoint. **Send** invoices are outbound sales invoices transmitted to customers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/). You can also upload invoices via the [Dashboard](https://dashboard.invoicetronic.com).
|
|
1113
|
+
* Add a new invoice using a FatturaPA JSON representation. Property names mirror the FatturaPA XML schema (PascalCase, e.g. `FatturaElettronicaHeader`). The invoice will be signed (if requested), validated (if requested), and queued for delivery to SDI. Status updates from SDI will be available in the `update` endpoint. **Send** invoices are outbound sales invoices transmitted to customers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/). You can also upload invoices via the [Dashboard](https://dashboard.invoicetronic.com). ### Idempotency To protect against duplicate submissions caused by network retries, you can send an optional `Idempotency-Key` header with any unique, client-generated value (up to 255 characters). - The first request with a given key is processed normally, and its response (status, body and `Location`) is stored for 24 hours. - Any subsequent request that reuses the same key within that window replays the original response instead of sending a second invoice to SDI. - If a request with the same key is still being processed, the retry receives `409 Conflict`. - If the same key is reused with a **different** invoice payload, the request is rejected with `422 Unprocessable Entity`: a given key must always map to the same request. Keys are scoped per account, so different accounts can use the same key value without interfering. If the idempotency store is temporarily unavailable, the request is processed normally without idempotency protection.
|
|
1073
1114
|
* @summary Add an invoice by json
|
|
1074
1115
|
* @param {object} body
|
|
1075
1116
|
* @param {boolean} [validate] Validate the document first, and reject it on failure.
|
|
1076
1117
|
* @param {SendJsonPostSignatureEnum} [signature] Whether to digitally sign the document.
|
|
1118
|
+
* @param {string} [idempotencyKey] Optional client-generated key that makes the submission idempotent. Retrying the same request with the same key within 24 hours returns the original response instead of creating a duplicate invoice.
|
|
1077
1119
|
* @param {*} [options] Override http request option.
|
|
1078
1120
|
* @throws {RequiredError}
|
|
1079
1121
|
*/
|
|
1080
|
-
sendJsonPost(body: object, validate?: boolean, signature?: SendJsonPostSignatureEnum, options?: RawAxiosRequestConfig): AxiosPromise<Send>;
|
|
1122
|
+
sendJsonPost(body: object, validate?: boolean, signature?: SendJsonPostSignatureEnum, idempotencyKey?: string, options?: RawAxiosRequestConfig): AxiosPromise<Send>;
|
|
1081
1123
|
|
|
1082
1124
|
/**
|
|
1083
|
-
* Add a new invoice using a structured Send object. The invoice will be signed (if requested), validated (if requested), and queued for delivery to SDI. Status updates from SDI will be available in the `update` endpoint. **Send** invoices are outbound sales invoices transmitted to customers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/). You can also upload invoices via the [Dashboard](https://dashboard.invoicetronic.com).
|
|
1125
|
+
* Add a new invoice using a structured Send object. The invoice will be signed (if requested), validated (if requested), and queued for delivery to SDI. Status updates from SDI will be available in the `update` endpoint. **Send** invoices are outbound sales invoices transmitted to customers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/). You can also upload invoices via the [Dashboard](https://dashboard.invoicetronic.com). ### Idempotency To protect against duplicate submissions caused by network retries, you can send an optional `Idempotency-Key` header with any unique, client-generated value (up to 255 characters). - The first request with a given key is processed normally, and its response (status, body and `Location`) is stored for 24 hours. - Any subsequent request that reuses the same key within that window replays the original response instead of sending a second invoice to SDI. - If a request with the same key is still being processed, the retry receives `409 Conflict`. - If the same key is reused with a **different** invoice payload, the request is rejected with `422 Unprocessable Entity`: a given key must always map to the same request. Keys are scoped per account, so different accounts can use the same key value without interfering. If the idempotency store is temporarily unavailable, the request is processed normally without idempotency protection.
|
|
1084
1126
|
* @summary Add an invoice
|
|
1085
1127
|
* @param {Send} send
|
|
1086
1128
|
* @param {boolean} [validate] Validate the document first, and reject it on failure.
|
|
1087
1129
|
* @param {SendPostSignatureEnum} [signature] Whether to digitally sign the document.
|
|
1130
|
+
* @param {string} [idempotencyKey] Optional client-generated key that makes the submission idempotent. Retrying the same request with the same key within 24 hours returns the original response instead of creating a duplicate invoice.
|
|
1088
1131
|
* @param {*} [options] Override http request option.
|
|
1089
1132
|
* @throws {RequiredError}
|
|
1090
1133
|
*/
|
|
1091
|
-
sendPost(send: Send, validate?: boolean, signature?: SendPostSignatureEnum, options?: RawAxiosRequestConfig): AxiosPromise<Send>;
|
|
1134
|
+
sendPost(send: Send, validate?: boolean, signature?: SendPostSignatureEnum, idempotencyKey?: string, options?: RawAxiosRequestConfig): AxiosPromise<Send>;
|
|
1092
1135
|
|
|
1093
1136
|
/**
|
|
1094
1137
|
* Validate an invoice file without sending it to SDI. Supported formats are XML (FatturaPA) and P7M (signed). Use this to check for errors before actual submission. Returns validation results with any errors found. **Send** invoices are outbound sales invoices transmitted to customers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/).
|
|
@@ -1100,7 +1143,7 @@ export interface SendApiInterface {
|
|
|
1100
1143
|
sendValidateFilePost(file: File, options?: RawAxiosRequestConfig): AxiosPromise<void>;
|
|
1101
1144
|
|
|
1102
1145
|
/**
|
|
1103
|
-
* Validate a JSON invoice without sending it to SDI. Use this to check for errors before actual submission. Returns validation results with any errors found. **Send** invoices are outbound sales invoices transmitted to customers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/).
|
|
1146
|
+
* Validate a FatturaPA JSON invoice without sending it to SDI. Property names mirror the FatturaPA XML schema (PascalCase, e.g. `FatturaElettronicaHeader`). Use this to check for errors before actual submission. Returns validation results with any errors found. **Send** invoices are outbound sales invoices transmitted to customers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/).
|
|
1104
1147
|
* @summary Validate an invoice by json
|
|
1105
1148
|
* @param {object} body
|
|
1106
1149
|
* @param {*} [options] Override http request option.
|
|
@@ -1127,15 +1170,16 @@ export interface SendApiInterface {
|
|
|
1127
1170
|
sendValidateXmlPost(body: object, options?: RawAxiosRequestConfig): AxiosPromise<void>;
|
|
1128
1171
|
|
|
1129
1172
|
/**
|
|
1130
|
-
* Add a new invoice using a raw XML document in FatturaPA format. The invoice will be signed (if requested), validated (if requested), and queued for delivery to SDI. Status updates from SDI will be available in the `update` endpoint. **Send** invoices are outbound sales invoices transmitted to customers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/). You can also upload invoices via the [Dashboard](https://dashboard.invoicetronic.com).
|
|
1173
|
+
* Add a new invoice using a raw XML document in FatturaPA format. The invoice will be signed (if requested), validated (if requested), and queued for delivery to SDI. Status updates from SDI will be available in the `update` endpoint. **Send** invoices are outbound sales invoices transmitted to customers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/). You can also upload invoices via the [Dashboard](https://dashboard.invoicetronic.com). ### Idempotency To protect against duplicate submissions caused by network retries, you can send an optional `Idempotency-Key` header with any unique, client-generated value (up to 255 characters). - The first request with a given key is processed normally, and its response (status, body and `Location`) is stored for 24 hours. - Any subsequent request that reuses the same key within that window replays the original response instead of sending a second invoice to SDI. - If a request with the same key is still being processed, the retry receives `409 Conflict`. - If the same key is reused with a **different** invoice payload, the request is rejected with `422 Unprocessable Entity`: a given key must always map to the same request. Keys are scoped per account, so different accounts can use the same key value without interfering. If the idempotency store is temporarily unavailable, the request is processed normally without idempotency protection.
|
|
1131
1174
|
* @summary Add an invoice by xml
|
|
1132
1175
|
* @param {object} body
|
|
1133
1176
|
* @param {boolean} [validate] Validate the document first, and reject it on failure.
|
|
1134
1177
|
* @param {SendXmlPostSignatureEnum} [signature] Whether to digitally sign the document.
|
|
1178
|
+
* @param {string} [idempotencyKey] Optional client-generated key that makes the submission idempotent. Retrying the same request with the same key within 24 hours returns the original response instead of creating a duplicate invoice.
|
|
1135
1179
|
* @param {*} [options] Override http request option.
|
|
1136
1180
|
* @throws {RequiredError}
|
|
1137
1181
|
*/
|
|
1138
|
-
sendXmlPost(body: object, validate?: boolean, signature?: SendXmlPostSignatureEnum, options?: RawAxiosRequestConfig): AxiosPromise<Send>;
|
|
1182
|
+
sendXmlPost(body: object, validate?: boolean, signature?: SendXmlPostSignatureEnum, idempotencyKey?: string, options?: RawAxiosRequestConfig): AxiosPromise<Send>;
|
|
1139
1183
|
|
|
1140
1184
|
}
|
|
1141
1185
|
|
|
@@ -1144,20 +1188,21 @@ export interface SendApiInterface {
|
|
|
1144
1188
|
*/
|
|
1145
1189
|
export class SendApi extends BaseAPI implements SendApiInterface {
|
|
1146
1190
|
/**
|
|
1147
|
-
* Add a new invoice by uploading a file. Supported formats are XML (FatturaPA) and P7M (signed). The invoice will be signed (if requested), validated (if requested), and queued for delivery to SDI. Status updates from SDI will be available in the `update` endpoint. **Send** invoices are outbound sales invoices transmitted to customers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/). You can also upload invoices via the [Dashboard](https://dashboard.invoicetronic.com).
|
|
1191
|
+
* Add a new invoice by uploading a file. Supported formats are XML (FatturaPA) and P7M (signed). The invoice will be signed (if requested), validated (if requested), and queued for delivery to SDI. Status updates from SDI will be available in the `update` endpoint. **Send** invoices are outbound sales invoices transmitted to customers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/). You can also upload invoices via the [Dashboard](https://dashboard.invoicetronic.com). ### Idempotency To protect against duplicate submissions caused by network retries, you can send an optional `Idempotency-Key` header with any unique, client-generated value (up to 255 characters). - The first request with a given key is processed normally, and its response (status, body and `Location`) is stored for 24 hours. - Any subsequent request that reuses the same key within that window replays the original response instead of sending a second invoice to SDI. - If a request with the same key is still being processed, the retry receives `409 Conflict`. - If the same key is reused with a **different** invoice payload, the request is rejected with `422 Unprocessable Entity`: a given key must always map to the same request. Keys are scoped per account, so different accounts can use the same key value without interfering. If the idempotency store is temporarily unavailable, the request is processed normally without idempotency protection.
|
|
1148
1192
|
* @summary Add an invoice by file
|
|
1149
1193
|
* @param {File} file
|
|
1150
1194
|
* @param {boolean} [validate] Validate the document first, and reject it on failure.
|
|
1151
1195
|
* @param {SendFilePostSignatureEnum} [signature] Whether to digitally sign the document.
|
|
1196
|
+
* @param {string} [idempotencyKey] Optional client-generated key that makes the submission idempotent. Retrying the same request with the same key within 24 hours returns the original response instead of creating a duplicate invoice.
|
|
1152
1197
|
* @param {*} [options] Override http request option.
|
|
1153
1198
|
* @throws {RequiredError}
|
|
1154
1199
|
*/
|
|
1155
|
-
public sendFilePost(file: File, validate?: boolean, signature?: SendFilePostSignatureEnum, options?: RawAxiosRequestConfig) {
|
|
1156
|
-
return SendApiFp(this.configuration).sendFilePost(file, validate, signature, options).then((request) => request(this.axios, this.basePath));
|
|
1200
|
+
public sendFilePost(file: File, validate?: boolean, signature?: SendFilePostSignatureEnum, idempotencyKey?: string, options?: RawAxiosRequestConfig) {
|
|
1201
|
+
return SendApiFp(this.configuration).sendFilePost(file, validate, signature, idempotencyKey, options).then((request) => request(this.axios, this.basePath));
|
|
1157
1202
|
}
|
|
1158
1203
|
|
|
1159
1204
|
/**
|
|
1160
|
-
* Retrieve a paginated list of send invoices. Results can be filtered by various criteria such as company, date ranges, document number, and free-text search (`q`). Returns invoice metadata; set `include_payload` to true to include the full invoice content. **Send** invoices are outbound sales invoices transmitted to customers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/).
|
|
1205
|
+
* Retrieve a paginated list of send invoices. Results can be filtered by various criteria such as company, date ranges, document number, current SDI state (`latest_state`), and free-text search (`q`). Use `ids` to fetch specific Send records in a single call (comma-separated, up to 100). Returns invoice metadata; set `include_payload` to true to include the full invoice content. **Send** invoices are outbound sales invoices transmitted to customers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/).
|
|
1161
1206
|
* @summary List invoices
|
|
1162
1207
|
* @param {number} [companyId] Company id
|
|
1163
1208
|
* @param {string} [identifier] SDI identifier.
|
|
@@ -1171,7 +1216,9 @@ export class SendApi extends BaseAPI implements SendApiInterface {
|
|
|
1171
1216
|
* @param {string} [documentDateFrom] UTC ISO 8601 (2024-11-29T12:34:56Z)
|
|
1172
1217
|
* @param {string} [documentDateTo] UTC ISO 8601 (2024-11-29T12:34:56Z)
|
|
1173
1218
|
* @param {string} [documentNumber] Document number.
|
|
1219
|
+
* @param {SendGetLatestStateEnum} [latestState] Filter by the most recent SDI state for the invoice. Matches the `latest_state` field exposed inline on each Send.
|
|
1174
1220
|
* @param {boolean} [includePayload] Include payload in the response. Defaults to false.
|
|
1221
|
+
* @param {string} [ids] Comma-separated list of Send ids (max 100). Filters the collection to the matching rows; unknown or unauthorized ids are silently skipped.
|
|
1175
1222
|
* @param {number} [page] Page number.
|
|
1176
1223
|
* @param {number} [pageSize] Items per page. Cannot be greater than 200.
|
|
1177
1224
|
* @param {string} [sort] Sort by field. Prefix with \'-\' for descending order.
|
|
@@ -1179,8 +1226,8 @@ export class SendApi extends BaseAPI implements SendApiInterface {
|
|
|
1179
1226
|
* @param {*} [options] Override http request option.
|
|
1180
1227
|
* @throws {RequiredError}
|
|
1181
1228
|
*/
|
|
1182
|
-
public sendGet(companyId?: number, identifier?: string, committente?: string, prestatore?: string, fileName?: string, lastUpdateFrom?: string, lastUpdateTo?: string, dateSentFrom?: string, dateSentTo?: string, documentDateFrom?: string, documentDateTo?: string, documentNumber?: string, includePayload?: boolean, page?: number, pageSize?: number, sort?: string, q?: string, options?: RawAxiosRequestConfig) {
|
|
1183
|
-
return SendApiFp(this.configuration).sendGet(companyId, identifier, committente, prestatore, fileName, lastUpdateFrom, lastUpdateTo, dateSentFrom, dateSentTo, documentDateFrom, documentDateTo, documentNumber, includePayload, page, pageSize, sort, q, options).then((request) => request(this.axios, this.basePath));
|
|
1229
|
+
public sendGet(companyId?: number, identifier?: string, committente?: string, prestatore?: string, fileName?: string, lastUpdateFrom?: string, lastUpdateTo?: string, dateSentFrom?: string, dateSentTo?: string, documentDateFrom?: string, documentDateTo?: string, documentNumber?: string, latestState?: SendGetLatestStateEnum, includePayload?: boolean, ids?: string, page?: number, pageSize?: number, sort?: string, q?: string, options?: RawAxiosRequestConfig) {
|
|
1230
|
+
return SendApiFp(this.configuration).sendGet(companyId, identifier, committente, prestatore, fileName, lastUpdateFrom, lastUpdateTo, dateSentFrom, dateSentTo, documentDateFrom, documentDateTo, documentNumber, latestState, includePayload, ids, page, pageSize, sort, q, options).then((request) => request(this.axios, this.basePath));
|
|
1184
1231
|
}
|
|
1185
1232
|
|
|
1186
1233
|
/**
|
|
@@ -1219,29 +1266,31 @@ export class SendApi extends BaseAPI implements SendApiInterface {
|
|
|
1219
1266
|
}
|
|
1220
1267
|
|
|
1221
1268
|
/**
|
|
1222
|
-
* Add a new invoice using a FatturaPA JSON representation. The invoice will be signed (if requested), validated (if requested), and queued for delivery to SDI. Status updates from SDI will be available in the `update` endpoint. **Send** invoices are outbound sales invoices transmitted to customers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/). You can also upload invoices via the [Dashboard](https://dashboard.invoicetronic.com).
|
|
1269
|
+
* Add a new invoice using a FatturaPA JSON representation. Property names mirror the FatturaPA XML schema (PascalCase, e.g. `FatturaElettronicaHeader`). The invoice will be signed (if requested), validated (if requested), and queued for delivery to SDI. Status updates from SDI will be available in the `update` endpoint. **Send** invoices are outbound sales invoices transmitted to customers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/). You can also upload invoices via the [Dashboard](https://dashboard.invoicetronic.com). ### Idempotency To protect against duplicate submissions caused by network retries, you can send an optional `Idempotency-Key` header with any unique, client-generated value (up to 255 characters). - The first request with a given key is processed normally, and its response (status, body and `Location`) is stored for 24 hours. - Any subsequent request that reuses the same key within that window replays the original response instead of sending a second invoice to SDI. - If a request with the same key is still being processed, the retry receives `409 Conflict`. - If the same key is reused with a **different** invoice payload, the request is rejected with `422 Unprocessable Entity`: a given key must always map to the same request. Keys are scoped per account, so different accounts can use the same key value without interfering. If the idempotency store is temporarily unavailable, the request is processed normally without idempotency protection.
|
|
1223
1270
|
* @summary Add an invoice by json
|
|
1224
1271
|
* @param {object} body
|
|
1225
1272
|
* @param {boolean} [validate] Validate the document first, and reject it on failure.
|
|
1226
1273
|
* @param {SendJsonPostSignatureEnum} [signature] Whether to digitally sign the document.
|
|
1274
|
+
* @param {string} [idempotencyKey] Optional client-generated key that makes the submission idempotent. Retrying the same request with the same key within 24 hours returns the original response instead of creating a duplicate invoice.
|
|
1227
1275
|
* @param {*} [options] Override http request option.
|
|
1228
1276
|
* @throws {RequiredError}
|
|
1229
1277
|
*/
|
|
1230
|
-
public sendJsonPost(body: object, validate?: boolean, signature?: SendJsonPostSignatureEnum, options?: RawAxiosRequestConfig) {
|
|
1231
|
-
return SendApiFp(this.configuration).sendJsonPost(body, validate, signature, options).then((request) => request(this.axios, this.basePath));
|
|
1278
|
+
public sendJsonPost(body: object, validate?: boolean, signature?: SendJsonPostSignatureEnum, idempotencyKey?: string, options?: RawAxiosRequestConfig) {
|
|
1279
|
+
return SendApiFp(this.configuration).sendJsonPost(body, validate, signature, idempotencyKey, options).then((request) => request(this.axios, this.basePath));
|
|
1232
1280
|
}
|
|
1233
1281
|
|
|
1234
1282
|
/**
|
|
1235
|
-
* Add a new invoice using a structured Send object. The invoice will be signed (if requested), validated (if requested), and queued for delivery to SDI. Status updates from SDI will be available in the `update` endpoint. **Send** invoices are outbound sales invoices transmitted to customers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/). You can also upload invoices via the [Dashboard](https://dashboard.invoicetronic.com).
|
|
1283
|
+
* Add a new invoice using a structured Send object. The invoice will be signed (if requested), validated (if requested), and queued for delivery to SDI. Status updates from SDI will be available in the `update` endpoint. **Send** invoices are outbound sales invoices transmitted to customers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/). You can also upload invoices via the [Dashboard](https://dashboard.invoicetronic.com). ### Idempotency To protect against duplicate submissions caused by network retries, you can send an optional `Idempotency-Key` header with any unique, client-generated value (up to 255 characters). - The first request with a given key is processed normally, and its response (status, body and `Location`) is stored for 24 hours. - Any subsequent request that reuses the same key within that window replays the original response instead of sending a second invoice to SDI. - If a request with the same key is still being processed, the retry receives `409 Conflict`. - If the same key is reused with a **different** invoice payload, the request is rejected with `422 Unprocessable Entity`: a given key must always map to the same request. Keys are scoped per account, so different accounts can use the same key value without interfering. If the idempotency store is temporarily unavailable, the request is processed normally without idempotency protection.
|
|
1236
1284
|
* @summary Add an invoice
|
|
1237
1285
|
* @param {Send} send
|
|
1238
1286
|
* @param {boolean} [validate] Validate the document first, and reject it on failure.
|
|
1239
1287
|
* @param {SendPostSignatureEnum} [signature] Whether to digitally sign the document.
|
|
1288
|
+
* @param {string} [idempotencyKey] Optional client-generated key that makes the submission idempotent. Retrying the same request with the same key within 24 hours returns the original response instead of creating a duplicate invoice.
|
|
1240
1289
|
* @param {*} [options] Override http request option.
|
|
1241
1290
|
* @throws {RequiredError}
|
|
1242
1291
|
*/
|
|
1243
|
-
public sendPost(send: Send, validate?: boolean, signature?: SendPostSignatureEnum, options?: RawAxiosRequestConfig) {
|
|
1244
|
-
return SendApiFp(this.configuration).sendPost(send, validate, signature, options).then((request) => request(this.axios, this.basePath));
|
|
1292
|
+
public sendPost(send: Send, validate?: boolean, signature?: SendPostSignatureEnum, idempotencyKey?: string, options?: RawAxiosRequestConfig) {
|
|
1293
|
+
return SendApiFp(this.configuration).sendPost(send, validate, signature, idempotencyKey, options).then((request) => request(this.axios, this.basePath));
|
|
1245
1294
|
}
|
|
1246
1295
|
|
|
1247
1296
|
/**
|
|
@@ -1256,7 +1305,7 @@ export class SendApi extends BaseAPI implements SendApiInterface {
|
|
|
1256
1305
|
}
|
|
1257
1306
|
|
|
1258
1307
|
/**
|
|
1259
|
-
* Validate a JSON invoice without sending it to SDI. Use this to check for errors before actual submission. Returns validation results with any errors found. **Send** invoices are outbound sales invoices transmitted to customers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/).
|
|
1308
|
+
* Validate a FatturaPA JSON invoice without sending it to SDI. Property names mirror the FatturaPA XML schema (PascalCase, e.g. `FatturaElettronicaHeader`). Use this to check for errors before actual submission. Returns validation results with any errors found. **Send** invoices are outbound sales invoices transmitted to customers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/).
|
|
1260
1309
|
* @summary Validate an invoice by json
|
|
1261
1310
|
* @param {object} body
|
|
1262
1311
|
* @param {*} [options] Override http request option.
|
|
@@ -1289,16 +1338,17 @@ export class SendApi extends BaseAPI implements SendApiInterface {
|
|
|
1289
1338
|
}
|
|
1290
1339
|
|
|
1291
1340
|
/**
|
|
1292
|
-
* Add a new invoice using a raw XML document in FatturaPA format. The invoice will be signed (if requested), validated (if requested), and queued for delivery to SDI. Status updates from SDI will be available in the `update` endpoint. **Send** invoices are outbound sales invoices transmitted to customers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/). You can also upload invoices via the [Dashboard](https://dashboard.invoicetronic.com).
|
|
1341
|
+
* Add a new invoice using a raw XML document in FatturaPA format. The invoice will be signed (if requested), validated (if requested), and queued for delivery to SDI. Status updates from SDI will be available in the `update` endpoint. **Send** invoices are outbound sales invoices transmitted to customers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/). You can also upload invoices via the [Dashboard](https://dashboard.invoicetronic.com). ### Idempotency To protect against duplicate submissions caused by network retries, you can send an optional `Idempotency-Key` header with any unique, client-generated value (up to 255 characters). - The first request with a given key is processed normally, and its response (status, body and `Location`) is stored for 24 hours. - Any subsequent request that reuses the same key within that window replays the original response instead of sending a second invoice to SDI. - If a request with the same key is still being processed, the retry receives `409 Conflict`. - If the same key is reused with a **different** invoice payload, the request is rejected with `422 Unprocessable Entity`: a given key must always map to the same request. Keys are scoped per account, so different accounts can use the same key value without interfering. If the idempotency store is temporarily unavailable, the request is processed normally without idempotency protection.
|
|
1293
1342
|
* @summary Add an invoice by xml
|
|
1294
1343
|
* @param {object} body
|
|
1295
1344
|
* @param {boolean} [validate] Validate the document first, and reject it on failure.
|
|
1296
1345
|
* @param {SendXmlPostSignatureEnum} [signature] Whether to digitally sign the document.
|
|
1346
|
+
* @param {string} [idempotencyKey] Optional client-generated key that makes the submission idempotent. Retrying the same request with the same key within 24 hours returns the original response instead of creating a duplicate invoice.
|
|
1297
1347
|
* @param {*} [options] Override http request option.
|
|
1298
1348
|
* @throws {RequiredError}
|
|
1299
1349
|
*/
|
|
1300
|
-
public sendXmlPost(body: object, validate?: boolean, signature?: SendXmlPostSignatureEnum, options?: RawAxiosRequestConfig) {
|
|
1301
|
-
return SendApiFp(this.configuration).sendXmlPost(body, validate, signature, options).then((request) => request(this.axios, this.basePath));
|
|
1350
|
+
public sendXmlPost(body: object, validate?: boolean, signature?: SendXmlPostSignatureEnum, idempotencyKey?: string, options?: RawAxiosRequestConfig) {
|
|
1351
|
+
return SendApiFp(this.configuration).sendXmlPost(body, validate, signature, idempotencyKey, options).then((request) => request(this.axios, this.basePath));
|
|
1302
1352
|
}
|
|
1303
1353
|
}
|
|
1304
1354
|
|
|
@@ -1309,6 +1359,18 @@ export const SendFilePostSignatureEnum = {
|
|
|
1309
1359
|
Auto: 'Auto'
|
|
1310
1360
|
} as const;
|
|
1311
1361
|
export type SendFilePostSignatureEnum = typeof SendFilePostSignatureEnum[keyof typeof SendFilePostSignatureEnum];
|
|
1362
|
+
export const SendGetLatestStateEnum = {
|
|
1363
|
+
Inviato: 'Inviato',
|
|
1364
|
+
Consegnato: 'Consegnato',
|
|
1365
|
+
NonConsegnato: 'NonConsegnato',
|
|
1366
|
+
Scartato: 'Scartato',
|
|
1367
|
+
AccettatoDalDestinatario: 'AccettatoDalDestinatario',
|
|
1368
|
+
RifiutatoDalDestinatario: 'RifiutatoDalDestinatario',
|
|
1369
|
+
ImpossibilitaDiRecapito: 'ImpossibilitaDiRecapito',
|
|
1370
|
+
DecorrenzaTermini: 'DecorrenzaTermini',
|
|
1371
|
+
AttestazioneTrasmissioneFattura: 'AttestazioneTrasmissioneFattura'
|
|
1372
|
+
} as const;
|
|
1373
|
+
export type SendGetLatestStateEnum = typeof SendGetLatestStateEnum[keyof typeof SendGetLatestStateEnum];
|
|
1312
1374
|
export const SendJsonPostSignatureEnum = {
|
|
1313
1375
|
None: 'None',
|
|
1314
1376
|
Apply: 'Apply',
|