All URIs are relative to https://api.freee.co.jp.
Method | HTTP request | Description |
---|---|---|
createSection() | POST /api/1/sections | 部門の作成 |
destroySection() | DELETE /api/1/sections/{id} | 部門の削除 |
getSection() | GET /api/1/sections/{id} | 部門の取得 |
getSections() | GET /api/1/sections | 部門一覧の取得 |
updateSection() | PUT /api/1/sections/{id} | 部門の更新 |
createSection($section_params): \Freee\Accounting\Model\SectionResponse
部門の作成
<?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\SectionsApi(
// 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
);
$section_params = new \Freee\Accounting\Model\SectionParams(); // \Freee\Accounting\Model\SectionParams | 部門の作成
try {
$result = $apiInstance->createSection($section_params);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling SectionsApi->createSection: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
section_params | \Freee\Accounting\Model\SectionParams | 部門の作成 | [optional] |
\Freee\Accounting\Model\SectionResponse
- 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]
destroySection($id, $company_id)
部門の削除
<?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\SectionsApi(
// 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
);
$id = 56; // int
$company_id = 56; // int | 事業所ID
try {
$apiInstance->destroySection($id, $company_id);
} catch (Exception $e) {
echo 'Exception when calling SectionsApi->destroySection: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
id | int | ||
company_id | int | 事業所ID |
void (empty response body)
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getSection($id, $company_id): \Freee\Accounting\Model\SectionResponse
部門の取得
<?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\SectionsApi(
// 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
);
$id = 56; // int | 部門ID
$company_id = 56; // int | 事業所ID
try {
$result = $apiInstance->getSection($id, $company_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling SectionsApi->getSection: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
id | int | 部門ID | |
company_id | int | 事業所ID |
\Freee\Accounting\Model\SectionResponse
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getSections($company_id): \Freee\Accounting\Model\InlineResponse2006
部門一覧の取得
<?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\SectionsApi(
// 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->getSections($company_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling SectionsApi->getSections: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
company_id | int | 事業所ID |
\Freee\Accounting\Model\InlineResponse2006
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
updateSection($id, $section_params): \Freee\Accounting\Model\SectionResponse
部門の更新
<?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\SectionsApi(
// 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
);
$id = 56; // int
$section_params = new \Freee\Accounting\Model\SectionParams(); // \Freee\Accounting\Model\SectionParams | 部門の更新
try {
$result = $apiInstance->updateSection($id, $section_params);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling SectionsApi->updateSection: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
id | int | ||
section_params | \Freee\Accounting\Model\SectionParams | 部門の更新 | [optional] |
\Freee\Accounting\Model\SectionResponse
- 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]