Skip to content

fattureincloud/fattureincloud-csharp-sdk

Repository files navigation

FattureInCloud C# SDK

NuGet unit tests

Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy.

The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol.

This C# SDK is automatically generated by the OpenAPI Generator project:

  • API version: 2.1.3
  • SDK version: 2.1.1
  • Build package: org.openapitools.codegen.languages.CSharpClientCodegen

For more information, please visit https://www.fattureincloud.it

Frameworks supported

  • .NET Core >=1.0
  • .NET Framework >=4.6
  • Mono/Xamarin >=vNext

Dependencies

The DLLs included in the package may not be the latest version. We recommend using NuGet to obtain the latest version of the packages:

Install-Package RestSharp
Install-Package Newtonsoft.Json
Install-Package JsonSubTypes
Install-Package System.ComponentModel.Annotations

NOTE: RestSharp versions greater than 105.1.0 have a bug which causes file uploads to fail. See RestSharp#742. NOTE: RestSharp for .Net Core creates a new socket for each api call, which can lead to a socket exhaustion problem. See RestSharp#1406.

Installation

To install the bindings via Nuget, run the following command:

dotnet add package It.FattureInCloud.Sdk

Then add the following namespaces to your project:

using It.FattureInCloud.Sdk.Api;
using It.FattureInCloud.Sdk.Client;
using It.FattureInCloud.Sdk.Model;

Usage

To use the API client with a HTTP proxy, setup a System.Net.WebProxy

Configuration c = new Configuration();
System.Net.WebProxy webProxy = new System.Net.WebProxy("http://myProxyUrl:80/");
webProxy.Credentials = System.Net.CredentialCache.DefaultCredentials;
c.Proxy = webProxy;

Getting Started

using System.Collections.Generic;
using System.Diagnostics;
using It.FattureInCloud.Sdk.Api;
using It.FattureInCloud.Sdk.Client;
using It.FattureInCloud.Sdk.Model;

namespace Example
{
    public class Example
    {
        public static void Main()
        {

            Configuration config = new Configuration();
            config.BasePath = "https://api-v2.fattureincloud.it";
            // Configure OAuth2 access token for authorization: OAuth2AuthenticationCodeFlow
            config.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new ArchiveApi(config);
            var companyId = 12345;  // int | The ID of the company.
            var createArchiveDocumentRequest = new CreateArchiveDocumentRequest(); // CreateArchiveDocumentRequest | The Archive Document. (optional) 

            try
            {
                // Create Archive Document
                CreateArchiveDocumentResponse result = apiInstance.CreateArchiveDocument(companyId, createArchiveDocumentRequest);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling ArchiveApi.CreateArchiveDocument: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }

        }
    }
}

Documentation for API Endpoints

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

Class Method HTTP request Description
ArchiveApi CreateArchiveDocument POST /c/{company_id}/archive Create Archive Document
ArchiveApi DeleteArchiveDocument DELETE /c/{company_id}/archive/{document_id} Delete Archive Document
ArchiveApi GetArchiveDocument GET /c/{company_id}/archive/{document_id} Get Archive Document
ArchiveApi ListArchiveDocuments GET /c/{company_id}/archive List Archive Documents
ArchiveApi ModifyArchiveDocument PUT /c/{company_id}/archive/{document_id} Modify Archive Document
ArchiveApi UploadArchiveDocumentAttachment POST /c/{company_id}/archive/attachment Upload Archive Document Attachment
CashbookApi CreateCashbookEntry POST /c/{company_id}/cashbook Create Cashbook Entry
CashbookApi DeleteCashbookEntry DELETE /c/{company_id}/cashbook/{document_id} Delete Cashbook Entry
CashbookApi GetCashbookEntry GET /c/{company_id}/cashbook/{document_id} Get Cashbook Entry
CashbookApi ListCashbookEntries GET /c/{company_id}/cashbook List Cashbook Entries
CashbookApi ModifyCashbookEntry PUT /c/{company_id}/cashbook/{document_id} Modify Cashbook Entry
ClientsApi CreateClient POST /c/{company_id}/entities/clients Create Client
ClientsApi DeleteClient DELETE /c/{company_id}/entities/clients/{client_id} Delete Client
ClientsApi GetClient GET /c/{company_id}/entities/clients/{client_id} Get Client
ClientsApi ListClients GET /c/{company_id}/entities/clients List Clients
ClientsApi ModifyClient PUT /c/{company_id}/entities/clients/{client_id} Modify Client
CompaniesApi GetCompanyInfo GET /c/{company_id}/company/info Get Company Info
CompaniesApi GetCompanyPlanUsage GET /c/{company_id}/company/plan_usage Get Company Plan Usage
EmailsApi ListEmails GET /c/{company_id}/emails List Emails
InfoApi ListArchiveCategories GET /c/{company_id}/info/archive_categories List Archive Categories
InfoApi ListCities GET /info/cities List Cities
InfoApi ListCostCenters GET /c/{company_id}/info/cost_centers List Cost Centers
InfoApi ListCountries GET /info/countries List Countries
InfoApi ListCurrencies GET /info/currencies List Currencies
InfoApi ListDeliveryNotesDefaultCausals GET /info/dn_causals List Delivery Notes Default Causals
InfoApi ListDetailedCountries GET /info/detailed_countries List Detailed Countries
InfoApi ListLanguages GET /info/languages List Languages
InfoApi ListPaymentAccounts GET /c/{company_id}/info/payment_accounts List Payment Accounts
InfoApi ListPaymentMethods GET /c/{company_id}/info/payment_methods List Payment Methods
InfoApi ListProductCategories GET /c/{company_id}/info/product_categories List Product Categories
InfoApi ListReceivedDocumentCategories GET /c/{company_id}/info/received_document_categories List Received Document Categories
InfoApi ListRevenueCenters GET /c/{company_id}/info/revenue_centers List Revenue Centers
InfoApi ListTemplates GET /info/templates List Templates
InfoApi ListUnitsOfMeasure GET /info/measures List Units of Measure
InfoApi ListVatTypes GET /c/{company_id}/info/vat_types List Vat Types
IssuedDocumentsApi CreateIssuedDocument POST /c/{company_id}/issued_documents Create Issued Document
IssuedDocumentsApi DeleteIssuedDocument DELETE /c/{company_id}/issued_documents/{document_id} Delete Issued Document
IssuedDocumentsApi DeleteIssuedDocumentAttachment DELETE /c/{company_id}/issued_documents/{document_id}/attachment Delete Issued Document Attachment
IssuedDocumentsApi GetEmailData GET /c/{company_id}/issued_documents/{document_id}/email Get Email Data
IssuedDocumentsApi GetExistingIssuedDocumentTotals POST /c/{company_id}/issued_documents/{document_id}/totals Get Existing Issued Document Totals
IssuedDocumentsApi GetIssuedDocument GET /c/{company_id}/issued_documents/{document_id} Get Issued Document
IssuedDocumentsApi GetIssuedDocumentPreCreateInfo GET /c/{company_id}/issued_documents/info Get Issued Document Pre-Create Info
IssuedDocumentsApi GetNewIssuedDocumentTotals POST /c/{company_id}/issued_documents/totals Get New Issued Document Totals
IssuedDocumentsApi JoinIssuedDocuments GET /c/{company_id}/issued_documents/join Join Issued Documents
IssuedDocumentsApi ListIssuedDocuments GET /c/{company_id}/issued_documents List Issued Documents
IssuedDocumentsApi ModifyIssuedDocument PUT /c/{company_id}/issued_documents/{document_id} Modify Issued Document
IssuedDocumentsApi ScheduleEmail POST /c/{company_id}/issued_documents/{document_id}/email Schedule Email
IssuedDocumentsApi TransformIssuedDocument GET /c/{company_id}/issued_documents/transform Transform Issued Document
IssuedDocumentsApi UploadIssuedDocumentAttachment POST /c/{company_id}/issued_documents/attachment Upload Issued Document Attachment
IssuedEInvoicesApi GetEInvoiceRejectionReason GET /c/{company_id}/issued_documents/{document_id}/e_invoice/error_reason Get E-Invoice Rejection Reason
IssuedEInvoicesApi GetEInvoiceXml GET /c/{company_id}/issued_documents/{document_id}/e_invoice/xml Get E-Invoice XML
IssuedEInvoicesApi SendEInvoice POST /c/{company_id}/issued_documents/{document_id}/e_invoice/send Send E-Invoice
IssuedEInvoicesApi VerifyEInvoiceXml GET /c/{company_id}/issued_documents/{document_id}/e_invoice/xml_verify Verify E-Invoice XML
ProductsApi CreateProduct POST /c/{company_id}/products Create Product
ProductsApi DeleteProduct DELETE /c/{company_id}/products/{product_id} Delete Product
ProductsApi GetProduct GET /c/{company_id}/products/{product_id} Get Product
ProductsApi ListProducts GET /c/{company_id}/products List Products
ProductsApi ModifyProduct PUT /c/{company_id}/products/{product_id} Modify Product
ReceiptsApi CreateReceipt POST /c/{company_id}/receipts Create Receipt
ReceiptsApi DeleteReceipt DELETE /c/{company_id}/receipts/{document_id} Delete Receipt
ReceiptsApi GetReceipt GET /c/{company_id}/receipts/{document_id} Get Receipt
ReceiptsApi GetReceiptPreCreateInfo GET /c/{company_id}/receipts/info Get Receipt Pre-Create Info
ReceiptsApi GetReceiptsMonthlyTotals GET /c/{company_id}/receipts/monthly_totals Get Receipts Monthly Totals
ReceiptsApi ListReceipts GET /c/{company_id}/receipts List Receipts
ReceiptsApi ModifyReceipt PUT /c/{company_id}/receipts/{document_id} Modify Receipt
ReceivedDocumentsApi CreateReceivedDocument POST /c/{company_id}/received_documents Create Received Document
ReceivedDocumentsApi DeleteReceivedDocument DELETE /c/{company_id}/received_documents/{document_id} Delete Received Document
ReceivedDocumentsApi DeleteReceivedDocumentAttachment DELETE /c/{company_id}/received_documents/{document_id}/attachment Delete Received Document Attachment
ReceivedDocumentsApi GetExistingReceivedDocumentTotals POST /c/{company_id}/received_documents/{document_id}/totals Get Existing Received Document Totals
ReceivedDocumentsApi GetNewReceivedDocumentTotals POST /c/{company_id}/received_documents/totals Get New Received Document Totals
ReceivedDocumentsApi GetReceivedDocument GET /c/{company_id}/received_documents/{document_id} Get Received Document
ReceivedDocumentsApi GetReceivedDocumentPreCreateInfo GET /c/{company_id}/received_documents/info Get Received Document Pre-Create Info
ReceivedDocumentsApi ListReceivedDocuments GET /c/{company_id}/received_documents List Received Documents
ReceivedDocumentsApi ModifyReceivedDocument PUT /c/{company_id}/received_documents/{document_id} Modify Received Document
ReceivedDocumentsApi UploadReceivedDocumentAttachment POST /c/{company_id}/received_documents/attachment Upload Received Document Attachment
SettingsApi CreatePaymentAccount POST /c/{company_id}/settings/payment_accounts Create Payment Account
SettingsApi CreatePaymentMethod POST /c/{company_id}/settings/payment_methods Create Payment Method
SettingsApi CreateVatType POST /c/{company_id}/settings/vat_types Create Vat Type
SettingsApi DeletePaymentAccount DELETE /c/{company_id}/settings/payment_accounts/{payment_account_id} Delete Payment Account
SettingsApi DeletePaymentMethod DELETE /c/{company_id}/settings/payment_methods/{payment_method_id} Delete Payment Method
SettingsApi DeleteVatType DELETE /c/{company_id}/settings/vat_types/{vat_type_id} Delete Vat Type
SettingsApi GetPaymentAccount GET /c/{company_id}/settings/payment_accounts/{payment_account_id} Get Payment Account
SettingsApi GetPaymentMethod GET /c/{company_id}/settings/payment_methods/{payment_method_id} Get Payment Method
SettingsApi GetTaxProfile GET /c/{company_id}/settings/tax_profile Get Tax Profile
SettingsApi GetVatType GET /c/{company_id}/settings/vat_types/{vat_type_id} Get Vat Type
SettingsApi ModifyPaymentAccount PUT /c/{company_id}/settings/payment_accounts/{payment_account_id} Modify Payment Account
SettingsApi ModifyPaymentMethod PUT /c/{company_id}/settings/payment_methods/{payment_method_id} Modify Payment Method
SettingsApi ModifyVatType PUT /c/{company_id}/settings/vat_types/{vat_type_id} Modify Vat Type
SuppliersApi CreateSupplier POST /c/{company_id}/entities/suppliers Create Supplier
SuppliersApi DeleteSupplier DELETE /c/{company_id}/entities/suppliers/{supplier_id} Delete Supplier
SuppliersApi GetSupplier GET /c/{company_id}/entities/suppliers/{supplier_id} Get Supplier
SuppliersApi ListSuppliers GET /c/{company_id}/entities/suppliers List Suppliers
SuppliersApi ModifySupplier PUT /c/{company_id}/entities/suppliers/{supplier_id} Modify Supplier
TaxesApi CreateF24 POST /c/{company_id}/taxes Create F24
TaxesApi DeleteF24 DELETE /c/{company_id}/taxes/{document_id} Delete F24
TaxesApi DeleteF24Attachment DELETE /c/{company_id}/taxes/{document_id}/attachment Delete F24 Attachment
TaxesApi GetF24 GET /c/{company_id}/taxes/{document_id} Get F24
TaxesApi ListF24 GET /c/{company_id}/taxes List F24
TaxesApi ModifyF24 PUT /c/{company_id}/taxes/{document_id} Modify F24
TaxesApi UploadF24Attachment POST /c/{company_id}/taxes/attachment Upload F24 Attachment
UserApi GetUserInfo GET /user/info Get User Info
UserApi ListUserCompanies GET /user/companies List User Companies
WebhooksApi CreateWebhooksSubscription POST /c/{company_id}/subscriptions Create a Webhook Subscription
WebhooksApi DeleteWebhooksSubscription DELETE /c/{company_id}/subscriptions/{subscription_id} Delete Webhooks Subscription
WebhooksApi GetWebhooksSubscription GET /c/{company_id}/subscriptions/{subscription_id} Get Webhooks Subscription
WebhooksApi ListWebhooksSubscriptions GET /c/{company_id}/subscriptions List Webhooks Subscriptions
WebhooksApi ModifyWebhooksSubscription PUT /c/{company_id}/subscriptions/{subscription_id} Modify Webhooks Subscription

Documentation for Models

Documentation for Authorization

OAuth2AuthenticationCodeFlow

  • Type: OAuth
  • Flow: accessCode
  • Authorization URL: https://api-v2.fattureincloud.it/oauth/authorize
  • Scopes:
    • entity.clients:r: Read permission to the Clients registry
    • entity.clients:a: Write permission to the Clients registry
    • entity.suppliers:r: Read permission to the Suppliers registry
    • entity.suppliers:a: Write permission to the Suppliers registry
    • products:r: Read permission to the Products
    • products:a: Write permission to the Products
    • issued_documents.invoices:r: Read permission to the issued Invoices
    • issued_documents.credit_notes:r: Read permission to the issued Credit Notes
    • issued_documents.receipts:r: Read permission to the issued Receipts
    • issued_documents.orders:r: Read permission to the issued Orders
    • issued_documents.quotes:r: Read permission to the issued Quotes
    • issued_documents.proformas:r: Read permission to the issued Proformas
    • issued_documents.delivery_notes:r: Read permission to the issued Delivery Notes
    • issued_documents.work_reports:r: Read permission to the issued Work Reports
    • issued_documents.supplier_orders:r: Read permission to the issued Supplier Orders
    • issued_documents.self_invoices:r: Read permission to the issued Self Invoices
    • issued_documents.invoices:a: Write permission to the issued Invoices
    • issued_documents.credit_notes:a: Write permission to the issued Credit Notes
    • issued_documents.receipts:a: Write permission to the issued issued Receipts
    • issued_documents.orders:a: Write permission to the issued Orders
    • issued_documents.quotes:a: Write permission to the issued Quotes
    • issued_documents.proformas:a: Write permission to the issued Proformas
    • issued_documents.delivery_notes:a: Write permission to the issued Delivery Notes
    • issued_documents.work_reports:a: Write permission to the issued Work Reports
    • issued_documents.supplier_orders:a: Write permission to the issued Supplier Orders
    • issued_documents.self_invoices:a: Write permission to the issued Self Invoices
    • received_documents:r: Read permission to the Received Documents
    • received_documents:a: Write permission to the Received Documents
    • stock:r: Read permission to the Stock movements
    • stock:a: Write permission to the Stock movements
    • receipts:r: Read permission to the Receipts
    • receipts:a: Write permission to the Receipts
    • taxes:r: Read permission to the Taxes
    • taxes:a: Write permission to the Taxes
    • archive:r: Read permission to the Archive Documents
    • archive:a: Read permission to the Archive Documents
    • cashbook:r: Read permission to the Cashbook
    • cashbook:a: Write permission to the Cashbook
    • settings:r: Read permission to the Settings
    • settings:a: Write permission to the Settings
    • situation:r: Read permission to the company Situation