All URIs are relative to https://api-v2.fattureincloud.it
Method | HTTP request | Description |
---|---|---|
createReceipt | POST /c/{company_id}/receipts | Create Receipt |
deleteReceipt | DELETE /c/{company_id}/receipts/{document_id} | Delete Receipt |
getReceipt | GET /c/{company_id}/receipts/{document_id} | Get Receipt |
getReceiptPreCreateInfo | GET /c/{company_id}/receipts/info | Get Receipt Pre-Create Info |
getReceiptsMonthlyTotals | GET /c/{company_id}/receipts/monthly_totals | Get Receipts Monthly Totals |
listReceipts | GET /c/{company_id}/receipts | List Receipts |
modifyReceipt | PUT /c/{company_id}/receipts/{document_id} | Modify Receipt |
CreateReceiptResponse createReceipt(companyId, createReceiptRequest)
Create Receipt
Creates a new receipt.
// 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.ReceiptsApi;
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");
ReceiptsApi apiInstance = new ReceiptsApi(defaultClient);
Integer companyId = 12345; // Integer | The ID of the company.
CreateReceiptRequest createReceiptRequest = new CreateReceiptRequest(); // CreateReceiptRequest | The Receipt to create.
try {
CreateReceiptResponse result = apiInstance.createReceipt(companyId, createReceiptRequest);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ReceiptsApi#createReceipt");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
companyId | Integer | The ID of the company. | |
createReceiptRequest | CreateReceiptRequest | The Receipt to create. | [optional] |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Created Receipt. | - |
401 | Unauthorized | - |
deleteReceipt(companyId, documentId)
Delete Receipt
Deletes the specified receipt.
// 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.ReceiptsApi;
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");
ReceiptsApi apiInstance = new ReceiptsApi(defaultClient);
Integer companyId = 12345; // Integer | The ID of the company.
Integer documentId = 56; // Integer | The ID of the document.
try {
apiInstance.deleteReceipt(companyId, documentId);
} catch (ApiException e) {
System.err.println("Exception when calling ReceiptsApi#deleteReceipt");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
companyId | Integer | The ID of the company. | |
documentId | Integer | The ID of the document. |
null (empty response body)
- Content-Type: Not defined
- Accept: Not defined
Status code | Description | Response headers |
---|---|---|
200 | Document removed. | - |
401 | Unauthorized | - |
404 | Not Found | - |
GetReceiptResponse getReceipt(companyId, documentId, fields, fieldset)
Get Receipt
Gets the specified receipt.
// 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.ReceiptsApi;
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");
ReceiptsApi apiInstance = new ReceiptsApi(defaultClient);
Integer companyId = 12345; // Integer | The ID of the company.
Integer documentId = 56; // Integer | The ID of the document.
String fields = "fields_example"; // String | List of comma-separated fields.
String fieldset = "basic"; // String | Name of the fieldset.
try {
GetReceiptResponse result = apiInstance.getReceipt(companyId, documentId, fields, fieldset);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ReceiptsApi#getReceipt");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
companyId | Integer | The ID of the company. | |
documentId | Integer | The ID of the document. | |
fields | String | List of comma-separated fields. | [optional] |
fieldset | String | Name of the fieldset. | [optional] [enum: basic, detailed] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Receipt Details. | - |
401 | Unauthorized | - |
404 | Not Found | - |
GetReceiptPreCreateInfoResponse getReceiptPreCreateInfo(companyId)
Get Receipt Pre-Create Info
Retrieves the information useful while creating a new receipt.
// 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.ReceiptsApi;
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");
ReceiptsApi apiInstance = new ReceiptsApi(defaultClient);
Integer companyId = 12345; // Integer | The ID of the company.
try {
GetReceiptPreCreateInfoResponse result = apiInstance.getReceiptPreCreateInfo(companyId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ReceiptsApi#getReceiptPreCreateInfo");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
companyId | Integer | The ID of the company. |
GetReceiptPreCreateInfoResponse
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Pre-create info. | - |
401 | Unauthorized | - |
404 | Not Found | - |
GetReceiptsMonthlyTotalsResponse getReceiptsMonthlyTotals(companyId, type, year)
Get Receipts Monthly Totals
Returns the monthly totals by year and receipt type.
// 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.ReceiptsApi;
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");
ReceiptsApi apiInstance = new ReceiptsApi(defaultClient);
Integer companyId = 12345; // Integer | The ID of the company.
String type = "sales_receipt"; // String | Receipt Type
String year = "year_example"; // String | Year for which you want monthly totals
try {
GetReceiptsMonthlyTotalsResponse result = apiInstance.getReceiptsMonthlyTotals(companyId, type, year);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ReceiptsApi#getReceiptsMonthlyTotals");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
companyId | Integer | The ID of the company. | |
type | String | Receipt Type | [enum: sales_receipt, till_receipt] |
year | String | Year for which you want monthly totals |
GetReceiptsMonthlyTotalsResponse
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Monthly Totals. | - |
401 | Unauthorized | - |
404 | Not Found | - |
ListReceiptsResponse listReceipts(companyId, fields, fieldset, page, perPage, sort, q)
List Receipts
Lists the receipts.
// 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.ReceiptsApi;
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");
ReceiptsApi apiInstance = new ReceiptsApi(defaultClient);
Integer companyId = 12345; // Integer | The ID of the company.
String fields = "fields_example"; // String | List of comma-separated fields.
String fieldset = "basic"; // String | Name of the fieldset.
Integer page = 1; // Integer | The page to retrieve.
Integer perPage = 5; // Integer | The size of the page.
String sort = "sort_example"; // String | List of comma-separated fields for result sorting (minus for desc sorting).
String q = "q_example"; // String | Query for filtering the results.
try {
ListReceiptsResponse result = apiInstance.listReceipts(companyId, fields, fieldset, page, perPage, sort, q);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ReceiptsApi#listReceipts");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
companyId | Integer | The ID of the company. | |
fields | String | List of comma-separated fields. | [optional] |
fieldset | String | Name of the fieldset. | [optional] [enum: basic, detailed] |
page | Integer | The page to retrieve. | [optional] [default to 1] |
perPage | Integer | The size of the page. | [optional] [default to 5] |
sort | String | List of comma-separated fields for result sorting (minus for desc sorting). | [optional] |
q | String | Query for filtering the results. | [optional] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Receipts list. | - |
401 | Unauthorized | - |
ModifyReceiptResponse modifyReceipt(companyId, documentId, modifyReceiptRequest)
Modify Receipt
Modifies the specified receipt.
// 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.ReceiptsApi;
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");
ReceiptsApi apiInstance = new ReceiptsApi(defaultClient);
Integer companyId = 12345; // Integer | The ID of the company.
Integer documentId = 56; // Integer | The ID of the document.
ModifyReceiptRequest modifyReceiptRequest = new ModifyReceiptRequest(); // ModifyReceiptRequest | Modified receipt.
try {
ModifyReceiptResponse result = apiInstance.modifyReceipt(companyId, documentId, modifyReceiptRequest);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ReceiptsApi#modifyReceipt");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
companyId | Integer | The ID of the company. | |
documentId | Integer | The ID of the document. | |
modifyReceiptRequest | ModifyReceiptRequest | Modified receipt. | [optional] |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Modified receipt. | - |
401 | Unauthorized | - |
404 | Not Found | - |