0.0.2 • Published 5 years ago

freee-accounting-client v0.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
5 years ago

Installation

use npm

npm install freee-accounting-client --save

For browser

The library also works in the browser environment via npm and browserify. After following the above steps with Node.js and installing browserify with npm install -g browserify, perform the following (assuming main.js is your entry file, that's to say your javascript file where you actually use this library):

browserify main.js > bundle.js

Then include bundle.js in the HTML pages.

Webpack Configuration

Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:

module: {
  rules: [
    {
      parser: {
        amd: false
      }
    }
  ]
}

Getting Started

Please follow the installation instruction and execute the following JS code:

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 api = new FreeeAccountingClient.AccountItemsApi()

var parameters = new FreeeAccountingClient.AccountItemParams(); // {AccountItemParams} 勘定科目の作成


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createAccountItem(parameters, callback);

Documentation for API Endpoints

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

ClassMethodHTTP requestDescription
FreeeAccountingClient.AccountItemsApicreateAccountItemPOST /account_items勘定科目の作成
FreeeAccountingClient.AccountItemsApigetAccountItemGET /account_items/{id}勘定科目の詳細情報の取得
FreeeAccountingClient.AccountItemsApigetAccountItemsGET /account_items勘定科目一覧の取得
FreeeAccountingClient.AccountItemsApiupdateAccountItemPUT /account_items/{id}勘定科目の更新
FreeeAccountingClient.BanksApigetBanksGET /banks連携サービス一覧の取得
FreeeAccountingClient.CompaniesApigetCompaniesGET /companies事業所一覧の取得
FreeeAccountingClient.CompaniesApigetCompanyGET /companies/{id}事業所の詳細情報の取得
FreeeAccountingClient.CompaniesApiupdateCompanyPUT /companies/{id}事業所情報の更新
FreeeAccountingClient.DealsApicreateDealPOST /deals取引(収入/支出)の作成
FreeeAccountingClient.DealsApigetDealGET /deals/{id}取引(収入/支出)の取得
FreeeAccountingClient.DealsApigetDealsGET /deals取引(収入/支出)一覧の取得
FreeeAccountingClient.DealsApiupdateDealPUT /deals/{id}取引(収入/支出)の更新
FreeeAccountingClient.ExpenseApplicationLineTemplatesApigetExpenseApplicationLineTemplatesGET /expense_application_line_templates経費科目一覧の取得
FreeeAccountingClient.ExpenseApplicationsApicreateExpenseApplicationPOST /expense_applications経費申請の作成
FreeeAccountingClient.ExpenseApplicationsApidestroyExpenseApplicationDELETE /expense_applications/{id}経費申請の削除
FreeeAccountingClient.ExpenseApplicationsApiupdateExpenseApplicationPUT /expense_applications/{id}経費申請の更新
FreeeAccountingClient.InvoicesApidestroyInvoiceDELETE /invoices/{id}請求書の削除
FreeeAccountingClient.InvoicesApiupdateInvoicePUT /invoices/{id}請求書の更新
FreeeAccountingClient.ItemsApicreateItemPOST /items品目の作成
FreeeAccountingClient.ItemsApigetItemsGET /items品目一覧の取得
FreeeAccountingClient.JournalsApidownloadJournalGET /journals/reports/{id}/downloadダウンロード実行
FreeeAccountingClient.JournalsApigetJournalStatusGET /journals/reports/{id}/statusステータス確認
FreeeAccountingClient.JournalsApigetJournalsGET /journalsダウンロード要求
FreeeAccountingClient.ManualJournalsApicreateManualJournalPOST /manual_journals振替伝票の作成
FreeeAccountingClient.ManualJournalsApidestroyManualJournalDELETE /manual_journals/{id}振替伝票の削除
FreeeAccountingClient.ManualJournalsApigetManualJournalGET /manual_journals/{id}振替伝票の取得
FreeeAccountingClient.ManualJournalsApigetManualJournalsGET /manual_journals振替伝票一覧の取得
FreeeAccountingClient.ManualJournalsApiupdateManualJournalPUT /manual_journals/{id}振替伝票の更新
FreeeAccountingClient.PartnersApicreatePartnerPOST /partners取引先の作成
FreeeAccountingClient.PartnersApigetPartnersGET /partners取引先一覧の取得
FreeeAccountingClient.PartnersApiupdatePartnerPUT /partners/{id}取引先の更新
FreeeAccountingClient.PaymentsApicreateDealPaymentPOST /deals/{id}/payments取引(収入/支出)の支払行作成
FreeeAccountingClient.PaymentsApidestroyDealPaymentDELETE /deals/{id}/payments/{payment_id}取引(収入/支出)の支払行削除
FreeeAccountingClient.PaymentsApiupdateDealPaymentPUT /deals/{id}/payments/{payment_id}取引(収入/支出)の支払行更新
FreeeAccountingClient.ReceiptsApicreateReceiptPOST /receiptsファイルボックス 証憑ファイルアップロード
FreeeAccountingClient.RenewsApicreateDealRenewPOST /deals/{id}/renews取引(収入/支出)に対する+更新の作成
FreeeAccountingClient.RenewsApideleteDealRenewDELETE /deals/{id}/renews/{renew_id}取引(収入/支出)の+更新の削除
FreeeAccountingClient.RenewsApiupdateDealRenewPUT /deals/{id}/renews/{renew_id}取引(収入/支出)の+更新の更新
FreeeAccountingClient.SectionsApicreateSectionPOST /sections部門の作成
FreeeAccountingClient.SectionsApidestroySectionDELETE /sections/{id}部門の削除
FreeeAccountingClient.SectionsApigetSectionsGET /sections部門一覧の取得
FreeeAccountingClient.SectionsApiupdateSectionPUT /sections/{id}部門の更新
FreeeAccountingClient.SegmentTagsApicreateSegmentTagPOST /segments/{segment_id}/tagsセグメントの作成
FreeeAccountingClient.SegmentTagsApidestroySegmentsTagDELETE /segments/{segment_id}/tags/{id}セグメントタグの削除
FreeeAccountingClient.SegmentTagsApigetSegmentTagsGET /segments/{segment_id}/tagsセグメントタグ一覧の取得
FreeeAccountingClient.SegmentTagsApiupdateSegmentTagPUT /segments/{segment_id}/tags/{id}セグメントタグの更新
FreeeAccountingClient.SelectablesApigetFormsSelectablesGET /forms/selectablesフォーム用選択項目情報の取得
FreeeAccountingClient.TagsApicreateTagPOST /tagsメモタグの作成
FreeeAccountingClient.TagsApigetTagsGET /tagsメモタグ一覧の取得
FreeeAccountingClient.TaxesApigetTaxCodesGET /taxes/codes税区分コード一覧の取得
FreeeAccountingClient.TaxesApigetTaxesGET /taxes税区分一覧の取得 (deprecated)
FreeeAccountingClient.TransfersApicreateTransferPOST /transfers取引(振替)の作成
FreeeAccountingClient.TransfersApigetTransfersGET /transfers取引(振替)一覧の取得
FreeeAccountingClient.TrialBalanceApigetTrialBsGET /reports/trial_bs貸借対照表の取得
FreeeAccountingClient.TrialBalanceApigetTrialBsThreeYearsGET /reports/trial_bs_three_years貸借対照表(3期間比較)の取得
FreeeAccountingClient.TrialBalanceApigetTrialBsTwoYearsGET /reports/trial_bs_two_years貸借対照表(前年比較)の取得
FreeeAccountingClient.TrialBalanceApigetTrialPlGET /reports/trial_pl損益計算書の取得
FreeeAccountingClient.TrialBalanceApigetTrialPlSectionsGET /reports/trial_pl_sections損益計算書(部門比較)の取得
FreeeAccountingClient.TrialBalanceApigetTrialPlThreeYearsGET /reports/trial_pl_three_years損益計算書(3期間比較)の取得
FreeeAccountingClient.TrialBalanceApigetTrialPlTwoYearsGET /reports/trial_pl_two_years損益計算書(前年比較)の取得
FreeeAccountingClient.UsersApigetUsersCapabilitiesGET /users/capabilitiesログインユーザの権限の取得
FreeeAccountingClient.UsersApigetUsersMeGET /users/meログインユーザ情報の取得
FreeeAccountingClient.WalletTxnsApicreateWalletTxnPOST /wallet_txns明細の作成
FreeeAccountingClient.WalletTxnsApigetWalletTxnsGET /wallet_txns明細一覧の取得
FreeeAccountingClient.WalletablesApicreateWalletablePOST /walletables口座の作成
FreeeAccountingClient.WalletablesApigetWalletablesGET /walletables口座一覧の取得