Skip to content
This repository was archived by the owner on Jul 24, 2023. It is now read-only.

Latest commit

 

History

History
247 lines (168 loc) · 7.13 KB

UsersApi.md

File metadata and controls

247 lines (168 loc) · 7.13 KB

Freee\Accounting\UsersApi

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

Method HTTP request Description
getUsers() GET /api/1/users 事業所に所属するユーザー一覧の取得
getUsersCapabilities() GET /api/1/users/capabilities ログインユーザーの権限の取得
getUsersMe() GET /api/1/users/me ログインユーザーの取得
updateUser() PUT /api/1/users/me ログインユーザーの更新

getUsers()

getUsers($company_id, $limit): \Freee\Accounting\Model\InlineResponse20012

事業所に所属するユーザー一覧の取得

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure OAuth2 access token for authorization: oauth2
$config = Freee\Accounting\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Freee\Accounting\Api\UsersApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$company_id = 56; // int | 事業所ID
$limit = 56; // int | 取得レコードの件数 (デフォルト: 50, 最小: 1, 最大: 3000)

try {
    $result = $apiInstance->getUsers($company_id, $limit);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UsersApi->getUsers: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
company_id int 事業所ID
limit int 取得レコードの件数 (デフォルト: 50, 最小: 1, 最大: 3000) [optional]

Return type

\Freee\Accounting\Model\InlineResponse20012

Authorization

oauth2

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getUsersCapabilities()

getUsersCapabilities($company_id): \Freee\Accounting\Model\InlineResponse20013

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

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure OAuth2 access token for authorization: oauth2
$config = Freee\Accounting\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Freee\Accounting\Api\UsersApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$company_id = 56; // int | 事業所ID

try {
    $result = $apiInstance->getUsersCapabilities($company_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UsersApi->getUsersCapabilities: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
company_id int 事業所ID

Return type

\Freee\Accounting\Model\InlineResponse20013

Authorization

oauth2

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getUsersMe()

getUsersMe($companies, $advisor): \Freee\Accounting\Model\MeResponse

ログインユーザーの取得

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure OAuth2 access token for authorization: oauth2
$config = Freee\Accounting\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Freee\Accounting\Api\UsersApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$companies = True; // bool | 取得情報にユーザーが所属する事業所一覧を含める
$advisor = True; // bool | 取得情報に事業がアドバイザー事象所の場合は事業所毎の一意なプロフィールIDを含める

try {
    $result = $apiInstance->getUsersMe($companies, $advisor);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UsersApi->getUsersMe: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
companies bool 取得情報にユーザーが所属する事業所一覧を含める [optional]
advisor bool 取得情報に事業がアドバイザー事象所の場合は事業所毎の一意なプロフィールIDを含める [optional]

Return type

\Freee\Accounting\Model\MeResponse

Authorization

oauth2

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

updateUser()

updateUser($user_params): \Freee\Accounting\Model\UserResponse

ログインユーザーの更新

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure OAuth2 access token for authorization: oauth2
$config = Freee\Accounting\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Freee\Accounting\Api\UsersApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$user_params = new \Freee\Accounting\Model\UserParams(); // \Freee\Accounting\Model\UserParams | ログインユーザーの更新

try {
    $result = $apiInstance->updateUser($user_params);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UsersApi->updateUser: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
user_params \Freee\Accounting\Model\UserParams ログインユーザーの更新 [optional]

Return type

\Freee\Accounting\Model\UserResponse

Authorization

oauth2

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]