@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
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Invoicetronic API
|
|
3
|
-
* The [Invoicetronic API][2] is a RESTful service that allows you to send and receive invoices through the Italian [Servizio di Interscambio (SDI)][1], or Interchange Service. The API is designed to be simple and easy to use, abstracting away SDI complexity while providing complete control over the invoice send/receive process. It provides advanced features as encryption at rest, multi-language pre-flight invoice validation, multiple upload formats, webhooks, event logging, client SDKs, and CLI tools. For more information, see [Invoicetronic website][2] [1]: https://www.fatturapa.gov.it/it/sistemainterscambio/cose-il-sdi/ [2]: https://invoicetronic.com/
|
|
3
|
+
* The [Invoicetronic API][2] is a RESTful service that allows you to send and receive invoices through the Italian [Servizio di Interscambio (SDI)][1], or Interchange Service. The API is designed to be simple and easy to use, abstracting away SDI complexity while providing complete control over the invoice send/receive process. It provides advanced features as encryption at rest, multi-language pre-flight invoice validation, multiple upload formats, webhooks, event logging, client SDKs, and CLI tools. For more information, see [Invoicetronic website][2] ## 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/
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 1.
|
|
5
|
+
* The version of the OpenAPI document: 1.14.0
|
|
6
6
|
* Contact: info@invoicetronic.com
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -18,17 +18,18 @@ import type { Send } from '../../src/models';
|
|
|
18
18
|
*/
|
|
19
19
|
export declare const SendApiAxiosParamCreator: (configuration?: Configuration) => {
|
|
20
20
|
/**
|
|
21
|
-
* 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).
|
|
21
|
+
* 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.
|
|
22
22
|
* @summary Add an invoice by file
|
|
23
23
|
* @param {File} file
|
|
24
24
|
* @param {boolean} [validate] Validate the document first, and reject it on failure.
|
|
25
25
|
* @param {SendFilePostSignatureEnum} [signature] Whether to digitally sign the document.
|
|
26
|
+
* @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.
|
|
26
27
|
* @param {*} [options] Override http request option.
|
|
27
28
|
* @throws {RequiredError}
|
|
28
29
|
*/
|
|
29
|
-
sendFilePost: (file: File, validate?: boolean, signature?: SendFilePostSignatureEnum, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
30
|
+
sendFilePost: (file: File, validate?: boolean, signature?: SendFilePostSignatureEnum, idempotencyKey?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
30
31
|
/**
|
|
31
|
-
* 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/).
|
|
32
|
+
* 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/).
|
|
32
33
|
* @summary List invoices
|
|
33
34
|
* @param {number} [companyId] Company id
|
|
34
35
|
* @param {string} [identifier] SDI identifier.
|
|
@@ -42,6 +43,7 @@ export declare const SendApiAxiosParamCreator: (configuration?: Configuration) =
|
|
|
42
43
|
* @param {string} [documentDateFrom] UTC ISO 8601 (2024-11-29T12:34:56Z)
|
|
43
44
|
* @param {string} [documentDateTo] UTC ISO 8601 (2024-11-29T12:34:56Z)
|
|
44
45
|
* @param {string} [documentNumber] Document number.
|
|
46
|
+
* @param {SendGetLatestStateEnum} [latestState] Filter by the most recent SDI state for the invoice. Matches the `latest_state` field exposed inline on each Send.
|
|
45
47
|
* @param {boolean} [includePayload] Include payload in the response. Defaults to false.
|
|
46
48
|
* @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.
|
|
47
49
|
* @param {number} [page] Page number.
|
|
@@ -51,7 +53,7 @@ export declare const SendApiAxiosParamCreator: (configuration?: Configuration) =
|
|
|
51
53
|
* @param {*} [options] Override http request option.
|
|
52
54
|
* @throws {RequiredError}
|
|
53
55
|
*/
|
|
54
|
-
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<RequestArgs>;
|
|
56
|
+
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<RequestArgs>;
|
|
55
57
|
/**
|
|
56
58
|
* 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/).
|
|
57
59
|
* @summary Get a invoice by id
|
|
@@ -79,25 +81,27 @@ export declare const SendApiAxiosParamCreator: (configuration?: Configuration) =
|
|
|
79
81
|
*/
|
|
80
82
|
sendIdentifierGet: (identifier: string, includePayload?: boolean, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
81
83
|
/**
|
|
82
|
-
* 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).
|
|
84
|
+
* 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.
|
|
83
85
|
* @summary Add an invoice by json
|
|
84
86
|
* @param {object} body
|
|
85
87
|
* @param {boolean} [validate] Validate the document first, and reject it on failure.
|
|
86
88
|
* @param {SendJsonPostSignatureEnum} [signature] Whether to digitally sign the document.
|
|
89
|
+
* @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.
|
|
87
90
|
* @param {*} [options] Override http request option.
|
|
88
91
|
* @throws {RequiredError}
|
|
89
92
|
*/
|
|
90
|
-
sendJsonPost: (body: object, validate?: boolean, signature?: SendJsonPostSignatureEnum, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
93
|
+
sendJsonPost: (body: object, validate?: boolean, signature?: SendJsonPostSignatureEnum, idempotencyKey?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
91
94
|
/**
|
|
92
|
-
* 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).
|
|
95
|
+
* 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.
|
|
93
96
|
* @summary Add an invoice
|
|
94
97
|
* @param {Send} send
|
|
95
98
|
* @param {boolean} [validate] Validate the document first, and reject it on failure.
|
|
96
99
|
* @param {SendPostSignatureEnum} [signature] Whether to digitally sign the document.
|
|
100
|
+
* @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.
|
|
97
101
|
* @param {*} [options] Override http request option.
|
|
98
102
|
* @throws {RequiredError}
|
|
99
103
|
*/
|
|
100
|
-
sendPost: (send: Send, validate?: boolean, signature?: SendPostSignatureEnum, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
104
|
+
sendPost: (send: Send, validate?: boolean, signature?: SendPostSignatureEnum, idempotencyKey?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
101
105
|
/**
|
|
102
106
|
* 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/).
|
|
103
107
|
* @summary Validate an invoice file
|
|
@@ -107,7 +111,7 @@ export declare const SendApiAxiosParamCreator: (configuration?: Configuration) =
|
|
|
107
111
|
*/
|
|
108
112
|
sendValidateFilePost: (file: File, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
109
113
|
/**
|
|
110
|
-
* 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/).
|
|
114
|
+
* 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/).
|
|
111
115
|
* @summary Validate an invoice by json
|
|
112
116
|
* @param {object} body
|
|
113
117
|
* @param {*} [options] Override http request option.
|
|
@@ -131,32 +135,34 @@ export declare const SendApiAxiosParamCreator: (configuration?: Configuration) =
|
|
|
131
135
|
*/
|
|
132
136
|
sendValidateXmlPost: (body: object, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
133
137
|
/**
|
|
134
|
-
* 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).
|
|
138
|
+
* 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.
|
|
135
139
|
* @summary Add an invoice by xml
|
|
136
140
|
* @param {object} body
|
|
137
141
|
* @param {boolean} [validate] Validate the document first, and reject it on failure.
|
|
138
142
|
* @param {SendXmlPostSignatureEnum} [signature] Whether to digitally sign the document.
|
|
143
|
+
* @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.
|
|
139
144
|
* @param {*} [options] Override http request option.
|
|
140
145
|
* @throws {RequiredError}
|
|
141
146
|
*/
|
|
142
|
-
sendXmlPost: (body: object, validate?: boolean, signature?: SendXmlPostSignatureEnum, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
147
|
+
sendXmlPost: (body: object, validate?: boolean, signature?: SendXmlPostSignatureEnum, idempotencyKey?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
143
148
|
};
|
|
144
149
|
/**
|
|
145
150
|
* SendApi - functional programming interface
|
|
146
151
|
*/
|
|
147
152
|
export declare const SendApiFp: (configuration?: Configuration) => {
|
|
148
153
|
/**
|
|
149
|
-
* 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).
|
|
154
|
+
* 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.
|
|
150
155
|
* @summary Add an invoice by file
|
|
151
156
|
* @param {File} file
|
|
152
157
|
* @param {boolean} [validate] Validate the document first, and reject it on failure.
|
|
153
158
|
* @param {SendFilePostSignatureEnum} [signature] Whether to digitally sign the document.
|
|
159
|
+
* @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.
|
|
154
160
|
* @param {*} [options] Override http request option.
|
|
155
161
|
* @throws {RequiredError}
|
|
156
162
|
*/
|
|
157
|
-
sendFilePost(file: File, validate?: boolean, signature?: SendFilePostSignatureEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Send>>;
|
|
163
|
+
sendFilePost(file: File, validate?: boolean, signature?: SendFilePostSignatureEnum, idempotencyKey?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Send>>;
|
|
158
164
|
/**
|
|
159
|
-
* 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/).
|
|
165
|
+
* 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/).
|
|
160
166
|
* @summary List invoices
|
|
161
167
|
* @param {number} [companyId] Company id
|
|
162
168
|
* @param {string} [identifier] SDI identifier.
|
|
@@ -170,6 +176,7 @@ export declare const SendApiFp: (configuration?: Configuration) => {
|
|
|
170
176
|
* @param {string} [documentDateFrom] UTC ISO 8601 (2024-11-29T12:34:56Z)
|
|
171
177
|
* @param {string} [documentDateTo] UTC ISO 8601 (2024-11-29T12:34:56Z)
|
|
172
178
|
* @param {string} [documentNumber] Document number.
|
|
179
|
+
* @param {SendGetLatestStateEnum} [latestState] Filter by the most recent SDI state for the invoice. Matches the `latest_state` field exposed inline on each Send.
|
|
173
180
|
* @param {boolean} [includePayload] Include payload in the response. Defaults to false.
|
|
174
181
|
* @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.
|
|
175
182
|
* @param {number} [page] Page number.
|
|
@@ -179,7 +186,7 @@ export declare const SendApiFp: (configuration?: Configuration) => {
|
|
|
179
186
|
* @param {*} [options] Override http request option.
|
|
180
187
|
* @throws {RequiredError}
|
|
181
188
|
*/
|
|
182
|
-
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>>>;
|
|
189
|
+
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>>>;
|
|
183
190
|
/**
|
|
184
191
|
* 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/).
|
|
185
192
|
* @summary Get a invoice by id
|
|
@@ -207,25 +214,27 @@ export declare const SendApiFp: (configuration?: Configuration) => {
|
|
|
207
214
|
*/
|
|
208
215
|
sendIdentifierGet(identifier: string, includePayload?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Send>>;
|
|
209
216
|
/**
|
|
210
|
-
* 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).
|
|
217
|
+
* 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.
|
|
211
218
|
* @summary Add an invoice by json
|
|
212
219
|
* @param {object} body
|
|
213
220
|
* @param {boolean} [validate] Validate the document first, and reject it on failure.
|
|
214
221
|
* @param {SendJsonPostSignatureEnum} [signature] Whether to digitally sign the document.
|
|
222
|
+
* @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.
|
|
215
223
|
* @param {*} [options] Override http request option.
|
|
216
224
|
* @throws {RequiredError}
|
|
217
225
|
*/
|
|
218
|
-
sendJsonPost(body: object, validate?: boolean, signature?: SendJsonPostSignatureEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Send>>;
|
|
226
|
+
sendJsonPost(body: object, validate?: boolean, signature?: SendJsonPostSignatureEnum, idempotencyKey?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Send>>;
|
|
219
227
|
/**
|
|
220
|
-
* 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).
|
|
228
|
+
* 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.
|
|
221
229
|
* @summary Add an invoice
|
|
222
230
|
* @param {Send} send
|
|
223
231
|
* @param {boolean} [validate] Validate the document first, and reject it on failure.
|
|
224
232
|
* @param {SendPostSignatureEnum} [signature] Whether to digitally sign the document.
|
|
233
|
+
* @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.
|
|
225
234
|
* @param {*} [options] Override http request option.
|
|
226
235
|
* @throws {RequiredError}
|
|
227
236
|
*/
|
|
228
|
-
sendPost(send: Send, validate?: boolean, signature?: SendPostSignatureEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Send>>;
|
|
237
|
+
sendPost(send: Send, validate?: boolean, signature?: SendPostSignatureEnum, idempotencyKey?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Send>>;
|
|
229
238
|
/**
|
|
230
239
|
* 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/).
|
|
231
240
|
* @summary Validate an invoice file
|
|
@@ -235,7 +244,7 @@ export declare const SendApiFp: (configuration?: Configuration) => {
|
|
|
235
244
|
*/
|
|
236
245
|
sendValidateFilePost(file: File, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
|
|
237
246
|
/**
|
|
238
|
-
* 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/).
|
|
247
|
+
* 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/).
|
|
239
248
|
* @summary Validate an invoice by json
|
|
240
249
|
* @param {object} body
|
|
241
250
|
* @param {*} [options] Override http request option.
|
|
@@ -259,32 +268,34 @@ export declare const SendApiFp: (configuration?: Configuration) => {
|
|
|
259
268
|
*/
|
|
260
269
|
sendValidateXmlPost(body: object, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
|
|
261
270
|
/**
|
|
262
|
-
* 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).
|
|
271
|
+
* 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.
|
|
263
272
|
* @summary Add an invoice by xml
|
|
264
273
|
* @param {object} body
|
|
265
274
|
* @param {boolean} [validate] Validate the document first, and reject it on failure.
|
|
266
275
|
* @param {SendXmlPostSignatureEnum} [signature] Whether to digitally sign the document.
|
|
276
|
+
* @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.
|
|
267
277
|
* @param {*} [options] Override http request option.
|
|
268
278
|
* @throws {RequiredError}
|
|
269
279
|
*/
|
|
270
|
-
sendXmlPost(body: object, validate?: boolean, signature?: SendXmlPostSignatureEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Send>>;
|
|
280
|
+
sendXmlPost(body: object, validate?: boolean, signature?: SendXmlPostSignatureEnum, idempotencyKey?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Send>>;
|
|
271
281
|
};
|
|
272
282
|
/**
|
|
273
283
|
* SendApi - factory interface
|
|
274
284
|
*/
|
|
275
285
|
export declare const SendApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
|
|
276
286
|
/**
|
|
277
|
-
* 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).
|
|
287
|
+
* 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.
|
|
278
288
|
* @summary Add an invoice by file
|
|
279
289
|
* @param {File} file
|
|
280
290
|
* @param {boolean} [validate] Validate the document first, and reject it on failure.
|
|
281
291
|
* @param {SendFilePostSignatureEnum} [signature] Whether to digitally sign the document.
|
|
292
|
+
* @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.
|
|
282
293
|
* @param {*} [options] Override http request option.
|
|
283
294
|
* @throws {RequiredError}
|
|
284
295
|
*/
|
|
285
|
-
sendFilePost(file: File, validate?: boolean, signature?: SendFilePostSignatureEnum, options?: RawAxiosRequestConfig): AxiosPromise<Send>;
|
|
296
|
+
sendFilePost(file: File, validate?: boolean, signature?: SendFilePostSignatureEnum, idempotencyKey?: string, options?: RawAxiosRequestConfig): AxiosPromise<Send>;
|
|
286
297
|
/**
|
|
287
|
-
* 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/).
|
|
298
|
+
* 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/).
|
|
288
299
|
* @summary List invoices
|
|
289
300
|
* @param {number} [companyId] Company id
|
|
290
301
|
* @param {string} [identifier] SDI identifier.
|
|
@@ -298,6 +309,7 @@ export declare const SendApiFactory: (configuration?: Configuration, basePath?:
|
|
|
298
309
|
* @param {string} [documentDateFrom] UTC ISO 8601 (2024-11-29T12:34:56Z)
|
|
299
310
|
* @param {string} [documentDateTo] UTC ISO 8601 (2024-11-29T12:34:56Z)
|
|
300
311
|
* @param {string} [documentNumber] Document number.
|
|
312
|
+
* @param {SendGetLatestStateEnum} [latestState] Filter by the most recent SDI state for the invoice. Matches the `latest_state` field exposed inline on each Send.
|
|
301
313
|
* @param {boolean} [includePayload] Include payload in the response. Defaults to false.
|
|
302
314
|
* @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.
|
|
303
315
|
* @param {number} [page] Page number.
|
|
@@ -307,7 +319,7 @@ export declare const SendApiFactory: (configuration?: Configuration, basePath?:
|
|
|
307
319
|
* @param {*} [options] Override http request option.
|
|
308
320
|
* @throws {RequiredError}
|
|
309
321
|
*/
|
|
310
|
-
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>>;
|
|
322
|
+
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>>;
|
|
311
323
|
/**
|
|
312
324
|
* 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/).
|
|
313
325
|
* @summary Get a invoice by id
|
|
@@ -335,25 +347,27 @@ export declare const SendApiFactory: (configuration?: Configuration, basePath?:
|
|
|
335
347
|
*/
|
|
336
348
|
sendIdentifierGet(identifier: string, includePayload?: boolean, options?: RawAxiosRequestConfig): AxiosPromise<Send>;
|
|
337
349
|
/**
|
|
338
|
-
* 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).
|
|
350
|
+
* 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.
|
|
339
351
|
* @summary Add an invoice by json
|
|
340
352
|
* @param {object} body
|
|
341
353
|
* @param {boolean} [validate] Validate the document first, and reject it on failure.
|
|
342
354
|
* @param {SendJsonPostSignatureEnum} [signature] Whether to digitally sign the document.
|
|
355
|
+
* @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.
|
|
343
356
|
* @param {*} [options] Override http request option.
|
|
344
357
|
* @throws {RequiredError}
|
|
345
358
|
*/
|
|
346
|
-
sendJsonPost(body: object, validate?: boolean, signature?: SendJsonPostSignatureEnum, options?: RawAxiosRequestConfig): AxiosPromise<Send>;
|
|
359
|
+
sendJsonPost(body: object, validate?: boolean, signature?: SendJsonPostSignatureEnum, idempotencyKey?: string, options?: RawAxiosRequestConfig): AxiosPromise<Send>;
|
|
347
360
|
/**
|
|
348
|
-
* 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).
|
|
361
|
+
* 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.
|
|
349
362
|
* @summary Add an invoice
|
|
350
363
|
* @param {Send} send
|
|
351
364
|
* @param {boolean} [validate] Validate the document first, and reject it on failure.
|
|
352
365
|
* @param {SendPostSignatureEnum} [signature] Whether to digitally sign the document.
|
|
366
|
+
* @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.
|
|
353
367
|
* @param {*} [options] Override http request option.
|
|
354
368
|
* @throws {RequiredError}
|
|
355
369
|
*/
|
|
356
|
-
sendPost(send: Send, validate?: boolean, signature?: SendPostSignatureEnum, options?: RawAxiosRequestConfig): AxiosPromise<Send>;
|
|
370
|
+
sendPost(send: Send, validate?: boolean, signature?: SendPostSignatureEnum, idempotencyKey?: string, options?: RawAxiosRequestConfig): AxiosPromise<Send>;
|
|
357
371
|
/**
|
|
358
372
|
* 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/).
|
|
359
373
|
* @summary Validate an invoice file
|
|
@@ -363,7 +377,7 @@ export declare const SendApiFactory: (configuration?: Configuration, basePath?:
|
|
|
363
377
|
*/
|
|
364
378
|
sendValidateFilePost(file: File, options?: RawAxiosRequestConfig): AxiosPromise<void>;
|
|
365
379
|
/**
|
|
366
|
-
* 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/).
|
|
380
|
+
* 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/).
|
|
367
381
|
* @summary Validate an invoice by json
|
|
368
382
|
* @param {object} body
|
|
369
383
|
* @param {*} [options] Override http request option.
|
|
@@ -387,32 +401,34 @@ export declare const SendApiFactory: (configuration?: Configuration, basePath?:
|
|
|
387
401
|
*/
|
|
388
402
|
sendValidateXmlPost(body: object, options?: RawAxiosRequestConfig): AxiosPromise<void>;
|
|
389
403
|
/**
|
|
390
|
-
* 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).
|
|
404
|
+
* 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.
|
|
391
405
|
* @summary Add an invoice by xml
|
|
392
406
|
* @param {object} body
|
|
393
407
|
* @param {boolean} [validate] Validate the document first, and reject it on failure.
|
|
394
408
|
* @param {SendXmlPostSignatureEnum} [signature] Whether to digitally sign the document.
|
|
409
|
+
* @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.
|
|
395
410
|
* @param {*} [options] Override http request option.
|
|
396
411
|
* @throws {RequiredError}
|
|
397
412
|
*/
|
|
398
|
-
sendXmlPost(body: object, validate?: boolean, signature?: SendXmlPostSignatureEnum, options?: RawAxiosRequestConfig): AxiosPromise<Send>;
|
|
413
|
+
sendXmlPost(body: object, validate?: boolean, signature?: SendXmlPostSignatureEnum, idempotencyKey?: string, options?: RawAxiosRequestConfig): AxiosPromise<Send>;
|
|
399
414
|
};
|
|
400
415
|
/**
|
|
401
416
|
* SendApi - interface
|
|
402
417
|
*/
|
|
403
418
|
export interface SendApiInterface {
|
|
404
419
|
/**
|
|
405
|
-
* 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).
|
|
420
|
+
* 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.
|
|
406
421
|
* @summary Add an invoice by file
|
|
407
422
|
* @param {File} file
|
|
408
423
|
* @param {boolean} [validate] Validate the document first, and reject it on failure.
|
|
409
424
|
* @param {SendFilePostSignatureEnum} [signature] Whether to digitally sign the document.
|
|
425
|
+
* @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.
|
|
410
426
|
* @param {*} [options] Override http request option.
|
|
411
427
|
* @throws {RequiredError}
|
|
412
428
|
*/
|
|
413
|
-
sendFilePost(file: File, validate?: boolean, signature?: SendFilePostSignatureEnum, options?: RawAxiosRequestConfig): AxiosPromise<Send>;
|
|
429
|
+
sendFilePost(file: File, validate?: boolean, signature?: SendFilePostSignatureEnum, idempotencyKey?: string, options?: RawAxiosRequestConfig): AxiosPromise<Send>;
|
|
414
430
|
/**
|
|
415
|
-
* 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/).
|
|
431
|
+
* 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/).
|
|
416
432
|
* @summary List invoices
|
|
417
433
|
* @param {number} [companyId] Company id
|
|
418
434
|
* @param {string} [identifier] SDI identifier.
|
|
@@ -426,6 +442,7 @@ export interface SendApiInterface {
|
|
|
426
442
|
* @param {string} [documentDateFrom] UTC ISO 8601 (2024-11-29T12:34:56Z)
|
|
427
443
|
* @param {string} [documentDateTo] UTC ISO 8601 (2024-11-29T12:34:56Z)
|
|
428
444
|
* @param {string} [documentNumber] Document number.
|
|
445
|
+
* @param {SendGetLatestStateEnum} [latestState] Filter by the most recent SDI state for the invoice. Matches the `latest_state` field exposed inline on each Send.
|
|
429
446
|
* @param {boolean} [includePayload] Include payload in the response. Defaults to false.
|
|
430
447
|
* @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.
|
|
431
448
|
* @param {number} [page] Page number.
|
|
@@ -435,7 +452,7 @@ export interface SendApiInterface {
|
|
|
435
452
|
* @param {*} [options] Override http request option.
|
|
436
453
|
* @throws {RequiredError}
|
|
437
454
|
*/
|
|
438
|
-
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>>;
|
|
455
|
+
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>>;
|
|
439
456
|
/**
|
|
440
457
|
* 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/).
|
|
441
458
|
* @summary Get a invoice by id
|
|
@@ -463,25 +480,27 @@ export interface SendApiInterface {
|
|
|
463
480
|
*/
|
|
464
481
|
sendIdentifierGet(identifier: string, includePayload?: boolean, options?: RawAxiosRequestConfig): AxiosPromise<Send>;
|
|
465
482
|
/**
|
|
466
|
-
* 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).
|
|
483
|
+
* 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.
|
|
467
484
|
* @summary Add an invoice by json
|
|
468
485
|
* @param {object} body
|
|
469
486
|
* @param {boolean} [validate] Validate the document first, and reject it on failure.
|
|
470
487
|
* @param {SendJsonPostSignatureEnum} [signature] Whether to digitally sign the document.
|
|
488
|
+
* @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.
|
|
471
489
|
* @param {*} [options] Override http request option.
|
|
472
490
|
* @throws {RequiredError}
|
|
473
491
|
*/
|
|
474
|
-
sendJsonPost(body: object, validate?: boolean, signature?: SendJsonPostSignatureEnum, options?: RawAxiosRequestConfig): AxiosPromise<Send>;
|
|
492
|
+
sendJsonPost(body: object, validate?: boolean, signature?: SendJsonPostSignatureEnum, idempotencyKey?: string, options?: RawAxiosRequestConfig): AxiosPromise<Send>;
|
|
475
493
|
/**
|
|
476
|
-
* 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).
|
|
494
|
+
* 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.
|
|
477
495
|
* @summary Add an invoice
|
|
478
496
|
* @param {Send} send
|
|
479
497
|
* @param {boolean} [validate] Validate the document first, and reject it on failure.
|
|
480
498
|
* @param {SendPostSignatureEnum} [signature] Whether to digitally sign the document.
|
|
499
|
+
* @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.
|
|
481
500
|
* @param {*} [options] Override http request option.
|
|
482
501
|
* @throws {RequiredError}
|
|
483
502
|
*/
|
|
484
|
-
sendPost(send: Send, validate?: boolean, signature?: SendPostSignatureEnum, options?: RawAxiosRequestConfig): AxiosPromise<Send>;
|
|
503
|
+
sendPost(send: Send, validate?: boolean, signature?: SendPostSignatureEnum, idempotencyKey?: string, options?: RawAxiosRequestConfig): AxiosPromise<Send>;
|
|
485
504
|
/**
|
|
486
505
|
* 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/).
|
|
487
506
|
* @summary Validate an invoice file
|
|
@@ -491,7 +510,7 @@ export interface SendApiInterface {
|
|
|
491
510
|
*/
|
|
492
511
|
sendValidateFilePost(file: File, options?: RawAxiosRequestConfig): AxiosPromise<void>;
|
|
493
512
|
/**
|
|
494
|
-
* 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/).
|
|
513
|
+
* 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/).
|
|
495
514
|
* @summary Validate an invoice by json
|
|
496
515
|
* @param {object} body
|
|
497
516
|
* @param {*} [options] Override http request option.
|
|
@@ -515,32 +534,34 @@ export interface SendApiInterface {
|
|
|
515
534
|
*/
|
|
516
535
|
sendValidateXmlPost(body: object, options?: RawAxiosRequestConfig): AxiosPromise<void>;
|
|
517
536
|
/**
|
|
518
|
-
* 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).
|
|
537
|
+
* 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.
|
|
519
538
|
* @summary Add an invoice by xml
|
|
520
539
|
* @param {object} body
|
|
521
540
|
* @param {boolean} [validate] Validate the document first, and reject it on failure.
|
|
522
541
|
* @param {SendXmlPostSignatureEnum} [signature] Whether to digitally sign the document.
|
|
542
|
+
* @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.
|
|
523
543
|
* @param {*} [options] Override http request option.
|
|
524
544
|
* @throws {RequiredError}
|
|
525
545
|
*/
|
|
526
|
-
sendXmlPost(body: object, validate?: boolean, signature?: SendXmlPostSignatureEnum, options?: RawAxiosRequestConfig): AxiosPromise<Send>;
|
|
546
|
+
sendXmlPost(body: object, validate?: boolean, signature?: SendXmlPostSignatureEnum, idempotencyKey?: string, options?: RawAxiosRequestConfig): AxiosPromise<Send>;
|
|
527
547
|
}
|
|
528
548
|
/**
|
|
529
549
|
* SendApi - object-oriented interface
|
|
530
550
|
*/
|
|
531
551
|
export declare class SendApi extends BaseAPI implements SendApiInterface {
|
|
532
552
|
/**
|
|
533
|
-
* 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).
|
|
553
|
+
* 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.
|
|
534
554
|
* @summary Add an invoice by file
|
|
535
555
|
* @param {File} file
|
|
536
556
|
* @param {boolean} [validate] Validate the document first, and reject it on failure.
|
|
537
557
|
* @param {SendFilePostSignatureEnum} [signature] Whether to digitally sign the document.
|
|
558
|
+
* @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.
|
|
538
559
|
* @param {*} [options] Override http request option.
|
|
539
560
|
* @throws {RequiredError}
|
|
540
561
|
*/
|
|
541
|
-
sendFilePost(file: File, validate?: boolean, signature?: SendFilePostSignatureEnum, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<Send, any, {}>>;
|
|
562
|
+
sendFilePost(file: File, validate?: boolean, signature?: SendFilePostSignatureEnum, idempotencyKey?: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<Send, any, {}>>;
|
|
542
563
|
/**
|
|
543
|
-
* 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/).
|
|
564
|
+
* 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/).
|
|
544
565
|
* @summary List invoices
|
|
545
566
|
* @param {number} [companyId] Company id
|
|
546
567
|
* @param {string} [identifier] SDI identifier.
|
|
@@ -554,6 +575,7 @@ export declare class SendApi extends BaseAPI implements SendApiInterface {
|
|
|
554
575
|
* @param {string} [documentDateFrom] UTC ISO 8601 (2024-11-29T12:34:56Z)
|
|
555
576
|
* @param {string} [documentDateTo] UTC ISO 8601 (2024-11-29T12:34:56Z)
|
|
556
577
|
* @param {string} [documentNumber] Document number.
|
|
578
|
+
* @param {SendGetLatestStateEnum} [latestState] Filter by the most recent SDI state for the invoice. Matches the `latest_state` field exposed inline on each Send.
|
|
557
579
|
* @param {boolean} [includePayload] Include payload in the response. Defaults to false.
|
|
558
580
|
* @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.
|
|
559
581
|
* @param {number} [page] Page number.
|
|
@@ -563,7 +585,7 @@ export declare class SendApi extends BaseAPI implements SendApiInterface {
|
|
|
563
585
|
* @param {*} [options] Override http request option.
|
|
564
586
|
* @throws {RequiredError}
|
|
565
587
|
*/
|
|
566
|
-
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<import("axios").AxiosResponse<Send[], any, {}>>;
|
|
588
|
+
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<import("axios").AxiosResponse<Send[], any, {}>>;
|
|
567
589
|
/**
|
|
568
590
|
* 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/).
|
|
569
591
|
* @summary Get a invoice by id
|
|
@@ -591,25 +613,27 @@ export declare class SendApi extends BaseAPI implements SendApiInterface {
|
|
|
591
613
|
*/
|
|
592
614
|
sendIdentifierGet(identifier: string, includePayload?: boolean, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<Send, any, {}>>;
|
|
593
615
|
/**
|
|
594
|
-
* 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).
|
|
616
|
+
* 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.
|
|
595
617
|
* @summary Add an invoice by json
|
|
596
618
|
* @param {object} body
|
|
597
619
|
* @param {boolean} [validate] Validate the document first, and reject it on failure.
|
|
598
620
|
* @param {SendJsonPostSignatureEnum} [signature] Whether to digitally sign the document.
|
|
621
|
+
* @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.
|
|
599
622
|
* @param {*} [options] Override http request option.
|
|
600
623
|
* @throws {RequiredError}
|
|
601
624
|
*/
|
|
602
|
-
sendJsonPost(body: object, validate?: boolean, signature?: SendJsonPostSignatureEnum, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<Send, any, {}>>;
|
|
625
|
+
sendJsonPost(body: object, validate?: boolean, signature?: SendJsonPostSignatureEnum, idempotencyKey?: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<Send, any, {}>>;
|
|
603
626
|
/**
|
|
604
|
-
* 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).
|
|
627
|
+
* 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.
|
|
605
628
|
* @summary Add an invoice
|
|
606
629
|
* @param {Send} send
|
|
607
630
|
* @param {boolean} [validate] Validate the document first, and reject it on failure.
|
|
608
631
|
* @param {SendPostSignatureEnum} [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.
|
|
609
633
|
* @param {*} [options] Override http request option.
|
|
610
634
|
* @throws {RequiredError}
|
|
611
635
|
*/
|
|
612
|
-
sendPost(send: Send, validate?: boolean, signature?: SendPostSignatureEnum, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<Send, any, {}>>;
|
|
636
|
+
sendPost(send: Send, validate?: boolean, signature?: SendPostSignatureEnum, idempotencyKey?: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<Send, any, {}>>;
|
|
613
637
|
/**
|
|
614
638
|
* 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/).
|
|
615
639
|
* @summary Validate an invoice file
|
|
@@ -619,7 +643,7 @@ export declare class SendApi extends BaseAPI implements SendApiInterface {
|
|
|
619
643
|
*/
|
|
620
644
|
sendValidateFilePost(file: File, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}>>;
|
|
621
645
|
/**
|
|
622
|
-
* 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/).
|
|
646
|
+
* 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/).
|
|
623
647
|
* @summary Validate an invoice by json
|
|
624
648
|
* @param {object} body
|
|
625
649
|
* @param {*} [options] Override http request option.
|
|
@@ -643,15 +667,16 @@ export declare class SendApi extends BaseAPI implements SendApiInterface {
|
|
|
643
667
|
*/
|
|
644
668
|
sendValidateXmlPost(body: object, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}>>;
|
|
645
669
|
/**
|
|
646
|
-
* 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).
|
|
670
|
+
* 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.
|
|
647
671
|
* @summary Add an invoice by xml
|
|
648
672
|
* @param {object} body
|
|
649
673
|
* @param {boolean} [validate] Validate the document first, and reject it on failure.
|
|
650
674
|
* @param {SendXmlPostSignatureEnum} [signature] Whether to digitally sign the document.
|
|
675
|
+
* @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.
|
|
651
676
|
* @param {*} [options] Override http request option.
|
|
652
677
|
* @throws {RequiredError}
|
|
653
678
|
*/
|
|
654
|
-
sendXmlPost(body: object, validate?: boolean, signature?: SendXmlPostSignatureEnum, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<Send, any, {}>>;
|
|
679
|
+
sendXmlPost(body: object, validate?: boolean, signature?: SendXmlPostSignatureEnum, idempotencyKey?: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<Send, any, {}>>;
|
|
655
680
|
}
|
|
656
681
|
export declare const SendFilePostSignatureEnum: {
|
|
657
682
|
readonly None: "None";
|
|
@@ -660,6 +685,18 @@ export declare const SendFilePostSignatureEnum: {
|
|
|
660
685
|
readonly Auto: "Auto";
|
|
661
686
|
};
|
|
662
687
|
export type SendFilePostSignatureEnum = typeof SendFilePostSignatureEnum[keyof typeof SendFilePostSignatureEnum];
|
|
688
|
+
export declare const SendGetLatestStateEnum: {
|
|
689
|
+
readonly Inviato: "Inviato";
|
|
690
|
+
readonly Consegnato: "Consegnato";
|
|
691
|
+
readonly NonConsegnato: "NonConsegnato";
|
|
692
|
+
readonly Scartato: "Scartato";
|
|
693
|
+
readonly AccettatoDalDestinatario: "AccettatoDalDestinatario";
|
|
694
|
+
readonly RifiutatoDalDestinatario: "RifiutatoDalDestinatario";
|
|
695
|
+
readonly ImpossibilitaDiRecapito: "ImpossibilitaDiRecapito";
|
|
696
|
+
readonly DecorrenzaTermini: "DecorrenzaTermini";
|
|
697
|
+
readonly AttestazioneTrasmissioneFattura: "AttestazioneTrasmissioneFattura";
|
|
698
|
+
};
|
|
699
|
+
export type SendGetLatestStateEnum = typeof SendGetLatestStateEnum[keyof typeof SendGetLatestStateEnum];
|
|
663
700
|
export declare const SendJsonPostSignatureEnum: {
|
|
664
701
|
readonly None: "None";
|
|
665
702
|
readonly Apply: "Apply";
|