Skip to content

Latest commit

 

History

History
303 lines (227 loc) · 10.4 KB

IssuedEInvoicesApi.md

File metadata and controls

303 lines (227 loc) · 10.4 KB

IssuedEInvoicesApi

All URIs are relative to https://api-v2.fattureincloud.it

Method HTTP request Description
getEInvoiceRejectionReason GET /c/{company_id}/issued_documents/{document_id}/e_invoice/error_reason Get E-Invoice Rejection Reason
getEInvoiceXml GET /c/{company_id}/issued_documents/{document_id}/e_invoice/xml Get E-Invoice XML
sendEInvoice POST /c/{company_id}/issued_documents/{document_id}/e_invoice/send Send E-Invoice
verifyEInvoiceXml GET /c/{company_id}/issued_documents/{document_id}/e_invoice/xml_verify Verify E-Invoice XML

getEInvoiceRejectionReason

GetEInvoiceRejectionReasonResponse getEInvoiceRejectionReason(companyId, documentId)

Get E-Invoice Rejection Reason

Get e-invoice rejection reason

Example

// Import classes:
import it.fattureincloud.sdk.ApiClient;
import it.fattureincloud.sdk.ApiException;
import it.fattureincloud.sdk.Configuration;
import it.fattureincloud.sdk.auth.*;
import it.fattureincloud.sdk.models.*;
import it.fattureincloud.sdk.api.IssuedEInvoicesApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api-v2.fattureincloud.it");
    
    // Configure OAuth2 access token for authorization: OAuth2AuthenticationCodeFlow
    OAuth OAuth2AuthenticationCodeFlow = (OAuth) defaultClient.getAuthentication("OAuth2AuthenticationCodeFlow");
    OAuth2AuthenticationCodeFlow.setAccessToken("YOUR ACCESS TOKEN");

    IssuedEInvoicesApi apiInstance = new IssuedEInvoicesApi(defaultClient);
    Integer companyId = 12345; // Integer | The ID of the company.
    Integer documentId = 56; // Integer | The ID of the document.
    try {
      GetEInvoiceRejectionReasonResponse result = apiInstance.getEInvoiceRejectionReason(companyId, documentId);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling IssuedEInvoicesApi#getEInvoiceRejectionReason");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
companyId Integer The ID of the company.
documentId Integer The ID of the document.

Return type

GetEInvoiceRejectionReasonResponse

Authorization

OAuth2AuthenticationCodeFlow

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Example response -

getEInvoiceXml

String getEInvoiceXml(companyId, documentId, includeAttachment)

Get E-Invoice XML

Downloads the e-invoice in XML format.

Example

// Import classes:
import it.fattureincloud.sdk.ApiClient;
import it.fattureincloud.sdk.ApiException;
import it.fattureincloud.sdk.Configuration;
import it.fattureincloud.sdk.auth.*;
import it.fattureincloud.sdk.models.*;
import it.fattureincloud.sdk.api.IssuedEInvoicesApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api-v2.fattureincloud.it");
    
    // Configure OAuth2 access token for authorization: OAuth2AuthenticationCodeFlow
    OAuth OAuth2AuthenticationCodeFlow = (OAuth) defaultClient.getAuthentication("OAuth2AuthenticationCodeFlow");
    OAuth2AuthenticationCodeFlow.setAccessToken("YOUR ACCESS TOKEN");

    IssuedEInvoicesApi apiInstance = new IssuedEInvoicesApi(defaultClient);
    Integer companyId = 12345; // Integer | The ID of the company.
    Integer documentId = 56; // Integer | The ID of the document.
    Boolean includeAttachment = true; // Boolean | Include the attachment to the XML e-invoice.
    try {
      String result = apiInstance.getEInvoiceXml(companyId, documentId, includeAttachment);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling IssuedEInvoicesApi#getEInvoiceXml");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
companyId Integer The ID of the company.
documentId Integer The ID of the document.
includeAttachment Boolean Include the attachment to the XML e-invoice. [optional]

Return type

String

Authorization

OAuth2AuthenticationCodeFlow

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/xml

HTTP response details

Status code Description Response headers
200 -
401 Unauthorized -
404 Not Found -

sendEInvoice

SendEInvoiceResponse sendEInvoice(companyId, documentId, sendEInvoiceRequest)

Send E-Invoice

Sends the e-invoice to SDI.

Example

// Import classes:
import it.fattureincloud.sdk.ApiClient;
import it.fattureincloud.sdk.ApiException;
import it.fattureincloud.sdk.Configuration;
import it.fattureincloud.sdk.auth.*;
import it.fattureincloud.sdk.models.*;
import it.fattureincloud.sdk.api.IssuedEInvoicesApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api-v2.fattureincloud.it");
    
    // Configure OAuth2 access token for authorization: OAuth2AuthenticationCodeFlow
    OAuth OAuth2AuthenticationCodeFlow = (OAuth) defaultClient.getAuthentication("OAuth2AuthenticationCodeFlow");
    OAuth2AuthenticationCodeFlow.setAccessToken("YOUR ACCESS TOKEN");

    IssuedEInvoicesApi apiInstance = new IssuedEInvoicesApi(defaultClient);
    Integer companyId = 12345; // Integer | The ID of the company.
    Integer documentId = 56; // Integer | The ID of the document.
    SendEInvoiceRequest sendEInvoiceRequest = new SendEInvoiceRequest(); // SendEInvoiceRequest | 
    try {
      SendEInvoiceResponse result = apiInstance.sendEInvoice(companyId, documentId, sendEInvoiceRequest);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling IssuedEInvoicesApi#sendEInvoice");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
companyId Integer The ID of the company.
documentId Integer The ID of the document.
sendEInvoiceRequest SendEInvoiceRequest [optional]

Return type

SendEInvoiceResponse

Authorization

OAuth2AuthenticationCodeFlow

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Example response -
401 Unauthorized -
404 Not Found -

verifyEInvoiceXml

VerifyEInvoiceXmlResponse verifyEInvoiceXml(companyId, documentId)

Verify E-Invoice XML

Verifies the e-invoice XML format. Checks if all of the mandatory fields are filled and compliant to the right format.

Example

// Import classes:
import it.fattureincloud.sdk.ApiClient;
import it.fattureincloud.sdk.ApiException;
import it.fattureincloud.sdk.Configuration;
import it.fattureincloud.sdk.auth.*;
import it.fattureincloud.sdk.models.*;
import it.fattureincloud.sdk.api.IssuedEInvoicesApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api-v2.fattureincloud.it");
    
    // Configure OAuth2 access token for authorization: OAuth2AuthenticationCodeFlow
    OAuth OAuth2AuthenticationCodeFlow = (OAuth) defaultClient.getAuthentication("OAuth2AuthenticationCodeFlow");
    OAuth2AuthenticationCodeFlow.setAccessToken("YOUR ACCESS TOKEN");

    IssuedEInvoicesApi apiInstance = new IssuedEInvoicesApi(defaultClient);
    Integer companyId = 12345; // Integer | The ID of the company.
    Integer documentId = 56; // Integer | The ID of the document.
    try {
      VerifyEInvoiceXmlResponse result = apiInstance.verifyEInvoiceXml(companyId, documentId);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling IssuedEInvoicesApi#verifyEInvoiceXml");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
companyId Integer The ID of the company.
documentId Integer The ID of the document.

Return type

VerifyEInvoiceXmlResponse

Authorization

OAuth2AuthenticationCodeFlow

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Example response -
401 Unauthorized -
404 Not Found -
422 Example response -