Skip to content

Latest commit

 

History

History
463 lines (351 loc) · 16.9 KB

File metadata and controls

463 lines (351 loc) · 16.9 KB

ArchiveApi

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

createArchiveDocument

CreateArchiveDocumentResponse createArchiveDocument(companyId, createArchiveDocumentRequest)

Create Archive Document

Creates a new archive document.

Example

// 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.ArchiveApi;

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");

    ArchiveApi apiInstance = new ArchiveApi(defaultClient);
    Integer companyId = 12345; // Integer | The ID of the company.
    CreateArchiveDocumentRequest createArchiveDocumentRequest = new CreateArchiveDocumentRequest(); // CreateArchiveDocumentRequest | The Archive Document.
    try {
      CreateArchiveDocumentResponse result = apiInstance.createArchiveDocument(companyId, createArchiveDocumentRequest);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling ArchiveApi#createArchiveDocument");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
companyId Integer The ID of the company.
createArchiveDocumentRequest CreateArchiveDocumentRequest The Archive Document. [optional]

Return type

CreateArchiveDocumentResponse

Authorization

OAuth2AuthenticationCodeFlow

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 The Archive Document. -
401 Unauthorized -
404 Not Found -

deleteArchiveDocument

deleteArchiveDocument(companyId, documentId)

Delete Archive Document

Deletes the specified archive document.

Example

// 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.ArchiveApi;

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");

    ArchiveApi apiInstance = new ArchiveApi(defaultClient);
    Integer companyId = 12345; // Integer | The ID of the company.
    Integer documentId = 56; // Integer | The ID of the document.
    try {
      apiInstance.deleteArchiveDocument(companyId, documentId);
    } catch (ApiException e) {
      System.err.println("Exception when calling ArchiveApi#deleteArchiveDocument");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
companyId Integer The ID of the company.
documentId Integer The ID of the document.

Return type

null (empty response body)

Authorization

OAuth2AuthenticationCodeFlow

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
200 Document removed. -
401 Unauthorized -
404 Not Found -

getArchiveDocument

GetArchiveDocumentResponse getArchiveDocument(companyId, documentId, fields, fieldset)

Get Archive Document

Gets the specified archive document.

Example

// 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.ArchiveApi;

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");

    ArchiveApi apiInstance = new ArchiveApi(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 {
      GetArchiveDocumentResponse result = apiInstance.getArchiveDocument(companyId, documentId, fields, fieldset);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling ArchiveApi#getArchiveDocument");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

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]

Return type

GetArchiveDocumentResponse

Authorization

OAuth2AuthenticationCodeFlow

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Archive Document Details -
401 Unauthorized -
404 Not Found -

listArchiveDocuments

ListArchiveDocumentsResponse listArchiveDocuments(companyId, fields, fieldset, sort, page, perPage, q)

List Archive Documents

Lists the archive documents.

Example

// 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.ArchiveApi;

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");

    ArchiveApi apiInstance = new ArchiveApi(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.
    String sort = "sort_example"; // String | List of comma-separated fields for result sorting (minus for desc sorting).
    Integer page = 1; // Integer | The page to retrieve.
    Integer perPage = 5; // Integer | The size of the page.
    String q = "q_example"; // String | Query for filtering the results.
    try {
      ListArchiveDocumentsResponse result = apiInstance.listArchiveDocuments(companyId, fields, fieldset, sort, page, perPage, q);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling ArchiveApi#listArchiveDocuments");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

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]
sort String List of comma-separated fields for result sorting (minus for desc sorting). [optional]
page Integer The page to retrieve. [optional] [default to 1]
perPage Integer The size of the page. [optional] [default to 5]
q String Query for filtering the results. [optional]

Return type

ListArchiveDocumentsResponse

Authorization

OAuth2AuthenticationCodeFlow

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Results list. -
401 Unauthorized -
404 Not Found -

modifyArchiveDocument

ModifyArchiveDocumentResponse modifyArchiveDocument(companyId, documentId, modifyArchiveDocumentRequest)

Modify Archive Document

Modifies the specified archive document.

Example

// 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.ArchiveApi;

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");

    ArchiveApi apiInstance = new ArchiveApi(defaultClient);
    Integer companyId = 12345; // Integer | The ID of the company.
    Integer documentId = 56; // Integer | The ID of the document.
    ModifyArchiveDocumentRequest modifyArchiveDocumentRequest = new ModifyArchiveDocumentRequest(); // ModifyArchiveDocumentRequest | Modified Archive Document
    try {
      ModifyArchiveDocumentResponse result = apiInstance.modifyArchiveDocument(companyId, documentId, modifyArchiveDocumentRequest);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling ArchiveApi#modifyArchiveDocument");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
companyId Integer The ID of the company.
documentId Integer The ID of the document.
modifyArchiveDocumentRequest ModifyArchiveDocumentRequest Modified Archive Document [optional]

Return type

ModifyArchiveDocumentResponse

Authorization

OAuth2AuthenticationCodeFlow

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 The modified Archived Document -
401 Unauthorized -
404 Not Found -

uploadArchiveDocumentAttachment

UploadArchiveAttachmentResponse uploadArchiveDocumentAttachment(companyId, filename, attachment)

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.

Example

// 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.ArchiveApi;

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");

    ArchiveApi apiInstance = new ArchiveApi(defaultClient);
    Integer companyId = 12345; // Integer | The ID of the company.
    String filename = "filename_example"; // String | Attachment file name
    File attachment = new File("/path/to/file"); // File | Attachment file [.png, .jpg, .gif, .pdf, .zip, .xls, .xlsx, .doc, .docx]
    try {
      UploadArchiveAttachmentResponse result = apiInstance.uploadArchiveDocumentAttachment(companyId, filename, attachment);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling ArchiveApi#uploadArchiveDocumentAttachment");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
companyId Integer 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]

Return type

UploadArchiveAttachmentResponse

Authorization

OAuth2AuthenticationCodeFlow

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Example response -
401 Unauthorized -
404 Not Found -