All URIs are relative to https://api-v2.fattureincloud.it
Method | HTTP request | Description |
---|---|---|
createArchiveDocument | POST /c/{company_id}/archive | Create Archive Document |
deleteArchiveDocument | DELETE /c/{company_id}/archive/{document_id} | Delete Archive Document |
getArchiveDocument | GET /c/{company_id}/archive/{document_id} | Get Archive Document |
listArchiveDocuments | GET /c/{company_id}/archive | List Archive Documents |
modifyArchiveDocument | PUT /c/{company_id}/archive/{document_id} | Modify Archive Document |
uploadArchiveDocumentAttachment | POST /c/{company_id}/archive/attachment | Upload Archive Document Attachment |
CreateArchiveDocumentResponse createArchiveDocument(companyId, opts)
Create Archive Document
Creates a new archive document.
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.ArchiveApi();
let companyId = 12345; // Number | The ID of the company.
let opts = {
'createArchiveDocumentRequest': {"data":{"date":"2021-08-20","category":"Altri documenti","description":"spesa 1","attachment_token":"ibfjdbf94ey9w94g3w894qbasrga"}} // CreateArchiveDocumentRequest | The Archive Document.
};
apiInstance.createArchiveDocument(companyId, 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. | |
createArchiveDocumentRequest | CreateArchiveDocumentRequest | The Archive Document. | [optional] |
- Content-Type: application/json
- Accept: application/json
deleteArchiveDocument(companyId, documentId)
Delete Archive Document
Deletes the specified archive document.
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.ArchiveApi();
let companyId = 12345; // Number | The ID of the company.
let documentId = 56; // Number | The ID of the document.
apiInstance.deleteArchiveDocument(companyId, documentId).then(() => {
console.log('API called successfully.');
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
companyId | Number | The ID of the company. | |
documentId | Number | The ID of the document. |
null (empty response body)
- Content-Type: Not defined
- Accept: Not defined
GetArchiveDocumentResponse getArchiveDocument(companyId, documentId, opts)
Get Archive Document
Gets the specified archive document.
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.ArchiveApi();
let companyId = 12345; // Number | The ID of the company.
let documentId = 56; // Number | The ID of the document.
let opts = {
'fields': "fields_example", // String | List of comma-separated fields.
'fieldset': "fieldset_example" // String | Name of the fieldset.
};
apiInstance.getArchiveDocument(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. | |
fields | String | List of comma-separated fields. | [optional] |
fieldset | String | Name of the fieldset. | [optional] |
- Content-Type: Not defined
- Accept: application/json
ListArchiveDocumentsResponse listArchiveDocuments(companyId, opts)
List Archive Documents
Lists the archive documents.
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.ArchiveApi();
let companyId = 12345; // Number | The ID of the company.
let opts = {
'fields': "fields_example", // String | List of comma-separated fields.
'fieldset': "fieldset_example", // String | Name of the fieldset.
'sort': "sort_example", // String | List of comma-separated fields for result sorting (minus for desc sorting).
'page': 1, // Number | The page to retrieve.
'perPage': 5, // Number | The size of the page.
'q': "q_example" // String | Query for filtering the results.
};
apiInstance.listArchiveDocuments(companyId, 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. | |
fields | String | List of comma-separated fields. | [optional] |
fieldset | String | Name of the fieldset. | [optional] |
sort | String | List of comma-separated fields for result sorting (minus for desc sorting). | [optional] |
page | Number | The page to retrieve. | [optional] [default to 1] |
perPage | Number | The size of the page. | [optional] [default to 5] |
q | String | Query for filtering the results. | [optional] |
- Content-Type: Not defined
- Accept: application/json
ModifyArchiveDocumentResponse modifyArchiveDocument(companyId, documentId, opts)
Modify Archive Document
Modifies the specified archive document.
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.ArchiveApi();
let companyId = 12345; // Number | The ID of the company.
let documentId = 56; // Number | The ID of the document.
let opts = {
'modifyArchiveDocumentRequest': {"data":{"date":"2021-08-20","category":"Altri documenti","description":"spesa 2"}} // ModifyArchiveDocumentRequest | Modified Archive Document
};
apiInstance.modifyArchiveDocument(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. | |
modifyArchiveDocumentRequest | ModifyArchiveDocumentRequest | Modified Archive Document | [optional] |
- Content-Type: application/json
- Accept: application/json
UploadArchiveAttachmentResponse uploadArchiveDocumentAttachment(companyId, opts)
Upload Archive Document Attachment
Uploads an attachment destined to an archive document. The actual association between the document and the attachment must be implemented separately, using the returned token.
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.ArchiveApi();
let companyId = 12345; // Number | The ID of the company.
let opts = {
'filename': "filename_example", // String | Attachment file name
'attachment': "/path/to/file" // File | Attachment file [.png, .jpg, .gif, .pdf, .zip, .xls, .xlsx, .doc, .docx]
};
apiInstance.uploadArchiveDocumentAttachment(companyId, 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. | |
filename | String | Attachment file name | [optional] |
attachment | File | Attachment file [.png, .jpg, .gif, .pdf, .zip, .xls, .xlsx, .doc, .docx] | [optional] |
UploadArchiveAttachmentResponse
- Content-Type: multipart/form-data
- Accept: application/json