Skip to content
This repository has been archived by the owner on Oct 1, 2024. It is now read-only.

Latest commit

 

History

History
189 lines (128 loc) · 5.44 KB

JournalsApi.md

File metadata and controls

189 lines (128 loc) · 5.44 KB

FreeeAccountingClient.JournalsApi

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

Method HTTP request Description
downloadJournal GET /journals/reports/{id}/download ダウンロード実行
getJournalStatus GET /journals/reports/{id}/status ステータス確認
getJournals GET /journals ダウンロード要求

downloadJournal

downloadJournal(id, companyId)

ダウンロード実行

Example

var FreeeAccountingClient = require('freee-accounting-client');
var defaultClient = FreeeAccountingClient.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = accessToken; // assign access token here.

var apiInstance = new FreeeAccountingClient.JournalsApi();

var id = 56; // Number | 受け付けID

var companyId = 56; // Number | 事業所ID


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.downloadJournal(id, companyId, callback);

Parameters

Name Type Description Notes
id Number 受け付けID
companyId Number 事業所ID

Return type

null (empty response body)

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json, application/x-www-form-urlencoded
  • Accept: application/pdf, text/csv; charset=sjis; header=present

getJournalStatus

JournalsStatusResponse getJournalStatus(companyId, id, opts)

ステータス確認

Example

var FreeeAccountingClient = require('freee-accounting-client');
var defaultClient = FreeeAccountingClient.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = accessToken; // assign access token here.

var apiInstance = new FreeeAccountingClient.JournalsApi();

var companyId = 56; // Number | 事業所ID

var id = 56; // Number | 受け付けID

var opts = { 
  'visibleTags': ["visibleTags_example"], // [String] | 補助科目やコメントとして出力する項目
  'startDate': "startDate_example", // String | 取得開始日 (yyyy-mm-dd)
  'endDate': "endDate_example" // String | 取得終了日 (yyyy-mm-dd)
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getJournalStatus(companyId, id, opts, callback);

Parameters

Name Type Description Notes
companyId Number 事業所ID
id Number 受け付けID
visibleTags [String] 補助科目やコメントとして出力する項目 [optional]
startDate String 取得開始日 (yyyy-mm-dd) [optional]
endDate String 取得終了日 (yyyy-mm-dd) [optional]

Return type

JournalsStatusResponse

Authorization

oauth2

HTTP request headers

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

getJournals

JournalsEnqueueJournalsResponse getJournals(downloadType, companyId, opts)

ダウンロード要求

Example

var FreeeAccountingClient = require('freee-accounting-client');
var defaultClient = FreeeAccountingClient.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = accessToken; // assign access token here.

var apiInstance = new FreeeAccountingClient.JournalsApi();

var downloadType = "downloadType_example"; // String | ダウンロード形式

var companyId = 56; // Number | 事業所ID

var opts = { 
  'visibleTags': ["visibleTags_example"], // [String] | 補助科目やコメントとして出力する項目
  'startDate': "startDate_example", // String | 取得開始日 (yyyy-mm-dd)
  'endDate': "endDate_example" // String | 取得終了日 (yyyy-mm-dd)
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getJournals(downloadType, companyId, opts, callback);

Parameters

Name Type Description Notes
downloadType String ダウンロード形式
companyId Number 事業所ID
visibleTags [String] 補助科目やコメントとして出力する項目 [optional]
startDate String 取得開始日 (yyyy-mm-dd) [optional]
endDate String 取得終了日 (yyyy-mm-dd) [optional]

Return type

JournalsEnqueueJournalsResponse

Authorization

oauth2

HTTP request headers

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