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($company_id, $limit): \Freee\Accounting\Model\InlineResponse20012
事業所に所属するユーザー一覧の取得
<?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;
}
Name | Type | Description | Notes |
---|---|---|---|
company_id | int | 事業所ID | |
limit | int | 取得レコードの件数 (デフォルト: 50, 最小: 1, 最大: 3000) | [optional] |
\Freee\Accounting\Model\InlineResponse20012
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getUsersCapabilities($company_id): \Freee\Accounting\Model\InlineResponse20013
ログインユーザーの権限の取得
<?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;
}
Name | Type | Description | Notes |
---|---|---|---|
company_id | int | 事業所ID |
\Freee\Accounting\Model\InlineResponse20013
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getUsersMe($companies, $advisor): \Freee\Accounting\Model\MeResponse
ログインユーザーの取得
<?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;
}
Name | Type | Description | Notes |
---|---|---|---|
companies | bool | 取得情報にユーザーが所属する事業所一覧を含める | [optional] |
advisor | bool | 取得情報に事業がアドバイザー事象所の場合は事業所毎の一意なプロフィールIDを含める | [optional] |
\Freee\Accounting\Model\MeResponse
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
updateUser($user_params): \Freee\Accounting\Model\UserResponse
ログインユーザーの更新
<?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;
}
Name | Type | Description | Notes |
---|---|---|---|
user_params | \Freee\Accounting\Model\UserParams | ログインユーザーの更新 | [optional] |
\Freee\Accounting\Model\UserResponse
- 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]