### Security: Basic Source: https://gist.githubusercontent.com/stefanoverna/2b3248a1aece2244955d167ce760183f/raw/2fd69986fd6831e0bf2d88ed7f56a6c12f3240c0/invoicetronic.json Use your API key as the basic auth username, and an empty password. If you don't have an API key, you can get one by signing up at [Invoicetronic](https://invoicetronic.com). ```markdown ## Security: Basic **Description:** Use your API key as the basic auth username, and an empty password. If you don't have an API key, you can get one by signing up at [Invoicetronic](https://invoicetronic.com). **Type:** http **Scheme:** basic ``` -------------------------------- ### GET /export Source: https://gist.githubusercontent.com/stefanoverna/2b3248a1aece2244955d167ce760183f/raw/2fd69986fd6831e0bf2d88ed7f56a6c12f3240c0/invoicetronic.json Export invoices as a ZIP archive of FatturaPA XML files, suitable for import into accounting software (TeamSystem, Zucchetti, etc.). **Sent invoices** are only included when they have reached a definitive state (e.g., `Consegnato` for private recipients, `AccettatoDalDestinatario`, `DecorrenzaTermini`, etc.). Invoices still being processed by SDI are excluded. **Received invoices** are always included. Unread invoices are automatically marked as read and counted as operations. ### Period filters You can filter by period using either: - `year` + `month` (e.g., `year=2026&month=3` for March 2026) - `year` + `quarter` (e.g., `year=2026&quarter=1` for Q1 Jan-Mar) - `document_date_from` / `document_date_to` for a custom date range These options are mutually exclusive. The `year` parameter alone is not valid and requires either `month` or `quarter`. ### Response Returns `200` with a ZIP archive, or `204 No Content` if no invoices match the given filters. Files in the archive are organized by company VAT number (`{vat}/send/`, `{vat}/receive/`). ### Rate limiting This endpoint has a dedicated rate limit: only one export request per user can be processed at a time. Concurrent requests will receive a `429 Too Many Requests` response. ```markdown ### Parameters - **type** (string, query, optional) - **company_id** (integer (int32), query, optional): Company id - **year** (integer (int32), query, optional) - **month** (integer (int32), query, optional) - **quarter** (integer (int32), query, optional) - **document_date_from** (string (date-time), query, optional): UTC ISO 8601 (2024-11-29T12:34:56Z) - **document_date_to** (string (date-time), query, optional): UTC ISO 8601 (2024-11-29T12:34:56Z) ### Responses #### 200 - OK Empty response body #### 204 - No Content Empty response body #### 400 - Bad Request **ProblemDetails** - **type** (string) - **title** (string) - **status** (integer (int32)) - **detail** (string) - **instance** (string) ### Example Usage ```bash curl -X GET "https://api.invoicetronic.com/v1//export?type=string&company_id=0&year=0&month=0&quarter=0&document_date_from=2023-01-01T00:00:00Z&document_date_to=2023-01-01T00:00:00Z" ``` ``` -------------------------------- ### GET /status Source: https://gist.githubusercontent.com/stefanoverna/2b3248a1aece2244955d167ce760183f/raw/2fd69986fd6831e0bf2d88ed7f56a6c12f3240c0/invoicetronic.json Retrieve the number of operations (invoices + validations) and signatures left on your account. When `signature_left` is 0, you will receive a `403 Forbidden` response when trying to sign an invoice. Likewise, if `operation_left` is 0, you will receive a `403 Forbidden` response when storing or validating an invoice. You can also check your account status from the [Dashboard](https://dashboard.invoicetronic.com), where you can purchase additional operations and/or signatures. **Please note** that these values are not enforced if you are on the [Sandbox](https://invoicetronic.com/en/docs/sandbox/). ```markdown ### Responses #### 200 - OK **Status** - **operation_left** (integer (int32)): Operations (invoices and validations) left. - **signature_left** (integer (int32)): Signatures left. ### Example Usage ```bash curl -X GET "https://api.invoicetronic.com/v1//status" ``` ``` -------------------------------- ### GET /webhook Source: https://gist.githubusercontent.com/stefanoverna/2b3248a1aece2244955d167ce760183f/raw/2fd69986fd6831e0bf2d88ed7f56a6c12f3240c0/invoicetronic.json Retrieve a paginated list of webhooks. Results can be filtered by company, description, enabled status, events, and URL. **Webhooks** allow you to receive notifications to an external service when specific events occur, such as invoice creation or status updates. You can subscribe to specific events and receive a notification when they occur. You can also manage webhooks via the [Dashboard](https://dashboard.invoicetronic.com). For more information, see the **[Webhooks documentation page](https://invoicetronic.com/en/docs/webhooks/)**. ```markdown ### Parameters - **company_id** (integer (int32), query, optional): Company id - **page** (integer (int32), query, optional): Page number. - **page_size** (integer (int32), query, optional): Items per page. Cannot be greater than 200. - **sort** (string, query, optional): Sort by field. Prefix with '-' for descending order. - **description** (string, query, optional) - **enabled** (boolean, query, optional) - **events** (string, query, optional) - **url** (string, query, optional) ### Responses #### 200 - OK - Array of WebHook #### 400 - Bad Request **ProblemHttpResult** - **problem_details** (object) - **type** (string) - **title** (string) - **status** (integer (int32)) - **detail** (string) - **instance** (string) - **content_type** (string) - **status_code** (integer (int32)) #### 404 - Not Found Not Found ### Example Usage ```bash curl -X GET "https://api.invoicetronic.com/v1//webhook?company_id=0&page=1&page_size=100&sort=string&description=string&enabled=true&events=string&url=string" ``` ``` -------------------------------- ### GET /receive Source: https://gist.githubusercontent.com/stefanoverna/2b3248a1aece2244955d167ce760183f/raw/2fd69986fd6831e0bf2d88ed7f56a6c12f3240c0/invoicetronic.json Retrieve a paginated list of receive invoices. Results can be filtered by various criteria such as company, date ranges, sender, document number, and free-text search (`q`). Returns invoice metadata; set `include_payload` to true to include the full invoice content. Invoices are marked as read (`is_read` = true) only when `include_payload` is true. **Receive** invoices are inbound purchase invoices received from suppliers through Italy's SDI (Sistema di Interscambio). Preserved for two years in the live environment and 24 hours in the [Sandbox](https://invoicetronic.com/en/docs/sandbox/). ```markdown ### Parameters - **company_id** (integer (int32), query, optional): Company id - **identifier** (string, query, optional): SDI identifier. - **unread** (boolean, query, optional): Unread items only. - **committente** (string, query, optional): Vat number or fiscal code. - **prestatore** (string, query, optional): Vat number or fiscal code. - **file_name** (string, query, optional): File name. - **last_update_from** (string (date-time), query, optional): UTC ISO 8601 (2024-11-29T12:34:56Z) - **last_update_to** (string (date-time), query, optional): UTC ISO 8601 (2024-11-29T12:34:56Z) - **date_sent_from** (string (date-time), query, optional): UTC ISO 8601 (2024-11-29T12:34:56Z) - **date_sent_to** (string (date-time), query, optional): UTC ISO 8601 (2024-11-29T12:34:56Z) - **document_date_from** (string (date-time), query, optional): UTC ISO 8601 (2024-11-29T12:34:56Z) - **document_date_to** (string (date-time), query, optional): UTC ISO 8601 (2024-11-29T12:34:56Z) - **document_number** (string, query, optional): Document number. - **include_payload** (boolean, query, optional): Include payload in the response. Defaults to false. - **page** (integer (int32), query, optional): Page number. - **page_size** (integer (int32), query, optional): Items per page. Cannot be greater than 200. - **sort** (string, query, optional): Sort by field. Prefix with '-' for descending order. - **q** (string, query, optional): Full-text search across committente, prestatore, identifier, and file name. ### Responses #### 200 - OK - Array of Receive #### 400 - Bad Request **ProblemHttpResult** - **problem_details** (object) - **type** (string) - **title** (string) - **status** (integer (int32)) - **detail** (string) - **instance** (string) - **content_type** (string) - **status_code** (integer (int32)) #### 404 - Not Found Not Found ### Example Usage ```bash curl -X GET "https://api.invoicetronic.com/v1//receive?company_id=0&identifier=string&unread=true&committente=string&prestatore=string&file_name=string&last_update_from=2023-01-01T00:00:00Z&last_update_to=2023-01-01T00:00:00Z&date_sent_from=2023-01-01T00:00:00Z&date_sent_to=2023-01-01T00:00:00Z&document_date_from=2023-01-01T00:00:00Z&document_date_to=2023-01-01T00:00:00Z&document_number=string&include_payload=true&page=1&page_size=100&sort=string&q=string" ``` ``` -------------------------------- ### GET /webhook/{id} Source: https://gist.githubusercontent.com/stefanoverna/2b3248a1aece2244955d167ce760183f/raw/2fd69986fd6831e0bf2d88ed7f56a6c12f3240c0/invoicetronic.json Retrieve a webhook by its internal id. **Webhooks** allow you to receive notifications to an external service when specific events occur, such as invoice creation or status updates. You can subscribe to specific events and receive a notification when they occur. You can also manage webhooks via the [Dashboard](https://dashboard.invoicetronic.com). For more information, see the **[Webhooks documentation page](https://invoicetronic.com/en/docs/webhooks/)**. ```markdown ### Parameters - **id** (integer (int32), path, required): Item id ### Responses #### 200 - OK **WebHook** - **id** (integer (int32)): Unique identifier. Leave it at 0 for new records as it will be set automatically. - **created** (string (date-time)): Creation date. It is set automatically. - **version** (integer (int32)): Row version, for optimistic concurrency. It is set automatically. - **user_id** (integer (int32)): User id. - **company_id** (integer (int32)): Company id. - **url** (string) (required): The url of your application's endpoint that will receive a POST request when the webhook is fired. - **enabled** (boolean): Whether the webhook is enabled. On creation, this is set to `true`. - **secret** (string): The secret used to generate webhook signatures, only returned on creation. You should store this value securely and validate it on every call, to ensure that the caller is InvoicetronicApi. - **description** (string): An optional description. - **events** (array (string)): List of events that trigger the webhook. See Invoicetronic.SupportedEvents.Available for a list of valid event names. #### 404 - Not Found Not Found ### Example Usage ```bash curl -X GET "https://api.invoicetronic.com/v1//webhook/{id}" ``` ``` -------------------------------- ### GET /update Source: https://gist.githubusercontent.com/stefanoverna/2b3248a1aece2244955d167ce760183f/raw/2fd69986fd6831e0bf2d88ed7f56a6c12f3240c0/invoicetronic.json Retrieve a paginated list of updates. Results can be filtered by various criteria such as company, send item, SDI state, and date ranges. **Updates** are status notifications from Italy's SDI (Sistema di Interscambio) about invoices you sent. Multiple updates can exist for the same send item as the invoice progresses through the SDI workflow. The `state` field is the most important property and can have the following values: | Value | Name | Description | |-------|------|-------------| | 2 | `Inviato` | Sent to the SDI. | | 5 | `Consegnato` | Delivered to the recipient. | | 6 | `NonConsegnato` | Not delivered to the recipient. Only relevant for public administration entities. | | 7 | `Scartato` | Rejected by the SDI. | | 8 | `AccettatoDalDestinatario` | Accepted by the recipient. Only relevant for public administration entities. | | 9 | `RifiutatoDalDestinatario` | Rejected by the recipient. Only relevant for public administration entities. | | 10 | `ImpossibilitaDiRecapito` | Available on the recipient's tax drawer, but it was not possible to deliver it to the recipient's reception system. | | 11 | `DecorrenzaTermini` | A public administration entity has not responded for more than 15 days. The document is considered delivered. | | 12 | `AttestazioneTrasmissioneFattura` | A public administration entity has received the document, but has not yet processed it. | **Important:** Always monitor the state of your sent invoices. A state of `Inviato` only means the invoice has been submitted to SDI, not that it has been delivered. A state like `Scartato` indicates that the invoice was **not** successfully delivered and may require corrective action, such as fixing validation errors and resubmitting. In that case, `description` contains the reason for the rejection. ```markdown ### Parameters - **company_id** (integer (int32), query, optional): Company id - **identifier** (string, query, optional): SDI identifier. - **prestatore** (string, query, optional): Vat number or fiscal code. - **unread** (boolean, query, optional): Unread items only. - **send_id** (integer (int32), query, optional): Send item's id. - **state** (string (Inviato|Consegnato|NonConsegnato|Scartato|AccettatoDalDestinatario|RifiutatoDalDestinatario|ImpossibilitaDiRecapito|DecorrenzaTermini|AttestazioneTrasmissioneFattura), query, optional): SDI state - **last_update_from** (string (date-time), query, optional): UTC ISO 8601 (2024-11-29T12:34:56Z) - **last_update_to** (string (date-time), query, optional): UTC ISO 8601 (2024-11-29T12:34:56Z) - **date_sent_from** (string (date-time), query, optional): UTC ISO 8601 (2024-11-29T12:34:56Z) - **date_sent_to** (string (date-time), query, optional): UTC ISO 8601 (2024-11-29T12:34:56Z) - **page** (integer (int32), query, optional): Page number. - **page_size** (integer (int32), query, optional): Items per page. Cannot be greater than 200. - **sort** (string, query, optional): Sort by field. Prefix with '-' for descending order. ### Responses #### 200 - OK - Array of Update #### 400 - Bad Request **ProblemHttpResult** - **problem_details** (object) - **type** (string) - **title** (string) - **status** (integer (int32)) - **detail** (string) - **instance** (string) - **content_type** (string) - **status_code** (integer (int32)) #### 404 - Not Found Not Found ### Example Usage ```bash curl -X GET "https://api.invoicetronic.com/v1//update?company_id=0&identifier=string&prestatore=string&unread=true&send_id=0&state=Inviato&last_update_from=2023-01-01T00:00:00Z&last_update_to=2023-01-01T00:00:00Z&date_sent_from=2023-01-01T00:00:00Z&date_sent_to=2023-01-01T00:00:00Z&page=1&page_size=100&sort=last_update" ``` ``` -------------------------------- ### GET /update/{id} Source: https://gist.githubusercontent.com/stefanoverna/2b3248a1aece2244955d167ce760183f/raw/2fd69986fd6831e0bf2d88ed7f56a6c12f3240c0/invoicetronic.json Retrieve an update by its internal id. **Updates** are status notifications from Italy's SDI (Sistema di Interscambio) about invoices you sent. Multiple updates can exist for the same send item as the invoice progresses through the SDI workflow. The `state` field is the most important property and can have the following values: | Value | Name | Description | |-------|------|-------------| | 2 | `Inviato` | Sent to the SDI. | | 5 | `Consegnato` | Delivered to the recipient. | | 6 | `NonConsegnato` | Not delivered to the recipient. Only relevant for public administration entities. | | 7 | `Scartato` | Rejected by the SDI. | | 8 | `AccettatoDalDestinatario` | Accepted by the recipient. Only relevant for public administration entities. | | 9 | `RifiutatoDalDestinatario` | Rejected by the recipient. Only relevant for public administration entities. | | 10 | `ImpossibilitaDiRecapito` | Available on the recipient's tax drawer, but it was not possible to deliver it to the recipient's reception system. | | 11 | `DecorrenzaTermini` | A public administration entity has not responded for more than 15 days. The document is considered delivered. | | 12 | `AttestazioneTrasmissioneFattura` | A public administration entity has received the document, but has not yet processed it. | **Important:** Always monitor the state of your sent invoices. A state of `Inviato` only means the invoice has been submitted to SDI, not that it has been delivered. A state like `Scartato` indicates that the invoice was **not** successfully delivered and may require corrective action, such as fixing validation errors and resubmitting. In that case, `description` contains the reason for the rejection. ```markdown ### Parameters - **id** (integer (int32), path, required): Item id ### Responses #### 200 - OK **Update** - **id** (integer (int32)): Unique identifier. Leave it at 0 for new records as it will be set automatically. - **created** (string (date-time)): Creation date. It is set automatically. - **version** (integer (int32)): Row version, for optimistic concurrency. It is set automatically. - **user_id** (integer (int32)): User id. - **company_id** (integer (int32)): Company id. - **send_id** (integer (int32)): Send id. This is the id of the sent invoice to which this update refers to. - **last_update** (string (date-time)): Last update from SDI. - **state** (string (Inviato|Consegnato|NonConsegnato|Scartato|AccettatoDalDestinatario|RifiutatoDalDestinatario|ImpossibilitaDiRecapito|DecorrenzaTermini|AttestazioneTrasmissioneFattura)): State of the document. These are the possible values, as per the SDI documentation: ("Inviato"|"Consegnato"|"NonConsegnato"|"Scartato"|"AccettatoDalDestinatario"|"RifiutatoDalDestinatario"|"ImpossibilitaDiRecapito"|"DecorrenzaTermini"|"AttestazioneTrasmissioneFattura") - **description** (string): Description for the state. - **message_id** (string): SDI message id. - **errors** (array (Error)): SDI errors, if any. Array items: - **code** (string): Error code. - **description** (string): Error description. - **hint** (string): Hint on how to solve the issue. - **is_read** (boolean): Whether the item has been read at least once. - **send** (object): Reduced Send data for Update responses, containing only the essential fields. - **identifier** (string): SDI identifier. - **prestatore** (string): VAT number of the Cedente/Prestatore (vendor). - **meta_data** (object): Optional metadata, as json. - **documents** (array (DocumentData)): The invoices included in the payload. Array items: - **number** (string) - **date** (string (date-time)) - **date_sent** (string (date-time)): When the invoice was sent to SDI. #### 404 - Not Found Not Found ### Example Usage ```bash curl -X GET "https://api.invoicetronic.com/v1//update/{id}" ``` ``` -------------------------------- ### GET /log Source: https://gist.githubusercontent.com/stefanoverna/2b3248a1aece2244955d167ce760183f/raw/2fd69986fd6831e0bf2d88ed7f56a6c12f3240c0/invoicetronic.json Retrieve a paginated list of log events. Results can be filtered by various criteria such as endpoint, method, status code, and date ranges. **Logs** record every API request. They are preserved for 15 days. You can also view logs in the Events section of the [Dashboard](https://dashboard.invoicetronic.com). ```markdown ### Parameters - **company_id** (integer (int32), query, optional): Company id - **endpoint** (string, query, optional) - **method** (string, query, optional) - **api_verion** (integer (int32), query, optional): Api version - **status_code** (integer (int32), query, optional): Response status code - **date_created_from** (string (date-time), query, optional): UTC ISO 8601 (2024-11-29T12:34:56Z) - **date_created_to** (string (date-time), query, optional): UTC ISO 8601 (2024-11-29T12:34:56Z) - **page** (integer (int32), query, optional): Page number. - **page_size** (integer (int32), query, optional): Items per page. Cannot be greater than 200. - **sort** (string, query, optional): Sort by field. Prefix with '-' for descending order. - **query** (string, query, optional) - **success** (boolean, query, optional) - **date_time_from** (string (date-time), query, optional): Date and time of the event - **date_time_to** (string (date-time), query, optional): Date and time of the event ### Responses #### 200 - OK - Array of Event #### 400 - Bad Request **ProblemHttpResult** - **problem_details** (object) - **type** (string) - **title** (string) - **status** (integer (int32)) - **detail** (string) - **instance** (string) - **content_type** (string) - **status_code** (integer (int32)) #### 404 - Not Found Not Found ### Example Usage ```bash curl -X GET "https://api.invoicetronic.com/v1//log?company_id=0&endpoint=string&method=string&api_verion=0&status_code=0&date_created_from=2023-01-01T00:00:00Z&date_created_to=2023-01-01T00:00:00Z&page=1&page_size=100&sort=string&query=string&success=true&date_time_from=2023-01-01T00:00:00Z&date_time_to=2023-01-01T00:00:00Z" ``` ``` -------------------------------- ### GET /send Source: https://gist.githubusercontent.com/stefanoverna/2b3248a1aece2244955d167ce760183f/raw/2fd69986fd6831e0bf2d88ed7f56a6c12f3240c0/invoicetronic.json 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/). ```markdown ### Parameters - **company_id** (integer (int32), query, optional): Company id - **identifier** (string, query, optional): SDI identifier. - **committente** (string, query, optional): Vat number or fiscal code. - **prestatore** (string, query, optional): Vat number or fiscal code. - **file_name** (string, query, optional): File name. - **last_update_from** (string (date-time), query, optional): UTC ISO 8601 (2024-11-29T12:34:56Z) - **last_update_to** (string (date-time), query, optional): UTC ISO 8601 (2024-11-29T12:34:56Z) - **date_sent_from** (string (date-time), query, optional): UTC ISO 8601 (2024-11-29T12:34:56Z) - **date_sent_to** (string (date-time), query, optional): UTC ISO 8601 (2024-11-29T12:34:56Z) - **document_date_from** (string (date-time), query, optional): UTC ISO 8601 (2024-11-29T12:34:56Z) - **document_date_to** (string (date-time), query, optional): UTC ISO 8601 (2024-11-29T12:34:56Z) - **document_number** (string, query, optional): Document number. - **include_payload** (boolean, query, optional): Include payload in the response. Defaults to false. - **page** (integer (int32), query, optional): Page number. - **page_size** (integer (int32), query, optional): Items per page. Cannot be greater than 200. - **sort** (string, query, optional): Sort by field. Prefix with '-' for descending order. - **q** (string, query, optional): Full-text search across committente, prestatore, identifier, and file name. ### Responses #### 200 - OK - Array of Send #### 400 - Bad Request **ProblemHttpResult** - **problem_details** (object) - **type** (string) - **title** (string) - **status** (integer (int32)) - **detail** (string) - **instance** (string) - **content_type** (string) - **status_code** (integer (int32)) #### 404 - Not Found Not Found ### Example Usage ```bash curl -X GET "https://api.invoicetronic.com/v1//send?company_id=0&identifier=string&committente=string&prestatore=string&file_name=string&last_update_from=2023-01-01T00:00:00Z&last_update_to=2023-01-01T00:00:00Z&date_sent_from=2023-01-01T00:00:00Z&date_sent_to=2023-01-01T00:00:00Z&document_date_from=2023-01-01T00:00:00Z&document_date_to=2023-01-01T00:00:00Z&document_number=string&include_payload=true&page=1&page_size=100&sort=string&q=string" ``` ``` -------------------------------- ### GET /send/{id}/payload Source: https://gist.githubusercontent.com/stefanoverna/2b3248a1aece2244955d167ce760183f/raw/2fd69986fd6831e0bf2d88ed7f56a6c12f3240c0/invoicetronic.json Retrieve only the payload of a send invoice, without the full invoice metadata. This is useful when you already have the invoice metadata and only need the XML content. The response is a `text/plain` string, identical to the `payload` field returned by the standard GET endpoint with `include_payload=true`. Depending on how the invoice was originally submitted, the payload may be Base64-encoded or plain XML. ```markdown ### Parameters - **id** (integer (int32), path, required): Item id ### Responses #### 200 - OK Empty response body #### 404 - Not Found **ProblemDetails** - **type** (string) - **title** (string) - **status** (integer (int32)) - **detail** (string) - **instance** (string) ### Example Usage ```bash curl -X GET "https://api.invoicetronic.com/v1//send/{id}/payload" ``` ``` -------------------------------- ### POST /send/file Source: https://gist.githubusercontent.com/stefanoverna/2b3248a1aece2244955d167ce760183f/raw/2fd69986fd6831e0bf2d88ed7f56a6c12f3240c0/invoicetronic.json 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). ```markdown ### Parameters - **validate** (boolean, query, optional): Validate the document first, and reject it on failure. - **signature** (string (None|Apply|Force|Auto), query, optional): Whether to digitally sign the document. ### Request Body **Content-Type:** multipart/form-data - **file** (string (binary)) (required) ### Responses #### 201 - Created **Send** - **id** (integer (int32)): Unique identifier. Leave it at 0 for new records as it will be set automatically. - **created** (string (date-time)): Creation date. It is set automatically. - **version** (integer (int32)): Row version, for optimistic concurrency. It is set automatically. - **user_id** (integer (int32)): User id. - **company_id** (integer (int32)): Company id. On send, this is the sender and must be set in advance. On receive, it will be automatically set based on the recipient's VAT number. If a matching company is not found, the invoice will be rejected until the company is created. - **committente** (string): VAT number of the Cessionario/Committente (customer). This is automatically set based on the recipient's VAT number. - **prestatore** (string): VAT number of the Cedente/Prestatore (vendor). This is automatically set based on the sender's VAT number. - **identifier** (string): SDI identifier. This is set by the SDI and is guaranteed to be unique within the SDI system. - **file_name** (string): Xml file name. - **format** (string): SDI format (FPA12, FPR12, FSM10, ...) - **payload** (string) (required): Xml payload. This is the actual xml content, as string. On send, it can be base64 encoded. If it's not, it will be encoded before sending. It is guaranteed to be encrypted at rest. - **last_update** (string (date-time)): Last update from SDI. - **date_sent** (string (date-time)): When the invoice was sent to SDI. - **documents** (array (DocumentData)): The invoices included in the payload. This is set by the system, based on the xml content. Array items: - **number** (string) - **date** (string (date-time)) - **encoding** (string (Xml|Base64)): Whether the payload is Base64 encoded or a plain XML (text). ("Xml"|"Base64") - **meta_data** (object): Optional metadata, as json. - **company** (object): A company model. - **id** (integer (int32)): Unique identifier. Leave it at 0 for new records as it will be set automatically. - **created** (string (date-time)): Creation date. It is set automatically. - **version** (integer (int32)): Row version, for optimistic concurrency. It is set automatically. - **user_id** (integer (int32)): User id. - **vat** (string) (required): Vat number. Must include the country code. (example: "IT01234567891") - **fiscal_code** (string) (required): Fiscal code. In most cases it's the same as the vat number. (example: "RSSMRA70A01F205V") - **name** (string) (required): Name (example: "Mario Rossi Srl") #### 400 - Bad Request **ProblemHttpResult** - **problem_details** (object) - **type** (string) - **title** (string) - **status** (integer (int32)) - **detail** (string) - **instance** (string) - **content_type** (string) - **status_code** (integer (int32)) #### 422 - Unprocessable Content **ProblemDetails** - **type** (string) - **title** (string) - **status** (integer (int32)) - **detail** (string) - **instance** (string) ### Example Usage ```bash curl -X POST "https://api.invoicetronic.com/v1//send/file?validate=false&signature=Auto" \ -H "Content-Type: application/json" \ -d '{ "file": "string" }' ``` ``` -------------------------------- ### GET /receive/{id}/payload Source: https://gist.githubusercontent.com/stefanoverna/2b3248a1aece2244955d167ce760183f/raw/2fd69986fd6831e0bf2d88ed7f56a6c12f3240c0/invoicetronic.json Retrieve only the payload of a receive invoice, without the full invoice metadata. This is useful when you already have the invoice metadata and only need the XML content. The response is a `text/plain` string, identical to the `payload` field returned by the standard GET endpoint with `include_payload=true`. The invoice is marked as read (`is_read` = true) and counted as an operation, same as when retrieving the full invoice with `include_payload=true`. ```markdown ### Parameters - **id** (integer (int32), path, required): Item id ### Responses #### 200 - OK Empty response body #### 404 - Not Found **ProblemDetails** - **type** (string) - **title** (string) - **status** (integer (int32)) - **detail** (string) - **instance** (string) ### Example Usage ```bash curl -X GET "https://api.invoicetronic.com/v1//receive/{id}/payload" ``` ``` -------------------------------- ### GET /webhookhistory Source: https://gist.githubusercontent.com/stefanoverna/2b3248a1aece2244955d167ce760183f/raw/2fd69986fd6831e0bf2d88ed7f56a6c12f3240c0/invoicetronic.json Webhook history items are stored in the database and can be accessed via the API. They are preserved for 15 in both the live and sandbox environments. ```markdown ### Parameters - **page** (integer (int32), query, optional): Page number. - **page_size** (integer (int32), query, optional): Items per page. Cannot be greater than 200. - **sort** (string, query, optional): Sort by field. Prefix with '-' for descending order. - **webhook_id** (integer (int32), query, optional): WebHook id ### Responses #### 200 - OK - Array of WebHookHistory #### 400 - Bad Request **ProblemHttpResult** - **problem_details** (object) - **type** (string) - **title** (string) - **status** (integer (int32)) - **detail** (string) - **instance** (string) - **content_type** (string) - **status_code** (integer (int32)) #### 404 - Not Found Not Found ### Example Usage ```bash curl -X GET "https://api.invoicetronic.com/v1//webhookhistory?page=1&page_size=100&sort=string&webhook_id=0" ``` ``` -------------------------------- ### GET /webhookhistory/{id} Source: https://gist.githubusercontent.com/stefanoverna/2b3248a1aece2244955d167ce760183f/raw/2fd69986fd6831e0bf2d88ed7f56a6c12f3240c0/invoicetronic.json Webhook history items are stored in the database and can be accessed via the API. They are preserved for 15 in both the live and sandbox environments. ```markdown ### Parameters - **id** (integer (int32), path, required): Item id ### Responses #### 200 - OK **WebHookHistory** - **id** (integer (int32)): Unique identifier. Leave it at 0 for new records as it will be set automatically. - **created** (string (date-time)): Creation date. It is set automatically. - **version** (integer (int32)): Row version, for optimistic concurrency. It is set automatically. - **web_hook_id** (integer (int32)): Webhook id. - **user_id** (integer (int32)): User id. - **event** (string): Event name. - **status_code** (integer (int32)): Status code. - **date_time** (string (date-time)): Date and time of the request. - **success** (boolean): Whether the request was successful. #### 404 - Not Found Not Found ### Example Usage ```bash curl -X GET "https://api.invoicetronic.com/v1//webhookhistory/{id}" ``` ```