Skip to content
This repository was archived by the owner on Oct 1, 2024. It is now read-only.

Latest commit

 

History

History
113 lines (74 loc) · 2.91 KB

UsersApi.md

File metadata and controls

113 lines (74 loc) · 2.91 KB

FreeeAccountingClient.UsersApi

All URIs are relative to https://api.freee.co.jp/api/1

Method HTTP request Description
getUsersCapabilities GET /users/capabilities ログインユーザの権限の取得
getUsersMe GET /users/me ログインユーザ情報の取得

getUsersCapabilities

UsersCapabilitiesResponse getUsersCapabilities(companyId)

ログインユーザの権限の取得

Example

var FreeeAccountingClient = require('freee-accounting-client');
var defaultClient = FreeeAccountingClient.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = accessToken; // assign access token here.

var apiInstance = new FreeeAccountingClient.UsersApi();

var companyId = 56; // Number | 事業所ID


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getUsersCapabilities(companyId, callback);

Parameters

Name Type Description Notes
companyId Number 事業所ID

Return type

UsersCapabilitiesResponse

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json, application/x-www-form-urlencoded
  • Accept: application/json

getUsersMe

UsersMeResponse getUsersMe(opts)

ログインユーザ情報の取得

Example

var FreeeAccountingClient = require('freee-accounting-client');
var defaultClient = FreeeAccountingClient.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = accessToken; // assign access token here.

var apiInstance = new FreeeAccountingClient.UsersApi();

var opts = { 
  'companies': true // Boolean | 取得情報にユーザが所属する事業所一覧を含める
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getUsersMe(opts, callback);

Parameters

Name Type Description Notes
companies Boolean 取得情報にユーザが所属する事業所一覧を含める [optional]

Return type

UsersMeResponse

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json, application/x-www-form-urlencoded
  • Accept: application/json