Skip to content

Latest commit

 

History

History
1056 lines (735 loc) · 38.6 KB

File metadata and controls

1056 lines (735 loc) · 38.6 KB

invoicetronic_sdk.SendApi

All URIs are relative to https://api.invoicetronic.com

Method HTTP request Description
send_file_post POST /send/file Add an invoice by file
send_get GET /send List invoices
send_id_get GET /send/{id} Get a invoice by id
send_id_payload_get GET /send/{id}/payload Get a send invoice payload by id
send_identifier_get GET /send/{identifier} Get a invoice by identifier
send_json_post POST /send/json Add an invoice by json
send_post POST /send Add an invoice
send_validate_file_post POST /send/validate/file Validate an invoice file
send_validate_json_post POST /send/validate/json Validate an invoice by json
send_validate_post POST /send/validate Validate an invoice
send_validate_xml_post POST /send/validate/xml Validate an invoice by xml
send_xml_post POST /send/xml Add an invoice by xml

send_file_post

Send send_file_post(file, validate=validate, signature=signature)

Add an invoice by file

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.

You can also upload invoices via the Dashboard.

Example

  • Basic Authentication (Basic):
import invoicetronic_sdk
from invoicetronic_sdk.models.send import Send
from invoicetronic_sdk.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.invoicetronic.com
# See configuration.py for a list of all supported configuration parameters.
configuration = invoicetronic_sdk.Configuration(
    host = "https://api.invoicetronic.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: Basic
configuration = invoicetronic_sdk.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)

# Enter a context with an instance of the API client
with invoicetronic_sdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = invoicetronic_sdk.SendApi(api_client)
    file = None # bytearray | 
    validate = False # bool | Validate the document first, and reject it on failure. (optional) (default to False)
    signature = Auto # str | Whether to digitally sign the document. (optional) (default to Auto)

    try:
        # Add an invoice by file
        api_response = api_instance.send_file_post(file, validate=validate, signature=signature)
        print("The response of SendApi->send_file_post:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling SendApi->send_file_post: %s\n" % e)

Parameters

Name Type Description Notes
file bytearray
validate bool Validate the document first, and reject it on failure. [optional] [default to False]
signature str Whether to digitally sign the document. [optional] [default to Auto]

Return type

Send

Authorization

Basic

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: application/json

HTTP response details

Status code Description Response headers
201 Created -
422 Unprocessable Content -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

send_get

List[Send] send_get(company_id=company_id, identifier=identifier, committente=committente, prestatore=prestatore, file_name=file_name, last_update_from=last_update_from, last_update_to=last_update_to, date_sent_from=date_sent_from, date_sent_to=date_sent_to, document_date_from=document_date_from, document_date_to=document_date_to, document_number=document_number, include_payload=include_payload, ids=ids, page=page, page_size=page_size, sort=sort, q=q)

List invoices

Retrieve a paginated list of send invoices. Results can be filtered by various criteria such as company, date ranges, document number, and free-text search (q). Use ids to fetch specific Send records in a single call (comma-separated, up to 100). Returns invoice metadata; set include_payload to true to include the full invoice content.

Send invoices are outbound sales invoices transmitted to customers through Italy's SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the Sandbox.

Example

  • Basic Authentication (Basic):
import invoicetronic_sdk
from invoicetronic_sdk.models.send import Send
from invoicetronic_sdk.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.invoicetronic.com
# See configuration.py for a list of all supported configuration parameters.
configuration = invoicetronic_sdk.Configuration(
    host = "https://api.invoicetronic.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: Basic
configuration = invoicetronic_sdk.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)

# Enter a context with an instance of the API client
with invoicetronic_sdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = invoicetronic_sdk.SendApi(api_client)
    company_id = 56 # int | Company id (optional)
    identifier = 'identifier_example' # str | SDI identifier. (optional)
    committente = 'committente_example' # str | Vat number or fiscal code. (optional)
    prestatore = 'prestatore_example' # str | Vat number or fiscal code. (optional)
    file_name = 'file_name_example' # str | File name. (optional)
    last_update_from = '2013-10-20T19:20:30+01:00' # datetime | UTC ISO 8601 (2024-11-29T12:34:56Z) (optional)
    last_update_to = '2013-10-20T19:20:30+01:00' # datetime | UTC ISO 8601 (2024-11-29T12:34:56Z) (optional)
    date_sent_from = '2013-10-20T19:20:30+01:00' # datetime | UTC ISO 8601 (2024-11-29T12:34:56Z) (optional)
    date_sent_to = '2013-10-20T19:20:30+01:00' # datetime | UTC ISO 8601 (2024-11-29T12:34:56Z) (optional)
    document_date_from = '2013-10-20T19:20:30+01:00' # datetime | UTC ISO 8601 (2024-11-29T12:34:56Z) (optional)
    document_date_to = '2013-10-20T19:20:30+01:00' # datetime | UTC ISO 8601 (2024-11-29T12:34:56Z) (optional)
    document_number = 'document_number_example' # str | Document number. (optional)
    include_payload = True # bool | Include payload in the response. Defaults to false. (optional)
    ids = 'ids_example' # str | Comma-separated list of Send ids (max 100). Filters the collection to the matching rows; unknown or unauthorized ids are silently skipped. (optional)
    page = 1 # int | Page number. (optional) (default to 1)
    page_size = 100 # int | Items per page. Cannot be greater than 200. (optional) (default to 100)
    sort = 'sort_example' # str | Sort by field. Prefix with '-' for descending order. (optional)
    q = 'q_example' # str | Full-text search across committente, prestatore, identifier, and file name. (optional)

    try:
        # List invoices
        api_response = api_instance.send_get(company_id=company_id, identifier=identifier, committente=committente, prestatore=prestatore, file_name=file_name, last_update_from=last_update_from, last_update_to=last_update_to, date_sent_from=date_sent_from, date_sent_to=date_sent_to, document_date_from=document_date_from, document_date_to=document_date_to, document_number=document_number, include_payload=include_payload, ids=ids, page=page, page_size=page_size, sort=sort, q=q)
        print("The response of SendApi->send_get:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling SendApi->send_get: %s\n" % e)

Parameters

Name Type Description Notes
company_id int Company id [optional]
identifier str SDI identifier. [optional]
committente str Vat number or fiscal code. [optional]
prestatore str Vat number or fiscal code. [optional]
file_name str File name. [optional]
last_update_from datetime UTC ISO 8601 (2024-11-29T12:34:56Z) [optional]
last_update_to datetime UTC ISO 8601 (2024-11-29T12:34:56Z) [optional]
date_sent_from datetime UTC ISO 8601 (2024-11-29T12:34:56Z) [optional]
date_sent_to datetime UTC ISO 8601 (2024-11-29T12:34:56Z) [optional]
document_date_from datetime UTC ISO 8601 (2024-11-29T12:34:56Z) [optional]
document_date_to datetime UTC ISO 8601 (2024-11-29T12:34:56Z) [optional]
document_number str Document number. [optional]
include_payload bool Include payload in the response. Defaults to false. [optional]
ids str Comma-separated list of Send ids (max 100). Filters the collection to the matching rows; unknown or unauthorized ids are silently skipped. [optional]
page int Page number. [optional] [default to 1]
page_size int Items per page. Cannot be greater than 200. [optional] [default to 100]
sort str Sort by field. Prefix with '-' for descending order. [optional]
q str Full-text search across committente, prestatore, identifier, and file name. [optional]

Return type

List[Send]

Authorization

Basic

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 OK -
404 Not Found -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

send_id_get

Send send_id_get(id, include_payload=include_payload)

Get a invoice by id

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.

Example

  • Basic Authentication (Basic):
import invoicetronic_sdk
from invoicetronic_sdk.models.send import Send
from invoicetronic_sdk.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.invoicetronic.com
# See configuration.py for a list of all supported configuration parameters.
configuration = invoicetronic_sdk.Configuration(
    host = "https://api.invoicetronic.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: Basic
configuration = invoicetronic_sdk.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)

# Enter a context with an instance of the API client
with invoicetronic_sdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = invoicetronic_sdk.SendApi(api_client)
    id = 56 # int | Item id
    include_payload = False # bool | Include payload in the response. Defaults to false. (optional) (default to False)

    try:
        # Get a invoice by id
        api_response = api_instance.send_id_get(id, include_payload=include_payload)
        print("The response of SendApi->send_id_get:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling SendApi->send_id_get: %s\n" % e)

Parameters

Name Type Description Notes
id int Item id
include_payload bool Include payload in the response. Defaults to false. [optional] [default to False]

Return type

Send

Authorization

Basic

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 OK -
404 Not Found -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

send_id_payload_get

send_id_payload_get(id)

Get a send invoice payload by id

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.

Example

  • Basic Authentication (Basic):
import invoicetronic_sdk
from invoicetronic_sdk.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.invoicetronic.com
# See configuration.py for a list of all supported configuration parameters.
configuration = invoicetronic_sdk.Configuration(
    host = "https://api.invoicetronic.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: Basic
configuration = invoicetronic_sdk.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)

# Enter a context with an instance of the API client
with invoicetronic_sdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = invoicetronic_sdk.SendApi(api_client)
    id = 56 # int | Item id

    try:
        # Get a send invoice payload by id
        api_instance.send_id_payload_get(id)
    except Exception as e:
        print("Exception when calling SendApi->send_id_payload_get: %s\n" % e)

Parameters

Name Type Description Notes
id int Item id

Return type

void (empty response body)

Authorization

Basic

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/problem+json

HTTP response details

Status code Description Response headers
200 OK -
404 Not Found -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

send_identifier_get

Send send_identifier_get(identifier, include_payload=include_payload)

Get a invoice by identifier

Retrieve a send invoice by its SDI identifier. The identifier is assigned by the SDI and becomes available after the invoice has been accepted. 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.

Example

  • Basic Authentication (Basic):
import invoicetronic_sdk
from invoicetronic_sdk.models.send import Send
from invoicetronic_sdk.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.invoicetronic.com
# See configuration.py for a list of all supported configuration parameters.
configuration = invoicetronic_sdk.Configuration(
    host = "https://api.invoicetronic.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: Basic
configuration = invoicetronic_sdk.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)

# Enter a context with an instance of the API client
with invoicetronic_sdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = invoicetronic_sdk.SendApi(api_client)
    identifier = 'identifier_example' # str | 
    include_payload = False # bool | Include payload in the response. Defaults to false. (optional) (default to False)

    try:
        # Get a invoice by identifier
        api_response = api_instance.send_identifier_get(identifier, include_payload=include_payload)
        print("The response of SendApi->send_identifier_get:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling SendApi->send_identifier_get: %s\n" % e)

Parameters

Name Type Description Notes
identifier str
include_payload bool Include payload in the response. Defaults to false. [optional] [default to False]

Return type

Send

Authorization

Basic

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 OK -
404 Not Found -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

send_json_post

Send send_json_post(body, validate=validate, signature=signature)

Add an invoice by json

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.

You can also upload invoices via the Dashboard.

Example

  • Basic Authentication (Basic):
import invoicetronic_sdk
from invoicetronic_sdk.models.send import Send
from invoicetronic_sdk.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.invoicetronic.com
# See configuration.py for a list of all supported configuration parameters.
configuration = invoicetronic_sdk.Configuration(
    host = "https://api.invoicetronic.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: Basic
configuration = invoicetronic_sdk.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)

# Enter a context with an instance of the API client
with invoicetronic_sdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = invoicetronic_sdk.SendApi(api_client)
    body = None # object | 
    validate = False # bool | Validate the document first, and reject it on failure. (optional) (default to False)
    signature = Auto # str | Whether to digitally sign the document. (optional) (default to Auto)

    try:
        # Add an invoice by json
        api_response = api_instance.send_json_post(body, validate=validate, signature=signature)
        print("The response of SendApi->send_json_post:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling SendApi->send_json_post: %s\n" % e)

Parameters

Name Type Description Notes
body object
validate bool Validate the document first, and reject it on failure. [optional] [default to False]
signature str Whether to digitally sign the document. [optional] [default to Auto]

Return type

Send

Authorization

Basic

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
201 Created -
422 Unprocessable Content -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

send_post

Send send_post(send, validate=validate, signature=signature)

Add an invoice

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.

You can also upload invoices via the Dashboard.

Example

  • Basic Authentication (Basic):
import invoicetronic_sdk
from invoicetronic_sdk.models.send import Send
from invoicetronic_sdk.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.invoicetronic.com
# See configuration.py for a list of all supported configuration parameters.
configuration = invoicetronic_sdk.Configuration(
    host = "https://api.invoicetronic.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: Basic
configuration = invoicetronic_sdk.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)

# Enter a context with an instance of the API client
with invoicetronic_sdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = invoicetronic_sdk.SendApi(api_client)
    send = invoicetronic_sdk.Send() # Send | 
    validate = False # bool | Validate the document first, and reject it on failure. (optional) (default to False)
    signature = Auto # str | Whether to digitally sign the document. (optional) (default to Auto)

    try:
        # Add an invoice
        api_response = api_instance.send_post(send, validate=validate, signature=signature)
        print("The response of SendApi->send_post:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling SendApi->send_post: %s\n" % e)

Parameters

Name Type Description Notes
send Send
validate bool Validate the document first, and reject it on failure. [optional] [default to False]
signature str Whether to digitally sign the document. [optional] [default to Auto]

Return type

Send

Authorization

Basic

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
201 Created -
422 Unprocessable Content -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

send_validate_file_post

send_validate_file_post(file)

Validate an invoice file

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.

Example

  • Basic Authentication (Basic):
import invoicetronic_sdk
from invoicetronic_sdk.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.invoicetronic.com
# See configuration.py for a list of all supported configuration parameters.
configuration = invoicetronic_sdk.Configuration(
    host = "https://api.invoicetronic.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: Basic
configuration = invoicetronic_sdk.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)

# Enter a context with an instance of the API client
with invoicetronic_sdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = invoicetronic_sdk.SendApi(api_client)
    file = None # bytearray | 

    try:
        # Validate an invoice file
        api_instance.send_validate_file_post(file)
    except Exception as e:
        print("Exception when calling SendApi->send_validate_file_post: %s\n" % e)

Parameters

Name Type Description Notes
file bytearray

Return type

void (empty response body)

Authorization

Basic

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: application/json

HTTP response details

Status code Description Response headers
204 No Content -
422 Unprocessable Content -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

send_validate_json_post

send_validate_json_post(body)

Validate an invoice by json

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.

Example

  • Basic Authentication (Basic):
import invoicetronic_sdk
from invoicetronic_sdk.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.invoicetronic.com
# See configuration.py for a list of all supported configuration parameters.
configuration = invoicetronic_sdk.Configuration(
    host = "https://api.invoicetronic.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: Basic
configuration = invoicetronic_sdk.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)

# Enter a context with an instance of the API client
with invoicetronic_sdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = invoicetronic_sdk.SendApi(api_client)
    body = None # object | 

    try:
        # Validate an invoice by json
        api_instance.send_validate_json_post(body)
    except Exception as e:
        print("Exception when calling SendApi->send_validate_json_post: %s\n" % e)

Parameters

Name Type Description Notes
body object

Return type

void (empty response body)

Authorization

Basic

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
204 No Content -
422 Unprocessable Content -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

send_validate_post

send_validate_post(send)

Validate an invoice

Validate an 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.

Example

  • Basic Authentication (Basic):
import invoicetronic_sdk
from invoicetronic_sdk.models.send import Send
from invoicetronic_sdk.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.invoicetronic.com
# See configuration.py for a list of all supported configuration parameters.
configuration = invoicetronic_sdk.Configuration(
    host = "https://api.invoicetronic.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: Basic
configuration = invoicetronic_sdk.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)

# Enter a context with an instance of the API client
with invoicetronic_sdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = invoicetronic_sdk.SendApi(api_client)
    send = invoicetronic_sdk.Send() # Send | 

    try:
        # Validate an invoice
        api_instance.send_validate_post(send)
    except Exception as e:
        print("Exception when calling SendApi->send_validate_post: %s\n" % e)

Parameters

Name Type Description Notes
send Send

Return type

void (empty response body)

Authorization

Basic

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
204 No Content -
422 Unprocessable Content -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

send_validate_xml_post

send_validate_xml_post(body)

Validate an invoice by xml

Validate an XML invoice document 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.

Example

  • Basic Authentication (Basic):
import invoicetronic_sdk
from invoicetronic_sdk.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.invoicetronic.com
# See configuration.py for a list of all supported configuration parameters.
configuration = invoicetronic_sdk.Configuration(
    host = "https://api.invoicetronic.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: Basic
configuration = invoicetronic_sdk.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)

# Enter a context with an instance of the API client
with invoicetronic_sdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = invoicetronic_sdk.SendApi(api_client)
    body = None # object | 

    try:
        # Validate an invoice by xml
        api_instance.send_validate_xml_post(body)
    except Exception as e:
        print("Exception when calling SendApi->send_validate_xml_post: %s\n" % e)

Parameters

Name Type Description Notes
body object

Return type

void (empty response body)

Authorization

Basic

HTTP request headers

  • Content-Type: application/xml
  • Accept: application/json

HTTP response details

Status code Description Response headers
204 No Content -
422 Unprocessable Content -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

send_xml_post

Send send_xml_post(body, validate=validate, signature=signature)

Add an invoice by xml

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.

You can also upload invoices via the Dashboard.

Example

  • Basic Authentication (Basic):
import invoicetronic_sdk
from invoicetronic_sdk.models.send import Send
from invoicetronic_sdk.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.invoicetronic.com
# See configuration.py for a list of all supported configuration parameters.
configuration = invoicetronic_sdk.Configuration(
    host = "https://api.invoicetronic.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: Basic
configuration = invoicetronic_sdk.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)

# Enter a context with an instance of the API client
with invoicetronic_sdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = invoicetronic_sdk.SendApi(api_client)
    body = None # object | 
    validate = False # bool | Validate the document first, and reject it on failure. (optional) (default to False)
    signature = Auto # str | Whether to digitally sign the document. (optional) (default to Auto)

    try:
        # Add an invoice by xml
        api_response = api_instance.send_xml_post(body, validate=validate, signature=signature)
        print("The response of SendApi->send_xml_post:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling SendApi->send_xml_post: %s\n" % e)

Parameters

Name Type Description Notes
body object
validate bool Validate the document first, and reject it on failure. [optional] [default to False]
signature str Whether to digitally sign the document. [optional] [default to Auto]

Return type

Send

Authorization

Basic

HTTP request headers

  • Content-Type: application/xml
  • Accept: application/json

HTTP response details

Status code Description Response headers
201 Created -
422 Unprocessable Content -

[Back to top] [Back to API list] [Back to Model list] [Back to README]