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

Latest commit

 

History

History
198 lines (138 loc) · 5.89 KB

JournalsApi.md

File metadata and controls

198 lines (138 loc) · 5.89 KB

Freee\Accounting\JournalsApi

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

Method HTTP request Description
downloadJournal() GET /api/1/journals/reports/{id}/download 仕訳帳のダウンロード
getJournalStatus() GET /api/1/journals/reports/{id}/status 仕訳帳のステータスの取得
getJournals() GET /api/1/journals 仕訳帳のダウンロード要求

downloadJournal()

downloadJournal($id, $company_id): \SplFileObject

仕訳帳のダウンロード

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\JournalsApi(
    // 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->downloadJournal($id, $company_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling JournalsApi->downloadJournal: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
id int 受け付けID
company_id int 事業所ID

Return type

\SplFileObject

Authorization

oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/pdf, text/csv, application/json

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

getJournalStatus()

getJournalStatus($company_id, $id): \Freee\Accounting\Model\JournalStatusResponse

仕訳帳のステータスの取得

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\JournalsApi(
    // 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->getJournalStatus($company_id, $id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling JournalsApi->getJournalStatus: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
company_id int 事業所ID
id int 受け付けID

Return type

\Freee\Accounting\Model\JournalStatusResponse

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]

getJournals()

getJournals($download_type, $company_id, $visible_tags, $visible_ids, $start_date, $end_date): \Freee\Accounting\Model\JournalsResponse

仕訳帳のダウンロード要求

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\JournalsApi(
    // 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
);
$download_type = 'download_type_example'; // string | ダウンロード形式
$company_id = 56; // int | 事業所ID
$visible_tags = array('visible_tags_example'); // string[] | 補助科目やコメントとして出力する項目
$visible_ids = array('visible_ids_example'); // string[] | 追加出力するID項目
$start_date = 'start_date_example'; // string | 取得開始日 (yyyy-mm-dd)
$end_date = 'end_date_example'; // string | 取得終了日 (yyyy-mm-dd)

try {
    $result = $apiInstance->getJournals($download_type, $company_id, $visible_tags, $visible_ids, $start_date, $end_date);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling JournalsApi->getJournals: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
download_type string ダウンロード形式
company_id int 事業所ID
visible_tags string[] 補助科目やコメントとして出力する項目 [optional]
visible_ids string[] 追加出力するID項目 [optional]
start_date string 取得開始日 (yyyy-mm-dd) [optional]
end_date string 取得終了日 (yyyy-mm-dd) [optional]

Return type

\Freee\Accounting\Model\JournalsResponse

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]