Skip to content

Latest commit

 

History

History
253 lines (174 loc) · 8.26 KB

IssuedEInvoicesApi.md

File metadata and controls

253 lines (174 loc) · 8.26 KB

FattureInCloud\IssuedEInvoicesApi

All URIs are relative to https://api-v2.fattureincloud.it, except if the operation defines another base path.

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()

getEInvoiceRejectionReason($company_id, $document_id): \FattureInCloud\Model\GetEInvoiceRejectionReasonResponse

Get E-Invoice Rejection Reason

Get e-invoice rejection reason

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure OAuth2 access token for authorization: OAuth2AuthenticationCodeFlow
$config = FattureInCloud\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new FattureInCloud\Api\IssuedEInvoicesApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
    $company_id = 12345; // int | The ID of the company.$document_id = 56; // int | The ID of the document.
try {
    $result = $apiInstance->getEInvoiceRejectionReason($company_id, $document_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling IssuedEInvoicesApi->getEInvoiceRejectionReason: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
company_id int The ID of the company.
document_id int The ID of the document.

Return type

\FattureInCloud\Model\GetEInvoiceRejectionReasonResponse

Authorization

OAuth2AuthenticationCodeFlow

HTTP request headers

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

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

getEInvoiceXml()

getEInvoiceXml($company_id, $document_id, $include_attachment): string

Get E-Invoice XML

Downloads the e-invoice in XML format.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure OAuth2 access token for authorization: OAuth2AuthenticationCodeFlow
$config = FattureInCloud\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new FattureInCloud\Api\IssuedEInvoicesApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
    $company_id = 12345; // int | The ID of the company.$document_id = 56; // int | The ID of the document.$include_attachment = True; // bool | Include the attachment to the XML e-invoice.
try {
    $result = $apiInstance->getEInvoiceXml($company_id, $document_id, $include_attachment);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling IssuedEInvoicesApi->getEInvoiceXml: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
company_id int The ID of the company.
document_id int The ID of the document.
include_attachment bool Include the attachment to the XML e-invoice. [optional]

Return type

string

Authorization

OAuth2AuthenticationCodeFlow

HTTP request headers

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

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

sendEInvoice()

sendEInvoice($company_id, $document_id, $send_e_invoice_request): \FattureInCloud\Model\SendEInvoiceResponse

Send E-Invoice

Sends the e-invoice to SDI.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure OAuth2 access token for authorization: OAuth2AuthenticationCodeFlow
$config = FattureInCloud\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new FattureInCloud\Api\IssuedEInvoicesApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
    $company_id = 12345; // int | The ID of the company.$document_id = 56; // int | The ID of the document.$send_e_invoice_request = new \FattureInCloud\Model\SendEInvoiceRequest; // \FattureInCloud\Model\SendEInvoiceRequest | 
try {
    $result = $apiInstance->sendEInvoice($company_id, $document_id, $send_e_invoice_request);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling IssuedEInvoicesApi->sendEInvoice: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
company_id int The ID of the company.
document_id int The ID of the document.
send_e_invoice_request \FattureInCloud\Model\SendEInvoiceRequest [optional]

Return type

\FattureInCloud\Model\SendEInvoiceResponse

Authorization

OAuth2AuthenticationCodeFlow

HTTP request headers

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

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

verifyEInvoiceXml()

verifyEInvoiceXml($company_id, $document_id): \FattureInCloud\Model\VerifyEInvoiceXmlResponse

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

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure OAuth2 access token for authorization: OAuth2AuthenticationCodeFlow
$config = FattureInCloud\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new FattureInCloud\Api\IssuedEInvoicesApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
    $company_id = 12345; // int | The ID of the company.$document_id = 56; // int | The ID of the document.
try {
    $result = $apiInstance->verifyEInvoiceXml($company_id, $document_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling IssuedEInvoicesApi->verifyEInvoiceXml: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
company_id int The ID of the company.
document_id int The ID of the document.

Return type

\FattureInCloud\Model\VerifyEInvoiceXmlResponse

Authorization

OAuth2AuthenticationCodeFlow

HTTP request headers

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

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