All URIs are relative to https://api.freee.co.jp.
Method | HTTP request | Description |
---|---|---|
createAccountItem() | POST /api/1/account_items | 勘定科目の作成 |
destroyAccountItem() | DELETE /api/1/account_items/{id} | 勘定科目の削除 |
getAccountItem() | GET /api/1/account_items/{id} | 勘定科目の取得 |
getAccountItems() | GET /api/1/account_items | 勘定科目一覧の取得 |
updateAccountItem() | PUT /api/1/account_items/{id} | 勘定科目の更新 |
createAccountItem($account_item_create_params): \Freee\Accounting\Model\AccountItemResponse
勘定科目の作成
<?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\AccountItemsApi(
// 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
);
$account_item_create_params = new \Freee\Accounting\Model\AccountItemCreateParams(); // \Freee\Accounting\Model\AccountItemCreateParams | 勘定科目の作成
try {
$result = $apiInstance->createAccountItem($account_item_create_params);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AccountItemsApi->createAccountItem: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
account_item_create_params | \Freee\Accounting\Model\AccountItemCreateParams | 勘定科目の作成 |
\Freee\Accounting\Model\AccountItemResponse
- 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]
destroyAccountItem($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\AccountItemsApi(
// 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->destroyAccountItem($id, $company_id);
} catch (Exception $e) {
echo 'Exception when calling AccountItemsApi->destroyAccountItem: ', $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]
getAccountItem($company_id, $id): \Freee\Accounting\Model\AccountItemResponse
勘定科目の取得
<?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\AccountItemsApi(
// 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
$id = 56; // int | 勘定科目ID
try {
$result = $apiInstance->getAccountItem($company_id, $id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AccountItemsApi->getAccountItem: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
company_id | int | 事業所ID | |
id | int | 勘定科目ID |
\Freee\Accounting\Model\AccountItemResponse
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getAccountItems($company_id, $base_date): \Freee\Accounting\Model\AccountItemsResponse
勘定科目一覧の取得
<?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\AccountItemsApi(
// 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
$base_date = 'base_date_example'; // string | 基準日:指定した場合、勘定科目に紐づく税区分(default_tax_code)が、基準日の税率に基づいて返ります。
try {
$result = $apiInstance->getAccountItems($company_id, $base_date);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AccountItemsApi->getAccountItems: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
company_id | int | 事業所ID | |
base_date | string | 基準日:指定した場合、勘定科目に紐づく税区分(default_tax_code)が、基準日の税率に基づいて返ります。 | [optional] |
\Freee\Accounting\Model\AccountItemsResponse
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
updateAccountItem($id, $account_item_update_params): \Freee\Accounting\Model\AccountItemResponse
勘定科目の更新
<?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\AccountItemsApi(
// 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
$account_item_update_params = new \Freee\Accounting\Model\AccountItemUpdateParams(); // \Freee\Accounting\Model\AccountItemUpdateParams | 勘定科目の更新
try {
$result = $apiInstance->updateAccountItem($id, $account_item_update_params);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AccountItemsApi->updateAccountItem: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
id | int | ||
account_item_update_params | \Freee\Accounting\Model\AccountItemUpdateParams | 勘定科目の更新 |
\Freee\Accounting\Model\AccountItemResponse
- 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]