All URIs are relative to https://api-v2.fattureincloud.it
Method | HTTP request | Description |
---|---|---|
createCashbookEntry | POST /c/{company_id}/cashbook | Create Cashbook Entry |
deleteCashbookEntry | DELETE /c/{company_id}/cashbook/{document_id} | Delete Cashbook Entry |
getCashbookEntry | GET /c/{company_id}/cashbook/{document_id} | Get Cashbook Entry |
listCashbookEntries | GET /c/{company_id}/cashbook | List Cashbook Entries |
modifyCashbookEntry | PUT /c/{company_id}/cashbook/{document_id} | Modify Cashbook Entry |
CreateCashbookEntryResponse createCashbookEntry(companyId, opts)
Create Cashbook Entry
Creates a new cashbook entry.
import { Configuration, CashbookApi , CreateCashbookEntryRequest } from '@fattureincloud/fattureincloud-ts-sdk';
// Configure OAuth2 access token for authorization:
const apiConfig = new Configuration({
accessToken: "YOUR ACCESS TOKEN"
});
let apiInstance = new CashbookApi(apiConfig);
let companyId = 12345; // Number | The ID of the company.
let createCashbookEntryRequest: CreateCashbookEntryRequest = {"data":{"date":"2021-08-24","amount_in":122,"payment_account_in":{"id":333},"description":"Fattura n. 201/2021","entity_name":"Rossi S.r.l.","kind":"issued_document","document":{"id":54321},"type":"in"}} // CreateCashbookEntryRequest | Cashbook entry.
apiInstance.createCashbookEntry(companyId, createCashbookEntryRequest).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
companyId | Number | The ID of the company. | |
createCashbookEntryRequest | CreateCashbookEntryRequest | Cashbook entry. | [optional] |
- Content-Type: application/json
- Accept: application/json
deleteCashbookEntry(companyId, documentId)
Delete Cashbook Entry
Deletes the specified cashbook entry.
import { Configuration, CashbookApi } from '@fattureincloud/fattureincloud-ts-sdk';
// Configure OAuth2 access token for authorization:
const apiConfig = new Configuration({
accessToken: "YOUR ACCESS TOKEN"
});
let apiInstance = new CashbookApi(apiConfig);
let companyId = 12345; // Number | The ID of the company.
let documentId = "documentId_example"; // String | The ID of the document.
apiInstance.deleteCashbookEntry(companyId, documentId).then(() => {
console.log('API called successfully.');
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
companyId | Number | The ID of the company. | |
documentId | String | The ID of the document. |
null (empty response body)
- Content-Type: Not defined
- Accept: Not defined
GetCashbookEntryResponse getCashbookEntry(companyId, documentId, opts)
Get Cashbook Entry
Gets the specified cashbook entry.
import { Configuration, CashbookApi } from '@fattureincloud/fattureincloud-ts-sdk';
// Configure OAuth2 access token for authorization:
const apiConfig = new Configuration({
accessToken: "YOUR ACCESS TOKEN"
});
let apiInstance = new CashbookApi(apiConfig);
let companyId = 12345; // Number | The ID of the company.
let documentId = "documentId_example"; // String | The ID of the document.
let fields = "fields_example", // String | List of comma-separated fields.
let fieldset = "fieldset_example" // String | Name of the fieldset.
apiInstance.getCashbookEntry(companyId, documentId, fieldset).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
companyId | Number | The ID of the company. | |
documentId | String | The ID of the document. | |
fields | String | List of comma-separated fields. | [optional] |
fieldset | String | Name of the fieldset. | [optional] |
- Content-Type: Not defined
- Accept: application/json
ListCashbookEntriesResponse listCashbookEntries(companyId, dateFrom, dateTo, opts)
List Cashbook Entries
Lists the cashbook entries.
import { Configuration, CashbookApi } from '@fattureincloud/fattureincloud-ts-sdk';
// Configure OAuth2 access token for authorization:
const apiConfig = new Configuration({
accessToken: "YOUR ACCESS TOKEN"
});
let apiInstance = new CashbookApi(apiConfig);
let companyId = 12345; // Number | The ID of the company.
let dateFrom = "dateFrom_example"; // String | Start date.
let dateTo = "dateTo_example"; // String | End date.
let year = 56, // Number | Filter cashbook by year.
let type = "type_example", // String | Filter cashbook by type.
let paymentAccountId = 56 // Number | Filter by payment account.
apiInstance.listCashbookEntries(companyId, dateFrom, dateTo, paymentAccountId).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
companyId | Number | The ID of the company. | |
dateFrom | String | Start date. | |
dateTo | String | End date. | |
year | Number | Filter cashbook by year. | [optional] |
type | String | Filter cashbook by type. | [optional] |
paymentAccountId | Number | Filter by payment account. | [optional] |
- Content-Type: Not defined
- Accept: application/json
ModifyCashbookEntryResponse modifyCashbookEntry(companyId, documentId, opts)
Modify Cashbook Entry
Modifies the specified cashbook entry.
import { Configuration, CashbookApi , ModifyCashbookEntryRequest } from '@fattureincloud/fattureincloud-ts-sdk';
// Configure OAuth2 access token for authorization:
const apiConfig = new Configuration({
accessToken: "YOUR ACCESS TOKEN"
});
let apiInstance = new CashbookApi(apiConfig);
let companyId = 12345; // Number | The ID of the company.
let documentId = "documentId_example"; // String | The ID of the document.
let modifyCashbookEntryRequest: ModifyCashbookEntryRequest = {"data":{"date":"2021-08-24","amount_in":122,"payment_account_in":{"id":333},"description":"Fattura n. 201/2021","entity_name":"Rossi S.r.l."}} // ModifyCashbookEntryRequest | Cashbook Entry
apiInstance.modifyCashbookEntry(companyId, documentId, modifyCashbookEntryRequest).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
companyId | Number | The ID of the company. | |
documentId | String | The ID of the document. | |
modifyCashbookEntryRequest | ModifyCashbookEntryRequest | Cashbook Entry | [optional] |
- Content-Type: application/json
- Accept: application/json