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 |
GetEInvoiceRejectionReasonResponse getEInvoiceRejectionReason(companyId, documentId)
Get E-Invoice Rejection Reason
Get e-invoice rejection reason
import fattureInCloudSdk from '@fattureincloud/fattureincloud-js-sdk';
let defaultClient = fattureInCloudSdk.ApiClient.instance;
// Configure OAuth2 access token for authorization: OAuth2AuthenticationCodeFlow
let OAuth2AuthenticationCodeFlow = defaultClient.authentications['OAuth2AuthenticationCodeFlow'];
OAuth2AuthenticationCodeFlow.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new fattureInCloudSdk.IssuedEInvoicesApi();
let companyId = 12345; // Number | The ID of the company.
let documentId = 56; // Number | The ID of the document.
apiInstance.getEInvoiceRejectionReason(companyId, documentId).then((result) => {
console.log('API called successfully. Returned result: ' + JSON.stringify(result));
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
companyId | Number | The ID of the company. | |
documentId | Number | The ID of the document. |
GetEInvoiceRejectionReasonResponse
- Content-Type: Not defined
- Accept: application/json
String getEInvoiceXml(companyId, documentId, opts)
Get E-Invoice XML
Downloads the e-invoice in XML format.
import fattureInCloudSdk from '@fattureincloud/fattureincloud-js-sdk';
let defaultClient = fattureInCloudSdk.ApiClient.instance;
// Configure OAuth2 access token for authorization: OAuth2AuthenticationCodeFlow
let OAuth2AuthenticationCodeFlow = defaultClient.authentications['OAuth2AuthenticationCodeFlow'];
OAuth2AuthenticationCodeFlow.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new fattureInCloudSdk.IssuedEInvoicesApi();
let companyId = 12345; // Number | The ID of the company.
let documentId = 56; // Number | The ID of the document.
let opts = {
'includeAttachment': true // Boolean | Include the attachment to the XML e-invoice.
};
apiInstance.getEInvoiceXml(companyId, documentId, opts).then((result) => {
console.log('API called successfully. Returned result: ' + JSON.stringify(result));
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
companyId | Number | The ID of the company. | |
documentId | Number | The ID of the document. | |
includeAttachment | Boolean | Include the attachment to the XML e-invoice. | [optional] |
String
- Content-Type: Not defined
- Accept: text/xml
SendEInvoiceResponse sendEInvoice(companyId, documentId, opts)
Send E-Invoice
Sends the e-invoice to SDI.
import fattureInCloudSdk from '@fattureincloud/fattureincloud-js-sdk';
let defaultClient = fattureInCloudSdk.ApiClient.instance;
// Configure OAuth2 access token for authorization: OAuth2AuthenticationCodeFlow
let OAuth2AuthenticationCodeFlow = defaultClient.authentications['OAuth2AuthenticationCodeFlow'];
OAuth2AuthenticationCodeFlow.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new fattureInCloudSdk.IssuedEInvoicesApi();
let companyId = 12345; // Number | The ID of the company.
let documentId = 56; // Number | The ID of the document.
let opts = {
'sendEInvoiceRequest': {"data":{"withholding_tax_causal":"causale"}} // SendEInvoiceRequest |
};
apiInstance.sendEInvoice(companyId, documentId, opts).then((result) => {
console.log('API called successfully. Returned result: ' + JSON.stringify(result));
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
companyId | Number | The ID of the company. | |
documentId | Number | The ID of the document. | |
sendEInvoiceRequest | SendEInvoiceRequest | [optional] |
- Content-Type: application/json
- Accept: application/json
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.
import fattureInCloudSdk from '@fattureincloud/fattureincloud-js-sdk';
let defaultClient = fattureInCloudSdk.ApiClient.instance;
// Configure OAuth2 access token for authorization: OAuth2AuthenticationCodeFlow
let OAuth2AuthenticationCodeFlow = defaultClient.authentications['OAuth2AuthenticationCodeFlow'];
OAuth2AuthenticationCodeFlow.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new fattureInCloudSdk.IssuedEInvoicesApi();
let companyId = 12345; // Number | The ID of the company.
let documentId = 56; // Number | The ID of the document.
apiInstance.verifyEInvoiceXml(companyId, documentId).then((result) => {
console.log('API called successfully. Returned result: ' + JSON.stringify(result));
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
companyId | Number | The ID of the company. | |
documentId | Number | The ID of the document. |
- Content-Type: Not defined
- Accept: application/json