{ "openapi": "3.0.1", "info": { "title": "freee会計 API", "description": "\n
freee API開発がはじめての方はfreee API スタートガイドを参照してください。
\n\n\nインボイス制度に伴い、freee会計の帳票機能がfreee請求書に移行します。これに伴い、2023年10月にfreee会計の「請求書の作成、見積書の作成」エンドポイントは廃止、freee請求書APIに移行する予定です。詳細は freee会計 APIの仕様変更(インボイス制度対応)についてをご確認ください。\n
\n\nhttps://api.freee.co.jp/ (httpsのみ)
\n\nOAuth2.0を利用します。詳細はリファレンスの認証に関する記載を参照してください。
\n\nリクエスト、レスポンスともにJSON形式をサポートしていますが、詳細は、API毎の説明欄(application/jsonなど)を確認してください。
\n\nfreeeでは、APIを改善していくために以下のような変更は後方互換性ありとして通知なく変更を入れることがあります。アプリケーション実装者は以下を踏まえて開発を行ってください。
\n\nすべてのAPIのレスポンスには以下のHTTPヘッダーが含まれます。
\n\nX-Freee-Request-ID
\nステータスコードはレスポンス内のJSONに含まれる他、HTTPヘッダにも含まれる
\n一部のエラーレスポンスにはエラーコードが含まれます。
詳細は、HTTPステータスコード400台エラー時のチェックポイントを参照してください
type
\n\nレスポンスの例
\n\n {\n "status_code" : 400,\n "errors" : [\n {\n "type" : "status",\n "messages" : ["不正なリクエストです。"]\n },\n {\n "type" : "validation",\n "messages" : ["Date は不正な日付フォーマットです。入力例:2019-12-17"]\n }\n ]\n }\n\n\n\nfreeeは一定期間に過度のアクセスを検知した場合、APIアクセスをコントロールする場合があります。
\nその際のhttp status codeは403となります。制限がかかってから10分程度が過ぎると再度使用することができるようになります。
\n\nfreeeはエンドポイント毎に一定頻度以上のアクセスを検知した場合、APIアクセスをコントロールする場合があります。その際のhttp status codeは429(too many requests)となります。
\nhttp status codeが429となった場合、API使用ステータスはレスポンスヘッダに付与されます。
\nx-ratelimit-limit:10\nx-ratelimit-remaining:1\nx-ratelimit-reset:2023-01-13T10:22:29+09:00\n\n\n| ヘッダ名 | \n説明 | \n
|---|---|
| x-ratelimit-limit | 使用回数の上限 |
| x-ratelimit-remaining | 残り使用回数 |
| x-ratelimit-reset | 使用回数がリセットされる時刻 |
| freee会計プラン名 | \n事業所とアプリケーション毎に、1日のAPIコール数の上限 | \n
|---|---|
| 法人エンタープライズプラン | \n10,000 | \n
| 法人アドバンスプラン(および旧法人プロフェッショナルプラン) | \n5,000 | \n
| 上記以外 | \n3,000 | \n
契約プランごとにご利用可能な freee 会計 API は異なります。 freee 会計の Web 版でご利用いただける機能について、 freee 会計 API でもご利用いただけます。
\n例えば法人スタータープラン、旧法人ベーシックプランをご契約いただいている場合、 Web 版では経費精算機能をご利用いただけますので、 API でも経費精算 API をご利用可能です。
\nただし以下の API は例外です。
\n詳しくは、【個人】freee会計のプランについて 並びに 【法人】freee会計のプランについてをご確認ください。
\n\nご利用可能な freee 会計 API であっても、契約プランごとに利用可能なパラメータは異なります。
\n| パラメータ | \n説明 | \n利用可能プラン | \n
|---|---|---|
| segment_1_tag | \nセグメント1タグ | \n法人アドバンスプラン 法人エンタープライズプラン 旧法人プロフェッショナルプラン | \n
| segment_2_tag | \nセグメント2タグ | \n法人アドバンスプラン 法人エンタープライズプラン | \n
| segment_3_tag | \nセグメント3タグ | \n法人アドバンスプラン 法人エンタープライズプラン | \n
| segment_1_tag_id | \nセグメント1タグID | \n法人アドバンスプラン 法人エンタープライズプラン 旧法人プロフェッショナルプラン | \n
| segment_2_tag_id | \nセグメント2タグID | \n法人アドバンスプラン 法人エンタープライズプラン | \n
| segment_3_tag_id | \nセグメント3タグID | \n法人アドバンスプラン 法人エンタープライズプラン | \n
| segment_1_tag_name | \nセグメント1タグ名 | \n法人アドバンスプラン 法人エンタープライズプラン 旧法人プロフェッショナルプラン | \n
| segment_2_tag_name | \nセグメント2タグ名 | \n法人アドバンスプラン 法人エンタープライズプラン | \n
| segment_3_tag_name | \nセグメント3タグ名 | \n法人アドバンスプラン 法人エンタープライズプラン | \n
| segment_id | \nセグメントID(1, 2, 3 のいずれか) | \n法人アドバンスプラン 法人エンタープライズプラン 旧法人プロフェッショナルプラン 旧法人プロフェッショナルプランにつきましては、 1 のみ指定可能です。 | \n
詳細は会計Webhook概要を参照してください。
\n\nご不明点、ご要望等は freee サポートデスクへのお問い合わせフォーム からご連絡ください。
\n取引先
" }, { "name": "Selectables", "description": "フォーム用選択項目情報
" }, { "name": "Account items", "description": "勘定科目
" }, { "name": "Tags", "description": "メモタグ
" }, { "name": "Sections", "description": "部門
" }, { "name": "Invoices", "description": "請求書
" }, { "name": "Deals", "description": "取引(収入・支出)
" }, { "name": "Payments", "description": "取引(収入・支出)の支払行
" }, { "name": "Renews", "description": "取引(収入・支出)の+更新
" }, { "name": "ManualJournals", "description": "振替伝票
" }, { "name": "Users", "description": "ユーザー
" }, { "name": "Companies", "description": "事業所
" }, { "name": "Items", "description": "品目
" }, { "name": "Taxes", "description": "税区分
" }, { "name": "Walletables", "description": "口座
" }, { "name": "Banks", "description": "連携サービス
" }, { "name": "Transfers", "description": "取引(振替)
" }, { "name": "Wallet txns", "description": "口座明細
" }, { "name": "Journals", "description": "仕訳帳
" }, { "name": "Trial balance", "description": "試算表
" }, { "name": "Receipts", "description": "ファイルボックス(証憑ファイル)
" }, { "name": "Expense applications", "description": "経費精算
" }, { "name": "Expense application line templates", "description": "経費科目
" }, { "name": "Expense application currencies", "description": "経費精算の外貨
" }, { "name": "Payment requests", "description": "支払依頼
" }, { "name": "Approval requests", "description": "各種申請
" }, { "name": "Purchase requests", "description": "購買申請
" }, { "name": "Approval flow routes", "description": "申請経路
" }, { "name": "Segment tags", "description": "セグメントタグ
" }, { "name": "Quotations", "description": "見積書
" }, { "name": "Fixed assets", "description": "固定資産台帳
" }, { "name": "General ledgers", "description": "総勘定元帳
" }, { "name": "Account groups", "description": "決算書表示名
" }, { "name": "User matchers", "description": "自動登録ルール
" } ], "paths": { "/api/1/partners": { "get": { "tags": [ "Partners" ], "summary": "取引先一覧の取得", "description": "\n指定した事業所に登録されている取引先の一覧を取得します。取引・請求書・支払依頼などの取引先マスタとして参照する用途を想定しています。
\n\nyyyy-mm-dd で指定してください。指定した事業所に新しい取引先を作成します。取引や請求書で参照する取引先マスタを新規登録する用途で利用します。
\n\n指定した事業所の取引先 1 件を ID を指定して取得します。取引先の詳細確認や、更新前の現在値取得に利用します。
\n\n指定した取引先の情報を更新します。id で更新対象を特定します。取引先コード(code)をキーに更新したい場合は PUT /api/1/partners/code/{code} を利用してください。
PUT /api/1/partners/code/{code} を、code 自体を新しい値に変更する用途は本 API ではサポートしていません。指定した事業所の取引先を削除します。取引で参照されている取引先は削除できないため、削除に失敗した場合は該当取引先の参照を先に解消してください。
\n\navailable を false に更新することを検討してください。取引先コード(code)をキーに、指定した取引先の情報を更新します。取引先 ID を持たず取引先コードで運用しているシステムからの更新用途を想定しています。
\n\nPUT /api/1/partners/upsert_by_code を利用してください。",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/badRequestNotFoundError"
}
}
}
},
"500": {
"description": "サーバ内部エラー。時間を空けて再試行してください。",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/internalServerError"
}
}
}
}
}
}
},
"/api/1/partners/upsert_by_code": {
"put": {
"tags": [
"Partners"
],
"summary": "取引先の更新(存在しない場合は作成)",
"description": "\n取引先コード(code)をキーに、指定した取引先の情報を更新します。該当する取引先が存在しない場合は新規作成します(upsert)。同期処理を伴う外部システムとの連携で、取引先マスタを一括で登録・更新する用途を想定しています。
\n\n指定した事業所で勘定科目の入力フォームを構築するための、勘定科目カテゴリー、勘定科目、デフォルト税区分、決算書表示名を取得します。
\n\nincludes に account_item を指定した場合に、account_categories と account_groups を返します。includes を指定しない場合、レスポンスは空のオブジェクトになります。指定した勘定科目を取得する
\n事業所の設定で勘定科目コードを使用する設定にしている場合、レスポンスで勘定科目コード(code)を返します
", "operationId": "get_account_item", "parameters": [ { "name": "company_id", "in": "query", "description": "事業所ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 } }, { "name": "id", "in": "path", "description": "勘定科目ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/accountItemResponse" } } } }, "400": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/badRequestError" } } } }, "401": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/unauthorizedError" } } } }, "403": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/forbiddenError" } } } }, "404": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/badRequestNotFoundError" } } } }, "500": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/internalServerError" } } } } } }, "put": { "tags": [ "Account items" ], "summary": "勘定科目の更新", "description": "\n指定した勘定科目を更新する
\n\ntax_codeは、指定した事業所の税区分一覧の取得APIでavailableの値がtrue、かつ経過措置税区分ではない5%の税区分を確認して、そのcodeを指定して勘定科目の更新をしてください。例 課対仕入の場合、34を指定してください
\ncodeを利用するには、事業所の設定で勘定科目コードを使用する設定にする必要があります。
", "operationId": "update_account_item", "parameters": [ { "name": "id", "in": "path", "description": "勘定科目ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/accountItemUpdateParams" } }, "application/x-www-form-urlencoded": { "schema": { "$ref": "#/components/schemas/accountItemUpdateParams" } } }, "required": true }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/accountItemResponse" } } } }, "400": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/badRequestError" } } } }, "401": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/unauthorizedError" } } } }, "403": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/forbiddenError" } } } }, "500": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/internalServerError" } } } }, "503": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/serviceUnavailableError" } } } } } }, "delete": { "tags": [ "Account items" ], "summary": "勘定科目の削除", "description": "\n指定した勘定科目を削除する
\n指定した事業所の勘定科目一覧を取得する
\n\ndefault_tax_code は勘定科目作成・更新時に利用するものではありません
\n事業所の設定で勘定科目コードを使用する設定にしている場合、レスポンスで勘定科目コード(code)を返します
", "operationId": "get_account_items", "parameters": [ { "name": "company_id", "in": "query", "description": "事業所ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 } }, { "name": "base_date", "in": "query", "description": "基準日(yyyy-mm-dd)。指定した場合、勘定科目に紐づく税区分(default_tax_code)が、基準日の税率に基づいて返ります。指定しない場合はリクエスト日が基準日になります。", "example": "2020-06-15", "schema": { "type": "string" } }, { "name": "start_update_date", "in": "query", "description": "更新日で絞込:開始日(yyyy-mm-dd)。指定した日以降に更新された勘定科目を返します。", "example": "2020-06-01", "schema": { "type": "string" } }, { "name": "end_update_date", "in": "query", "description": "更新日で絞込:終了日(yyyy-mm-dd)。指定した日以前に更新された勘定科目を返します。", "example": "2020-06-30", "schema": { "type": "string" } }, { "name": "keyword", "in": "query", "description": "検索キーワード。勘定科目コード・勘定科目名・ショートカット1・2 のいずれかに対する部分一致で絞り込みます。\n未指定または空文字の場合は絞り込みません。\n以下のいずれかで区切って複数キーワードを指定した場合は AND 検索になります。\n指定した事業所の勘定科目を作成する
\n\ntax_codeは、指定した事業所の税区分一覧の取得APIでavailableの値がtrue、かつ経過措置税区分ではない5%の税区分を確認して、そのcodeを指定して勘定科目の作成をしてください。例 課対仕入の場合、34を指定してください
\ncodeを利用するには、事業所の設定で勘定科目コードを使用する設定にする必要があります。
", "operationId": "create_account_item", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/accountItemCreateParams" } }, "application/x-www-form-urlencoded": { "schema": { "$ref": "#/components/schemas/accountItemCreateParams" } } }, "required": true }, "responses": { "201": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/accountItemResponse" } } } }, "400": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/badRequestError" } } } }, "401": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/unauthorizedError" } } } }, "403": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/forbiddenError" } } } }, "500": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/internalServerError" } } } } } } }, "/api/1/account_items/code/upsert": { "put": { "tags": [ "Account items" ], "summary": "勘定科目の更新(存在しない場合は作成)", "description": "\n勘定科目コードをキーに、指定した勘定科目の情報を更新(存在しない場合は作成)する
\nリクエストのトップレベルのcodeに指定した勘定科目コードに一致する勘定科目が存在する場合は更新(ステータスコード200)、存在しない場合は作成(ステータスコード201)します
\n\n本APIを利用するには、事業所の設定で勘定科目コードを使用する設定にする必要があります。設定が無効の場合はエラー(ステータスコード400)になります。
\n更新対象を特定する勘定科目コードはトップレベルのcodeで指定してください。account_item.codeは指定できません(指定した場合はエラーになります)。
\ntax_codeは、指定した事業所の税区分一覧の取得APIでavailableの値がtrue、かつ経過措置税区分ではない5%の税区分を確認して、そのcodeを指定して勘定科目の更新をしてください。例 課対仕入の場合、34を指定してください
", "operationId": "api/v1/account_items#upsert_by_code", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "code", "company_id", "account_item" ], "properties": { "code": { "type": "string", "maxLength": 20, "description": "勘定科目コード (20文字以内)。半角英数字・ハイフン・アンダースコアのみ利用できます。このコードをキーに勘定科目を検索し、一致する勘定科目が存在すれば更新、存在しなければ作成します。", "example": "999", "pattern": "^[0-9a-zA-Z_-]+$" }, "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID", "example": 1 }, "account_item": { "type": "object", "required": [ "account_category_id", "corresponding_expense_id", "corresponding_income_id", "group_name", "tax_code" ], "properties": { "name": { "type": "string", "maxLength": 30, "description": "勘定科目名 (30文字以内)\n口座に紐付かない勘定科目の更新時は必須です。\n口座に紐付く勘定科目の更新時は指定することができません。\n", "example": "新しい勘定科目" }, "shortcut": { "type": "string", "maxLength": 20, "description": "ショートカット1 (20文字以内)", "example": "NEWACCOUNTITEM" }, "shortcut_num": { "type": "string", "maxLength": 20, "description": "ショートカット2 (20文字以内)", "example": "999" }, "tax_code": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647, "description": "税区分コード 指定できるコードは本APIの注意点をご確認ください。", "example": 1 }, "group_name": { "type": "string", "description": "決算書表示名(小カテゴリー) Selectablesフォーム用選択項目情報エンドポイント(account_groups.name)で取得可能です", "example": "その他預金" }, "account_category_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "勘定科目カテゴリーID Selectablesフォーム用選択項目情報エンドポイント(account_groups.account_category_id)で取得可能です", "example": 1 }, "corresponding_income_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "収入取引相手勘定科目ID", "example": 1 }, "corresponding_expense_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "支出取引相手勘定科目ID", "example": 1 }, "accumulated_dep_account_item_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "減価償却累計額勘定科目ID(法人のみ利用可能)", "example": 1 }, "searchable": { "type": "integer", "format": "int64", "minimum": 2, "maximum": 3, "description": "検索可能:2, 検索不可:3(登録時未指定の場合は2で登録されます。更新時未指定の場合はsearchableは変更されません。)", "example": 2 }, "items": { "type": "array", "description": "勘定科目に紐付ける品目の一覧", "items": { "type": "object", "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "品目ID", "example": 1 } } } }, "partners": { "type": "array", "description": "勘定科目に紐付ける取引先の一覧", "items": { "type": "object", "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "取引先ID", "example": 1 } } } } } } } } }, "application/x-www-form-urlencoded": { "schema": { "$ref": "#/paths/~1api~11~1account_items~1code~1upsert/put/requestBody/content/application~1json/schema" } } }, "required": true }, "responses": { "200": { "description": "既存の勘定科目を更新した場合", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/accountItemResponse" } } } }, "201": { "description": "勘定科目を新規に作成した場合", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/accountItemResponse" } } } }, "400": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/badRequestError" } } } }, "401": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/unauthorizedError" } } } }, "403": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/forbiddenError" } } } }, "500": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/internalServerError" } } } }, "503": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/serviceUnavailableError" } } } } } } }, "/api/1/tags": { "get": { "tags": [ "Tags" ], "summary": "メモタグ一覧の取得", "description": "\n指定した事業所に登録されているメモタグの一覧を取得します。取引や口座振替の明細に付与するメモタグを確認する用途を想定しています。
\n\nyyyy-mm-dd で指定してください(どちらも指定日を含みます)。指定した事業所に新しいメモタグを作成します。作成したメモタグは取引や口座振替の明細に付与できます。
\n\n指定した事業所のメモタグを 1 件取得します。メモタグID(id)はメモタグ一覧の取得 API で確認できます。
\n\n指定した事業所のメモタグを更新します。
\n\n指定した事業所のメモタグを削除します。
\n\n指定した事業所に登録されている部門の一覧を取得します。取引や振替伝票の明細に付与する部門マスタを参照する用途を想定しています。
\n\nyyyy-mm-dd で指定してください(どちらも指定日を含みます)。部門階層を利用している場合、階層構造を維持するため、更新日が範囲外の親部門を含むことがあります。指定した事業所に新しい部門を作成します。作成された部門は使用設定(available)が true の状態で登録され、取引作成時などに指定できるようになります。
\n\n指定した事業所の部門を 1 件取得します。部門ID(id)は部門一覧の取得APIで確認できます。
\n\n指定した事業所の部門を更新します。このAPIは部門の作成は行いません。部門コードをキーに更新(存在しない場合は作成)したい場合は PUT /api/1/sections/code/upsert を利用してください。
\n\n指定した事業所の部門を削除します。
\n\n部門コード(code)をキーに、指定した部門の情報を更新します。該当する部門が存在しない場合は新規作成します(upsert)。外部システムとの連携で、部門マスタを一括で登録・更新する用途を想定しています。
\n\n指定した事業所の請求書一覧を取得する
\n\n指定した事業所の請求書を取得する
\n\n指定した事業所の見積書一覧を取得する
\n\n指定した事業所の見積書詳細を取得する
\n\n指定した事業所の取引(収入・支出)一覧を取得する
\nissue_date : 発生日
\ndue_date : 支払期日
\namount : 金額
\ndue_amount : 支払残額
\ntype
\ndetails : 取引の明細行
\naccruals : 取引の債権債務行
\nrenews : 取引の+更新行
\npayments : 取引の支払行
\nfrom_walletable_type
\n指定した事業所の取引(収入・支出)を作成する
\nissue_date : 発生日
\ndue_date : 支払期日
\namount : 金額
\ndue_amount : 支払残額
\ntype
\nref_number : 管理番号
\ndetails : 取引の明細行(最大100行)
\npayments : 取引の支払行
\nreceipt_ids : ファイルボックス(証憑ファイル)ID
\nfrom_walletable_type
\n本APIでは+更新行(renews)の操作ができません。取引(収入・支出)の+更新の作成APIをご利用ください。
セグメントタグ情報は法人アドバンスプラン(および旧法人プロフェッショナルプラン)以上で利用可能です。利用可能なセグメントの数は、法人アドバンスプラン(および旧法人プロフェッショナルプラン)の場合は1つ、法人エンタープライズプランの場合は3つです。
partner_codeを利用するには、事業所の設定から取引先コードの利用を有効にする必要があります。またpartner_codeとpartner_idは同時に指定することはできません。
account_item_codeを利用するには、事業所の設定から勘定科目コードの利用を有効にする必要があります。またaccount_item_codeとaccount_item_idは同時に指定することはできません。
item_codeを利用するには、事業所の設定から品目コードの利用を有効にする必要があります。またitem_codeとitem_idは同時に指定することはできません。
section_codeを利用するには、事業所の設定から部門コードの利用を有効にする必要があります。またsection_codeとsection_idは同時に指定することはできません。
segment_1_tag_codeを利用するには、事業所の設定からセグメントタグコードの利用を有効にする必要があります。またsegment_1_tag_codeとsegment_1_tag_idは同時に指定することはできません。
segment_2_tag_codeを利用するには、事業所の設定からセグメントタグコードの利用を有効にする必要があります。またsegment_2_tag_codeとsegment_2_tag_idは同時に指定することはできません。
segment_3_tag_codeを利用するには、事業所の設定からセグメントタグコードの利用を有効にする必要があります。またsegment_3_tag_codeとsegment_3_tag_idは同時に指定することはできません。
本APIでは取引の明細行(details)は、最大100行までになります。
\n指定した事業所の取引(収入・支出)を取得する
\nissue_date : 発生日
\ndue_date : 支払期日
\namount : 金額
\ndue_amount : 支払残額
\ntype
\ndetails : 取引の明細行
\naccruals : 取引の債権債務行
\nrenews : 取引の+更新行
\npayments : 取引の支払行
\nfrom_walletable_type
\n指定した事業所の取引(収入・支出)を更新する
\nissue_date : 発生日
\ndue_date : 支払期日
\namount : 金額
\ndue_amount : 支払残額
\ntype
\ndetails : 取引の明細行(最大100行)
\nrenews : 取引の+更新行
\npayments : 取引の支払行
\nfrom_walletable_type
\nreceipt_ids : ファイルボックス(証憑ファイル)ID
\n本APIでは支払行(payments)の操作ができません。取引(収入・支出)の支払行の作成・更新・削除APIをご利用ください。
本APIでは+更新行(renews)の操作ができません。取引(収入・支出)の+更新の作成・更新・削除APIをご利用ください。
本APIでは収入/支出の切替えができません。既存の取引を削除後、再度作成してください。
本APIで取引を更新すると、消費税の計算方法は必ず内税方式が選択されます。
セグメントタグ情報は法人アドバンスプラン(および旧法人プロフェッショナルプラン)以上で利用可能です。利用可能なセグメントの数は、法人アドバンスプラン(および旧法人プロフェッショナルプラン)の場合は1つ、法人エンタープライズプランの場合は3つです。
partner_codeを利用するには、事業所の設定から取引先コードの利用を有効にする必要があります。またpartner_codeとpartner_idは同時に指定することはできません。
freee請求書から登録された取引は品目・部門・メモタグ・セグメント1、2、3のみ更新可能です。
本APIでは取引の明細行(details)は、最大100行までになります。
\n指定した取引(収入・支出)を削除する
\n", "operationId": "destroy_deal", "parameters": [ { "name": "id", "in": "path", "description": "取引ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 } }, { "name": "company_id", "in": "query", "description": "事業所ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 } } ], "responses": { "204": { "description": "", "content": {} }, "400": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/badRequestError" } } } }, "401": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/unauthorizedError" } } } }, "403": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/forbiddenError" } } } }, "404": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/badRequestNotFoundError" } } } }, "500": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/internalServerError" } } } } } } }, "/api/1/deals/{id}/renews": { "post": { "tags": [ "Renews" ], "summary": "取引(収入・支出)の+更新の作成", "description": "指定した事業所の取引(収入・支出)の+更新を作成する
\nissue_date : 発生日
due_date : 支払期日
amount : 金額
due_amount : 支払残額
type
\ndetails : 取引の明細行
accruals : 取引の債権債務行
renews : 取引の+更新行
payments : 取引の支払行
from_walletable_type
\n指定した事業所の取引(収入・支出)の+更新を更新する
\nissue_date : 発生日
due_date : 支払期日
amount : 金額
due_amount : 支払残額
type
\ndetails : 取引の明細行
accruals : 取引の債権債務行
renews : 取引の+更新行
payments : 取引の支払行
from_walletable_type
\n指定した事業所の取引(収入・支出)の+更新を削除する
\n指定した事業所の取引(収入・支出)の支払行を作成する
\nissue_date : 発生日
\ndue_date : 支払期日
\namount : 金額
\ndue_amount : 支払残額
\ntype
\ndetails : 取引の明細行
renews : 取引の+更新行
payments : 取引の支払行
from_walletable_type
\n指定した事業所の取引(収入・支出)の支払行を更新する
\nissue_date : 発生日
\ndue_date : 支払期日
\namount : 金額
\ndue_amount : 支払残額
\ntype
\ndetails : 取引の明細行
\nrenews : 取引の+更新行
\npayments : 取引の支払行
\nfrom_walletable_type
\n指定した事業所の取引(収入・支出)の支払行を削除する
\nissue_date : 発生日
\ndue_date : 支払期日
\namount : 金額
\ndue_amount : 支払残額
\ntype
\ndetails : 取引の明細行
\n指定した事業所の振替伝票を、発生日・勘定科目・金額・取引先などの条件で絞り込んで取得します。
\n\ntxn_numberに仕訳番号が入ります。partner_codeを利用するには、事業所の取引先コード利用設定を有効にしてください。partner_idとpartner_codeは同時に指定できません。指定した事業所に、貸借が一致する振替伝票を作成します。各貸借行の金額は税込・円で指定します。
\n\naccount_item_idまたはaccount_item_codeのどちらか一方を指定してください。コードを利用するには事業所の勘定科目コード利用設定を有効にしてください。指定した事業所と振替伝票IDに一致する振替伝票を取得します。
\n\ntxn_numberに仕訳番号が入ります。指定した振替伝票を、リクエストに含めた貸借行の内容で更新します。各貸借行の金額は税込・円で指定します。
\n\ndetailsに含まれない既存の貸借行は削除されます。残す行は貸借行IDを指定して必ずdetailsに含めてください。指定した事業所と振替伝票IDに一致する振替伝票を削除します。
\n\n指定した事業所に所属するユーザーの一覧を取得する
\n\n事業所のメンバーのユーザーID・メールアドレス・氏名を確認できます。取引や申請などの担当者(user_id)を指定する前に、対象ユーザーのIDを調べる用途で使用します。
\n\nアクセストークンに紐づくログインユーザーの情報を取得する
\n\nAPI連携アプリの認可後に、操作しているユーザー本人の情報(ユーザーID・メールアドレス・氏名)や、そのユーザーが所属する事業所の一覧を確認する用途で使用します。
\n\nアクセストークンに紐づくログインユーザーの基本情報(表示名・氏名・カナ氏名)を更新する
\n\n指定した事業所におけるログインユーザーの権限を取得する
\n\n機能(レスポンスの各キー)ごとに、閲覧 (read)・作成 (create)・更新 (update)・削除 (destroy) などの操作が許可されているかどうかがbooleanで返ります。APIで取引や申請などを操作する前に、必要な権限があるかを確認する用途で使用します。
\n\nレスポンスの各キーは以下の項目と対応しています。
\n詳細は https://support.freee.co.jp/hc/ja/articles/210265673 を参照してください。
\n| キー | \n対応する項目 | \n
|---|---|
| wallet_txns | \n自動で経理 / 取得した明細 | \n
| deals | \n取引 | \n
| deal_linkage | \n取引連携(freee請求書など、freee会計以外から連携させる取引) | \n
| transfers | \n口座振替 | \n
| docs | \n見積書・納品書・請求書・領収書・発注書 | \n
| doc_postings | \n(請求書の)郵送 | \n
| receipts | \nファイルボックス | \n
| receipt_stream_editor | \n連続取引登録 | \n
| spreadsheets | \nエクセルインポート | \n
| expense_applications | \n経費精算 | \n
| expense_application_sync_payroll | \n経費精算の給与連携 | \n
| manage_bulk_expense_application_approvals | \n経費精算の一括承認 | \n
| payment_requests | \n支払依頼 | \n
| payment_request_templates | \n支払テンプレート | \n
| approval_requests | \n各種申請 | \n
| purchase_requests | \n購買申請 | \n
| suspense_payments | \n仮払金 | \n
| reports | \n収益 / 費用レポート | \n
| reports_income_expense | \n損益レポート | \n
| reports_receivables | \n入金管理レポート | \n
| reports_payables | \n支払管理レポート(一括振込ファイルを含む) | \n
| reports_purchase_budgets | \n購買進捗モニター | \n
| reports_cash_balance | \n現預金レポート/資金繰りレポート | \n
| reports_managements_planning | \n経営プランニング | \n
| reports_managements_navigation | \n経営ナビゲーション | \n
| reports_managements_introduction | \n経営プランニング・経営ナビゲーションの紹介ページ | \n
| reports_custom_reports_aggregate | \nカスタムレポート | \n
| reports_pl | \n損益計算書(月次推移/試算表) | \n
| reports_bs | \n貸借対照表(月次推移/試算表) | \n
| reports_general_ledgers | \n総勘定元帳 | \n
| reports_journals | \n仕訳帳 | \n
| manual_journals | \n振替伝票 | \n
| fixed_assets | \n固定資産台帳 | \n
| inventory_refreshes | \n在庫棚卸 | \n
| biz_allocations | \n家事按分 | \n
| payment_records | \n支払調書 | \n
| annual_reports | \n決算書、確定申告書類 | \n
| consolidation | \n連結会計 | \n
| tax_reports | \n消費税区分別表・消費税集計表 | \n
| consumption_entries | \n消費税申告書 | \n
| tax_return | \n連携用データ | \n
| account_item_statements | \n勘定科目内訳明細書 | \n
| month_end | \n月締め | \n
| year_end | \n年度締め | \n
| walletables | \n口座 / 口座の同期 | \n
| companies | \n事業所の設定 | \n
| invitations | \nメンバー招待 | \n
| access_controls | \n権限管理 | \n
| sign_in_logs | \nログイン履歴 | \n
| user_attribute_logs | \nユーザー更新履歴 | \n
| app_role_logs | \n権限変更履歴 | \n
| txn_relationship_logs | \n仕訳関連履歴 | \n
| backups | \nバックアップ | \n
| opening_balances | \n開始残高の設定 | \n
| system_conversion | \n乗り換え設定 | \n
| resets | \nリセット | \n
| partners | \n取引先 | \n
| items | \n品目 | \n
| sections | \n部門 | \n
| tags | \nメモタグ | \n
| account_items | \n勘定科目 | \n
| taxes | \n税区分 | \n
| payroll_item_sets | \n給与連携の設定 | \n
| user_matchers | \n自動登録ルール | \n
| deal_templates | \n取引テンプレート | \n
| manual_journal_templates | \n振替伝票テンプレート | \n
| cost_allocations | \n部門配賦 | \n
| approval_flow_routes | \n承認経路 | \n
| expense_application_templates | \n経費科目 | \n
| request_forms | \n申請フォーム | \n
| system_messages_for_admin | \n管理者向けお知らせ | \n
| company_internal_announcements | \nアナウンス | \n
| doc_change_logs | \n受発注書類変更履歴 | \n
| entries_reviews | \n記帳レビュー | \n
| freee_cards_stream | \nfreeeカードで経理 | \n
| proxy_application_settings | \n代理申請の設定 | \n
| workflows | \n仕訳承認 | \n
| oauth_applications | \nアプリ利用 | \n
| oauth_authorizations | \nアプリ認可 | \n
| division_tag_1 | \nセグメント1 | \n
| division_tag_2 | \nセグメント2 | \n
| division_tag_3 | \nセグメント3 | \n
| currencies | \n外貨(通貨の設定) | \n
| bank_accountant_staff_users | \nアドバイザー事業所内でのメンバー管理 | \n
アクセストークンのユーザーが所属するすべての事業所の一覧を取得する
\n\n指定した事業所の詳細情報(名称・連絡先・各種設定・会計年度の一覧)を取得する
\n\n指定した事業所に登録されている品目の一覧を取得します。取引や振替伝票の明細に付与する品目マスタとして参照する用途を想定しています。
\n\nyyyy-mm-dd で指定してください(どちらも指定日を含みます)。指定した事業所に新しい品目を作成します。作成された品目は使用設定(available)が true の状態で登録され、取引作成時などに指定できるようになります。
\n\n指定した事業所の品目を 1 件取得します。品目ID(id)は品目一覧の取得 API で確認できます。
\n\n指定した事業所の品目を更新します。この API は品目の作成は行いません。品目コードをキーに更新(存在しない場合は作成)したい場合は PUT /api/1/items/code/upsert を利用してください。
指定した事業所の品目を削除します。
\n\n品目コード(code)をキーに、指定した品目の情報を更新します。該当する品目が存在しない場合は新規作成します(upsert)。外部システムとの連携で、品目マスタを一括で登録・更新する用途を想定しています。
\n\n税区分一覧を取得する
\n\n税区分コード(code)は、取引の作成(POST /api/1/deals)や振替伝票の作成(POST /api/1/manual_journals)などで税区分を指定する際に tax_code として利用します。
\n\n指定したコードに対応する税区分を取得する
\n\n指定した事業所の税区分一覧を取得する
\n\n税区分コード(code)は、取引の作成(POST /api/1/deals)や振替伝票の作成(POST /api/1/manual_journals)などで税区分を指定する際に tax_code として利用します。事業所で利用できる税区分と使用設定(available)を確認するために本APIをご利用ください。
\n\n指定した事業所の口座(銀行口座・クレジットカード・その他の決済口座)の一覧を取得する
\n\n取得できる口座は、リクエストしたユーザーが所属するグループ管理(work_group)で参照可能な口座に限られます。
\n\nここで取得できる口座IDと種別(type)は、取引の作成(POST /api/1/deals)・口座振替(POST /api/1/transfers)・入出金明細の取得(GET /api/1/wallet_txns)などで from_walletable_type / to_walletable_type と ID を指定する際に利用します。
\n\n指定した事業所に口座を作成する
\n\n作成した口座は、取引の作成(POST /api/1/deals)や口座振替(POST /api/1/transfers)などで from_walletable_type / to_walletable_type と ID を指定して利用できます。
\n\n指定した事業所の口座を1件取得する
\n\n指定した事業所の口座の口座名を更新する
\n\n指定した事業所の口座を削除する
\n\nfreee会計に口座として登録できる連携サービス(銀行口座・クレジットカード・その他の決済口座)の一覧を取得する
\n\n指定したIDの連携サービス(銀行口座・クレジットカード・その他の決済口座)を取得する
\n\n指定した事業所の取引(振替)一覧を取得する
\n\n指定した事業所の取引(振替)を作成する
\n\n指定した事業所の取引(振替)を取得する
\n\n指定した事業所の取引(振替)を更新する
\n\n指定した事業所の取引(振替)を削除する
\n\n指定した事業所の口座明細(銀行口座・クレジットカード・その他の決済口座の入出金明細)一覧を取得する
\n\namount : 取引金額(単位: 円)
\ndue_amount : 取引登録待ち金額(明細に対してまだ取引が登録されていない金額)
\nbalance : 残高(銀行口座等)
\nentry_side
\n\nwalletable_type
\n\n指定した事業所の口座明細を作成する
\n\namount : 取引金額(単位: 円)
\ndue_amount : 取引登録待ち金額(明細に対してまだ取引が登録されていない金額)
\nbalance : 残高(銀行口座等)
\nentry_side
\n\nwalletable_type
\n\n指定した事業所の口座明細を取得する
\n\namount : 取引金額(単位: 円)
\ndue_amount : 取引登録待ち金額(明細に対してまだ取引が登録されていない金額)
\nbalance : 残高(銀行口座等)
\nentry_side
\n\nwalletable_type
\n\n指定した事業所の口座明細を削除する
\n\n指定した事業所の仕訳帳ファイルの作成を依頼する(非同期処理)
\n\n本APIはファイル作成のリクエストを受け付けるのみで、ファイルは非同期で作成されます。レスポンスの id(受け付けID)を使って、仕訳帳のステータスの取得(GET /api/1/journals/reports/{id}/status)でステータスを確認し、uploaded になったら仕訳帳のダウンロード(GET /api/1/journals/reports/{id}/download)でファイルを取得してください。
\n\n生成されるファイルのファイル形式と出力項目に関しては、ヘルプページをご参照ください。download_type ごとの詳細は以下をご参照ください。
\n\n仕訳帳のダウンロードリクエストのステータスを取得する
\n\n仕訳帳のダウンロード要求(GET /api/1/journals)のレスポンスで返る id(受け付けID)を指定します。status が uploaded になると、レスポンスに download_url(仕訳帳のダウンロード(GET /api/1/journals/reports/{id}/download)のURL)が含まれます。
\n\n作成が完了した仕訳帳ファイルをダウンロードする
\n\n仕訳帳のステータスの取得(GET /api/1/journals/reports/{id}/status)で status が uploaded になった後に呼び出してください。ファイルは仕訳帳のダウンロード要求(GET /api/1/journals)で指定した download_type に応じて CSV(text/csv)または PDF(application/pdf)で返ります。
\n\n指定した事業所の貸借対照表(Balance Sheet, BS)を取得します。決算作業や月次の残高確認、取引先・品目・部門・セグメント単位のBS内訳集計に利用できます。
\n\ncreated_at : 作成日時(ISO 8601, JST)
account_item_name : 勘定科目名
hierarchy_level : 階層レベル(1が最上位、値が大きいほど深い階層)
parent_account_category_name : 上位勘定科目カテゴリー名
opening_balance : 期首残高(円)
debit_amount : 期間中の借方金額(円)
credit_amount : 期間中の貸方金額(円)
closing_balance : 期末残高(円)
composition_ratio : 構成比(百分率、%。BSの区分合計(資産の部合計、または負債及び純資産の部合計)に対する当該行の残高割合を 100 換算した値。相殺科目などで基準額を超える場合は 100 を超え得る)
\n\n\nGET https://api.freee.co.jp/api/1/reports/trial_bs?company_id=1&fiscal_year=2019&breakdown_display_type=partner
\n
{\n "trial_bs": {\n "company_id": 1,\n "fiscal_year": 2019,\n "breakdown_display_type": "partner",\n "created_at": "2019-12-17T12:00:50+09:00",\n "balances": [\n {\n "account_item_id": 1000,\n "account_item_name": "現金",\n "hierarchy_level": 2,\n "account_category_name": "流動資産",\n "opening_balance": 100000,\n "debit_amount": 50000,\n "credit_amount": 20000,\n "closing_balance": 130000,\n "composition_ratio": 25.0,\n "partners": [\n {\n "id": 123,\n "name": "freee",\n "opening_balance": 100000,\n "debit_amount": 50000,\n "credit_amount": 20000,\n "closing_balance": 130000,\n "composition_ratio": 25.0\n }\n ]\n }\n ]\n },\n "up_to_date": true\n}\n",
"operationId": "get_trial_bs",
"parameters": [
{
"name": "company_id",
"in": "query",
"description": "事業所ID",
"required": true,
"schema": {
"type": "integer",
"format": "int64",
"minimum": 1
},
"example": 1
},
{
"name": "fiscal_year",
"in": "query",
"description": "会計年度(会計期間の開始日が属する年。例: 会計期間が 2019-04-01 開始なら 2019)。会計年度の作成後に期間を変更した場合などに、指定した年と実際に集計対象となる会計年度がずれることがあります。意図した期間が集計されない場合は、fiscal_year ではなく start_date・end_date で期間を指定してください。",
"schema": {
"type": "integer",
"format": "int64"
},
"example": 2019
},
{
"name": "start_month",
"in": "query",
"description": "発生月で絞込:開始会計月(1-12)。指定されない場合、現在の会計年度の期首月が指定されます。",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 1,
"maximum": 12
},
"example": 1
},
{
"name": "end_month",
"in": "query",
"description": "発生月で絞込:終了会計月(1-12)(会計年度が10月始まりでstart_monthが11なら11, 12, 1, ... 9のいずれかを指定する)。指定されない場合、現在の会計年度の期末月が指定されます。",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 1,
"maximum": 12
},
"example": 12
},
{
"name": "start_date",
"in": "query",
"description": "発生日で絞込:開始日(yyyy-mm-dd)",
"schema": {
"type": "string"
},
"example": "2019-01-01"
},
{
"name": "end_date",
"in": "query",
"description": "発生日で絞込:終了日(yyyy-mm-dd)",
"schema": {
"type": "string"
},
"example": "2019-12-31"
},
{
"name": "account_item_display_type",
"in": "query",
"description": "勘定科目の表示。指定されない場合、`account_item` が指定されます。\n* `account_item` - 勘定科目単位で表示\n* `group` - 決算書表示単位で表示\n",
"schema": {
"type": "string",
"enum": [
"account_item",
"group"
]
},
"example": "account_item"
},
{
"name": "breakdown_display_type",
"in": "query",
"description": "内訳の表示。`account_item_display_type` と組み合わせ制約がある。\n* `partner` / `item` / `section` / `segment_1_tag` / `segment_2_tag` / `segment_3_tag` は `account_item_display_type=account_item`(または省略)のときのみ指定可能。それぞれ各行の `balances[].partners` / `items` / `sections` / `segment_1_tags` / `segment_2_tags` / `segment_3_tags` に内訳配列を返す\n* `account_item` は `account_item_display_type=group` のときのみ指定可能。他の値と異なり内訳配列は返らず、決算書表示名行に続けて勘定科目行が同じ `balances[]` に展開される\n* 上記の組み合わせ以外(例: `account_item_display_type=group` かつ `partner` / `item` / `section` / `segment_*_tag`)は validation error になる\n\n取引先、品目、部門、セグメント の各項目が単独で5,000以上登録されている場合は、breakdown_display_type で該当項目を指定するとエラーになります。\n\n例)取引先の登録数が5,000以上、品目の登録数が4,999以下の場合\n* breakdown_display_type: 取引先を指定 → エラーになる\n* breakdown_display_type: 品目を指定 → エラーにならない\n",
"schema": {
"type": "string",
"enum": [
"partner",
"item",
"section",
"account_item",
"segment_1_tag",
"segment_2_tag",
"segment_3_tag"
]
},
"example": "partner"
},
{
"name": "partner_id",
"in": "query",
"description": "取引先IDで絞込(0を指定すると、取引先が未選択で絞り込めます)",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"example": 1
},
{
"name": "partner_code",
"in": "query",
"description": "取引先コードで絞込(事業所設定で取引先コードの利用を有効にしている場合のみ利用可能です)",
"schema": {
"type": "string"
},
"example": "code001"
},
{
"name": "item_id",
"in": "query",
"description": "品目IDで絞込(0を指定すると、品目が未選択で絞り込めます)",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"example": 1
},
{
"name": "section_id",
"in": "query",
"description": "部門IDで絞込(0を指定すると、部門が未選択で絞り込めます)",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"example": 1
},
{
"name": "adjustment",
"in": "query",
"description": "決算整理仕訳の絞り込み条件。指定されない場合、決算整理仕訳を含む金額が返却されます。\n* `only` - 決算整理仕訳のみを集計\n* `without` - 決算整理仕訳を除外して集計\n",
"schema": {
"type": "string",
"enum": [
"only",
"without"
]
},
"example": "only"
},
{
"name": "approval_flow_status",
"in": "query",
"description": "承認ステータスの絞り込み条件。プレミアムプラン、法人アドバンスプラン(および旧法人プロフェッショナルプラン)以上で、かつ事業所の設定から仕訳承認フローの利用を有効にした場合に指定可能です。\n* `without_in_progress` - 未承認を除く(デフォルト)\n* `all` - 全ての承認ステータスを含む\n",
"schema": {
"type": "string",
"enum": [
"without_in_progress",
"all"
]
},
"example": "without_in_progress"
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/trialBsResponse"
}
}
}
},
"400": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/badRequestError"
}
}
}
},
"401": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/unauthorizedError"
}
}
}
},
"403": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/forbiddenError"
}
}
}
},
"429": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/tooManyRequestsError"
}
}
}
},
"500": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/internalServerError"
}
}
}
}
}
}
},
"/api/1/reports/trial_bs_two_years": {
"get": {
"tags": [
"Trial balance"
],
"summary": "貸借対照表(前年比較)の取得",
"description": "\n指定した事業所の貸借対照表(前年比較)を取得します。当年度と前年度の期末残高を並べて比較し、前年比を確認する用途に利用できます。
\n\ncreated_at : 作成日時(ISO 8601, JST)
account_item_name : 勘定科目名
hierarchy_level : 階層レベル(1が最上位、値が大きいほど深い階層)
parent_account_category_name : 上位勘定科目カテゴリー名
last_year_closing_balance : 前年度期末残高(円)
closing_balance : 当年度期末残高(円)
year_on_year : 前年比(百分率、%。100 は前年と同額、200 は前年比 2 倍、50 は前年比 0.5 倍。前年度期末残高が 0 以下、または当年度期末残高が負数の場合は 0 が返る)
\n\n\nGET https://api.freee.co.jp/api/1/reports/trial_bs_two_years?company_id=1&fiscal_year=2019
\n
{\n "trial_bs_two_years": {\n "company_id": 1,\n "fiscal_year": 2019,\n "created_at": "2019-12-17T12:00:50+09:00",\n "balances": [\n {\n "account_item_id": 1000,\n "account_item_name": "現金",\n "hierarchy_level": 2,\n "account_category_name": "流動資産",\n "last_year_closing_balance": 25000,\n "closing_balance": 100000,\n "year_on_year": 400.0\n }\n ]\n },\n "up_to_date": true\n}\n",
"operationId": "get_trial_bs_two_years",
"parameters": [
{
"name": "company_id",
"in": "query",
"description": "事業所ID",
"required": true,
"schema": {
"type": "integer",
"format": "int64",
"minimum": 1
},
"example": 1
},
{
"name": "fiscal_year",
"in": "query",
"description": "会計年度(会計期間の開始日が属する年。例: 会計期間が 2019-04-01 開始なら 2019)。会計年度の作成後に期間を変更した場合などに、指定した年と実際に集計対象となる会計年度がずれることがあります。意図した期間が集計されない場合は、fiscal_year ではなく start_date・end_date で期間を指定してください。",
"schema": {
"type": "integer",
"format": "int64"
},
"example": 2019
},
{
"name": "start_month",
"in": "query",
"description": "発生月で絞込:開始会計月(1-12)。指定されない場合、現在の会計年度の期首月が指定されます。",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 1,
"maximum": 12
},
"example": 1
},
{
"name": "end_month",
"in": "query",
"description": "発生月で絞込:終了会計月(1-12)(会計年度が10月始まりでstart_monthが11なら11, 12, 1, ... 9のいずれかを指定する)。指定されない場合、現在の会計年度の期末月が指定されます。",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 1,
"maximum": 12
},
"example": 12
},
{
"name": "start_date",
"in": "query",
"description": "発生日で絞込:開始日(yyyy-mm-dd)",
"schema": {
"type": "string"
},
"example": "2019-01-01"
},
{
"name": "end_date",
"in": "query",
"description": "発生日で絞込:終了日(yyyy-mm-dd)",
"schema": {
"type": "string"
},
"example": "2019-12-31"
},
{
"name": "account_item_display_type",
"in": "query",
"description": "勘定科目の表示。指定されない場合、`account_item` が指定されます。\n* `account_item` - 勘定科目単位で表示\n* `group` - 決算書表示単位で表示\n",
"schema": {
"type": "string",
"enum": [
"account_item",
"group"
]
},
"example": "account_item"
},
{
"name": "breakdown_display_type",
"in": "query",
"description": "内訳の表示。`account_item_display_type` と組み合わせ制約がある。\n* `partner` / `item` / `section` / `segment_1_tag` / `segment_2_tag` / `segment_3_tag` は `account_item_display_type=account_item`(または省略)のときのみ指定可能。それぞれ各行の `balances[].partners` / `items` / `sections` / `segment_1_tags` / `segment_2_tags` / `segment_3_tags` に内訳配列を返す\n* `account_item` は `account_item_display_type=group` のときのみ指定可能。他の値と異なり内訳配列は返らず、決算書表示名行に続けて勘定科目行が同じ `balances[]` に展開される\n* 上記の組み合わせ以外(例: `account_item_display_type=group` かつ `partner` / `item` / `section` / `segment_*_tag`)は validation error になる\n\n取引先、品目、部門、セグメント の各項目が単独で5,000以上登録されている場合は、breakdown_display_type で該当項目を指定するとエラーになります。\n\n例)取引先の登録数が5,000以上、品目の登録数が4,999以下の場合\n* breakdown_display_type: 取引先を指定 → エラーになる\n* breakdown_display_type: 品目を指定 → エラーにならない",
"schema": {
"type": "string",
"enum": [
"partner",
"item",
"section",
"account_item",
"segment_1_tag",
"segment_2_tag",
"segment_3_tag"
]
},
"example": "partner"
},
{
"name": "partner_id",
"in": "query",
"description": "取引先IDで絞込(0を指定すると、取引先が未選択で絞り込めます)",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"example": 1
},
{
"name": "partner_code",
"in": "query",
"description": "取引先コードで絞込(事業所設定で取引先コードの利用を有効にしている場合のみ利用可能です)",
"schema": {
"type": "string"
},
"example": "code001"
},
{
"name": "item_id",
"in": "query",
"description": "品目IDで絞込(0を指定すると、品目が未選択で絞り込めます)",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"example": 1
},
{
"name": "section_id",
"in": "query",
"description": "部門IDで絞込(0を指定すると、部門が未選択で絞り込めます)",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"example": 1
},
{
"name": "adjustment",
"in": "query",
"description": "決算整理仕訳の絞り込み条件。指定されない場合、決算整理仕訳を含む金額が返却されます。\n* `only` - 決算整理仕訳のみを集計\n* `without` - 決算整理仕訳を除外して集計\n",
"schema": {
"type": "string",
"enum": [
"only",
"without"
]
},
"example": "only"
},
{
"name": "approval_flow_status",
"in": "query",
"description": "承認ステータスの絞り込み条件。プレミアムプラン、法人アドバンスプラン(および旧法人プロフェッショナルプラン)以上で、かつ事業所の設定から仕訳承認フローの利用を有効にした場合に指定可能です。\n* `without_in_progress` - 未承認を除く(デフォルト)\n* `all` - 全ての承認ステータスを含む\n",
"schema": {
"type": "string",
"enum": [
"without_in_progress",
"all"
]
},
"example": "without_in_progress"
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/trialBsTwoYearsResponse"
}
}
}
},
"400": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/badRequestError"
}
}
}
},
"401": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/unauthorizedError"
}
}
}
},
"403": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/forbiddenError"
}
}
}
},
"429": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/tooManyRequestsError"
}
}
}
},
"500": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/internalServerError"
}
}
}
}
}
}
},
"/api/1/reports/trial_bs_three_years": {
"get": {
"tags": [
"Trial balance"
],
"summary": "貸借対照表(3期間比較)の取得",
"description": "\n指定した事業所の貸借対照表(3期間比較)を取得します。当年度・前年度・前々年度の期末残高を並べて比較し、中期の推移や前年比を確認する用途に利用できます。
\n\ncreated_at : 作成日時(ISO 8601, JST)
account_item_name : 勘定科目名
hierarchy_level : 階層レベル(1が最上位、値が大きいほど深い階層)
parent_account_category_name : 上位勘定科目カテゴリー名
two_years_before_closing_balance : 前々年度期末残高(円)
last_year_closing_balance : 前年度期末残高(円)
closing_balance : 当年度期末残高(円)
year_on_year : 前年比(百分率、%。100 は前年と同額、200 は前年比 2 倍、50 は前年比 0.5 倍。前年度期末残高が 0 以下、または当年度期末残高が負数の場合は 0 が返る)
\n\n\nGET https://api.freee.co.jp/api/1/reports/trial_bs_three_years?company_id=1&fiscal_year=2019
\n
{\n "trial_bs_three_years": {\n "company_id": 1,\n "fiscal_year": 2019,\n "created_at": "2019-12-17T12:00:50+09:00",\n "balances": [\n {\n "account_item_id": 1000,\n "account_item_name": "現金",\n "hierarchy_level": 2,\n "account_category_name": "流動資産",\n "two_years_before_closing_balance": 50000,\n "last_year_closing_balance": 25000,\n "closing_balance": 100000,\n "year_on_year": 400.0\n }\n ]\n },\n "up_to_date": true\n}\n",
"operationId": "get_trial_bs_three_years",
"parameters": [
{
"name": "company_id",
"in": "query",
"description": "事業所ID",
"required": true,
"schema": {
"type": "integer",
"format": "int64",
"minimum": 1
},
"example": 1
},
{
"name": "fiscal_year",
"in": "query",
"description": "会計年度(会計期間の開始日が属する年。例: 会計期間が 2019-04-01 開始なら 2019)。会計年度の作成後に期間を変更した場合などに、指定した年と実際に集計対象となる会計年度がずれることがあります。意図した期間が集計されない場合は、fiscal_year ではなく start_date・end_date で期間を指定してください。",
"schema": {
"type": "integer",
"format": "int64"
},
"example": 2019
},
{
"name": "start_month",
"in": "query",
"description": "発生月で絞込:開始会計月(1-12)。指定されない場合、現在の会計年度の期首月が指定されます。",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 1,
"maximum": 12
},
"example": 1
},
{
"name": "end_month",
"in": "query",
"description": "発生月で絞込:終了会計月(1-12)(会計年度が10月始まりでstart_monthが11なら11, 12, 1, ... 9のいずれかを指定する)。指定されない場合、現在の会計年度の期末月が指定されます。",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 1,
"maximum": 12
},
"example": 12
},
{
"name": "start_date",
"in": "query",
"description": "発生日で絞込:開始日(yyyy-mm-dd)",
"schema": {
"type": "string"
},
"example": "2019-01-01"
},
{
"name": "end_date",
"in": "query",
"description": "発生日で絞込:終了日(yyyy-mm-dd)",
"schema": {
"type": "string"
},
"example": "2019-12-31"
},
{
"name": "account_item_display_type",
"in": "query",
"description": "勘定科目の表示。指定されない場合、`account_item` が指定されます。\n* `account_item` - 勘定科目単位で表示\n* `group` - 決算書表示単位で表示\n",
"schema": {
"type": "string",
"enum": [
"account_item",
"group"
]
},
"example": "account_item"
},
{
"name": "breakdown_display_type",
"in": "query",
"description": "内訳の表示。`account_item_display_type` と組み合わせ制約がある。\n* `partner` / `item` / `section` / `segment_1_tag` / `segment_2_tag` / `segment_3_tag` は `account_item_display_type=account_item`(または省略)のときのみ指定可能。それぞれ各行の `balances[].partners` / `items` / `sections` / `segment_1_tags` / `segment_2_tags` / `segment_3_tags` に内訳配列を返す\n* `account_item` は `account_item_display_type=group` のときのみ指定可能。他の値と異なり内訳配列は返らず、決算書表示名行に続けて勘定科目行が同じ `balances[]` に展開される\n* 上記の組み合わせ以外(例: `account_item_display_type=group` かつ `partner` / `item` / `section` / `segment_*_tag`)は validation error になる\n\n取引先、品目、部門、セグメント の各項目が単独で5,000以上登録されている場合は、breakdown_display_type で該当項目を指定するとエラーになります。\n\n例)取引先の登録数が5,000以上、品目の登録数が4,999以下の場合\n* breakdown_display_type: 取引先を指定 → エラーになる\n* breakdown_display_type: 品目を指定 → エラーにならない",
"schema": {
"type": "string",
"enum": [
"partner",
"item",
"section",
"account_item",
"segment_1_tag",
"segment_2_tag",
"segment_3_tag"
]
},
"example": "partner"
},
{
"name": "partner_id",
"in": "query",
"description": "取引先IDで絞込(0を指定すると、取引先が未選択で絞り込めます)",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"example": 1
},
{
"name": "partner_code",
"in": "query",
"description": "取引先コードで絞込(事業所設定で取引先コードの利用を有効にしている場合のみ利用可能です)",
"schema": {
"type": "string"
},
"example": "code001"
},
{
"name": "item_id",
"in": "query",
"description": "品目IDで絞込(0を指定すると、品目が未選択で絞り込めます)",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"example": 1
},
{
"name": "section_id",
"in": "query",
"description": "部門IDで絞込(0を指定すると、部門が未選択で絞り込めます)",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"example": 1
},
{
"name": "adjustment",
"in": "query",
"description": "決算整理仕訳の絞り込み条件。指定されない場合、決算整理仕訳を含む金額が返却されます。\n* `only` - 決算整理仕訳のみを集計\n* `without` - 決算整理仕訳を除外して集計\n",
"schema": {
"type": "string",
"enum": [
"only",
"without"
]
},
"example": "only"
},
{
"name": "approval_flow_status",
"in": "query",
"description": "承認ステータスの絞り込み条件。プレミアムプラン、法人アドバンスプラン(および旧法人プロフェッショナルプラン)以上で、かつ事業所の設定から仕訳承認フローの利用を有効にした場合に指定可能です。\n* `without_in_progress` - 未承認を除く(デフォルト)\n* `all` - 全ての承認ステータスを含む\n",
"schema": {
"type": "string",
"enum": [
"without_in_progress",
"all"
]
},
"example": "without_in_progress"
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/trialBsThreeYearsResponse"
}
}
}
},
"400": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/badRequestError"
}
}
}
},
"401": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/unauthorizedError"
}
}
}
},
"403": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/forbiddenError"
}
}
}
},
"429": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/tooManyRequestsError"
}
}
}
},
"500": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/internalServerError"
}
}
}
}
}
}
},
"/api/1/reports/trial_pl": {
"get": {
"tags": [
"Trial balance"
],
"summary": "損益計算書の取得",
"description": "\n指定した事業所の損益計算書(Profit and Loss statement, PL)を取得します。月次・期間指定での損益確認や、取引先・品目・部門・セグメント単位のPL内訳集計に利用できます。
\n\ncreated_at : 作成日時(ISO 8601, JST)
account_item_name : 勘定科目名
hierarchy_level : 階層レベル(1が最上位、値が大きいほど深い階層)
parent_account_category_name : 上位勘定科目カテゴリー名
opening_balance : 期首残高(円)
debit_amount : 期間中の借方金額(円)
credit_amount : 期間中の貸方金額(円)
closing_balance : 期末残高(円)
composition_ratio : 構成比(百分率、%。PLの基準額(法人の場合は売上高の合計、個人の場合は収入金額の合計)に対する当該行の金額割合を 100 換算した値。基準額を超える行では 100 を超え得る)
\n\n\nGET https://api.freee.co.jp/api/1/reports/trial_pl?company_id=1&fiscal_year=2019&breakdown_display_type=partner
\n
{\n "trial_pl": {\n "company_id": 1,\n "fiscal_year": 2019,\n "breakdown_display_type": "partner",\n "created_at": "2019-12-17T12:00:50+09:00",\n "balances": [\n {\n "account_item_id": 1500,\n "account_item_name": "売上高",\n "hierarchy_level": 2,\n "account_category_name": "営業収益",\n "opening_balance": 0,\n "debit_amount": 50000,\n "credit_amount": 150000,\n "closing_balance": 100000,\n "composition_ratio": 100.0,\n "partners": [\n {\n "id": 123,\n "name": "freee",\n "opening_balance": 0,\n "debit_amount": 50000,\n "credit_amount": 150000,\n "closing_balance": 100000,\n "composition_ratio": 100.0\n }\n ]\n }\n ]\n },\n "up_to_date": true\n}\n",
"operationId": "get_trial_pl",
"parameters": [
{
"name": "company_id",
"in": "query",
"description": "事業所ID",
"required": true,
"schema": {
"type": "integer",
"format": "int64",
"minimum": 1
},
"example": 1
},
{
"name": "fiscal_year",
"in": "query",
"description": "会計年度(会計期間の開始日が属する年。例: 会計期間が 2019-04-01 開始なら 2019)。会計年度の作成後に期間を変更した場合などに、指定した年と実際に集計対象となる会計年度がずれることがあります。意図した期間が集計されない場合は、fiscal_year ではなく start_date・end_date で期間を指定してください。",
"schema": {
"type": "integer",
"format": "int64"
},
"example": 2019
},
{
"name": "start_month",
"in": "query",
"description": "発生月で絞込:開始会計月(1-12)。指定されない場合、現在の会計年度の期首月が指定されます。",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 1,
"maximum": 12
},
"example": 1
},
{
"name": "end_month",
"in": "query",
"description": "発生月で絞込:終了会計月(1-12)(会計年度が10月始まりでstart_monthが11なら11, 12, 1, ... 9のいずれかを指定する)。指定されない場合、現在の会計年度の期末月が指定されます。",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 1,
"maximum": 12
},
"example": 12
},
{
"name": "start_date",
"in": "query",
"description": "発生日で絞込:開始日(yyyy-mm-dd)",
"schema": {
"type": "string"
},
"example": "2019-01-01"
},
{
"name": "end_date",
"in": "query",
"description": "発生日で絞込:終了日(yyyy-mm-dd)",
"schema": {
"type": "string"
},
"example": "2019-12-31"
},
{
"name": "account_item_display_type",
"in": "query",
"description": "勘定科目の表示。指定されない場合、`account_item` が指定されます。\n* `account_item` - 勘定科目単位で表示\n* `group` - 決算書表示単位で表示\n",
"schema": {
"type": "string",
"enum": [
"account_item",
"group"
]
},
"example": "account_item"
},
{
"name": "breakdown_display_type",
"in": "query",
"description": "内訳の表示。`account_item_display_type` と組み合わせ制約がある。\n* `partner` / `item` / `section` / `segment_1_tag` / `segment_2_tag` / `segment_3_tag` は `account_item_display_type=account_item`(または省略)のときのみ指定可能。それぞれ各行の `balances[].partners` / `items` / `sections` / `segment_1_tags` / `segment_2_tags` / `segment_3_tags` に内訳配列を返す\n* `account_item` は `account_item_display_type=group` のときのみ指定可能。他の値と異なり内訳配列は返らず、決算書表示名行に続けて勘定科目行が同じ `balances[]` に展開される\n* 上記の組み合わせ以外(例: `account_item_display_type=group` かつ `partner` / `item` / `section` / `segment_*_tag`)は validation error になる\n\n取引先、品目、部門、セグメント の各項目が単独で5,000以上登録されている場合は、breakdown_display_type で該当項目を指定するとエラーになります。\n\n例)取引先の登録数が5,000以上、品目の登録数が4,999以下の場合\n* breakdown_display_type: 取引先を指定 → エラーになる\n* breakdown_display_type: 品目を指定 → エラーにならない\n",
"schema": {
"type": "string",
"enum": [
"partner",
"item",
"section",
"account_item",
"segment_1_tag",
"segment_2_tag",
"segment_3_tag"
]
},
"example": "partner"
},
{
"name": "partner_id",
"in": "query",
"description": "取引先IDで絞込(0を指定すると、取引先が未選択で絞り込めます)",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"example": 1
},
{
"name": "partner_code",
"in": "query",
"description": "取引先コードで絞込(事業所設定で取引先コードの利用を有効にしている場合のみ利用可能です)",
"schema": {
"type": "string"
},
"example": "code001"
},
{
"name": "item_id",
"in": "query",
"description": "品目IDで絞込(0を指定すると、品目が未選択で絞り込めます)",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"example": 1
},
{
"name": "section_id",
"in": "query",
"description": "部門IDで絞込(0を指定すると、部門が未選択で絞り込めます)",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"example": 1
},
{
"name": "adjustment",
"in": "query",
"description": "決算整理仕訳の絞り込み条件。指定されない場合、決算整理仕訳を含む金額が返却されます。\n* `only` - 決算整理仕訳のみを集計\n* `without` - 決算整理仕訳を除外して集計\n",
"schema": {
"type": "string",
"enum": [
"only",
"without"
]
},
"example": "only"
},
{
"name": "cost_allocation",
"in": "query",
"description": "配賦仕訳の絞り込み条件。指定されない場合、配賦仕訳を含む金額が返却されます。法人スタンダードプラン(および旧法人ベーシックプラン)以上で利用可能で、利用できないプランで指定した場合はエラー(403)になります。\n* `only` - 配賦仕訳のみを集計\n* `without` - 配賦仕訳を除外して集計\n",
"schema": {
"type": "string",
"enum": [
"only",
"without"
]
},
"example": "only"
},
{
"name": "approval_flow_status",
"in": "query",
"description": "承認ステータスの絞り込み条件。プレミアムプラン、法人アドバンスプラン(および旧法人プロフェッショナルプラン)以上で、かつ事業所の設定から仕訳承認フローの利用を有効にした場合に指定可能です。\n* `without_in_progress` - 未承認を除く(デフォルト)\n* `all` - 全ての承認ステータスを含む\n",
"schema": {
"type": "string",
"enum": [
"without_in_progress",
"all"
]
},
"example": "without_in_progress"
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/trialPlResponse"
}
}
}
},
"400": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/badRequestError"
}
}
}
},
"401": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/unauthorizedError"
}
}
}
},
"403": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/forbiddenError"
}
}
}
},
"429": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/tooManyRequestsError"
}
}
}
},
"500": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/internalServerError"
}
}
}
}
}
}
},
"/api/1/reports/trial_pl_two_years": {
"get": {
"tags": [
"Trial balance"
],
"summary": "損益計算書(前年比較)の取得",
"description": "\n指定した事業所の損益計算書(前年比較)を取得します。当年度と前年度の期末残高を並べて比較し、前年比を確認する用途に利用できます。
\n\ncreated_at : 作成日時(ISO 8601, JST)
account_item_name : 勘定科目名
hierarchy_level : 階層レベル(1が最上位、値が大きいほど深い階層)
parent_account_category_name : 上位勘定科目カテゴリー名
last_year_closing_balance : 前年度期末残高(円)
closing_balance : 当年度期末残高(円)
year_on_year : 前年比(百分率、%。100 は前年と同額、200 は前年比 2 倍、50 は前年比 0.5 倍。前年度期末残高が 0 以下、または当年度期末残高が負数の場合は 0 が返る)
\n\n\nGET https://api.freee.co.jp/api/1/reports/trial_pl_two_years?company_id=1&fiscal_year=2019
\n
{\n "trial_pl_two_years": {\n "company_id": 1,\n "fiscal_year": 2019,\n "created_at": "2019-12-17T12:00:50+09:00",\n "balances": [\n {\n "account_item_id": 1500,\n "account_item_name": "売上高",\n "hierarchy_level": 2,\n "account_category_name": "営業収益",\n "last_year_closing_balance": 25000,\n "closing_balance": 100000,\n "year_on_year": 400.0\n }\n ]\n },\n "up_to_date": true\n}\n",
"operationId": "get_trial_pl_two_years",
"parameters": [
{
"name": "company_id",
"in": "query",
"description": "事業所ID",
"required": true,
"schema": {
"type": "integer",
"format": "int64",
"minimum": 1
},
"example": 1
},
{
"name": "fiscal_year",
"in": "query",
"description": "会計年度(会計期間の開始日が属する年。例: 会計期間が 2019-04-01 開始なら 2019)。会計年度の作成後に期間を変更した場合などに、指定した年と実際に集計対象となる会計年度がずれることがあります。意図した期間が集計されない場合は、fiscal_year ではなく start_date・end_date で期間を指定してください。",
"schema": {
"type": "integer",
"format": "int64"
},
"example": 2019
},
{
"name": "start_month",
"in": "query",
"description": "発生月で絞込:開始会計月(1-12)。指定されない場合、現在の会計年度の期首月が指定されます。",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 1,
"maximum": 12
},
"example": 1
},
{
"name": "end_month",
"in": "query",
"description": "発生月で絞込:終了会計月(1-12)(会計年度が10月始まりでstart_monthが11なら11, 12, 1, ... 9のいずれかを指定する)。指定されない場合、現在の会計年度の期末月が指定されます。",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 1,
"maximum": 12
},
"example": 12
},
{
"name": "start_date",
"in": "query",
"description": "発生日で絞込:開始日(yyyy-mm-dd)",
"schema": {
"type": "string"
},
"example": "2019-01-01"
},
{
"name": "end_date",
"in": "query",
"description": "発生日で絞込:終了日(yyyy-mm-dd)",
"schema": {
"type": "string"
},
"example": "2019-12-31"
},
{
"name": "account_item_display_type",
"in": "query",
"description": "勘定科目の表示。指定されない場合、`account_item` が指定されます。\n* `account_item` - 勘定科目単位で表示\n* `group` - 決算書表示単位で表示\n",
"schema": {
"type": "string",
"enum": [
"account_item",
"group"
]
},
"example": "account_item"
},
{
"name": "breakdown_display_type",
"in": "query",
"description": "内訳の表示。`account_item_display_type` と組み合わせ制約がある。\n* `partner` / `item` / `section` / `segment_1_tag` / `segment_2_tag` / `segment_3_tag` は `account_item_display_type=account_item`(または省略)のときのみ指定可能。それぞれ各行の `balances[].partners` / `items` / `sections` / `segment_1_tags` / `segment_2_tags` / `segment_3_tags` に内訳配列を返す\n* `account_item` は `account_item_display_type=group` のときのみ指定可能。他の値と異なり内訳配列は返らず、決算書表示名行に続けて勘定科目行が同じ `balances[]` に展開される\n* 上記の組み合わせ以外(例: `account_item_display_type=group` かつ `partner` / `item` / `section` / `segment_*_tag`)は validation error になる\n\n取引先、品目、部門、セグメント の各項目が単独で5,000以上登録されている場合は、breakdown_display_type で該当項目を指定するとエラーになります。\n\n例)取引先の登録数が5,000以上、品目の登録数が4,999以下の場合\n* breakdown_display_type: 取引先を指定 → エラーになる\n* breakdown_display_type: 品目を指定 → エラーにならない\n",
"schema": {
"type": "string",
"enum": [
"partner",
"item",
"section",
"account_item",
"segment_1_tag",
"segment_2_tag",
"segment_3_tag"
]
},
"example": "partner"
},
{
"name": "partner_id",
"in": "query",
"description": "取引先IDで絞込(0を指定すると、取引先が未選択で絞り込めます)",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"example": 1
},
{
"name": "partner_code",
"in": "query",
"description": "取引先コードで絞込(事業所設定で取引先コードの利用を有効にしている場合のみ利用可能です)",
"schema": {
"type": "string"
},
"example": "code001"
},
{
"name": "item_id",
"in": "query",
"description": "品目IDで絞込(0を指定すると、品目が未選択で絞り込めます)",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"example": 1
},
{
"name": "section_id",
"in": "query",
"description": "部門IDで絞込(0を指定すると、部門が未選択で絞り込めます)",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"example": 1
},
{
"name": "adjustment",
"in": "query",
"description": "決算整理仕訳の絞り込み条件。指定されない場合、決算整理仕訳を含む金額が返却されます。\n* `only` - 決算整理仕訳のみを集計\n* `without` - 決算整理仕訳を除外して集計\n",
"schema": {
"type": "string",
"enum": [
"only",
"without"
]
},
"example": "only"
},
{
"name": "cost_allocation",
"in": "query",
"description": "配賦仕訳の絞り込み条件。指定されない場合、配賦仕訳を含む金額が返却されます。法人スタンダードプラン(および旧法人ベーシックプラン)以上で利用可能で、利用できないプランで指定した場合はエラー(403)になります。\n* `only` - 配賦仕訳のみを集計\n* `without` - 配賦仕訳を除外して集計\n",
"schema": {
"type": "string",
"enum": [
"only",
"without"
]
},
"example": "only"
},
{
"name": "approval_flow_status",
"in": "query",
"description": "承認ステータスの絞り込み条件。プレミアムプラン、法人アドバンスプラン(および旧法人プロフェッショナルプラン)以上で、かつ事業所の設定から仕訳承認フローの利用を有効にした場合に指定可能です。\n* `without_in_progress` - 未承認を除く(デフォルト)\n* `all` - 全ての承認ステータスを含む\n",
"schema": {
"type": "string",
"enum": [
"without_in_progress",
"all"
]
},
"example": "without_in_progress"
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/trialPlTwoYearsResponse"
}
}
}
},
"400": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/badRequestError"
}
}
}
},
"401": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/unauthorizedError"
}
}
}
},
"403": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/forbiddenError"
}
}
}
},
"429": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/tooManyRequestsError"
}
}
}
},
"500": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/internalServerError"
}
}
}
}
}
}
},
"/api/1/reports/trial_pl_three_years": {
"get": {
"tags": [
"Trial balance"
],
"summary": "損益計算書(3期間比較)の取得",
"description": "\n指定した事業所の損益計算書(3期間比較)を取得します。当年度・前年度・前々年度の期末残高を並べて比較し、前年比を確認する用途に利用できます。
\n\ncreated_at : 作成日時(ISO 8601, JST)
account_item_name : 勘定科目名
hierarchy_level : 階層レベル(1が最上位、値が大きいほど深い階層)
parent_account_category_name : 上位勘定科目カテゴリー名
two_years_before_closing_balance : 前々年度期末残高(円)
last_year_closing_balance : 前年度期末残高(円)
closing_balance : 当年度期末残高(円)
year_on_year : 前年比(百分率、%。100 は前年と同額、200 は前年比 2 倍、50 は前年比 0.5 倍。前年度期末残高が 0 以下、または当年度期末残高が負数の場合は 0 が返る)
\n\n\nGET https://api.freee.co.jp/api/1/reports/trial_pl_three_years?company_id=1&fiscal_year=2019
\n
{\n "trial_pl_three_years": {\n "company_id": 1,\n "fiscal_year": 2019,\n "created_at": "2019-12-17T12:00:50+09:00",\n "balances": [\n {\n "account_item_id": 1500,\n "account_item_name": "売上高",\n "hierarchy_level": 2,\n "account_category_name": "営業収益",\n "two_years_before_closing_balance": 50000,\n "last_year_closing_balance": 25000,\n "closing_balance": 100000,\n "year_on_year": 400.0\n }\n ]\n },\n "up_to_date": true\n}\n",
"operationId": "get_trial_pl_three_years",
"parameters": [
{
"name": "company_id",
"in": "query",
"description": "事業所ID",
"required": true,
"schema": {
"type": "integer",
"format": "int64",
"minimum": 1
},
"example": 1
},
{
"name": "fiscal_year",
"in": "query",
"description": "会計年度(会計期間の開始日が属する年。例: 会計期間が 2019-04-01 開始なら 2019)。会計年度の作成後に期間を変更した場合などに、指定した年と実際に集計対象となる会計年度がずれることがあります。意図した期間が集計されない場合は、fiscal_year ではなく start_date・end_date で期間を指定してください。",
"schema": {
"type": "integer",
"format": "int64"
},
"example": 2019
},
{
"name": "start_month",
"in": "query",
"description": "発生月で絞込:開始会計月(1-12)。指定されない場合、現在の会計年度の期首月が指定されます。",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 1,
"maximum": 12
},
"example": 1
},
{
"name": "end_month",
"in": "query",
"description": "発生月で絞込:終了会計月(1-12)(会計年度が10月始まりでstart_monthが11なら11, 12, 1, ... 9のいずれかを指定する)。指定されない場合、現在の会計年度の期末月が指定されます。",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 1,
"maximum": 12
},
"example": 12
},
{
"name": "start_date",
"in": "query",
"description": "発生日で絞込:開始日(yyyy-mm-dd)",
"schema": {
"type": "string"
},
"example": "2019-01-01"
},
{
"name": "end_date",
"in": "query",
"description": "発生日で絞込:終了日(yyyy-mm-dd)",
"schema": {
"type": "string"
},
"example": "2019-12-31"
},
{
"name": "account_item_display_type",
"in": "query",
"description": "勘定科目の表示。指定されない場合、`account_item` が指定されます。\n* `account_item` - 勘定科目単位で表示\n* `group` - 決算書表示単位で表示\n",
"schema": {
"type": "string",
"enum": [
"account_item",
"group"
]
},
"example": "account_item"
},
{
"name": "breakdown_display_type",
"in": "query",
"description": "内訳の表示。`account_item_display_type` と組み合わせ制約がある。\n* `partner` / `item` / `section` / `segment_1_tag` / `segment_2_tag` / `segment_3_tag` は `account_item_display_type=account_item`(または省略)のときのみ指定可能。それぞれ各行の `balances[].partners` / `items` / `sections` / `segment_1_tags` / `segment_2_tags` / `segment_3_tags` に内訳配列を返す\n* `account_item` は `account_item_display_type=group` のときのみ指定可能。他の値と異なり内訳配列は返らず、決算書表示名行に続けて勘定科目行が同じ `balances[]` に展開される\n* 上記の組み合わせ以外(例: `account_item_display_type=group` かつ `partner` / `item` / `section` / `segment_*_tag`)は validation error になる\n\n取引先、品目、部門、セグメント の各項目が単独で5,000以上登録されている場合は、breakdown_display_type で該当項目を指定するとエラーになります。\n\n例)取引先の登録数が5,000以上、品目の登録数が4,999以下の場合\n* breakdown_display_type: 取引先を指定 → エラーになる\n* breakdown_display_type: 品目を指定 → エラーにならない\n",
"schema": {
"type": "string",
"enum": [
"partner",
"item",
"section",
"account_item",
"segment_1_tag",
"segment_2_tag",
"segment_3_tag"
]
},
"example": "partner"
},
{
"name": "partner_id",
"in": "query",
"description": "取引先IDで絞込(0を指定すると、取引先が未選択で絞り込めます)",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"example": 1
},
{
"name": "partner_code",
"in": "query",
"description": "取引先コードで絞込(事業所設定で取引先コードの利用を有効にしている場合のみ利用可能です)",
"schema": {
"type": "string"
},
"example": "code001"
},
{
"name": "item_id",
"in": "query",
"description": "品目IDで絞込(0を指定すると、品目が未選択で絞り込めます)",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"example": 1
},
{
"name": "section_id",
"in": "query",
"description": "部門IDで絞込(0を指定すると、部門が未選択で絞り込めます)",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"example": 1
},
{
"name": "adjustment",
"in": "query",
"description": "決算整理仕訳の絞り込み条件。指定されない場合、決算整理仕訳を含む金額が返却されます。\n* `only` - 決算整理仕訳のみを集計\n* `without` - 決算整理仕訳を除外して集計\n",
"schema": {
"type": "string",
"enum": [
"only",
"without"
]
},
"example": "only"
},
{
"name": "cost_allocation",
"in": "query",
"description": "配賦仕訳の絞り込み条件。指定されない場合、配賦仕訳を含む金額が返却されます。法人スタンダードプラン(および旧法人ベーシックプラン)以上で利用可能で、利用できないプランで指定した場合はエラー(403)になります。\n* `only` - 配賦仕訳のみを集計\n* `without` - 配賦仕訳を除外して集計\n",
"schema": {
"type": "string",
"enum": [
"only",
"without"
]
},
"example": "only"
},
{
"name": "approval_flow_status",
"in": "query",
"description": "承認ステータスの絞り込み条件。プレミアムプラン、法人アドバンスプラン(および旧法人プロフェッショナルプラン)以上で、かつ事業所の設定から仕訳承認フローの利用を有効にした場合に指定可能です。\n* `without_in_progress` - 未承認を除く(デフォルト)\n* `all` - 全ての承認ステータスを含む\n",
"schema": {
"type": "string",
"enum": [
"without_in_progress",
"all"
]
},
"example": "without_in_progress"
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/trialPlThreeYearsResponse"
}
}
}
},
"400": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/badRequestError"
}
}
}
},
"401": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/unauthorizedError"
}
}
}
},
"403": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/forbiddenError"
}
}
}
},
"429": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/tooManyRequestsError"
}
}
}
},
"500": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/internalServerError"
}
}
}
}
}
}
},
"/api/1/reports/trial_pl_sections": {
"get": {
"tags": [
"Trial balance"
],
"summary": "損益計算書(部門比較)の取得",
"description": "\n指定した事業所の損益計算書(部門比較)を取得します。指定した部門(最大5つ)ごとの期末残高を並べて比較する用途に利用できます。
\n\ncreated_at : 作成日時(ISO 8601, JST)
account_item_name : 勘定科目名
hierarchy_level : 階層レベル(1が最上位、値が大きいほど深い階層)
parent_account_category_name : 上位勘定科目カテゴリー名
closing_balance : 期末残高(円。行直下の値は比較対象に指定した部門の合計、sections 配下の値は各部門の金額)
\n\n\nGET https://api.freee.co.jp/api/1/reports/trial_pl_sections?company_id=1§ion_ids=1,2,3&fiscal_year=2019
\n
{\n "trial_pl_sections": {\n "company_id": 1,\n "section_ids": "1,2,3",\n "fiscal_year": 2019,\n "created_at": "2019-12-17T12:00:50+09:00",\n "balances": [\n {\n "account_item_id": 1500,\n "account_item_name": "売上高",\n "hierarchy_level": 2,\n "account_category_name": "営業収益",\n "closing_balance": 600000,\n "sections": [\n {\n "id": 1,\n "name": "営業部",\n "closing_balance": 100000\n },\n {\n "id": 2,\n "name": "広報部",\n "closing_balance": 200000\n },\n {\n "id": 3,\n "name": "人事部",\n "closing_balance": 300000\n }\n ]\n }\n ]\n },\n "up_to_date": true\n}\n",
"operationId": "get_trial_pl_sections",
"parameters": [
{
"name": "company_id",
"in": "query",
"description": "事業所ID",
"required": true,
"schema": {
"type": "integer",
"format": "int64",
"minimum": 1
},
"example": 1
},
{
"name": "section_ids",
"in": "query",
"description": "比較する部門IDの指定。半角数字のIDを半角カンマ区切り(スペースなし)で1〜5つ指定してください。同じIDを重複して指定することはできません。0を指定すると、未選択の部門で比較できます。",
"required": true,
"schema": {
"type": "string"
},
"example": 123
},
{
"name": "fiscal_year",
"in": "query",
"description": "会計年度(会計期間の開始日が属する年。例: 会計期間が 2019-04-01 開始なら 2019)。会計年度の作成後に期間を変更した場合などに、指定した年と実際に集計対象となる会計年度がずれることがあります。意図した期間が集計されない場合は、fiscal_year ではなく start_date・end_date で期間を指定してください。",
"schema": {
"type": "integer",
"format": "int64"
},
"example": 2019
},
{
"name": "start_month",
"in": "query",
"description": "発生月で絞込:開始会計月(1-12)。指定されない場合、現在の会計年度の期首月が指定されます。",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 1,
"maximum": 12
},
"example": 1
},
{
"name": "end_month",
"in": "query",
"description": "発生月で絞込:終了会計月(1-12)(会計年度が10月始まりでstart_monthが11なら11, 12, 1, ... 9のいずれかを指定する)。指定されない場合、現在の会計年度の期末月が指定されます。",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 1,
"maximum": 12
},
"example": 12
},
{
"name": "start_date",
"in": "query",
"description": "発生日で絞込:開始日(yyyy-mm-dd)",
"schema": {
"type": "string"
},
"example": "2019-01-01"
},
{
"name": "end_date",
"in": "query",
"description": "発生日で絞込:終了日(yyyy-mm-dd)",
"schema": {
"type": "string"
},
"example": "2019-12-31"
},
{
"name": "account_item_display_type",
"in": "query",
"description": "勘定科目の表示。指定されない場合、`account_item` が指定されます。\n* `account_item` - 勘定科目単位で表示\n* `group` - 決算書表示単位で表示\n",
"schema": {
"type": "string",
"enum": [
"account_item",
"group"
]
},
"example": "account_item"
},
{
"name": "breakdown_display_type",
"in": "query",
"description": "内訳の表示。`account_item_display_type` と組み合わせ制約がある。\n* `partner` / `item` / `segment_1_tag` / `segment_2_tag` / `segment_3_tag` は `account_item_display_type=account_item`(または省略)のときのみ指定可能。`balances[].sections[]` の各部門要素配下の `partners` / `items` / `segment_1_tags` / `segment_2_tags` / `segment_3_tags` に内訳配列を返す\n* `account_item` は `account_item_display_type=group` のときのみ指定可能。他の値と異なり内訳配列は返らず、決算書表示名行に続けて勘定科目行が同じ `balances[]` に展開される\n* 部門比較では `section` は指定できない\n* 上記の組み合わせ以外は validation error になる\n\n取引先、品目、セグメント の各項目が単独で5,000以上登録されている場合は、breakdown_display_type で該当項目を指定するとエラーになります。\n\n例)取引先の登録数が5,000以上、品目の登録数が4,999以下の場合\n* breakdown_display_type: 取引先を指定 → エラーになる\n* breakdown_display_type: 品目を指定 → エラーにならない\n",
"schema": {
"type": "string",
"enum": [
"partner",
"item",
"account_item",
"segment_1_tag",
"segment_2_tag",
"segment_3_tag"
]
},
"example": "partner"
},
{
"name": "partner_id",
"in": "query",
"description": "取引先IDで絞込(0を指定すると、取引先が未選択で絞り込めます)",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"example": 1
},
{
"name": "partner_code",
"in": "query",
"description": "取引先コードで絞込(事業所設定で取引先コードの利用を有効にしている場合のみ利用可能です)",
"schema": {
"type": "string"
},
"example": "code001"
},
{
"name": "item_id",
"in": "query",
"description": "品目IDで絞込(0を指定すると、品目が未選択で絞り込めます)",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"example": 1
},
{
"name": "adjustment",
"in": "query",
"description": "決算整理仕訳の絞り込み条件。指定されない場合、決算整理仕訳を含む金額が返却されます。\n* `only` - 決算整理仕訳のみを集計\n* `without` - 決算整理仕訳を除外して集計\n",
"schema": {
"type": "string",
"enum": [
"only",
"without"
]
},
"example": "only"
},
{
"name": "cost_allocation",
"in": "query",
"description": "配賦仕訳の絞り込み条件。指定されない場合、配賦仕訳を含む金額が返却されます。法人スタンダードプラン(および旧法人ベーシックプラン)以上で利用可能で、利用できないプランで指定した場合はエラー(403)になります。\n* `only` - 配賦仕訳のみを集計\n* `without` - 配賦仕訳を除外して集計\n",
"schema": {
"type": "string",
"enum": [
"only",
"without"
]
},
"example": "only"
},
{
"name": "approval_flow_status",
"in": "query",
"description": "承認ステータスの絞り込み条件。プレミアムプラン、法人アドバンスプラン(および旧法人プロフェッショナルプラン)以上で、かつ事業所の設定から仕訳承認フローの利用を有効にした場合に指定可能です。\n* `without_in_progress` - 未承認を除く(デフォルト)\n* `all` - 全ての承認ステータスを含む\n",
"schema": {
"type": "string",
"enum": [
"without_in_progress",
"all"
]
},
"example": "without_in_progress"
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/trialPlSectionsResponse"
}
}
}
},
"400": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/badRequestError"
}
}
}
},
"401": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/unauthorizedError"
}
}
}
},
"403": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/forbiddenError"
}
}
}
},
"429": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/tooManyRequestsError"
}
}
}
},
"500": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/internalServerError"
}
}
}
}
}
}
},
"/api/1/reports/trial_pl_segment_1_tags": {
"get": {
"tags": [
"Trial balance"
],
"summary": "損益計算書(セグメント1比較)の取得",
"description": "\n指定した事業所の損益計算書(セグメント1比較)を取得します。指定したセグメント1タグ(最大5つ)ごとの期末残高を並べて比較する用途に利用できます。
\n\ncreated_at : 作成日時(ISO 8601, JST)
account_item_name : 勘定科目名
hierarchy_level : 階層レベル(1が最上位、値が大きいほど深い階層)
parent_account_category_name : 上位勘定科目カテゴリー名
closing_balance : 期末残高(円。行直下の値は比較対象に指定したセグメント1タグの合計、segment_1_tags 配下の値は各タグの金額)
\n\n\nGET https://api.freee.co.jp/api/1/reports/trial_pl_segment_1_tags?company_id=1&segment_1_tag_ids=1,2,3&fiscal_year=2019
\n
{\n "trial_pl_segment_1_tags": {\n "company_id": 1,\n "segment_1_tag_ids": "1,2,3",\n "fiscal_year": 2019,\n "created_at": "2019-12-17T12:00:50+09:00",\n "balances": [\n {\n "account_item_id": 1500,\n "account_item_name": "売上高",\n "hierarchy_level": 2,\n "account_category_name": "営業収益",\n "closing_balance": 600000,\n "segment_1_tags": [\n {\n "id": 1,\n "name": "プロジェクトA",\n "closing_balance": 100000\n },\n {\n "id": 2,\n "name": "プロジェクトB",\n "closing_balance": 200000\n },\n {\n "id": 3,\n "name": "プロジェクトC",\n "closing_balance": 300000\n }\n ]\n }\n ]\n },\n "up_to_date": true\n}\n",
"operationId": "get_trial_pl_segment_1_tags",
"parameters": [
{
"name": "company_id",
"in": "query",
"description": "事業所ID",
"required": true,
"schema": {
"type": "integer",
"format": "int64",
"minimum": 1
},
"example": 1
},
{
"name": "segment_1_tag_ids",
"in": "query",
"description": "比較するセグメント1タグIDの指定。半角数字のIDを半角カンマ区切り(スペースなし)で1〜5つ指定してください。同じIDを重複して指定することはできません。0を指定すると、未選択のセグメント1タグで比較できます。",
"required": true,
"schema": {
"type": "string"
},
"example": 123
},
{
"name": "fiscal_year",
"in": "query",
"description": "会計年度(会計期間の開始日が属する年。例: 会計期間が 2019-04-01 開始なら 2019)。会計年度の作成後に期間を変更した場合などに、指定した年と実際に集計対象となる会計年度がずれることがあります。意図した期間が集計されない場合は、fiscal_year ではなく start_date・end_date で期間を指定してください。",
"schema": {
"type": "integer",
"format": "int64"
},
"example": 2019
},
{
"name": "start_month",
"in": "query",
"description": "発生月で絞込:開始会計月(1-12)。指定されない場合、現在の会計年度の期首月が指定されます。",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 1,
"maximum": 12
},
"example": 1
},
{
"name": "end_month",
"in": "query",
"description": "発生月で絞込:終了会計月(1-12)(会計年度が10月始まりでstart_monthが11なら11, 12, 1, ... 9のいずれかを指定する)。指定されない場合、現在の会計年度の期末月が指定されます。",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 1,
"maximum": 12
},
"example": 12
},
{
"name": "start_date",
"in": "query",
"description": "発生日で絞込:開始日(yyyy-mm-dd)",
"schema": {
"type": "string"
},
"example": "2019-01-01"
},
{
"name": "end_date",
"in": "query",
"description": "発生日で絞込:終了日(yyyy-mm-dd)",
"schema": {
"type": "string"
},
"example": "2019-12-31"
},
{
"name": "account_item_display_type",
"in": "query",
"description": "勘定科目の表示。指定されない場合、`account_item` が指定されます。\n* `account_item` - 勘定科目単位で表示\n* `group` - 決算書表示単位で表示\n",
"schema": {
"type": "string",
"enum": [
"account_item",
"group"
]
},
"example": "account_item"
},
{
"name": "breakdown_display_type",
"in": "query",
"description": "内訳の表示。`account_item_display_type` と組み合わせ制約がある。\n* `partner` / `item` / `section` は `account_item_display_type=account_item`(または省略)のときのみ指定可能。`balances[].segment_1_tags[]` の各セグメント1タグ要素配下の `partners` / `items` / `sections` に内訳配列を返す\n* `account_item` は `account_item_display_type=group` のときのみ指定可能。他の値と異なり内訳配列は返らず、決算書表示名行に続けて勘定科目行が同じ `balances[]` に展開される\n* 上記の組み合わせ以外は validation error になる\n\n取引先、品目、部門 の各項目が単独で5,000以上登録されている場合は、breakdown_display_type で該当項目を指定するとエラーになります。\n\n例)取引先の登録数が5,000以上、品目の登録数が4,999以下の場合\n* breakdown_display_type: 取引先を指定 → エラーになる\n* breakdown_display_type: 品目を指定 → エラーにならない\n",
"schema": {
"type": "string",
"enum": [
"partner",
"item",
"section",
"account_item"
]
},
"example": "partner"
},
{
"name": "partner_id",
"in": "query",
"description": "取引先IDで絞込(0を指定すると、取引先が未選択で絞り込めます)",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"example": 1
},
{
"name": "partner_code",
"in": "query",
"description": "取引先コードで絞込(事業所設定で取引先コードの利用を有効にしている場合のみ利用可能です)",
"schema": {
"type": "string"
},
"example": "code001"
},
{
"name": "item_id",
"in": "query",
"description": "品目IDで絞込(0を指定すると、品目が未選択で絞り込めます)",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"example": 1
},
{
"name": "section_id",
"in": "query",
"description": "部門IDで絞込(0を指定すると、部門が未選択で絞り込めます)",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"example": 1
},
{
"name": "adjustment",
"in": "query",
"description": "決算整理仕訳の絞り込み条件。指定されない場合、決算整理仕訳を含む金額が返却されます。\n* `only` - 決算整理仕訳のみを集計\n* `without` - 決算整理仕訳を除外して集計\n",
"schema": {
"type": "string",
"enum": [
"only",
"without"
]
},
"example": "only"
},
{
"name": "cost_allocation",
"in": "query",
"description": "配賦仕訳の絞り込み条件。指定されない場合、配賦仕訳を含む金額が返却されます。法人スタンダードプラン(および旧法人ベーシックプラン)以上で利用可能で、利用できないプランで指定した場合はエラー(403)になります。\n* `only` - 配賦仕訳のみを集計\n* `without` - 配賦仕訳を除外して集計\n",
"schema": {
"type": "string",
"enum": [
"only",
"without"
]
},
"example": "only"
},
{
"name": "approval_flow_status",
"in": "query",
"description": "承認ステータスの絞り込み条件。プレミアムプラン、法人アドバンスプラン(および旧法人プロフェッショナルプラン)以上で、かつ事業所の設定から仕訳承認フローの利用を有効にした場合に指定可能です。\n* `without_in_progress` - 未承認を除く(デフォルト)\n* `all` - 全ての承認ステータスを含む\n",
"schema": {
"type": "string",
"enum": [
"without_in_progress",
"all"
]
},
"example": "without_in_progress"
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/trialPlSegment_1TagsResponse"
}
}
}
},
"400": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/badRequestError"
}
}
}
},
"401": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/unauthorizedError"
}
}
}
},
"403": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/forbiddenError"
}
}
}
},
"429": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/tooManyRequestsError"
}
}
}
},
"500": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/internalServerError"
}
}
}
}
}
}
},
"/api/1/reports/trial_pl_segment_2_tags": {
"get": {
"tags": [
"Trial balance"
],
"summary": "損益計算書(セグメント2比較)の取得",
"description": "\n指定した事業所の損益計算書(セグメント2比較)を取得します。指定したセグメント2タグ(最大5つ)ごとの期末残高を並べて比較する用途に利用できます。
\n\ncreated_at : 作成日時(ISO 8601, JST)
account_item_name : 勘定科目名
hierarchy_level : 階層レベル(1が最上位、値が大きいほど深い階層)
parent_account_category_name : 上位勘定科目カテゴリー名
closing_balance : 期末残高(円。行直下の値は比較対象に指定したセグメント2タグの合計、segment_2_tags 配下の値は各タグの金額)
\n\n\nGET https://api.freee.co.jp/api/1/reports/trial_pl_segment_2_tags?company_id=1&segment_2_tag_ids=1,2,3&fiscal_year=2019
\n
{\n "trial_pl_segment_2_tags": {\n "company_id": 1,\n "segment_2_tag_ids": "1,2,3",\n "fiscal_year": 2019,\n "created_at": "2019-12-17T12:00:50+09:00",\n "balances": [\n {\n "account_item_id": 1500,\n "account_item_name": "売上高",\n "hierarchy_level": 2,\n "account_category_name": "営業収益",\n "closing_balance": 600000,\n "segment_2_tags": [\n {\n "id": 1,\n "name": "プロジェクトA",\n "closing_balance": 100000\n },\n {\n "id": 2,\n "name": "プロジェクトB",\n "closing_balance": 200000\n },\n {\n "id": 3,\n "name": "プロジェクトC",\n "closing_balance": 300000\n }\n ]\n }\n ]\n },\n "up_to_date": true\n}\n",
"operationId": "get_trial_pl_segment_2_tags",
"parameters": [
{
"name": "company_id",
"in": "query",
"description": "事業所ID",
"required": true,
"schema": {
"type": "integer",
"format": "int64",
"minimum": 1
},
"example": 1
},
{
"name": "segment_2_tag_ids",
"in": "query",
"description": "比較するセグメント2タグIDの指定。半角数字のIDを半角カンマ区切り(スペースなし)で1〜5つ指定してください。同じIDを重複して指定することはできません。0を指定すると、未選択のセグメント2タグで比較できます。",
"required": true,
"schema": {
"type": "string"
},
"example": 123
},
{
"name": "fiscal_year",
"in": "query",
"description": "会計年度(会計期間の開始日が属する年。例: 会計期間が 2019-04-01 開始なら 2019)。会計年度の作成後に期間を変更した場合などに、指定した年と実際に集計対象となる会計年度がずれることがあります。意図した期間が集計されない場合は、fiscal_year ではなく start_date・end_date で期間を指定してください。",
"schema": {
"type": "integer",
"format": "int64"
},
"example": 2019
},
{
"name": "start_month",
"in": "query",
"description": "発生月で絞込:開始会計月(1-12)。指定されない場合、現在の会計年度の期首月が指定されます。",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 1,
"maximum": 12
},
"example": 1
},
{
"name": "end_month",
"in": "query",
"description": "発生月で絞込:終了会計月(1-12)(会計年度が10月始まりでstart_monthが11なら11, 12, 1, ... 9のいずれかを指定する)。指定されない場合、現在の会計年度の期末月が指定されます。",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 1,
"maximum": 12
},
"example": 12
},
{
"name": "start_date",
"in": "query",
"description": "発生日で絞込:開始日(yyyy-mm-dd)",
"schema": {
"type": "string"
},
"example": "2019-01-01"
},
{
"name": "end_date",
"in": "query",
"description": "発生日で絞込:終了日(yyyy-mm-dd)",
"schema": {
"type": "string"
},
"example": "2019-12-31"
},
{
"name": "account_item_display_type",
"in": "query",
"description": "勘定科目の表示。指定されない場合、`account_item` が指定されます。\n* `account_item` - 勘定科目単位で表示\n* `group` - 決算書表示単位で表示\n",
"schema": {
"type": "string",
"enum": [
"account_item",
"group"
]
},
"example": "account_item"
},
{
"name": "breakdown_display_type",
"in": "query",
"description": "内訳の表示。`account_item_display_type` と組み合わせ制約がある。\n* `partner` / `item` / `section` は `account_item_display_type=account_item`(または省略)のときのみ指定可能。`balances[].segment_2_tags[]` の各セグメント2タグ要素配下の `partners` / `items` / `sections` に内訳配列を返す\n* `account_item` は `account_item_display_type=group` のときのみ指定可能。他の値と異なり内訳配列は返らず、決算書表示名行に続けて勘定科目行が同じ `balances[]` に展開される\n* 上記の組み合わせ以外は validation error になる\n\n取引先、品目、部門 の各項目が単独で5,000以上登録されている場合は、breakdown_display_type で該当項目を指定するとエラーになります。\n\n例)取引先の登録数が5,000以上、品目の登録数が4,999以下の場合\n* breakdown_display_type: 取引先を指定 → エラーになる\n* breakdown_display_type: 品目を指定 → エラーにならない\n",
"schema": {
"type": "string",
"enum": [
"partner",
"item",
"section",
"account_item"
]
},
"example": "partner"
},
{
"name": "partner_id",
"in": "query",
"description": "取引先IDで絞込(0を指定すると、取引先が未選択で絞り込めます)",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"example": 1
},
{
"name": "partner_code",
"in": "query",
"description": "取引先コードで絞込(事業所設定で取引先コードの利用を有効にしている場合のみ利用可能です)",
"schema": {
"type": "string"
},
"example": "code001"
},
{
"name": "item_id",
"in": "query",
"description": "品目IDで絞込(0を指定すると、品目が未選択で絞り込めます)",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"example": 1
},
{
"name": "section_id",
"in": "query",
"description": "部門IDで絞込(0を指定すると、部門が未選択で絞り込めます)",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"example": 1
},
{
"name": "adjustment",
"in": "query",
"description": "決算整理仕訳の絞り込み条件。指定されない場合、決算整理仕訳を含む金額が返却されます。\n* `only` - 決算整理仕訳のみを集計\n* `without` - 決算整理仕訳を除外して集計\n",
"schema": {
"type": "string",
"enum": [
"only",
"without"
]
},
"example": "only"
},
{
"name": "cost_allocation",
"in": "query",
"description": "配賦仕訳の絞り込み条件。指定されない場合、配賦仕訳を含む金額が返却されます。法人スタンダードプラン(および旧法人ベーシックプラン)以上で利用可能で、利用できないプランで指定した場合はエラー(403)になります。\n* `only` - 配賦仕訳のみを集計\n* `without` - 配賦仕訳を除外して集計\n",
"schema": {
"type": "string",
"enum": [
"only",
"without"
]
},
"example": "only"
},
{
"name": "approval_flow_status",
"in": "query",
"description": "承認ステータスの絞り込み条件。プレミアムプラン、法人アドバンスプラン(および旧法人プロフェッショナルプラン)以上で、かつ事業所の設定から仕訳承認フローの利用を有効にした場合に指定可能です。\n* `without_in_progress` - 未承認を除く(デフォルト)\n* `all` - 全ての承認ステータスを含む\n",
"schema": {
"type": "string",
"enum": [
"without_in_progress",
"all"
]
},
"example": "without_in_progress"
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/trialPlSegment_2TagsResponse"
}
}
}
},
"400": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/badRequestError"
}
}
}
},
"401": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/unauthorizedError"
}
}
}
},
"403": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/forbiddenError"
}
}
}
},
"429": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/tooManyRequestsError"
}
}
}
},
"500": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/internalServerError"
}
}
}
}
}
}
},
"/api/1/reports/trial_pl_segment_3_tags": {
"get": {
"tags": [
"Trial balance"
],
"summary": "損益計算書(セグメント3比較)の取得",
"description": "\n指定した事業所の損益計算書(セグメント3比較)を取得します。指定したセグメント3タグ(最大5つ)ごとの期末残高を並べて比較する用途に利用できます。
\n\ncreated_at : 作成日時(ISO 8601, JST)
account_item_name : 勘定科目名
hierarchy_level : 階層レベル(1が最上位、値が大きいほど深い階層)
parent_account_category_name : 上位勘定科目カテゴリー名
closing_balance : 期末残高(円。行直下の値は比較対象に指定したセグメント3タグの合計、segment_3_tags 配下の値は各タグの金額)
\n\n\nGET https://api.freee.co.jp/api/1/reports/trial_pl_segment_3_tags?company_id=1&segment_3_tag_ids=1,2,3&fiscal_year=2019
\n
{\n "trial_pl_segment_3_tags": {\n "company_id": 1,\n "segment_3_tag_ids": "1,2,3",\n "fiscal_year": 2019,\n "created_at": "2019-12-17T12:00:50+09:00",\n "balances": [\n {\n "account_item_id": 1500,\n "account_item_name": "売上高",\n "hierarchy_level": 2,\n "account_category_name": "営業収益",\n "closing_balance": 600000,\n "segment_3_tags": [\n {\n "id": 1,\n "name": "プロジェクトA",\n "closing_balance": 100000\n },\n {\n "id": 2,\n "name": "プロジェクトB",\n "closing_balance": 200000\n },\n {\n "id": 3,\n "name": "プロジェクトC",\n "closing_balance": 300000\n }\n ]\n }\n ]\n },\n "up_to_date": true\n}\n",
"operationId": "get_trial_pl_segment_3_tags",
"parameters": [
{
"name": "company_id",
"in": "query",
"description": "事業所ID",
"required": true,
"schema": {
"type": "integer",
"format": "int64",
"minimum": 1
},
"example": 1
},
{
"name": "segment_3_tag_ids",
"in": "query",
"description": "比較するセグメント3タグIDの指定。半角数字のIDを半角カンマ区切り(スペースなし)で1〜5つ指定してください。同じIDを重複して指定することはできません。0を指定すると、未選択のセグメント3タグで比較できます。",
"required": true,
"schema": {
"type": "string"
},
"example": 123
},
{
"name": "fiscal_year",
"in": "query",
"description": "会計年度(会計期間の開始日が属する年。例: 会計期間が 2019-04-01 開始なら 2019)。会計年度の作成後に期間を変更した場合などに、指定した年と実際に集計対象となる会計年度がずれることがあります。意図した期間が集計されない場合は、fiscal_year ではなく start_date・end_date で期間を指定してください。",
"schema": {
"type": "integer",
"format": "int64"
},
"example": 2019
},
{
"name": "start_month",
"in": "query",
"description": "発生月で絞込:開始会計月(1-12)。指定されない場合、現在の会計年度の期首月が指定されます。",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 1,
"maximum": 12
},
"example": 1
},
{
"name": "end_month",
"in": "query",
"description": "発生月で絞込:終了会計月(1-12)(会計年度が10月始まりでstart_monthが11なら11, 12, 1, ... 9のいずれかを指定する)。指定されない場合、現在の会計年度の期末月が指定されます。",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 1,
"maximum": 12
},
"example": 12
},
{
"name": "start_date",
"in": "query",
"description": "発生日で絞込:開始日(yyyy-mm-dd)",
"schema": {
"type": "string"
},
"example": "2019-01-01"
},
{
"name": "end_date",
"in": "query",
"description": "発生日で絞込:終了日(yyyy-mm-dd)",
"schema": {
"type": "string"
},
"example": "2019-12-31"
},
{
"name": "account_item_display_type",
"in": "query",
"description": "勘定科目の表示。指定されない場合、`account_item` が指定されます。\n* `account_item` - 勘定科目単位で表示\n* `group` - 決算書表示単位で表示\n",
"schema": {
"type": "string",
"enum": [
"account_item",
"group"
]
},
"example": "account_item"
},
{
"name": "breakdown_display_type",
"in": "query",
"description": "内訳の表示。`account_item_display_type` と組み合わせ制約がある。\n* `partner` / `item` / `section` は `account_item_display_type=account_item`(または省略)のときのみ指定可能。`balances[].segment_3_tags[]` の各セグメント3タグ要素配下の `partners` / `items` / `sections` に内訳配列を返す\n* `account_item` は `account_item_display_type=group` のときのみ指定可能。他の値と異なり内訳配列は返らず、決算書表示名行に続けて勘定科目行が同じ `balances[]` に展開される\n* 上記の組み合わせ以外は validation error になる\n\n取引先、品目、部門 の各項目が単独で5,000以上登録されている場合は、breakdown_display_type で該当項目を指定するとエラーになります。\n\n例)取引先の登録数が5,000以上、品目の登録数が4,999以下の場合\n* breakdown_display_type: 取引先を指定 → エラーになる\n* breakdown_display_type: 品目を指定 → エラーにならない\n",
"schema": {
"type": "string",
"enum": [
"partner",
"item",
"section",
"account_item"
]
},
"example": "partner"
},
{
"name": "partner_id",
"in": "query",
"description": "取引先IDで絞込(0を指定すると、取引先が未選択で絞り込めます)",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"example": 1
},
{
"name": "partner_code",
"in": "query",
"description": "取引先コードで絞込(事業所設定で取引先コードの利用を有効にしている場合のみ利用可能です)",
"schema": {
"type": "string"
},
"example": "code001"
},
{
"name": "item_id",
"in": "query",
"description": "品目IDで絞込(0を指定すると、品目が未選択で絞り込めます)",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"example": 1
},
{
"name": "section_id",
"in": "query",
"description": "部門IDで絞込(0を指定すると、部門が未選択で絞り込めます)",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"example": 1
},
{
"name": "adjustment",
"in": "query",
"description": "決算整理仕訳の絞り込み条件。指定されない場合、決算整理仕訳を含む金額が返却されます。\n* `only` - 決算整理仕訳のみを集計\n* `without` - 決算整理仕訳を除外して集計\n",
"schema": {
"type": "string",
"enum": [
"only",
"without"
]
},
"example": "only"
},
{
"name": "cost_allocation",
"in": "query",
"description": "配賦仕訳の絞り込み条件。指定されない場合、配賦仕訳を含む金額が返却されます。法人スタンダードプラン(および旧法人ベーシックプラン)以上で利用可能で、利用できないプランで指定した場合はエラー(403)になります。\n* `only` - 配賦仕訳のみを集計\n* `without` - 配賦仕訳を除外して集計\n",
"schema": {
"type": "string",
"enum": [
"only",
"without"
]
},
"example": "only"
},
{
"name": "approval_flow_status",
"in": "query",
"description": "承認ステータスの絞り込み条件。プレミアムプラン、法人アドバンスプラン(および旧法人プロフェッショナルプラン)以上で、かつ事業所の設定から仕訳承認フローの利用を有効にした場合に指定可能です。\n* `without_in_progress` - 未承認を除く(デフォルト)\n* `all` - 全ての承認ステータスを含む\n",
"schema": {
"type": "string",
"enum": [
"without_in_progress",
"all"
]
},
"example": "without_in_progress"
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/trialPlSegment_3TagsResponse"
}
}
}
},
"400": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/badRequestError"
}
}
}
},
"401": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/unauthorizedError"
}
}
}
},
"403": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/forbiddenError"
}
}
}
},
"429": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/tooManyRequestsError"
}
}
}
},
"500": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/internalServerError"
}
}
}
}
}
}
},
"/api/1/reports/trial_cr": {
"get": {
"tags": [
"Trial balance"
],
"summary": "製造原価報告書の取得",
"description": "\n指定した事業所の製造原価報告書(Cost Report, CR)を取得します。材料費・労務費・製造経費など製造原価の期間集計や、取引先・品目・部門・セグメント単位の内訳集計に利用できます。
\n\ncreated_at : 作成日時(ISO 8601, JST)
account_item_name : 勘定科目名
hierarchy_level : 階層レベル(1が最上位、値が大きいほど深い階層)
parent_account_category_name : 上位勘定科目カテゴリー名
opening_balance : 期首残高(円)
debit_amount : 期間中の借方金額(円)
credit_amount : 期間中の貸方金額(円)
closing_balance : 期末残高(円)
composition_ratio : 構成比(百分率、%。製造原価報告書の基準額(勘定科目カテゴリー「製造原価」の金額。法人・個人共通)に対する当該行の金額割合を 100 換算した値。基準額を超える行では 100 を超え得る)
\n\n\nGET https://api.freee.co.jp/api/1/reports/trial_cr?company_id=1&fiscal_year=2019&breakdown_display_type=partner
\n
{\n "trial_cr": {\n "company_id": 1,\n "fiscal_year": 2019,\n "breakdown_display_type": "partner",\n "created_at": "2019-12-17T12:00:50+09:00",\n "balances": [\n {\n "account_item_id": 1500,\n "account_item_name": "[製]期首材料棚卸高",\n "hierarchy_level": 2,\n "account_category_name": "期首原材料棚卸",\n "opening_balance": 0,\n "debit_amount": 150000,\n "credit_amount": 50000,\n "closing_balance": 100000,\n "composition_ratio": 10.0,\n "partners": [\n {\n "id": 123,\n "name": "freee",\n "opening_balance": 0,\n "debit_amount": 150000,\n "credit_amount": 50000,\n "closing_balance": 100000,\n "composition_ratio": 10.0\n }\n ]\n }\n ]\n },\n "up_to_date": true\n}\n",
"operationId": "get_trial_cr",
"parameters": [
{
"name": "company_id",
"in": "query",
"description": "事業所ID",
"required": true,
"schema": {
"type": "integer",
"format": "int64",
"minimum": 1
},
"example": 1
},
{
"name": "fiscal_year",
"in": "query",
"description": "会計年度(会計期間の開始日が属する年。例: 会計期間が 2019-04-01 開始なら 2019)。会計年度の作成後に期間を変更した場合などに、指定した年と実際に集計対象となる会計年度がずれることがあります。意図した期間が集計されない場合は、fiscal_year ではなく start_date・end_date で期間を指定してください。",
"schema": {
"type": "integer",
"format": "int64"
},
"example": 2019
},
{
"name": "start_month",
"in": "query",
"description": "発生月で絞込:開始会計月(1-12)。指定されない場合、現在の会計年度の期首月が指定されます。",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 1,
"maximum": 12
},
"example": 1
},
{
"name": "end_month",
"in": "query",
"description": "発生月で絞込:終了会計月(1-12)(会計年度が10月始まりでstart_monthが11なら11, 12, 1, ... 9のいずれかを指定する)。指定されない場合、現在の会計年度の期末月が指定されます。",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 1,
"maximum": 12
},
"example": 12
},
{
"name": "start_date",
"in": "query",
"description": "発生日で絞込:開始日(yyyy-mm-dd)",
"schema": {
"type": "string"
},
"example": "2019-01-01"
},
{
"name": "end_date",
"in": "query",
"description": "発生日で絞込:終了日(yyyy-mm-dd)",
"schema": {
"type": "string"
},
"example": "2019-12-31"
},
{
"name": "account_item_display_type",
"in": "query",
"description": "勘定科目の表示。指定されない場合、`account_item` が指定されます。\n* `account_item` - 勘定科目単位で表示\n* `group` - 決算書表示単位で表示\n",
"schema": {
"type": "string",
"enum": [
"account_item",
"group"
]
},
"example": "account_item"
},
{
"name": "breakdown_display_type",
"in": "query",
"description": "内訳の表示。`account_item_display_type` と組み合わせ制約がある。\n* `partner` / `item` / `section` / `segment_1_tag` / `segment_2_tag` / `segment_3_tag` は `account_item_display_type=account_item`(または省略)のときのみ指定可能。それぞれ各行の `balances[].partners` / `items` / `sections` / `segment_1_tags` / `segment_2_tags` / `segment_3_tags` に内訳配列を返す\n* `account_item` は `account_item_display_type=group` のときのみ指定可能。他の値と異なり内訳配列は返らず、決算書表示名行に続けて勘定科目行が同じ `balances[]` に展開される\n* 上記の組み合わせ以外(例: `account_item_display_type=group` かつ `partner` / `item` / `section` / `segment_*_tag`)は validation error になる\n\n取引先、品目、部門、セグメント の各項目が単独で5,000以上登録されている場合は、breakdown_display_type で該当項目を指定するとエラーになります。\n\n例)取引先の登録数が5,000以上、品目の登録数が4,999以下の場合\n* breakdown_display_type: 取引先を指定 → エラーになる\n* breakdown_display_type: 品目を指定 → エラーにならない\n",
"schema": {
"type": "string",
"enum": [
"partner",
"item",
"section",
"account_item",
"segment_1_tag",
"segment_2_tag",
"segment_3_tag"
]
},
"example": "partner"
},
{
"name": "partner_id",
"in": "query",
"description": "取引先IDで絞込(0を指定すると、取引先が未選択で絞り込めます)",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"example": 1
},
{
"name": "partner_code",
"in": "query",
"description": "取引先コードで絞込(事業所設定で取引先コードの利用を有効にしている場合のみ利用可能です)",
"schema": {
"type": "string"
},
"example": "code001"
},
{
"name": "item_id",
"in": "query",
"description": "品目IDで絞込(0を指定すると、品目が未選択で絞り込めます)",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"example": 1
},
{
"name": "section_id",
"in": "query",
"description": "部門IDで絞込(0を指定すると、部門が未選択で絞り込めます)",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"example": 1
},
{
"name": "adjustment",
"in": "query",
"description": "決算整理仕訳の絞り込み条件。指定されない場合、決算整理仕訳を含む金額が返却されます。\n* `only` - 決算整理仕訳のみを集計\n* `without` - 決算整理仕訳を除外して集計\n",
"schema": {
"type": "string",
"enum": [
"only",
"without"
]
},
"example": "only"
},
{
"name": "cost_allocation",
"in": "query",
"description": "配賦仕訳の絞り込み条件。指定されない場合、配賦仕訳を含む金額が返却されます。法人スタンダードプラン(および旧法人ベーシックプラン)以上で利用可能で、利用できないプランで指定した場合はエラー(403)になります。\n* `only` - 配賦仕訳のみを集計\n* `without` - 配賦仕訳を除外して集計\n",
"schema": {
"type": "string",
"enum": [
"only",
"without"
]
},
"example": "only"
},
{
"name": "approval_flow_status",
"in": "query",
"description": "承認ステータスの絞り込み条件。プレミアムプラン、法人アドバンスプラン(および旧法人プロフェッショナルプラン)以上で、かつ事業所の設定から仕訳承認フローの利用を有効にした場合に指定可能です。\n* `without_in_progress` - 未承認を除く(デフォルト)\n* `all` - 全ての承認ステータスを含む\n",
"schema": {
"type": "string",
"enum": [
"without_in_progress",
"all"
]
},
"example": "without_in_progress"
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/trialCrResponse"
}
}
}
},
"400": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/badRequestError"
}
}
}
},
"401": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/unauthorizedError"
}
}
}
},
"403": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/forbiddenError"
}
}
}
},
"429": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/tooManyRequestsError"
}
}
}
},
"500": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/internalServerError"
}
}
}
}
}
}
},
"/api/1/reports/trial_cr_two_years": {
"get": {
"tags": [
"Trial balance"
],
"summary": "製造原価報告書(前年比較)の取得",
"description": "\n指定した事業所の製造原価報告書(前年比較)を取得します。当年度と前年度の期末残高を並べて比較し、前年比を確認する用途に利用できます。
\n\ncreated_at : 作成日時(ISO 8601, JST)
account_item_name : 勘定科目名
hierarchy_level : 階層レベル(1が最上位、値が大きいほど深い階層)
parent_account_category_name : 上位勘定科目カテゴリー名
last_year_closing_balance : 前年度期末残高(円)
closing_balance : 当年度期末残高(円)
year_on_year : 前年比(百分率、%。100 は前年と同額、200 は前年比 2 倍、50 は前年比 0.5 倍。前年度期末残高が 0 以下、または当年度期末残高が負数の場合は 0 が返る)
\n\n\nGET https://api.freee.co.jp/api/1/reports/trial_cr_two_years?company_id=1&fiscal_year=2019
\n
{\n "trial_cr_two_years": {\n "company_id": 1,\n "fiscal_year": 2019,\n "created_at": "2019-12-17T12:00:50+09:00",\n "balances": [\n {\n "account_item_id": 1500,\n "account_item_name": "[製]期首材料棚卸高",\n "hierarchy_level": 2,\n "account_category_name": "期首原材料棚卸",\n "last_year_closing_balance": 25000,\n "closing_balance": 100000,\n "year_on_year": 400.0\n }\n ]\n },\n "up_to_date": true\n}\n",
"operationId": "get_trial_cr_two_years",
"parameters": [
{
"name": "company_id",
"in": "query",
"description": "事業所ID",
"required": true,
"schema": {
"type": "integer",
"format": "int64",
"minimum": 1
},
"example": 1
},
{
"name": "fiscal_year",
"in": "query",
"description": "会計年度(会計期間の開始日が属する年。例: 会計期間が 2019-04-01 開始なら 2019)。会計年度の作成後に期間を変更した場合などに、指定した年と実際に集計対象となる会計年度がずれることがあります。意図した期間が集計されない場合は、fiscal_year ではなく start_date・end_date で期間を指定してください。",
"schema": {
"type": "integer",
"format": "int64"
},
"example": 2019
},
{
"name": "start_month",
"in": "query",
"description": "発生月で絞込:開始会計月(1-12)。指定されない場合、現在の会計年度の期首月が指定されます。",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 1,
"maximum": 12
},
"example": 1
},
{
"name": "end_month",
"in": "query",
"description": "発生月で絞込:終了会計月(1-12)(会計年度が10月始まりでstart_monthが11なら11, 12, 1, ... 9のいずれかを指定する)。指定されない場合、現在の会計年度の期末月が指定されます。",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 1,
"maximum": 12
},
"example": 12
},
{
"name": "start_date",
"in": "query",
"description": "発生日で絞込:開始日(yyyy-mm-dd)",
"schema": {
"type": "string"
},
"example": "2019-01-01"
},
{
"name": "end_date",
"in": "query",
"description": "発生日で絞込:終了日(yyyy-mm-dd)",
"schema": {
"type": "string"
},
"example": "2019-12-31"
},
{
"name": "account_item_display_type",
"in": "query",
"description": "勘定科目の表示。指定されない場合、`account_item` が指定されます。\n* `account_item` - 勘定科目単位で表示\n* `group` - 決算書表示単位で表示\n",
"schema": {
"type": "string",
"enum": [
"account_item",
"group"
]
},
"example": "account_item"
},
{
"name": "breakdown_display_type",
"in": "query",
"description": "内訳の表示。`account_item_display_type` と組み合わせ制約がある。\n* `partner` / `item` / `section` / `segment_1_tag` / `segment_2_tag` / `segment_3_tag` は `account_item_display_type=account_item`(または省略)のときのみ指定可能。それぞれ各行の `balances[].partners` / `items` / `sections` / `segment_1_tags` / `segment_2_tags` / `segment_3_tags` に内訳配列を返す\n* `account_item` は `account_item_display_type=group` のときのみ指定可能。他の値と異なり内訳配列は返らず、決算書表示名行に続けて勘定科目行が同じ `balances[]` に展開される\n* 上記の組み合わせ以外(例: `account_item_display_type=group` かつ `partner` / `item` / `section` / `segment_*_tag`)は validation error になる\n\n取引先、品目、部門、セグメント の各項目が単独で5,000以上登録されている場合は、breakdown_display_type で該当項目を指定するとエラーになります。\n\n例)取引先の登録数が5,000以上、品目の登録数が4,999以下の場合\n* breakdown_display_type: 取引先を指定 → エラーになる\n* breakdown_display_type: 品目を指定 → エラーにならない\n",
"schema": {
"type": "string",
"enum": [
"partner",
"item",
"section",
"account_item",
"segment_1_tag",
"segment_2_tag",
"segment_3_tag"
]
},
"example": "partner"
},
{
"name": "partner_id",
"in": "query",
"description": "取引先IDで絞込(0を指定すると、取引先が未選択で絞り込めます)",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"example": 1
},
{
"name": "partner_code",
"in": "query",
"description": "取引先コードで絞込(事業所設定で取引先コードの利用を有効にしている場合のみ利用可能です)",
"schema": {
"type": "string"
},
"example": "code001"
},
{
"name": "item_id",
"in": "query",
"description": "品目IDで絞込(0を指定すると、品目が未選択で絞り込めます)",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"example": 1
},
{
"name": "section_id",
"in": "query",
"description": "部門IDで絞込(0を指定すると、部門が未選択で絞り込めます)",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"example": 1
},
{
"name": "adjustment",
"in": "query",
"description": "決算整理仕訳の絞り込み条件。指定されない場合、決算整理仕訳を含む金額が返却されます。\n* `only` - 決算整理仕訳のみを集計\n* `without` - 決算整理仕訳を除外して集計\n",
"schema": {
"type": "string",
"enum": [
"only",
"without"
]
},
"example": "only"
},
{
"name": "cost_allocation",
"in": "query",
"description": "配賦仕訳の絞り込み条件。指定されない場合、配賦仕訳を含む金額が返却されます。法人スタンダードプラン(および旧法人ベーシックプラン)以上で利用可能で、利用できないプランで指定した場合はエラー(403)になります。\n* `only` - 配賦仕訳のみを集計\n* `without` - 配賦仕訳を除外して集計\n",
"schema": {
"type": "string",
"enum": [
"only",
"without"
]
},
"example": "only"
},
{
"name": "approval_flow_status",
"in": "query",
"description": "承認ステータスの絞り込み条件。プレミアムプラン、法人アドバンスプラン(および旧法人プロフェッショナルプラン)以上で、かつ事業所の設定から仕訳承認フローの利用を有効にした場合に指定可能です。\n* `without_in_progress` - 未承認を除く(デフォルト)\n* `all` - 全ての承認ステータスを含む\n",
"schema": {
"type": "string",
"enum": [
"without_in_progress",
"all"
]
},
"example": "without_in_progress"
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/trialCrTwoYearsResponse"
}
}
}
},
"400": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/badRequestError"
}
}
}
},
"401": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/unauthorizedError"
}
}
}
},
"403": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/forbiddenError"
}
}
}
},
"429": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/tooManyRequestsError"
}
}
}
},
"500": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/internalServerError"
}
}
}
}
}
}
},
"/api/1/reports/trial_cr_three_years": {
"get": {
"tags": [
"Trial balance"
],
"summary": "製造原価報告書(3期間比較)の取得",
"description": "\n指定した事業所の製造原価報告書(3期間比較)を取得します。当年度・前年度・前々年度の期末残高を並べて比較し、前年比を確認する用途に利用できます。
\n\ncreated_at : 作成日時(ISO 8601, JST)
account_item_name : 勘定科目名
hierarchy_level : 階層レベル(1が最上位、値が大きいほど深い階層)
parent_account_category_name : 上位勘定科目カテゴリー名
two_years_before_closing_balance : 前々年度期末残高(円)
last_year_closing_balance : 前年度期末残高(円)
closing_balance : 当年度期末残高(円)
year_on_year : 前年比(百分率、%。100 は前年と同額、200 は前年比 2 倍、50 は前年比 0.5 倍。前年度期末残高が 0 以下、または当年度期末残高が負数の場合は 0 が返る)
\n\n\nGET https://api.freee.co.jp/api/1/reports/trial_cr_three_years?company_id=1&fiscal_year=2019
\n
{\n "trial_cr_three_years": {\n "company_id": 1,\n "fiscal_year": 2019,\n "created_at": "2019-12-17T12:00:50+09:00",\n "balances": [\n {\n "account_item_id": 1500,\n "account_item_name": "[製]期首材料棚卸高",\n "hierarchy_level": 2,\n "account_category_name": "期首原材料棚卸",\n "two_years_before_closing_balance": 50000,\n "last_year_closing_balance": 25000,\n "closing_balance": 100000,\n "year_on_year": 400.0\n }\n ]\n },\n "up_to_date": true\n}\n",
"operationId": "get_trial_cr_three_years",
"parameters": [
{
"name": "company_id",
"in": "query",
"description": "事業所ID",
"required": true,
"schema": {
"type": "integer",
"format": "int64",
"minimum": 1
},
"example": 1
},
{
"name": "fiscal_year",
"in": "query",
"description": "会計年度(会計期間の開始日が属する年。例: 会計期間が 2019-04-01 開始なら 2019)。会計年度の作成後に期間を変更した場合などに、指定した年と実際に集計対象となる会計年度がずれることがあります。意図した期間が集計されない場合は、fiscal_year ではなく start_date・end_date で期間を指定してください。",
"schema": {
"type": "integer",
"format": "int64"
},
"example": 2019
},
{
"name": "start_month",
"in": "query",
"description": "発生月で絞込:開始会計月(1-12)。指定されない場合、現在の会計年度の期首月が指定されます。",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 1,
"maximum": 12
},
"example": 1
},
{
"name": "end_month",
"in": "query",
"description": "発生月で絞込:終了会計月(1-12)(会計年度が10月始まりでstart_monthが11なら11, 12, 1, ... 9のいずれかを指定する)。指定されない場合、現在の会計年度の期末月が指定されます。",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 1,
"maximum": 12
},
"example": 12
},
{
"name": "start_date",
"in": "query",
"description": "発生日で絞込:開始日(yyyy-mm-dd)",
"schema": {
"type": "string"
},
"example": "2019-01-01"
},
{
"name": "end_date",
"in": "query",
"description": "発生日で絞込:終了日(yyyy-mm-dd)",
"schema": {
"type": "string"
},
"example": "2019-12-31"
},
{
"name": "account_item_display_type",
"in": "query",
"description": "勘定科目の表示。指定されない場合、`account_item` が指定されます。\n* `account_item` - 勘定科目単位で表示\n* `group` - 決算書表示単位で表示\n",
"schema": {
"type": "string",
"enum": [
"account_item",
"group"
]
},
"example": "account_item"
},
{
"name": "breakdown_display_type",
"in": "query",
"description": "内訳の表示。`account_item_display_type` と組み合わせ制約がある。\n* `partner` / `item` / `section` / `segment_1_tag` / `segment_2_tag` / `segment_3_tag` は `account_item_display_type=account_item`(または省略)のときのみ指定可能。それぞれ各行の `balances[].partners` / `items` / `sections` / `segment_1_tags` / `segment_2_tags` / `segment_3_tags` に内訳配列を返す\n* `account_item` は `account_item_display_type=group` のときのみ指定可能。他の値と異なり内訳配列は返らず、決算書表示名行に続けて勘定科目行が同じ `balances[]` に展開される\n* 上記の組み合わせ以外(例: `account_item_display_type=group` かつ `partner` / `item` / `section` / `segment_*_tag`)は validation error になる\n\n取引先、品目、部門、セグメント の各項目が単独で5,000以上登録されている場合は、breakdown_display_type で該当項目を指定するとエラーになります。\n\n例)取引先の登録数が5,000以上、品目の登録数が4,999以下の場合\n* breakdown_display_type: 取引先を指定 → エラーになる\n* breakdown_display_type: 品目を指定 → エラーにならない\n",
"schema": {
"type": "string",
"enum": [
"partner",
"item",
"section",
"account_item",
"segment_1_tag",
"segment_2_tag",
"segment_3_tag"
]
},
"example": "partner"
},
{
"name": "partner_id",
"in": "query",
"description": "取引先IDで絞込(0を指定すると、取引先が未選択で絞り込めます)",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"example": 1
},
{
"name": "partner_code",
"in": "query",
"description": "取引先コードで絞込(事業所設定で取引先コードの利用を有効にしている場合のみ利用可能です)",
"schema": {
"type": "string"
},
"example": "code001"
},
{
"name": "item_id",
"in": "query",
"description": "品目IDで絞込(0を指定すると、品目が未選択で絞り込めます)",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"example": 1
},
{
"name": "section_id",
"in": "query",
"description": "部門IDで絞込(0を指定すると、部門が未選択で絞り込めます)",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"example": 1
},
{
"name": "adjustment",
"in": "query",
"description": "決算整理仕訳の絞り込み条件。指定されない場合、決算整理仕訳を含む金額が返却されます。\n* `only` - 決算整理仕訳のみを集計\n* `without` - 決算整理仕訳を除外して集計\n",
"schema": {
"type": "string",
"enum": [
"only",
"without"
]
},
"example": "only"
},
{
"name": "cost_allocation",
"in": "query",
"description": "配賦仕訳の絞り込み条件。指定されない場合、配賦仕訳を含む金額が返却されます。法人スタンダードプラン(および旧法人ベーシックプラン)以上で利用可能で、利用できないプランで指定した場合はエラー(403)になります。\n* `only` - 配賦仕訳のみを集計\n* `without` - 配賦仕訳を除外して集計\n",
"schema": {
"type": "string",
"enum": [
"only",
"without"
]
},
"example": "only"
},
{
"name": "approval_flow_status",
"in": "query",
"description": "承認ステータスの絞り込み条件。プレミアムプラン、法人アドバンスプラン(および旧法人プロフェッショナルプラン)以上で、かつ事業所の設定から仕訳承認フローの利用を有効にした場合に指定可能です。\n* `without_in_progress` - 未承認を除く(デフォルト)\n* `all` - 全ての承認ステータスを含む\n",
"schema": {
"type": "string",
"enum": [
"without_in_progress",
"all"
]
},
"example": "without_in_progress"
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/trialCrThreeYearsResponse"
}
}
}
},
"400": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/badRequestError"
}
}
}
},
"401": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/unauthorizedError"
}
}
}
},
"403": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/forbiddenError"
}
}
}
},
"429": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/tooManyRequestsError"
}
}
}
},
"500": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/internalServerError"
}
}
}
}
}
}
},
"/api/1/reports/trial_cr_sections": {
"get": {
"tags": [
"Trial balance"
],
"summary": "製造原価報告書(部門比較)の取得",
"description": "\n指定した事業所の製造原価報告書(部門比較)を取得します。指定した部門(最大5つ)ごとの期末残高を並べて比較する用途に利用できます。
\n\ncreated_at : 作成日時(ISO 8601, JST)
account_item_name : 勘定科目名
hierarchy_level : 階層レベル(1が最上位、値が大きいほど深い階層)
parent_account_category_name : 上位勘定科目カテゴリー名
closing_balance : 期末残高(円。行直下の値は比較対象に指定した部門の合計、sections 配下の値は各部門の金額)
\n\n\nGET https://api.freee.co.jp/api/1/reports/trial_cr_sections?company_id=1§ion_ids=1,2,3&fiscal_year=2019
\n
{\n "trial_cr_sections": {\n "company_id": 1,\n "section_ids": "1,2,3",\n "fiscal_year": 2019,\n "created_at": "2019-12-17T12:00:50+09:00",\n "balances": [\n {\n "account_item_id": 1500,\n "account_item_name": "[製]期首材料棚卸高",\n "hierarchy_level": 2,\n "account_category_name": "期首原材料棚卸",\n "closing_balance": 600000,\n "sections": [\n {\n "id": 1,\n "name": "営業部",\n "closing_balance": 100000\n },\n {\n "id": 2,\n "name": "広報部",\n "closing_balance": 200000\n },\n {\n "id": 3,\n "name": "人事部",\n "closing_balance": 300000\n }\n ]\n }\n ]\n },\n "up_to_date": true\n}\n",
"operationId": "get_trial_cr_sections",
"parameters": [
{
"name": "company_id",
"in": "query",
"description": "事業所ID",
"required": true,
"schema": {
"type": "integer",
"format": "int64",
"minimum": 1
},
"example": 1
},
{
"name": "section_ids",
"in": "query",
"description": "比較する部門IDの指定。半角数字のIDを半角カンマ区切り(スペースなし)で1〜5つ指定してください。同じIDを重複して指定することはできません。0を指定すると、未選択の部門で比較できます。",
"required": true,
"schema": {
"type": "string"
},
"example": 123
},
{
"name": "fiscal_year",
"in": "query",
"description": "会計年度(会計期間の開始日が属する年。例: 会計期間が 2019-04-01 開始なら 2019)。会計年度の作成後に期間を変更した場合などに、指定した年と実際に集計対象となる会計年度がずれることがあります。意図した期間が集計されない場合は、fiscal_year ではなく start_date・end_date で期間を指定してください。",
"schema": {
"type": "integer",
"format": "int64"
},
"example": 2019
},
{
"name": "start_month",
"in": "query",
"description": "発生月で絞込:開始会計月(1-12)。指定されない場合、現在の会計年度の期首月が指定されます。",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 1,
"maximum": 12
},
"example": 1
},
{
"name": "end_month",
"in": "query",
"description": "発生月で絞込:終了会計月(1-12)(会計年度が10月始まりでstart_monthが11なら11, 12, 1, ... 9のいずれかを指定する)。指定されない場合、現在の会計年度の期末月が指定されます。",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 1,
"maximum": 12
},
"example": 12
},
{
"name": "start_date",
"in": "query",
"description": "発生日で絞込:開始日(yyyy-mm-dd)",
"schema": {
"type": "string"
},
"example": "2019-01-01"
},
{
"name": "end_date",
"in": "query",
"description": "発生日で絞込:終了日(yyyy-mm-dd)",
"schema": {
"type": "string"
},
"example": "2019-12-31"
},
{
"name": "account_item_display_type",
"in": "query",
"description": "勘定科目の表示。指定されない場合、`account_item` が指定されます。\n* `account_item` - 勘定科目単位で表示\n* `group` - 決算書表示単位で表示\n",
"schema": {
"type": "string",
"enum": [
"account_item",
"group"
]
},
"example": "account_item"
},
{
"name": "breakdown_display_type",
"in": "query",
"description": "内訳の表示。`account_item_display_type` と組み合わせ制約がある。\n* `partner` / `item` / `segment_1_tag` / `segment_2_tag` / `segment_3_tag` は `account_item_display_type=account_item`(または省略)のときのみ指定可能。`balances[].sections[]` の各部門要素配下の `partners` / `items` / `segment_1_tags` / `segment_2_tags` / `segment_3_tags` に内訳配列を返す\n* `account_item` は `account_item_display_type=group` のときのみ指定可能。他の値と異なり内訳配列は返らず、決算書表示名行に続けて勘定科目行が同じ `balances[]` に展開される\n* 部門比較では `section` は指定できない\n* 上記の組み合わせ以外は validation error になる\n\n取引先、品目、セグメント の各項目が単独で5,000以上登録されている場合は、breakdown_display_type で該当項目を指定するとエラーになります。\n\n例)取引先の登録数が5,000以上、品目の登録数が4,999以下の場合\n* breakdown_display_type: 取引先を指定 → エラーになる\n* breakdown_display_type: 品目を指定 → エラーにならない\n",
"schema": {
"type": "string",
"enum": [
"partner",
"item",
"account_item",
"segment_1_tag",
"segment_2_tag",
"segment_3_tag"
]
},
"example": "partner"
},
{
"name": "partner_id",
"in": "query",
"description": "取引先IDで絞込(0を指定すると、取引先が未選択で絞り込めます)",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"example": 1
},
{
"name": "partner_code",
"in": "query",
"description": "取引先コードで絞込(事業所設定で取引先コードの利用を有効にしている場合のみ利用可能です)",
"schema": {
"type": "string"
},
"example": "code001"
},
{
"name": "item_id",
"in": "query",
"description": "品目IDで絞込(0を指定すると、品目が未選択で絞り込めます)",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"example": 1
},
{
"name": "adjustment",
"in": "query",
"description": "決算整理仕訳の絞り込み条件。指定されない場合、決算整理仕訳を含む金額が返却されます。\n* `only` - 決算整理仕訳のみを集計\n* `without` - 決算整理仕訳を除外して集計\n",
"schema": {
"type": "string",
"enum": [
"only",
"without"
]
},
"example": "only"
},
{
"name": "cost_allocation",
"in": "query",
"description": "配賦仕訳の絞り込み条件。指定されない場合、配賦仕訳を含む金額が返却されます。法人スタンダードプラン(および旧法人ベーシックプラン)以上で利用可能で、利用できないプランで指定した場合はエラー(403)になります。\n* `only` - 配賦仕訳のみを集計\n* `without` - 配賦仕訳を除外して集計\n",
"schema": {
"type": "string",
"enum": [
"only",
"without"
]
},
"example": "only"
},
{
"name": "approval_flow_status",
"in": "query",
"description": "承認ステータスの絞り込み条件。プレミアムプラン、法人アドバンスプラン(および旧法人プロフェッショナルプラン)以上で、かつ事業所の設定から仕訳承認フローの利用を有効にした場合に指定可能です。\n* `without_in_progress` - 未承認を除く(デフォルト)\n* `all` - 全ての承認ステータスを含む\n",
"schema": {
"type": "string",
"enum": [
"without_in_progress",
"all"
]
},
"example": "without_in_progress"
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/trialCrSectionsResponse"
}
}
}
},
"400": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/badRequestError"
}
}
}
},
"401": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/unauthorizedError"
}
}
}
},
"403": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/forbiddenError"
}
}
}
},
"429": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/tooManyRequestsError"
}
}
}
},
"500": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/internalServerError"
}
}
}
}
}
}
},
"/api/1/reports/trial_cr_segment_1_tags": {
"get": {
"tags": [
"Trial balance"
],
"summary": "製造原価報告書(セグメント1比較)の取得",
"description": "\n指定した事業所の製造原価報告書(セグメント1比較)を取得します。指定したセグメント1タグ(最大5つ)ごとの期末残高を並べて比較する用途に利用できます。
\n\ncreated_at : 作成日時(ISO 8601, JST)
account_item_name : 勘定科目名
hierarchy_level : 階層レベル(1が最上位、値が大きいほど深い階層)
parent_account_category_name : 上位勘定科目カテゴリー名
closing_balance : 期末残高(円。行直下の値は比較対象に指定したセグメント1タグの合計、segment_1_tags 配下の値は各タグの金額)
\n\n\nGET https://api.freee.co.jp/api/1/reports/trial_cr_segment_1_tags?company_id=1&segment_1_tag_ids=1,2,3&fiscal_year=2019
\n
{\n "trial_cr_segment_1_tags": {\n "company_id": 1,\n "segment_1_tag_ids": "1,2,3",\n "fiscal_year": 2019,\n "created_at": "2019-12-17T12:00:50+09:00",\n "balances": [\n {\n "account_item_id": 1500,\n "account_item_name": "[製]期首材料棚卸高",\n "hierarchy_level": 2,\n "account_category_name": "期首原材料棚卸",\n "closing_balance": 600000,\n "segment_1_tags": [\n {\n "id": 1,\n "name": "プロジェクトA",\n "closing_balance": 100000\n },\n {\n "id": 2,\n "name": "プロジェクトB",\n "closing_balance": 200000\n },\n {\n "id": 3,\n "name": "プロジェクトC",\n "closing_balance": 300000\n }\n ]\n }\n ]\n },\n "up_to_date": true\n}\n",
"operationId": "get_trial_cr_segment_1_tags",
"parameters": [
{
"name": "company_id",
"in": "query",
"description": "事業所ID",
"required": true,
"schema": {
"type": "integer",
"format": "int64",
"minimum": 1
},
"example": 1
},
{
"name": "segment_1_tag_ids",
"in": "query",
"description": "比較するセグメント1タグIDの指定。半角数字のIDを半角カンマ区切り(スペースなし)で1〜5つ指定してください。同じIDを重複して指定することはできません。0を指定すると、未選択のセグメント1タグで比較できます。",
"required": true,
"schema": {
"type": "string"
},
"example": 123
},
{
"name": "fiscal_year",
"in": "query",
"description": "会計年度(会計期間の開始日が属する年。例: 会計期間が 2019-04-01 開始なら 2019)。会計年度の作成後に期間を変更した場合などに、指定した年と実際に集計対象となる会計年度がずれることがあります。意図した期間が集計されない場合は、fiscal_year ではなく start_date・end_date で期間を指定してください。",
"schema": {
"type": "integer",
"format": "int64"
},
"example": 2019
},
{
"name": "start_month",
"in": "query",
"description": "発生月で絞込:開始会計月(1-12)。指定されない場合、現在の会計年度の期首月が指定されます。",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 1,
"maximum": 12
},
"example": 1
},
{
"name": "end_month",
"in": "query",
"description": "発生月で絞込:終了会計月(1-12)(会計年度が10月始まりでstart_monthが11なら11, 12, 1, ... 9のいずれかを指定する)。指定されない場合、現在の会計年度の期末月が指定されます。",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 1,
"maximum": 12
},
"example": 12
},
{
"name": "start_date",
"in": "query",
"description": "発生日で絞込:開始日(yyyy-mm-dd)",
"schema": {
"type": "string"
},
"example": "2019-01-01"
},
{
"name": "end_date",
"in": "query",
"description": "発生日で絞込:終了日(yyyy-mm-dd)",
"schema": {
"type": "string"
},
"example": "2019-12-31"
},
{
"name": "account_item_display_type",
"in": "query",
"description": "勘定科目の表示。指定されない場合、`account_item` が指定されます。\n* `account_item` - 勘定科目単位で表示\n* `group` - 決算書表示単位で表示\n",
"schema": {
"type": "string",
"enum": [
"account_item",
"group"
]
},
"example": "account_item"
},
{
"name": "breakdown_display_type",
"in": "query",
"description": "内訳の表示。`account_item_display_type` と組み合わせ制約がある。\n* `partner` / `item` / `section` は `account_item_display_type=account_item`(または省略)のときのみ指定可能。`balances[].segment_1_tags[]` の各セグメント1タグ要素配下の `partners` / `items` / `sections` に内訳配列を返す\n* `account_item` は `account_item_display_type=group` のときのみ指定可能。他の値と異なり内訳配列は返らず、決算書表示名行に続けて勘定科目行が同じ `balances[]` に展開される\n* 上記の組み合わせ以外は validation error になる\n\n取引先、品目、部門 の各項目が単独で5,000以上登録されている場合は、breakdown_display_type で該当項目を指定するとエラーになります。\n\n例)取引先の登録数が5,000以上、品目の登録数が4,999以下の場合\n* breakdown_display_type: 取引先を指定 → エラーになる\n* breakdown_display_type: 品目を指定 → エラーにならない\n",
"schema": {
"type": "string",
"enum": [
"partner",
"item",
"section",
"account_item"
]
},
"example": "partner"
},
{
"name": "partner_id",
"in": "query",
"description": "取引先IDで絞込(0を指定すると、取引先が未選択で絞り込めます)",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"example": 1
},
{
"name": "partner_code",
"in": "query",
"description": "取引先コードで絞込(事業所設定で取引先コードの利用を有効にしている場合のみ利用可能です)",
"schema": {
"type": "string"
},
"example": "code001"
},
{
"name": "item_id",
"in": "query",
"description": "品目IDで絞込(0を指定すると、品目が未選択で絞り込めます)",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"example": 1
},
{
"name": "section_id",
"in": "query",
"description": "部門IDで絞込(0を指定すると、部門が未選択で絞り込めます)",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"example": 1
},
{
"name": "adjustment",
"in": "query",
"description": "決算整理仕訳の絞り込み条件。指定されない場合、決算整理仕訳を含む金額が返却されます。\n* `only` - 決算整理仕訳のみを集計\n* `without` - 決算整理仕訳を除外して集計\n",
"schema": {
"type": "string",
"enum": [
"only",
"without"
]
},
"example": "only"
},
{
"name": "cost_allocation",
"in": "query",
"description": "配賦仕訳の絞り込み条件。指定されない場合、配賦仕訳を含む金額が返却されます。法人スタンダードプラン(および旧法人ベーシックプラン)以上で利用可能で、利用できないプランで指定した場合はエラー(403)になります。\n* `only` - 配賦仕訳のみを集計\n* `without` - 配賦仕訳を除外して集計\n",
"schema": {
"type": "string",
"enum": [
"only",
"without"
]
},
"example": "only"
},
{
"name": "approval_flow_status",
"in": "query",
"description": "承認ステータスの絞り込み条件。プレミアムプラン、法人アドバンスプラン(および旧法人プロフェッショナルプラン)以上で、かつ事業所の設定から仕訳承認フローの利用を有効にした場合に指定可能です。\n* `without_in_progress` - 未承認を除く(デフォルト)\n* `all` - 全ての承認ステータスを含む\n",
"schema": {
"type": "string",
"enum": [
"without_in_progress",
"all"
]
},
"example": "without_in_progress"
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/trialCrSegment_1TagsResponse"
}
}
}
},
"400": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/badRequestError"
}
}
}
},
"401": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/unauthorizedError"
}
}
}
},
"403": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/forbiddenError"
}
}
}
},
"429": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/tooManyRequestsError"
}
}
}
},
"500": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/internalServerError"
}
}
}
}
}
}
},
"/api/1/reports/trial_cr_segment_2_tags": {
"get": {
"tags": [
"Trial balance"
],
"summary": "製造原価報告書(セグメント2比較)の取得",
"description": "\n指定した事業所の製造原価報告書(セグメント2比較)を取得します。指定したセグメント2タグ(最大5つ)ごとの期末残高を並べて比較する用途に利用できます。
\n\ncreated_at : 作成日時(ISO 8601, JST)
account_item_name : 勘定科目名
hierarchy_level : 階層レベル(1が最上位、値が大きいほど深い階層)
parent_account_category_name : 上位勘定科目カテゴリー名
closing_balance : 期末残高(円。行直下の値は比較対象に指定したセグメント2タグの合計、segment_2_tags 配下の値は各タグの金額)
\n\n\nGET https://api.freee.co.jp/api/1/reports/trial_cr_segment_2_tags?company_id=1&segment_2_tag_ids=1,2,3&fiscal_year=2019
\n
{\n "trial_cr_segment_2_tags": {\n "company_id": 1,\n "segment_2_tag_ids": "1,2,3",\n "fiscal_year": 2019,\n "created_at": "2019-12-17T12:00:50+09:00",\n "balances": [\n {\n "account_item_id": 1500,\n "account_item_name": "[製]期首材料棚卸高",\n "hierarchy_level": 2,\n "account_category_name": "期首原材料棚卸",\n "closing_balance": 600000,\n "segment_2_tags": [\n {\n "id": 1,\n "name": "プロジェクトA",\n "closing_balance": 100000\n },\n {\n "id": 2,\n "name": "プロジェクトB",\n "closing_balance": 200000\n },\n {\n "id": 3,\n "name": "プロジェクトC",\n "closing_balance": 300000\n }\n ]\n }\n ]\n },\n "up_to_date": true\n}\n",
"operationId": "get_trial_cr_segment_2_tags",
"parameters": [
{
"name": "company_id",
"in": "query",
"description": "事業所ID",
"required": true,
"schema": {
"type": "integer",
"format": "int64",
"minimum": 1
},
"example": 1
},
{
"name": "segment_2_tag_ids",
"in": "query",
"description": "比較するセグメント2タグIDの指定。半角数字のIDを半角カンマ区切り(スペースなし)で1〜5つ指定してください。同じIDを重複して指定することはできません。0を指定すると、未選択のセグメント2タグで比較できます。",
"required": true,
"schema": {
"type": "string"
},
"example": 123
},
{
"name": "fiscal_year",
"in": "query",
"description": "会計年度(会計期間の開始日が属する年。例: 会計期間が 2019-04-01 開始なら 2019)。会計年度の作成後に期間を変更した場合などに、指定した年と実際に集計対象となる会計年度がずれることがあります。意図した期間が集計されない場合は、fiscal_year ではなく start_date・end_date で期間を指定してください。",
"schema": {
"type": "integer",
"format": "int64"
},
"example": 2019
},
{
"name": "start_month",
"in": "query",
"description": "発生月で絞込:開始会計月(1-12)。指定されない場合、現在の会計年度の期首月が指定されます。",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 1,
"maximum": 12
},
"example": 1
},
{
"name": "end_month",
"in": "query",
"description": "発生月で絞込:終了会計月(1-12)(会計年度が10月始まりでstart_monthが11なら11, 12, 1, ... 9のいずれかを指定する)。指定されない場合、現在の会計年度の期末月が指定されます。",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 1,
"maximum": 12
},
"example": 12
},
{
"name": "start_date",
"in": "query",
"description": "発生日で絞込:開始日(yyyy-mm-dd)",
"schema": {
"type": "string"
},
"example": "2019-01-01"
},
{
"name": "end_date",
"in": "query",
"description": "発生日で絞込:終了日(yyyy-mm-dd)",
"schema": {
"type": "string"
},
"example": "2019-12-31"
},
{
"name": "account_item_display_type",
"in": "query",
"description": "勘定科目の表示。指定されない場合、`account_item` が指定されます。\n* `account_item` - 勘定科目単位で表示\n* `group` - 決算書表示単位で表示\n",
"schema": {
"type": "string",
"enum": [
"account_item",
"group"
]
},
"example": "account_item"
},
{
"name": "breakdown_display_type",
"in": "query",
"description": "内訳の表示。`account_item_display_type` と組み合わせ制約がある。\n* `partner` / `item` / `section` は `account_item_display_type=account_item`(または省略)のときのみ指定可能。`balances[].segment_2_tags[]` の各セグメント2タグ要素配下の `partners` / `items` / `sections` に内訳配列を返す\n* `account_item` は `account_item_display_type=group` のときのみ指定可能。他の値と異なり内訳配列は返らず、決算書表示名行に続けて勘定科目行が同じ `balances[]` に展開される\n* 上記の組み合わせ以外は validation error になる\n\n取引先、品目、部門 の各項目が単独で5,000以上登録されている場合は、breakdown_display_type で該当項目を指定するとエラーになります。\n\n例)取引先の登録数が5,000以上、品目の登録数が4,999以下の場合\n* breakdown_display_type: 取引先を指定 → エラーになる\n* breakdown_display_type: 品目を指定 → エラーにならない\n",
"schema": {
"type": "string",
"enum": [
"partner",
"item",
"section",
"account_item"
]
},
"example": "partner"
},
{
"name": "partner_id",
"in": "query",
"description": "取引先IDで絞込(0を指定すると、取引先が未選択で絞り込めます)",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"example": 1
},
{
"name": "partner_code",
"in": "query",
"description": "取引先コードで絞込(事業所設定で取引先コードの利用を有効にしている場合のみ利用可能です)",
"schema": {
"type": "string"
},
"example": "code001"
},
{
"name": "item_id",
"in": "query",
"description": "品目IDで絞込(0を指定すると、品目が未選択で絞り込めます)",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"example": 1
},
{
"name": "section_id",
"in": "query",
"description": "部門IDで絞込(0を指定すると、部門が未選択で絞り込めます)",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"example": 1
},
{
"name": "adjustment",
"in": "query",
"description": "決算整理仕訳の絞り込み条件。指定されない場合、決算整理仕訳を含む金額が返却されます。\n* `only` - 決算整理仕訳のみを集計\n* `without` - 決算整理仕訳を除外して集計\n",
"schema": {
"type": "string",
"enum": [
"only",
"without"
]
},
"example": "only"
},
{
"name": "cost_allocation",
"in": "query",
"description": "配賦仕訳の絞り込み条件。指定されない場合、配賦仕訳を含む金額が返却されます。法人スタンダードプラン(および旧法人ベーシックプラン)以上で利用可能で、利用できないプランで指定した場合はエラー(403)になります。\n* `only` - 配賦仕訳のみを集計\n* `without` - 配賦仕訳を除外して集計\n",
"schema": {
"type": "string",
"enum": [
"only",
"without"
]
},
"example": "only"
},
{
"name": "approval_flow_status",
"in": "query",
"description": "承認ステータスの絞り込み条件。プレミアムプラン、法人アドバンスプラン(および旧法人プロフェッショナルプラン)以上で、かつ事業所の設定から仕訳承認フローの利用を有効にした場合に指定可能です。\n* `without_in_progress` - 未承認を除く(デフォルト)\n* `all` - 全ての承認ステータスを含む\n",
"schema": {
"type": "string",
"enum": [
"without_in_progress",
"all"
]
},
"example": "without_in_progress"
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/trialCrSegment_2TagsResponse"
}
}
}
},
"400": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/badRequestError"
}
}
}
},
"401": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/unauthorizedError"
}
}
}
},
"403": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/forbiddenError"
}
}
}
},
"429": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/tooManyRequestsError"
}
}
}
},
"500": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/internalServerError"
}
}
}
}
}
}
},
"/api/1/reports/trial_cr_segment_3_tags": {
"get": {
"tags": [
"Trial balance"
],
"summary": "製造原価報告書(セグメント3比較)の取得",
"description": "\n指定した事業所の製造原価報告書(セグメント3比較)を取得します。指定したセグメント3タグ(最大5つ)ごとの期末残高を並べて比較する用途に利用できます。
\n\ncreated_at : 作成日時(ISO 8601, JST)
account_item_name : 勘定科目名
hierarchy_level : 階層レベル(1が最上位、値が大きいほど深い階層)
parent_account_category_name : 上位勘定科目カテゴリー名
closing_balance : 期末残高(円。行直下の値は比較対象に指定したセグメント3タグの合計、segment_3_tags 配下の値は各タグの金額)
\n\n\nGET https://api.freee.co.jp/api/1/reports/trial_cr_segment_3_tags?company_id=1&segment_3_tag_ids=1,2,3&fiscal_year=2019
\n
{\n "trial_cr_segment_3_tags": {\n "company_id": 1,\n "segment_3_tag_ids": "1,2,3",\n "fiscal_year": 2019,\n "created_at": "2019-12-17T12:00:50+09:00",\n "balances": [\n {\n "account_item_id": 1500,\n "account_item_name": "[製]期首材料棚卸高",\n "hierarchy_level": 2,\n "account_category_name": "期首原材料棚卸",\n "closing_balance": 600000,\n "segment_3_tags": [\n {\n "id": 1,\n "name": "プロジェクトA",\n "closing_balance": 100000\n },\n {\n "id": 2,\n "name": "プロジェクトB",\n "closing_balance": 200000\n },\n {\n "id": 3,\n "name": "プロジェクトC",\n "closing_balance": 300000\n }\n ]\n }\n ]\n },\n "up_to_date": true\n}\n",
"operationId": "get_trial_cr_segment_3_tags",
"parameters": [
{
"name": "company_id",
"in": "query",
"description": "事業所ID",
"required": true,
"schema": {
"type": "integer",
"format": "int64",
"minimum": 1
},
"example": 1
},
{
"name": "segment_3_tag_ids",
"in": "query",
"description": "比較するセグメント3タグIDの指定。半角数字のIDを半角カンマ区切り(スペースなし)で1〜5つ指定してください。同じIDを重複して指定することはできません。0を指定すると、未選択のセグメント3タグで比較できます。",
"required": true,
"schema": {
"type": "string"
},
"example": 123
},
{
"name": "fiscal_year",
"in": "query",
"description": "会計年度(会計期間の開始日が属する年。例: 会計期間が 2019-04-01 開始なら 2019)。会計年度の作成後に期間を変更した場合などに、指定した年と実際に集計対象となる会計年度がずれることがあります。意図した期間が集計されない場合は、fiscal_year ではなく start_date・end_date で期間を指定してください。",
"schema": {
"type": "integer",
"format": "int64"
},
"example": 2019
},
{
"name": "start_month",
"in": "query",
"description": "発生月で絞込:開始会計月(1-12)。指定されない場合、現在の会計年度の期首月が指定されます。",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 1,
"maximum": 12
},
"example": 1
},
{
"name": "end_month",
"in": "query",
"description": "発生月で絞込:終了会計月(1-12)(会計年度が10月始まりでstart_monthが11なら11, 12, 1, ... 9のいずれかを指定する)。指定されない場合、現在の会計年度の期末月が指定されます。",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 1,
"maximum": 12
},
"example": 12
},
{
"name": "start_date",
"in": "query",
"description": "発生日で絞込:開始日(yyyy-mm-dd)",
"schema": {
"type": "string"
},
"example": "2019-01-01"
},
{
"name": "end_date",
"in": "query",
"description": "発生日で絞込:終了日(yyyy-mm-dd)",
"schema": {
"type": "string"
},
"example": "2019-12-31"
},
{
"name": "account_item_display_type",
"in": "query",
"description": "勘定科目の表示。指定されない場合、`account_item` が指定されます。\n* `account_item` - 勘定科目単位で表示\n* `group` - 決算書表示単位で表示\n",
"schema": {
"type": "string",
"enum": [
"account_item",
"group"
]
},
"example": "account_item"
},
{
"name": "breakdown_display_type",
"in": "query",
"description": "内訳の表示。`account_item_display_type` と組み合わせ制約がある。\n* `partner` / `item` / `section` は `account_item_display_type=account_item`(または省略)のときのみ指定可能。`balances[].segment_3_tags[]` の各セグメント3タグ要素配下の `partners` / `items` / `sections` に内訳配列を返す\n* `account_item` は `account_item_display_type=group` のときのみ指定可能。他の値と異なり内訳配列は返らず、決算書表示名行に続けて勘定科目行が同じ `balances[]` に展開される\n* 上記の組み合わせ以外は validation error になる\n\n取引先、品目、部門 の各項目が単独で5,000以上登録されている場合は、breakdown_display_type で該当項目を指定するとエラーになります。\n\n例)取引先の登録数が5,000以上、品目の登録数が4,999以下の場合\n* breakdown_display_type: 取引先を指定 → エラーになる\n* breakdown_display_type: 品目を指定 → エラーにならない\n",
"schema": {
"type": "string",
"enum": [
"partner",
"item",
"section",
"account_item"
]
},
"example": "partner"
},
{
"name": "partner_id",
"in": "query",
"description": "取引先IDで絞込(0を指定すると、取引先が未選択で絞り込めます)",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"example": 1
},
{
"name": "partner_code",
"in": "query",
"description": "取引先コードで絞込(事業所設定で取引先コードの利用を有効にしている場合のみ利用可能です)",
"schema": {
"type": "string"
},
"example": "code001"
},
{
"name": "item_id",
"in": "query",
"description": "品目IDで絞込(0を指定すると、品目が未選択で絞り込めます)",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"example": 1
},
{
"name": "section_id",
"in": "query",
"description": "部門IDで絞込(0を指定すると、部門が未選択で絞り込めます)",
"schema": {
"type": "integer",
"format": "int64",
"minimum": 0
},
"example": 1
},
{
"name": "adjustment",
"in": "query",
"description": "決算整理仕訳の絞り込み条件。指定されない場合、決算整理仕訳を含む金額が返却されます。\n* `only` - 決算整理仕訳のみを集計\n* `without` - 決算整理仕訳を除外して集計\n",
"schema": {
"type": "string",
"enum": [
"only",
"without"
]
},
"example": "only"
},
{
"name": "cost_allocation",
"in": "query",
"description": "配賦仕訳の絞り込み条件。指定されない場合、配賦仕訳を含む金額が返却されます。法人スタンダードプラン(および旧法人ベーシックプラン)以上で利用可能で、利用できないプランで指定した場合はエラー(403)になります。\n* `only` - 配賦仕訳のみを集計\n* `without` - 配賦仕訳を除外して集計\n",
"schema": {
"type": "string",
"enum": [
"only",
"without"
]
},
"example": "only"
},
{
"name": "approval_flow_status",
"in": "query",
"description": "承認ステータスの絞り込み条件。プレミアムプラン、法人アドバンスプラン(および旧法人プロフェッショナルプラン)以上で、かつ事業所の設定から仕訳承認フローの利用を有効にした場合に指定可能です。\n* `without_in_progress` - 未承認を除く(デフォルト)\n* `all` - 全ての承認ステータスを含む\n",
"schema": {
"type": "string",
"enum": [
"without_in_progress",
"all"
]
},
"example": "without_in_progress"
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/trialCrSegment_3TagsResponse"
}
}
}
},
"400": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/badRequestError"
}
}
}
},
"401": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/unauthorizedError"
}
}
}
},
"403": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/forbiddenError"
}
}
}
},
"429": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/tooManyRequestsError"
}
}
}
},
"500": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/internalServerError"
}
}
}
}
}
}
},
"/api/1/reports/general_ledgers": {
"get": {
"tags": [
"General ledgers"
],
"summary": "総勘定元帳一覧の取得(β版)",
"description": "指定した事業所の総勘定元帳一覧を取得する
\n指定した事業所のファイルボックス(証憑ファイル)一覧を取得する
\nアップロード日(start_date〜end_date)の期間を指定して取得します。ファイルの実体(バイナリ)は本APIでは取得できないため、ファイルボックス(証憑ファイル)のダウンロードAPI(GET /api/1/receipts/{id}/download)を利用してください。
\n\nファイルボックス(証憑ファイル)をアップロードする
\n指定した事業所のファイルボックス(証憑ファイル)を取得する
\nファイルの実体(バイナリ)は本APIでは取得できないため、ファイルボックス(証憑ファイル)のダウンロードAPI(GET /api/1/receipts/{id}/download)を利用してください。
", "operationId": "get_receipt", "parameters": [ { "name": "id", "in": "path", "description": "ファイルボックス(証憑ファイル)ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 } }, { "name": "company_id", "in": "query", "description": "事業所ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/receiptResponse" } } } }, "400": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/badRequestError" } } } }, "401": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/unauthorizedError" } } } }, "403": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/forbiddenError" } } } }, "404": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/badRequestNotFoundError" } } } }, "500": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/internalServerError" } } } } } }, "put": { "tags": [ "Receipts" ], "summary": "ファイルボックス(証憑ファイル)の更新", "description": "\nファイルボックス(証憑ファイル)を更新する
\nファイルボックス(証憑ファイル)を削除する
", "operationId": "destroy_receipt", "parameters": [ { "name": "id", "in": "path", "description": "ファイルボックス(証憑ファイル)ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 } }, { "name": "company_id", "in": "query", "description": "事業所ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 } } ], "responses": { "204": { "description": "", "content": {} }, "400": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/badRequestError" } } } }, "401": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/unauthorizedError" } } } }, "403": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/forbiddenError" } } } }, "404": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/badRequestNotFoundError" } } } }, "500": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/internalServerError" } } } } } } }, "/api/1/receipts/{id}/download": { "get": { "tags": [ "Receipts" ], "summary": "ファイルボックス(証憑ファイル)のダウンロード", "description": "\n指定した事業所のファイルボックス(証憑ファイル)をダウンロードする
\nレスポンスのContent-Typeは、アップロードされたファイルの形式(ファイルボックス(証憑ファイル)の取得APIで返るmime_type)に応じて返ります。
", "operationId": "download_receipt", "parameters": [ { "name": "id", "in": "path", "description": "ファイルボックス(証憑ファイル)ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 } }, { "name": "company_id", "in": "query", "description": "事業所ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 } } ], "responses": { "200": { "description": "", "content": { "text/csv": { "schema": { "type": "string" } }, "application/pdf": { "schema": { "type": "string", "format": "binary" } }, "image/*": { "schema": { "type": "string", "format": "binary" } } } }, "400": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/badRequestError" } } } }, "401": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/unauthorizedError" } } } }, "403": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/forbiddenError" } } } }, "404": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/badRequestNotFoundError" } } } }, "500": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/internalServerError" } } } } } } }, "/api/1/expense_applications": { "get": { "tags": [ "Expense applications" ], "summary": "経費申請一覧の取得", "description": "\n指定した事業所の経費申請一覧を取得する
\n\n経費精算APIの使い方については、freee会計経費精算APIの使い方をご参照ください
\n\n指定した事業所の経費申請を作成する
\n\n経費精算APIの使い方については、freee会計経費精算APIの使い方をご参照ください
\n\n指定した事業所の経費申請を取得する
\n\n経費精算APIの使い方については、freee会計経費精算APIの使い方をご参照ください
\n\n指定した事業所の経費申請を更新する
\n\n経費精算APIの使い方については、freee会計経費精算APIの使い方をご参照ください
\n\n指定した事業所の経費申請を削除する
\n\n経費精算APIの使い方については、freee会計経費精算APIの使い方をご参照ください
\n\n指定した事業所の経費申請の承認操作を行う
\n\n経費精算APIの使い方については、freee会計経費精算APIの使い方をご参照ください
\n\n指定した事業所の経費申請に関連付ける各種申請の更新を行う
\n\n経費精算APIの使い方については、freee会計経費精算APIの使い方をご参照ください
\n\n指定した事業所の経費精算で利用する外貨の一覧を取得します。
", "operationId": "list_expense_application_currencies", "parameters": [ { "name": "company_id", "in": "query", "description": "事業所ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 } }, { "name": "search_status", "in": "query", "description": "利用状態での絞り込み (usable: 利用可能, unusable: 利用不可)", "schema": { "type": "string", "enum": [ "usable", "unusable" ] } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/expenseApplicationCurrenciesIndexResponse" } } } }, "400": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/badRequestError" } } } }, "401": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/unauthorizedError" } } } }, "403": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/forbiddenError" } } } }, "500": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/internalServerError" } } } } } }, "post": { "tags": [ "Expense application currencies" ], "summary": "経費精算の外貨の作成", "description": "\n指定した事業所の経費精算で利用する外貨を作成します。
", "operationId": "create_expense_application_currency", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/expenseApplicationCurrencyParams" } } }, "required": true }, "responses": { "201": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/expense_application_currency" } } } }, "400": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/badRequestError" } } } }, "401": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/unauthorizedError" } } } }, "403": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/forbiddenError" } } } }, "500": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/internalServerError" } } } } } } }, "/api/1/expense_applications/currencies/{id}": { "get": { "tags": [ "Expense application currencies" ], "summary": "経費精算の外貨の取得", "description": "\n指定した事業所の経費精算で利用する外貨を取得します。
", "operationId": "get_expense_application_currency", "parameters": [ { "name": "id", "in": "path", "description": "外貨ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 } }, { "name": "company_id", "in": "query", "description": "事業所ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/expense_application_currency" } } } }, "400": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/badRequestError" } } } }, "401": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/unauthorizedError" } } } }, "403": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/forbiddenError" } } } }, "404": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/badRequestNotFoundError" } } } }, "500": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/internalServerError" } } } } } }, "put": { "tags": [ "Expense application currencies" ], "summary": "経費精算の外貨の更新", "description": "\n指定した事業所の経費精算で利用する外貨を更新します。
", "operationId": "update_expense_application_currency", "parameters": [ { "name": "id", "in": "path", "description": "外貨ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/expenseApplicationCurrencyParams" } } }, "required": true }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/expense_application_currency" } } } }, "400": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/badRequestError" } } } }, "401": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/unauthorizedError" } } } }, "403": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/forbiddenError" } } } }, "404": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/badRequestNotFoundError" } } } }, "500": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/internalServerError" } } } } } }, "delete": { "tags": [ "Expense application currencies" ], "summary": "経費精算の外貨の削除", "description": "\n指定した事業所の経費精算で利用する外貨を削除します。
", "operationId": "delete_expense_application_currency", "parameters": [ { "name": "id", "in": "path", "description": "外貨ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 } }, { "name": "company_id", "in": "query", "description": "事業所ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 } } ], "responses": { "204": { "description": "", "content": {} }, "400": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/badRequestError" } } } }, "401": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/unauthorizedError" } } } }, "403": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/forbiddenError" } } } }, "404": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/badRequestNotFoundError" } } } }, "500": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/internalServerError" } } } } } } }, "/api/1/expense_applications/form": { "get": { "tags": [ "Expense application forms" ], "summary": "経費申請フォームの取得", "description": "\n指定した事業所の経費申請フォームの設定を取得します。設定が未作成の場合は初期値を返します。
", "operationId": "get_expense_application_form", "parameters": [ { "name": "company_id", "in": "query", "description": "事業所ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/expense_application_form" } } } }, "400": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/badRequestError" } } } }, "401": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/unauthorizedError" } } } }, "403": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/forbiddenError" } } } }, "500": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/internalServerError" } } } } } }, "put": { "tags": [ "Expense application forms" ], "summary": "経費申請フォームの更新", "description": "\n指定した事業所の経費申請フォームの設定を更新します。設定が未作成の場合は作成します。
", "operationId": "update_expense_application_form", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/expenseApplicationFormParams" } } }, "required": true }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/expense_application_form" } } } }, "400": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/badRequestError" } } } }, "401": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/unauthorizedError" } } } }, "403": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/forbiddenError" } } } }, "409": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/conflictError" } } } }, "500": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/internalServerError" } } } } } } }, "/api/1/expense_application_line_templates": { "get": { "tags": [ "Expense application line templates" ], "summary": "経費科目一覧の取得", "description": "\n指定した事業所の経費科目一覧を取得する
\n\n経費科目は、経費申請の作成時に申請者が選択する項目で、勘定科目・税区分・品目などの組み合わせをあらかじめ設定したものです。
\n\n指定した事業所の経費科目を作成する
\n\n指定した事業所の経費科目を取得する
\n\n指定した事業所の経費科目を更新する
\n\n指定した事業所の経費科目を削除する
", "operationId": "destroy_expense_application_line_template", "parameters": [ { "name": "id", "in": "path", "description": "経費科目ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 } }, { "name": "company_id", "in": "query", "description": "事業所ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 } } ], "responses": { "204": { "description": "", "content": {} }, "400": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/badRequestError" } } } }, "401": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/unauthorizedError" } } } }, "403": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/forbiddenError" } } } }, "404": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/badRequestNotFoundError" } } } }, "500": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/internalServerError" } } } } } } }, "/api/1/payment_requests": { "get": { "tags": [ "Payment requests" ], "summary": "支払依頼一覧の取得", "description": "\n指定した事業所の支払依頼一覧を取得する
\n\n支払依頼APIの使い方については、freee会計支払依頼APIの使い方をご参照ください
\n\n指定した事業所の支払依頼を作成する
\n\n支払依頼APIの使い方については、freee会計支払依頼APIの使い方をご参照ください
\n\n指定した事業所の支払依頼を取得する
\n\n支払依頼APIの使い方については、freee会計支払依頼APIの使い方をご参照ください
", "operationId": "get_payment_request", "parameters": [ { "name": "id", "in": "path", "description": "支払依頼ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 } }, { "name": "company_id", "in": "query", "description": "事業所ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/paymentRequestResponse" } } } }, "400": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/badRequestError" } } } }, "401": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/unauthorizedError" } } } }, "403": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/forbiddenError" } } } }, "404": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/badRequestNotFoundError" } } } }, "500": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/internalServerError" } } } } } }, "put": { "tags": [ "Payment requests" ], "summary": "支払依頼の更新", "description": "\n指定した事業所の支払依頼を更新する
\n\n支払依頼APIの使い方については、freee会計支払依頼APIの使い方をご参照ください
\n\n指定した事業所の支払依頼を削除する
\n\n支払依頼APIの使い方については、freee会計支払依頼APIの使い方をご参照ください
\n\n指定した事業所の支払依頼の承認操作を行う
\n\n支払依頼APIの使い方については、freee会計支払依頼APIの使い方をご参照ください
\n\n指定した事業所の各種申請一覧を取得する
\n\n各種申請APIの使い方については、freee会計の各種申請APIの使い方をご参照ください
\n\n指定した事業所の各種申請を作成する
\n\n各種申請APIの使い方については、freee会計の各種申請APIの使い方をご参照ください
\n\n指定した事業所の各種申請を取得する
\n\n各種申請APIの使い方については、freee会計の各種申請APIの使い方をご参照ください
\n\n指定した事業所の各種申請を更新する
\n\n各種申請APIの使い方については、freee会計の各種申請APIの使い方をご参照ください
\n\n指定した事業所の各種申請を削除する
\n\n各種申請APIの使い方については、freee会計の各種申請APIの使い方をご参照ください
\n\n指定した事業所の各種申請の承認操作を行う
\n\n各種申請APIの使い方については、freee会計の各種申請APIの使い方をご参照ください
\n\n指定した事業所の各種申請の申請フォーム一覧を取得する
\n\n各種申請APIの使い方については、freee会計の各種申請APIの使い方をご参照ください
", "operationId": "get_approval_request_forms", "parameters": [ { "name": "company_id", "in": "query", "description": "事業所ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/approvalRequestFormIndexResponse" } } } }, "400": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/badRequestError" } } } }, "401": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/unauthorizedError" } } } }, "403": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/forbiddenError" } } } }, "404": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/badRequestNotFoundError" } } } }, "500": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/internalServerError" } } } } } } }, "/api/1/approval_requests/forms/{id}": { "get": { "tags": [ "Approval requests" ], "summary": "各種申請の申請フォームの取得", "description": "\n指定した事業所の各種申請の申請フォームを取得する
\n\n各種申請APIの使い方については、freee会計の各種申請APIの使い方をご参照ください
", "operationId": "get_approval_request_form", "parameters": [ { "name": "id", "in": "path", "description": "申請フォームID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 } }, { "name": "company_id", "in": "query", "description": "事業所ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/approvalRequestFormResponse" } } } }, "400": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/badRequestError" } } } }, "401": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/unauthorizedError" } } } }, "403": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/forbiddenError" } } } }, "404": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/badRequestNotFoundError" } } } }, "500": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/internalServerError" } } } } } } }, "/api/1/purchase_requests": { "get": { "tags": [ "Purchase requests" ], "summary": "購買申請一覧の取得", "description": "指定した事業所の購買申請一覧を取得する
\n\n指定した事業所の購買申請を作成する
", "operationId": "create_purchase_request", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/purchaseRequestCreateParams" } }, "application/x-www-form-urlencoded": { "schema": { "$ref": "#/components/schemas/purchaseRequestCreateParams" } } }, "required": true }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/purchaseRequestDetailResponse" } } } }, "400": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/badRequestError" } } } }, "401": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/unauthorizedError" } } } }, "403": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/forbiddenError" } } } }, "404": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/badRequestNotFoundError" } } } }, "500": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/internalServerError" } } } } } } }, "/api/1/purchase_requests/{id}": { "get": { "tags": [ "Purchase requests" ], "summary": "購買申請の取得", "description": "指定した事業所の購買申請を取得する
", "operationId": "get_purchase_request", "parameters": [ { "name": "id", "in": "path", "description": "購買申請ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 } }, { "name": "company_id", "in": "query", "description": "事業所ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/purchaseRequestDetailResponse" } } } }, "400": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/badRequestError" } } } }, "401": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/unauthorizedError" } } } }, "403": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/forbiddenError" } } } }, "404": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/badRequestNotFoundError" } } } }, "500": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/internalServerError" } } } } } }, "put": { "tags": [ "Purchase requests" ], "summary": "購買申請の更新", "description": "指定した事業所の購買申請を更新する
", "operationId": "update_purchase_request", "parameters": [ { "name": "id", "in": "path", "description": "購買申請ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/purchaseRequestUpdateParams" } }, "application/x-www-form-urlencoded": { "schema": { "$ref": "#/components/schemas/purchaseRequestUpdateParams" } } }, "required": true }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/purchaseRequestDetailResponse" } } } }, "400": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/badRequestError" } } } }, "401": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/unauthorizedError" } } } }, "403": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/forbiddenError" } } } }, "404": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/badRequestNotFoundError" } } } }, "500": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/internalServerError" } } } } } }, "delete": { "tags": [ "Purchase requests" ], "summary": "購買申請の削除", "description": "指定した事業所の購買申請を削除する
", "operationId": "destroy_purchase_request", "parameters": [ { "name": "id", "in": "path", "description": "購買申請ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 } }, { "name": "company_id", "in": "query", "description": "事業所ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 } } ], "responses": { "204": { "description": "", "content": {} }, "400": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/badRequestError" } } } }, "401": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/unauthorizedError" } } } }, "403": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/forbiddenError" } } } }, "404": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/badRequestNotFoundError" } } } }, "500": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/internalServerError" } } } } } } }, "/api/1/purchase_requests/forms": { "get": { "tags": [ "Purchase requests" ], "summary": "購買申請の申請フォーム一覧の取得", "description": "指定した事業所の購買申請の申請フォーム一覧を取得する
\n\n指定した事業所の購買申請の申請フォーム詳細を取得する
\n\n指定した事業所の購買申請の承認操作を行う
", "operationId": "create_purchase_request_action", "parameters": [ { "name": "id", "in": "path", "description": "購買申請ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/purchaseRequestActionCreateParams" } }, "application/x-www-form-urlencoded": { "schema": { "$ref": "#/components/schemas/purchaseRequestActionCreateParams" } } }, "required": true }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/purchaseRequestDetailResponse" } } } }, "400": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/badRequestError" } } } }, "401": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/unauthorizedError" } } } }, "403": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/forbiddenError" } } } }, "404": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/badRequestNotFoundError" } } } }, "500": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/internalServerError" } } } } } } }, "/api/1/approval_flow_routes": { "get": { "tags": [ "Approval flow routes" ], "summary": "申請経路一覧の取得", "description": "\n指定した事業所の申請経路一覧を取得する
\n\n各種申請APIの使い方については、freee会計の各種申請APIの使い方をご参照ください
\n経費精算APIの使い方については、freee会計の経費精算APIの使い方をご参照ください
\n\n承認ステップの詳細(steps)は本APIのレスポンスには含まれません。承認方法や分岐条件を確認する場合は、申請経路の取得(GET /api/1/approval_flow_routes/{id})をご利用ください。
\n支払依頼では、条件分岐を含む申請経路を指定した作成・更新・承認操作はできません。
\n指定した事業所の申請経路を取得する
\n\n各種申請APIの使い方については、freee会計の各種申請APIの使い方をご参照ください
\n経費精算APIの使い方については、freee会計の経費精算APIの使い方をご参照ください
\n\n承認ステップごとの承認方法は steps[].resource_type で判別できます。役職で承認者を指定する承認ステップ(and_position / or_position)では steps[].approver_determination_type、steps[].group、steps[].position_types を、条件分岐の承認ステップ(switchable)では steps[].switching_rules をご参照ください。
\n支払依頼では、条件分岐を含む申請経路を指定した作成・更新・承認操作はできません。
\n指定した事業所に登録されているセグメントタグの一覧を取得します。取引や振替伝票の明細に付与するセグメントタグを参照する用途を想定しています。
\n指定した事業所のセグメント区分に、新しいセグメントタグを作成します。作成したタグは取引や振替伝票の明細に付与できます。
\nセグメントタグIDを指定して、セグメントタグの情報を更新します。このAPIはセグメントタグの作成は行いません。
\nセグメントタグIDを指定して、セグメントタグを削除します。
\nセグメントタグコード(code)をキーにセグメントタグを更新し、該当するタグが存在しない場合は新規作成します。外部システムとの連携でセグメントタグマスタを登録・更新する用途を想定しています。
\n指定した事業所の固定資産一覧を取得する
\ntarget_dateで指定した会計期間に償却データが存在する固定資産を、固定資産IDの昇順で返します。
\n\ntarget_date : 表示したい会計期間の開始年月日。開始年月日以外を指定した場合は、その日付が含まれる会計期間が対象となります。
depreciation_amount : 本年分の償却費合計
depreciation_method : 償却方法
depreciation_account_item_id : 減価償却に使う勘定科目
acquisition_cost : 取得価額
opening_balance : 期首残高
undepreciated_balance : 未償却残高。土地などの償却しない固定資産はnullが返ります。
opening_accumulated_depreciation : 期首減価償却累計額
closing_accumulated_depreciation : 期末減価償却累計額
up_to_dateがfalseの場合、残高の集計が完了していません。最新の集計結果を確認したい場合は、時間を空けて再度取得する必要があります。
このAPIはfreee会計の固定資産台帳を取得します。freee固定資産で登録した固定資産は取得できませんのでご注意ください。freee固定資産の詳細はこちらをご覧ください。
指定した事業所の決算書表示名(小カテゴリー)を作成する
\n決算書表示名は、貸借対照表・損益計算書などの決算書上で勘定科目をまとめて表示するための表示名です。勘定科目カテゴリー(中分類)の配下に作成され、勘定科目の作成・更新時に決算書表示名として指定できるようになります。
\n\n指定した事業所の自動登録ルール一覧を取得する
\n\n自動登録ルールとは、口座から同期された明細(入出金データ)の内容をもとに、取引や振替の登録・推測を自動で行うためのルールです。
\n\n指定した事業所の自動登録ルールを作成する
\n\n指定した事業所の自動登録ルールを取得する
\n\n指定した事業所の自動登録ルールを更新する
\n\n指定した事業所の自動登録ルールを削除する
\n\n