Skip to content

Latest commit

 

History

History
150 lines (110 loc) · 4.75 KB

CompaniesApi.md

File metadata and controls

150 lines (110 loc) · 4.75 KB

CompaniesApi

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

Method HTTP request Description
getCompanyInfo GET /c/{company_id}/company/info Get Company Info
getCompanyPlanUsage GET /c/{company_id}/company/plan_usage Get Company Plan Usage

getCompanyInfo

GetCompanyInfoResponse getCompanyInfo(companyId)

Get Company Info

Gets the company detailed info.

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.CompaniesApi;

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

    CompaniesApi apiInstance = new CompaniesApi(defaultClient);
    Integer companyId = 12345; // Integer | The ID of the company.
    try {
      GetCompanyInfoResponse result = apiInstance.getCompanyInfo(companyId);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling CompaniesApi#getCompanyInfo");
      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.

Return type

GetCompanyInfoResponse

Authorization

OAuth2AuthenticationCodeFlow

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Company info. -
401 Unauthorized. -

getCompanyPlanUsage

GetCompanyPlanUsageResponse getCompanyPlanUsage(companyId, category)

Get Company Plan Usage

Gets the company limits usage.

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.CompaniesApi;

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

    CompaniesApi apiInstance = new CompaniesApi(defaultClient);
    Integer companyId = 12345; // Integer | The ID of the company.
    String category = "clients"; // String | Category
    try {
      GetCompanyPlanUsageResponse result = apiInstance.getCompanyPlanUsage(companyId, category);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling CompaniesApi#getCompanyPlanUsage");
      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.
category String Category [enum: clients, suppliers, products, documents]

Return type

GetCompanyPlanUsageResponse

Authorization

OAuth2AuthenticationCodeFlow

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Example response -
401 Unauthorized. -