@invoicetronic/ts-sdk 1.7.0 → 1.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1 -1
- package/README.md +16 -2
- package/api.ts +2 -2
- package/base.ts +2 -2
- package/common.ts +2 -2
- package/configuration.ts +3 -3
- package/dist/api.d.ts +2 -2
- package/dist/api.js +2 -2
- package/dist/base.d.ts +2 -2
- package/dist/base.js +2 -2
- package/dist/common.d.ts +2 -2
- package/dist/common.js +2 -2
- package/dist/configuration.d.ts +2 -2
- package/dist/configuration.js +3 -3
- package/dist/esm/api.d.ts +2 -2
- package/dist/esm/api.js +2 -2
- package/dist/esm/base.d.ts +2 -2
- package/dist/esm/base.js +2 -2
- package/dist/esm/common.d.ts +2 -2
- package/dist/esm/common.js +2 -2
- package/dist/esm/configuration.d.ts +2 -2
- package/dist/esm/configuration.js +3 -3
- package/dist/esm/index.d.ts +2 -2
- package/dist/esm/index.js +2 -2
- package/dist/esm/src/api/company-api.d.ts +2 -2
- package/dist/esm/src/api/company-api.js +2 -2
- package/dist/esm/src/api/export-api.d.ts +2 -2
- package/dist/esm/src/api/export-api.js +2 -2
- package/dist/esm/src/api/health-api.d.ts +2 -2
- package/dist/esm/src/api/health-api.js +2 -2
- package/dist/esm/src/api/log-api.d.ts +2 -2
- package/dist/esm/src/api/log-api.js +2 -2
- package/dist/esm/src/api/receive-api.d.ts +17 -17
- package/dist/esm/src/api/receive-api.js +14 -14
- package/dist/esm/src/api/send-api.d.ts +99 -57
- package/dist/esm/src/api/send-api.js +114 -61
- package/dist/esm/src/api/status-api.d.ts +2 -2
- package/dist/esm/src/api/status-api.js +2 -2
- package/dist/esm/src/api/update-api.d.ts +2 -2
- package/dist/esm/src/api/update-api.js +2 -2
- package/dist/esm/src/api/webhook-api.d.ts +27 -27
- package/dist/esm/src/api/webhook-api.js +22 -22
- package/dist/esm/src/models/company.d.ts +4 -4
- package/dist/esm/src/models/company.js +2 -2
- package/dist/esm/src/models/document-data.d.ts +2 -2
- package/dist/esm/src/models/document-data.js +2 -2
- package/dist/esm/src/models/event.d.ts +3 -3
- package/dist/esm/src/models/event.js +2 -2
- package/dist/esm/src/models/model-error.d.ts +2 -2
- package/dist/esm/src/models/model-error.js +2 -2
- package/dist/esm/src/models/problem-details.d.ts +2 -2
- package/dist/esm/src/models/problem-details.js +2 -2
- package/dist/esm/src/models/receive.d.ts +6 -6
- package/dist/esm/src/models/receive.js +2 -2
- package/dist/esm/src/models/send-reduced.d.ts +18 -2
- package/dist/esm/src/models/send-reduced.js +13 -3
- package/dist/esm/src/models/send.d.ts +22 -6
- package/dist/esm/src/models/send.js +13 -2
- package/dist/esm/src/models/status.d.ts +10 -2
- package/dist/esm/src/models/status.js +2 -2
- package/dist/esm/src/models/update.d.ts +3 -3
- package/dist/esm/src/models/update.js +2 -2
- package/dist/esm/src/models/web-hook-history.d.ts +8 -4
- package/dist/esm/src/models/web-hook-history.js +2 -2
- package/dist/esm/src/models/web-hook.d.ts +9 -5
- package/dist/esm/src/models/web-hook.js +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/src/api/company-api.d.ts +2 -2
- package/dist/src/api/company-api.js +2 -2
- package/dist/src/api/export-api.d.ts +2 -2
- package/dist/src/api/export-api.js +2 -2
- package/dist/src/api/health-api.d.ts +2 -2
- package/dist/src/api/health-api.js +2 -2
- package/dist/src/api/log-api.d.ts +2 -2
- package/dist/src/api/log-api.js +2 -2
- package/dist/src/api/receive-api.d.ts +17 -17
- package/dist/src/api/receive-api.js +14 -14
- package/dist/src/api/send-api.d.ts +99 -57
- package/dist/src/api/send-api.js +115 -62
- package/dist/src/api/status-api.d.ts +2 -2
- package/dist/src/api/status-api.js +2 -2
- package/dist/src/api/update-api.d.ts +2 -2
- package/dist/src/api/update-api.js +2 -2
- package/dist/src/api/webhook-api.d.ts +27 -27
- package/dist/src/api/webhook-api.js +22 -22
- package/dist/src/models/company.d.ts +4 -4
- package/dist/src/models/company.js +2 -2
- package/dist/src/models/document-data.d.ts +2 -2
- package/dist/src/models/document-data.js +2 -2
- package/dist/src/models/event.d.ts +3 -3
- package/dist/src/models/event.js +2 -2
- package/dist/src/models/model-error.d.ts +2 -2
- package/dist/src/models/model-error.js +2 -2
- package/dist/src/models/problem-details.d.ts +2 -2
- package/dist/src/models/problem-details.js +2 -2
- package/dist/src/models/receive.d.ts +6 -6
- package/dist/src/models/receive.js +2 -2
- package/dist/src/models/send-reduced.d.ts +18 -2
- package/dist/src/models/send-reduced.js +14 -2
- package/dist/src/models/send.d.ts +22 -6
- package/dist/src/models/send.js +14 -3
- package/dist/src/models/status.d.ts +10 -2
- package/dist/src/models/status.js +2 -2
- package/dist/src/models/update.d.ts +3 -3
- package/dist/src/models/update.js +2 -2
- package/dist/src/models/web-hook-history.d.ts +8 -4
- package/dist/src/models/web-hook-history.js +2 -2
- package/dist/src/models/web-hook.d.ts +9 -5
- package/dist/src/models/web-hook.js +2 -2
- package/docs/Company.md +4 -4
- package/docs/Event.md +3 -3
- package/docs/Receive.md +12 -12
- package/docs/ReceiveApi.md +3 -3
- package/docs/Send.md +15 -13
- package/docs/SendApi.md +28 -10
- package/docs/SendReduced.md +2 -0
- package/docs/Status.md +4 -0
- package/docs/Update.md +3 -3
- package/docs/WebHook.md +7 -5
- package/docs/WebHookHistory.md +6 -4
- package/docs/WebhookApi.md +5 -5
- package/index.ts +2 -2
- package/package.json +1 -1
- package/src/api/company-api.ts +2 -2
- package/src/api/export-api.ts +2 -2
- package/src/api/health-api.ts +2 -2
- package/src/api/log-api.ts +2 -2
- package/src/api/receive-api.ts +17 -17
- package/src/api/send-api.ts +134 -72
- package/src/api/status-api.ts +2 -2
- package/src/api/update-api.ts +2 -2
- package/src/api/webhook-api.ts +27 -27
- package/src/models/company.ts +4 -4
- package/src/models/document-data.ts +2 -2
- package/src/models/event.ts +3 -3
- package/src/models/model-error.ts +2 -2
- package/src/models/problem-details.ts +2 -2
- package/src/models/receive.ts +6 -6
- package/src/models/send-reduced.ts +21 -2
- package/src/models/send.ts +23 -6
- package/src/models/status.ts +10 -2
- package/src/models/update.ts +3 -3
- package/src/models/web-hook-history.ts +8 -4
- package/src/models/web-hook.ts +9 -5
|
@@ -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`). 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,7 +43,9 @@ 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.
|
|
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.
|
|
46
49
|
* @param {number} [page] Page number.
|
|
47
50
|
* @param {number} [pageSize] Items per page. Cannot be greater than 200.
|
|
48
51
|
* @param {string} [sort] Sort by field. Prefix with \'-\' for descending order.
|
|
@@ -50,7 +53,7 @@ export declare const SendApiAxiosParamCreator: (configuration?: Configuration) =
|
|
|
50
53
|
* @param {*} [options] Override http request option.
|
|
51
54
|
* @throws {RequiredError}
|
|
52
55
|
*/
|
|
53
|
-
sendGet: (companyId?: number, identifier?: string, committente?: string, prestatore?: string, fileName?: string, lastUpdateFrom?: string, lastUpdateTo?: string, dateSentFrom?: string, dateSentTo?: string, documentDateFrom?: string, documentDateTo?: string, documentNumber?: string, includePayload?: boolean, page?: number, pageSize?: number, sort?: string, q?: string, options?: RawAxiosRequestConfig) => Promise<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>;
|
|
54
57
|
/**
|
|
55
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/).
|
|
56
59
|
* @summary Get a invoice by id
|
|
@@ -78,25 +81,27 @@ export declare const SendApiAxiosParamCreator: (configuration?: Configuration) =
|
|
|
78
81
|
*/
|
|
79
82
|
sendIdentifierGet: (identifier: string, includePayload?: boolean, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
80
83
|
/**
|
|
81
|
-
* 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.
|
|
82
85
|
* @summary Add an invoice by json
|
|
83
86
|
* @param {object} body
|
|
84
87
|
* @param {boolean} [validate] Validate the document first, and reject it on failure.
|
|
85
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.
|
|
86
90
|
* @param {*} [options] Override http request option.
|
|
87
91
|
* @throws {RequiredError}
|
|
88
92
|
*/
|
|
89
|
-
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>;
|
|
90
94
|
/**
|
|
91
|
-
* 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.
|
|
92
96
|
* @summary Add an invoice
|
|
93
97
|
* @param {Send} send
|
|
94
98
|
* @param {boolean} [validate] Validate the document first, and reject it on failure.
|
|
95
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.
|
|
96
101
|
* @param {*} [options] Override http request option.
|
|
97
102
|
* @throws {RequiredError}
|
|
98
103
|
*/
|
|
99
|
-
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>;
|
|
100
105
|
/**
|
|
101
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/).
|
|
102
107
|
* @summary Validate an invoice file
|
|
@@ -106,7 +111,7 @@ export declare const SendApiAxiosParamCreator: (configuration?: Configuration) =
|
|
|
106
111
|
*/
|
|
107
112
|
sendValidateFilePost: (file: File, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
108
113
|
/**
|
|
109
|
-
* 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/).
|
|
110
115
|
* @summary Validate an invoice by json
|
|
111
116
|
* @param {object} body
|
|
112
117
|
* @param {*} [options] Override http request option.
|
|
@@ -130,32 +135,34 @@ export declare const SendApiAxiosParamCreator: (configuration?: Configuration) =
|
|
|
130
135
|
*/
|
|
131
136
|
sendValidateXmlPost: (body: object, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
132
137
|
/**
|
|
133
|
-
* 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.
|
|
134
139
|
* @summary Add an invoice by xml
|
|
135
140
|
* @param {object} body
|
|
136
141
|
* @param {boolean} [validate] Validate the document first, and reject it on failure.
|
|
137
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.
|
|
138
144
|
* @param {*} [options] Override http request option.
|
|
139
145
|
* @throws {RequiredError}
|
|
140
146
|
*/
|
|
141
|
-
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>;
|
|
142
148
|
};
|
|
143
149
|
/**
|
|
144
150
|
* SendApi - functional programming interface
|
|
145
151
|
*/
|
|
146
152
|
export declare const SendApiFp: (configuration?: Configuration) => {
|
|
147
153
|
/**
|
|
148
|
-
* 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.
|
|
149
155
|
* @summary Add an invoice by file
|
|
150
156
|
* @param {File} file
|
|
151
157
|
* @param {boolean} [validate] Validate the document first, and reject it on failure.
|
|
152
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.
|
|
153
160
|
* @param {*} [options] Override http request option.
|
|
154
161
|
* @throws {RequiredError}
|
|
155
162
|
*/
|
|
156
|
-
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>>;
|
|
157
164
|
/**
|
|
158
|
-
* Retrieve a paginated list of send invoices. Results can be filtered by various criteria such as company, date ranges, document number, and free-text search (`q`). Returns invoice metadata; set `include_payload` to true to include the full invoice content. **Send** invoices are outbound sales invoices transmitted to customers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/).
|
|
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/).
|
|
159
166
|
* @summary List invoices
|
|
160
167
|
* @param {number} [companyId] Company id
|
|
161
168
|
* @param {string} [identifier] SDI identifier.
|
|
@@ -169,7 +176,9 @@ export declare const SendApiFp: (configuration?: Configuration) => {
|
|
|
169
176
|
* @param {string} [documentDateFrom] UTC ISO 8601 (2024-11-29T12:34:56Z)
|
|
170
177
|
* @param {string} [documentDateTo] UTC ISO 8601 (2024-11-29T12:34:56Z)
|
|
171
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.
|
|
172
180
|
* @param {boolean} [includePayload] Include payload in the response. Defaults to false.
|
|
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.
|
|
173
182
|
* @param {number} [page] Page number.
|
|
174
183
|
* @param {number} [pageSize] Items per page. Cannot be greater than 200.
|
|
175
184
|
* @param {string} [sort] Sort by field. Prefix with \'-\' for descending order.
|
|
@@ -177,7 +186,7 @@ export declare const SendApiFp: (configuration?: Configuration) => {
|
|
|
177
186
|
* @param {*} [options] Override http request option.
|
|
178
187
|
* @throws {RequiredError}
|
|
179
188
|
*/
|
|
180
|
-
sendGet(companyId?: number, identifier?: string, committente?: string, prestatore?: string, fileName?: string, lastUpdateFrom?: string, lastUpdateTo?: string, dateSentFrom?: string, dateSentTo?: string, documentDateFrom?: string, documentDateTo?: string, documentNumber?: string, includePayload?: boolean, page?: number, pageSize?: number, sort?: string, q?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Send>>>;
|
|
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>>>;
|
|
181
190
|
/**
|
|
182
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/).
|
|
183
192
|
* @summary Get a invoice by id
|
|
@@ -205,25 +214,27 @@ export declare const SendApiFp: (configuration?: Configuration) => {
|
|
|
205
214
|
*/
|
|
206
215
|
sendIdentifierGet(identifier: string, includePayload?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Send>>;
|
|
207
216
|
/**
|
|
208
|
-
* 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.
|
|
209
218
|
* @summary Add an invoice by json
|
|
210
219
|
* @param {object} body
|
|
211
220
|
* @param {boolean} [validate] Validate the document first, and reject it on failure.
|
|
212
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.
|
|
213
223
|
* @param {*} [options] Override http request option.
|
|
214
224
|
* @throws {RequiredError}
|
|
215
225
|
*/
|
|
216
|
-
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>>;
|
|
217
227
|
/**
|
|
218
|
-
* 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.
|
|
219
229
|
* @summary Add an invoice
|
|
220
230
|
* @param {Send} send
|
|
221
231
|
* @param {boolean} [validate] Validate the document first, and reject it on failure.
|
|
222
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.
|
|
223
234
|
* @param {*} [options] Override http request option.
|
|
224
235
|
* @throws {RequiredError}
|
|
225
236
|
*/
|
|
226
|
-
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>>;
|
|
227
238
|
/**
|
|
228
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/).
|
|
229
240
|
* @summary Validate an invoice file
|
|
@@ -233,7 +244,7 @@ export declare const SendApiFp: (configuration?: Configuration) => {
|
|
|
233
244
|
*/
|
|
234
245
|
sendValidateFilePost(file: File, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
|
|
235
246
|
/**
|
|
236
|
-
* 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/).
|
|
237
248
|
* @summary Validate an invoice by json
|
|
238
249
|
* @param {object} body
|
|
239
250
|
* @param {*} [options] Override http request option.
|
|
@@ -257,32 +268,34 @@ export declare const SendApiFp: (configuration?: Configuration) => {
|
|
|
257
268
|
*/
|
|
258
269
|
sendValidateXmlPost(body: object, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
|
|
259
270
|
/**
|
|
260
|
-
* 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.
|
|
261
272
|
* @summary Add an invoice by xml
|
|
262
273
|
* @param {object} body
|
|
263
274
|
* @param {boolean} [validate] Validate the document first, and reject it on failure.
|
|
264
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.
|
|
265
277
|
* @param {*} [options] Override http request option.
|
|
266
278
|
* @throws {RequiredError}
|
|
267
279
|
*/
|
|
268
|
-
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>>;
|
|
269
281
|
};
|
|
270
282
|
/**
|
|
271
283
|
* SendApi - factory interface
|
|
272
284
|
*/
|
|
273
285
|
export declare const SendApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
|
|
274
286
|
/**
|
|
275
|
-
* 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.
|
|
276
288
|
* @summary Add an invoice by file
|
|
277
289
|
* @param {File} file
|
|
278
290
|
* @param {boolean} [validate] Validate the document first, and reject it on failure.
|
|
279
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.
|
|
280
293
|
* @param {*} [options] Override http request option.
|
|
281
294
|
* @throws {RequiredError}
|
|
282
295
|
*/
|
|
283
|
-
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>;
|
|
284
297
|
/**
|
|
285
|
-
* Retrieve a paginated list of send invoices. Results can be filtered by various criteria such as company, date ranges, document number, and free-text search (`q`). Returns invoice metadata; set `include_payload` to true to include the full invoice content. **Send** invoices are outbound sales invoices transmitted to customers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/).
|
|
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/).
|
|
286
299
|
* @summary List invoices
|
|
287
300
|
* @param {number} [companyId] Company id
|
|
288
301
|
* @param {string} [identifier] SDI identifier.
|
|
@@ -296,7 +309,9 @@ export declare const SendApiFactory: (configuration?: Configuration, basePath?:
|
|
|
296
309
|
* @param {string} [documentDateFrom] UTC ISO 8601 (2024-11-29T12:34:56Z)
|
|
297
310
|
* @param {string} [documentDateTo] UTC ISO 8601 (2024-11-29T12:34:56Z)
|
|
298
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.
|
|
299
313
|
* @param {boolean} [includePayload] Include payload in the response. Defaults to false.
|
|
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.
|
|
300
315
|
* @param {number} [page] Page number.
|
|
301
316
|
* @param {number} [pageSize] Items per page. Cannot be greater than 200.
|
|
302
317
|
* @param {string} [sort] Sort by field. Prefix with \'-\' for descending order.
|
|
@@ -304,7 +319,7 @@ export declare const SendApiFactory: (configuration?: Configuration, basePath?:
|
|
|
304
319
|
* @param {*} [options] Override http request option.
|
|
305
320
|
* @throws {RequiredError}
|
|
306
321
|
*/
|
|
307
|
-
sendGet(companyId?: number, identifier?: string, committente?: string, prestatore?: string, fileName?: string, lastUpdateFrom?: string, lastUpdateTo?: string, dateSentFrom?: string, dateSentTo?: string, documentDateFrom?: string, documentDateTo?: string, documentNumber?: string, includePayload?: boolean, page?: number, pageSize?: number, sort?: string, q?: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<Send>>;
|
|
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>>;
|
|
308
323
|
/**
|
|
309
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/).
|
|
310
325
|
* @summary Get a invoice by id
|
|
@@ -332,25 +347,27 @@ export declare const SendApiFactory: (configuration?: Configuration, basePath?:
|
|
|
332
347
|
*/
|
|
333
348
|
sendIdentifierGet(identifier: string, includePayload?: boolean, options?: RawAxiosRequestConfig): AxiosPromise<Send>;
|
|
334
349
|
/**
|
|
335
|
-
* 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.
|
|
336
351
|
* @summary Add an invoice by json
|
|
337
352
|
* @param {object} body
|
|
338
353
|
* @param {boolean} [validate] Validate the document first, and reject it on failure.
|
|
339
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.
|
|
340
356
|
* @param {*} [options] Override http request option.
|
|
341
357
|
* @throws {RequiredError}
|
|
342
358
|
*/
|
|
343
|
-
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>;
|
|
344
360
|
/**
|
|
345
|
-
* 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.
|
|
346
362
|
* @summary Add an invoice
|
|
347
363
|
* @param {Send} send
|
|
348
364
|
* @param {boolean} [validate] Validate the document first, and reject it on failure.
|
|
349
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.
|
|
350
367
|
* @param {*} [options] Override http request option.
|
|
351
368
|
* @throws {RequiredError}
|
|
352
369
|
*/
|
|
353
|
-
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>;
|
|
354
371
|
/**
|
|
355
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/).
|
|
356
373
|
* @summary Validate an invoice file
|
|
@@ -360,7 +377,7 @@ export declare const SendApiFactory: (configuration?: Configuration, basePath?:
|
|
|
360
377
|
*/
|
|
361
378
|
sendValidateFilePost(file: File, options?: RawAxiosRequestConfig): AxiosPromise<void>;
|
|
362
379
|
/**
|
|
363
|
-
* 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/).
|
|
364
381
|
* @summary Validate an invoice by json
|
|
365
382
|
* @param {object} body
|
|
366
383
|
* @param {*} [options] Override http request option.
|
|
@@ -384,32 +401,34 @@ export declare const SendApiFactory: (configuration?: Configuration, basePath?:
|
|
|
384
401
|
*/
|
|
385
402
|
sendValidateXmlPost(body: object, options?: RawAxiosRequestConfig): AxiosPromise<void>;
|
|
386
403
|
/**
|
|
387
|
-
* 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.
|
|
388
405
|
* @summary Add an invoice by xml
|
|
389
406
|
* @param {object} body
|
|
390
407
|
* @param {boolean} [validate] Validate the document first, and reject it on failure.
|
|
391
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.
|
|
392
410
|
* @param {*} [options] Override http request option.
|
|
393
411
|
* @throws {RequiredError}
|
|
394
412
|
*/
|
|
395
|
-
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>;
|
|
396
414
|
};
|
|
397
415
|
/**
|
|
398
416
|
* SendApi - interface
|
|
399
417
|
*/
|
|
400
418
|
export interface SendApiInterface {
|
|
401
419
|
/**
|
|
402
|
-
* 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.
|
|
403
421
|
* @summary Add an invoice by file
|
|
404
422
|
* @param {File} file
|
|
405
423
|
* @param {boolean} [validate] Validate the document first, and reject it on failure.
|
|
406
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.
|
|
407
426
|
* @param {*} [options] Override http request option.
|
|
408
427
|
* @throws {RequiredError}
|
|
409
428
|
*/
|
|
410
|
-
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>;
|
|
411
430
|
/**
|
|
412
|
-
* Retrieve a paginated list of send invoices. Results can be filtered by various criteria such as company, date ranges, document number, and free-text search (`q`). Returns invoice metadata; set `include_payload` to true to include the full invoice content. **Send** invoices are outbound sales invoices transmitted to customers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/).
|
|
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/).
|
|
413
432
|
* @summary List invoices
|
|
414
433
|
* @param {number} [companyId] Company id
|
|
415
434
|
* @param {string} [identifier] SDI identifier.
|
|
@@ -423,7 +442,9 @@ export interface SendApiInterface {
|
|
|
423
442
|
* @param {string} [documentDateFrom] UTC ISO 8601 (2024-11-29T12:34:56Z)
|
|
424
443
|
* @param {string} [documentDateTo] UTC ISO 8601 (2024-11-29T12:34:56Z)
|
|
425
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.
|
|
426
446
|
* @param {boolean} [includePayload] Include payload in the response. Defaults to false.
|
|
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.
|
|
427
448
|
* @param {number} [page] Page number.
|
|
428
449
|
* @param {number} [pageSize] Items per page. Cannot be greater than 200.
|
|
429
450
|
* @param {string} [sort] Sort by field. Prefix with \'-\' for descending order.
|
|
@@ -431,7 +452,7 @@ export interface SendApiInterface {
|
|
|
431
452
|
* @param {*} [options] Override http request option.
|
|
432
453
|
* @throws {RequiredError}
|
|
433
454
|
*/
|
|
434
|
-
sendGet(companyId?: number, identifier?: string, committente?: string, prestatore?: string, fileName?: string, lastUpdateFrom?: string, lastUpdateTo?: string, dateSentFrom?: string, dateSentTo?: string, documentDateFrom?: string, documentDateTo?: string, documentNumber?: string, includePayload?: boolean, page?: number, pageSize?: number, sort?: string, q?: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<Send>>;
|
|
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>>;
|
|
435
456
|
/**
|
|
436
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/).
|
|
437
458
|
* @summary Get a invoice by id
|
|
@@ -459,25 +480,27 @@ export interface SendApiInterface {
|
|
|
459
480
|
*/
|
|
460
481
|
sendIdentifierGet(identifier: string, includePayload?: boolean, options?: RawAxiosRequestConfig): AxiosPromise<Send>;
|
|
461
482
|
/**
|
|
462
|
-
* 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.
|
|
463
484
|
* @summary Add an invoice by json
|
|
464
485
|
* @param {object} body
|
|
465
486
|
* @param {boolean} [validate] Validate the document first, and reject it on failure.
|
|
466
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.
|
|
467
489
|
* @param {*} [options] Override http request option.
|
|
468
490
|
* @throws {RequiredError}
|
|
469
491
|
*/
|
|
470
|
-
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>;
|
|
471
493
|
/**
|
|
472
|
-
* 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.
|
|
473
495
|
* @summary Add an invoice
|
|
474
496
|
* @param {Send} send
|
|
475
497
|
* @param {boolean} [validate] Validate the document first, and reject it on failure.
|
|
476
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.
|
|
477
500
|
* @param {*} [options] Override http request option.
|
|
478
501
|
* @throws {RequiredError}
|
|
479
502
|
*/
|
|
480
|
-
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>;
|
|
481
504
|
/**
|
|
482
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/).
|
|
483
506
|
* @summary Validate an invoice file
|
|
@@ -487,7 +510,7 @@ export interface SendApiInterface {
|
|
|
487
510
|
*/
|
|
488
511
|
sendValidateFilePost(file: File, options?: RawAxiosRequestConfig): AxiosPromise<void>;
|
|
489
512
|
/**
|
|
490
|
-
* 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/).
|
|
491
514
|
* @summary Validate an invoice by json
|
|
492
515
|
* @param {object} body
|
|
493
516
|
* @param {*} [options] Override http request option.
|
|
@@ -511,32 +534,34 @@ export interface SendApiInterface {
|
|
|
511
534
|
*/
|
|
512
535
|
sendValidateXmlPost(body: object, options?: RawAxiosRequestConfig): AxiosPromise<void>;
|
|
513
536
|
/**
|
|
514
|
-
* 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.
|
|
515
538
|
* @summary Add an invoice by xml
|
|
516
539
|
* @param {object} body
|
|
517
540
|
* @param {boolean} [validate] Validate the document first, and reject it on failure.
|
|
518
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.
|
|
519
543
|
* @param {*} [options] Override http request option.
|
|
520
544
|
* @throws {RequiredError}
|
|
521
545
|
*/
|
|
522
|
-
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>;
|
|
523
547
|
}
|
|
524
548
|
/**
|
|
525
549
|
* SendApi - object-oriented interface
|
|
526
550
|
*/
|
|
527
551
|
export declare class SendApi extends BaseAPI implements SendApiInterface {
|
|
528
552
|
/**
|
|
529
|
-
* 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.
|
|
530
554
|
* @summary Add an invoice by file
|
|
531
555
|
* @param {File} file
|
|
532
556
|
* @param {boolean} [validate] Validate the document first, and reject it on failure.
|
|
533
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.
|
|
534
559
|
* @param {*} [options] Override http request option.
|
|
535
560
|
* @throws {RequiredError}
|
|
536
561
|
*/
|
|
537
|
-
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, {}>>;
|
|
538
563
|
/**
|
|
539
|
-
* Retrieve a paginated list of send invoices. Results can be filtered by various criteria such as company, date ranges, document number, and free-text search (`q`). Returns invoice metadata; set `include_payload` to true to include the full invoice content. **Send** invoices are outbound sales invoices transmitted to customers through Italy\'s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/).
|
|
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/).
|
|
540
565
|
* @summary List invoices
|
|
541
566
|
* @param {number} [companyId] Company id
|
|
542
567
|
* @param {string} [identifier] SDI identifier.
|
|
@@ -550,7 +575,9 @@ export declare class SendApi extends BaseAPI implements SendApiInterface {
|
|
|
550
575
|
* @param {string} [documentDateFrom] UTC ISO 8601 (2024-11-29T12:34:56Z)
|
|
551
576
|
* @param {string} [documentDateTo] UTC ISO 8601 (2024-11-29T12:34:56Z)
|
|
552
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.
|
|
553
579
|
* @param {boolean} [includePayload] Include payload in the response. Defaults to false.
|
|
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.
|
|
554
581
|
* @param {number} [page] Page number.
|
|
555
582
|
* @param {number} [pageSize] Items per page. Cannot be greater than 200.
|
|
556
583
|
* @param {string} [sort] Sort by field. Prefix with \'-\' for descending order.
|
|
@@ -558,7 +585,7 @@ export declare class SendApi extends BaseAPI implements SendApiInterface {
|
|
|
558
585
|
* @param {*} [options] Override http request option.
|
|
559
586
|
* @throws {RequiredError}
|
|
560
587
|
*/
|
|
561
|
-
sendGet(companyId?: number, identifier?: string, committente?: string, prestatore?: string, fileName?: string, lastUpdateFrom?: string, lastUpdateTo?: string, dateSentFrom?: string, dateSentTo?: string, documentDateFrom?: string, documentDateTo?: string, documentNumber?: string, includePayload?: boolean, page?: number, pageSize?: number, sort?: string, q?: string, options?: RawAxiosRequestConfig): Promise<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, {}>>;
|
|
562
589
|
/**
|
|
563
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/).
|
|
564
591
|
* @summary Get a invoice by id
|
|
@@ -586,25 +613,27 @@ export declare class SendApi extends BaseAPI implements SendApiInterface {
|
|
|
586
613
|
*/
|
|
587
614
|
sendIdentifierGet(identifier: string, includePayload?: boolean, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<Send, any, {}>>;
|
|
588
615
|
/**
|
|
589
|
-
* 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.
|
|
590
617
|
* @summary Add an invoice by json
|
|
591
618
|
* @param {object} body
|
|
592
619
|
* @param {boolean} [validate] Validate the document first, and reject it on failure.
|
|
593
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.
|
|
594
622
|
* @param {*} [options] Override http request option.
|
|
595
623
|
* @throws {RequiredError}
|
|
596
624
|
*/
|
|
597
|
-
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, {}>>;
|
|
598
626
|
/**
|
|
599
|
-
* 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.
|
|
600
628
|
* @summary Add an invoice
|
|
601
629
|
* @param {Send} send
|
|
602
630
|
* @param {boolean} [validate] Validate the document first, and reject it on failure.
|
|
603
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.
|
|
604
633
|
* @param {*} [options] Override http request option.
|
|
605
634
|
* @throws {RequiredError}
|
|
606
635
|
*/
|
|
607
|
-
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, {}>>;
|
|
608
637
|
/**
|
|
609
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/).
|
|
610
639
|
* @summary Validate an invoice file
|
|
@@ -614,7 +643,7 @@ export declare class SendApi extends BaseAPI implements SendApiInterface {
|
|
|
614
643
|
*/
|
|
615
644
|
sendValidateFilePost(file: File, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}>>;
|
|
616
645
|
/**
|
|
617
|
-
* 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/).
|
|
618
647
|
* @summary Validate an invoice by json
|
|
619
648
|
* @param {object} body
|
|
620
649
|
* @param {*} [options] Override http request option.
|
|
@@ -638,15 +667,16 @@ export declare class SendApi extends BaseAPI implements SendApiInterface {
|
|
|
638
667
|
*/
|
|
639
668
|
sendValidateXmlPost(body: object, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}>>;
|
|
640
669
|
/**
|
|
641
|
-
* 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.
|
|
642
671
|
* @summary Add an invoice by xml
|
|
643
672
|
* @param {object} body
|
|
644
673
|
* @param {boolean} [validate] Validate the document first, and reject it on failure.
|
|
645
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.
|
|
646
676
|
* @param {*} [options] Override http request option.
|
|
647
677
|
* @throws {RequiredError}
|
|
648
678
|
*/
|
|
649
|
-
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, {}>>;
|
|
650
680
|
}
|
|
651
681
|
export declare const SendFilePostSignatureEnum: {
|
|
652
682
|
readonly None: "None";
|
|
@@ -655,6 +685,18 @@ export declare const SendFilePostSignatureEnum: {
|
|
|
655
685
|
readonly Auto: "Auto";
|
|
656
686
|
};
|
|
657
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];
|
|
658
700
|
export declare const SendJsonPostSignatureEnum: {
|
|
659
701
|
readonly None: "None";
|
|
660
702
|
readonly Apply: "Apply";
|