@invoicetronic/ts-sdk 1.8.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 +2 -2
- package/dist/esm/src/api/receive-api.js +2 -2
- package/dist/esm/src/api/send-api.d.ts +94 -57
- package/dist/esm/src/api/send-api.js +107 -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 +2 -2
- 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 +2 -2
- 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 +2 -2
- package/dist/esm/src/models/receive.js +2 -2
- package/dist/esm/src/models/send-reduced.d.ts +2 -2
- package/dist/esm/src/models/send-reduced.js +2 -2
- package/dist/esm/src/models/send.d.ts +2 -2
- package/dist/esm/src/models/send.js +2 -2
- package/dist/esm/src/models/status.d.ts +2 -2
- package/dist/esm/src/models/status.js +2 -2
- package/dist/esm/src/models/update.d.ts +2 -2
- package/dist/esm/src/models/update.js +2 -2
- package/dist/esm/src/models/web-hook-history.d.ts +2 -2
- package/dist/esm/src/models/web-hook-history.js +2 -2
- package/dist/esm/src/models/web-hook.d.ts +2 -2
- 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 +2 -2
- package/dist/src/api/receive-api.js +2 -2
- package/dist/src/api/send-api.d.ts +94 -57
- package/dist/src/api/send-api.js +108 -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 +2 -2
- 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 +2 -2
- 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 +2 -2
- package/dist/src/models/receive.js +2 -2
- package/dist/src/models/send-reduced.d.ts +2 -2
- package/dist/src/models/send-reduced.js +2 -2
- package/dist/src/models/send.d.ts +2 -2
- package/dist/src/models/send.js +2 -2
- package/dist/src/models/status.d.ts +2 -2
- package/dist/src/models/status.js +2 -2
- package/dist/src/models/update.d.ts +2 -2
- package/dist/src/models/update.js +2 -2
- package/dist/src/models/web-hook-history.d.ts +2 -2
- package/dist/src/models/web-hook-history.js +2 -2
- package/dist/src/models/web-hook.d.ts +2 -2
- package/dist/src/models/web-hook.js +2 -2
- package/docs/SendApi.md +25 -10
- 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 +2 -2
- package/src/api/send-api.ts +125 -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 +2 -2
- package/src/models/document-data.ts +2 -2
- package/src/models/event.ts +2 -2
- package/src/models/model-error.ts +2 -2
- package/src/models/problem-details.ts +2 -2
- package/src/models/receive.ts +2 -2
- package/src/models/send-reduced.ts +2 -2
- package/src/models/send.ts +2 -2
- package/src/models/status.ts +2 -2
- package/src/models/update.ts +2 -2
- package/src/models/web-hook-history.ts +2 -2
- package/src/models/web-hook.ts +2 -2
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`). 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/).
|
|
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,6 +106,7 @@ 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.
|
|
106
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.
|
|
107
112
|
* @param {number} [page] Page number.
|
|
@@ -111,7 +116,7 @@ export const SendApiAxiosParamCreator = function (configuration?: Configuration)
|
|
|
111
116
|
* @param {*} [options] Override http request option.
|
|
112
117
|
* @throws {RequiredError}
|
|
113
118
|
*/
|
|
114
|
-
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, ids?: string, 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> => {
|
|
115
120
|
const localVarPath = `/send`;
|
|
116
121
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
117
122
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -188,6 +193,10 @@ export const SendApiAxiosParamCreator = function (configuration?: Configuration)
|
|
|
188
193
|
localVarQueryParameter['document_number'] = documentNumber;
|
|
189
194
|
}
|
|
190
195
|
|
|
196
|
+
if (latestState !== undefined) {
|
|
197
|
+
localVarQueryParameter['latest_state'] = latestState;
|
|
198
|
+
}
|
|
199
|
+
|
|
191
200
|
if (includePayload !== undefined) {
|
|
192
201
|
localVarQueryParameter['include_payload'] = includePayload;
|
|
193
202
|
}
|
|
@@ -348,15 +357,16 @@ export const SendApiAxiosParamCreator = function (configuration?: Configuration)
|
|
|
348
357
|
};
|
|
349
358
|
},
|
|
350
359
|
/**
|
|
351
|
-
* 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.
|
|
352
361
|
* @summary Add an invoice by json
|
|
353
362
|
* @param {object} body
|
|
354
363
|
* @param {boolean} [validate] Validate the document first, and reject it on failure.
|
|
355
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.
|
|
356
366
|
* @param {*} [options] Override http request option.
|
|
357
367
|
* @throws {RequiredError}
|
|
358
368
|
*/
|
|
359
|
-
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> => {
|
|
360
370
|
// verify required parameter 'body' is not null or undefined
|
|
361
371
|
assertParamExists('sendJsonPost', 'body', body)
|
|
362
372
|
const localVarPath = `/send/json`;
|
|
@@ -386,6 +396,9 @@ export const SendApiAxiosParamCreator = function (configuration?: Configuration)
|
|
|
386
396
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
387
397
|
localVarHeaderParameter['Accept'] = 'application/json';
|
|
388
398
|
|
|
399
|
+
if (idempotencyKey != null) {
|
|
400
|
+
localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey);
|
|
401
|
+
}
|
|
389
402
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
390
403
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
391
404
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
@@ -397,15 +410,16 @@ export const SendApiAxiosParamCreator = function (configuration?: Configuration)
|
|
|
397
410
|
};
|
|
398
411
|
},
|
|
399
412
|
/**
|
|
400
|
-
* 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.
|
|
401
414
|
* @summary Add an invoice
|
|
402
415
|
* @param {Send} send
|
|
403
416
|
* @param {boolean} [validate] Validate the document first, and reject it on failure.
|
|
404
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.
|
|
405
419
|
* @param {*} [options] Override http request option.
|
|
406
420
|
* @throws {RequiredError}
|
|
407
421
|
*/
|
|
408
|
-
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> => {
|
|
409
423
|
// verify required parameter 'send' is not null or undefined
|
|
410
424
|
assertParamExists('sendPost', 'send', send)
|
|
411
425
|
const localVarPath = `/send`;
|
|
@@ -435,6 +449,9 @@ export const SendApiAxiosParamCreator = function (configuration?: Configuration)
|
|
|
435
449
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
436
450
|
localVarHeaderParameter['Accept'] = 'application/json';
|
|
437
451
|
|
|
452
|
+
if (idempotencyKey != null) {
|
|
453
|
+
localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey);
|
|
454
|
+
}
|
|
438
455
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
439
456
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
440
457
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
@@ -490,7 +507,7 @@ export const SendApiAxiosParamCreator = function (configuration?: Configuration)
|
|
|
490
507
|
};
|
|
491
508
|
},
|
|
492
509
|
/**
|
|
493
|
-
* 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/).
|
|
494
511
|
* @summary Validate an invoice by json
|
|
495
512
|
* @param {object} body
|
|
496
513
|
* @param {*} [options] Override http request option.
|
|
@@ -607,15 +624,16 @@ export const SendApiAxiosParamCreator = function (configuration?: Configuration)
|
|
|
607
624
|
};
|
|
608
625
|
},
|
|
609
626
|
/**
|
|
610
|
-
* 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.
|
|
611
628
|
* @summary Add an invoice by xml
|
|
612
629
|
* @param {object} body
|
|
613
630
|
* @param {boolean} [validate] Validate the document first, and reject it on failure.
|
|
614
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.
|
|
615
633
|
* @param {*} [options] Override http request option.
|
|
616
634
|
* @throws {RequiredError}
|
|
617
635
|
*/
|
|
618
|
-
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> => {
|
|
619
637
|
// verify required parameter 'body' is not null or undefined
|
|
620
638
|
assertParamExists('sendXmlPost', 'body', body)
|
|
621
639
|
const localVarPath = `/send/xml`;
|
|
@@ -645,6 +663,9 @@ export const SendApiAxiosParamCreator = function (configuration?: Configuration)
|
|
|
645
663
|
localVarHeaderParameter['Content-Type'] = 'application/xml';
|
|
646
664
|
localVarHeaderParameter['Accept'] = 'application/json';
|
|
647
665
|
|
|
666
|
+
if (idempotencyKey != null) {
|
|
667
|
+
localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey);
|
|
668
|
+
}
|
|
648
669
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
649
670
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
650
671
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
@@ -665,22 +686,23 @@ export const SendApiFp = function(configuration?: Configuration) {
|
|
|
665
686
|
const localVarAxiosParamCreator = SendApiAxiosParamCreator(configuration)
|
|
666
687
|
return {
|
|
667
688
|
/**
|
|
668
|
-
* 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.
|
|
669
690
|
* @summary Add an invoice by file
|
|
670
691
|
* @param {File} file
|
|
671
692
|
* @param {boolean} [validate] Validate the document first, and reject it on failure.
|
|
672
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.
|
|
673
695
|
* @param {*} [options] Override http request option.
|
|
674
696
|
* @throws {RequiredError}
|
|
675
697
|
*/
|
|
676
|
-
async sendFilePost(file: File, validate?: boolean, signature?: SendFilePostSignatureEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Send>> {
|
|
677
|
-
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);
|
|
678
700
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
679
701
|
const localVarOperationServerBasePath = operationServerMap['SendApi.sendFilePost']?.[localVarOperationServerIndex]?.url;
|
|
680
702
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
681
703
|
},
|
|
682
704
|
/**
|
|
683
|
-
* 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`). 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/).
|
|
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/).
|
|
684
706
|
* @summary List invoices
|
|
685
707
|
* @param {number} [companyId] Company id
|
|
686
708
|
* @param {string} [identifier] SDI identifier.
|
|
@@ -694,6 +716,7 @@ export const SendApiFp = function(configuration?: Configuration) {
|
|
|
694
716
|
* @param {string} [documentDateFrom] UTC ISO 8601 (2024-11-29T12:34:56Z)
|
|
695
717
|
* @param {string} [documentDateTo] UTC ISO 8601 (2024-11-29T12:34:56Z)
|
|
696
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.
|
|
697
720
|
* @param {boolean} [includePayload] Include payload in the response. Defaults to false.
|
|
698
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.
|
|
699
722
|
* @param {number} [page] Page number.
|
|
@@ -703,8 +726,8 @@ export const SendApiFp = function(configuration?: Configuration) {
|
|
|
703
726
|
* @param {*} [options] Override http request option.
|
|
704
727
|
* @throws {RequiredError}
|
|
705
728
|
*/
|
|
706
|
-
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, ids?: string, page?: number, pageSize?: number, sort?: string, q?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Send>>> {
|
|
707
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.sendGet(companyId, identifier, committente, prestatore, fileName, lastUpdateFrom, lastUpdateTo, dateSentFrom, dateSentTo, documentDateFrom, documentDateTo, documentNumber, includePayload, ids, 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);
|
|
708
731
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
709
732
|
const localVarOperationServerBasePath = operationServerMap['SendApi.sendGet']?.[localVarOperationServerIndex]?.url;
|
|
710
733
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
@@ -751,31 +774,33 @@ export const SendApiFp = function(configuration?: Configuration) {
|
|
|
751
774
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
752
775
|
},
|
|
753
776
|
/**
|
|
754
|
-
* 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.
|
|
755
778
|
* @summary Add an invoice by json
|
|
756
779
|
* @param {object} body
|
|
757
780
|
* @param {boolean} [validate] Validate the document first, and reject it on failure.
|
|
758
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.
|
|
759
783
|
* @param {*} [options] Override http request option.
|
|
760
784
|
* @throws {RequiredError}
|
|
761
785
|
*/
|
|
762
|
-
async sendJsonPost(body: object, validate?: boolean, signature?: SendJsonPostSignatureEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Send>> {
|
|
763
|
-
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);
|
|
764
788
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
765
789
|
const localVarOperationServerBasePath = operationServerMap['SendApi.sendJsonPost']?.[localVarOperationServerIndex]?.url;
|
|
766
790
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
767
791
|
},
|
|
768
792
|
/**
|
|
769
|
-
* 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.
|
|
770
794
|
* @summary Add an invoice
|
|
771
795
|
* @param {Send} send
|
|
772
796
|
* @param {boolean} [validate] Validate the document first, and reject it on failure.
|
|
773
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.
|
|
774
799
|
* @param {*} [options] Override http request option.
|
|
775
800
|
* @throws {RequiredError}
|
|
776
801
|
*/
|
|
777
|
-
async sendPost(send: Send, validate?: boolean, signature?: SendPostSignatureEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Send>> {
|
|
778
|
-
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);
|
|
779
804
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
780
805
|
const localVarOperationServerBasePath = operationServerMap['SendApi.sendPost']?.[localVarOperationServerIndex]?.url;
|
|
781
806
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
@@ -794,7 +819,7 @@ export const SendApiFp = function(configuration?: Configuration) {
|
|
|
794
819
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
795
820
|
},
|
|
796
821
|
/**
|
|
797
|
-
* 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/).
|
|
798
823
|
* @summary Validate an invoice by json
|
|
799
824
|
* @param {object} body
|
|
800
825
|
* @param {*} [options] Override http request option.
|
|
@@ -833,16 +858,17 @@ export const SendApiFp = function(configuration?: Configuration) {
|
|
|
833
858
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
834
859
|
},
|
|
835
860
|
/**
|
|
836
|
-
* 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.
|
|
837
862
|
* @summary Add an invoice by xml
|
|
838
863
|
* @param {object} body
|
|
839
864
|
* @param {boolean} [validate] Validate the document first, and reject it on failure.
|
|
840
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.
|
|
841
867
|
* @param {*} [options] Override http request option.
|
|
842
868
|
* @throws {RequiredError}
|
|
843
869
|
*/
|
|
844
|
-
async sendXmlPost(body: object, validate?: boolean, signature?: SendXmlPostSignatureEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Send>> {
|
|
845
|
-
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);
|
|
846
872
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
847
873
|
const localVarOperationServerBasePath = operationServerMap['SendApi.sendXmlPost']?.[localVarOperationServerIndex]?.url;
|
|
848
874
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
@@ -857,19 +883,20 @@ export const SendApiFactory = function (configuration?: Configuration, basePath?
|
|
|
857
883
|
const localVarFp = SendApiFp(configuration)
|
|
858
884
|
return {
|
|
859
885
|
/**
|
|
860
|
-
* 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.
|
|
861
887
|
* @summary Add an invoice by file
|
|
862
888
|
* @param {File} file
|
|
863
889
|
* @param {boolean} [validate] Validate the document first, and reject it on failure.
|
|
864
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.
|
|
865
892
|
* @param {*} [options] Override http request option.
|
|
866
893
|
* @throws {RequiredError}
|
|
867
894
|
*/
|
|
868
|
-
sendFilePost(file: File, validate?: boolean, signature?: SendFilePostSignatureEnum, options?: RawAxiosRequestConfig): AxiosPromise<Send> {
|
|
869
|
-
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));
|
|
870
897
|
},
|
|
871
898
|
/**
|
|
872
|
-
* 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`). 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/).
|
|
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/).
|
|
873
900
|
* @summary List invoices
|
|
874
901
|
* @param {number} [companyId] Company id
|
|
875
902
|
* @param {string} [identifier] SDI identifier.
|
|
@@ -883,6 +910,7 @@ export const SendApiFactory = function (configuration?: Configuration, basePath?
|
|
|
883
910
|
* @param {string} [documentDateFrom] UTC ISO 8601 (2024-11-29T12:34:56Z)
|
|
884
911
|
* @param {string} [documentDateTo] UTC ISO 8601 (2024-11-29T12:34:56Z)
|
|
885
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.
|
|
886
914
|
* @param {boolean} [includePayload] Include payload in the response. Defaults to false.
|
|
887
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.
|
|
888
916
|
* @param {number} [page] Page number.
|
|
@@ -892,8 +920,8 @@ export const SendApiFactory = function (configuration?: Configuration, basePath?
|
|
|
892
920
|
* @param {*} [options] Override http request option.
|
|
893
921
|
* @throws {RequiredError}
|
|
894
922
|
*/
|
|
895
|
-
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, ids?: string, page?: number, pageSize?: number, sort?: string, q?: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<Send>> {
|
|
896
|
-
return localVarFp.sendGet(companyId, identifier, committente, prestatore, fileName, lastUpdateFrom, lastUpdateTo, dateSentFrom, dateSentTo, documentDateFrom, documentDateTo, documentNumber, includePayload, ids, 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));
|
|
897
925
|
},
|
|
898
926
|
/**
|
|
899
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/).
|
|
@@ -928,28 +956,30 @@ export const SendApiFactory = function (configuration?: Configuration, basePath?
|
|
|
928
956
|
return localVarFp.sendIdentifierGet(identifier, includePayload, options).then((request) => request(axios, basePath));
|
|
929
957
|
},
|
|
930
958
|
/**
|
|
931
|
-
* 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.
|
|
932
960
|
* @summary Add an invoice by json
|
|
933
961
|
* @param {object} body
|
|
934
962
|
* @param {boolean} [validate] Validate the document first, and reject it on failure.
|
|
935
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.
|
|
936
965
|
* @param {*} [options] Override http request option.
|
|
937
966
|
* @throws {RequiredError}
|
|
938
967
|
*/
|
|
939
|
-
sendJsonPost(body: object, validate?: boolean, signature?: SendJsonPostSignatureEnum, options?: RawAxiosRequestConfig): AxiosPromise<Send> {
|
|
940
|
-
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));
|
|
941
970
|
},
|
|
942
971
|
/**
|
|
943
|
-
* 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.
|
|
944
973
|
* @summary Add an invoice
|
|
945
974
|
* @param {Send} send
|
|
946
975
|
* @param {boolean} [validate] Validate the document first, and reject it on failure.
|
|
947
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.
|
|
948
978
|
* @param {*} [options] Override http request option.
|
|
949
979
|
* @throws {RequiredError}
|
|
950
980
|
*/
|
|
951
|
-
sendPost(send: Send, validate?: boolean, signature?: SendPostSignatureEnum, options?: RawAxiosRequestConfig): AxiosPromise<Send> {
|
|
952
|
-
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));
|
|
953
983
|
},
|
|
954
984
|
/**
|
|
955
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/).
|
|
@@ -962,7 +992,7 @@ export const SendApiFactory = function (configuration?: Configuration, basePath?
|
|
|
962
992
|
return localVarFp.sendValidateFilePost(file, options).then((request) => request(axios, basePath));
|
|
963
993
|
},
|
|
964
994
|
/**
|
|
965
|
-
* 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/).
|
|
966
996
|
* @summary Validate an invoice by json
|
|
967
997
|
* @param {object} body
|
|
968
998
|
* @param {*} [options] Override http request option.
|
|
@@ -992,16 +1022,17 @@ export const SendApiFactory = function (configuration?: Configuration, basePath?
|
|
|
992
1022
|
return localVarFp.sendValidateXmlPost(body, options).then((request) => request(axios, basePath));
|
|
993
1023
|
},
|
|
994
1024
|
/**
|
|
995
|
-
* 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.
|
|
996
1026
|
* @summary Add an invoice by xml
|
|
997
1027
|
* @param {object} body
|
|
998
1028
|
* @param {boolean} [validate] Validate the document first, and reject it on failure.
|
|
999
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.
|
|
1000
1031
|
* @param {*} [options] Override http request option.
|
|
1001
1032
|
* @throws {RequiredError}
|
|
1002
1033
|
*/
|
|
1003
|
-
sendXmlPost(body: object, validate?: boolean, signature?: SendXmlPostSignatureEnum, options?: RawAxiosRequestConfig): AxiosPromise<Send> {
|
|
1004
|
-
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));
|
|
1005
1036
|
},
|
|
1006
1037
|
};
|
|
1007
1038
|
};
|
|
@@ -1011,18 +1042,19 @@ export const SendApiFactory = function (configuration?: Configuration, basePath?
|
|
|
1011
1042
|
*/
|
|
1012
1043
|
export interface SendApiInterface {
|
|
1013
1044
|
/**
|
|
1014
|
-
* 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.
|
|
1015
1046
|
* @summary Add an invoice by file
|
|
1016
1047
|
* @param {File} file
|
|
1017
1048
|
* @param {boolean} [validate] Validate the document first, and reject it on failure.
|
|
1018
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.
|
|
1019
1051
|
* @param {*} [options] Override http request option.
|
|
1020
1052
|
* @throws {RequiredError}
|
|
1021
1053
|
*/
|
|
1022
|
-
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>;
|
|
1023
1055
|
|
|
1024
1056
|
/**
|
|
1025
|
-
* 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`). 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/).
|
|
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/).
|
|
1026
1058
|
* @summary List invoices
|
|
1027
1059
|
* @param {number} [companyId] Company id
|
|
1028
1060
|
* @param {string} [identifier] SDI identifier.
|
|
@@ -1036,6 +1068,7 @@ export interface SendApiInterface {
|
|
|
1036
1068
|
* @param {string} [documentDateFrom] UTC ISO 8601 (2024-11-29T12:34:56Z)
|
|
1037
1069
|
* @param {string} [documentDateTo] UTC ISO 8601 (2024-11-29T12:34:56Z)
|
|
1038
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.
|
|
1039
1072
|
* @param {boolean} [includePayload] Include payload in the response. Defaults to false.
|
|
1040
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.
|
|
1041
1074
|
* @param {number} [page] Page number.
|
|
@@ -1045,7 +1078,7 @@ export interface SendApiInterface {
|
|
|
1045
1078
|
* @param {*} [options] Override http request option.
|
|
1046
1079
|
* @throws {RequiredError}
|
|
1047
1080
|
*/
|
|
1048
|
-
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, ids?: string, 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>>;
|
|
1049
1082
|
|
|
1050
1083
|
/**
|
|
1051
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/).
|
|
@@ -1077,26 +1110,28 @@ export interface SendApiInterface {
|
|
|
1077
1110
|
sendIdentifierGet(identifier: string, includePayload?: boolean, options?: RawAxiosRequestConfig): AxiosPromise<Send>;
|
|
1078
1111
|
|
|
1079
1112
|
/**
|
|
1080
|
-
* 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.
|
|
1081
1114
|
* @summary Add an invoice by json
|
|
1082
1115
|
* @param {object} body
|
|
1083
1116
|
* @param {boolean} [validate] Validate the document first, and reject it on failure.
|
|
1084
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.
|
|
1085
1119
|
* @param {*} [options] Override http request option.
|
|
1086
1120
|
* @throws {RequiredError}
|
|
1087
1121
|
*/
|
|
1088
|
-
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>;
|
|
1089
1123
|
|
|
1090
1124
|
/**
|
|
1091
|
-
* 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.
|
|
1092
1126
|
* @summary Add an invoice
|
|
1093
1127
|
* @param {Send} send
|
|
1094
1128
|
* @param {boolean} [validate] Validate the document first, and reject it on failure.
|
|
1095
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.
|
|
1096
1131
|
* @param {*} [options] Override http request option.
|
|
1097
1132
|
* @throws {RequiredError}
|
|
1098
1133
|
*/
|
|
1099
|
-
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>;
|
|
1100
1135
|
|
|
1101
1136
|
/**
|
|
1102
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/).
|
|
@@ -1108,7 +1143,7 @@ export interface SendApiInterface {
|
|
|
1108
1143
|
sendValidateFilePost(file: File, options?: RawAxiosRequestConfig): AxiosPromise<void>;
|
|
1109
1144
|
|
|
1110
1145
|
/**
|
|
1111
|
-
* 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/).
|
|
1112
1147
|
* @summary Validate an invoice by json
|
|
1113
1148
|
* @param {object} body
|
|
1114
1149
|
* @param {*} [options] Override http request option.
|
|
@@ -1135,15 +1170,16 @@ export interface SendApiInterface {
|
|
|
1135
1170
|
sendValidateXmlPost(body: object, options?: RawAxiosRequestConfig): AxiosPromise<void>;
|
|
1136
1171
|
|
|
1137
1172
|
/**
|
|
1138
|
-
* 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.
|
|
1139
1174
|
* @summary Add an invoice by xml
|
|
1140
1175
|
* @param {object} body
|
|
1141
1176
|
* @param {boolean} [validate] Validate the document first, and reject it on failure.
|
|
1142
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.
|
|
1143
1179
|
* @param {*} [options] Override http request option.
|
|
1144
1180
|
* @throws {RequiredError}
|
|
1145
1181
|
*/
|
|
1146
|
-
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>;
|
|
1147
1183
|
|
|
1148
1184
|
}
|
|
1149
1185
|
|
|
@@ -1152,20 +1188,21 @@ export interface SendApiInterface {
|
|
|
1152
1188
|
*/
|
|
1153
1189
|
export class SendApi extends BaseAPI implements SendApiInterface {
|
|
1154
1190
|
/**
|
|
1155
|
-
* 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.
|
|
1156
1192
|
* @summary Add an invoice by file
|
|
1157
1193
|
* @param {File} file
|
|
1158
1194
|
* @param {boolean} [validate] Validate the document first, and reject it on failure.
|
|
1159
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.
|
|
1160
1197
|
* @param {*} [options] Override http request option.
|
|
1161
1198
|
* @throws {RequiredError}
|
|
1162
1199
|
*/
|
|
1163
|
-
public sendFilePost(file: File, validate?: boolean, signature?: SendFilePostSignatureEnum, options?: RawAxiosRequestConfig) {
|
|
1164
|
-
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));
|
|
1165
1202
|
}
|
|
1166
1203
|
|
|
1167
1204
|
/**
|
|
1168
|
-
* 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`). 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/).
|
|
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/).
|
|
1169
1206
|
* @summary List invoices
|
|
1170
1207
|
* @param {number} [companyId] Company id
|
|
1171
1208
|
* @param {string} [identifier] SDI identifier.
|
|
@@ -1179,6 +1216,7 @@ export class SendApi extends BaseAPI implements SendApiInterface {
|
|
|
1179
1216
|
* @param {string} [documentDateFrom] UTC ISO 8601 (2024-11-29T12:34:56Z)
|
|
1180
1217
|
* @param {string} [documentDateTo] UTC ISO 8601 (2024-11-29T12:34:56Z)
|
|
1181
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.
|
|
1182
1220
|
* @param {boolean} [includePayload] Include payload in the response. Defaults to false.
|
|
1183
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.
|
|
1184
1222
|
* @param {number} [page] Page number.
|
|
@@ -1188,8 +1226,8 @@ export class SendApi extends BaseAPI implements SendApiInterface {
|
|
|
1188
1226
|
* @param {*} [options] Override http request option.
|
|
1189
1227
|
* @throws {RequiredError}
|
|
1190
1228
|
*/
|
|
1191
|
-
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, ids?: string, page?: number, pageSize?: number, sort?: string, q?: string, options?: RawAxiosRequestConfig) {
|
|
1192
|
-
return SendApiFp(this.configuration).sendGet(companyId, identifier, committente, prestatore, fileName, lastUpdateFrom, lastUpdateTo, dateSentFrom, dateSentTo, documentDateFrom, documentDateTo, documentNumber, includePayload, ids, 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));
|
|
1193
1231
|
}
|
|
1194
1232
|
|
|
1195
1233
|
/**
|
|
@@ -1228,29 +1266,31 @@ export class SendApi extends BaseAPI implements SendApiInterface {
|
|
|
1228
1266
|
}
|
|
1229
1267
|
|
|
1230
1268
|
/**
|
|
1231
|
-
* 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.
|
|
1232
1270
|
* @summary Add an invoice by json
|
|
1233
1271
|
* @param {object} body
|
|
1234
1272
|
* @param {boolean} [validate] Validate the document first, and reject it on failure.
|
|
1235
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.
|
|
1236
1275
|
* @param {*} [options] Override http request option.
|
|
1237
1276
|
* @throws {RequiredError}
|
|
1238
1277
|
*/
|
|
1239
|
-
public sendJsonPost(body: object, validate?: boolean, signature?: SendJsonPostSignatureEnum, options?: RawAxiosRequestConfig) {
|
|
1240
|
-
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));
|
|
1241
1280
|
}
|
|
1242
1281
|
|
|
1243
1282
|
/**
|
|
1244
|
-
* 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.
|
|
1245
1284
|
* @summary Add an invoice
|
|
1246
1285
|
* @param {Send} send
|
|
1247
1286
|
* @param {boolean} [validate] Validate the document first, and reject it on failure.
|
|
1248
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.
|
|
1249
1289
|
* @param {*} [options] Override http request option.
|
|
1250
1290
|
* @throws {RequiredError}
|
|
1251
1291
|
*/
|
|
1252
|
-
public sendPost(send: Send, validate?: boolean, signature?: SendPostSignatureEnum, options?: RawAxiosRequestConfig) {
|
|
1253
|
-
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));
|
|
1254
1294
|
}
|
|
1255
1295
|
|
|
1256
1296
|
/**
|
|
@@ -1265,7 +1305,7 @@ export class SendApi extends BaseAPI implements SendApiInterface {
|
|
|
1265
1305
|
}
|
|
1266
1306
|
|
|
1267
1307
|
/**
|
|
1268
|
-
* 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/).
|
|
1269
1309
|
* @summary Validate an invoice by json
|
|
1270
1310
|
* @param {object} body
|
|
1271
1311
|
* @param {*} [options] Override http request option.
|
|
@@ -1298,16 +1338,17 @@ export class SendApi extends BaseAPI implements SendApiInterface {
|
|
|
1298
1338
|
}
|
|
1299
1339
|
|
|
1300
1340
|
/**
|
|
1301
|
-
* 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.
|
|
1302
1342
|
* @summary Add an invoice by xml
|
|
1303
1343
|
* @param {object} body
|
|
1304
1344
|
* @param {boolean} [validate] Validate the document first, and reject it on failure.
|
|
1305
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.
|
|
1306
1347
|
* @param {*} [options] Override http request option.
|
|
1307
1348
|
* @throws {RequiredError}
|
|
1308
1349
|
*/
|
|
1309
|
-
public sendXmlPost(body: object, validate?: boolean, signature?: SendXmlPostSignatureEnum, options?: RawAxiosRequestConfig) {
|
|
1310
|
-
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));
|
|
1311
1352
|
}
|
|
1312
1353
|
}
|
|
1313
1354
|
|
|
@@ -1318,6 +1359,18 @@ export const SendFilePostSignatureEnum = {
|
|
|
1318
1359
|
Auto: 'Auto'
|
|
1319
1360
|
} as const;
|
|
1320
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];
|
|
1321
1374
|
export const SendJsonPostSignatureEnum = {
|
|
1322
1375
|
None: 'None',
|
|
1323
1376
|
Apply: 'Apply',
|