{ "openapi": "3.0.1", "info": { "title": "freee会計 API", "description": "\n
\n

スタートガイド

\n\n

freee API開発がはじめての方はfreee API スタートガイドを参照してください。

\n\n
\n

お知らせ

\n\n

\nインボイス制度に伴い、freee会計の帳票機能がfreee請求書に移行します。これに伴い、2023年10月にfreee会計の「請求書の作成、見積書の作成」エンドポイントは廃止、freee請求書APIに移行する予定です。詳細は freee会計 APIの仕様変更(インボイス制度対応)についてをご確認ください。\n

\n\n

仕様

\n\n

APIエンドポイント

\n\n

https://api.freee.co.jp/ (httpsのみ)

\n\n

認証について

\n

OAuth2.0を利用します。詳細はリファレンスの認証に関する記載を参照してください。

\n\n

データフォーマット

\n\n

リクエスト、レスポンスともにJSON形式をサポートしていますが、詳細は、API毎の説明欄(application/jsonなど)を確認してください。

\n\n

後方互換性ありの変更

\n\n

freeeでは、APIを改善していくために以下のような変更は後方互換性ありとして通知なく変更を入れることがあります。アプリケーション実装者は以下を踏まえて開発を行ってください。

\n\n\n\n

共通レスポンスヘッダー

\n\n

すべてのAPIのレスポンスには以下のHTTPヘッダーが含まれます。

\n\n\n\n

共通エラーレスポンス

\n\n\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\n

API 使用制限

\n\n

freeeは一定期間に過度のアクセスを検知した場合、APIアクセスをコントロールする場合があります。

\n

その際のhttp status codeは403となります。制限がかかってから10分程度が過ぎると再度使用することができるようになります。

\n\n

/reportsと/receipts/{id}/downloadエンドポイント

\n\n

freeeはエンドポイント毎に一定頻度以上のアクセスを検知した場合、APIアクセスをコントロールする場合があります。その際のhttp status codeは429(too many requests)となります。

\n\n\n

http status codeが429となった場合、API使用ステータスはレスポンスヘッダに付与されます。

\n
x-ratelimit-limit:10\nx-ratelimit-remaining:1\nx-ratelimit-reset:2023-01-13T10:22:29+09:00\n
\n\n
各ヘッダの意味は次のとおりです。

\n\n\n \n \n \n \n \n \n \n \n \n
ヘッダ名説明
x-ratelimit-limit使用回数の上限
x-ratelimit-remaining残り使用回数
x-ratelimit-reset使用回数がリセットされる時刻
\n\n
\n\n

プランごとの API 使用制限

\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
freee会計プラン名事業所とアプリケーション毎に、1日のAPIコール数の上限
法人エンタープライズプラン10,000
法人アドバンスプラン(および旧法人プロフェッショナルプラン)5,000
上記以外3,000
\n\n

プランごとの利用可能 API

\n

契約プランごとにご利用可能な freee 会計 API は異なります。 freee 会計の Web 版でご利用いただける機能について、 freee 会計 API でもご利用いただけます。

\n

例えば法人スタータープラン、旧法人ベーシックプランをご契約いただいている場合、 Web 版では経費精算機能をご利用いただけますので、 API でも経費精算 API をご利用可能です。

\n

ただし以下の API は例外です。

\n\n

詳しくは、【個人】freee会計のプランについて 並びに 【法人】freee会計のプランについてをご確認ください。

\n\n

プランごとの利用可能パラメータ

\n

ご利用可能な freee 会計 API であっても、契約プランごとに利用可能なパラメータは異なります。

\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
パラメータ説明利用可能プラン
segment_1_tagセグメント1タグ法人アドバンスプラン
法人エンタープライズプラン
旧法人プロフェッショナルプラン
segment_2_tagセグメント2タグ法人アドバンスプラン
法人エンタープライズプラン
segment_3_tagセグメント3タグ法人アドバンスプラン
法人エンタープライズプラン
segment_1_tag_idセグメント1タグID法人アドバンスプラン
法人エンタープライズプラン
旧法人プロフェッショナルプラン
segment_2_tag_idセグメント2タグID法人アドバンスプラン
法人エンタープライズプラン
segment_3_tag_idセグメント3タグID法人アドバンスプラン
法人エンタープライズプラン
segment_1_tag_nameセグメント1タグ名法人アドバンスプラン
法人エンタープライズプラン
旧法人プロフェッショナルプラン
segment_2_tag_nameセグメント2タグ名法人アドバンスプラン
法人エンタープライズプラン
segment_3_tag_nameセグメント3タグ名法人アドバンスプラン
法人エンタープライズプラン
segment_idセグメントID(1, 2, 3 のいずれか)法人アドバンスプラン
法人エンタープライズプラン
旧法人プロフェッショナルプラン
旧法人プロフェッショナルプランにつきましては、 1 のみ指定可能です。
\n\n

Webhookについて

\n\n

詳細は会計Webhook概要を参照してください。

\n\n
\n

連絡先

\n\n

ご不明点、ご要望等は freee サポートデスクへのお問い合わせフォーム からご連絡ください。

\n
© Since 2013 freee K.K.", "version": "v1.0", "x-copyright": "© Since 2013 freee K.K." }, "servers": [ { "url": "https://api.freee.co.jp" } ], "security": [ { "oauth2": [ "write", "read" ] } ], "tags": [ { "name": "Partners", "description": "

取引先

" }, { "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\n

指定した事業所に登録されている取引先の一覧を取得します。取引・請求書・支払依頼などの取引先マスタとして参照する用途を想定しています。

\n\n

注意点

\n", "operationId": "get_partners", "parameters": [ { "name": "company_id", "in": "query", "description": "事業所ID。取得対象の事業所を指定します。", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1, "example": 1 } }, { "name": "start_update_date", "in": "query", "description": "更新日で絞り込む開始日 (yyyy-mm-dd, JST)。指定日以降に更新された取引先を対象にします。", "schema": { "type": "string", "example": "2024-01-01" } }, { "name": "end_update_date", "in": "query", "description": "更新日で絞り込む終了日 (yyyy-mm-dd, JST)。指定日以前に更新された取引先を対象にします。", "schema": { "type": "string", "example": "2024-01-31" } }, { "name": "offset", "in": "query", "description": "取得レコードのオフセット (デフォルト: 0)。ページング用に、スキップする件数を指定します。", "schema": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 9223372036854775807, "example": 0 } }, { "name": "limit", "in": "query", "description": "取得レコードの件数 (デフォルト: 50, 最小: 1, 最大: 3000)。1 回のリクエストで取得する上限件数を指定します。", "schema": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 3000, "example": 50 } }, { "name": "keyword", "in": "query", "description": "検索キーワード。取引先コード・取引先名・正式名称・カナ名称・ショートカットキー1・2 のいずれかに対する部分一致で絞り込みます。\n以下のいずれかで区切って複数キーワードを指定した場合は AND 検索になります。\n\n", "schema": { "type": "string", "example": "ABC商店" } } ], "responses": { "200": { "description": "取引先一覧の取得に成功しました。", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/partnersResponse" } } } }, "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": [ "Partners" ], "summary": "取引先の作成", "description": "\n

概要

\n\n

指定した事業所に新しい取引先を作成します。取引や請求書で参照する取引先マスタを新規登録する用途で利用します。

\n\n

注意点

\n", "operationId": "create_partner", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/partnerCreateParams" } }, "application/x-www-form-urlencoded": { "schema": { "$ref": "#/components/schemas/partnerCreateParams" } } }, "required": true }, "responses": { "201": { "description": "取引先の作成に成功しました。作成された取引先が返ります。", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/partnerResponse" } } } }, "400": { "description": "バリデーションエラー。取引先名の重複、code の指定漏れ・重複、期日設定の値不正などを確認してください。", "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/partners/{id}": { "get": { "tags": [ "Partners" ], "summary": "取引先の取得", "description": "\n

概要

\n\n

指定した事業所の取引先 1 件を ID を指定して取得します。取引先の詳細確認や、更新前の現在値取得に利用します。

\n\n

注意点

\n", "operationId": "get_partner", "parameters": [ { "name": "id", "in": "path", "description": "取引先ID。取得対象の取引先を指定します。", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1, "example": 1 } }, { "name": "company_id", "in": "query", "description": "事業所ID。取引先が属する事業所を指定します。", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1, "example": 1 } } ], "responses": { "200": { "description": "取引先の取得に成功しました。", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/partnerResponse" } } } }, "400": { "description": "リクエストパラメータが不正です。company_id や id を確認してください。", "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": "指定した取引先が存在しません。既に削除されているか、事業所内に存在しない ID が指定された可能性があります。", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/badRequestNotFoundError" } } } }, "500": { "description": "サーバ内部エラー。時間を空けて再試行してください。", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/internalServerError" } } } } } }, "put": { "tags": [ "Partners" ], "summary": "取引先の更新", "description": "\n

概要

\n\n

指定した取引先の情報を更新します。id で更新対象を特定します。取引先コード(code)をキーに更新したい場合は PUT /api/1/partners/code/{code} を利用してください。

\n\n

注意点

\n", "operationId": "update_partner", "parameters": [ { "name": "id", "in": "path", "description": "取引先ID。更新対象の取引先を指定します。", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1, "example": 1 } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/partnerUpdateParams" } }, "application/x-www-form-urlencoded": { "schema": { "$ref": "#/components/schemas/partnerUpdateParams" } } }, "required": true }, "responses": { "200": { "description": "取引先の更新に成功しました。更新後の取引先が返ります。", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/partnerResponse" } } } }, "400": { "description": "バリデーションエラー。取引先名の重複、code の指定不可、期日設定の値不正、アーカイブ済み取引先への操作などを確認してください。", "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": "指定した取引先が存在しません。既に削除されているか、事業所内に存在しない ID が指定された可能性があります。", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/badRequestNotFoundError" } } } }, "500": { "description": "サーバ内部エラー。時間を空けて再試行してください。", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/internalServerError" } } } } } }, "delete": { "tags": [ "Partners" ], "summary": "取引先の削除", "description": "\n

概要

\n\n

指定した事業所の取引先を削除します。取引で参照されている取引先は削除できないため、削除に失敗した場合は該当取引先の参照を先に解消してください。

\n\n

注意点

\n", "operationId": "destroy_partner", "parameters": [ { "name": "id", "in": "path", "description": "取引先ID。削除対象の取引先を指定します。", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1, "example": 1 } }, { "name": "company_id", "in": "query", "description": "事業所ID。取引先が属する事業所を指定します。", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1, "example": 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": "指定した取引先が存在しません。既に削除されているか、事業所内に存在しない ID が指定された可能性があります。", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/badRequestNotFoundError" } } } }, "500": { "description": "サーバ内部エラー。時間を空けて再試行してください。", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/internalServerError" } } } } } } }, "/api/1/partners/code/{code}": { "put": { "tags": [ "Partners" ], "summary": "取引先コードでの取引先の更新", "description": "\n

概要

\n\n

取引先コード(code)をキーに、指定した取引先の情報を更新します。取引先 ID を持たず取引先コードで運用しているシステムからの更新用途を想定しています。

\n\n

注意点

\n", "operationId": "update_partner_by_code", "parameters": [ { "name": "code", "in": "path", "description": "取引先コード。更新対象の取引先を特定するキー。日本語・記号を含む場合は URL エンコードして指定してください。", "required": true, "schema": { "type": "string", "example": "code001" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/partnerUpdateParams" } }, "application/x-www-form-urlencoded": { "schema": { "$ref": "#/components/schemas/partnerUpdateParams" } } }, "required": true }, "responses": { "200": { "description": "取引先の更新に成功しました。更新後の取引先が返ります。", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/partnerResponse" } } } }, "400": { "description": "バリデーションエラー。取引先コードの利用が無効、id 指定不可、取引先名の重複、期日設定の値不正などを確認してください。", "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": "指定した取引先コードに該当する取引先が存在しません。存在しない場合に作成もしたい場合は PUT /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

概要

\n\n

取引先コード(code)をキーに、指定した取引先の情報を更新します。該当する取引先が存在しない場合は新規作成します(upsert)。同期処理を伴う外部システムとの連携で、取引先マスタを一括で登録・更新する用途を想定しています。

\n\n

注意点

\n", "operationId": "api/v1/partners#upsert_by_code", "requestBody": { "content": { "application/json": { "schema": { "required": [ "code", "company_id", "partner" ], "type": "object", "description": "取引先 upsert のリクエストパラメータ。PUT /api/1/partners/upsert_by_code のリクエストボディ。code をキーに既存レコードを更新し、存在しない場合は新規作成します。partner オブジェクト内で code を指定することはできず、URL 直下の code のみが有効です。", "properties": { "code": { "type": "string", "maxLength": 255, "description": "取引先コード。upsert のキーになります。事業所内で重複不可。事業所設定で「取引先コードの利用」が有効になっている必要があります。", "example": "code001" }, "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID。upsert 先の事業所を指定します。", "example": 1 }, "partner": { "type": "object", "required": [ "name" ], "description": "取引先の属性。更新経路では PATCH 相当の挙動で、指定した属性のみ既存値を上書きします(payment_term_attributes / invoice_payment_term_attributes のみ null 指定で未設定に戻せます)。作成経路(該当 code が存在しない場合)では、name 以外の属性は省略時にデフォルト値になります。", "properties": { "name": { "type": "string", "maxLength": 255, "description": "取引先名 (255 文字以内、事業所内で重複不可)。", "example": "新しい取引先" }, "available": { "type": "boolean", "description": "使用可能フラグ。更新経路でのみ有効。\n\n", "example": false }, "shortcut1": { "type": "string", "maxLength": 255, "description": "ショートカット1 (255 文字以内)。取引先検索用の任意キーワード。", "example": "NEWPARTNER" }, "shortcut2": { "type": "string", "maxLength": 255, "description": "ショートカット2 (255 文字以内)。shortcut1 と併用可能な補助キーワード。", "example": "502" }, "org_code": { "type": "integer", "format": "int64", "description": "事業所種別。null を指定すると未設定になります。\n\n", "example": 1, "enum": [ 1, 2 ], "nullable": true }, "country_code": { "type": "string", "description": "地域。指定しない場合は JP になります。\n\n", "example": "JP", "enum": [ "JP", "ZZ" ] }, "long_name": { "type": "string", "maxLength": 255, "description": "正式名称(255 文字以内)。取引先の正式な法人・屋号名称。", "example": "株式会社ABC商店" }, "name_kana": { "type": "string", "maxLength": 255, "description": "カナ名称(255 文字以内)。取引先名の全角カナ表記。", "example": "エービーシーショウテン" }, "default_title": { "type": "string", "description": "敬称。御中、様、(空白) の 3 つから選択します。", "example": "御中" }, "phone": { "type": "string", "description": "電話番号。フォーマット制約はありません。", "example": "03-1234-5678" }, "contact_name": { "type": "string", "maxLength": 255, "description": "担当者 氏名 (255 文字以内)。", "example": "freee太郎" }, "email": { "type": "string", "maxLength": 255, "description": "担当者 メールアドレス (255 文字以内)。", "example": "contact@example.com" }, "payer_walletable_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "振込元口座ID(一括振込ファイル用)。walletable の type が 'bank_account' の口座 ID のみ指定できます。未設定にする場合は null。法人スタータープラン(および旧法人プロフェッショナルプラン)以上でのみ設定可能。", "example": 1, "nullable": true }, "transfer_fee_handling_side": { "type": "string", "description": "振込手数料負担(一括振込ファイル用)。指定しない場合は payer になります。法人スタータープラン(および旧法人プロフェッショナルプラン)以上でのみ設定可能。\n\n", "example": "payer", "enum": [ "payer", "payee" ] }, "qualified_invoice_issuer": { "type": "boolean", "description": "インボイス制度適格請求書発行事業者フラグ。\n\n国税庁インボイス制度適格請求書発行事業者公表サイト\n", "example": false }, "invoice_registration_number": { "type": "string", "maxLength": 14, "minLength": 13, "pattern": "^T?[1-9][0-9]{12}$", "description": "インボイス制度適格請求書発行事業者登録番号。先頭 T + 数字 13 桁の固定 14 文字(先頭 T なしの数字 13 桁も許容)。\n国税庁インボイス制度適格請求書発行事業者公表サイト\n", "example": "T1000000000001", "nullable": true }, "address_attributes": { "type": "object", "description": "住所情報。更新経路では指定した属性のみ上書きし、省略した属性は既存値を維持します。", "properties": { "zipcode": { "type": "string", "maxLength": 8, "description": "郵便番号(ハイフン含む可、8 文字以内)。", "example": "000-0000" }, "prefecture_code": { "type": "integer", "format": "int64", "minimum": -1, "maximum": 46, "description": "都道府県コード(-1: 設定しない、0: 北海道、1:青森、2:岩手、3:宮城、4:秋田、5:山形、6:福島、7:茨城、8:栃木、9:群馬、10:埼玉、11:千葉、12:東京、13:神奈川、14:新潟、15:富山、16:石川、17:福井、18:山梨、19:長野、20:岐阜、21:静岡、22:愛知、23:三重、24:滋賀、25:京都、26:大阪、27:兵庫、28:奈良、29:和歌山、30:鳥取、31:島根、32:岡山、33:広島、34:山口、35:徳島、36:香川、37:愛媛、38:高知、39:福岡、40:佐賀、41:長崎、42:熊本、43:大分、44:宮崎、45:鹿児島、46:沖縄)", "example": 4 }, "street_name1": { "type": "string", "maxLength": 255, "description": "市区町村・番地(255 文字以内)。", "example": "千代田区丸の内1-1-1" }, "street_name2": { "type": "string", "maxLength": 255, "description": "建物名・部屋番号など(255 文字以内)。", "example": "freeeビル 10F" } } }, "partner_doc_setting_attributes": { "type": "object", "description": "請求書送付方法の設定。", "properties": { "sending_method": { "type": "string", "description": "請求書送付方法。null を指定すると未設定になります。\n\n", "example": "posting", "enum": [ "email", "posting", "email_and_posting", "pdf_delivery", "pdf_delivery_and_posting" ], "nullable": true } } }, "partner_bank_account_attributes": { "type": "object", "description": "銀行口座情報(この取引先の受取口座)。更新経路では指定した属性のみ上書きし、省略した属性は既存値を維持します。account_type に空文字を指定した場合は ordinary で置き換わる点に注意してください。", "properties": { "bank_name": { "type": "string", "description": "銀行名。", "example": "freee銀行" }, "bank_name_kana": { "type": "string", "description": "銀行名(カナ)。", "example": "フリーギンコウ" }, "bank_code": { "type": "string", "description": "銀行コード(4 桁の統一金融機関コード)。", "example": "0001" }, "branch_name": { "type": "string", "description": "支店名。", "example": "銀座支店" }, "branch_kana": { "type": "string", "description": "支店名(カナ)。", "example": "ギンザシテン" }, "branch_code": { "type": "string", "description": "支店番号(3 桁)。", "example": "101" }, "account_type": { "type": "string", "description": "口座種別。指定しない場合は ordinary になります(更新経路では既存値を維持、空文字は ordinary で置き換わり)。\n\n", "example": "ordinary", "enum": [ "ordinary", "checking", "earmarked", "savings", "other" ] }, "account_number": { "type": "string", "description": "口座番号。", "example": "1010101" }, "long_account_name": { "type": "string", "description": "受取人名。", "example": "freee太郎" }, "account_name": { "type": "string", "description": "受取人名(カナ)。全銀フォーマットで送信する際に使用されます。", "example": "フリータロウ" } } }, "payment_term_attributes": { "type": "object", "description": "支払期日設定。更新経路では null を指定すると期日設定を未設定に戻せます。法人スタータープラン(および旧法人プロフェッショナルプラン)以上でのみ設定可能。cutoff_day / additional_months / fixed_day はまとめて指定する必要があります。", "properties": { "cutoff_day": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 32, "description": "締め日。1〜31 の日付を指定します。29, 30, 31 日の末日を指定する場合は 32 を指定してください。", "example": 15 }, "additional_months": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 6, "description": "支払月。締め日から数えて何ヶ月後に支払うか。当月を指定する場合は 0 を指定してください。", "example": 1 }, "fixed_day": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 32, "description": "支払日。1〜31 の日付を指定します。29, 30, 31 日の末日を指定する場合は 32 を指定してください。", "example": 32 } }, "nullable": true }, "invoice_payment_term_attributes": { "type": "object", "description": "請求の入金期日設定。更新経路では null を指定すると期日設定を未設定に戻せます。法人スタータープラン(および旧法人プロフェッショナルプラン)以上でのみ設定可能。cutoff_day / additional_months / fixed_day はまとめて指定する必要があります。", "properties": { "cutoff_day": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 32, "description": "締め日。1〜31 の日付を指定します。29, 30, 31 日の末日を指定する場合は 32 を指定してください。", "example": 15 }, "additional_months": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 6, "description": "入金月。締め日から数えて何ヶ月後に入金されるか。当月を指定する場合は 0 を指定してください。", "example": 1 }, "fixed_day": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 32, "description": "入金日。1〜31 の日付を指定します。29, 30, 31 日の末日を指定する場合は 32 を指定してください。", "example": 32 } }, "nullable": true } } } } } }, "application/x-www-form-urlencoded": { "schema": { "$ref": "#/paths/~1api~11~1partners~1upsert_by_code/put/requestBody/content/application~1json/schema" } } }, "required": true }, "responses": { "200": { "description": "既存の取引先を更新しました。更新後の取引先が返ります。", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/partnerResponse" } } } }, "201": { "description": "該当する取引先コードが存在しなかったため、新規作成しました。作成された取引先が返ります。", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/partnerResponse" } } } }, "400": { "description": "バリデーションエラー。取引先コードの利用が無効、partner 内での code 指定、取引先名の重複、期日設定の値不正などを確認してください。", "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": "更新経路でリソース解決に失敗した場合に返る可能性があります。通常は 200 / 201 のいずれかが返ります。", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/badRequestNotFoundError" } } } }, "500": { "description": "サーバ内部エラー。時間を空けて再試行してください。", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/internalServerError" } } } } } } }, "/api/1/forms/selectables": { "get": { "tags": [ "Selectables" ], "summary": "フォーム用選択項目情報の取得", "description": "\n

概要

\n\n

指定した事業所で勘定科目の入力フォームを構築するための、勘定科目カテゴリー、勘定科目、デフォルト税区分、決算書表示名を取得します。

\n\n

注意点

\n\n", "operationId": "get_forms_selectables", "parameters": [ { "name": "company_id", "in": "query", "description": "事業所ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 }, "example": 1 }, { "name": "includes", "in": "query", "description": "取得する選択項目\n* `account_item` - 勘定科目カテゴリー、勘定科目、デフォルト税区分、決算書表示名", "schema": { "type": "string", "enum": [ "account_item" ] }, "example": "account_item" } ], "responses": { "200": { "description": "フォーム用選択項目情報の取得に成功", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/selectablesIndexResponse" } } } }, "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/{id}": { "get": { "tags": [ "Account items" ], "summary": "勘定科目の取得", "description": "\n

概要

\n\n

指定した勘定科目を取得する

\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\n

指定した勘定科目を更新する

\n\n

注意点

\n

tax_codeは、指定した事業所の税区分一覧の取得APIでavailableの値がtrue、かつ経過措置税区分ではない5%の税区分を確認して、そのcodeを指定して勘定科目の更新をしてください。例 課対仕入の場合、34を指定してください

\n

codeを利用するには、事業所の設定で勘定科目コードを使用する設定にする必要があります。

", "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

指定した勘定科目を削除する

\n

注意点

\n", "operationId": "destroy_account_item", "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" } } } }, "500": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/internalServerError" } } } } } } }, "/api/1/account_items": { "get": { "tags": [ "Account items" ], "summary": "勘定科目一覧の取得", "description": "\n

概要

\n\n

指定した事業所の勘定科目一覧を取得する

\n\n

定義

\n\n\n\n

注意点

\n

default_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", "example": "売上", "schema": { "type": "string", "maxLength": 255 } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/accountItemsResponse" } } } }, "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": [ "Account items" ], "summary": "勘定科目の作成", "description": "\n

概要

\n\n

指定した事業所の勘定科目を作成する

\n\n

注意点

\n

tax_codeは、指定した事業所の税区分一覧の取得APIでavailableの値がtrue、かつ経過措置税区分ではない5%の税区分を確認して、そのcodeを指定して勘定科目の作成をしてください。例 課対仕入の場合、34を指定してください

\n

codeを利用するには、事業所の設定で勘定科目コードを使用する設定にする必要があります。

", "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\n

勘定科目コードをキーに、指定した勘定科目の情報を更新(存在しない場合は作成)する

\n

リクエストのトップレベルのcodeに指定した勘定科目コードに一致する勘定科目が存在する場合は更新(ステータスコード200)、存在しない場合は作成(ステータスコード201)します

\n\n

注意点

\n

本APIを利用するには、事業所の設定で勘定科目コードを使用する設定にする必要があります。設定が無効の場合はエラー(ステータスコード400)になります。

\n

更新対象を特定する勘定科目コードはトップレベルのcodeで指定してください。account_item.codeは指定できません(指定した場合はエラーになります)。

\n

tax_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\n

指定した事業所に登録されているメモタグの一覧を取得します。取引や口座振替の明細に付与するメモタグを確認する用途を想定しています。

\n\n

注意点

\n", "operationId": "get_tags", "parameters": [ { "name": "company_id", "in": "query", "description": "事業所ID。取得対象の事業所を指定します。", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1, "example": 1 } }, { "name": "start_update_date", "in": "query", "description": "更新日で絞り込む開始日 (yyyy-mm-dd, JST)。指定日を含む、それ以降に更新されたメモタグを対象にします。", "schema": { "type": "string", "example": "2024-01-01" } }, { "name": "end_update_date", "in": "query", "description": "更新日で絞り込む終了日 (yyyy-mm-dd, JST)。指定日を含む、それ以前に更新されたメモタグを対象にします。", "schema": { "type": "string", "example": "2024-01-31" } }, { "name": "offset", "in": "query", "description": "取得レコードのオフセット (デフォルト: 0)。ページング用に、スキップする件数を指定します。", "schema": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647, "example": 0 } }, { "name": "limit", "in": "query", "description": "取得レコードの件数 (デフォルト: 50, 最小: 1, 最大: 3000)。1 回のリクエストで取得する上限件数を指定します。", "schema": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 3000, "example": 50 } } ], "responses": { "200": { "description": "メモタグ一覧の取得に成功しました。", "content": { "application/json": { "schema": { "type": "object", "required": [ "tags" ], "properties": { "tags": { "type": "array", "description": "メモタグの一覧", "items": { "$ref": "#/components/schemas/tag" } } } } } } }, "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": [ "Tags" ], "summary": "メモタグの作成", "description": "\n

概要

\n\n

指定した事業所に新しいメモタグを作成します。作成したメモタグは取引や口座振替の明細に付与できます。

\n\n

注意点

\n", "operationId": "create_tag", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/tagParams" } }, "application/x-www-form-urlencoded": { "schema": { "$ref": "#/components/schemas/tagParams" } } }, "required": true }, "responses": { "201": { "description": "メモタグの作成に成功しました。作成されたメモタグを返します。", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/tagResponse" } } } }, "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/tags/{id}": { "get": { "tags": [ "Tags" ], "summary": "メモタグの取得", "description": "\n

概要

\n\n

指定した事業所のメモタグを 1 件取得します。メモタグID(id)はメモタグ一覧の取得 API で確認できます。

\n\n

注意点

\n", "operationId": "get_tag", "parameters": [ { "name": "id", "in": "path", "description": "メモタグID。メモタグ一覧の取得 API のレスポンスに含まれる id を指定します。", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1, "example": 101 } }, { "name": "company_id", "in": "query", "description": "事業所ID。取得対象の事業所を指定します。", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1, "example": 1 } } ], "responses": { "200": { "description": "メモタグの取得に成功しました。", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/tagResponse" } } } }, "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": "指定したメモタグIDに該当するメモタグが存在しないか、既に削除されています。", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/badRequestNotFoundError" } } } }, "500": { "description": "サーバ内部エラー。時間を空けて再試行してください。", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/internalServerError" } } } } } }, "put": { "tags": [ "Tags" ], "summary": "メモタグの更新", "description": "\n

概要

\n\n

指定した事業所のメモタグを更新します。

\n\n

注意点

\n", "operationId": "update_tag", "parameters": [ { "name": "id", "in": "path", "description": "メモタグID。メモタグ一覧の取得 API のレスポンスに含まれる id を指定します。", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1, "example": 101 } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/tagParams" } }, "application/x-www-form-urlencoded": { "schema": { "$ref": "#/components/schemas/tagParams" } } }, "required": false }, "responses": { "200": { "description": "メモタグの更新に成功しました。更新後のメモタグを返します。", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/tagResponse" } } } }, "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": "指定したメモタグIDに該当するメモタグが存在しないか、既に削除されています。", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/badRequestNotFoundError" } } } }, "500": { "description": "サーバ内部エラー。時間を空けて再試行してください。", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/internalServerError" } } } } } }, "delete": { "tags": [ "Tags" ], "summary": "メモタグの削除", "description": "\n

概要

\n\n

指定した事業所のメモタグを削除します。

\n\n

注意点

\n", "operationId": "destroy_tag", "parameters": [ { "name": "id", "in": "path", "description": "メモタグID。メモタグ一覧の取得 API のレスポンスに含まれる id を指定します。", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1, "example": 101 } }, { "name": "company_id", "in": "query", "description": "事業所ID。削除対象のメモタグが属する事業所を指定します。", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1, "example": 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": "指定したメモタグIDに該当するメモタグが存在しないか、既に削除されています。", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/badRequestNotFoundError" } } } }, "500": { "description": "サーバ内部エラー。時間を空けて再試行してください。", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/internalServerError" } } } } } } }, "/api/1/sections": { "get": { "tags": [ "Sections" ], "summary": "部門一覧の取得", "description": "\n

概要

\n\n

指定した事業所に登録されている部門の一覧を取得します。取引や振替伝票の明細に付与する部門マスタを参照する用途を想定しています。

\n\n

注意点

\n", "operationId": "get_sections", "parameters": [ { "name": "company_id", "in": "query", "description": "事業所ID。取得対象の事業所を指定します。", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1, "example": 1 } }, { "name": "start_update_date", "in": "query", "description": "更新日で絞り込む開始日 (yyyy-mm-dd, JST)。指定日を含む、それ以降に更新された部門を対象にします。", "schema": { "type": "string", "example": "2024-01-01" } }, { "name": "end_update_date", "in": "query", "description": "更新日で絞り込む終了日 (yyyy-mm-dd, JST)。指定日を含む、それ以前に更新された部門を対象にします。", "schema": { "type": "string", "example": "2024-01-31" } } ], "responses": { "200": { "description": "部門一覧の取得に成功しました。", "content": { "application/json": { "schema": { "type": "object", "required": [ "sections" ], "properties": { "sections": { "type": "array", "description": "部門の一覧", "items": { "$ref": "#/components/schemas/section" } } } } } } }, "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": [ "Sections" ], "summary": "部門の作成", "description": "\n

概要

\n\n

指定した事業所に新しい部門を作成します。作成された部門は使用設定(available)が true の状態で登録され、取引作成時などに指定できるようになります。

\n\n

注意点

\n", "operationId": "create_section", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/sectionParams" } }, "application/x-www-form-urlencoded": { "schema": { "$ref": "#/components/schemas/sectionParams" } } }, "required": false }, "responses": { "201": { "description": "部門の作成に成功しました。作成された部門を返します。", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/sectionResponse" } } } }, "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": "指定した親部門が存在しないか、既に削除されています。部門一覧を再取得してIDを確認してください。", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/badRequestNotFoundError" } } } }, "500": { "description": "サーバ内部エラー。時間を空けて再試行してください。", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/internalServerError" } } } } } } }, "/api/1/sections/{id}": { "get": { "tags": [ "Sections" ], "summary": "部門の取得", "description": "\n

概要

\n\n

指定した事業所の部門を 1 件取得します。部門ID(id)は部門一覧の取得APIで確認できます。

\n\n

注意点

\n", "operationId": "get_section", "parameters": [ { "name": "id", "in": "path", "description": "部門ID。部門一覧の取得APIのレスポンスに含まれる id を指定します。", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1, "example": 101 } }, { "name": "company_id", "in": "query", "description": "事業所ID。取得対象の事業所を指定します。", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1, "example": 1 } } ], "responses": { "200": { "description": "部門の取得に成功しました。", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/sectionResponse" } } } }, "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": "指定した部門が存在しないか、既に削除されています。部門一覧を再取得してIDを確認してください。", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/badRequestNotFoundError" } } } }, "500": { "description": "サーバ内部エラー。時間を空けて再試行してください。", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/internalServerError" } } } } } }, "put": { "tags": [ "Sections" ], "summary": "部門の更新", "description": "\n

概要

\n\n

指定した事業所の部門を更新します。このAPIは部門の作成は行いません。部門コードをキーに更新(存在しない場合は作成)したい場合は PUT /api/1/sections/code/upsert を利用してください。

\n\n

注意点

\n", "operationId": "update_section", "parameters": [ { "name": "id", "in": "path", "description": "部門ID。部門一覧の取得APIのレスポンスに含まれる id を指定します。", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1, "example": 101 } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/sectionParams" } }, "application/x-www-form-urlencoded": { "schema": { "$ref": "#/components/schemas/sectionParams" } } }, "required": false }, "responses": { "200": { "description": "部門の更新に成功しました。更新後の部門を返します。", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/sectionResponse" } } } }, "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": "指定した部門が存在しないか、既に削除されています。部門一覧を再取得してIDを確認してください。\nparent_id で指定した親部門が存在しないか、既に削除されている場合もこのエラーになります。", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/badRequestNotFoundError" } } } }, "500": { "description": "サーバ内部エラー。時間を空けて再試行してください。", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/internalServerError" } } } } } }, "delete": { "tags": [ "Sections" ], "summary": "部門の削除", "description": "\n

概要

\n\n

指定した事業所の部門を削除します。

\n\n

注意点

\n", "operationId": "destroy_section", "parameters": [ { "name": "id", "in": "path", "description": "部門ID。部門一覧の取得APIのレスポンスに含まれる id を指定します。", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1, "example": 101 } }, { "name": "company_id", "in": "query", "description": "事業所ID。削除対象の部門が属する事業所を指定します。", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1, "example": 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": "指定した部門が存在しないか、既に削除されています。部門一覧を再取得してIDを確認してください。", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/badRequestNotFoundError" } } } }, "500": { "description": "サーバ内部エラー。時間を空けて再試行してください。", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/internalServerError" } } } } } } }, "/api/1/sections/code/upsert": { "put": { "tags": [ "Sections" ], "summary": "部門の更新(存在しない場合は作成)", "description": "

概要

\n

部門コード(code)をキーに、指定した部門の情報を更新します。該当する部門が存在しない場合は新規作成します(upsert)。外部システムとの連携で、部門マスタを一括で登録・更新する用途を想定しています。

\n\n

注意点

\n", "operationId": "api/v1/sections#upsert_by_code", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "company_id", "code", "section" ], "properties": { "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID。部門を更新・作成する対象の事業所を指定します。", "example": 1 }, "code": { "type": "string", "maxLength": 20, "description": "部門コード (20文字以内、半角英数字・ハイフン・アンダースコアのみ)。更新・作成対象の部門を特定するキーです。このコードを持つ部門が存在する場合は更新し、存在しない場合は新規作成します。", "example": "code001", "pattern": "^[0-9a-zA-Z_-]+$" }, "section": { "type": "object", "description": "部門に設定する内容。code(部門コード)はこのオブジェクト内には指定できません(部門コードは変更不可のため、指定すると 400 エラーになります)。", "required": [ "name" ], "properties": { "name": { "type": "string", "maxLength": 30, "description": "部門名 (30文字以内)。事業所内で重複できません。既に同名の部門が存在する場合は 400 エラーになります。", "example": "開発部門" }, "long_name": { "type": "string", "maxLength": 255, "description": "部門の正式名称 (255文字以内)。更新時に省略した場合は現在の値を維持し、null を指定した場合は未設定に更新します。", "example": "開発本部", "nullable": true }, "shortcut1": { "type": "string", "maxLength": 20, "description": "ショートカット1 (20文字以内)。Web画面などで部門を検索する際のキーワードとして使用します。更新時に省略または null を指定した場合は未設定(null)に更新されます。", "example": "DEVELOPER", "nullable": true }, "shortcut2": { "type": "string", "maxLength": 20, "description": "ショートカット2 (20文字以内)。Web画面などで部門を検索する際のキーワードとして使用します。更新時に省略または null を指定した場合は未設定(null)に更新されます。", "example": "123", "nullable": true }, "parent_code": { "type": "string", "maxLength": 20, "description": "親部門コード。部門階層を利用できるプランでのみ反映されます。更新時に省略した場合は現在の親子関係を維持し、null を指定した場合は親部門との関係を解除します。", "example": "parent001", "pattern": "^[0-9a-zA-Z_-]+$", "nullable": true } } } } } }, "application/x-www-form-urlencoded": { "schema": { "$ref": "#/paths/~1api~11~1sections~1code~1upsert/put/requestBody/content/application~1json/schema" } } }, "required": true }, "responses": { "200": { "description": "部門の更新に成功しました。更新後の部門を返します。", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/sectionResponse" } } } }, "201": { "description": "指定した部門コードの部門が存在しなかったため、部門を新規作成しました。作成された部門を返します。", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/sectionResponse" } } } }, "400": { "description": "リクエストパラメータが不正です。部門コードを使用する設定、部門名の重複、文字数制限などを確認してください。\nparent_code で指定した親部門が存在しない場合もこのエラーになります。", "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/invoices": { "get": { "tags": [ "Invoices" ], "summary": "請求書一覧の取得", "description": "\n

概要

\n\n

指定した事業所の請求書一覧を取得する

\n\n

注意点

\n\n\n", "operationId": "get_invoices", "parameters": [ { "name": "company_id", "in": "query", "description": "事業所ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 } }, { "name": "partner_id", "in": "query", "description": "取引先IDで絞込(partner_code と同時に指定することはできません)", "schema": { "type": "integer", "format": "int64", "minimum": 1 } }, { "name": "partner_code", "in": "query", "description": "取引先コードで絞込(事業所で取引先コードの利用設定が有効な場合のみ利用できます。partner_id と同時に指定することはできません)", "schema": { "type": "string" } }, { "name": "start_issue_date", "in": "query", "description": "請求日の開始日(yyyy-mm-dd)", "schema": { "type": "string" } }, { "name": "end_issue_date", "in": "query", "description": "請求日の終了日(yyyy-mm-dd)", "schema": { "type": "string" } }, { "name": "start_due_date", "in": "query", "description": "期日の開始日(yyyy-mm-dd)", "schema": { "type": "string" } }, { "name": "end_due_date", "in": "query", "description": "期日の終了日(yyyy-mm-dd)", "schema": { "type": "string" } }, { "name": "invoice_number", "in": "query", "description": "請求書番号", "schema": { "type": "string" } }, { "name": "description", "in": "query", "description": "概要", "schema": { "type": "string" } }, { "name": "invoice_status", "in": "query", "description": "請求書ステータス (draft: 下書き, applying: 申請中, remanded: 差し戻し, rejected: 却下, approved: 承認済み, unsubmitted: 送付待ち, submitted: 送付済み)", "schema": { "type": "string", "enum": [ "draft", "applying", "remanded", "rejected", "approved", "unsubmitted", "submitted" ] } }, { "name": "payment_status", "in": "query", "description": "入金ステータス (unsettled: 入金待ち, settled: 入金済み)", "schema": { "type": "string", "enum": [ "unsettled", "settled" ] } }, { "name": "offset", "in": "query", "description": "取得レコードのオフセット (デフォルト: 0)", "schema": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 9223372036854775807 } }, { "name": "limit", "in": "query", "description": "取得レコードの件数 (デフォルト: 20, 最大: 100) ", "schema": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 100 } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/invoiceIndexResponse" } } } }, "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/invoices/{id}": { "get": { "tags": [ "Invoices" ], "summary": "請求書の取得", "description": "\n

概要

\n\n

指定した事業所の請求書を取得する

\n\n

注意点

\n\n", "operationId": "get_invoice", "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/invoiceResponse" } } } }, "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/quotations": { "get": { "tags": [ "Quotations" ], "summary": "見積書一覧の取得", "description": "\n

概要

\n\n

指定した事業所の見積書一覧を取得する

\n\n

注意点

\n\n\n", "operationId": "get_quotations", "parameters": [ { "name": "company_id", "in": "query", "description": "事業所ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 } }, { "name": "partner_id", "in": "query", "description": "取引先IDで絞込(partner_code と同時に指定することはできません)", "schema": { "type": "integer", "format": "int64", "minimum": 1 } }, { "name": "partner_code", "in": "query", "description": "取引先コードで絞込(事業所で取引先コードの利用設定が有効な場合のみ利用できます。partner_id と同時に指定することはできません)", "schema": { "type": "string" } }, { "name": "start_issue_date", "in": "query", "description": "見積日の開始日(yyyy-mm-dd)", "schema": { "type": "string" } }, { "name": "end_issue_date", "in": "query", "description": "見積日の終了日(yyyy-mm-dd)", "schema": { "type": "string" } }, { "name": "quotation_number", "in": "query", "description": "見積書番号", "schema": { "type": "string" } }, { "name": "description", "in": "query", "description": "概要", "schema": { "type": "string" } }, { "name": "quotation_status", "in": "query", "description": "見積書ステータス (unsubmitted: 送付待ち, submitted: 送付済み, all: 全て)", "schema": { "type": "string", "enum": [ "all", "unsubmitted", "submitted" ] } }, { "name": "offset", "in": "query", "description": "取得レコードのオフセット (デフォルト: 0)", "schema": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 9223372036854775807 } }, { "name": "limit", "in": "query", "description": "取得レコードの件数 (デフォルト: 20, 最大: 100) ", "schema": { "maximum": 100, "minimum": 1, "type": "integer", "format": "int64" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/quotationIndexResponse" } } } }, "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/quotations/{id}": { "get": { "tags": [ "Quotations" ], "summary": "見積書の取得", "description": "\n

概要

\n\n

指定した事業所の見積書詳細を取得する

\n\n

注意点

\n\n", "operationId": "get_quotation", "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/quotationResponse" } } } }, "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": { "get": { "tags": [ "Deals" ], "summary": "取引(収入・支出)一覧の取得", "description": "

概要

\n

指定した事業所の取引(収入・支出)一覧を取得する

\n

定義

\n\n

注意点

\n", "operationId": "get_deals", "parameters": [ { "name": "company_id", "in": "query", "description": "事業所ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 } }, { "name": "partner_id", "in": "query", "description": "取引先IDで絞込", "schema": { "type": "integer", "format": "int64", "minimum": 1 } }, { "name": "account_item_id", "in": "query", "description": "勘定科目IDで絞込", "schema": { "type": "integer", "format": "int64", "minimum": 1 } }, { "name": "partner_code", "in": "query", "description": "取引先コードで絞込", "schema": { "type": "string" } }, { "name": "status", "in": "query", "description": "決済状況で絞込 (未決済: unsettled, 完了: settled)", "schema": { "type": "string", "enum": [ "unsettled", "settled" ] } }, { "name": "type", "in": "query", "description": "収支区分 (収入: income, 支出: expense)", "schema": { "type": "string", "enum": [ "income", "expense" ] } }, { "name": "start_issue_date", "in": "query", "description": "発生日で絞込:開始日(yyyy-mm-dd)", "schema": { "type": "string" } }, { "name": "end_issue_date", "in": "query", "description": "発生日で絞込:終了日(yyyy-mm-dd)", "schema": { "type": "string" } }, { "name": "start_due_date", "in": "query", "description": "支払期日で絞込:開始日(yyyy-mm-dd)", "schema": { "type": "string" } }, { "name": "end_due_date", "in": "query", "description": "支払期日で絞込:終了日(yyyy-mm-dd)", "schema": { "type": "string" } }, { "name": "start_renew_date", "in": "query", "description": "+更新日で絞込:開始日(yyyy-mm-dd)", "schema": { "type": "string" } }, { "name": "end_renew_date", "in": "query", "description": "+更新日で絞込:終了日(yyyy-mm-dd)", "schema": { "type": "string" } }, { "name": "offset", "in": "query", "description": "取得レコードのオフセット (デフォルト: 0)", "schema": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 9223372036854775807 } }, { "name": "limit", "in": "query", "description": "取得レコードの件数 (デフォルト: 20, 最大: 100) ", "schema": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 100 } }, { "name": "accruals", "in": "query", "description": "取引の債権債務行の表示(without: 表示しない(デフォルト), with: 表示する)。withを指定した場合、債権債務行が存在する取引のレスポンスにaccrualsが含まれます。", "schema": { "type": "string", "enum": [ "without", "with" ] } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "deals", "meta" ], "properties": { "deals": { "type": "array", "items": { "$ref": "#/components/schemas/deal" } }, "meta": { "type": "object", "required": [ "total_count" ], "properties": { "total_count": { "type": "integer", "format": "int64", "minimum": 0, "description": "検索条件に合致する取引の総数", "example": 100 } } } } } } } }, "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" } } } } } }, "post": { "tags": [ "Deals" ], "summary": "取引(収入・支出)の作成", "description": "

概要

\n

指定した事業所の取引(収入・支出)を作成する

\n

定義

\n\n

注意点

\n\n", "operationId": "create_deal", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/dealCreateParams" } }, "application/x-www-form-urlencoded": { "schema": { "$ref": "#/components/schemas/dealCreateParams" } } }, "required": false }, "responses": { "201": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/dealCreateResponse" } } } }, "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}": { "get": { "tags": [ "Deals" ], "summary": "取引(収入・支出)の取得", "description": "

概要

\n

指定した事業所の取引(収入・支出)を取得する

\n

定義

\n\n

注意点

\n", "operationId": "get_deal", "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 } }, { "name": "accruals", "in": "query", "description": "取引の債権債務行の表示(without: 表示しない(デフォルト), with: 表示する)。withを指定した場合、債権債務行が存在する取引のレスポンスにaccrualsが含まれます。", "schema": { "type": "string", "enum": [ "without", "with" ] } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/dealResponse" } } } }, "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": [ "Deals" ], "summary": "取引(収入・支出)の更新", "description": "

概要

\n

指定した事業所の取引(収入・支出)を更新する

\n

定義

\n\n

注意点

\n", "operationId": "update_deal", "parameters": [ { "name": "id", "in": "path", "description": "取引ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/dealUpdateParams" } }, "application/x-www-form-urlencoded": { "schema": { "$ref": "#/components/schemas/dealUpdateParams" } } }, "required": false }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/dealResponse" } } } }, "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": [ "Deals" ], "summary": "取引(収入・支出)の削除", "description": "

概要

\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": "

概要

\n

指定した事業所の取引(収入・支出)の+更新を作成する

\n

定義

\n\n

注意点

\n\n", "operationId": "create_deal_renew", "parameters": [ { "name": "id", "in": "path", "description": "取引ID", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/renewCreateParams" } }, "application/x-www-form-urlencoded": { "schema": { "$ref": "#/components/schemas/renewCreateParams" } } }, "required": true }, "responses": { "201": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/dealResponse" } } } }, "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/{renew_id}": { "put": { "tags": [ "Renews" ], "summary": "取引(収入・支出)の+更新の更新", "description": "

概要

\n

指定した事業所の取引(収入・支出)の+更新を更新する

\n

定義

\n\n

注意点

\n\n", "operationId": "update_deal_renew", "parameters": [ { "name": "id", "in": "path", "description": "取引ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 } }, { "name": "renew_id", "in": "path", "description": "+更新ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/renewUpdateParams" } }, "application/x-www-form-urlencoded": { "schema": { "$ref": "#/components/schemas/renewUpdateParams" } } }, "required": true }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/dealResponse" } } } }, "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": [ "Renews" ], "summary": "取引(収入・支出)の+更新の削除", "description": "

概要

\n

指定した事業所の取引(収入・支出)の+更新を削除する

\n

注意点

\n\n", "operationId": "delete_deal_renew", "parameters": [ { "name": "id", "in": "path", "description": "取引ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 } }, { "name": "renew_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", "minimum": 1, "format": "int64" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/dealResponse" } } } }, "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}/payments": { "post": { "tags": [ "Payments" ], "summary": "取引(収入・支出)の支払行の作成", "description": "

概要

\n

指定した事業所の取引(収入・支出)の支払行を作成する

\n

定義

\n", "operationId": "create_deal_payment", "parameters": [ { "name": "id", "in": "path", "description": "取引ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/paymentParams" } }, "application/x-www-form-urlencoded": { "schema": { "$ref": "#/components/schemas/paymentParams" } } }, "required": true }, "responses": { "201": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/dealResponse" } } } }, "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}/payments/{payment_id}": { "put": { "tags": [ "Payments" ], "summary": "取引(収入・支出)の支払行の更新", "description": "

概要

\n

指定した事業所の取引(収入・支出)の支払行を更新する

\n

定義

\n", "operationId": "update_deal_payment", "parameters": [ { "name": "id", "in": "path", "description": "取引ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 } }, { "name": "payment_id", "in": "path", "description": "支払行ID(取引のレスポンスのpayments配列のid)", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/paymentParams" } }, "application/x-www-form-urlencoded": { "schema": { "$ref": "#/components/schemas/paymentParams" } } }, "required": true }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/dealResponse" } } } }, "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": [ "Payments" ], "summary": "取引(収入・支出)の支払行の削除", "description": "

概要

\n

指定した事業所の取引(収入・支出)の支払行を削除する

\n

定義

\n", "operationId": "destroy_deal_payment", "parameters": [ { "name": "id", "in": "path", "description": "取引ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 } }, { "name": "payment_id", "in": "path", "description": "支払行ID(取引のレスポンスのpayments配列の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/manual_journals": { "get": { "tags": [ "ManualJournals" ], "summary": "振替伝票一覧の取得", "description": "\n

概要

\n

指定した事業所の振替伝票を、発生日・勘定科目・金額・取引先などの条件で絞り込んで取得します。

\n\n

注意点

\n", "operationId": "get_manual_journals", "parameters": [ { "name": "company_id", "in": "query", "description": "事業所ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 }, "example": 1 }, { "name": "start_issue_date", "in": "query", "description": "発生日で絞込:開始日(yyyy-mm-dd)", "schema": { "type": "string" }, "example": "2019-12-01" }, { "name": "end_issue_date", "in": "query", "description": "発生日で絞込:終了日(yyyy-mm-dd)", "schema": { "type": "string" }, "example": "2019-12-31" }, { "name": "entry_side", "in": "query", "description": "貸借区分で絞込(credit: 貸方、debit: 借方)", "schema": { "type": "string", "enum": [ "credit", "debit" ] }, "example": "debit" }, { "name": "account_item_id", "in": "query", "description": "勘定科目IDで絞込", "schema": { "type": "integer", "format": "int64", "minimum": 1 }, "example": 1 }, { "name": "min_amount", "in": "query", "description": "取引金額(税込・円)の下限で絞込", "schema": { "type": "integer", "format": "int64", "minimum": -9223372036854775808, "maximum": 9223372036854775807 }, "example": 1000 }, { "name": "max_amount", "in": "query", "description": "取引金額(税込・円)の上限で絞込", "schema": { "type": "integer", "format": "int64", "minimum": -9223372036854775808, "maximum": 9223372036854775807 }, "example": 100000 }, { "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": "segment_1_tag_id", "in": "query", "description": "セグメント1タグIDで絞込(0を指定すると、セグメント1タグが未選択の貸借行を絞り込めます)", "schema": { "type": "integer", "format": "int64", "minimum": 0 }, "example": 1 }, { "name": "segment_2_tag_id", "in": "query", "description": "セグメント2タグIDで絞込(0を指定すると、セグメント2タグが未選択の貸借行を絞り込めます)", "schema": { "type": "integer", "format": "int64", "minimum": 0 }, "example": 1 }, { "name": "segment_3_tag_id", "in": "query", "description": "セグメント3タグIDで絞込(0を指定すると、セグメント3タグが未選択の貸借行を絞り込めます)", "schema": { "type": "integer", "format": "int64", "minimum": 0 }, "example": 1 }, { "name": "comment_status", "in": "query", "description": "コメント状態で絞込\n* `posted_with_mention` - 自分宛のコメントあり\n* `raised_with_mention` - 自分宛の未解決コメントあり\n* `resolved_with_mention` - 自分宛の解決済みコメントあり\n* `posted` - コメントあり\n* `raised` - 未解決コメントあり\n* `resolved` - 解決済みコメントあり\n* `none` - コメントなし", "schema": { "type": "string", "enum": [ "posted_with_mention", "raised_with_mention", "resolved_with_mention", "posted", "raised", "resolved", "none" ] }, "example": "posted" }, { "name": "comment_important", "in": "query", "description": "お気に入りコメント付きの振替伝票を絞込", "schema": { "type": "boolean" }, "example": true }, { "name": "adjustment", "in": "query", "description": "決算整理仕訳で絞込(only: 決算整理仕訳のみ、without: 日常仕訳のみ)", "schema": { "type": "string", "enum": [ "only", "without" ] }, "example": "only" }, { "name": "txn_number", "in": "query", "description": "仕訳番号で絞込(事業所の仕訳番号形式が有効な場合のみ)", "schema": { "type": "string" }, "example": "2CX05" }, { "name": "ref_number", "in": "query", "description": "管理番号で絞込(前方一致)", "schema": { "type": "string" }, "example": "123-456" }, { "name": "offset", "in": "query", "description": "取得レコードのオフセット (デフォルト: 0)", "schema": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 9223372036854775807 }, "example": 0 }, { "name": "limit", "in": "query", "description": "取得レコードの件数 (デフォルト: 20, 最小: 1, 最大: 500) ", "schema": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 500 }, "example": 20 } ], "responses": { "200": { "description": "振替伝票の一覧", "content": { "application/json": { "schema": { "type": "object", "required": [ "manual_journals" ], "properties": { "manual_journals": { "type": "array", "items": { "$ref": "#/components/schemas/manual_journal" } } } } } } }, "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": [ "ManualJournals" ], "summary": "振替伝票の作成", "description": "\n

概要

\n

指定した事業所に、貸借が一致する振替伝票を作成します。各貸借行の金額は税込・円で指定します。

\n\n

注意点

\n\n\n", "operationId": "create_manual_journal", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/manualJournalCreateParams" } }, "application/x-www-form-urlencoded": { "schema": { "$ref": "#/components/schemas/manualJournalCreateParams" } } }, "required": false }, "responses": { "201": { "description": "作成した振替伝票", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/manualJournalResponse" } } } }, "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/manual_journals/{id}": { "get": { "tags": [ "ManualJournals" ], "summary": "振替伝票の取得", "description": "\n

概要

\n

指定した事業所と振替伝票IDに一致する振替伝票を取得します。

\n\n

注意点

\n", "operationId": "get_manual_journal", "parameters": [ { "name": "company_id", "in": "query", "description": "事業所ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 }, "example": 1 }, { "name": "id", "in": "path", "description": "振替伝票ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 }, "example": 1 } ], "responses": { "200": { "description": "指定した振替伝票", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/manualJournalResponse" } } } }, "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": [ "ManualJournals" ], "summary": "振替伝票の更新", "description": "\n

概要

\n

指定した振替伝票を、リクエストに含めた貸借行の内容で更新します。各貸借行の金額は税込・円で指定します。

\n\n

注意点

\n\n\n", "operationId": "update_manual_journal", "parameters": [ { "name": "id", "in": "path", "description": "振替伝票ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 }, "example": 1 } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/manualJournalUpdateParams" } }, "application/x-www-form-urlencoded": { "schema": { "$ref": "#/components/schemas/manualJournalUpdateParams" } } }, "required": false }, "responses": { "200": { "description": "更新した振替伝票", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/manualJournalResponse" } } } }, "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": [ "ManualJournals" ], "summary": "振替伝票の削除", "description": "\n

概要

\n

指定した事業所と振替伝票IDに一致する振替伝票を削除します。

\n\n

注意点

\n", "operationId": "destroy_manual_journal", "parameters": [ { "name": "id", "in": "path", "description": "振替伝票ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 }, "example": 1 }, { "name": "company_id", "in": "query", "description": "事業所ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 }, "example": 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/users": { "get": { "tags": [ "Users" ], "summary": "事業所に所属するユーザー一覧の取得", "description": "\n

概要

\n\n

指定した事業所に所属するユーザーの一覧を取得する

\n\n

事業所のメンバーのユーザーID・メールアドレス・氏名を確認できます。取引や申請などの担当者(user_id)を指定する前に、対象ユーザーのIDを調べる用途で使用します。

\n\n

注意点

\n", "operationId": "get_users", "parameters": [ { "name": "company_id", "in": "query", "description": "事業所ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 }, "example": 1 }, { "name": "limit", "in": "query", "description": "取得レコードの件数 (デフォルト: 50, 最小: 1, 最大: 3000)", "schema": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 3000, "default": 50 }, "example": 50 } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "users" ], "properties": { "users": { "type": "array", "items": { "$ref": "#/components/schemas/user" } } } } } } }, "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/users/me": { "get": { "tags": [ "Users" ], "summary": "ログインユーザーの取得", "description": "\n

概要

\n\n

アクセストークンに紐づくログインユーザーの情報を取得する

\n\n

API連携アプリの認可後に、操作しているユーザー本人の情報(ユーザーID・メールアドレス・氏名)や、そのユーザーが所属する事業所の一覧を確認する用途で使用します。

\n\n

注意点

\n", "operationId": "get_users_me", "parameters": [ { "name": "companies", "in": "query", "description": "ユーザーが所属する事業所一覧をレスポンスに含めるかどうか (true: 含める、未指定: 含めない)。指定有無で判定されるため、falseを指定した場合もtrueと同様に扱われます。", "schema": { "type": "boolean", "enum": [ true, false ] }, "example": true }, { "name": "advisor", "in": "query", "description": "事業所ごとのアドバイザープロファイルID (advisor_id) をレスポンスの事業所一覧に含めるかどうか (true: 含める、未指定: 含めない)。companiesと同時に指定してください。指定有無で判定されるため、falseを指定した場合もtrueと同様に扱われます。", "schema": { "type": "boolean", "enum": [ true, false ] }, "example": true } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/meResponse" } } } }, "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": [ "Users" ], "summary": "ログインユーザーの更新", "description": "\n

概要

\n\n

アクセストークンに紐づくログインユーザーの基本情報(表示名・氏名・カナ氏名)を更新する

\n\n

注意点

\n", "operationId": "update_user", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/userParams" } }, "application/x-www-form-urlencoded": { "schema": { "$ref": "#/components/schemas/userParams" } } }, "required": false }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/userResponse" } } } }, "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/users/capabilities": { "get": { "tags": [ "Users" ], "summary": "ログインユーザーの権限の取得", "description": "\n

概要

\n\n

指定した事業所におけるログインユーザーの権限を取得する

\n\n

機能(レスポンスの各キー)ごとに、閲覧 (read)・作成 (create)・更新 (update)・削除 (destroy) などの操作が許可されているかどうかがbooleanで返ります。APIで取引や申請などを操作する前に、必要な権限があるかを確認する用途で使用します。

\n\n

注意点

\n", "operationId": "get_users_capabilities", "parameters": [ { "name": "company_id", "in": "query", "description": "事業所ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 }, "example": 1 } ], "responses": { "200": { "description": "

レスポンスの各キーは以下の項目と対応しています。

\n

詳細は https://support.freee.co.jp/hc/ja/articles/210265673 を参照してください。

\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
キー対応する項目
wallet_txns自動で経理 / 取得した明細
deals取引
deal_linkage取引連携(freee請求書など、freee会計以外から連携させる取引)
transfers口座振替
docs見積書・納品書・請求書・領収書・発注書
doc_postings(請求書の)郵送
receiptsファイルボックス
receipt_stream_editor連続取引登録
spreadsheetsエクセルインポート
expense_applications経費精算
expense_application_sync_payroll経費精算の給与連携
manage_bulk_expense_application_approvals経費精算の一括承認
payment_requests支払依頼
payment_request_templates支払テンプレート
approval_requests各種申請
purchase_requests購買申請
suspense_payments仮払金
reports収益 / 費用レポート
reports_income_expense損益レポート
reports_receivables入金管理レポート
reports_payables支払管理レポート(一括振込ファイルを含む)
reports_purchase_budgets購買進捗モニター
reports_cash_balance現預金レポート/資金繰りレポート
reports_managements_planning経営プランニング
reports_managements_navigation経営ナビゲーション
reports_managements_introduction経営プランニング・経営ナビゲーションの紹介ページ
reports_custom_reports_aggregateカスタムレポート
reports_pl損益計算書(月次推移/試算表)
reports_bs貸借対照表(月次推移/試算表)
reports_general_ledgers総勘定元帳
reports_journals仕訳帳
manual_journals振替伝票
fixed_assets固定資産台帳
inventory_refreshes在庫棚卸
biz_allocations家事按分
payment_records支払調書
annual_reports決算書、確定申告書類
consolidation連結会計
tax_reports消費税区分別表・消費税集計表
consumption_entries消費税申告書
tax_return連携用データ
account_item_statements勘定科目内訳明細書
month_end月締め
year_end年度締め
walletables口座 / 口座の同期
companies事業所の設定
invitationsメンバー招待
access_controls権限管理
sign_in_logsログイン履歴
user_attribute_logsユーザー更新履歴
app_role_logs権限変更履歴
txn_relationship_logs仕訳関連履歴
backupsバックアップ
opening_balances開始残高の設定
system_conversion乗り換え設定
resetsリセット
partners取引先
items品目
sections部門
tagsメモタグ
account_items勘定科目
taxes税区分
payroll_item_sets給与連携の設定
user_matchers自動登録ルール
deal_templates取引テンプレート
manual_journal_templates振替伝票テンプレート
cost_allocations部門配賦
approval_flow_routes承認経路
expense_application_templates経費科目
request_forms申請フォーム
system_messages_for_admin管理者向けお知らせ
company_internal_announcementsアナウンス
doc_change_logs受発注書類変更履歴
entries_reviews記帳レビュー
freee_cards_streamfreeeカードで経理
proxy_application_settings代理申請の設定
workflows仕訳承認
oauth_applicationsアプリ利用
oauth_authorizationsアプリ認可
division_tag_1セグメント1
division_tag_2セグメント2
division_tag_3セグメント3
currencies外貨(通貨の設定)
bank_accountant_staff_usersアドバイザー事業所内でのメンバー管理
\n", "content": { "application/json": { "schema": { "type": "object", "required": [ "access_controls", "account_item_statements", "account_items", "annual_reports", "approval_flow_routes", "approval_requests", "app_role_logs", "backups", "bank_accountant_staff_users", "biz_allocations", "companies", "company_internal_announcements", "consolidation", "consumption_entries", "cost_allocations", "currencies", "deal_linkage", "deal_templates", "deals", "division_tag_1", "division_tag_2", "division_tag_3", "doc_change_logs", "doc_postings", "docs", "entries_reviews", "expense_application_sync_payroll", "expense_application_templates", "expense_applications", "fixed_assets", "freee_cards_stream", "inventory_refreshes", "invitations", "items", "manage_bulk_expense_application_approvals", "manual_journal_templates", "manual_journals", "month_end", "oauth_applications", "oauth_authorizations", "opening_balances", "partners", "payment_records", "payment_request_templates", "payment_requests", "payroll_item_sets", "proxy_application_settings", "purchase_requests", "receipt_stream_editor", "receipts", "reports", "reports_bs", "reports_cash_balance", "reports_custom_reports_aggregate", "reports_general_ledgers", "reports_income_expense", "reports_journals", "reports_managements_introduction", "reports_managements_navigation", "reports_managements_planning", "reports_payables", "reports_pl", "reports_purchase_budgets", "reports_receivables", "request_forms", "resets", "sections", "sign_in_logs", "spreadsheets", "suspense_payments", "system_conversion", "system_messages_for_admin", "tags", "tax_reports", "tax_return", "taxes", "transfers", "txn_relationship_logs", "user_attribute_logs", "user_matchers", "wallet_txns", "walletables", "workflows", "year_end" ], "properties": { "wallet_txns": { "$ref": "#/components/schemas/userCapabilityWithConfirm" }, "deals": { "$ref": "#/components/schemas/userCapabilityWithSelfOnly" }, "deal_linkage": { "$ref": "#/components/schemas/userCapability" }, "transfers": { "$ref": "#/components/schemas/userCapabilityWithSelfOnly" }, "docs": { "$ref": "#/components/schemas/userCapabilityWithSelfOnly" }, "doc_postings": { "$ref": "#/components/schemas/userCapabilityJustCreate" }, "receipts": { "$ref": "#/components/schemas/userCapabilityWithSelfOnly" }, "receipt_stream_editor": { "$ref": "#/components/schemas/userCapabilityJustRead" }, "spreadsheets": { "$ref": "#/components/schemas/userCapabilityJustCreateRead" }, "expense_applications": { "$ref": "#/components/schemas/userCapabilityWithSelfOnly" }, "expense_application_sync_payroll": { "$ref": "#/components/schemas/userCapabilityJustCreate" }, "manage_bulk_expense_application_approvals": { "$ref": "#/components/schemas/userCapabilityJustWrite" }, "payment_requests": { "$ref": "#/components/schemas/userCapabilityWithSelfOnly" }, "payment_request_templates": { "$ref": "#/components/schemas/userCapabilityWithSelfOnly" }, "approval_requests": { "$ref": "#/components/schemas/userCapabilityWithSelfOnly" }, "purchase_requests": { "$ref": "#/components/schemas/userCapabilityWithSelfOnly" }, "suspense_payments": { "$ref": "#/components/schemas/userCapabilityWithSelfOnly" }, "reports": { "$ref": "#/components/schemas/userCapabilityJustRead" }, "reports_income_expense": { "$ref": "#/components/schemas/userCapabilityJustRead" }, "reports_receivables": { "$ref": "#/components/schemas/userCapabilityJustRead" }, "reports_payables": { "$ref": "#/components/schemas/userCapabilityJustReadWrite" }, "reports_purchase_budgets": { "$ref": "#/components/schemas/userCapabilityJustReadWrite" }, "reports_cash_balance": { "$ref": "#/components/schemas/userCapabilityJustRead" }, "reports_managements_planning": { "$ref": "#/components/schemas/userCapabilityJustReadWrite" }, "reports_managements_navigation": { "$ref": "#/components/schemas/userCapabilityJustReadWrite" }, "reports_managements_introduction": { "$ref": "#/components/schemas/userCapabilityJustRead" }, "reports_custom_reports_aggregate": { "$ref": "#/components/schemas/userCapabilityJustRead" }, "reports_pl": { "$ref": "#/components/schemas/userCapabilityJustRead" }, "reports_bs": { "$ref": "#/components/schemas/userCapabilityJustRead" }, "reports_general_ledgers": { "$ref": "#/components/schemas/userCapabilityJustRead" }, "reports_journals": { "$ref": "#/components/schemas/userCapabilityJustRead" }, "manual_journals": { "$ref": "#/components/schemas/userCapabilityWithSelfOnly" }, "fixed_assets": { "$ref": "#/components/schemas/userCapability" }, "inventory_refreshes": { "$ref": "#/components/schemas/userCapability" }, "biz_allocations": { "$ref": "#/components/schemas/userCapability" }, "payment_records": { "$ref": "#/components/schemas/userCapability" }, "annual_reports": { "$ref": "#/components/schemas/userCapabilityJustRead" }, "consolidation": { "$ref": "#/components/schemas/userCapabilityJustRead" }, "tax_reports": { "$ref": "#/components/schemas/userCapabilityJustRead" }, "consumption_entries": { "$ref": "#/components/schemas/userCapabilityJustRead" }, "tax_return": { "$ref": "#/components/schemas/userCapabilityJustRead" }, "account_item_statements": { "$ref": "#/components/schemas/userCapabilityJustRead" }, "month_end": { "$ref": "#/components/schemas/userCapabilityJustRead" }, "year_end": { "$ref": "#/components/schemas/userCapabilityJustReadUpdate" }, "walletables": { "$ref": "#/components/schemas/userCapabilityWithSync" }, "companies": { "$ref": "#/components/schemas/userCapabilityJustReadUpdate" }, "invitations": { "$ref": "#/components/schemas/userCapability" }, "access_controls": { "$ref": "#/components/schemas/userCapabilityWithWrite" }, "sign_in_logs": { "$ref": "#/components/schemas/userCapabilityJustRead" }, "user_attribute_logs": { "$ref": "#/components/schemas/userCapabilityJustRead" }, "app_role_logs": { "$ref": "#/components/schemas/userCapabilityJustRead" }, "txn_relationship_logs": { "$ref": "#/components/schemas/userCapabilityJustRead" }, "backups": { "$ref": "#/components/schemas/userCapabilityJustRead" }, "opening_balances": { "$ref": "#/components/schemas/userCapabilityJustReadUpdate" }, "system_conversion": { "$ref": "#/components/schemas/userCapabilityJustRead" }, "resets": { "$ref": "#/components/schemas/userCapabilityJustRead" }, "partners": { "$ref": "#/components/schemas/userCapability" }, "items": { "$ref": "#/components/schemas/userCapability" }, "sections": { "$ref": "#/components/schemas/userCapability" }, "tags": { "$ref": "#/components/schemas/userCapability" }, "account_items": { "$ref": "#/components/schemas/userCapability" }, "taxes": { "$ref": "#/components/schemas/userCapabilityJustReadUpdate" }, "payroll_item_sets": { "$ref": "#/components/schemas/userCapability" }, "user_matchers": { "$ref": "#/components/schemas/userCapability" }, "deal_templates": { "$ref": "#/components/schemas/userCapability" }, "manual_journal_templates": { "$ref": "#/components/schemas/userCapability" }, "cost_allocations": { "$ref": "#/components/schemas/userCapabilityJustReadUpdate" }, "approval_flow_routes": { "$ref": "#/components/schemas/userCapability" }, "expense_application_templates": { "$ref": "#/components/schemas/userCapability" }, "request_forms": { "$ref": "#/components/schemas/userCapability" }, "system_messages_for_admin": { "$ref": "#/components/schemas/userCapabilityJustRead" }, "company_internal_announcements": { "$ref": "#/components/schemas/userCapabilityJustUpdate" }, "doc_change_logs": { "$ref": "#/components/schemas/userCapabilityJustRead" }, "workflows": { "$ref": "#/components/schemas/userCapabilityJustReadUpdateDestroy" }, "oauth_applications": { "$ref": "#/components/schemas/userCapability" }, "oauth_authorizations": { "$ref": "#/components/schemas/userCapability" }, "division_tag_1": { "$ref": "#/components/schemas/userCapability" }, "division_tag_2": { "$ref": "#/components/schemas/userCapability" }, "division_tag_3": { "$ref": "#/components/schemas/userCapability" }, "currencies": { "$ref": "#/components/schemas/userCapability" }, "entries_reviews": { "$ref": "#/components/schemas/userCapabilityJustRead" }, "freee_cards_stream": { "$ref": "#/components/schemas/userCapabilityJustConfirm" }, "proxy_application_settings": { "$ref": "#/components/schemas/userCapability" }, "bank_accountant_staff_users": { "$ref": "#/components/schemas/userCapability" } } } } } }, "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/companies": { "get": { "tags": [ "Companies" ], "summary": "事業所一覧の取得", "description": "\n

概要

\n\n

アクセストークンのユーザーが所属するすべての事業所の一覧を取得する

\n\n

注意点

\n", "operationId": "get_companies", "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/companyIndexResponse" } } } }, "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/companies/{id}": { "get": { "tags": [ "Companies" ], "summary": "事業所の取得", "description": "\n

概要

\n\n

指定した事業所の詳細情報(名称・連絡先・各種設定・会計年度の一覧)を取得する

\n\n

注意点

\n", "operationId": "get_company", "parameters": [ { "name": "id", "in": "path", "description": "事業所ID。事業所一覧の取得(GET /api/1/companies)のレスポンスの id を指定する", "required": true, "schema": { "type": "integer", "format": "int64" }, "example": 1 }, { "name": "details", "in": "query", "description": "true を指定すると、レスポンスに勘定科目 (account_items)・税区分コード (tax_codes)・品目 (items)・取引先 (partners)・部門 (sections)・メモタグ (tags)・口座 (walletables) の一覧をまとめて含める。一覧を含めない場合はパラメータ自体を省略する", "schema": { "type": "boolean", "enum": [ true ] }, "example": true }, { "name": "account_items", "in": "query", "description": "true を指定すると、レスポンスに勘定科目一覧 (account_items) を含める", "schema": { "type": "boolean", "enum": [ true ] }, "example": true }, { "name": "taxes", "in": "query", "description": "true を指定すると、レスポンスに税区分コード一覧 (tax_codes) を含める", "schema": { "type": "boolean", "enum": [ true ] }, "example": true }, { "name": "items", "in": "query", "description": "true を指定すると、レスポンスに品目一覧 (items) を含める", "schema": { "type": "boolean", "enum": [ true ] }, "example": true }, { "name": "partners", "in": "query", "description": "true を指定すると、レスポンスに取引先一覧 (partners) を含める", "schema": { "type": "boolean", "enum": [ true ] }, "example": true }, { "name": "sections", "in": "query", "description": "true を指定すると、レスポンスに部門一覧 (sections) を含める", "schema": { "type": "boolean", "enum": [ true ] }, "example": true }, { "name": "tags", "in": "query", "description": "true を指定すると、レスポンスにメモタグ一覧 (tags) を含める", "schema": { "type": "boolean", "enum": [ true ] }, "example": true }, { "name": "walletables", "in": "query", "description": "true を指定すると、レスポンスに口座一覧 (walletables) を含める", "schema": { "type": "boolean", "enum": [ true ] }, "example": true } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/companyResponse" } } } }, "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/items": { "get": { "tags": [ "Items" ], "summary": "品目一覧の取得", "description": "\n

概要

\n\n

指定した事業所に登録されている品目の一覧を取得します。取引や振替伝票の明細に付与する品目マスタとして参照する用途を想定しています。

\n\n

注意点

\n", "operationId": "get_items", "parameters": [ { "name": "company_id", "in": "query", "description": "事業所ID。取得対象の事業所を指定します。", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1, "example": 1 } }, { "name": "start_update_date", "in": "query", "description": "更新日で絞り込む開始日 (yyyy-mm-dd, JST)。指定日を含む、それ以降に更新された品目を対象にします。", "schema": { "type": "string", "example": "2024-01-01" } }, { "name": "end_update_date", "in": "query", "description": "更新日で絞り込む終了日 (yyyy-mm-dd, JST)。指定日を含む、それ以前に更新された品目を対象にします。", "schema": { "type": "string", "example": "2024-01-31" } }, { "name": "offset", "in": "query", "description": "取得レコードのオフセット (デフォルト: 0)。ページング用に、スキップする件数を指定します。", "schema": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647, "example": 0 } }, { "name": "limit", "in": "query", "description": "取得レコードの件数 (デフォルト: 50, 最小: 1, 最大: 3000)。1 回のリクエストで取得する上限件数を指定します。", "schema": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 3000, "example": 50 } } ], "responses": { "200": { "description": "品目一覧の取得に成功しました。", "content": { "application/json": { "schema": { "type": "object", "required": [ "items" ], "properties": { "items": { "type": "array", "description": "品目の一覧", "items": { "$ref": "#/components/schemas/item" } } } } } } }, "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": [ "Items" ], "summary": "品目の作成", "description": "\n

概要

\n\n

指定した事業所に新しい品目を作成します。作成された品目は使用設定(available)が true の状態で登録され、取引作成時などに指定できるようになります。

\n\n

注意点

\n", "operationId": "create_item", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/itemParams" } }, "application/x-www-form-urlencoded": { "schema": { "$ref": "#/components/schemas/itemParams" } } }, "required": false }, "responses": { "201": { "description": "品目の作成に成功しました。作成された品目を返します。", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/itemResponse" } } } }, "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/items/{id}": { "get": { "tags": [ "Items" ], "summary": "品目の取得", "description": "\n

概要

\n\n

指定した事業所の品目を 1 件取得します。品目ID(id)は品目一覧の取得 API で確認できます。

\n\n

注意点

\n", "operationId": "get_item", "parameters": [ { "name": "company_id", "in": "query", "description": "事業所ID。取得対象の事業所を指定します。", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1, "example": 1 } }, { "name": "id", "in": "path", "description": "品目ID。品目一覧の取得 API のレスポンスに含まれる id を指定します。", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1, "example": 101 } } ], "responses": { "200": { "description": "品目の取得に成功しました。", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/itemResponse" } } } }, "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": "指定した品目IDに該当する品目が存在しないか、既に削除されています。", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/badRequestNotFoundError" } } } }, "500": { "description": "サーバ内部エラー。時間を空けて再試行してください。", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/internalServerError" } } } } } }, "put": { "tags": [ "Items" ], "summary": "品目の更新", "description": "\n

概要

\n\n

指定した事業所の品目を更新します。この API は品目の作成は行いません。品目コードをキーに更新(存在しない場合は作成)したい場合は PUT /api/1/items/code/upsert を利用してください。

\n\n

注意点

\n", "operationId": "update_item", "parameters": [ { "name": "id", "in": "path", "description": "品目ID。品目一覧の取得 API のレスポンスに含まれる id を指定します。", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1, "example": 101 } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/itemParams" } }, "application/x-www-form-urlencoded": { "schema": { "$ref": "#/components/schemas/itemParams" } } }, "required": false }, "responses": { "200": { "description": "品目の更新に成功しました。更新後の品目を返します。", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/itemResponse" } } } }, "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" } } } } } }, "delete": { "tags": [ "Items" ], "summary": "品目の削除", "description": "\n

概要

\n\n

指定した事業所の品目を削除します。

\n\n

注意点

\n", "operationId": "destroy_item", "parameters": [ { "name": "id", "in": "path", "description": "品目ID。品目一覧の取得 API のレスポンスに含まれる id を指定します。", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1, "example": 101 } }, { "name": "company_id", "in": "query", "description": "事業所ID。削除対象の品目が属する事業所を指定します。", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1, "example": 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": "指定した品目IDに該当する品目が存在しないか、既に削除されています。", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/badRequestNotFoundError" } } } }, "500": { "description": "サーバ内部エラー。時間を空けて再試行してください。", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/internalServerError" } } } } } } }, "/api/1/items/code/upsert": { "put": { "tags": [ "Items" ], "summary": "品目の更新(存在しない場合は作成)", "description": "\n

概要

\n\n

品目コード(code)をキーに、指定した品目の情報を更新します。該当する品目が存在しない場合は新規作成します(upsert)。外部システムとの連携で、品目マスタを一括で登録・更新する用途を想定しています。

\n\n

注意点

\n", "operationId": "api/v1/items#upsert_by_code", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "code", "company_id", "item" ], "properties": { "code": { "type": "string", "maxLength": 20, "description": "品目コード (20文字以内、半角英数字・ハイフン・アンダースコアのみ)。更新・作成対象の品目を特定するキーです。このコードを持つ品目が存在する場合は更新し、存在しない場合は新規作成します。", "example": "code001", "pattern": "^[0-9a-zA-Z_-]+$" }, "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID。品目を更新・作成する対象の事業所を指定します。", "example": 1 }, "item": { "type": "object", "description": "品目に設定する内容。code(品目コード)はこのオブジェクト内には指定できません(品目コードは変更不可のため、指定すると 400 エラーになります)。", "required": [ "name" ], "properties": { "name": { "type": "string", "maxLength": 30, "description": "品目名 (30文字以内)。事業所内で重複できません。既に同名の品目が存在する場合は 400 エラーになります。", "example": "新しい品目" }, "shortcut1": { "type": "string", "maxLength": 20, "description": "ショートカット1 (20文字以内)。Web画面などで品目を検索する際のキーワードとして使用します。更新時に省略した場合は未設定(null)に更新されます。", "example": "NEWITEM" }, "shortcut2": { "type": "string", "maxLength": 20, "description": "ショートカット2 (20文字以内)。Web画面などで品目を検索する際のキーワードとして使用します。更新時に省略した場合は未設定(null)に更新されます。", "example": "202" } } } } } }, "application/x-www-form-urlencoded": { "schema": { "$ref": "#/paths/~1api~11~1items~1code~1upsert/put/requestBody/content/application~1json/schema" } } }, "required": false }, "responses": { "200": { "description": "品目の更新に成功しました。更新後の品目を返します。", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/itemResponse" } } } }, "201": { "description": "指定した品目コードの品目が存在しなかったため、品目を新規作成しました。作成された品目を返します。", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/itemResponse" } } } }, "400": { "description": "リクエストパラメータが不正です。品目コードを使用する設定が無効、item 内での code 指定、品目名の重複などを確認してください。", "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/taxes/codes": { "get": { "tags": [ "Taxes" ], "summary": "税区分一覧の取得(廃止予定)", "description": "\n

概要

\n\n

税区分一覧を取得する

\n\n

税区分コード(code)は、取引の作成(POST /api/1/deals)や振替伝票の作成(POST /api/1/manual_journals)などで税区分を指定する際に tax_code として利用します。

\n\n

注意点

\n", "operationId": "get_tax_codes", "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "taxes" ], "properties": { "taxes": { "type": "array", "items": { "$ref": "#/components/schemas/tax" } } } } } } }, "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/taxes/codes/{code}": { "get": { "tags": [ "Taxes" ], "summary": "税区分の取得", "description": "\n

概要

\n\n

指定したコードに対応する税区分を取得する

\n\n

注意点

\n", "operationId": "get_tax_code", "parameters": [ { "name": "code", "in": "path", "description": "税区分コード。/api/1/taxes/codes(税区分一覧の取得)または /api/1/taxes/companies/{company_id}(指定した事業所の税区分一覧の取得)で取得できる code を指定します。", "required": true, "schema": { "type": "integer", "format": "int64" }, "example": 21 } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/taxResponse" } } } }, "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/taxes/companies/{company_id}": { "get": { "tags": [ "Taxes" ], "summary": "指定した事業所の税区分一覧の取得", "description": "\n

概要

\n\n

指定した事業所の税区分一覧を取得する

\n\n

税区分コード(code)は、取引の作成(POST /api/1/deals)や振替伝票の作成(POST /api/1/manual_journals)などで税区分を指定する際に tax_code として利用します。事業所で利用できる税区分と使用設定(available)を確認するために本APIをご利用ください。

\n\n

注意点

\n", "operationId": "get_taxes_companies", "parameters": [ { "name": "company_id", "in": "path", "description": "事業所ID。/api/1/companies(事業所一覧の取得)で取得できます。", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 }, "example": 1 }, { "name": "display_category", "in": "query", "description": "指定した表示カテゴリの税区分のみに絞り込みます。未指定の場合は全ての税区分が返ります。税区分の表示カテゴリ( tax_5: 5%表示の税区分、 tax_8: 8%表示の税区分、 tax_r8: 軽減税率8%表示の税区分、 tax_10: 10%表示の税区分、 tax_5_e80: インボイス経過措置5%表示80%控除の税区分、 tax_5_e70: インボイス経過措置5%表示70%控除の税区分、 tax_5_e50: インボイス経過措置5%表示50%控除の税区分、 tax_5_e30: インボイス経過措置5%表示30%控除の税区分、 tax_8_e80: インボイス経過措置8%表示80%控除の税区分、 tax_8_e70: インボイス経過措置8%表示70%控除の税区分、 tax_8_e50: インボイス経過措置8%表示50%控除の税区分、 tax_8_e30: インボイス経過措置8%表示30%控除の税区分、 tax_r8_e80: インボイス経過措置軽減税率8%表示80%控除の税区分、 tax_r8_e70: インボイス経過措置軽減税率8%表示70%控除の税区分、 tax_r8_e50: インボイス経過措置軽減税率8%表示50%控除の税区分、 tax_r8_e30: インボイス経過措置軽減税率8%表示30%控除の税区分、 tax_10_e80: インボイス経過措置10%表示80%控除の税区分、 tax_10_e70: インボイス経過措置10%表示70%控除の税区分、 tax_10_e50: インボイス経過措置10%表示50%控除の税区分、 tax_10_e30: インボイス経過措置10%表示30%控除の税区分)", "schema": { "type": "string", "enum": [ "tax_5", "tax_8", "tax_r8", "tax_10", "tax_5_e80", "tax_5_e70", "tax_5_e50", "tax_5_e30", "tax_8_e80", "tax_8_e70", "tax_8_e50", "tax_8_e30", "tax_r8_e80", "tax_r8_e70", "tax_r8_e50", "tax_r8_e30", "tax_10_e80", "tax_10_e70", "tax_10_e50", "tax_10_e30" ] }, "example": "tax_10" }, { "name": "available", "in": "query", "description": "指定した使用設定の税区分のみに絞り込みます。未指定の場合は全ての税区分が返ります。税区分の使用設定(true: 使用する、false: 使用しない)", "schema": { "type": "boolean" }, "example": true } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "taxes" ], "properties": { "taxes": { "type": "array", "items": { "type": "object", "required": [ "available", "code", "display_category", "name", "name_ja" ], "properties": { "code": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647, "description": "税区分コード。取引の作成(POST /api/1/deals)や振替伝票の作成(POST /api/1/manual_journals)などで税区分を指定する際に tax_code として利用します。", "example": 21 }, "name": { "type": "string", "description": "税区分名(システム識別名)", "example": "sales_with_tax" }, "name_ja": { "type": "string", "description": "税区分名(日本語表示用)。freee会計の画面上で表示される名称です。", "example": "課税売上" }, "display_category": { "type": "string", "description": "税区分の表示カテゴリ( tax_5: 5%表示の税区分、 tax_8: 8%表示の税区分、 tax_r8: 軽減税率8%表示の税区分、 tax_10: 10%表示の税区分、 tax_5_e80: インボイス経過措置5%表示80%控除の税区分、 tax_5_e70: インボイス経過措置5%表示70%控除の税区分、 tax_5_e50: インボイス経過措置5%表示50%控除の税区分、 tax_5_e30: インボイス経過措置5%表示30%控除の税区分、 tax_8_e80: インボイス経過措置8%表示80%控除の税区分、 tax_8_e70: インボイス経過措置8%表示70%控除の税区分、 tax_8_e50: インボイス経過措置8%表示50%控除の税区分、 tax_8_e30: インボイス経過措置8%表示30%控除の税区分、 tax_r8_e80: インボイス経過措置軽減税率8%表示80%控除の税区分、 tax_r8_e70: インボイス経過措置軽減税率8%表示70%控除の税区分、 tax_r8_e50: インボイス経過措置軽減税率8%表示50%控除の税区分、 tax_r8_e30: インボイス経過措置軽減税率8%表示30%控除の税区分、 tax_10_e80: インボイス経過措置10%表示80%控除の税区分、 tax_10_e70: インボイス経過措置10%表示70%控除の税区分、 tax_10_e50: インボイス経過措置10%表示50%控除の税区分、 tax_10_e30: インボイス経過措置10%表示30%控除の税区分、 null: 税率未設定税区分)", "example": "tax_8", "enum": [ "tax_5", "tax_8", "tax_r8", "tax_10", "tax_5_e80", "tax_5_e70", "tax_5_e50", "tax_5_e30", "tax_8_e80", "tax_8_e70", "tax_8_e50", "tax_8_e30", "tax_r8_e80", "tax_r8_e70", "tax_r8_e50", "tax_r8_e30", "tax_10_e80", "tax_10_e70", "tax_10_e50", "tax_10_e30" ], "nullable": true }, "available": { "type": "boolean", "description": "税区分の使用設定(true: 使用する、false: 使用しない)。事業所の設定(税区分の使用設定および税率別の表示設定)を反映します。false の税区分はfreee会計の画面上の税区分の選択肢に表示されません。", "example": true } } } } } } } } }, "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/walletables": { "get": { "tags": [ "Walletables" ], "summary": "口座一覧の取得", "description": "\n

概要

\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", "operationId": "get_walletables", "parameters": [ { "name": "company_id", "in": "query", "description": "事業所ID。/api/1/companies(事業所一覧の取得)で取得できます。", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 }, "example": 1 }, { "name": "type", "in": "query", "description": "口座種別で絞り込みます。未指定の場合は全種別を返します。\n* `bank_account` - 銀行口座\n* `credit_card` - クレジットカード\n* `wallet` - その他の決済口座(現金・電子マネー・売掛/買掛など)", "schema": { "type": "string", "enum": [ "bank_account", "credit_card", "wallet" ] }, "example": "bank_account" }, { "name": "with_balance", "in": "query", "description": "true を指定すると、レスポンスに walletable_balance(登録残高、円)と last_balance(同期残高、円)を含めます。デフォルトは false です。", "example": true, "schema": { "default": false, "type": "boolean" } }, { "name": "with_last_synced_at", "in": "query", "description": "true を指定すると、レスポンスに last_synced_at(最終同期成功日時、ISO 8601 形式)を含めます。同期成功実績がない場合は null になります。デフォルトは false です。", "example": true, "schema": { "default": false, "type": "boolean" } }, { "name": "with_sync_status", "in": "query", "description": "true を指定すると、レスポンスに sync_status(同期ステータス)を含めます。デフォルトは false です。", "example": true, "schema": { "default": false, "type": "boolean" } }, { "name": "start_update_date", "in": "query", "description": "更新日で絞込:開始日(yyyy-mm-dd、JST)。指定した日以降に更新された口座のみを返します。", "schema": { "type": "string" }, "example": "2020-06-01" }, { "name": "end_update_date", "in": "query", "description": "更新日で絞込:終了日(yyyy-mm-dd、JST)。指定した日以前に更新された口座のみを返します。", "schema": { "type": "string" }, "example": "2020-06-30" } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "walletables" ], "properties": { "walletables": { "type": "array", "description": "口座一覧", "items": { "$ref": "#/components/schemas/walletable" } }, "meta": { "type": "object", "description": "メタ情報", "properties": { "up_to_date": { "type": "boolean", "description": "集計結果が最新かどうか。false の場合、直近の取引が残高計算に反映されていない可能性があります。", "example": true } } } } } } } }, "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": [ "Walletables" ], "summary": "口座の作成", "description": "\n

概要

\n\n

指定した事業所に口座を作成する

\n\n

作成した口座は、取引の作成(POST /api/1/deals)や口座振替(POST /api/1/transfers)などで from_walletable_type / to_walletable_type と ID を指定して利用できます。

\n\n

注意点

\n", "operationId": "create_walletable", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/walletableCreateParams" } }, "application/x-www-form-urlencoded": { "schema": { "$ref": "#/components/schemas/walletableCreateParams" } } }, "required": false }, "responses": { "201": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/walletableCreateResponse" } } } }, "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/walletables/{type}/{id}": { "get": { "tags": [ "Walletables" ], "summary": "口座の取得", "description": "\n

概要

\n\n

指定した事業所の口座を1件取得する

\n\n

注意点

\n", "operationId": "get_walletable", "parameters": [ { "name": "id", "in": "path", "description": "口座ID。/api/1/walletables(口座一覧の取得)で取得できます。", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 }, "example": 1 }, { "name": "type", "in": "path", "description": "口座種別。\n* `bank_account` - 銀行口座\n* `credit_card` - クレジットカード\n* `wallet` - その他の決済口座(現金・電子マネー・売掛/買掛など)", "required": true, "schema": { "type": "string", "enum": [ "bank_account", "credit_card", "wallet" ] }, "example": "bank_account" }, { "name": "company_id", "in": "query", "description": "事業所ID。/api/1/companies(事業所一覧の取得)で取得できます。", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 }, "example": 1 }, { "name": "with_last_synced_at", "in": "query", "description": "true を指定すると、レスポンスに last_synced_at(最終同期成功日時、ISO 8601 形式)を含めます。同期成功実績がない場合は null になります。デフォルトは false です。", "example": true, "schema": { "default": false, "type": "boolean" } }, { "name": "with_sync_status", "in": "query", "description": "true を指定すると、レスポンスに sync_status(同期ステータス)を含めます。デフォルトは false です。", "example": true, "schema": { "default": false, "type": "boolean" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "walletable" ], "properties": { "walletable": { "$ref": "#/components/schemas/walletable" }, "meta": { "type": "object", "description": "メタ情報", "properties": { "up_to_date": { "type": "boolean", "description": "集計結果が最新かどうか。false の場合、直近の取引が残高計算に反映されていない可能性があります。", "example": true } } } } } } } }, "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": [ "Walletables" ], "summary": "口座の更新", "description": "\n

概要

\n\n

指定した事業所の口座の口座名を更新する

\n\n

注意点

\n", "operationId": "update_walletable", "parameters": [ { "name": "id", "description": "口座ID。/api/1/walletables(口座一覧の取得)で取得できます。", "in": "path", "required": true, "schema": { "type": "integer", "format": "int64" }, "example": 1 }, { "name": "type", "in": "path", "description": "口座種別。\n* `bank_account` - 銀行口座\n* `credit_card` - クレジットカード\n* `wallet` - その他の決済口座(現金・電子マネー・売掛/買掛など)", "required": true, "schema": { "type": "string", "enum": [ "bank_account", "credit_card", "wallet" ] }, "example": "bank_account" } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/walletableUpdateParams" } }, "application/x-www-form-urlencoded": { "schema": { "$ref": "#/components/schemas/walletableUpdateParams" } } }, "required": false }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "walletable" ], "properties": { "walletable": { "$ref": "#/components/schemas/walletableUpdateResponse" }, "meta": { "type": "object", "description": "メタ情報", "properties": { "up_to_date": { "type": "boolean", "description": "集計結果が最新かどうか。false の場合、直近の取引が残高計算に反映されていない可能性があります。", "example": true } } } } } } } }, "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": [ "Walletables" ], "summary": "口座の削除", "description": "\n

概要

\n\n

指定した事業所の口座を削除する

\n\n

注意点

\n", "operationId": "destroy_walletable", "parameters": [ { "name": "id", "in": "path", "description": "口座ID。/api/1/walletables(口座一覧の取得)で取得できます。", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 }, "example": 1 }, { "name": "type", "in": "path", "description": "口座種別。\n* `bank_account` - 銀行口座\n* `credit_card` - クレジットカード\n* `wallet` - その他の決済口座(現金・電子マネー・売掛/買掛など)", "required": true, "schema": { "type": "string", "enum": [ "bank_account", "credit_card", "wallet" ] }, "example": "bank_account" }, { "name": "company_id", "in": "query", "description": "事業所ID。/api/1/companies(事業所一覧の取得)で取得できます。", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 }, "example": 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/banks": { "get": { "tags": [ "Banks" ], "summary": "連携サービス一覧の取得", "description": "\n

概要

\n\n

freee会計に口座として登録できる連携サービス(銀行口座・クレジットカード・その他の決済口座)の一覧を取得する

\n\n

注意点

\n\n", "operationId": "get_banks", "parameters": [ { "name": "offset", "in": "query", "description": "取得レコードのオフセット (デフォルト: 0)。limitと組み合わせてページングに利用します。", "example": 0, "schema": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 9223372036854775807 } }, { "name": "limit", "in": "query", "description": "取得レコードの件数 (デフォルト: 20, 最小: 1, 最大: 500)", "example": 50, "schema": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 500 } }, { "name": "type", "in": "query", "description": "連携サービス種別\n* `bank_account` - 銀行口座\n* `credit_card` - クレジットカード\n* `wallet` - その他の決済口座\n\nこのパラメータは指定必須です。未指定または上記以外の値を指定した場合は、ステータスコード400のエラーが返ります。", "example": "bank_account", "schema": { "type": "string", "enum": [ "bank_account", "credit_card", "wallet" ] } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "banks" ], "properties": { "banks": { "type": "array", "items": { "$ref": "#/components/schemas/bank" } } } } } } }, "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/banks/{id}": { "get": { "tags": [ "Banks" ], "summary": "連携サービスの取得", "description": "\n

概要

\n\n

指定したIDの連携サービス(銀行口座・クレジットカード・その他の決済口座)を取得する

\n\n

注意点

\n\n", "operationId": "get_bank", "parameters": [ { "name": "id", "in": "path", "description": "連携サービスID。連携サービス一覧の取得(GET /api/1/banks)で取得したidを指定します。", "required": true, "example": 1, "schema": { "type": "integer", "format": "int64", "minimum": 1 } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/bankResponse" } } } }, "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/transfers": { "get": { "tags": [ "Transfers" ], "summary": "取引(振替)一覧の取得", "description": "\n

概要

\n\n

指定した事業所の取引(振替)一覧を取得する

\n\n

注意点

\n", "operationId": "get_transfers", "parameters": [ { "name": "company_id", "in": "query", "description": "事業所ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 }, "example": 1 }, { "name": "start_date", "in": "query", "description": "振替日で絞込:開始日 (yyyy-mm-dd)", "schema": { "type": "string" }, "example": "2019-12-01" }, { "name": "end_date", "in": "query", "description": "振替日で絞込:終了日 (yyyy-mm-dd)", "schema": { "type": "string" }, "example": "2019-12-31" }, { "name": "offset", "in": "query", "description": "取得レコードのオフセット (デフォルト: 0)", "schema": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 9223372036854775807 }, "example": 0 }, { "name": "limit", "in": "query", "description": "取得レコードの件数 (デフォルト: 20, 最小: 1, 最大: 100) ", "schema": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 100 }, "example": 20 } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "transfers" ], "properties": { "transfers": { "type": "array", "description": "取引(振替)の一覧", "items": { "$ref": "#/components/schemas/transfer" } } } } } } }, "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": [ "Transfers" ], "summary": "取引(振替)の作成", "description": "\n

概要

\n\n

指定した事業所の取引(振替)を作成する

\n\n

注意点

\n", "operationId": "create_transfer", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/transferParams" } }, "application/x-www-form-urlencoded": { "schema": { "$ref": "#/components/schemas/transferParams" } } }, "required": false }, "responses": { "201": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/transferResponse" } } } }, "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/transfers/{id}": { "get": { "tags": [ "Transfers" ], "summary": "取引(振替)の取得", "description": "\n

概要

\n\n

指定した事業所の取引(振替)を取得する

\n\n

注意点

\n", "operationId": "get_transfer", "parameters": [ { "name": "id", "in": "path", "description": "取引(振替)ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 }, "example": 1 }, { "name": "company_id", "in": "query", "description": "事業所ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 }, "example": 1 } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/transferResponse" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/badRequestError" } } } }, "401": { "description": "Unauthorized", "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": [ "Transfers" ], "summary": "取引(振替)の更新", "description": "\n

概要

\n\n

指定した事業所の取引(振替)を更新する

\n\n

注意点

\n", "operationId": "update_transfer", "parameters": [ { "name": "id", "in": "path", "description": "取引(振替)ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 }, "example": 1 } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/transferParams" } }, "application/x-www-form-urlencoded": { "schema": { "$ref": "#/components/schemas/transferParams" } } }, "required": true }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/transferResponse" } } } }, "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": [ "Transfers" ], "summary": "取引(振替)の削除", "description": "\n

概要

\n\n

指定した事業所の取引(振替)を削除する

\n\n

注意点

\n", "operationId": "destroy_transfer", "parameters": [ { "name": "id", "in": "path", "description": "取引(振替)ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 }, "example": 1 }, { "name": "company_id", "in": "query", "description": "事業所ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 }, "example": 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/wallet_txns": { "get": { "tags": [ "Wallet txns" ], "summary": "口座明細一覧の取得", "description": "\n

概要

\n\n

指定した事業所の口座明細(銀行口座・クレジットカード・その他の決済口座の入出金明細)一覧を取得する

\n\n

注意点

\n\n\n\n

定義

\n\n", "operationId": "get_wallet_txns", "parameters": [ { "name": "company_id", "in": "query", "description": "事業所ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 }, "example": 1 }, { "name": "walletable_type", "in": "query", "description": "口座区分で絞り込みます。walletable_type と walletable_id は同時に指定が必要です(片方のみ指定した場合、この条件は無視されます)。\n* `bank_account` - 銀行口座\n* `credit_card` - クレジットカード\n* `wallet` - 現金・その他の決済口座", "schema": { "type": "string", "enum": [ "bank_account", "credit_card", "wallet" ] }, "example": "bank_account" }, { "name": "walletable_id", "in": "query", "description": "口座IDで絞り込みます。walletable_type と walletable_id は同時に指定が必要です(片方のみ指定した場合、この条件は無視されます)。口座IDは口座一覧の取得API(GET /api/1/walletables)で確認できます。", "schema": { "type": "integer", "format": "int64", "minimum": 1 }, "example": 1 }, { "name": "start_date", "in": "query", "description": "取引日で絞込:開始日 (yyyy-mm-dd)", "schema": { "type": "string" }, "example": "2019-12-01" }, { "name": "end_date", "in": "query", "description": "取引日で絞込:終了日 (yyyy-mm-dd)", "schema": { "type": "string" }, "example": "2019-12-31" }, { "name": "entry_side", "in": "query", "description": "入金・出金の区分で絞り込みます。\n* `income` - 入金\n* `expense` - 出金", "schema": { "type": "string", "enum": [ "income", "expense" ] }, "example": "income" }, { "name": "sort_type", "in": "query", "description": "並び順の指定(未指定の場合は取引日の降順で返されます)\n* `created_at_desc` - 明細の作成日時の降順", "schema": { "type": "string" }, "example": "created_at_desc" }, { "name": "offset", "in": "query", "description": "取得レコードのオフセット (デフォルト: 0)", "schema": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 9223372036854775807 }, "example": 0 }, { "name": "limit", "in": "query", "description": "取得レコードの件数 (デフォルト: 20, 最小: 1, 最大: 100) ", "schema": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 100 }, "example": 20 } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "wallet_txns" ], "properties": { "wallet_txns": { "type": "array", "items": { "$ref": "#/components/schemas/wallet_txn" } } } } } } }, "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": [ "Wallet txns" ], "summary": "口座明細の作成", "description": "\n

概要

\n\n

指定した事業所の口座明細を作成する

\n\n

注意点

\n\n\n\n

定義

\n\n", "operationId": "create_wallet_txn", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/walletTxnParams" } }, "application/x-www-form-urlencoded": { "schema": { "$ref": "#/components/schemas/walletTxnParams" } } }, "required": false }, "responses": { "201": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/walletTxnResponse" } } } }, "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/wallet_txns/{id}": { "get": { "tags": [ "Wallet txns" ], "summary": "口座明細の取得", "description": "\n

概要

\n\n

指定した事業所の口座明細を取得する

\n\n

定義

\n\n", "operationId": "get_wallet_txn", "parameters": [ { "name": "id", "in": "path", "description": "明細ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 }, "example": 1 }, { "name": "company_id", "in": "query", "description": "事業所ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 }, "example": 1 } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/walletTxnResponse" } } } }, "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": [ "Wallet txns" ], "summary": "口座明細の削除", "description": "\n

概要

\n

指定した事業所の口座明細を削除する

\n\n

注意点

\n", "operationId": "destroy_wallet_txn", "parameters": [ { "name": "id", "in": "path", "description": "明細ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 }, "example": 1 }, { "name": "company_id", "in": "query", "description": "事業所ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 }, "example": 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/journals": { "get": { "tags": [ "Journals" ], "summary": "仕訳帳のダウンロード要求", "description": "\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

注意点

\n", "operationId": "get_journals", "parameters": [ { "name": "download_type", "in": "query", "description": "ダウンロード形式\n* `generic` - 旧CSV形式\n* `generic_v2` - 新CSV形式(freee汎用形式)\n* `csv` - 弥生会計形式のCSV\n* `pdf` - PDF形式", "required": true, "schema": { "type": "string", "enum": [ "generic", "generic_v2", "csv", "pdf" ] }, "example": "generic" }, { "name": "encoding", "in": "query", "description": "出力ファイルの文字コード。download_type が generic・generic_v2 の場合のみ指定できます。未指定の場合は sjis になります。\n* `sjis` - Shift_JIS\n* `utf-8` - UTF-8", "schema": { "type": "string", "enum": [ "sjis", "utf-8" ] }, "example": "utf-8" }, { "name": "company_id", "in": "query", "description": "事業所ID。/api/1/companies(事業所一覧の取得)で取得できます。", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 }, "example": 1 }, { "name": "visible_tags[]", "in": "query", "description": "補助科目やコメントとして出力する項目。download_type が generic・csv・pdf の場合のみ指定できます。\n* `partner` - 取引先タグ\n* `item` - 品目タグ\n* `tag` - メモタグ\n* `section` - 部門タグ\n* `description` - 備考欄\n* `wallet_txn_description` - 明細の備考欄\n* `segment_1_tag` - セグメント1タグ(download_type:generic のみ)\n* `segment_2_tag` - セグメント2タグ(download_type:generic のみ)\n* `segment_3_tag` - セグメント3タグ(download_type:generic のみ)\n* `all` - セグメントタグを除く上記すべてを有効として扱います。セグメントが必要な場合は all ではなく segment_1_tag・segment_2_tag・segment_3_tag を個別に指定してください。", "style": "form", "explode": true, "schema": { "type": "array", "items": { "type": "string", "enum": [ "partner", "item", "tag", "section", "description", "wallet_txn_description", "segment_1_tag", "segment_2_tag", "segment_3_tag", "all" ] } }, "example": [ "partner", "item" ] }, { "name": "visible_ids[]", "in": "query", "description": "追加出力するID項目。download_type が generic の場合のみ指定できます。\n* `deal_id` - 取引ID\n* `transfer_id` - 取引(振替)ID\n* `manual_journal_id` - 振替伝票ID", "style": "form", "explode": true, "schema": { "type": "array", "items": { "type": "string", "enum": [ "deal_id", "transfer_id", "manual_journal_id" ] } }, "example": [ "deal_id" ] }, { "name": "start_date", "in": "query", "description": "取得開始日(yyyy-mm-dd)。未指定の場合は当期の会計年度の開始日になります。", "schema": { "type": "string" }, "example": "2020-01-01" }, { "name": "end_date", "in": "query", "description": "取得終了日(yyyy-mm-dd)。未指定の場合は当期の会計年度の終了日になります。", "schema": { "type": "string" }, "example": "2020-12-31" } ], "responses": { "202": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/journalsResponse" } } } }, "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/journals/reports/{id}/status": { "get": { "tags": [ "Journals" ], "summary": "仕訳帳のステータスの取得", "description": "\n

概要

\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", "operationId": "get_journal_status", "parameters": [ { "name": "company_id", "in": "query", "description": "事業所ID。/api/1/companies(事業所一覧の取得)で取得できます。", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 }, "example": 1 }, { "name": "id", "in": "path", "description": "受け付けID。仕訳帳のダウンロード要求(GET /api/1/journals)のレスポンスで返る id を指定します。", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 }, "example": 1 } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/journalStatusResponse" } } } }, "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/journals/reports/{id}/download": { "get": { "tags": [ "Journals" ], "summary": "仕訳帳のダウンロード", "description": "\n

概要

\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

注意点

\n", "operationId": "download_journal", "parameters": [ { "name": "id", "in": "path", "description": "受け付けID。仕訳帳のダウンロード要求(GET /api/1/journals)のレスポンスで返る id を指定します。", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 }, "example": 1 }, { "name": "company_id", "in": "query", "description": "事業所ID。/api/1/companies(事業所一覧の取得)で取得できます。", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 }, "example": 1 } ], "responses": { "200": { "description": "", "content": { "text/csv": { "schema": { "type": "string" } }, "application/pdf": { "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/reports/trial_bs": { "get": { "tags": [ "Trial balance" ], "summary": "貸借対照表の取得", "description": "\n

概要

\n

指定した事業所の貸借対照表(Balance Sheet, BS)を取得します。決算作業や月次の残高確認、取引先・品目・部門・セグメント単位のBS内訳集計に利用できます。

\n\n

定義

\n\n\n

注意点

\n\n\n

レスポンスの例

\n
\n

GET https://api.freee.co.jp/api/1/reports/trial_bs?company_id=1&fiscal_year=2019&breakdown_display_type=partner

\n
\n\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

指定した事業所の貸借対照表(前年比較)を取得します。当年度と前年度の期末残高を並べて比較し、前年比を確認する用途に利用できます。

\n\n

定義

\n\n\n

注意点

\n\n\n

レスポンスの例

\n
\n

GET https://api.freee.co.jp/api/1/reports/trial_bs_two_years?company_id=1&fiscal_year=2019

\n
\n\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

概要

\n

指定した事業所の貸借対照表(3期間比較)を取得します。当年度・前年度・前々年度の期末残高を並べて比較し、中期の推移や前年比を確認する用途に利用できます。

\n\n

定義

\n\n\n

注意点

\n\n\n

レスポンスの例

\n
\n

GET https://api.freee.co.jp/api/1/reports/trial_bs_three_years?company_id=1&fiscal_year=2019

\n
\n\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

概要

\n

指定した事業所の損益計算書(Profit and Loss statement, PL)を取得します。月次・期間指定での損益確認や、取引先・品目・部門・セグメント単位のPL内訳集計に利用できます。

\n\n

定義

\n\n\n

注意点

\n\n\n

レスポンスの例

\n
\n

GET https://api.freee.co.jp/api/1/reports/trial_pl?company_id=1&fiscal_year=2019&breakdown_display_type=partner

\n
\n\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

指定した事業所の損益計算書(前年比較)を取得します。当年度と前年度の期末残高を並べて比較し、前年比を確認する用途に利用できます。

\n\n

定義

\n\n\n

注意点

\n\n\n

レスポンスの例

\n
\n

GET https://api.freee.co.jp/api/1/reports/trial_pl_two_years?company_id=1&fiscal_year=2019

\n
\n\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

概要

\n

指定した事業所の損益計算書(3期間比較)を取得します。当年度・前年度・前々年度の期末残高を並べて比較し、前年比を確認する用途に利用できます。

\n\n

定義

\n\n\n

注意点

\n\n\n

レスポンスの例

\n
\n

GET https://api.freee.co.jp/api/1/reports/trial_pl_three_years?company_id=1&fiscal_year=2019

\n
\n\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

概要

\n

指定した事業所の損益計算書(部門比較)を取得します。指定した部門(最大5つ)ごとの期末残高を並べて比較する用途に利用できます。

\n\n

定義

\n\n\n

注意点

\n\n\n

レスポンスの例

\n
\n

GET https://api.freee.co.jp/api/1/reports/trial_pl_sections?company_id=1&section_ids=1,2,3&fiscal_year=2019

\n
\n\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

概要

\n

指定した事業所の損益計算書(セグメント1比較)を取得します。指定したセグメント1タグ(最大5つ)ごとの期末残高を並べて比較する用途に利用できます。

\n\n

定義

\n\n\n

注意点

\n\n\n

レスポンスの例

\n
\n

GET 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\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

概要

\n

指定した事業所の損益計算書(セグメント2比較)を取得します。指定したセグメント2タグ(最大5つ)ごとの期末残高を並べて比較する用途に利用できます。

\n\n

定義

\n\n\n

注意点

\n\n\n

レスポンスの例

\n
\n

GET 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\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

概要

\n

指定した事業所の損益計算書(セグメント3比較)を取得します。指定したセグメント3タグ(最大5つ)ごとの期末残高を並べて比較する用途に利用できます。

\n\n

定義

\n\n\n

注意点

\n\n\n

レスポンスの例

\n
\n

GET 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\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

概要

\n

指定した事業所の製造原価報告書(Cost Report, CR)を取得します。材料費・労務費・製造経費など製造原価の期間集計や、取引先・品目・部門・セグメント単位の内訳集計に利用できます。

\n\n

定義

\n\n\n

注意点

\n\n\n

レスポンスの例

\n
\n

GET https://api.freee.co.jp/api/1/reports/trial_cr?company_id=1&fiscal_year=2019&breakdown_display_type=partner

\n
\n\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

指定した事業所の製造原価報告書(前年比較)を取得します。当年度と前年度の期末残高を並べて比較し、前年比を確認する用途に利用できます。

\n\n

定義

\n\n\n

注意点

\n\n\n

レスポンスの例

\n
\n

GET https://api.freee.co.jp/api/1/reports/trial_cr_two_years?company_id=1&fiscal_year=2019

\n
\n\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

概要

\n

指定した事業所の製造原価報告書(3期間比較)を取得します。当年度・前年度・前々年度の期末残高を並べて比較し、前年比を確認する用途に利用できます。

\n\n

定義

\n\n\n

注意点

\n\n\n

レスポンスの例

\n
\n

GET https://api.freee.co.jp/api/1/reports/trial_cr_three_years?company_id=1&fiscal_year=2019

\n
\n\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

概要

\n

指定した事業所の製造原価報告書(部門比較)を取得します。指定した部門(最大5つ)ごとの期末残高を並べて比較する用途に利用できます。

\n\n

定義

\n\n\n

注意点

\n\n\n

レスポンスの例

\n
\n

GET https://api.freee.co.jp/api/1/reports/trial_cr_sections?company_id=1&section_ids=1,2,3&fiscal_year=2019

\n
\n\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

概要

\n

指定した事業所の製造原価報告書(セグメント1比較)を取得します。指定したセグメント1タグ(最大5つ)ごとの期末残高を並べて比較する用途に利用できます。

\n\n

定義

\n\n\n

注意点

\n\n\n

レスポンスの例

\n
\n

GET 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\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

概要

\n

指定した事業所の製造原価報告書(セグメント2比較)を取得します。指定したセグメント2タグ(最大5つ)ごとの期末残高を並べて比較する用途に利用できます。

\n\n

定義

\n\n\n

注意点

\n\n\n

レスポンスの例

\n
\n

GET 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\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

概要

\n

指定した事業所の製造原価報告書(セグメント3比較)を取得します。指定したセグメント3タグ(最大5つ)ごとの期末残高を並べて比較する用途に利用できます。

\n\n

定義

\n\n\n

注意点

\n\n\n

レスポンスの例

\n
\n

GET 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\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
\n※このAPIはβ版として提供しています。\n", "operationId": "get_general_ledgers", "parameters": [ { "name": "company_id", "in": "query", "description": "事業所ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 }, "example": 1000001 }, { "name": "start_date", "in": "query", "description": "期間で絞込:開始日 (yyyy-mm-dd)", "required": true, "schema": { "type": "string", "format": "date", "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$" }, "example": "2020-01-01" }, { "name": "end_date", "in": "query", "description": "期間で絞込:終了日 (yyyy-mm-dd)", "required": true, "schema": { "type": "string", "format": "date", "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$" }, "example": "2020-01-01" }, { "name": "account_item_name", "in": "query", "description": "勘定科目名で絞込", "schema": { "type": "string" }, "example": "売掛金" }, { "name": "tax_name", "in": "query", "description": "税区分名で絞込", "schema": { "type": "string", "enum": [ "課税", "対象外", "非課税", "不課税", "輸出等", "未選択", "課税売上", "輸出売上", "非課売上", "非資売上", "有価譲渡", "対外売上", "課税売返", "輸出売返", "非課売返", "非資売返", "課税売倒", "輸出売倒", "非課売倒", "非資売倒", "課税売回", "課対輸本", "非対輸本", "共対輸本", "課対輸税", "非対輸税", "共対輸税", "地消貨割", "課対仕入", "非対仕入", "共対仕入", "非課仕入", "対外仕入", "課対仕返", "非対仕返", "共対仕返", "非課仕返", "課売上一", "課売上二", "課売上三", "課売上四", "課売上五", "課売上六", "課対輸返", "非対輸返", "共対輸返", "課売返一", "課売返二", "課売返三", "課売返四", "課売返五", "課売返六" ] }, "example": "課税" }, { "name": "tax_rate", "in": "query", "description": "税率で絞込", "schema": { "type": "string", "enum": [ "tax_rate_5", "tax_rate_8", "tax_rate_10", "tax_rate_r8", "tax_rate_5_exempt_80", "tax_rate_5_exempt_70", "tax_rate_5_exempt_50", "tax_rate_5_exempt_30", "tax_rate_8_exempt_80", "tax_rate_8_exempt_70", "tax_rate_8_exempt_50", "tax_rate_8_exempt_30", "tax_rate_10_exempt_80", "tax_rate_10_exempt_70", "tax_rate_10_exempt_50", "tax_rate_10_exempt_30", "tax_rate_r8_exempt_80", "tax_rate_r8_exempt_70", "tax_rate_r8_exempt_50", "tax_rate_r8_exempt_30" ] }, "example": "tax_rate_5" }, { "name": "adjustment", "in": "query", "description": "決算整理仕訳で絞込(決算整理仕訳のみ:only, 決算整理仕訳以外:without)。指定されない場合、決算整理仕訳を含む金額が返却されます。", "schema": { "type": "string", "enum": [ "only", "without" ] }, "example": "only" }, { "name": "cost_allocation", "in": "query", "description": "配賦仕訳で絞込(配賦仕訳のみ:only,配賦仕訳以外:without)。指定されない場合、配賦仕訳を含む金額が返却されます。", "schema": { "type": "string", "enum": [ "only", "without" ] }, "example": "only" }, { "name": "partner_name", "in": "query", "description": "取引先で絞込(未選択を指定すると、取引先が未選択で絞り込めます)", "schema": { "type": "string" }, "example": "freeeパートナー" }, { "name": "item_name", "in": "query", "description": "品目で絞込(未選択を指定すると、品目が未選択で絞り込めます)", "schema": { "type": "string" }, "example": "通勤手当" }, { "name": "section_name", "in": "query", "description": "部門で絞込(未選択を指定すると、部門が未選択で絞り込めます)", "schema": { "type": "string" }, "example": "営業部" }, { "name": "tag_name", "in": "query", "description": "メモタグで絞込
\n取引数が多すぎる場合はタイムアウトする場合があります。
\nその場合はWeb画面よりPDF/CSV出力をご利用ください。\n", "schema": { "type": "string" }, "example": "タグ1" }, { "name": "segment_tag_1_name", "in": "query", "description": "セグメント1タグ名で絞込(未選択を指定すると、セグメント1タグが未選択で絞り込めます)", "schema": { "type": "string" }, "example": "セグメント1タグ" }, { "name": "segment_tag_2_name", "in": "query", "description": "セグメント2タグ名で絞込(未選択を指定すると、セグメント2タグが未選択で絞り込めます)", "schema": { "type": "string" }, "example": "セグメント2タグ" }, { "name": "segment_tag_3_name", "in": "query", "description": "セグメント3タグ名で絞込(未選択を指定すると、セグメント3タグが未選択で絞り込めます)", "schema": { "type": "string" }, "example": "セグメント3タグ" }, { "name": "approval_flow_status", "in": "query", "description": "承認ステータスで絞込 (未承認を除く: without_in_progress (デフォルト)、全てのステータス: all)
\n事業所の設定から仕訳承認フローの利用を有効にした場合に指定可能です。\n", "schema": { "type": "string", "enum": [ "all", "without_in_progress" ] }, "example": "without_in_progress" } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/generalLedgersResponse" } } } }, "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/receipts": { "get": { "tags": [ "Receipts" ], "summary": "ファイルボックス(証憑ファイル)一覧の取得", "description": "\n

概要

\n\n

指定した事業所のファイルボックス(証憑ファイル)一覧を取得する

\n

アップロード日(start_date〜end_date)の期間を指定して取得します。ファイルの実体(バイナリ)は本APIでは取得できないため、ファイルボックス(証憑ファイル)のダウンロードAPI(GET /api/1/receipts/{id}/download)を利用してください。

\n\n

注意点

\n", "operationId": "get_receipts", "parameters": [ { "name": "company_id", "in": "query", "description": "事業所ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 } }, { "name": "start_date", "in": "query", "description": "アップロード日で絞込:開始日 (yyyy-mm-dd)", "required": true, "schema": { "type": "string" }, "example": "2020-01-01" }, { "name": "end_date", "in": "query", "description": "アップロード日で絞込:終了日 (yyyy-mm-dd)", "required": true, "schema": { "type": "string" }, "example": "2020-01-31" }, { "name": "user_name", "in": "query", "description": "アップロードしたユーザーで絞込。ユーザーの表示名またはメールアドレスの部分一致で指定します。", "schema": { "type": "string" }, "example": "contact@example.com" }, { "name": "number", "in": "query", "description": "アップロードファイルNo(ファイルボックス上でファイルごとに表示される番号)で絞込", "schema": { "type": "integer", "format": "int64", "minimum": 1 }, "example": 1 }, { "name": "comment_type", "in": "query", "description": "ファイルに付けられたコメントの状態で絞込(posted:コメントあり, raised:未解決, resolved:解決済)", "schema": { "type": "string", "enum": [ "posted", "raised", "resolved" ] }, "example": "posted" }, { "name": "comment_important", "in": "query", "description": "trueを指定した場合、お気に入りコメントが付いたファイルのみが対象になります", "schema": { "type": "boolean" }, "example": true }, { "name": "category", "in": "query", "description": "ファイルの取引への登録状態で絞込(all:すべて, without_deal:未登録, with_expense_application_line:経費申請中, with_deal:登録済み, ignored:無視。デフォルト: all)", "schema": { "type": "string", "enum": [ "all", "without_deal", "with_expense_application_line", "with_deal", "ignored" ] }, "example": "all" }, { "name": "offset", "in": "query", "description": "取得レコードのオフセット (デフォルト: 0)", "schema": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 9223372036854775807 }, "example": 0 }, { "name": "limit", "in": "query", "description": "取得レコードの件数 (デフォルト: 50, 最小: 1, 最大: 3000)", "schema": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 3000 }, "example": 50 } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "receipts" ], "properties": { "receipts": { "type": "array", "items": { "$ref": "#/components/schemas/receipt" } } } } } } }, "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": [ "Receipts" ], "summary": "ファイルボックス(証憑ファイル)のアップロード", "description": "\n

概要

\n\n

ファイルボックス(証憑ファイル)をアップロードする

\n

注意点

\n", "operationId": "create_receipt", "requestBody": { "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/receiptCreateParams" } } }, "required": true }, "responses": { "201": { "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" } } } }, "500": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/internalServerError" } } } } } } }, "/api/1/receipts/{id}": { "get": { "tags": [ "Receipts" ], "summary": "ファイルボックス(証憑ファイル)の取得", "description": "\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\n

ファイルボックス(証憑ファイル)を更新する

\n

注意点

\n", "operationId": "update_receipt", "parameters": [ { "name": "id", "in": "path", "description": "ファイルボックス(証憑ファイル)ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/receiptUpdateParams" } }, "application/x-www-form-urlencoded": { "schema": { "$ref": "#/components/schemas/receiptUpdateParams" } } }, "required": true }, "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" } } } } } }, "delete": { "tags": [ "Receipts" ], "summary": "ファイルボックス(証憑ファイル)の削除", "description": "\n

概要

\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\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

指定した事業所の経費申請一覧を取得する

\n\n

経費精算APIの使い方については、freee会計経費精算APIの使い方をご参照ください

\n\n

注意点

\n", "operationId": "get_expense_applications", "parameters": [ { "name": "company_id", "in": "query", "description": "事業所ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 } }, { "name": "status", "in": "query", "schema": { "type": "string", "enum": [ "draft", "in_progress", "approved", "rejected", "feedback", "unsettled", "settled" ] }, "description": "申請ステータス(draft:下書き, in_progress:申請中, approved:承認済, rejected:却下, feedback:差戻し)、 取引ステータス(unsettled:清算待ち, settled:精算済み)" }, { "name": "payroll_attached", "in": "query", "schema": { "type": "boolean" }, "description": "true:給与連携あり、false:給与連携なし、未指定時:絞り込みなし", "example": true }, { "name": "start_transaction_date", "in": "query", "description": "発生日(経費申請項目の日付)で絞込:開始日(yyyy-mm-dd)", "schema": { "type": "string" }, "example": "2019-12-17" }, { "name": "end_transaction_date", "in": "query", "description": "発生日(経費申請項目の日付)で絞込:終了日(yyyy-mm-dd)", "schema": { "type": "string" }, "example": "2019-12-17" }, { "name": "application_number", "in": "query", "schema": { "type": "integer", "format": "int64", "minimum": 1 }, "description": "申請No.", "example": 2 }, { "name": "title", "in": "query", "schema": { "type": "string", "maxLength": 250 }, "description": "申請タイトル", "example": "大阪出張" }, { "name": "start_issue_date", "in": "query", "description": "申請日で絞込:開始日(yyyy-mm-dd)", "schema": { "type": "string" }, "example": "2019-12-17" }, { "name": "end_issue_date", "in": "query", "description": "申請日で絞込:終了日(yyyy-mm-dd)", "schema": { "type": "string" }, "example": "2019-12-17" }, { "name": "applicant_id", "in": "query", "schema": { "type": "integer", "format": "int64", "minimum": 1 }, "description": "申請者のユーザーID", "example": 1 }, { "name": "approver_id", "in": "query", "schema": { "type": "integer", "format": "int64", "minimum": 1 }, "description": "承認者のユーザーID", "example": 1 }, { "name": "min_amount", "in": "query", "schema": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647 }, "description": "経費申請の合計金額で絞込:下限金額 (単位:円、以上)", "example": 5000 }, { "name": "max_amount", "in": "query", "schema": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647 }, "description": "経費申請の合計金額で絞込:上限金額 (単位:円、以下)", "example": 10000 }, { "name": "offset", "in": "query", "description": "取得レコードのオフセット (デフォルト: 0)", "schema": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 9223372036854775807 } }, { "name": "limit", "in": "query", "description": "取得レコードの件数 (デフォルト: 50, 最小: 1, 最大: 500)", "schema": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 500 } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/expenseApplicationsIndexResponse" } } } }, "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 applications" ], "summary": "経費申請の作成", "description": "\n

概要

\n\n

指定した事業所の経費申請を作成する

\n\n

経費精算APIの使い方については、freee会計経費精算APIの使い方をご参照ください

\n\n

注意点

\n", "operationId": "create_expense_application", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/expenseApplicationCreateParams" } }, "application/x-www-form-urlencoded": { "schema": { "$ref": "#/components/schemas/expenseApplicationCreateParams" } } }, "required": false }, "responses": { "201": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/expenseApplicationResponse" } } } }, "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/{id}": { "get": { "tags": [ "Expense applications" ], "summary": "経費申請詳細の取得", "description": "\n

概要

\n\n

指定した事業所の経費申請を取得する

\n\n

経費精算APIの使い方については、freee会計経費精算APIの使い方をご参照ください

\n\n

注意点

\n", "operationId": "get_expense_application", "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/expenseApplicationResponse" } } } }, "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 applications" ], "summary": "経費申請の更新", "description": "\n

概要

\n\n

指定した事業所の経費申請を更新する

\n\n

経費精算APIの使い方については、freee会計経費精算APIの使い方をご参照ください

\n\n

注意点

\n", "operationId": "update_expense_application", "parameters": [ { "name": "id", "in": "path", "description": "経費申請ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/expenseApplicationUpdateParams" } }, "application/x-www-form-urlencoded": { "schema": { "$ref": "#/components/schemas/expenseApplicationUpdateParams" } } }, "required": false }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/expenseApplicationResponse" } } } }, "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 applications" ], "summary": "経費申請の削除", "description": "\n

概要

\n\n

指定した事業所の経費申請を削除する

\n\n

経費精算APIの使い方については、freee会計経費精算APIの使い方をご参照ください

\n\n

注意点

\n", "operationId": "destroy_expense_application", "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/{id}/actions": { "post": { "tags": [ "Expense applications" ], "summary": "経費申請の承認操作", "description": "\n

概要

\n\n

指定した事業所の経費申請の承認操作を行う

\n\n

経費精算APIの使い方については、freee会計経費精算APIの使い方をご参照ください

\n\n

注意点

\n", "operationId": "update_expense_application_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/expenseApplicationActionCreateParams" } }, "application/x-www-form-urlencoded": { "schema": { "$ref": "#/components/schemas/expenseApplicationActionCreateParams" } } }, "required": true }, "responses": { "201": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/expenseApplicationResponse" } } } }, "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/{id}/parent_approvable_requests": { "put": { "tags": [ "Expense applications" ], "summary": "経費申請に関連付ける各種申請の更新", "description": "\n

概要

\n\n

指定した事業所の経費申請に関連付ける各種申請の更新を行う

\n\n

経費精算APIの使い方については、freee会計経費精算APIの使い方をご参照ください

\n\n

注意点

\n", "operationId": "update_expense_application_parent_approvable_requests", "parameters": [ { "name": "id", "in": "path", "description": "経費申請ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/expenseApplicationParentApprovableRequestUpdateParams" } }, "application/x-www-form-urlencoded": { "schema": { "$ref": "#/components/schemas/expenseApplicationParentApprovableRequestUpdateParams" } } }, "required": true }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/expenseApplicationResponse" } } } }, "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/currencies": { "get": { "tags": [ "Expense application currencies" ], "summary": "経費精算の外貨一覧の取得", "description": "\n

概要

\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

概要

\n\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

概要

\n\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

概要

\n\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

概要

\n\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

概要

\n\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

概要

\n\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", "operationId": "get_expense_application_line_templates", "parameters": [ { "name": "company_id", "in": "query", "description": "事業所ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 } }, { "name": "offset", "in": "query", "description": "取得レコードのオフセット (デフォルト: 0)", "schema": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 9223372036854775807 } }, { "name": "limit", "in": "query", "description": "取得レコードの件数 (デフォルト: 20, 最小: 1, 最大: 100)", "schema": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 100 } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "expense_application_line_templates" ], "properties": { "expense_application_line_templates": { "type": "array", "items": { "$ref": "#/components/schemas/expense_application_line_template" } } } } } } }, "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 line templates" ], "summary": "経費科目の作成", "description": "\n

概要

\n\n

指定した事業所の経費科目を作成する

\n\n

注意点

\n", "operationId": "create_expense_application_line_template", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/expenseApplicationLineTemplateParams" } }, "application/x-www-form-urlencoded": { "schema": { "$ref": "#/components/schemas/expenseApplicationLineTemplateParams" } } }, "required": true }, "responses": { "201": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/expenseApplicationLineTemplateResponse" } } } }, "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_application_line_templates/{id}": { "get": { "tags": [ "Expense application line templates" ], "summary": "経費科目の取得", "description": "\n

概要

\n\n

指定した事業所の経費科目を取得する

\n\n

注意点

\n", "operationId": "get_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": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/expenseApplicationLineTemplateResponse" } } } }, "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 line templates" ], "summary": "経費科目の更新", "description": "\n

概要

\n\n

指定した事業所の経費科目を更新する

\n\n

注意点

\n", "operationId": "update_expense_application_line_template", "parameters": [ { "name": "id", "in": "path", "description": "経費科目ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/expenseApplicationLineTemplateParams" } }, "application/x-www-form-urlencoded": { "schema": { "$ref": "#/components/schemas/expenseApplicationLineTemplateParams" } } }, "required": true }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/expenseApplicationLineTemplateResponse" } } } }, "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 line templates" ], "summary": "経費科目の削除", "description": "\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

指定した事業所の支払依頼一覧を取得する

\n\n

支払依頼APIの使い方については、freee会計支払依頼APIの使い方をご参照ください

\n\n

注意点

\n", "operationId": "get_payment_requests", "parameters": [ { "name": "company_id", "in": "query", "description": "事業所ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 } }, { "name": "status", "in": "query", "schema": { "type": "string", "enum": [ "draft", "in_progress", "approved", "rejected", "feedback", "unsettled", "settled" ] }, "description": "申請ステータス、または取引ステータス\n申請ステータス:\n* `draft` - 下書き\n* `in_progress` - 申請中\n* `approved` - 承認済\n* `rejected` - 却下\n* `feedback` - 差戻し\n\n取引ステータス (status が `approved` の支払依頼に対して):\n* `unsettled` - 支払待ち\n* `settled` - 支払済み\n\napprover_id を指定した場合は無効です。", "example": "in_progress" }, { "name": "start_application_date", "in": "query", "description": "申請日で絞込:開始日(yyyy-mm-dd)", "schema": { "type": "string" }, "example": "2019-12-17" }, { "name": "end_application_date", "in": "query", "description": "申請日で絞込:終了日(yyyy-mm-dd)", "schema": { "type": "string" }, "example": "2019-12-17" }, { "name": "start_issue_date", "in": "query", "description": "発生日で絞込:開始日(yyyy-mm-dd)", "schema": { "type": "string" }, "example": "2019-12-17" }, { "name": "end_issue_date", "in": "query", "description": "発生日で絞込:終了日(yyyy-mm-dd)", "schema": { "type": "string" }, "example": "2019-12-17" }, { "name": "application_number", "in": "query", "schema": { "type": "integer", "format": "int64", "minimum": 1 }, "description": "申請No.", "example": 2 }, { "name": "title", "in": "query", "schema": { "type": "string", "maxLength": 250 }, "description": "申請タイトル", "example": "大阪出張" }, { "name": "applicant_id", "in": "query", "schema": { "type": "integer", "format": "int64", "minimum": 1 }, "description": "申請者のユーザーID", "example": 1 }, { "name": "approver_id", "in": "query", "schema": { "type": "integer", "format": "int64", "minimum": 1 }, "description": "承認者のユーザーID (`/api/1/users` のレスポンス id と同じ値)\napprover_id を指定した場合は `in_progress` (申請中) の支払依頼のみを返します。", "example": 1 }, { "name": "min_amount", "in": "query", "schema": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647 }, "description": "金額で絞込 (下限金額)", "example": 5000 }, { "name": "max_amount", "in": "query", "schema": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647 }, "description": "金額で絞込 (上限金額)", "example": 10000 }, { "name": "partner_id", "in": "query", "description": "取引先IDで絞込(`/api/1/partners` のレスポンス id と同じ値)", "schema": { "type": "integer", "format": "int64", "minimum": 1 }, "example": 201 }, { "name": "partner_code", "in": "query", "description": "取引先コードで絞込。事業所側で「取引先コードを利用する」設定が有効な場合に利用できます。", "schema": { "type": "string" }, "example": "code001" }, { "name": "payment_method", "in": "query", "schema": { "type": "string", "enum": [ "none", "domestic_bank_transfer", "abroad_bank_transfer", "account_transfer", "credit_card" ] }, "description": "支払方法で絞込\n* `none` - 指定なし\n* `domestic_bank_transfer` - 国内振込\n* `abroad_bank_transfer` - 国外振込\n* `account_transfer` - 口座振替\n* `credit_card` - クレジットカード", "example": "credit_card" }, { "name": "start_payment_date", "in": "query", "description": "支払期限で絞込:開始日(yyyy-mm-dd)", "schema": { "type": "string" }, "example": "2019-12-17" }, { "name": "end_payment_date", "in": "query", "description": "支払期限で絞込:終了日(yyyy-mm-dd)", "schema": { "type": "string" }, "example": "2019-12-17" }, { "name": "document_code", "in": "query", "schema": { "type": "string" }, "description": "請求書番号で絞込", "example": "2" }, { "name": "section_id", "in": "query", "description": "部門IDで絞込(`/api/1/sections` のレスポンス id と同じ値)", "schema": { "type": "integer", "format": "int64", "minimum": 0 }, "example": 1 }, { "name": "partner_name", "in": "query", "description": "取引先名で絞込", "schema": { "type": "string" }, "example": "株式会社freee" }, { "name": "approval_flow_route_id", "in": "query", "description": "申請経路IDで絞込(`/api/1/approval_flow_routes` のレスポンス id と同じ値)", "schema": { "type": "integer", "format": "int64", "minimum": 1 }, "example": 1 }, { "name": "observing", "in": "query", "description": "共有された申請の絞り込み\n* `ignore_observing` - 共有された申請を含めない\n* `only_observing` - 共有された申請のみ", "schema": { "type": "string", "enum": [ "ignore_observing", "only_observing" ] }, "example": "ignore_observing" }, { "name": "offset", "in": "query", "description": "取得レコードのオフセット (デフォルト: 0)", "schema": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 9223372036854775807 }, "example": 0 }, { "name": "limit", "in": "query", "description": "取得レコードの件数 (デフォルト: 50, 最小: 1, 最大: 500)", "schema": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 500 }, "example": 50 } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/paymentRequestsIndexResponse" } } } }, "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": [ "Payment requests" ], "summary": "支払依頼の作成", "description": "\n

概要

\n\n

指定した事業所の支払依頼を作成する

\n\n

支払依頼APIの使い方については、freee会計支払依頼APIの使い方をご参照ください

\n\n

注意点

\n", "operationId": "create_payment_request", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/paymentRequestCreateParams" } }, "application/x-www-form-urlencoded": { "schema": { "$ref": "#/components/schemas/paymentRequestCreateParams" } } }, "required": false }, "responses": { "201": { "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" } } } }, "500": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/internalServerError" } } } } } } }, "/api/1/payment_requests/{id}": { "get": { "tags": [ "Payment requests" ], "summary": "支払依頼の取得", "description": "\n

概要

\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

指定した事業所の支払依頼を更新する

\n\n

支払依頼APIの使い方については、freee会計支払依頼APIの使い方をご参照ください

\n\n

注意点

\n", "operationId": "update_payment_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/paymentRequestUpdateParams" } }, "application/x-www-form-urlencoded": { "schema": { "$ref": "#/components/schemas/paymentRequestUpdateParams" } } }, "required": false }, "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" } } } } } }, "delete": { "tags": [ "Payment requests" ], "summary": "支払依頼の削除", "description": "\n

概要

\n\n

指定した事業所の支払依頼を削除する

\n\n

支払依頼APIの使い方については、freee会計支払依頼APIの使い方をご参照ください

\n\n

注意点

\n", "operationId": "destroy_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": { "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/{id}/actions": { "post": { "tags": [ "Payment requests" ], "summary": "支払依頼の承認操作", "description": "\n

概要

\n\n

指定した事業所の支払依頼の承認操作を行う

\n\n

支払依頼APIの使い方については、freee会計支払依頼APIの使い方をご参照ください

\n\n

注意点

\n", "operationId": "update_payment_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/paymentRequestActionCreateParams" } }, "application/x-www-form-urlencoded": { "schema": { "$ref": "#/components/schemas/paymentRequestActionCreateParams" } } }, "required": true }, "responses": { "201": { "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" } } } } } } }, "/api/1/approval_requests": { "get": { "tags": [ "Approval requests" ], "summary": "各種申請一覧の取得", "description": "\n

概要

\n\n

指定した事業所の各種申請一覧を取得する

\n\n

各種申請APIの使い方については、freee会計の各種申請APIの使い方をご参照ください

\n\n

注意点

\n", "operationId": "get_approval_requests", "parameters": [ { "name": "company_id", "in": "query", "description": "事業所ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 } }, { "name": "status", "in": "query", "schema": { "type": "string", "enum": [ "draft", "in_progress", "approved", "rejected", "feedback" ] }, "description": "申請ステータス(draft:下書き, in_progress:申請中, approved:承認済, rejected:却下, feedback:差戻し)\n承認者指定時には無効です。", "example": "draft" }, { "name": "application_number", "in": "query", "schema": { "type": "integer", "format": "int64", "minimum": 1 }, "description": "申請No.", "example": 2 }, { "name": "title", "in": "query", "schema": { "type": "string" }, "description": "申請タイトル", "example": "大阪出張" }, { "name": "form_id", "in": "query", "schema": { "type": "integer", "format": "int64", "minimum": 1 }, "description": "申請フォームID" }, { "name": "start_application_date", "in": "query", "description": "申請日で絞込:開始日(yyyy-mm-dd)", "schema": { "type": "string" } }, { "name": "end_application_date", "in": "query", "description": "申請日で絞込:終了日(yyyy-mm-dd)", "schema": { "type": "string" } }, { "name": "applicant_id", "in": "query", "schema": { "type": "integer", "format": "int64", "minimum": 1 }, "description": "申請者のユーザーID" }, { "name": "min_amount", "in": "query", "description": "金額で絞込:以上", "schema": { "type": "integer", "format": "int64", "minimum": -9223372036854775808, "maximum": 9223372036854775807 } }, { "name": "max_amount", "in": "query", "description": "金額で絞込:以下", "schema": { "type": "integer", "format": "int64", "minimum": -9223372036854775808, "maximum": 9223372036854775807 } }, { "name": "approver_id", "in": "query", "schema": { "type": "integer", "format": "int64", "minimum": 1 }, "description": "承認者のユーザーID\n承認者指定時には申請ステータスが申請中のものだけが取得可能です。", "example": 1 }, { "name": "offset", "in": "query", "description": "取得レコードのオフセット (デフォルト: 0)", "schema": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647 } }, { "name": "limit", "in": "query", "description": "取得レコードの件数 (デフォルト: 50, 最小: 1, 最大: 500)", "schema": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 500 } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/approvalRequestsIndexResponse" } } } }, "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" } } } } } }, "post": { "tags": [ "Approval requests" ], "summary": "各種申請の作成", "description": "\n

概要

\n\n

指定した事業所の各種申請を作成する

\n\n

各種申請APIの使い方については、freee会計の各種申請APIの使い方をご参照ください

\n\n

注意点

\n", "operationId": "create_approval_request", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/approvalRequestCreateParams" } }, "application/x-www-form-urlencoded": { "schema": { "$ref": "#/components/schemas/approvalRequestCreateParams" } } }, "required": false }, "responses": { "201": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/approvalRequestResponse" } } } }, "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/{id}": { "get": { "tags": [ "Approval requests" ], "summary": "各種申請の取得", "description": "\n

概要

\n\n

指定した事業所の各種申請を取得する

\n\n

各種申請APIの使い方については、freee会計の各種申請APIの使い方をご参照ください

\n\n

注意点

\n", "operationId": "get_approval_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/approvalRequestResponse" } } } }, "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": [ "Approval requests" ], "summary": "各種申請の更新", "description": "\n

概要

\n\n

指定した事業所の各種申請を更新する

\n\n

各種申請APIの使い方については、freee会計の各種申請APIの使い方をご参照ください

\n\n

注意点

\n", "operationId": "update_approval_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/approvalRequestUpdateParams" } }, "application/x-www-form-urlencoded": { "schema": { "$ref": "#/components/schemas/approvalRequestUpdateParams" } } }, "required": true }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/approvalRequestResponse" } } } }, "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": [ "Approval requests" ], "summary": "各種申請の削除", "description": "\n

概要

\n\n

指定した事業所の各種申請を削除する

\n\n

各種申請APIの使い方については、freee会計の各種申請APIの使い方をご参照ください

\n\n

注意点

\n", "operationId": "destroy_approval_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/approval_requests/{id}/actions": { "post": { "tags": [ "Approval requests" ], "summary": "各種申請の承認操作", "description": "\n

概要

\n\n

指定した事業所の各種申請の承認操作を行う

\n\n

各種申請APIの使い方については、freee会計の各種申請APIの使い方をご参照ください

\n\n

注意点

\n", "operationId": "update_approval_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/approvalRequestActionCreateParams" } }, "application/x-www-form-urlencoded": { "schema": { "$ref": "#/components/schemas/approvalRequestActionCreateParams" } } }, "required": true }, "responses": { "201": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/approvalRequestResponse" } } } }, "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": { "get": { "tags": [ "Approval requests" ], "summary": "各種申請の申請フォーム一覧の取得", "description": "\n

概要

\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

指定した事業所の各種申請の申請フォームを取得する

\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

指定した事業所の購買申請一覧を取得する

\n\n

注意点

\n\n", "operationId": "get_purchase_requests", "parameters": [ { "name": "company_id", "in": "query", "description": "事業所ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 } }, { "name": "limit", "in": "query", "description": "1ページあたりの取得件数(20, 50, 100, 200, 500)", "required": false, "schema": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 500 } }, { "name": "offset", "in": "query", "description": "取得開始位置(0から始まる)", "required": false, "schema": { "type": "integer", "format": "int64", "minimum": 0 } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/purchaseRequestsIndexResponse" } } } }, "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" } } } } } }, "post": { "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": "

概要

\n\n

指定した事業所の購買申請を取得する

", "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": "

概要

\n\n

指定した事業所の購買申請を更新する

", "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": "

概要

\n\n

指定した事業所の購買申請を削除する

", "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

注意点

\n\n", "operationId": "get_purchase_requests_forms", "parameters": [ { "name": "company_id", "in": "query", "description": "事業所ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 } }, { "name": "status", "in": "query", "description": "ステータス(draft: 申請で使用しない、active: 申請で使用する、deleted: 削除済み)。未指定の場合はすべてのステータスの申請フォームを返します。", "required": false, "schema": { "type": "string", "enum": [ "draft", "active", "deleted" ] } }, { "name": "limit", "in": "query", "description": "1ページあたりの取得件数(1〜500)", "required": false, "schema": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 500 } }, { "name": "offset", "in": "query", "description": "取得開始位置(0から始まる)", "required": false, "schema": { "type": "integer", "format": "int64", "minimum": 0 } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/purchaseRequestFormIndexResponse" } } } }, "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/purchase_requests/forms/{id}": { "get": { "tags": [ "Purchase requests" ], "summary": "購買申請の申請フォーム詳細の取得", "description": "

概要

\n\n

指定した事業所の購買申請の申請フォーム詳細を取得する

\n\n

注意点

\n\n", "operationId": "get_purchase_requests_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/purchaseRequestFormDetailResponse" } } } }, "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}/actions": { "post": { "tags": [ "Purchase requests" ], "summary": "購買申請の承認操作", "description": "

概要

\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

指定した事業所の申請経路一覧を取得する

\n\n

各種申請APIの使い方については、freee会計の各種申請APIの使い方をご参照ください

\n

経費精算APIの使い方については、freee会計の経費精算APIの使い方をご参照ください

\n\n

注意点

\n\n", "operationId": "get_approval_flow_routes", "parameters": [ { "name": "company_id", "in": "query", "description": "事業所ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 }, "example": 1 }, { "name": "included_user_id", "in": "query", "description": "経路に含まれるユーザーのユーザーID(指定したユーザーが承認ステップの承認者に含まれる申請経路に絞り込めます)", "schema": { "type": "integer", "format": "int64", "minimum": 1 }, "example": 1 }, { "name": "usage", "in": "query", "description": "申請種別(各申請種別が使用できる申請経路に絞り込めます。例えば、ApprovalRequest を指定すると、各種申請が使用できる申請経路に絞り込めます。未指定の場合は全ての申請種別の申請経路が対象になります。)\n* `TxnApproval` - 仕訳承認\n* `ExpenseApplication` - 経費精算\n* `PaymentRequest` - 支払依頼\n* `ApprovalRequest` - 各種申請\n* `DocApproval` - 請求書等 (見積書・納品書・請求書・発注書)", "schema": { "type": "string", "enum": [ "TxnApproval", "ExpenseApplication", "PaymentRequest", "ApprovalRequest", "DocApproval" ] }, "example": "ApprovalRequest" }, { "name": "request_form_id", "in": "query", "description": "申請フォームID(指定した申請フォームが使用できる申請経路に絞り込めます。usage に ApprovalRequest を指定した場合のみ有効で、usage が ApprovalRequest 以外または未指定の場合、このパラメータは無視されます。指定した申請フォームが存在しない場合や無効な場合は空配列が返ります。)", "schema": { "type": "integer", "format": "int64", "minimum": 1 }, "example": 1 } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/approvalFlowRoutesIndexResponse" } } } }, "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/{id}": { "get": { "tags": [ "Approval flow routes" ], "summary": "申請経路の取得", "description": "\n

概要

\n\n

指定した事業所の申請経路を取得する

\n\n

各種申請APIの使い方については、freee会計の各種申請APIの使い方をご参照ください

\n

経費精算APIの使い方については、freee会計の経費精算APIの使い方をご参照ください

\n\n

注意点

\n\n", "operationId": "get_approval_flow_route", "parameters": [ { "name": "id", "in": "path", "description": "申請経路ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 }, "example": 1 }, { "name": "company_id", "in": "query", "description": "事業所ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 }, "example": 1 } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/approvalFlowRouteResponse" } } } }, "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/segments/{segment_id}/tags": { "get": { "tags": [ "Segment tags" ], "summary": "セグメントタグ一覧の取得", "description": "

概要

\n

指定した事業所に登録されているセグメントタグの一覧を取得します。取引や振替伝票の明細に付与するセグメントタグを参照する用途を想定しています。

\n

注意点

\n", "operationId": "get_segment_tags", "parameters": [ { "name": "company_id", "in": "query", "description": "取得対象の事業所ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1, "example": 1 } }, { "name": "segment_id", "in": "path", "description": "セグメント区分(1、2、3のいずれか)。利用できる区分は事業所の契約プランによって異なります。", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 3, "example": 1 } }, { "name": "offset", "in": "query", "description": "取得レコードのオフセット (デフォルト: 0)", "schema": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 9223372036854775807, "example": 0 } }, { "name": "limit", "in": "query", "description": "取得レコードの件数 (デフォルト: 20, 最小: 1, 最大: 500) ", "schema": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 500, "example": 20 } }, { "name": "start_update_date", "in": "query", "description": "更新日で絞り込む開始日 (yyyy-mm-dd, JST)。指定日を含む、それ以降に更新されたセグメントタグを対象にします。", "schema": { "type": "string", "example": "2026-07-01" } }, { "name": "end_update_date", "in": "query", "description": "更新日で絞り込む終了日 (yyyy-mm-dd, JST)。指定日を含む、それ以前に更新されたセグメントタグを対象にします。", "schema": { "type": "string", "example": "2026-07-31" } } ], "responses": { "200": { "description": "セグメントタグの一覧", "content": { "application/json": { "schema": { "type": "object", "required": [ "segment_tags" ], "properties": { "segment_tags": { "type": "array", "description": "セグメントタグの一覧", "items": { "$ref": "#/components/schemas/segment_tag" } } } } } } }, "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": [ "Segment tags" ], "summary": "セグメントタグの作成", "description": "

概要

\n

指定した事業所のセグメント区分に、新しいセグメントタグを作成します。作成したタグは取引や振替伝票の明細に付与できます。

\n

注意点

\n", "operationId": "create_segment_tag", "parameters": [ { "name": "segment_id", "in": "path", "description": "セグメント区分(1、2、3のいずれか)。利用できる区分は事業所の契約プランによって異なります。", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 3, "example": 1 } } ], "requestBody": { "description": "作成するセグメントタグの情報", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/segmentTagParams" } }, "application/x-www-form-urlencoded": { "schema": { "$ref": "#/components/schemas/segmentTagParams" } } }, "required": true }, "responses": { "201": { "description": "セグメントタグを作成しました", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/segmentTagResponse" } } } }, "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/segments/{segment_id}/tags/{id}": { "put": { "tags": [ "Segment tags" ], "summary": "セグメントタグの更新", "description": "

概要

\n

セグメントタグIDを指定して、セグメントタグの情報を更新します。このAPIはセグメントタグの作成は行いません。

\n

注意点

\n", "operationId": "update_segment_tag", "parameters": [ { "name": "segment_id", "in": "path", "description": "セグメント区分(1、2、3のいずれか)。利用できる区分は事業所の契約プランによって異なります。", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 3, "example": 1 } }, { "name": "id", "in": "path", "description": "更新対象のセグメントタグID。一覧取得APIのレスポンスに含まれる id を指定します。", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1, "example": 101 } } ], "requestBody": { "description": "更新後のセグメントタグの情報", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/segmentTagParams" } }, "application/x-www-form-urlencoded": { "schema": { "$ref": "#/components/schemas/segmentTagParams" } } }, "required": true }, "responses": { "200": { "description": "セグメントタグを更新しました", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/segmentTagResponse" } } } }, "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": "指定したセグメントタグIDに該当するタグが存在しないか、既に削除されています", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/badRequestNotFoundError" } } } }, "500": { "description": "内部エラーが発生しました", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/internalServerError" } } } } } }, "delete": { "tags": [ "Segment tags" ], "summary": "セグメントタグの削除", "description": "

概要

\n

セグメントタグIDを指定して、セグメントタグを削除します。

\n

注意点

\n", "operationId": "destroy_segments_tag", "parameters": [ { "name": "segment_id", "in": "path", "description": "セグメント区分(1、2、3のいずれか)。利用できる区分は事業所の契約プランによって異なります。", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 3, "example": 1 } }, { "name": "id", "in": "path", "description": "削除対象のセグメントタグID。一覧取得APIのレスポンスに含まれる id を指定します。", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1, "example": 101 } }, { "name": "company_id", "in": "query", "description": "削除対象のセグメントタグが属する事業所ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1, "example": 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": "指定したセグメントタグIDに該当するタグが存在しないか、既に削除されています", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/badRequestNotFoundError" } } } }, "500": { "description": "内部エラーが発生しました", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/internalServerError" } } } } } } }, "/api/1/segments/{segment_id}/tags/code/upsert": { "put": { "tags": [ "Segment tags" ], "summary": "セグメントタグの更新(作成)", "description": "

概要

\n

セグメントタグコード(code)をキーにセグメントタグを更新し、該当するタグが存在しない場合は新規作成します。外部システムとの連携でセグメントタグマスタを登録・更新する用途を想定しています。

\n

注意点

\n", "operationId": "upsert_segment_tag", "parameters": [ { "name": "segment_id", "in": "path", "description": "セグメント区分(1、2、3のいずれか)。利用できる区分は事業所の契約プランによって異なります。", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 3, "example": 1 } } ], "requestBody": { "description": "更新または作成するセグメントタグのコードと属性", "content": { "application/json": { "schema": { "type": "object", "required": [ "company_id", "code", "segment_tag" ], "properties": { "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメントタグを更新・作成する対象の事業所ID", "example": 1 }, "code": { "type": "string", "maxLength": 20, "description": "セグメントタグコード (20文字以内、半角英数字・ハイフン・アンダースコアのみ)。更新・作成対象を特定するキーであり、このコード自体は変更できません。", "example": "code001", "pattern": "^[0-9a-zA-Z_-]+$" }, "segment_tag": { "type": "object", "description": "セグメントタグに設定する内容。code(セグメントタグコード)はこのオブジェクト内には指定できません。", "required": [ "name" ], "properties": { "name": { "maxLength": 100, "type": "string", "description": "セグメントタグ名 (100文字以内)。事業所内の同じセグメント区分で重複できません。", "example": "プロジェクトA" }, "description": { "maxLength": 30, "type": "string", "nullable": true, "description": "備考 (30文字以内)。省略した場合は未設定(null)になります。", "example": "新規事業の収支管理用" }, "shortcut1": { "type": "string", "maxLength": 20, "nullable": true, "description": "ショートカット1 (20文字以内)。Web画面などでセグメントタグを検索する際のキーワードとして使用します。省略した場合は未設定(null)になります。", "example": "PROJECT" }, "shortcut2": { "type": "string", "maxLength": 20, "nullable": true, "description": "ショートカット2 (20文字以内)。Web画面などでセグメントタグを検索する際のキーワードとして使用します。省略した場合は未設定(null)になります。", "example": "123" } } } } } }, "application/x-www-form-urlencoded": { "schema": { "$ref": "#/paths/~1api~11~1segments~1%7Bsegment_id%7D~1tags~1code~1upsert/put/requestBody/content/application~1json/schema" } } }, "required": true }, "responses": { "200": { "description": "既存のセグメントタグを更新しました", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/segmentTagResponse" } } } }, "201": { "description": "セグメントタグを作成しました", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/segmentTagResponse" } } } }, "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/fixed_assets": { "get": { "tags": [ "Fixed assets" ], "summary": "固定資産一覧の取得", "description": "

概要

\n

指定した事業所の固定資産一覧を取得する

\n

target_dateで指定した会計期間に償却データが存在する固定資産を、固定資産IDの昇順で返します。

\n\n

定義

\n\n

注意点

\n", "operationId": "get_fixed_assets", "parameters": [ { "name": "company_id", "in": "query", "description": "事業所ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1, "example": 1000001 } }, { "name": "target_date", "in": "query", "description": "表示したい会計期間の開始年月日 (yyyy-mm-dd)。開始年月日以外を指定した場合は、その日付が含まれる会計期間が対象となります。", "required": true, "schema": { "type": "string", "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$" }, "example": "2020-01-01" }, { "name": "offset", "in": "query", "description": "取得レコードのオフセット (デフォルト: 0)。2ページ目以降を取得する場合に、先頭からスキップする件数を指定します", "schema": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647 }, "example": 0 }, { "name": "limit", "in": "query", "description": "取得レコードの件数 (デフォルト: 50, 最小: 1, 最大: 200)", "schema": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 200 }, "example": 50 } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/fixedAssetResponse" } } } }, "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_groups": { "post": { "tags": [ "Account groups" ], "summary": "決算書表示名の作成", "description": "\n

概要

\n

指定した事業所の決算書表示名(小カテゴリー)を作成する

\n

決算書表示名は、貸借対照表・損益計算書などの決算書上で勘定科目をまとめて表示するための表示名です。勘定科目カテゴリー(中分類)の配下に作成され、勘定科目の作成・更新時に決算書表示名として指定できるようになります。

\n\n

注意点

\n", "operationId": "create_account_group", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/accountGroupCreateParams" } } }, "required": true }, "responses": { "201": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/accountGroupCreateResponse" } } } }, "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/user_matchers": { "get": { "tags": [ "User matchers" ], "summary": "自動登録ルール一覧の取得", "description": "\n

概要

\n\n

指定した事業所の自動登録ルール一覧を取得する

\n\n

自動登録ルールとは、口座から同期された明細(入出金データ)の内容をもとに、取引や振替の登録・推測を自動で行うためのルールです。

\n\n

注意点

\n", "operationId": "get_user_matchers", "parameters": [ { "name": "company_id", "in": "query", "description": "事業所ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 }, "example": 1 }, { "name": "limit", "in": "query", "description": "取得レコードの件数 (デフォルト: 30, 最大: 100)", "schema": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 100, "default": 30 }, "example": 50 }, { "name": "offset", "in": "query", "description": "取得レコードのオフセット (デフォルト: 0)。offsetはlimitの倍数である必要があります。", "schema": { "type": "integer", "format": "int64", "minimum": 0, "default": 0 }, "example": 30 }, { "name": "walletable", "in": "query", "description": "口座名で絞込 (完全一致)。指定した名前の口座が事業所に存在しない場合は空の一覧が返ります。", "schema": { "type": "string" }, "example": "事業用口座" }, { "name": "description", "in": "query", "description": "説明文で絞込 (部分一致)", "schema": { "type": "string" }, "example": "スターバックス" }, { "name": "active", "in": "query", "description": "有効/無効/全てで絞込 (有効: active, 無効: inactive, 全て: all)。未指定の場合は有効なルールのみが返ります。", "schema": { "type": "string", "enum": [ "active", "inactive", "all" ], "default": "active" }, "example": "active" }, { "name": "act", "in": "query", "description": "登録タイプで絞込\n* 0: 取引を推測する(manual_standard)\n* 1: 取引を登録する(auto_standard)\n* 2: 振替を推測する(manual_transfer)\n* 3: 振替を登録する(auto_transfer)\n* 4: 無視する取引を登録する(auto_ignore)\n* 5: 取引テンプレートを推測する(manual_template)\n* 6: 未決済取引の消込を推測する(manual_scrub)\n* 7: 未決済取引の消込を登録する(auto_scrub)\n* 8: 一括振込ファイル消込を推測する(manual_output_zengin_scrub)\n* 9: 一括振込ファイル消込を登録する(auto_output_zengin_scrub)\n* 10: 無視する取引を推測する(manual_ignore)\n* 11: プライベート取引を推測する(manual_private)\n* 12: プライベート取引を登録する(auto_private)\n", "schema": { "type": "integer", "format": "int64", "enum": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 ] }, "example": 1 }, { "name": "created_by", "in": "query", "description": "作成経由で絞込\n* 0: ユーザーが作成(user)\n* 1: freeeが作成(freee)\n", "schema": { "type": "integer", "format": "int64", "enum": [ 0, 1 ] }, "example": 0 }, { "name": "min_amount", "in": "query", "description": "最小金額で絞込 (単位: 円)。ルールに設定された最小金額(min_amount)が指定値以上のルールを返します。", "schema": { "type": "integer", "format": "int64" }, "example": 1000 }, { "name": "max_amount", "in": "query", "description": "最大金額で絞込 (単位: 円)。ルールに設定された最大金額(max_amount)が指定値以下のルールを返します。", "schema": { "type": "integer", "format": "int64" }, "example": 10000 }, { "name": "min_priority", "in": "query", "description": "最小優先度で絞込。優先度(priority)が指定値以上のルールを返します。", "schema": { "type": "integer", "format": "int64" }, "example": 1 }, { "name": "max_priority", "in": "query", "description": "最大優先度で絞込。優先度(priority)が指定値以下のルールを返します。", "schema": { "type": "integer", "format": "int64" }, "example": 10 }, { "name": "min_corrected_wallet_txn_count", "in": "query", "description": "最小正答件数で絞込。適用明細数(corrected_wallet_txn_count)が指定値以上のルールを返します。", "schema": { "type": "integer", "format": "int64" }, "example": 1 }, { "name": "max_corrected_wallet_txn_count", "in": "query", "description": "最大正答件数で絞込。適用明細数(corrected_wallet_txn_count)が指定値以下のルールを返します。", "schema": { "type": "integer", "format": "int64" }, "example": 100 }, { "name": "min_corrected_wallet_txn_count_percentage", "in": "query", "description": "最小正答率で絞込 (単位: パーセント)。適用率(corrected_wallet_txn_count_percentage)が指定値以上のルールを返します。", "schema": { "type": "integer", "format": "int64" }, "example": 50 }, { "name": "max_corrected_wallet_txn_count_percentage", "in": "query", "description": "最大正答率で絞込 (単位: パーセント)。適用率(corrected_wallet_txn_count_percentage)が指定値以下のルールを返します。", "schema": { "type": "integer", "format": "int64" }, "example": 100 }, { "name": "card_label_id", "in": "query", "description": "カードラベルIDで絞込", "schema": { "type": "integer", "format": "int64" }, "example": 1 }, { "name": "entry_side_str", "in": "query", "description": "入金/出金で絞込 (入金: income, 出金: expense)", "schema": { "type": "string", "enum": [ "income", "expense" ] }, "example": "expense" } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "type": "object", "required": [ "id", "entry_side_str", "description", "condition", "priority", "act", "active" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "自動登録ルールID", "example": 101 }, "entry_side_str": { "type": "string", "description": "入金/出金\n* income: 入金\n* expense: 出金\n", "enum": [ "income", "expense" ], "example": "expense" }, "description": { "type": "string", "description": "説明文。明細の取引内容とのマッチングに使用される文字列です。condition=4(指定なし)の場合は空文字列が返ります。", "example": "スターバックス" }, "condition": { "type": "integer", "description": "マッチ条件\n* 0: 部分一致(partial)\n* 1: 前方一致(forward)\n* 2: 後方一致(backward)\n* 3: 完全一致(exact)\n* 4: 指定なし(wildcard)\n", "enum": [ 0, 1, 2, 3, 4 ], "example": 0 }, "priority": { "type": "integer", "description": "優先度", "example": 10 }, "act": { "type": "integer", "description": "登録タイプ\n* 0: 取引を推測する(manual_standard)\n* 1: 取引を登録する(auto_standard)\n* 2: 振替を推測する(manual_transfer)\n* 3: 振替を登録する(auto_transfer)\n* 4: 無視する取引を登録する(auto_ignore)\n* 5: 取引テンプレートを推測する(manual_template)\n* 6: 未決済取引の消込を推測する(manual_scrub)\n* 7: 未決済取引の消込を登録する(auto_scrub)\n* 8: 一括振込ファイル消込を推測する(manual_output_zengin_scrub)\n* 9: 一括振込ファイル消込を登録する(auto_output_zengin_scrub)\n* 10: 無視する取引を推測する(manual_ignore)\n* 11: プライベート取引を推測する(manual_private)\n* 12: プライベート取引を登録する(auto_private)\n\nactの種類により、返されるフィールド(tax_name、account_item_name、deal_description等)が異なります。\n", "enum": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 ], "example": 1 }, "tax_name": { "type": "string", "nullable": true, "description": "税区分名\nact=0,1(取引を推測/登録)の場合のみ値が返ります。\n", "example": "課対仕入10%" }, "min_amount": { "type": "integer", "nullable": true, "description": "最小金額 (単位: 円)。ルールが未設定の場合はnullが返ります。", "example": 1000 }, "max_amount": { "type": "integer", "nullable": true, "description": "最大金額 (単位: 円)。ルールが未設定の場合はnullが返ります。", "example": 10000 }, "deal_description": { "type": "string", "nullable": true, "description": "取引の備考\nact=0,1,2,3の場合のみ値が返ります。act=4,10,11,12では常にnullです。\n", "example": "打ち合わせ用コーヒー代" }, "walletable": { "type": "string", "nullable": true, "description": "口座名", "example": "事業用口座" }, "transfer_walletable": { "type": "string", "nullable": true, "description": "振替先口座名\nact=2,3(振替を推測/登録)の場合のみ値が返ります。\n", "example": "事業用クレジットカード" }, "account_item_name": { "type": "string", "nullable": true, "description": "勘定科目名\nact=0,1(取引を推測/登録)の場合のみ値が返ります。\n", "example": "会議費" }, "partner_name": { "type": "string", "nullable": true, "description": "取引先名\nact=0,1(取引を推測/登録)の場合のみ値が返ります。\n", "example": "スターバックス" }, "item_name": { "type": "string", "nullable": true, "description": "品目名\nact=0,1(取引を推測/登録)の場合のみ値が返ります。\n", "example": "コーヒー豆" }, "section_name": { "type": "string", "nullable": true, "description": "部門名\nact=0,1(取引を推測/登録)の場合のみ値が返ります。\n", "example": "営業部" }, "division_tag_1_name": { "type": "string", "nullable": true, "description": "セグメント1タグ名\nact=0,1(取引を推測/登録)の場合のみ値が返ります。\n", "example": "東日本" }, "division_tag_2_name": { "type": "string", "nullable": true, "description": "セグメント2タグ名\nact=0,1(取引を推測/登録)の場合のみ値が返ります。\n", "example": "小売事業" }, "division_tag_3_name": { "type": "string", "nullable": true, "description": "セグメント3タグ名\nact=0,1(取引を推測/登録)の場合のみ値が返ります。\n", "example": "第一営業所" }, "default_tag_names": { "type": "array", "nullable": true, "description": "メモタグ名の配列\nact=0,1(取引を推測/登録)の場合のみ値が返ります。メモタグが1つも設定されていない場合はnullが返ります。\n", "items": { "type": "string" }, "example": [ "出張", "会議" ] }, "last_updated_user_id": { "type": "integer", "nullable": true, "description": "最終更新ユーザーID\n* 0: freeeシステムによる更新\n", "example": 1 }, "user_name": { "type": "string", "nullable": true, "description": "最終更新ユーザー名。表示名が未設定の場合はメールアドレスが返ります。freeeシステムによる更新の場合は「freee」、ユーザー情報を取得できない場合は「-」が返ります。", "example": "freee 太郎" }, "updated_at": { "type": "string", "nullable": true, "description": "更新日 (yyyy-mm-dd)", "example": "2026-08-01" }, "corrected_wallet_txn_count": { "type": "integer", "nullable": true, "description": "適用明細数(正答件数)。統計情報が存在しない場合はnullが返ります。", "example": 10 }, "corrected_wallet_txn_count_percentage": { "type": "integer", "nullable": true, "description": "適用率(正答率、パーセント)。統計情報が存在しない場合はnullが返ります。", "example": 80 }, "qualified_invoice_setting": { "type": "string", "nullable": true, "description": "適格請求書等\n* non_qualified: 該当しない\n* qualified: 該当する\n* depends_on_partner: 取引先情報に準拠\n", "enum": [ "non_qualified", "qualified", "depends_on_partner" ], "example": "qualified" }, "suggest_tax_from_walletable_invoice": { "type": "boolean", "nullable": true, "description": "購入データ原本に準拠\n* true: 準拠する\n* false: 準拠しない\n", "example": false }, "card_label": { "type": "string", "nullable": true, "description": "カードラベル", "example": "本人" }, "card_label_id": { "type": "integer", "format": "int64", "nullable": true, "description": "カードラベルID", "example": 1 }, "active": { "type": "boolean", "description": "有効/無効\n* true: 有効\n* false: 無効\n", "example": true } } } } } } } } }, "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" } } } } } }, "post": { "tags": [ "User matchers" ], "summary": "自動登録ルールの作成", "description": "\n

概要

\n\n

指定した事業所の自動登録ルールを作成する

\n\n

注意点

\n", "operationId": "create_user_matcher", "parameters": [ { "name": "company_id", "in": "query", "description": "事業所ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 }, "example": 1 } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "act", "active", "condition", "description", "entry_side_str", "priority" ], "properties": { "act": { "type": "integer", "description": "登録タイプ\n* 0: 取引を推測する(manual_standard)\n* 1: 取引を登録する(auto_standard)\n* 2: 振替を推測する(manual_transfer)\n* 3: 振替を登録する(auto_transfer)\n* 4: 無視する取引を登録する(auto_ignore)\n* 10: 無視する取引を推測する(manual_ignore)\n* 11: プライベート取引を推測する(manual_private)\n* 12: プライベート取引を登録する(auto_private)\n\nこのAPIでは以下のactは非対応です:\n5(manual_template), 6(manual_scrub), 7(auto_scrub), 8(manual_output_zengin_scrub), 9(auto_output_zengin_scrub)\n", "enum": [ 0, 1, 2, 3, 4, 10, 11, 12 ], "example": 1 }, "active": { "type": "boolean", "description": "有効/無効\n* true: 有効\n* false: 無効\n", "example": true }, "condition": { "type": "integer", "description": "マッチ条件\n* 0: 部分一致(partial)\n* 1: 前方一致(forward)\n* 2: 後方一致(backward)\n* 3: 完全一致(exact)\n* 4: 指定なし(wildcard)\n", "enum": [ 0, 1, 2, 3, 4 ], "example": 0 }, "description": { "type": "string", "description": "説明文。明細の取引内容とマッチングする文字列を指定します。condition=4(指定なし)の場合は無視されます。", "example": "スターバックス" }, "entry_side_str": { "type": "string", "description": "入金/出金\n* income: 入金\n* expense: 出金\n", "enum": [ "income", "expense" ], "example": "expense" }, "priority": { "type": "integer", "description": "優先度", "example": 10 }, "tax_name": { "type": "string", "nullable": true, "description": "税区分名\nact=0,1(取引を推測/登録)の場合は必須。他のactでは指定しても無視されます。\n", "example": "課対仕入10%" }, "walletable": { "type": "string", "nullable": true, "description": "口座名。事業所に登録されている口座の名前を指定します。", "example": "事業用口座" }, "card_label": { "type": "string", "nullable": true, "description": "カードラベル", "example": "本人" }, "card_label_id": { "type": "integer", "nullable": true, "description": "カードラベルID", "example": 1 }, "transfer_walletable": { "type": "string", "nullable": true, "description": "振替先口座名\nact=2,3(振替を推測/登録)の場合に使用。他のactでは指定しても無視されます。\n", "example": "事業用クレジットカード" }, "min_amount": { "type": "integer", "nullable": true, "description": "最小金額 (単位: 円)", "example": 1000 }, "max_amount": { "type": "integer", "nullable": true, "description": "最大金額 (単位: 円)", "example": 10000 }, "deal_description": { "type": "string", "nullable": true, "description": "取引の備考\nact=4,10,11,12(無視/プライベート)では指定しても無視されます。\n", "example": "打ち合わせ用コーヒー代" }, "qualified_invoice_setting": { "type": "string", "nullable": true, "description": "適格請求書等\n* non_qualified: 該当しない\n* qualified: 該当する\n* depends_on_partner: 取引先情報に準拠\nact=0,1(取引を推測/登録)の場合のみ使用可能。他のactでは指定しても無視されます。\ndepends_on_partnerを指定する場合は、partner_nameの指定が必要です。\n", "enum": [ "non_qualified", "qualified", "depends_on_partner" ], "example": "qualified" }, "suggest_tax_from_walletable_invoice": { "type": "boolean", "nullable": true, "description": "購入データ原本に準拠\n* true: 準拠する\n* false: 準拠しない\nact=0,1(取引を推測/登録)かつ購入データ原本に対応した口座を指定した場合のみ使用可能。それ以外では指定しても無視されます。\n", "example": false }, "account_item_name": { "type": "string", "nullable": true, "description": "勘定科目名\nact=0,1(取引を推測/登録)の場合は必須。他のactでは指定しても無視されます。\n", "example": "会議費" }, "partner_name": { "type": "string", "nullable": true, "description": "取引先名\nact=0,1(取引を推測/登録)の場合のみ使用可能。他のactでは指定しても無視されます。\n指定した名前が登録されていない場合、新規にタグとして作成されます。\n", "example": "スターバックス" }, "item_name": { "type": "string", "nullable": true, "description": "品目名\nact=0,1(取引を推測/登録)の場合のみ使用可能。他のactでは指定しても無視されます。\n指定した名前が登録されていない場合、新規にタグとして作成されます。\n", "example": "コーヒー豆" }, "section_name": { "type": "string", "nullable": true, "description": "部門名\nact=0,1(取引を推測/登録)の場合のみ使用可能。他のactでは指定しても無視されます。\n指定した名前が登録されていない場合、新規にタグとして作成されます。\n", "example": "営業部" }, "division_tag_1_name": { "type": "string", "nullable": true, "description": "セグメント1タグ名\nact=0,1(取引を推測/登録)の場合のみ使用可能。他のactでは指定しても無視されます。\n指定した名前が登録されていない場合、新規にタグとして作成されます。\n", "example": "東日本" }, "division_tag_2_name": { "type": "string", "nullable": true, "description": "セグメント2タグ名\nact=0,1(取引を推測/登録)の場合のみ使用可能。他のactでは指定しても無視されます。\n指定した名前が登録されていない場合、新規にタグとして作成されます。\n", "example": "小売事業" }, "division_tag_3_name": { "type": "string", "nullable": true, "description": "セグメント3タグ名\nact=0,1(取引を推測/登録)の場合のみ使用可能。他のactでは指定しても無視されます。\n指定した名前が登録されていない場合、新規にタグとして作成されます。\n", "example": "第一営業所" }, "default_tag_names": { "type": "array", "nullable": true, "description": "メモタグ名の配列\nact=0,1(取引を推測/登録)の場合のみ使用可能。他のactでは指定しても無視されます。\n指定した名前が登録されていない場合、新規にタグとして作成されます。\n", "items": { "type": "string" }, "example": [ "出張", "会議" ] } } } } } }, "responses": { "201": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "id", "entry_side_str", "description", "condition", "priority", "act", "active", "user_name", "last_updated_user_id", "qualified_invoice_setting", "suggest_tax_from_walletable_invoice" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "自動登録ルールID", "example": 101 }, "entry_side_str": { "type": "string", "description": "入金/出金\n* income: 入金\n* expense: 出金\n", "enum": [ "income", "expense" ], "example": "expense" }, "description": { "type": "string", "description": "説明文。明細の取引内容とのマッチングに使用される文字列です。condition=4(指定なし)の場合は空文字列が返ります。", "example": "スターバックス" }, "condition": { "type": "integer", "description": "マッチ条件\n* 0: 部分一致(partial)\n* 1: 前方一致(forward)\n* 2: 後方一致(backward)\n* 3: 完全一致(exact)\n* 4: 指定なし(wildcard)\n", "enum": [ 0, 1, 2, 3, 4 ], "example": 0 }, "priority": { "type": "integer", "description": "優先度", "example": 10 }, "act": { "type": "integer", "description": "登録タイプ\n* 0: 取引を推測する(manual_standard)\n* 1: 取引を登録する(auto_standard)\n* 2: 振替を推測する(manual_transfer)\n* 3: 振替を登録する(auto_transfer)\n* 4: 無視する取引を登録する(auto_ignore)\n* 10: 無視する取引を推測する(manual_ignore)\n* 11: プライベート取引を推測する(manual_private)\n* 12: プライベート取引を登録する(auto_private)\n\nこのAPIでは以下のactは非対応です(show時は400エラー、create/update時は指定不可):\n5(manual_template), 6(manual_scrub), 7(auto_scrub), 8(manual_output_zengin_scrub), 9(auto_output_zengin_scrub)\n\nactの種類により、返されるフィールド(tax_name、account_item_name、deal_description等)が異なります。\n", "enum": [ 0, 1, 2, 3, 4, 10, 11, 12 ], "example": 1 }, "tax_name": { "type": "string", "nullable": true, "description": "税区分名\nact=0,1(取引を推測/登録)の場合のみ値が返ります。\n", "example": "課対仕入10%" }, "tax_code": { "type": "integer", "nullable": true, "description": "税区分コード。税区分名(tax_name)に対応するコードです。", "example": 136 }, "suggested_tax_name": { "type": "string", "nullable": true, "description": "勘定科目の設定に基づいてシステムが推測した税区分名。画面には表示されません。", "example": "課対仕入10%" }, "min_amount": { "type": "integer", "nullable": true, "description": "最小金額 (単位: 円)。ルールが未設定の場合はnullが返ります。", "example": 1000 }, "max_amount": { "type": "integer", "nullable": true, "description": "最大金額 (単位: 円)。ルールが未設定の場合はnullが返ります。", "example": 10000 }, "deal_description": { "type": "string", "nullable": true, "description": "取引の備考\nact=0,1,2,3の場合のみ値が返ります。act=4,10,11,12では常にnullです。\n", "example": "打ち合わせ用コーヒー代" }, "walletable": { "type": "string", "nullable": true, "description": "口座名", "example": "事業用口座" }, "transfer_walletable": { "type": "string", "nullable": true, "description": "振替先口座名\nact=2,3(振替を推測/登録)の場合のみ値が返ります。\n", "example": "事業用クレジットカード" }, "origin_deal_id": { "type": "integer", "format": "int64", "nullable": true, "description": "元取引ID。このルールの作成元となった取引のIDです。freeeが自動作成したルールの場合のみ値が返ります。", "example": 501 }, "origin_deal_code": { "type": "integer", "nullable": true, "description": "元取引コード", "example": 12 }, "last_updated_user_id": { "type": "integer", "description": "最終更新ユーザーID\n* 0: freeeシステムによる更新\n", "example": 1 }, "user_name": { "type": "string", "description": "最終更新ユーザー名。表示名が未設定の場合はメールアドレスが返ります。freeeシステムによる更新の場合は「freee」、ユーザー情報を取得できない場合は「-」が返ります。", "example": "freee 太郎" }, "updated_at": { "type": "string", "nullable": true, "description": "更新日 (yyyy-mm-dd)", "example": "2026-08-01" }, "corrected_wallet_txn_count": { "type": "integer", "nullable": true, "description": "適用明細数(正答件数)。統計情報が存在しない場合はnullが返ります。", "example": 10 }, "corrected_wallet_txn_count_percentage": { "type": "integer", "nullable": true, "description": "適用率(正答率、パーセント)。統計情報が存在しない場合はnullが返ります。", "example": 80 }, "qualified_invoice_setting": { "type": "string", "nullable": true, "description": "適格請求書等\n* non_qualified: 該当しない\n* qualified: 該当する\n* depends_on_partner: 取引先情報に準拠\n", "enum": [ "non_qualified", "qualified", "depends_on_partner" ], "example": "qualified" }, "suggest_tax_from_walletable_invoice": { "type": "boolean", "nullable": true, "description": "購入データ原本に準拠\n* true: 準拠する\n* false: 準拠しない\n", "example": false }, "walletable_bank_name": { "type": "string", "nullable": true, "description": "口座の銀行名", "example": "freee銀行" }, "card_label": { "type": "string", "nullable": true, "description": "カードラベル", "example": "本人" }, "card_label_id": { "type": "integer", "format": "int64", "nullable": true, "description": "カードラベルID", "example": 1 }, "account_item_name": { "type": "string", "nullable": true, "description": "勘定科目名\nact=0,1(取引を推測/登録)の場合のみ値が返ります。\n", "example": "会議費" }, "partner_name": { "type": "string", "nullable": true, "description": "取引先名\nact=0,1(取引を推測/登録)の場合のみ値が返ります。\n", "example": "スターバックス" }, "item_name": { "type": "string", "nullable": true, "description": "品目名\nact=0,1(取引を推測/登録)の場合のみ値が返ります。\n", "example": "コーヒー豆" }, "section_name": { "type": "string", "nullable": true, "description": "部門名\nact=0,1(取引を推測/登録)の場合のみ値が返ります。\n", "example": "営業部" }, "division_tag_1_name": { "type": "string", "nullable": true, "description": "セグメント1タグ名\nact=0,1(取引を推測/登録)の場合のみ値が返ります。\n", "example": "東日本" }, "division_tag_2_name": { "type": "string", "nullable": true, "description": "セグメント2タグ名\nact=0,1(取引を推測/登録)の場合のみ値が返ります。\n", "example": "小売事業" }, "division_tag_3_name": { "type": "string", "nullable": true, "description": "セグメント3タグ名\nact=0,1(取引を推測/登録)の場合のみ値が返ります。\n", "example": "第一営業所" }, "default_tag_names": { "type": "array", "nullable": true, "description": "メモタグ名の配列\nact=0,1(取引を推測/登録)の場合のみ値が返ります。メモタグが1つも設定されていない場合はnullが返ります。\n", "items": { "type": "string" }, "example": [ "出張", "会議" ] }, "active": { "type": "boolean", "description": "有効/無効\n* true: 有効\n* false: 無効\n", "example": true } } } } } }, "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/user_matchers/{id}": { "get": { "tags": [ "User matchers" ], "summary": "自動登録ルールの取得", "description": "\n

概要

\n\n

指定した事業所の自動登録ルールを取得する

\n\n

注意点

\n", "operationId": "get_user_matcher", "parameters": [ { "name": "id", "in": "path", "description": "自動登録ルールID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 }, "example": 101 }, { "name": "company_id", "in": "query", "description": "事業所ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 }, "example": 1 } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "id", "entry_side_str", "description", "condition", "priority", "act", "active", "user_name", "last_updated_user_id", "qualified_invoice_setting", "suggest_tax_from_walletable_invoice" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "自動登録ルールID", "example": 101 }, "entry_side_str": { "type": "string", "description": "入金/出金\n* income: 入金\n* expense: 出金\n", "enum": [ "income", "expense" ], "example": "expense" }, "description": { "type": "string", "description": "説明文。明細の取引内容とのマッチングに使用される文字列です。condition=4(指定なし)の場合は空文字列が返ります。", "example": "スターバックス" }, "condition": { "type": "integer", "description": "マッチ条件\n* 0: 部分一致(partial)\n* 1: 前方一致(forward)\n* 2: 後方一致(backward)\n* 3: 完全一致(exact)\n* 4: 指定なし(wildcard)\n", "enum": [ 0, 1, 2, 3, 4 ], "example": 0 }, "priority": { "type": "integer", "description": "優先度", "example": 10 }, "act": { "type": "integer", "description": "登録タイプ\n* 0: 取引を推測する(manual_standard)\n* 1: 取引を登録する(auto_standard)\n* 2: 振替を推測する(manual_transfer)\n* 3: 振替を登録する(auto_transfer)\n* 4: 無視する取引を登録する(auto_ignore)\n* 10: 無視する取引を推測する(manual_ignore)\n* 11: プライベート取引を推測する(manual_private)\n* 12: プライベート取引を登録する(auto_private)\n\nこのAPIでは以下のactは非対応です(show時は400エラー、create/update時は指定不可):\n5(manual_template), 6(manual_scrub), 7(auto_scrub), 8(manual_output_zengin_scrub), 9(auto_output_zengin_scrub)\n\nactの種類により、返されるフィールド(tax_name、account_item_name、deal_description等)が異なります。\n", "enum": [ 0, 1, 2, 3, 4, 10, 11, 12 ], "example": 1 }, "tax_name": { "type": "string", "nullable": true, "description": "税区分名\nact=0,1(取引を推測/登録)の場合のみ値が返ります。\n", "example": "課対仕入10%" }, "tax_code": { "type": "integer", "nullable": true, "description": "税区分コード。税区分名(tax_name)に対応するコードです。", "example": 136 }, "suggested_tax_name": { "type": "string", "nullable": true, "description": "勘定科目の設定に基づいてシステムが推測した税区分名。画面には表示されません。", "example": "課対仕入10%" }, "min_amount": { "type": "integer", "nullable": true, "description": "最小金額 (単位: 円)。ルールが未設定の場合はnullが返ります。", "example": 1000 }, "max_amount": { "type": "integer", "nullable": true, "description": "最大金額 (単位: 円)。ルールが未設定の場合はnullが返ります。", "example": 10000 }, "deal_description": { "type": "string", "nullable": true, "description": "取引の備考\nact=0,1,2,3の場合のみ値が返ります。act=4,10,11,12では常にnullです。\n", "example": "打ち合わせ用コーヒー代" }, "walletable": { "type": "string", "nullable": true, "description": "口座名", "example": "事業用口座" }, "transfer_walletable": { "type": "string", "nullable": true, "description": "振替先口座名\nact=2,3(振替を推測/登録)の場合のみ値が返ります。\n", "example": "事業用クレジットカード" }, "origin_deal_id": { "type": "integer", "format": "int64", "nullable": true, "description": "元取引ID。このルールの作成元となった取引のIDです。freeeが自動作成したルールの場合のみ値が返ります。", "example": 501 }, "origin_deal_code": { "type": "integer", "nullable": true, "description": "元取引コード", "example": 12 }, "last_updated_user_id": { "type": "integer", "description": "最終更新ユーザーID\n* 0: freeeシステムによる更新\n", "example": 1 }, "user_name": { "type": "string", "description": "最終更新ユーザー名。表示名が未設定の場合はメールアドレスが返ります。freeeシステムによる更新の場合は「freee」、ユーザー情報を取得できない場合は「-」が返ります。", "example": "freee 太郎" }, "updated_at": { "type": "string", "nullable": true, "description": "更新日 (yyyy-mm-dd)", "example": "2026-08-01" }, "corrected_wallet_txn_count": { "type": "integer", "nullable": true, "description": "適用明細数(正答件数)。統計情報が存在しない場合はnullが返ります。", "example": 10 }, "corrected_wallet_txn_count_percentage": { "type": "integer", "nullable": true, "description": "適用率(正答率、パーセント)。統計情報が存在しない場合はnullが返ります。", "example": 80 }, "qualified_invoice_setting": { "type": "string", "nullable": true, "description": "適格請求書等\n* non_qualified: 該当しない\n* qualified: 該当する\n* depends_on_partner: 取引先情報に準拠\n", "enum": [ "non_qualified", "qualified", "depends_on_partner" ], "example": "qualified" }, "suggest_tax_from_walletable_invoice": { "type": "boolean", "nullable": true, "description": "購入データ原本に準拠\n* true: 準拠する\n* false: 準拠しない\n", "example": false }, "walletable_bank_name": { "type": "string", "nullable": true, "description": "口座の銀行名", "example": "freee銀行" }, "card_label": { "type": "string", "nullable": true, "description": "カードラベル", "example": "本人" }, "card_label_id": { "type": "integer", "format": "int64", "nullable": true, "description": "カードラベルID", "example": 1 }, "account_item_name": { "type": "string", "nullable": true, "description": "勘定科目名\nact=0,1(取引を推測/登録)の場合のみ値が返ります。\n", "example": "会議費" }, "partner_name": { "type": "string", "nullable": true, "description": "取引先名\nact=0,1(取引を推測/登録)の場合のみ値が返ります。\n", "example": "スターバックス" }, "item_name": { "type": "string", "nullable": true, "description": "品目名\nact=0,1(取引を推測/登録)の場合のみ値が返ります。\n", "example": "コーヒー豆" }, "section_name": { "type": "string", "nullable": true, "description": "部門名\nact=0,1(取引を推測/登録)の場合のみ値が返ります。\n", "example": "営業部" }, "division_tag_1_name": { "type": "string", "nullable": true, "description": "セグメント1タグ名\nact=0,1(取引を推測/登録)の場合のみ値が返ります。\n", "example": "東日本" }, "division_tag_2_name": { "type": "string", "nullable": true, "description": "セグメント2タグ名\nact=0,1(取引を推測/登録)の場合のみ値が返ります。\n", "example": "小売事業" }, "division_tag_3_name": { "type": "string", "nullable": true, "description": "セグメント3タグ名\nact=0,1(取引を推測/登録)の場合のみ値が返ります。\n", "example": "第一営業所" }, "default_tag_names": { "type": "array", "nullable": true, "description": "メモタグ名の配列\nact=0,1(取引を推測/登録)の場合のみ値が返ります。メモタグが1つも設定されていない場合はnullが返ります。\n", "items": { "type": "string" }, "example": [ "出張", "会議" ] }, "active": { "type": "boolean", "description": "有効/無効\n* true: 有効\n* false: 無効\n", "example": true } } } } } }, "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" } } } }, "503": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/serviceUnavailableError" } } } } } }, "put": { "tags": [ "User matchers" ], "summary": "自動登録ルールの更新", "description": "\n

概要

\n\n

指定した事業所の自動登録ルールを更新する

\n\n

注意点

\n", "operationId": "update_user_matcher", "parameters": [ { "name": "id", "in": "path", "description": "自動登録ルールID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 }, "example": 101 }, { "name": "company_id", "in": "query", "description": "事業所ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 }, "example": 1 } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "act", "active", "condition", "description", "entry_side_str", "priority" ], "properties": { "act": { "type": "integer", "description": "登録タイプ\n* 0: 取引を推測する(manual_standard)\n* 1: 取引を登録する(auto_standard)\n* 2: 振替を推測する(manual_transfer)\n* 3: 振替を登録する(auto_transfer)\n* 4: 無視する取引を登録する(auto_ignore)\n* 10: 無視する取引を推測する(manual_ignore)\n* 11: プライベート取引を推測する(manual_private)\n* 12: プライベート取引を登録する(auto_private)\n\nこのAPIでは以下のactは非対応です:\n5(manual_template), 6(manual_scrub), 7(auto_scrub), 8(manual_output_zengin_scrub), 9(auto_output_zengin_scrub)\n", "enum": [ 0, 1, 2, 3, 4, 10, 11, 12 ], "example": 1 }, "active": { "type": "boolean", "description": "有効/無効\n* true: 有効\n* false: 無効\n", "example": true }, "condition": { "type": "integer", "description": "マッチ条件\n* 0: 部分一致(partial)\n* 1: 前方一致(forward)\n* 2: 後方一致(backward)\n* 3: 完全一致(exact)\n* 4: 指定なし(wildcard)\n", "enum": [ 0, 1, 2, 3, 4 ], "example": 0 }, "description": { "type": "string", "description": "説明文。明細の取引内容とマッチングする文字列を指定します。condition=4(指定なし)の場合は無視されます。", "example": "スターバックス" }, "entry_side_str": { "type": "string", "description": "入金/出金\n* income: 入金\n* expense: 出金\n", "enum": [ "income", "expense" ], "example": "expense" }, "priority": { "type": "integer", "description": "優先度", "example": 10 }, "tax_name": { "type": "string", "nullable": true, "description": "税区分名\nact=0,1(取引を推測/登録)の場合は必須。他のactでは指定しても無視されます。\n", "example": "課対仕入10%" }, "walletable": { "type": "string", "nullable": true, "description": "口座名。事業所に登録されている口座の名前を指定します。", "example": "事業用口座" }, "card_label": { "type": "string", "nullable": true, "description": "カードラベル", "example": "本人" }, "card_label_id": { "type": "integer", "nullable": true, "description": "カードラベルID", "example": 1 }, "transfer_walletable": { "type": "string", "nullable": true, "description": "振替先口座名\nact=2,3(振替を推測/登録)の場合に使用。他のactでは指定しても無視されます。\n", "example": "事業用クレジットカード" }, "min_amount": { "type": "integer", "nullable": true, "description": "最小金額 (単位: 円)", "example": 1000 }, "max_amount": { "type": "integer", "nullable": true, "description": "最大金額 (単位: 円)", "example": 10000 }, "deal_description": { "type": "string", "nullable": true, "description": "取引の備考\nact=4,10,11,12(無視/プライベート)では指定しても無視されます。\n", "example": "打ち合わせ用コーヒー代" }, "qualified_invoice_setting": { "type": "string", "nullable": true, "description": "適格請求書等\n* non_qualified: 該当しない\n* qualified: 該当する\n* depends_on_partner: 取引先情報に準拠\nact=0,1(取引を推測/登録)の場合のみ使用可能。他のactでは指定しても無視されます。\ndepends_on_partnerを指定する場合は、partner_nameの指定が必要です。\n", "enum": [ "non_qualified", "qualified", "depends_on_partner" ], "example": "qualified" }, "suggest_tax_from_walletable_invoice": { "type": "boolean", "nullable": true, "description": "購入データ原本に準拠\n* true: 準拠する\n* false: 準拠しない\nact=0,1(取引を推測/登録)かつ購入データ原本に対応した口座を指定した場合のみ使用可能。それ以外では指定しても無視されます。\n", "example": false }, "account_item_name": { "type": "string", "nullable": true, "description": "勘定科目名\nact=0,1(取引を推測/登録)の場合は必須。他のactでは指定しても無視されます。\n", "example": "会議費" }, "partner_name": { "type": "string", "nullable": true, "description": "取引先名\nact=0,1(取引を推測/登録)の場合のみ使用可能。他のactでは指定しても無視されます。\n指定した名前が登録されていない場合、新規にタグとして作成されます。\n", "example": "スターバックス" }, "item_name": { "type": "string", "nullable": true, "description": "品目名\nact=0,1(取引を推測/登録)の場合のみ使用可能。他のactでは指定しても無視されます。\n指定した名前が登録されていない場合、新規にタグとして作成されます。\n", "example": "コーヒー豆" }, "section_name": { "type": "string", "nullable": true, "description": "部門名\nact=0,1(取引を推測/登録)の場合のみ使用可能。他のactでは指定しても無視されます。\n指定した名前が登録されていない場合、新規にタグとして作成されます。\n", "example": "営業部" }, "division_tag_1_name": { "type": "string", "nullable": true, "description": "セグメント1タグ名\nact=0,1(取引を推測/登録)の場合のみ使用可能。他のactでは指定しても無視されます。\n指定した名前が登録されていない場合、新規にタグとして作成されます。\n", "example": "東日本" }, "division_tag_2_name": { "type": "string", "nullable": true, "description": "セグメント2タグ名\nact=0,1(取引を推測/登録)の場合のみ使用可能。他のactでは指定しても無視されます。\n指定した名前が登録されていない場合、新規にタグとして作成されます。\n", "example": "小売事業" }, "division_tag_3_name": { "type": "string", "nullable": true, "description": "セグメント3タグ名\nact=0,1(取引を推測/登録)の場合のみ使用可能。他のactでは指定しても無視されます。\n指定した名前が登録されていない場合、新規にタグとして作成されます。\n", "example": "第一営業所" }, "default_tag_names": { "type": "array", "nullable": true, "description": "メモタグ名の配列\nact=0,1(取引を推測/登録)の場合のみ使用可能。他のactでは指定しても無視されます。\n指定した名前が登録されていない場合、新規にタグとして作成されます。\n", "items": { "type": "string" }, "example": [ "出張", "会議" ] } } } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "required": [ "id", "entry_side_str", "description", "condition", "priority", "act", "active", "user_name", "last_updated_user_id", "qualified_invoice_setting", "suggest_tax_from_walletable_invoice" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "自動登録ルールID", "example": 101 }, "entry_side_str": { "type": "string", "description": "入金/出金\n* income: 入金\n* expense: 出金\n", "enum": [ "income", "expense" ], "example": "expense" }, "description": { "type": "string", "description": "説明文。明細の取引内容とのマッチングに使用される文字列です。condition=4(指定なし)の場合は空文字列が返ります。", "example": "スターバックス" }, "condition": { "type": "integer", "description": "マッチ条件\n* 0: 部分一致(partial)\n* 1: 前方一致(forward)\n* 2: 後方一致(backward)\n* 3: 完全一致(exact)\n* 4: 指定なし(wildcard)\n", "enum": [ 0, 1, 2, 3, 4 ], "example": 0 }, "priority": { "type": "integer", "description": "優先度", "example": 10 }, "act": { "type": "integer", "description": "登録タイプ\n* 0: 取引を推測する(manual_standard)\n* 1: 取引を登録する(auto_standard)\n* 2: 振替を推測する(manual_transfer)\n* 3: 振替を登録する(auto_transfer)\n* 4: 無視する取引を登録する(auto_ignore)\n* 10: 無視する取引を推測する(manual_ignore)\n* 11: プライベート取引を推測する(manual_private)\n* 12: プライベート取引を登録する(auto_private)\n\nこのAPIでは以下のactは非対応です(show時は400エラー、create/update時は指定不可):\n5(manual_template), 6(manual_scrub), 7(auto_scrub), 8(manual_output_zengin_scrub), 9(auto_output_zengin_scrub)\n\nactの種類により、返されるフィールド(tax_name、account_item_name、deal_description等)が異なります。\n", "enum": [ 0, 1, 2, 3, 4, 10, 11, 12 ], "example": 1 }, "tax_name": { "type": "string", "nullable": true, "description": "税区分名\nact=0,1(取引を推測/登録)の場合のみ値が返ります。\n", "example": "課対仕入10%" }, "tax_code": { "type": "integer", "nullable": true, "description": "税区分コード。税区分名(tax_name)に対応するコードです。", "example": 136 }, "suggested_tax_name": { "type": "string", "nullable": true, "description": "勘定科目の設定に基づいてシステムが推測した税区分名。画面には表示されません。", "example": "課対仕入10%" }, "min_amount": { "type": "integer", "nullable": true, "description": "最小金額 (単位: 円)。ルールが未設定の場合はnullが返ります。", "example": 1000 }, "max_amount": { "type": "integer", "nullable": true, "description": "最大金額 (単位: 円)。ルールが未設定の場合はnullが返ります。", "example": 10000 }, "deal_description": { "type": "string", "nullable": true, "description": "取引の備考\nact=0,1,2,3の場合のみ値が返ります。act=4,10,11,12では常にnullです。\n", "example": "打ち合わせ用コーヒー代" }, "walletable": { "type": "string", "nullable": true, "description": "口座名", "example": "事業用口座" }, "transfer_walletable": { "type": "string", "nullable": true, "description": "振替先口座名\nact=2,3(振替を推測/登録)の場合のみ値が返ります。\n", "example": "事業用クレジットカード" }, "origin_deal_id": { "type": "integer", "format": "int64", "nullable": true, "description": "元取引ID。このルールの作成元となった取引のIDです。freeeが自動作成したルールの場合のみ値が返ります。", "example": 501 }, "origin_deal_code": { "type": "integer", "nullable": true, "description": "元取引コード", "example": 12 }, "last_updated_user_id": { "type": "integer", "description": "最終更新ユーザーID\n* 0: freeeシステムによる更新\n", "example": 1 }, "user_name": { "type": "string", "description": "最終更新ユーザー名。表示名が未設定の場合はメールアドレスが返ります。freeeシステムによる更新の場合は「freee」、ユーザー情報を取得できない場合は「-」が返ります。", "example": "freee 太郎" }, "updated_at": { "type": "string", "nullable": true, "description": "更新日 (yyyy-mm-dd)", "example": "2026-08-01" }, "corrected_wallet_txn_count": { "type": "integer", "nullable": true, "description": "適用明細数(正答件数)。統計情報が存在しない場合はnullが返ります。", "example": 10 }, "corrected_wallet_txn_count_percentage": { "type": "integer", "nullable": true, "description": "適用率(正答率、パーセント)。統計情報が存在しない場合はnullが返ります。", "example": 80 }, "qualified_invoice_setting": { "type": "string", "nullable": true, "description": "適格請求書等\n* non_qualified: 該当しない\n* qualified: 該当する\n* depends_on_partner: 取引先情報に準拠\n", "enum": [ "non_qualified", "qualified", "depends_on_partner" ], "example": "qualified" }, "suggest_tax_from_walletable_invoice": { "type": "boolean", "nullable": true, "description": "購入データ原本に準拠\n* true: 準拠する\n* false: 準拠しない\n", "example": false }, "walletable_bank_name": { "type": "string", "nullable": true, "description": "口座の銀行名", "example": "freee銀行" }, "card_label": { "type": "string", "nullable": true, "description": "カードラベル", "example": "本人" }, "card_label_id": { "type": "integer", "format": "int64", "nullable": true, "description": "カードラベルID", "example": 1 }, "account_item_name": { "type": "string", "nullable": true, "description": "勘定科目名\nact=0,1(取引を推測/登録)の場合のみ値が返ります。\n", "example": "会議費" }, "partner_name": { "type": "string", "nullable": true, "description": "取引先名\nact=0,1(取引を推測/登録)の場合のみ値が返ります。\n", "example": "スターバックス" }, "item_name": { "type": "string", "nullable": true, "description": "品目名\nact=0,1(取引を推測/登録)の場合のみ値が返ります。\n", "example": "コーヒー豆" }, "section_name": { "type": "string", "nullable": true, "description": "部門名\nact=0,1(取引を推測/登録)の場合のみ値が返ります。\n", "example": "営業部" }, "division_tag_1_name": { "type": "string", "nullable": true, "description": "セグメント1タグ名\nact=0,1(取引を推測/登録)の場合のみ値が返ります。\n", "example": "東日本" }, "division_tag_2_name": { "type": "string", "nullable": true, "description": "セグメント2タグ名\nact=0,1(取引を推測/登録)の場合のみ値が返ります。\n", "example": "小売事業" }, "division_tag_3_name": { "type": "string", "nullable": true, "description": "セグメント3タグ名\nact=0,1(取引を推測/登録)の場合のみ値が返ります。\n", "example": "第一営業所" }, "default_tag_names": { "type": "array", "nullable": true, "description": "メモタグ名の配列\nact=0,1(取引を推測/登録)の場合のみ値が返ります。メモタグが1つも設定されていない場合はnullが返ります。\n", "items": { "type": "string" }, "example": [ "出張", "会議" ] }, "active": { "type": "boolean", "description": "有効/無効\n* true: 有効\n* false: 無効\n", "example": true } } } } } }, "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" } } } }, "503": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/serviceUnavailableError" } } } } } }, "delete": { "tags": [ "User matchers" ], "summary": "自動登録ルールの削除", "description": "\n

概要

\n\n

指定した事業所の自動登録ルールを削除する

\n\n

注意点

\n", "operationId": "destroy_user_matcher", "parameters": [ { "name": "id", "in": "path", "description": "自動登録ルールID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 }, "example": 101 }, { "name": "company_id", "in": "query", "description": "事業所ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1 }, "example": 1 } ], "responses": { "204": { "description": "" }, "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" } } } }, "503": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/serviceUnavailableError" } } } } } } } }, "components": { "schemas": { "paymentParams": { "required": [ "amount", "company_id", "date", "from_walletable_id", "from_walletable_type" ], "type": "object", "properties": { "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID", "example": 1 }, "date": { "type": "string", "description": "支払日 (yyyy-mm-dd)", "example": "2019-12-17" }, "from_walletable_type": { "type": "string", "description": "口座区分 (銀行口座: bank_account, クレジットカード: credit_card, 現金: wallet, プライベート資金: private_account_item)", "example": "bank_account", "enum": [ "bank_account", "credit_card", "wallet", "private_account_item" ] }, "from_walletable_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "口座ID(from_walletable_typeがprivate_account_itemの場合は勘定科目ID)", "example": 1 }, "amount": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 9223372036854775807, "description": "支払金額(円)", "example": 10000 } } }, "dealCreateParams": { "required": [ "company_id", "details", "issue_date", "type" ], "type": "object", "properties": { "issue_date": { "type": "string", "description": "発生日 (yyyy-mm-dd)", "example": "2019-12-17" }, "type": { "type": "string", "description": "収支区分 (収入: income, 支出: expense)", "example": "income", "enum": [ "income", "expense" ] }, "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID", "example": 1 }, "due_date": { "type": "string", "description": "支払期日(yyyy-mm-dd)", "example": "2019-12-17" }, "partner_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "取引先ID。partner_codeと同時に指定することはできません。", "example": 1 }, "partner_code": { "type": "string", "description": "取引先コード。利用するには事業所の設定で取引先コードの利用を有効にする必要があります。partner_idと同時に指定することはできません。", "example": "code001" }, "ref_number": { "type": "string", "description": "管理番号", "example": "1" }, "details": { "type": "array", "description": "取引の明細行(最大100行)", "items": { "required": [ "tax_code", "amount" ], "type": "object", "properties": { "tax_code": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647, "description": "税区分コード", "example": 1 }, "account_item_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "勘定科目ID。account_item_idまたはaccount_item_codeのいずれかの指定が必要です(同時に指定することはできません)。", "example": 1 }, "account_item_code": { "type": "string", "description": "勘定科目コード。利用するには事業所の設定で勘定科目コードの利用を有効にする必要があります。account_item_idまたはaccount_item_codeのいずれかの指定が必要です(同時に指定することはできません)。", "example": "code001" }, "amount": { "type": "integer", "format": "int64", "minimum": -9223372036854775808, "maximum": 9223372036854775807, "description": "取引金額(円・税込で指定してください)
\nマイナスの値を指定した場合、控除・マイナス行として登録されます。
\n上記以外の値を指定した場合、通常行として登録されます。\n", "example": 1 }, "item_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "品目ID。item_codeと同時に指定することはできません。", "example": 1 }, "item_code": { "type": "string", "description": "品目コード。利用するには事業所の設定で品目コードの利用を有効にする必要があります。item_idと同時に指定することはできません。", "example": "code001" }, "section_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "部門ID。section_codeと同時に指定することはできません。", "example": 1 }, "section_code": { "type": "string", "description": "部門コード。利用するには事業所の設定で部門コードの利用を有効にする必要があります。section_idと同時に指定することはできません。", "example": "code001" }, "partner_id": { "type": "integer", "format": "int64", "minimum": 0, "nullable": true, "description": "取引先ID。partner_codeと同時に指定することはできません。", "example": 1 }, "partner_code": { "type": "string", "description": "取引先コード。利用するには事業所の設定で取引先コードの利用を有効にする必要があります。partner_idと同時に指定することはできません。", "nullable": true, "example": "code001" }, "tag_ids": { "type": "array", "description": "メモタグID", "items": { "type": "integer", "format": "int64", "minimum": 1, "example": 1 } }, "segment_1_tag_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメント1タグID。セグメントタグが利用可能なプランでのみ指定できます。segment_1_tag_codeと同時に指定することはできません。", "example": 1 }, "segment_1_tag_code": { "type": "string", "description": "セグメント1タグコード。利用するには事業所の設定でセグメントタグコードの利用を有効にする必要があります。segment_1_tag_idと同時に指定することはできません。", "example": "code001" }, "segment_2_tag_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメント2タグID。セグメントタグが利用可能なプランでのみ指定できます。segment_2_tag_codeと同時に指定することはできません。", "example": 1 }, "segment_2_tag_code": { "type": "string", "description": "セグメント2タグコード。利用するには事業所の設定でセグメントタグコードの利用を有効にする必要があります。segment_2_tag_idと同時に指定することはできません。", "example": "code001" }, "segment_3_tag_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメント3タグID。セグメントタグが利用可能なプランでのみ指定できます。segment_3_tag_codeと同時に指定することはできません。", "example": 1 }, "segment_3_tag_code": { "type": "string", "description": "セグメント3タグコード。利用するには事業所の設定でセグメントタグコードの利用を有効にする必要があります。segment_3_tag_idと同時に指定することはできません。", "example": "code001" }, "description": { "type": "string", "description": "備考", "example": "備考" }, "vat": { "type": "integer", "format": "int64", "description": "消費税額(円。指定しない場合は自動で計算されます)。 tax_code で税額が不要な税区分を指定する場合は指定できません。", "example": 800 } } } }, "payments": { "type": "array", "description": "支払行一覧(配列):未指定の場合、未決済の取引を作成します。", "items": { "required": [ "amount", "date", "from_walletable_id", "from_walletable_type" ], "type": "object", "properties": { "amount": { "type": "integer", "format": "int64", "minimum": -9223372036854775808, "maximum": 9223372036854775807, "description": "支払金額(円):payments指定時は必須", "example": 5250 }, "from_walletable_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "口座ID(from_walletable_typeがprivate_account_itemの場合は勘定科目ID):payments指定時は必須", "example": 1 }, "from_walletable_type": { "type": "string", "description": "口座区分 (銀行口座: bank_account, クレジットカード: credit_card, 現金: wallet, プライベート資金: private_account_item):payments指定時は必須", "example": "bank_account", "enum": [ "bank_account", "credit_card", "wallet", "private_account_item" ] }, "date": { "type": "string", "description": "支払日 (yyyy-mm-dd):payments指定時は必須", "example": "2019-12-17" } } } }, "receipt_ids": { "type": "array", "description": "ファイルボックス(証憑ファイル)ID(配列)", "items": { "type": "integer", "format": "int64", "minimum": 1, "example": 1 } } } }, "dealUpdateParams": { "required": [ "company_id", "details", "issue_date", "type" ], "type": "object", "properties": { "issue_date": { "type": "string", "description": "発生日 (yyyy-mm-dd)", "example": "2019-12-17" }, "type": { "type": "string", "description": "収支区分 (収入: income, 支出: expense)", "example": "income", "enum": [ "income", "expense" ] }, "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID", "example": 1 }, "due_date": { "type": "string", "description": "支払期日(yyyy-mm-dd)", "example": "2019-12-17" }, "partner_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "取引先ID。partner_codeと同時に指定することはできません。", "example": 1 }, "partner_code": { "type": "string", "description": "取引先コード。利用するには事業所の設定で取引先コードの利用を有効にする必要があります。partner_idと同時に指定することはできません。", "example": "code001" }, "ref_number": { "type": "string", "description": "管理番号", "example": "1" }, "details": { "type": "array", "description": "取引の明細行(最大100行)。detailsに含まれない既存の取引行は削除されます。更新後も残したい行は、必ず取引行ID(id)を指定してdetailsに含めてください。", "items": { "required": [ "tax_code", "account_item_id", "amount" ], "type": "object", "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "取引行ID: 既存取引行を更新する場合に指定します。IDを指定しない取引行は、新規行として扱われ追加されます。また、detailsに含まれない既存の取引行は削除されます。更新後も残したい行は、必ず取引行IDを指定してdetailsに含めてください。", "example": 1 }, "tax_code": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647, "description": "税区分コード", "example": 1 }, "account_item_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "勘定科目ID", "example": 1 }, "amount": { "type": "integer", "format": "int64", "minimum": -9223372036854775808, "maximum": 9223372036854775807, "description": "取引金額(円・税込で指定してください)
\nマイナスの値を指定した場合、控除・マイナス行として登録されます。
\n上記以外の値を指定した場合、通常行として登録されます。\n", "example": 1 }, "item_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "品目ID", "example": 1 }, "section_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "部門ID", "example": 1 }, "partner_id": { "type": "integer", "format": "int64", "minimum": 0, "nullable": true, "description": "取引先ID", "example": 1 }, "tag_ids": { "type": "array", "description": "メモタグID", "items": { "type": "integer", "format": "int64", "minimum": 1, "example": 1 } }, "segment_1_tag_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメント1タグID。セグメントタグが利用可能なプランでのみ指定できます。", "example": 1 }, "segment_2_tag_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメント2タグID。セグメントタグが利用可能なプランでのみ指定できます。", "example": 1 }, "segment_3_tag_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメント3タグID。セグメントタグが利用可能なプランでのみ指定できます。", "example": 1 }, "description": { "type": "string", "description": "備考", "example": "備考" }, "vat": { "type": "integer", "format": "int64", "description": "消費税額(円。指定しない場合は自動で計算されます)。 tax_code で税額が不要な税区分を指定する場合は指定できません。", "example": 800 } } } }, "receipt_ids": { "type": "array", "nullable": true, "description": "ファイルボックス(証憑ファイル)ID(配列)。指定した場合、取引に紐づくファイルはこの配列の内容で置き換えられます。指定しない場合は変更されません。", "items": { "type": "integer", "format": "int64", "minimum": 1, "example": 1 } } } }, "manualJournalCreateParams": { "required": [ "company_id", "details", "issue_date" ], "type": "object", "properties": { "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID", "example": 1 }, "issue_date": { "type": "string", "description": "振替伝票の発生日(yyyy-mm-dd)", "example": "2019-12-17" }, "adjustment": { "type": "boolean", "description": "決算整理仕訳フラグ(true: 決算整理仕訳、falseまたは未指定: 日常仕訳)", "example": false }, "ref_number": { "type": "string", "maxLength": 20, "description": "利用者が振替伝票を管理するための管理番号(20文字以内)", "example": "123-456" }, "details": { "type": "array", "description": "貸借行一覧。貸方と借方の合計金額を一致させ、合計100行以内で指定します。", "items": { "required": [ "amount", "entry_side", "tax_code" ], "type": "object", "properties": { "entry_side": { "type": "string", "description": "貸借区分(debit: 借方、credit: 貸方)", "example": "debit", "enum": [ "debit", "credit" ] }, "tax_code": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647, "description": "貸借行に適用する税区分コード。税区分APIで取得したcodeを指定します。", "example": 1 }, "account_item_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "勘定科目ID。account_item_codeと同時に指定できません。どちらか一方を指定してください。", "example": 1 }, "account_item_code": { "type": "string", "description": "勘定科目コード。事業所の勘定科目コード利用設定が有効な場合に、account_item_idの代わりに指定できます。", "example": "code001" }, "amount": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 9223372036854775807, "description": "取引金額(税込・円)", "example": 10800 }, "vat": { "type": "integer", "format": "int64", "description": "消費税額(円)。未指定の場合はamountとtax_codeから自動計算されます。", "example": 800 }, "partner_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "取引先ID。partner_codeと同時に指定できません。", "example": 1 }, "partner_code": { "type": "string", "description": "取引先コード。事業所の取引先コード利用設定が有効な場合に、partner_idの代わりに指定できます。", "example": "code001" }, "item_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "品目ID。item_codeと同時に指定できません。", "example": 1 }, "item_code": { "type": "string", "description": "品目コード。事業所の品目コード利用設定が有効な場合に、item_idの代わりに指定できます。", "example": "code001" }, "section_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "部門ID。section_codeと同時に指定できません。操作ユーザーが利用可能な部門を指定してください。", "example": 1 }, "section_code": { "type": "string", "description": "部門コード。事業所の部門コード利用設定が有効な場合に、section_idの代わりに指定できます。", "example": "code001" }, "tag_ids": { "type": "array", "description": "貸借行に付与するメモタグIDの一覧", "items": { "type": "integer", "format": "int64", "minimum": 1, "example": 1 } }, "segment_1_tag_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメント1タグID。segment_1_tag_codeと同時に指定できません。", "example": 1 }, "segment_2_tag_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメント2タグID。segment_2_tag_codeと同時に指定できません。", "example": 1 }, "segment_3_tag_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメント3タグID。segment_3_tag_codeと同時に指定できません。", "example": 1 }, "segment_1_tag_code": { "type": "string", "description": "セグメント1タグコード。事業所のセグメントタグコード利用設定が有効な場合に、segment_1_tag_idの代わりに指定できます。", "example": "code001" }, "segment_2_tag_code": { "type": "string", "description": "セグメント2タグコード。事業所のセグメントタグコード利用設定が有効な場合に、segment_2_tag_idの代わりに指定できます。", "example": "code001" }, "segment_3_tag_code": { "type": "string", "description": "セグメント3タグコード。事業所のセグメントタグコード利用設定が有効な場合に、segment_3_tag_idの代わりに指定できます。", "example": "code001" }, "description": { "type": "string", "description": "備考", "example": "備考" } } } }, "receipt_ids": { "type": "array", "description": "振替伝票に添付するファイルボックス(証憑ファイル)IDの一覧。操作ユーザーが参照可能なファイルを指定してください。", "items": { "type": "integer", "format": "int64", "minimum": 1, "example": 1 } } } }, "manualJournalUpdateParams": { "required": [ "company_id", "details", "issue_date" ], "type": "object", "properties": { "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID", "example": 1 }, "issue_date": { "type": "string", "description": "振替伝票の発生日(yyyy-mm-dd)", "example": "2019-12-17" }, "adjustment": { "type": "boolean", "description": "決算整理仕訳フラグ(true: 決算整理仕訳、falseまたは未指定: 日常仕訳)", "example": false }, "ref_number": { "type": "string", "maxLength": 20, "description": "利用者が振替伝票を管理するための管理番号(20文字以内)", "example": "123-456" }, "details": { "type": "array", "description": "貸借行一覧。貸方と借方の合計金額を一致させ、合計100行以内で指定します。ここに含めない既存の貸借行は削除されます。", "items": { "required": [ "amount", "entry_side", "tax_code" ], "type": "object", "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "貸借行ID。既存行を更新して残す場合に指定します。IDを指定しない行は新規行として追加されます。", "example": 1 }, "entry_side": { "type": "string", "description": "貸借区分(debit: 借方、credit: 貸方)", "example": "debit", "enum": [ "debit", "credit" ] }, "tax_code": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647, "description": "貸借行に適用する税区分コード。税区分APIで取得したcodeを指定します。", "example": 1 }, "account_item_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "勘定科目ID。account_item_codeと同時に指定できません。どちらか一方を指定してください。", "example": 1 }, "account_item_code": { "type": "string", "description": "勘定科目コード。事業所の勘定科目コード利用設定が有効な場合に、account_item_idの代わりに指定できます。", "example": "code001" }, "amount": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 9223372036854775807, "description": "取引金額(税込・円)", "example": 10800 }, "vat": { "type": "integer", "format": "int64", "description": "消費税額(円)。未指定の場合はamountとtax_codeから自動計算されます。", "example": 800 }, "partner_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "取引先ID。partner_codeと同時に指定できません。", "example": 1 }, "partner_code": { "type": "string", "description": "取引先コード。事業所の取引先コード利用設定が有効な場合に、partner_idの代わりに指定できます。", "example": "code001" }, "item_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "品目ID。item_codeと同時に指定できません。", "example": 1 }, "item_code": { "type": "string", "description": "品目コード。事業所の品目コード利用設定が有効な場合に、item_idの代わりに指定できます。", "example": "code001" }, "section_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "部門ID。section_codeと同時に指定できません。操作ユーザーが利用可能な部門を指定してください。", "example": 1 }, "section_code": { "type": "string", "description": "部門コード。事業所の部門コード利用設定が有効な場合に、section_idの代わりに指定できます。", "example": "code001" }, "tag_ids": { "type": "array", "description": "貸借行に付与するメモタグIDの一覧", "items": { "type": "integer", "format": "int64", "minimum": 1, "example": 1 } }, "segment_1_tag_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメント1タグID。segment_1_tag_codeと同時に指定できません。", "example": 1 }, "segment_2_tag_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメント2タグID。segment_2_tag_codeと同時に指定できません。", "example": 1 }, "segment_3_tag_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメント3タグID。segment_3_tag_codeと同時に指定できません。", "example": 1 }, "segment_1_tag_code": { "type": "string", "description": "セグメント1タグコード。事業所のセグメントタグコード利用設定が有効な場合に、segment_1_tag_idの代わりに指定できます。", "example": "code001" }, "segment_2_tag_code": { "type": "string", "description": "セグメント2タグコード。事業所のセグメントタグコード利用設定が有効な場合に、segment_2_tag_idの代わりに指定できます。", "example": "code001" }, "segment_3_tag_code": { "type": "string", "description": "セグメント3タグコード。事業所のセグメントタグコード利用設定が有効な場合に、segment_3_tag_idの代わりに指定できます。", "example": "code001" }, "description": { "type": "string", "description": "備考", "example": "備考" } } } }, "receipt_ids": { "type": "array", "description": "更新後に振替伝票へ添付するファイルボックス(証憑ファイル)IDの一覧。操作ユーザーが参照可能なファイルを指定してください。", "items": { "type": "integer", "format": "int64", "minimum": 1, "example": 1 } } } }, "itemParams": { "type": "object", "required": [ "company_id", "name" ], "properties": { "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID。品目を作成・更新する対象の事業所を指定します。", "example": 1 }, "name": { "type": "string", "maxLength": 30, "description": "品目名 (30文字以内)。事業所内で重複できません。既に同名の品目が存在する場合は 400 エラーになります。", "example": "新しい品目" }, "shortcut1": { "type": "string", "maxLength": 20, "description": "ショートカット1 (20文字以内)。Web画面などで品目を検索する際のキーワードとして使用します。更新時に省略した場合は未設定(null)に更新されます。", "example": "NEWITEM" }, "shortcut2": { "type": "string", "maxLength": 20, "description": "ショートカット2 (20文字以内)。Web画面などで品目を検索する際のキーワードとして使用します。更新時に省略した場合は未設定(null)に更新されます。", "example": "202" }, "code": { "type": "string", "maxLength": 20, "description": "品目コード (20文字以内、半角英数字・ハイフン・アンダースコアのみ)。事業所内で重複できません。事業所の設定で品目コードを使用する設定にしている場合のみ保存され、設定が無効の場合は指定しても無視されます。更新時に省略した場合は未設定(null)に更新されます。", "example": "code001", "pattern": "^[0-9a-zA-Z_-]+$" } } }, "walletableCreateParams": { "type": "object", "required": [ "company_id", "name", "type" ], "properties": { "name": { "type": "string", "maxLength": 255, "description": "口座名(255文字以内)。事業所内で既存の口座名と重複する場合は 400 エラーになります。", "example": "XX銀行" }, "type": { "type": "string", "description": "口座種別。\n* `bank_account` - 銀行口座\n* `credit_card` - クレジットカード\n* `wallet` - その他の決済口座(現金・電子マネー・売掛/買掛など)", "example": "bank_account", "enum": [ "bank_account", "credit_card", "wallet" ] }, "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID。/api/1/companies(事業所一覧の取得)で取得できます。", "example": 1 }, "bank_id": { "type": "integer", "format": "int64", "minimum": 1, "nullable": true, "description": "連携サービスID。/api/1/banks(連携サービス一覧の取得)で取得できます。type に bank_account、credit_card を指定する場合は必須です。type に wallet を指定する場合は省略できます(省略時は連携サービスに紐づかない現金口座などとして作成されます)。", "example": 1 }, "is_asset": { "type": "boolean", "description": "口座を資産口座(true、デフォルト)とするか負債口座(false)とするか。
\ntype に wallet を指定し、かつ bank_id を省略した場合にのみ有効です。
\nbank_id を指定した場合は、資産口座か負債口座かは bank_id に指定したサービスに応じて自動判定され、is_asset に指定した値は無視されます。\n", "example": true } } }, "walletableUpdateParams": { "type": "object", "required": [ "company_id", "name" ], "properties": { "name": { "type": "string", "maxLength": 255, "description": "口座名(255文字以内)。事業所内で既存の口座名と重複する場合は 400 エラーになります。type や bank_id、資産/負債区分は更新できません(変更したい場合は口座を作り直してください)。", "example": "XX銀行" }, "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID。/api/1/companies(事業所一覧の取得)で取得できます。", "example": 1 } } }, "walletableUpdateResponse": { "type": "object", "required": [ "bank_id", "id", "last_balance", "name", "type", "walletable_balance" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "口座ID", "example": 1 }, "name": { "type": "string", "maxLength": 255, "description": "口座名(255文字以内)", "example": "freee銀行" }, "bank_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "連携サービスID。type が wallet で連携サービスに紐づかない口座の場合は null になります。", "example": 3, "nullable": true }, "type": { "type": "string", "description": "口座種別。\n* `bank_account` - 銀行口座\n* `credit_card` - クレジットカード\n* `wallet` - その他の決済口座(現金・電子マネー・売掛/買掛など)", "example": "bank_account", "enum": [ "bank_account", "credit_card", "wallet" ] }, "last_balance": { "type": "integer", "format": "int64", "description": "同期残高(円)。連携サービスから同期した残高です。", "example": 1565583 }, "walletable_balance": { "type": "integer", "format": "int64", "description": "登録残高(円)。freee会計上の取引から計算される、借方を正とする残高です。", "example": 1340261 } } }, "transferParams": { "required": [ "company_id", "date", "from_walletable_id", "from_walletable_type" ], "type": "object", "properties": { "to_walletable_id": { "type": "integer", "format": "int64", "minimum": 1, "deprecated": true, "description": "振替先口座ID(単一振替先の場合に指定)。口座一覧の取得(GET /api/1/walletables)で取得できるIDを指定します。to_walletablesと同時に指定することはできません。将来廃止予定。振替先の複数指定に対応していないため、to_walletablesを利用してください。", "example": 1 }, "to_walletable_type": { "type": "string", "deprecated": true, "description": "振替先口座の口座区分(単一振替先の場合に指定)。to_walletablesと同時に指定することはできません。将来廃止予定。振替先の複数指定に対応していないため、to_walletablesを利用してください。\n* `bank_account` - 銀行口座\n* `credit_card` - クレジットカード\n* `wallet` - その他の決済口座(現金・電子マネー・売掛/買掛など)", "example": "bank_account", "enum": [ "bank_account", "credit_card", "wallet" ] }, "from_walletable_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "振替元口座ID。口座一覧の取得(GET /api/1/walletables)で取得できるIDを指定します。", "example": 1 }, "from_walletable_type": { "type": "string", "description": "振替元口座の口座区分\n* `bank_account` - 銀行口座\n* `credit_card` - クレジットカード\n* `wallet` - その他の決済口座(現金・電子マネー・売掛/買掛など)", "example": "credit_card", "enum": [ "bank_account", "credit_card", "wallet" ] }, "amount": { "type": "integer", "format": "int64", "minimum": -9223372036854775808, "maximum": 9223372036854775807, "deprecated": true, "description": "振替金額(円・単一振替先の場合に指定)。to_walletablesと同時に指定することはできません。将来廃止予定。振替先の複数指定に対応していないため、to_walletablesの各行amountを利用してください。", "example": 5000 }, "from_partner_id": { "type": "integer", "format": "int64", "minimum": 0, "nullable": true, "description": "振替元口座行の取引先ID。更新時にキーを省略すると既存値を引き継ぎます。0またはnullは取引先を外す指定です。作成時にキーを省略するか、0またはnullを指定すると取引先なしになります。「口座振替(口座間移動)での取引先タグ付与ルール」が未設定の場合、既存値と同じIDの指定を除き、取引先の追加・変更・削除はできません。", "example": 201 }, "from_section_id": { "type": "integer", "format": "int64", "minimum": 0, "nullable": true, "description": "振替元口座行の部門ID。更新時にキーを省略すると既存値を引き継ぎます。0またはnullは部門を外す指定です。作成時にキーを省略すると口座タグ設定に従います。口座タグ設定が固定の場合は設定タグを優先し、未設定の場合は有効なIDを指定できません。部門の入力が必須(全ての科目)の事業所では、部門なしになる保存はエラーです。", "example": 1 }, "from_item_id": { "type": "integer", "format": "int64", "minimum": 0, "nullable": true, "description": "振替元口座行の品目ID。更新時にキーを省略すると既存値を引き継ぎます。0またはnullは品目を外す指定です。作成時にキーを省略すると口座タグ設定に従います。口座タグ設定が固定の場合は設定タグを優先し、未設定の場合は有効なIDを指定できません。", "example": 501 }, "from_tag_ids": { "type": "array", "nullable": true, "description": "振替元口座行のメモタグID。更新時にキーを省略すると既存値を引き継ぎます。空配列またはnullはメモタグをすべて外す指定です。作成時にキーを省略すると口座タグ設定に従います。口座タグ設定が固定の場合は設定タグを優先し、未設定の場合は有効なIDを指定できません。", "example": [ 1, 2 ], "items": { "type": "integer", "format": "int64", "minimum": 1 } }, "from_segment_1_tag_id": { "type": "integer", "format": "int64", "minimum": 0, "nullable": true, "description": "振替元口座行のセグメント1タグID。更新時にキーを省略すると既存値を引き継ぎます。0またはnullはタグを外す指定です。作成時にキーを省略すると口座タグ設定に従います。口座タグ設定が固定の場合は設定タグを優先し、未設定の場合は有効なIDを指定できません。セグメントタグを利用できないプランでは指定を無視します。", "example": 1 }, "from_segment_2_tag_id": { "type": "integer", "format": "int64", "minimum": 0, "nullable": true, "description": "振替元口座行のセグメント2タグID。更新時にキーを省略すると既存値を引き継ぎます。0またはnullはタグを外す指定です。作成時にキーを省略すると口座タグ設定に従います。口座タグ設定が固定の場合は設定タグを優先し、未設定の場合は有効なIDを指定できません。セグメントタグを利用できないプランでは指定を無視します。", "example": 1 }, "from_segment_3_tag_id": { "type": "integer", "format": "int64", "minimum": 0, "nullable": true, "description": "振替元口座行のセグメント3タグID。更新時にキーを省略すると既存値を引き継ぎます。0またはnullはタグを外す指定です。作成時にキーを省略すると口座タグ設定に従います。口座タグ設定が固定の場合は設定タグを優先し、未設定の場合は有効なIDを指定できません。セグメントタグを利用できないプランでは指定を無視します。", "example": 1 }, "date": { "type": "string", "description": "振替日 (yyyy-mm-dd)", "example": "2019-12-17" }, "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID", "example": 1 }, "description": { "type": "string", "deprecated": true, "description": "備考(単一振替先の場合に指定)。to_walletablesと同時に指定することはできません。将来廃止予定。振替先の複数指定に対応していないため、to_walletablesの各行descriptionを利用してください。", "example": "備考" }, "to_walletables": { "type": "array", "minItems": 1, "maxItems": 50, "description": "振替先口座行(振替先が複数の場合に指定・最大50行)。単一のto_walletable_id / to_walletable_type / amount / descriptionと同時に指定することはできません。振替元はfrom_walletable_id / from_walletable_typeで共通指定。", "items": { "type": "object", "required": [ "type", "id", "amount" ], "properties": { "type": { "type": "string", "description": "振替先口座の口座区分\n* `bank_account` - 銀行口座\n* `credit_card` - クレジットカード\n* `wallet` - その他の決済口座(現金・電子マネー・売掛/買掛など)", "example": "bank_account", "enum": [ "bank_account", "credit_card", "wallet" ] }, "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "振替先口座ID。口座一覧の取得(GET /api/1/walletables)で取得できるIDを指定します。", "example": 1 }, "amount": { "type": "integer", "format": "int64", "minimum": -9223372036854775808, "maximum": 9223372036854775807, "description": "振替先口座への振替金額(円)。0円より大きい金額を指定します。", "example": 3000 }, "description": { "type": "string", "description": "備考", "example": "備考" }, "partner_id": { "type": "integer", "format": "int64", "minimum": 0, "nullable": true, "description": "振替先口座行の取引先ID。更新時にキーを省略すると同一口座の既存行から引き継ぎます。0またはnullは取引先を外す指定です。作成時にキーを省略するか、0またはnullを指定すると取引先なしになります。「口座振替(口座間移動)での取引先タグ付与ルール」が未設定の場合、既存値と同じIDの指定を除き、取引先の追加・変更・削除はできません。", "example": 201 }, "section_id": { "type": "integer", "format": "int64", "minimum": 0, "nullable": true, "description": "振替先口座行の部門ID。更新時にキーを省略すると同一口座の既存行から引き継ぎます。0またはnullは部門を外す指定です。作成時にキーを省略すると口座タグ設定に従います。口座タグ設定が固定の場合は設定タグを優先し、未設定の場合は有効なIDを指定できません。部門の入力が必須(全ての科目)の事業所では、部門なしになる保存はエラーです。", "example": 2 }, "item_id": { "type": "integer", "format": "int64", "minimum": 0, "nullable": true, "description": "振替先口座行の品目ID。更新時にキーを省略すると同一口座の既存行から引き継ぎます。0またはnullは品目を外す指定です。作成時にキーを省略すると口座タグ設定に従います。口座タグ設定が固定の場合は設定タグを優先し、未設定の場合は有効なIDを指定できません。", "example": 501 }, "tag_ids": { "type": "array", "nullable": true, "description": "振替先口座行のメモタグID。更新時にキーを省略すると同一口座の既存行から引き継ぎます。空配列またはnullはメモタグをすべて外す指定です。作成時にキーを省略すると口座タグ設定に従います。口座タグ設定が固定の場合は設定タグを優先し、未設定の場合は有効なIDを指定できません。", "example": [ 1, 2 ], "items": { "type": "integer", "format": "int64", "minimum": 1 } }, "segment_1_tag_id": { "type": "integer", "format": "int64", "minimum": 0, "nullable": true, "description": "振替先口座行のセグメント1タグID。更新時にキーを省略すると同一口座の既存行から引き継ぎます。0またはnullはタグを外す指定です。作成時にキーを省略すると口座タグ設定に従います。口座タグ設定が固定の場合は設定タグを優先し、未設定の場合は有効なIDを指定できません。セグメントタグを利用できないプランでは指定を無視します。", "example": 1 }, "segment_2_tag_id": { "type": "integer", "format": "int64", "minimum": 0, "nullable": true, "description": "振替先口座行のセグメント2タグID。更新時にキーを省略すると同一口座の既存行から引き継ぎます。0またはnullはタグを外す指定です。作成時にキーを省略すると口座タグ設定に従います。口座タグ設定が固定の場合は設定タグを優先し、未設定の場合は有効なIDを指定できません。セグメントタグを利用できないプランでは指定を無視します。", "example": 1 }, "segment_3_tag_id": { "type": "integer", "format": "int64", "minimum": 0, "nullable": true, "description": "振替先口座行のセグメント3タグID。更新時にキーを省略すると同一口座の既存行から引き継ぎます。0またはnullはタグを外す指定です。作成時にキーを省略すると口座タグ設定に従います。口座タグ設定が固定の場合は設定タグを優先し、未設定の場合は有効なIDを指定できません。セグメントタグを利用できないプランでは指定を無視します。", "example": 1 } } } } } }, "walletTxnParams": { "type": "object", "required": [ "amount", "company_id", "date", "entry_side", "walletable_id", "walletable_type" ], "properties": { "entry_side": { "type": "string", "description": "入金・出金の区分\n* `income` - 入金\n* `expense` - 出金", "example": "income", "enum": [ "income", "expense" ] }, "description": { "type": "string", "description": "取引内容(摘要)。未指定の場合は空文字列で登録されます。", "example": "振込 カ)ABC" }, "amount": { "type": "integer", "format": "int64", "minimum": -9223372036854775808, "maximum": 9223372036854775807, "description": "取引金額(単位: 円)。入金・出金の区別は entry_side で指定します。", "example": 5000 }, "walletable_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "口座ID(walletable_type で指定した口座区分の口座のID)。口座一覧の取得API(GET /api/1/walletables)で確認できます。", "example": 1 }, "walletable_type": { "type": "string", "description": "口座区分\n* `bank_account` - 銀行口座\n* `credit_card` - クレジットカード\n* `wallet` - 現金・その他の決済口座", "example": "bank_account", "enum": [ "bank_account", "credit_card", "wallet" ] }, "date": { "type": "string", "description": "取引日 (yyyy-mm-dd)", "example": "2019-12-17" }, "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID", "example": 1 }, "balance": { "type": "integer", "format": "int64", "minimum": -9223372036854775808, "maximum": 9223372036854775807, "description": "残高(単位: 円)。指定しない場合、作成された明細の balance は null になります。", "example": 10000 } } }, "expenseApplicationCreateParams": { "type": "object", "required": [ "company_id", "title" ], "properties": { "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID", "example": 1 }, "title": { "type": "string", "maxLength": 250, "description": "申請タイトル (250文字以内)", "example": "大阪出張" }, "issue_date": { "type": "string", "description": "申請日 (yyyy-mm-dd)
\n指定しない場合は当日の日付が登録されます。\n", "example": "2019-12-17" }, "description": { "type": "string", "maxLength": 10000, "description": "備考 (10000文字以内)", "example": "◯◯連携先ID: cx12345" }, "section_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "部門ID", "example": 101 }, "tag_ids": { "type": "array", "description": "メモタグID", "items": { "type": "integer", "format": "int64", "minimum": 1, "example": 202 } }, "purchase_lines": { "type": "array", "description": "経費申請の申請行一覧(配列)", "items": { "type": "object", "required": [ "transaction_date" ], "properties": { "receipt_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "ファイルボックス(証憑ファイル)ID", "example": 606 }, "transaction_date": { "type": "string", "description": "発生日(yyyy-mm-dd)", "example": "2019-12-17" }, "sub_receipt_ids": { "type": "array", "description": "補足資料(配列)\n receipt_id(証憑ファイル)を指定してください。\n receipt_id(証憑ファイル)は5個まで指定できます", "items": { "type": "integer", "format": "int64", "minimum": 1, "example": 606 } }, "expense_application_lines": { "type": "array", "description": "明細行一覧(配列)", "items": { "type": "object", "properties": { "description": { "type": "string", "maxLength": 250, "description": "内容 (250文字以内)", "example": "交通費:新幹線往復(東京〜大阪)" }, "amount": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647, "description": "金額", "example": 30000 }, "expense_application_line_template_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "経費科目ID", "example": 505 } } } } } } }, "approval_flow_route_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "申請経路ID
\n\n", "example": 1 }, "approver_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "承認者のユーザーID
\n「承認者を指定」の経路を申請経路として使用する場合に指定してください。
\n指定する承認者のユーザーIDは、申請経路APIを利用して取得してください。\n", "example": 1 }, "applicant_group_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "申請者の所属部門ID
\n「部門役職」の承認ステップを含む申請経路で、申請者がどの所属部門として申請するかを指定します。
\n\n", "example": 1, "nullable": true }, "approval_flow_group_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "申請経路の承認部門ID
\n1段階目の承認ステップが部門選択型の場合に、承認させる部門を指定してください。\n", "example": 1, "nullable": true }, "draft": { "type": "boolean", "description": "経費申請のステータス
\nfalseを指定した時は申請中(in_progress)で経費申請を作成します。
\ntrueを指定した時は下書き(draft)で経費申請を作成します。
\n未指定の時は下書きとみなして経費申請を作成します。\n", "example": true }, "parent_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "親申請ID(法人アドバンスプラン(および旧法人プロフェッショナルプラン), 法人エンタープライズプラン)
\n\n", "example": 2 }, "parent_type": { "type": "string", "description": "親申請の種別 (parent_id を指定した場合のみ有効)
\n\n上記以外の値を指定するとバリデーションエラーになります。\n", "example": "ApprovalRequest" }, "segment_1_tag_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメント1タグID
\nセグメントタグ一覧の取得APIを利用して取得してください。
\nセグメント(分析用タグ)の設定
\n", "example": 1 }, "segment_2_tag_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメント2タグID
\nセグメントタグ一覧の取得APIを利用して取得してください。
\nセグメント(分析用タグ)の設定
\n", "example": 2 }, "segment_3_tag_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメント3タグID
\nセグメントタグ一覧の取得APIを利用して取得してください。
\nセグメント(分析用タグ)の設定
\n", "example": 3 } } }, "expenseApplicationUpdateParams": { "type": "object", "required": [ "company_id", "title" ], "properties": { "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID", "example": 1 }, "title": { "type": "string", "maxLength": 250, "description": "申請タイトル (250文字以内)", "example": "大阪出張" }, "issue_date": { "type": "string", "description": "申請日 (yyyy-mm-dd)
\n指定しない場合は当日の日付が登録されます。\n", "example": "2019-12-17" }, "description": { "type": "string", "maxLength": 10000, "description": "備考 (10000文字以内)", "example": "◯◯連携先ID: cx12345" }, "section_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "部門ID", "example": 101 }, "tag_ids": { "type": "array", "description": "メモタグID", "items": { "type": "integer", "format": "int64", "minimum": 1, "example": 202 } }, "purchase_lines": { "type": "array", "description": "経費申請の申請行一覧(配列)", "items": { "type": "object", "required": [ "transaction_date" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "経費申請の申請行ID: 既存申請行を更新する場合に指定します。IDを指定しない申請行は、新規行として扱われ追加されます。また、purchase_linesに含まれない既存の申請行は削除されます。更新後も残したい行は、必ず経費申請の申請行IDを指定してpurchase_linesに含めてください。", "example": 1 }, "transaction_date": { "type": "string", "description": "発生日(yyyy-mm-dd)", "example": "2019-12-17" }, "receipt_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "ファイルボックス(証憑ファイル)ID", "example": 606 }, "sub_receipt_ids": { "type": "array", "description": "補足資料(配列)\n receipt_id(証憑ファイル)を指定してください。\n receipt_id(証憑ファイル)は5個まで指定できます", "items": { "type": "integer", "format": "int64", "minimum": 1, "example": 606 } }, "expense_application_lines": { "type": "array", "description": "明細行一覧(配列)", "items": { "type": "object", "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "経費申請の明細行ID: 既存明細行を更新する場合に指定します。IDを指定しない明細行は、新規行として扱われ追加されます。また、expense_application_linesに含まれない既存の明細行は削除されます。更新後も残したい行は、必ず経費申請の明細行IDを指定してexpense_application_linesに含めてください。", "example": 1 }, "description": { "type": "string", "maxLength": 250, "description": "内容 (250文字以内)", "example": "交通費:新幹線往復(東京〜大阪)" }, "amount": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647, "description": "金額", "example": 30000 }, "expense_application_line_template_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "経費科目ID", "example": 505 } } } } } } }, "approval_flow_route_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "申請経路ID
\n\n", "example": 1 }, "approver_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "承認者のユーザーID
\n指定する承認者のユーザーIDは、申請経路APIを利用して取得してください。\n", "example": 1 }, "applicant_group_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "申請者の所属部門ID
\n「部門役職」の承認ステップを含む申請経路で、申請者がどの所属部門として申請するかを指定します。
\n\n", "example": 1, "nullable": true }, "approval_flow_group_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "申請経路の承認部門ID
\n1段階目の承認ステップが部門選択型の場合に、承認させる部門を指定してください。\n", "example": 1, "nullable": true }, "draft": { "type": "boolean", "description": "経費申請のステータス
\nfalseを指定した時は申請中(in_progress)で経費申請を更新します。
\ntrueを指定した時は下書き(draft)で経費申請を更新します。
\n未指定の時は下書きとみなして経費申請を更新します。\n", "example": true }, "parent_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "親申請ID(法人アドバンスプラン(および旧法人プロフェッショナルプラン), 法人エンタープライズプラン)
\n\n", "example": 2, "nullable": true }, "parent_type": { "type": "string", "description": "親申請の種別 (parent_id を指定した場合のみ有効)
\n\n上記以外の値を指定するとバリデーションエラーになります。\n", "example": "ApprovalRequest" }, "segment_1_tag_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメント1タグID
\nセグメントタグ一覧の取得APIを利用して取得してください。
\nセグメント(分析用タグ)の設定
\n", "example": 1 }, "segment_2_tag_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメント2タグID
\nセグメントタグ一覧の取得APIを利用して取得してください。
\nセグメント(分析用タグ)の設定
\n", "example": 2 }, "segment_3_tag_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメント3タグID
\nセグメントタグ一覧の取得APIを利用して取得してください。
\nセグメント(分析用タグ)の設定
\n", "example": 3 } } }, "expenseApplicationActionCreateParams": { "type": "object", "required": [ "company_id", "approval_action", "target_step_id", "target_round" ], "properties": { "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID", "example": 1 }, "approval_action": { "type": "string", "description": "操作(approve: 承認する、force_approve: 特権承認する、cancel: 申請を取り消す、reject: 却下する、feedback: 申請者へ差し戻す、force_feedback: 承認済み・却下済みを取り消す)", "example": "approve", "enum": [ "approve", "force_approve", "cancel", "reject", "feedback", "force_feedback" ] }, "target_step_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "対象承認ステップID 経費申請の取得APIレスポンス.current_step_idを送信してください。", "example": 1 }, "target_round": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647, "description": "対象round。差し戻し等により申請がstepの最初からやり直しになるとroundの値が増えます。経費申請の取得APIレスポンス.current_roundを送信してください。", "example": 1 }, "next_approver_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "次ステップの承認者のユーザーID", "example": 1, "nullable": true }, "next_group_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "次ステップの承認部門ID
\n次の承認ステップが部門選択型の場合に、承認させる部門を指定してください。\n", "example": 1, "nullable": true } } }, "expenseApplicationParentApprovableRequestUpdateParams": { "type": "object", "required": [ "company_id", "parent_id" ], "properties": { "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID", "example": 1 }, "parent_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "各種申請ID\n- 経費申請に関連付ける各種申請IDを指定します\n- 閲覧権限のある承認済みの既存各種申請IDのみ指定ができます\n- 既に経費申請に紐付いている各種申請との関連は解除されます\n- 経費申請に紐付く各種申請を解除する場合はnullを指定してください\n", "example": 1, "nullable": true } } }, "paymentRequestCreateParams": { "type": "object", "required": [ "company_id", "title", "payment_request_lines", "approval_flow_route_id", "draft", "issue_date" ], "properties": { "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID", "example": 1 }, "title": { "type": "string", "description": "申請タイトル(250文字以内)", "example": "仕入代金支払い" }, "application_date": { "type": "string", "description": "申請日 (yyyy-mm-dd)\n指定しない場合は当日の日付が登録されます。", "example": "2019-12-17" }, "description": { "type": "string", "description": "備考。未指定の場合は空文字列になります。", "example": "◯◯連携先ID: cx12345" }, "payment_request_lines": { "type": "array", "description": "支払依頼の項目行一覧(配列)。最大100行までです。\n通常行 (line_type=`deal_line`) を最低1行含める必要があり、控除・マイナス行 (`negative_line`) や源泉所得税行 (`withholding_tax`) だけで構成することはできません。\n申請中 (draft=false) で作成する場合は、通常行の合計金額が控除・マイナス行と源泉所得税行の合計金額より大きい必要があります。", "items": { "type": "object", "required": [ "amount" ], "properties": { "line_type": { "type": "string", "description": "行の種類(デフォルトは `deal_line`)\n* `deal_line` - 支払依頼の通常取引行\n* `negative_line` - 支払依頼の控除・マイナス行\n* `withholding_tax` - 源泉所得税行(1件のみ指定可能)", "example": "deal_line", "enum": [ "deal_line", "negative_line", "withholding_tax" ] }, "description": { "type": "string", "description": "内容", "example": "原稿料" }, "amount": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 99999999999, "description": "金額(円、税込)。申請中 (draft=false) で作成する場合は0より大きい値を指定してください。", "example": 30000 }, "account_item_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "勘定科目ID(`/api/1/account_items` のレスポンス id で取得できます)", "example": 1, "nullable": true }, "tax_code": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647, "description": "税区分コード\n勘定科目IDを指定する場合は必須です。税区分コードは `/api/1/taxes/codes` で取得できます。", "example": 1 }, "item_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "品目ID(`/api/1/items` のレスポンス id で取得できます)", "example": 1 }, "section_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "部門ID(`/api/1/sections` のレスポンス id で取得できます)", "example": 1 }, "tag_ids": { "type": "array", "description": "メモタグID の配列(`/api/1/tags` のレスポンス id で取得できます)", "example": [ 1, 2, 3 ], "items": { "type": "integer", "format": "int64", "minimum": 1 } }, "segment_1_tag_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメント1タグID\nセグメントタグ一覧API (`/api/1/segments/{segment_id}/tags`) で取得できます。\n事業所側でセグメント1が利用可能なプラン契約になっている必要があります。\nセグメント(分析用タグ)の設定", "example": 1 }, "segment_2_tag_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメント2タグID\nセグメントタグ一覧API (`/api/1/segments/{segment_id}/tags`) で取得できます。\n事業所側でセグメント2が利用可能なプラン契約になっている必要があります。\nセグメント(分析用タグ)の設定", "example": 1 }, "segment_3_tag_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメント3タグID\nセグメントタグ一覧API (`/api/1/segments/{segment_id}/tags`) で取得できます。\n事業所側でセグメント3が利用可能なプラン契約になっている必要があります。\nセグメント(分析用タグ)の設定", "example": 1 } } } }, "approver_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "承認者のユーザーID\n「承認者を指定」の申請経路 (resource_type: `selected_user`) を利用する場合に指定してください。\n指定する承認者のユーザーIDは、申請経路取得API (`/api/1/approval_flow_routes`) のレスポンス steps[].users_ids から取得できます。", "example": 1 }, "approval_flow_route_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "申請経路ID\n指定する申請経路IDは、申請経路一覧API (`/api/1/approval_flow_routes`) のレスポンス id から取得してください。\nusages に `PaymentRequest` を含む申請経路のみ利用可能です。", "example": 1 }, "applicant_group_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "申請者の所属部門ID
\n「部門役職」の承認ステップを含む申請経路で、申請者がどの所属部門として申請するかを指定します。
\n\n", "example": 1, "nullable": true }, "approval_flow_group_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "申請経路の承認部門ID
\n1段階目の承認ステップが部門選択型の場合に、承認させる部門を指定してください。\n", "example": 1, "nullable": true }, "parent_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "親申請ID\n法人エンタープライズプラン、法人アドバンスプラン(および旧法人プロフェッショナルプラン)で利用できます。\n承認済みの既存各種申請IDのみ指定可能です(各種申請一覧API `/api/1/approval_requests` で取得できます)。", "example": 2, "nullable": true }, "draft": { "type": "boolean", "description": "支払依頼のステータス\n* `true` - 下書き (draft) で支払依頼を作成します\n* `false` - 申請中 (in_progress) で支払依頼を作成します", "example": true }, "document_code": { "type": "string", "maxLength": 255, "description": "請求書番号(255文字以内)", "example": "2" }, "receipt_ids": { "type": "array", "description": "ファイルボックス(証憑ファイル)ID の配列(`/api/1/receipts` で取得できます)", "items": { "type": "integer", "format": "int64", "minimum": 1, "example": 1 } }, "issue_date": { "type": "string", "description": "発生日 (yyyy-mm-dd)", "example": "2019-12-17" }, "payment_date": { "type": "string", "description": "支払期限 (yyyy-mm-dd)。指定しない場合は null で登録されます。", "example": "2019-12-17", "nullable": true }, "payment_method": { "type": "string", "description": "支払方法(デフォルトは `none`)\n* `none` - 指定なし\n* `domestic_bank_transfer` - 国内振込\n* `abroad_bank_transfer` - 国外振込\n* `account_transfer` - 口座振替\n* `credit_card` - クレジットカード", "example": "none", "enum": [ "none", "domestic_bank_transfer", "abroad_bank_transfer", "account_transfer", "credit_card" ] }, "partner_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "支払先の取引先ID(`/api/1/partners` のレスポンス id で取得できます)", "example": 201, "nullable": true }, "partner_code": { "type": "string", "description": "支払先の取引先コード\npartner_id と同時指定した場合は partner_id が優先され、partner_code は無視されます。\n取引先コードを利用するには事業所側で「取引先コードを利用する」設定が有効になっている必要があります。", "example": "code001", "nullable": true }, "bank_code": { "type": "string", "maxLength": 4, "description": "銀行コード(半角数字1桁〜4桁)\npartner_id / partner_code で支払先を指定した場合は無視され、取引先の振込先口座の値が採用されます。", "example": "0001" }, "bank_name": { "type": "string", "maxLength": 255, "description": "銀行名(255文字以内)\npartner_id / partner_code で支払先を指定した場合は無視され、取引先の振込先口座の値が採用されます。", "example": "freee銀行" }, "bank_name_kana": { "type": "string", "maxLength": 15, "description": "銀行名(カナ)(15文字以内)\npartner_id / partner_code で支払先を指定した場合は無視され、取引先の振込先口座の値が採用されます。", "example": "フリーギンコウ" }, "branch_code": { "type": "string", "maxLength": 3, "description": "支店番号(半角数字1桁〜3桁)\npartner_id / partner_code で支払先を指定した場合は無視され、取引先の振込先口座の値が採用されます。", "example": "101" }, "branch_name": { "type": "string", "maxLength": 255, "description": "支店名(255文字以内)\npartner_id / partner_code で支払先を指定した場合は無視され、取引先の振込先口座の値が採用されます。", "example": "銀座支店" }, "branch_kana": { "type": "string", "maxLength": 15, "description": "支店名(カナ)(15文字以内)\n指定可能な文字は、英数・カナ・丸括弧・ハイフン・スペースのみです。\npartner_id / partner_code で支払先を指定した場合は無視され、取引先の振込先口座の値が採用されます。", "example": "ギンザシテン" }, "account_name": { "type": "string", "maxLength": 48, "description": "受取人名(カナ)(48文字以内)\npartner_id / partner_code で支払先を指定した場合は無視され、取引先の振込先口座の値が採用されます。", "example": "フリータロウ" }, "account_number": { "type": "string", "maxLength": 7, "description": "口座番号(半角数字1桁〜7桁)\npartner_id / partner_code で支払先を指定した場合は無視され、取引先の振込先口座の値が採用されます。", "example": "1010101" }, "account_type": { "type": "string", "description": "口座種別(デフォルトは `ordinary`)\n* `ordinary` - 普通\n* `checking` - 当座\n* `earmarked` - 納税準備預金\n* `savings` - 貯蓄\n* `other` - その他\n\npartner_id / partner_code で支払先を指定した場合は無視され、取引先の振込先口座の値が採用されます。", "example": "ordinary", "enum": [ "ordinary", "checking", "earmarked", "savings", "other" ] }, "qualified_invoice_status": { "type": "string", "description": "適格請求書発行事業者の区分(キーを省略した場合は `unspecified` が適用されます)\n* `qualified` - 該当する\n* `not_qualified` - 該当しない\n* `unspecified` - 未選択\n\n支払依頼をインボイス要件をみたす申請として扱うかどうかを表します。\n以下の場合は `unspecified` 以外を指定できません:\n- issue_date が 2023年9月30日以前の場合\n- 事業所側のインボイス経過措置の税区分の設定が「使用する」になっていない場合", "enum": [ "qualified", "not_qualified", "unspecified" ], "example": "qualified" } } }, "paymentRequestUpdateParams": { "type": "object", "required": [ "company_id", "title", "payment_request_lines", "approval_flow_route_id", "draft", "issue_date" ], "properties": { "company_id": { "type": "integer", "format": "int64", "description": "事業所ID", "example": 1 }, "title": { "type": "string", "description": "申請タイトル(250文字以内)\n申請中 (in_progress) の支払依頼に対しては更新できません。下書き状態もしくは差戻し状態の場合のみ有効です。", "example": "仕入代金支払い" }, "application_date": { "type": "string", "description": "申請日 (yyyy-mm-dd)\n指定しない場合は当日の日付が登録されます。\n申請中 (in_progress) の支払依頼に対しては更新できません。下書き状態もしくは差戻し状態の場合のみ有効です。", "example": "2019-12-17" }, "description": { "type": "string", "description": "備考。未指定の場合は空文字列で登録されます。", "example": "◯◯連携先ID: cx12345" }, "payment_request_lines": { "type": "array", "description": "支払依頼の項目行一覧(配列)。最大100行までです。\n通常行 (line_type=`deal_line`) を最低1行含める必要があり、控除・マイナス行 (`negative_line`) や源泉所得税行 (`withholding_tax`) だけで構成することはできません。\n申請中 (draft=false) で更新する場合は、通常行の合計金額が控除・マイナス行と源泉所得税行の合計金額より大きい必要があります。", "items": { "type": "object", "required": [ "amount" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "支払依頼の項目行ID\n既存項目行を更新する場合に指定します。ID を指定しない項目行は新規行として追加されます。\npayment_request_lines に含まれない既存の項目行は削除されます。更新後も残したい行は、必ず支払依頼の項目行 ID を指定して payment_request_lines に含めてください。", "example": 1 }, "line_type": { "type": "string", "description": "行の種類(デフォルトは `deal_line`)\n* `deal_line` - 支払依頼の通常取引行\n* `negative_line` - 支払依頼の控除・マイナス行\n* `withholding_tax` - 源泉所得税行(1件のみ指定可能)", "example": "deal_line", "enum": [ "deal_line", "negative_line", "withholding_tax" ] }, "description": { "type": "string", "description": "内容", "example": "原稿料" }, "amount": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 99999999999, "description": "金額(円、税込)。申請中 (draft=false) で更新する場合は0より大きい値を指定してください。", "example": 30000 }, "account_item_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "勘定科目ID(`/api/1/account_items` のレスポンス id で取得できます)", "example": 1, "nullable": true }, "tax_code": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647, "description": "税区分コード\n勘定科目IDを指定する場合は必須です。税区分コードは `/api/1/taxes/codes` で取得できます。", "example": 1 }, "item_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "品目ID(`/api/1/items` のレスポンス id で取得できます)", "example": 1 }, "section_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "部門ID(`/api/1/sections` のレスポンス id で取得できます)", "example": 1 }, "tag_ids": { "type": "array", "description": "メモタグID の配列(`/api/1/tags` のレスポンス id で取得できます)", "example": [ 1, 2, 3 ], "items": { "type": "integer", "format": "int64", "minimum": 1 } }, "segment_1_tag_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメント1タグID\nセグメントタグ一覧API (`/api/1/segments/{segment_id}/tags`) で取得できます。\n事業所側でセグメント1が利用可能なプラン契約になっている必要があります。\nセグメント(分析用タグ)の設定", "example": 1 }, "segment_2_tag_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメント2タグID\nセグメントタグ一覧API (`/api/1/segments/{segment_id}/tags`) で取得できます。\n事業所側でセグメント2が利用可能なプラン契約になっている必要があります。\nセグメント(分析用タグ)の設定", "example": 1 }, "segment_3_tag_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメント3タグID\nセグメントタグ一覧API (`/api/1/segments/{segment_id}/tags`) で取得できます。\n事業所側でセグメント3が利用可能なプラン契約になっている必要があります。\nセグメント(分析用タグ)の設定", "example": 1 } } } }, "approver_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "承認者のユーザーID\n「承認者を指定」の申請経路 (resource_type: `selected_user`) を利用する場合に指定してください。\n指定する承認者のユーザーIDは、申請経路取得API (`/api/1/approval_flow_routes`) のレスポンス steps[].users_ids から取得できます。\n申請中 (in_progress) の支払依頼に対しては更新できません。下書き状態もしくは差戻し状態の場合のみ有効です。", "example": 1 }, "approval_flow_route_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "申請経路ID\n指定する申請経路IDは、申請経路一覧API (`/api/1/approval_flow_routes`) のレスポンス id から取得してください。\nusages に `PaymentRequest` を含む申請経路のみ利用可能です。\n申請中 (in_progress) の支払依頼に対しては更新できません。下書き状態もしくは差戻し状態の場合のみ有効です。", "example": 1 }, "applicant_group_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "申請者の所属部門ID
\n「部門役職」の承認ステップを含む申請経路で、申請者がどの所属部門として申請するかを指定します。
\n\n", "example": 1, "nullable": true }, "approval_flow_group_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "申請経路の承認部門ID
\n1段階目の承認ステップが部門選択型の場合に、承認させる部門を指定してください。\n", "example": 1, "nullable": true }, "draft": { "type": "boolean", "description": "支払依頼のステータス\n* `true` - 下書き (draft) で支払依頼を更新します\n* `false` - 申請中 (in_progress) で支払依頼を更新します", "example": true }, "document_code": { "type": "string", "maxLength": 255, "description": "請求書番号(255文字以内)", "example": "2" }, "receipt_ids": { "type": "array", "description": "ファイルボックス(証憑ファイル)ID の配列(`/api/1/receipts` で取得できます)", "items": { "type": "integer", "format": "int64", "minimum": 1, "example": 1 } }, "issue_date": { "type": "string", "description": "発生日 (yyyy-mm-dd)", "example": "2019-12-17" }, "payment_date": { "type": "string", "description": "支払期限 (yyyy-mm-dd)。指定しない場合は null で登録されます。", "example": "2019-12-17", "nullable": true }, "payment_method": { "type": "string", "description": "支払方法(デフォルトは `none`)\n* `none` - 指定なし\n* `domestic_bank_transfer` - 国内振込\n* `abroad_bank_transfer` - 国外振込\n* `account_transfer` - 口座振替\n* `credit_card` - クレジットカード", "example": "none", "enum": [ "none", "domestic_bank_transfer", "abroad_bank_transfer", "account_transfer", "credit_card" ] }, "partner_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "支払先の取引先ID(`/api/1/partners` のレスポンス id で取得できます)", "example": 201, "nullable": true }, "partner_code": { "type": "string", "description": "支払先の取引先コード\npartner_id と同時指定した場合は partner_id が優先され、partner_code は無視されます。\n取引先コードを利用するには事業所側で「取引先コードを利用する」設定が有効になっている必要があります。", "example": "code001", "nullable": true }, "bank_code": { "type": "string", "maxLength": 4, "description": "銀行コード(半角数字1桁〜4桁)\npartner_id / partner_code で支払先を指定した場合は無視され、取引先の振込先口座の値が採用されます。", "example": "0001" }, "bank_name": { "type": "string", "maxLength": 255, "description": "銀行名(255文字以内)\npartner_id / partner_code で支払先を指定した場合は無視され、取引先の振込先口座の値が採用されます。", "example": "freee銀行" }, "bank_name_kana": { "type": "string", "maxLength": 15, "description": "銀行名(カナ)(15文字以内)\npartner_id / partner_code で支払先を指定した場合は無視され、取引先の振込先口座の値が採用されます。", "example": "フリーギンコウ" }, "branch_code": { "type": "string", "maxLength": 3, "description": "支店番号(半角数字1桁〜3桁)\npartner_id / partner_code で支払先を指定した場合は無視され、取引先の振込先口座の値が採用されます。", "example": "101" }, "branch_name": { "type": "string", "maxLength": 255, "description": "支店名(255文字以内)\npartner_id / partner_code で支払先を指定した場合は無視され、取引先の振込先口座の値が採用されます。", "example": "銀座支店" }, "branch_kana": { "type": "string", "maxLength": 15, "description": "支店名(カナ)(15文字以内)\n指定可能な文字は、英数・カナ・丸括弧・ハイフン・スペースのみです。\npartner_id / partner_code で支払先を指定した場合は無視され、取引先の振込先口座の値が採用されます。", "example": "ギンザシテン" }, "account_name": { "type": "string", "maxLength": 48, "description": "受取人名(カナ)(48文字以内)\npartner_id / partner_code で支払先を指定した場合は無視され、取引先の振込先口座の値が採用されます。", "example": "フリータロウ" }, "account_number": { "type": "string", "maxLength": 7, "description": "口座番号(半角数字1桁〜7桁)\npartner_id / partner_code で支払先を指定した場合は無視され、取引先の振込先口座の値が採用されます。", "example": "1010101" }, "account_type": { "type": "string", "description": "口座種別(デフォルトは `ordinary`)\n* `ordinary` - 普通\n* `checking` - 当座\n* `earmarked` - 納税準備預金\n* `savings` - 貯蓄\n* `other` - その他\n\npartner_id / partner_code で支払先を指定した場合は無視され、取引先の振込先口座の値が採用されます。", "example": "ordinary", "enum": [ "ordinary", "checking", "earmarked", "savings", "other" ] }, "qualified_invoice_status": { "type": "string", "description": "適格請求書発行事業者の区分(キーを省略した場合は `unspecified` が適用されます)\n* `qualified` - 該当する\n* `not_qualified` - 該当しない\n* `unspecified` - 未選択\n\n支払依頼をインボイス要件をみたす申請として扱うかどうかを表します。\n以下の場合は `unspecified` 以外を指定できません:\n- issue_date が 2023年9月30日以前の場合\n- 事業所側のインボイス経過措置の税区分の設定が「使用する」になっていない場合", "enum": [ "qualified", "not_qualified", "unspecified" ], "example": "qualified" } } }, "partnerCreateParams": { "required": [ "company_id", "name" ], "type": "object", "description": "取引先作成のリクエストパラメータ。POST /api/1/partners のリクエストボディ。", "properties": { "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID。作成先の事業所を指定します。", "example": 1 }, "name": { "type": "string", "maxLength": 255, "description": "取引先名 (255 文字以内、事業所内で重複不可)。取引・請求書で参照される表示名。", "example": "新しい取引先" }, "code": { "type": "string", "description": "取引先コード。事業所設定で「取引先コードの利用」を有効にしている場合は必須で、事業所内で重複不可。無効な事業所では指定するとエラーになります。", "example": "code001" }, "shortcut1": { "type": "string", "maxLength": 255, "description": "ショートカット1 (255 文字以内)。取引先検索用の任意キーワード。", "example": "NEWPARTNER" }, "shortcut2": { "type": "string", "maxLength": 255, "description": "ショートカット2 (255 文字以内)。shortcut1 と併用可能な補助キーワード。", "example": "502" }, "org_code": { "type": "integer", "format": "int64", "description": "事業所種別。\n\n", "example": 1, "enum": [ 1, 2 ], "nullable": true }, "country_code": { "type": "string", "description": "地域。指定しない場合は JP になります。\n\n", "example": "JP", "enum": [ "JP", "ZZ" ] }, "long_name": { "type": "string", "maxLength": 255, "description": "正式名称(255 文字以内)。取引先の正式な法人・屋号名称。請求書などの帳票に印字される名称。", "example": "株式会社ABC商店" }, "name_kana": { "type": "string", "maxLength": 255, "description": "カナ名称(255 文字以内)。取引先名の全角カナ表記。Web 画面のカナ検索で利用されます。", "example": "エービーシーショウテン" }, "default_title": { "type": "string", "description": "敬称。請求書などで取引先名の後ろに付与される敬称。御中、様、(空白) の 3 つから選択します。", "example": "御中" }, "phone": { "type": "string", "description": "電話番号。取引先の連絡先電話番号。フォーマット制約はありません。", "example": "03-1234-5678" }, "contact_name": { "type": "string", "maxLength": 255, "description": "担当者 氏名 (255 文字以内)。取引先窓口の担当者名。", "example": "freee太郎" }, "email": { "type": "string", "maxLength": 255, "description": "担当者 メールアドレス (255 文字以内)。取引先窓口の担当者メールアドレス。", "example": "contact@example.com" }, "payer_walletable_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "振込元口座ID(一括振込ファイル用)。walletable の type が 'bank_account' の口座 ID のみ指定できます。未設定にする場合は null を指定してください。法人スタータープラン(および旧法人プロフェッショナルプラン)以上でのみ設定可能で、それ未満の事業所では指定しても無視されます。", "example": 1, "nullable": true }, "transfer_fee_handling_side": { "type": "string", "description": "振込手数料負担(一括振込ファイル用)。指定しない場合は payer になります。法人スタータープラン(および旧法人プロフェッショナルプラン)以上でのみ設定可能で、それ未満の事業所では指定しても無視されます。\n\n", "example": "payer", "enum": [ "payer", "payee" ] }, "qualified_invoice_issuer": { "type": "boolean", "description": "インボイス制度適格請求書発行事業者フラグ。デフォルトは false。\n\n国税庁インボイス制度適格請求書発行事業者公表サイト\n", "example": false, "default": false }, "invoice_registration_number": { "type": "string", "maxLength": 14, "minLength": 13, "pattern": "^T?[1-9][0-9]{12}$", "description": "インボイス制度適格請求書発行事業者登録番号。先頭 T + 数字 13 桁の固定 14 文字(先頭 T なしの数字 13 桁も許容)。\n国税庁インボイス制度適格請求書発行事業者公表サイト\n", "example": "T1000000000001", "nullable": true }, "address_attributes": { "type": "object", "description": "住所情報。省略した場合、address_attributes 自体が未設定になります。country_code を指定していれば address_attributes を省略しても地域は反映されます。", "properties": { "zipcode": { "type": "string", "maxLength": 8, "description": "郵便番号(ハイフン含む可、8 文字以内)。", "example": "000-0000" }, "prefecture_code": { "type": "integer", "format": "int64", "minimum": -1, "maximum": 46, "description": "都道府県コード(-1: 設定しない、0: 北海道、1:青森、2:岩手、3:宮城、4:秋田、5:山形、6:福島、7:茨城、8:栃木、9:群馬、10:埼玉、11:千葉、12:東京、13:神奈川、14:新潟、15:富山、16:石川、17:福井、18:山梨、19:長野、20:岐阜、21:静岡、22:愛知、23:三重、24:滋賀、25:京都、26:大阪、27:兵庫、28:奈良、29:和歌山、30:鳥取、31:島根、32:岡山、33:広島、34:山口、35:徳島、36:香川、37:愛媛、38:高知、39:福岡、40:佐賀、41:長崎、42:熊本、43:大分、44:宮崎、45:鹿児島、46:沖縄)", "example": 4 }, "street_name1": { "type": "string", "maxLength": 255, "description": "市区町村・番地(255 文字以内)。", "example": "千代田区丸の内1-1-1" }, "street_name2": { "type": "string", "maxLength": 255, "description": "建物名・部屋番号など(255 文字以内)。", "example": "freeeビル 10F" } } }, "partner_doc_setting_attributes": { "type": "object", "description": "請求書送付方法の設定。", "properties": { "sending_method": { "type": "string", "description": "請求書送付方法。null を指定すると未設定になります。\n\n", "example": "posting", "enum": [ "email", "posting", "email_and_posting", "pdf_delivery", "pdf_delivery_and_posting" ], "nullable": true } } }, "partner_bank_account_attributes": { "type": "object", "description": "銀行口座情報(この取引先の受取口座)。", "properties": { "bank_name": { "type": "string", "description": "銀行名。", "example": "freee銀行" }, "bank_name_kana": { "type": "string", "description": "銀行名(カナ)。", "example": "フリーギンコウ" }, "bank_code": { "type": "string", "description": "銀行コード(4 桁の統一金融機関コード)。", "example": "0001" }, "branch_name": { "type": "string", "description": "支店名。", "example": "銀座支店" }, "branch_kana": { "type": "string", "description": "支店名(カナ)。", "example": "ギンザシテン" }, "branch_code": { "type": "string", "description": "支店番号(3 桁)。", "example": "101" }, "account_type": { "type": "string", "description": "口座種別。指定しない場合は ordinary になります。\n\n", "example": "ordinary" }, "account_number": { "type": "string", "description": "口座番号。", "example": "1010101" }, "long_account_name": { "type": "string", "description": "受取人名。", "example": "freee太郎" }, "account_name": { "type": "string", "description": "受取人名(カナ)。全銀フォーマットで送信する際に使用されます。", "example": "フリータロウ" } } }, "payment_term_attributes": { "type": "object", "description": "支払期日設定。この取引先への支払日を締め日基準で計算するための設定。法人スタータープラン(および旧法人プロフェッショナルプラン)以上でのみ設定可能。cutoff_day / additional_months / fixed_day を組み合わせて指定します。", "properties": { "cutoff_day": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 32, "description": "締め日。1〜31 の日付を指定します。29, 30, 31 日の末日を指定する場合は 32 を指定してください。", "example": 15 }, "additional_months": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 6, "description": "支払月。締め日から数えて何ヶ月後に支払うか。当月を指定する場合は 0 を指定してください。", "example": 1 }, "fixed_day": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 32, "description": "支払日。1〜31 の日付を指定します。29, 30, 31 日の末日を指定する場合は 32 を指定してください。", "example": 32 } } }, "invoice_payment_term_attributes": { "type": "object", "description": "請求の入金期日設定。この取引先からの入金日を締め日基準で計算するための設定。法人スタータープラン(および旧法人プロフェッショナルプラン)以上でのみ設定可能。", "properties": { "cutoff_day": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 32, "description": "締め日。1〜31 の日付を指定します。29, 30, 31 日の末日を指定する場合は 32 を指定してください。", "example": 15 }, "additional_months": { "type": "integer", "minimum": 0, "maximum": 6, "description": "入金月。締め日から数えて何ヶ月後に入金されるか。当月を指定する場合は 0 を指定してください。", "example": 1 }, "fixed_day": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 32, "description": "入金日。1〜31 の日付を指定します。29, 30, 31 日の末日を指定する場合は 32 を指定してください。", "example": 32 } } } } }, "partnerUpdateParams": { "required": [ "company_id", "name" ], "type": "object", "description": "取引先更新のリクエストパラメータ。PUT /api/1/partners/{id} および PUT /api/1/partners/code/{code} のリクエストボディ。PATCH 相当の挙動をするため、リクエストに含まれていない属性は既存値が維持されます(payment_term_attributes / invoice_payment_term_attributes のみ null 指定で未設定に戻せます)。", "properties": { "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID。取引先が属する事業所を指定します。", "example": 1 }, "name": { "type": "string", "maxLength": 255, "description": "取引先名 (255 文字以内、事業所内で重複不可)。", "example": "新しい取引先" }, "available": { "type": "boolean", "description": "使用可能フラグ。false を指定すると Web 画面の入力候補として表示されなくなります(取引先自体は削除されません)。\n\n", "example": false }, "shortcut1": { "type": "string", "maxLength": 255, "description": "ショートカット1 (255 文字以内)。取引先検索用の任意キーワード。", "example": "NEWPARTNER" }, "shortcut2": { "type": "string", "maxLength": 255, "description": "ショートカット2 (255 文字以内)。shortcut1 と併用可能な補助キーワード。", "example": "502" }, "org_code": { "type": "integer", "format": "int64", "description": "事業所種別。null を指定すると未設定に戻ります。\n\n", "example": 1, "enum": [ 1, 2 ], "nullable": true }, "country_code": { "type": "string", "description": "地域。指定しない場合は JP になります。\n\n", "example": "JP", "enum": [ "JP", "ZZ" ] }, "long_name": { "type": "string", "maxLength": 255, "description": "正式名称(255 文字以内)。取引先の正式な法人・屋号名称。", "example": "株式会社ABC商店" }, "name_kana": { "type": "string", "maxLength": 255, "description": "カナ名称(255 文字以内)。取引先名の全角カナ表記。", "example": "エービーシーショウテン" }, "default_title": { "type": "string", "description": "敬称。御中、様、(空白) の 3 つから選択します。", "example": "御中" }, "phone": { "type": "string", "description": "電話番号。フォーマット制約はありません。", "example": "03-1234-5678" }, "contact_name": { "type": "string", "maxLength": 255, "description": "担当者 氏名 (255 文字以内)。", "example": "freee太郎" }, "email": { "type": "string", "maxLength": 255, "description": "担当者 メールアドレス (255 文字以内)。", "example": "contact@example.com" }, "payer_walletable_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "振込元口座ID(一括振込ファイル用)。walletable の type が 'bank_account' の口座 ID のみ指定できます。未設定にする場合は null。法人スタータープラン(および旧法人プロフェッショナルプラン)以上でのみ設定可能。", "example": 1, "nullable": true }, "transfer_fee_handling_side": { "type": "string", "description": "振込手数料負担(一括振込ファイル用)。指定しない場合は payer になります。法人スタータープラン(および旧法人プロフェッショナルプラン)以上でのみ設定可能。\n\n", "example": "payer", "enum": [ "payer", "payee" ] }, "qualified_invoice_issuer": { "type": "boolean", "description": "インボイス制度適格請求書発行事業者フラグ。\n\n国税庁インボイス制度適格請求書発行事業者公表サイト\n", "example": false }, "invoice_registration_number": { "type": "string", "maxLength": 14, "minLength": 13, "pattern": "^T?[1-9][0-9]{12}$", "description": "インボイス制度適格請求書発行事業者登録番号。先頭 T + 数字 13 桁の固定 14 文字(先頭 T なしの数字 13 桁も許容)。\n国税庁インボイス制度適格請求書発行事業者公表サイト\n", "example": "T1000000000001", "nullable": true }, "address_attributes": { "type": "object", "description": "住所情報。指定した属性のみ更新されます(省略した属性は既存値を維持)。", "properties": { "zipcode": { "type": "string", "maxLength": 8, "description": "郵便番号(ハイフン含む可、8 文字以内)。", "example": "000-0000" }, "prefecture_code": { "type": "integer", "format": "int64", "minimum": -1, "maximum": 46, "description": "都道府県コード(-1: 設定しない、0: 北海道、1:青森、2:岩手、3:宮城、4:秋田、5:山形、6:福島、7:茨城、8:栃木、9:群馬、10:埼玉、11:千葉、12:東京、13:神奈川、14:新潟、15:富山、16:石川、17:福井、18:山梨、19:長野、20:岐阜、21:静岡、22:愛知、23:三重、24:滋賀、25:京都、26:大阪、27:兵庫、28:奈良、29:和歌山、30:鳥取、31:島根、32:岡山、33:広島、34:山口、35:徳島、36:香川、37:愛媛、38:高知、39:福岡、40:佐賀、41:長崎、42:熊本、43:大分、44:宮崎、45:鹿児島、46:沖縄)", "example": 4 }, "street_name1": { "type": "string", "maxLength": 255, "description": "市区町村・番地(255 文字以内)。", "example": "千代田区丸の内1-1-1" }, "street_name2": { "type": "string", "maxLength": 255, "description": "建物名・部屋番号など(255 文字以内)。", "example": "freeeビル 10F" } } }, "partner_doc_setting_attributes": { "type": "object", "description": "請求書送付方法の設定。", "properties": { "sending_method": { "type": "string", "description": "請求書送付方法。null を指定すると未設定になります。\n\n", "example": "posting", "enum": [ "email", "posting", "email_and_posting", "pdf_delivery", "pdf_delivery_and_posting" ], "nullable": true } } }, "partner_bank_account_attributes": { "type": "object", "description": "銀行口座情報(この取引先の受取口座)。指定した属性のみ更新されます。account_type に空文字を指定した場合は ordinary で置き換わる点に注意してください。", "properties": { "bank_name": { "type": "string", "description": "銀行名。", "example": "freee銀行" }, "bank_name_kana": { "type": "string", "description": "銀行名(カナ)。", "example": "フリーギンコウ" }, "bank_code": { "type": "string", "description": "銀行コード(4 桁の統一金融機関コード)。", "example": "0001" }, "branch_name": { "type": "string", "description": "支店名。", "example": "銀座支店" }, "branch_kana": { "type": "string", "description": "支店名(カナ)。", "example": "ギンザシテン" }, "branch_code": { "type": "string", "description": "支店番号(3 桁)。", "example": "101" }, "account_type": { "type": "string", "description": "口座種別。指定しない場合は既存値を維持します(空文字は ordinary で置き換わります)。\n\n", "example": "ordinary" }, "account_number": { "type": "string", "description": "口座番号。", "example": "1010101" }, "long_account_name": { "type": "string", "description": "受取人名。", "example": "freee太郎" }, "account_name": { "type": "string", "description": "受取人名(カナ)。全銀フォーマットで送信する際に使用されます。", "example": "フリータロウ" } } }, "payment_term_attributes": { "type": "object", "description": "支払期日設定。null を指定すると期日設定を未設定に戻します。法人スタータープラン(および旧法人プロフェッショナルプラン)以上でのみ設定可能。cutoff_day / additional_months / fixed_day はまとめて指定する必要があります(一部だけの更新はできません)。", "properties": { "cutoff_day": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 32, "description": "締め日。1〜31 の日付を指定します。29, 30, 31 日の末日を指定する場合は 32 を指定してください。", "example": 15 }, "additional_months": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 6, "description": "支払月。締め日から数えて何ヶ月後に支払うか。当月を指定する場合は 0 を指定してください。", "example": 1 }, "fixed_day": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 32, "description": "支払日。1〜31 の日付を指定します。29, 30, 31 日の末日を指定する場合は 32 を指定してください。", "example": 32 } }, "nullable": true }, "invoice_payment_term_attributes": { "type": "object", "description": "請求の入金期日設定。null を指定すると期日設定を未設定に戻します。法人スタータープラン(および旧法人プロフェッショナルプラン)以上でのみ設定可能。cutoff_day / additional_months / fixed_day はまとめて指定する必要があります。", "properties": { "cutoff_day": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 32, "description": "締め日。1〜31 の日付を指定します。29, 30, 31 日の末日を指定する場合は 32 を指定してください。", "example": 15 }, "additional_months": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 6, "description": "入金月。締め日から数えて何ヶ月後に入金されるか。当月を指定する場合は 0 を指定してください。", "example": 1 }, "fixed_day": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 32, "description": "入金日。1〜31 の日付を指定します。29, 30, 31 日の末日を指定する場合は 32 を指定してください。", "example": 32 } }, "nullable": true } } }, "receiptCreateParams": { "type": "object", "required": [ "company_id", "receipt" ], "properties": { "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID", "example": 1 }, "description": { "type": "string", "maxLength": 255, "description": "メモ (255文字以内)", "example": "タクシー利用" }, "receipt": { "type": "string", "description": "証憑ファイル(multipart/form-dataのファイルパートとして送信します)", "format": "binary" }, "receipt_metadatum_partner_name": { "type": "string", "maxLength": 255, "nullable": true, "description": "発行元。本APIではmultipart/form-dataで送信するため、更新APIと異なりreceipt_metadatum_のプレフィックスが付いたフラットなキー名で指定します。", "example": "freeeパートナー" }, "receipt_metadatum_issue_date": { "type": "string", "nullable": true, "description": "発行日 (yyyy-mm-dd)", "example": "2019-12-17" }, "receipt_metadatum_amount": { "type": "integer", "format": "int64", "minimum": -999999999999, "maximum": 999999999999, "nullable": true, "description": "金額(円)", "example": 5250 }, "qualified_invoice": { "type": "string", "description": "適格請求書等(qualified: 該当する、not_qualified: 該当しない、unselected: 未選択)。未指定の場合はOCR解析結果が採用されます。", "enum": [ "qualified", "not_qualified", "unselected" ], "example": "qualified" }, "document_type": { "type": "string", "description": "書類の種類(receipt: 領収書、invoice: 請求書、other: その他)。未指定の場合はOCR解析結果が採用されます。", "enum": [ "receipt", "invoice", "other" ], "example": "receipt" } } }, "receiptUpdateParams": { "type": "object", "required": [ "company_id" ], "properties": { "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID", "example": 1 }, "description": { "type": "string", "maxLength": 255, "description": "メモ (255文字以内)", "example": "タクシー利用" }, "receipt_metadatum": { "type": "object", "description": "電子帳簿保存法の検索要件に対応するメタデータ(発行元・発行日・金額)", "properties": { "partner_name": { "type": "string", "maxLength": 255, "nullable": true, "description": "発行元", "example": "freeeパートナー" }, "issue_date": { "type": "string", "nullable": true, "description": "発行日 (yyyy-mm-dd)", "example": "2019-12-17" }, "amount": { "type": "integer", "format": "int64", "minimum": -999999999999, "maximum": 999999999999, "nullable": true, "description": "金額(円)", "example": 5250 } } }, "qualified_invoice": { "type": "string", "description": "適格請求書等(qualified: 該当する、not_qualified: 該当しない、unselected: 未選択)", "enum": [ "qualified", "not_qualified", "unselected" ], "example": "qualified" }, "invoice_registration_number": { "type": "string", "maxLength": 14, "minLength": 13, "pattern": "^T?[1-9][0-9]{12}$", "description": "インボイス制度適格請求書発行事業者登録番号\n- 先頭T数字13桁の14桁の文字列。先頭のTは省略可能です(省略した場合もT付きの登録番号として登録され、レスポンスではT付きの14桁で返ります)\n国税庁インボイス制度適格請求書発行事業者公表サイト\n", "example": "T1000000000001" }, "document_type": { "type": "string", "description": "書類の種類(receipt: 領収書、invoice: 請求書、other: その他)", "enum": [ "receipt", "invoice", "other" ], "example": "receipt" } } }, "accountItemCreateParams": { "type": "object", "required": [ "account_item", "company_id" ], "properties": { "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", "name", "tax_code" ], "properties": { "name": { "type": "string", "maxLength": 30, "description": "勘定科目名 (30文字以内)", "example": "新しい勘定科目" }, "shortcut": { "type": "string", "maxLength": 20, "description": "ショートカット1 (20文字以内)", "example": "NEWACCOUNTITEM" }, "shortcut_num": { "type": "string", "maxLength": 20, "description": "ショートカット2 (20文字以内)", "example": "999" }, "code": { "type": "string", "maxLength": 20, "description": "勘定科目コード (20文字以内)。半角英数字・ハイフン・アンダースコアのみ利用できます。事業所の設定で勘定科目コードを使用する設定にしている場合のみ有効で、設定が無効の場合は指定しても無視されます。", "example": "999", "pattern": "^[0-9a-zA-Z_-]+$" }, "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 } } } } } } } }, "accountItemsResponse": { "type": "object", "required": [ "account_items" ], "properties": { "account_items": { "type": "array", "items": { "required": [ "account_category", "account_category_id", "available", "categories", "corresponding_expense_id", "corresponding_expense_name", "corresponding_income_id", "corresponding_income_name", "default_tax_code", "group_id", "group_name", "id", "name", "shortcut", "shortcut_num", "tax_code", "update_date", "walletable_id" ], "type": "object", "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "勘定科目ID", "example": 1 }, "name": { "type": "string", "description": "勘定科目名 (30文字以内)", "example": "ソフトウェア" }, "tax_code": { "type": "integer", "format": "int64", "description": "税区分コード", "example": 1 }, "shortcut": { "type": "string", "maxLength": 20, "description": "ショートカット1 (20文字以内)。未設定の場合はnullが返ります。", "example": "SOFUTO", "nullable": true }, "shortcut_num": { "type": "string", "maxLength": 20, "description": "ショートカット2 (20文字以内)。未設定の場合はnullが返ります。", "example": "123", "nullable": true }, "code": { "type": "string", "maxLength": 20, "description": "勘定科目コード。事業所の設定で勘定科目コードを使用する設定にしている場合のみ返ります。", "example": "123", "nullable": true }, "default_tax_code": { "type": "integer", "format": "int64", "description": "デフォルト設定がされている税区分コード。base_date(未指定の場合はリクエスト日)を基準とした税率に基づく値が返ります。", "example": 34 }, "account_category": { "type": "string", "description": "勘定科目カテゴリー", "example": "現金・預金" }, "account_category_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "勘定科目のカテゴリーID", "example": 1 }, "categories": { "type": "array", "description": "勘定科目カテゴリーの階層(大分類から順)", "items": { "type": "string", "description": "勘定科目カテゴリー", "example": "資産" } }, "available": { "type": "boolean", "description": "勘定科目の使用設定(true: 使用する、false: 使用しない)", "example": true }, "walletable_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "口座ID", "example": 1, "nullable": true }, "group_name": { "type": "string", "description": "決算書表示名(小カテゴリー)", "example": "売掛金", "nullable": true }, "group_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "決算書表示名ID(小カテゴリー)", "example": 1, "nullable": true }, "corresponding_income_name": { "type": "string", "description": "収入取引相手勘定科目名", "example": "売掛金", "nullable": true }, "corresponding_income_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "収入取引相手勘定科目ID", "example": 1, "nullable": true }, "corresponding_expense_name": { "type": "string", "description": "支出取引相手勘定科目名", "example": "買掛金", "nullable": true }, "corresponding_expense_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "支出取引相手勘定科目ID", "example": 1, "nullable": true }, "update_date": { "type": "string", "description": "更新日(yyyy-mm-dd)", "example": "2020-06-15" } } } } } }, "accountItemResponse": { "type": "object", "required": [ "account_item" ], "properties": { "account_item": { "type": "object", "required": [ "account_category", "account_category_id", "accumulated_dep_account_item_id", "accumulated_dep_account_item_name", "available", "company_id", "corresponding_expense_id", "corresponding_income_id", "group_id", "group_name", "id", "items", "name", "partners", "searchable", "shortcut", "shortcut_num", "tax_code", "walletable_id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "勘定科目ID", "example": 1 }, "name": { "type": "string", "maxLength": 30, "description": "勘定科目名 (30文字以内)", "example": "ソフトウェア" }, "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID", "example": 1 }, "tax_code": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647, "description": "税区分コード", "example": 1 }, "account_category": { "type": "string", "description": "勘定科目カテゴリー", "example": "現金・預金" }, "account_category_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "勘定科目のカテゴリーID", "example": 1 }, "shortcut": { "type": "string", "maxLength": 20, "description": "ショートカット1 (20文字以内)。未設定の場合はnullが返ります。", "example": "SOFUTO", "nullable": true }, "shortcut_num": { "type": "string", "maxLength": 20, "description": "ショートカット2 (20文字以内)。未設定の場合はnullが返ります。", "example": "123", "nullable": true }, "code": { "type": "string", "maxLength": 20, "description": "勘定科目コード。事業所の設定で勘定科目コードを使用する設定にしている場合のみ返ります。", "example": "123", "nullable": true }, "searchable": { "type": "integer", "format": "int64", "minimum": 2, "maximum": 3, "description": "検索可能の設定(2: 検索可能, 3: 検索不可)", "example": 2 }, "accumulated_dep_account_item_name": { "type": "string", "description": "減価償却累計額勘定科目名(法人のみ利用可能)。未設定の場合は空文字が返ります。", "example": "減価償却累計額" }, "accumulated_dep_account_item_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "減価償却累計額勘定科目ID(法人のみ利用可能)", "example": 1, "nullable": true }, "items": { "type": "array", "description": "勘定科目に紐付く品目の一覧。紐付く品目がない場合は空配列が返ります。", "items": { "type": "object", "required": [ "id", "name" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "品目ID", "example": 1 }, "name": { "type": "string", "description": "品目名", "example": "住民税" } } } }, "partners": { "type": "array", "description": "勘定科目に紐付く取引先の一覧。紐付く取引先がない場合は空配列が返ります。", "items": { "type": "object", "required": [ "id", "name" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "取引先ID", "example": 1 }, "name": { "type": "string", "description": "取引先名", "example": "test" } } } }, "available": { "type": "boolean", "description": "勘定科目の使用設定(true: 使用する、false: 使用しない)", "example": true }, "walletable_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "口座ID", "example": 1, "nullable": true }, "group_name": { "type": "string", "description": "決算書表示名(小カテゴリー)", "example": "売掛金", "nullable": true }, "group_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "決算書表示名ID(小カテゴリー)", "example": 1, "nullable": true }, "corresponding_income_name": { "type": "string", "description": "収入取引相手勘定科目名", "example": "売掛金", "nullable": true }, "corresponding_income_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "収入取引相手勘定科目ID", "example": 1, "nullable": true }, "corresponding_expense_name": { "type": "string", "description": "支出取引相手勘定科目名", "example": "買掛金", "nullable": true }, "corresponding_expense_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "支出取引相手勘定科目ID", "example": 1, "nullable": true }, "default_tax_code": { "type": "integer", "format": "int64", "description": "リクエストした日時を基準とした税区分コード。勘定科目の取得API(GET /api/1/account_items/{id})でのみ返ります。勘定科目の作成・更新時に利用するものではありません。", "example": 34 }, "categories": { "type": "array", "description": "勘定科目カテゴリーの階層(大分類から順)。勘定科目の取得API(GET /api/1/account_items/{id})でのみ返ります。", "items": { "type": "string", "description": "勘定科目カテゴリー", "example": "資産" } } } } } }, "accountItemUpdateParams": { "type": "object", "required": [ "account_item", "company_id" ], "properties": { "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" }, "code": { "type": "string", "maxLength": 20, "description": "勘定科目コード (20文字以内)。半角英数字・ハイフン・アンダースコアのみ利用できます。事業所の設定で勘定科目コードを使用する設定にしている場合のみ有効で、設定が無効の場合は指定しても無視されます。", "example": "999", "pattern": "^[0-9a-zA-Z_-]+$" }, "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", "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 } } } } } } } }, "bank": { "type": "object", "required": [ "id", "name", "type", "name_kana" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "連携サービスID。口座の作成(POST /api/1/walletables)のbank_idパラメータに指定して利用します。", "example": 1 }, "name": { "type": "string", "description": "連携サービス名", "example": "フリー銀行" }, "type": { "type": "string", "description": "連携サービス種別\n* `bank_account` - 銀行口座\n* `credit_card` - クレジットカード\n* `wallet` - その他の決済口座", "example": "bank_account", "enum": [ "bank_account", "credit_card", "wallet" ] }, "name_kana": { "type": "string", "description": "連携サービス名(カナ)。連携サービス一覧の取得(GET /api/1/banks)の取得結果はこの値の昇順で返ります。カナ名が未登録の場合はnullになります。", "example": "フリーギンコウ", "nullable": true } } }, "bankResponse": { "type": "object", "required": [ "bank" ], "properties": { "bank": { "$ref": "#/components/schemas/bank" } } }, "journalsResponse": { "required": [ "journals" ], "type": "object", "properties": { "journals": { "required": [ "company_id", "download_type", "encoding", "end_date", "id", "messages", "start_date", "status_url", "up_to_date", "up_to_date_reasons" ], "type": "object", "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "受け付けID。仕訳帳のステータスの取得(GET /api/1/journals/reports/{id}/status)・仕訳帳のダウンロード(GET /api/1/journals/reports/{id}/download)の id として使用します。", "example": 1 }, "messages": { "type": "array", "description": "受け付けメッセージ", "items": { "type": "string", "example": "ID:1 でリクエストを受け付けました。" } }, "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID", "example": 1 }, "download_type": { "type": "string", "description": "ダウンロード形式\n* `generic` - 旧CSV形式\n* `generic_v2` - 新CSV形式(freee汎用形式)\n* `csv` - 弥生会計形式のCSV\n* `pdf` - PDF形式", "example": "csv", "enum": [ "generic", "generic_v2", "csv", "pdf" ] }, "encoding": { "type": "string", "description": "出力ファイルの文字コード。download_type が csv の場合は常に sjis、pdf の場合は null になります。", "example": "sjis", "nullable": true, "enum": [ "sjis", "utf-8" ] }, "start_date": { "type": "string", "description": "取得開始日(yyyy-mm-dd)。リクエストで未指定の場合は当期の会計年度の開始日が設定されます。", "example": "2019-12-17" }, "end_date": { "type": "string", "description": "取得終了日(yyyy-mm-dd)。リクエストで未指定の場合は当期の会計年度の終了日が設定されます。", "example": "2019-12-17" }, "visible_tags": { "type": "array", "description": "補助科目やコメントとして出力する項目。リクエストで visible_tags を指定した場合のみ返ります。all を指定した場合は展開された個別の項目が返ります。", "items": { "type": "string", "description": "出力する項目\n* `partner` - 取引先タグ\n* `item` - 品目タグ\n* `tag` - メモタグ\n* `section` - 部門タグ\n* `description` - 備考欄\n* `wallet_txn_description` - 明細の備考欄\n* `segment_1_tag` - セグメント1タグ\n* `segment_2_tag` - セグメント2タグ\n* `segment_3_tag` - セグメント3タグ\n* `all` - すべて", "example": "partner", "enum": [ "partner", "item", "tag", "section", "description", "wallet_txn_description", "all", "segment_1_tag", "segment_2_tag", "segment_3_tag" ] } }, "visible_ids": { "type": "array", "description": "追加出力するID項目。リクエストで visible_ids を指定した場合のみ返ります。", "items": { "type": "string", "description": "追加出力するID項目\n* `deal_id` - 取引ID\n* `transfer_id` - 取引(振替)ID\n* `manual_journal_id` - 振替伝票ID", "example": "deal_id", "enum": [ "deal_id", "transfer_id", "manual_journal_id" ] } }, "status_url": { "type": "string", "description": "仕訳帳のステータスの取得(GET /api/1/journals/reports/{id}/status)用URL。作成の進捗はこのURLで確認します。", "example": "https://api.freee.co.jp/api/1/journals/reports/4/status" }, "up_to_date": { "type": "boolean", "description": "集計結果が最新かどうか。false の場合は up_to_date_reasons に要因が入ります。", "example": true }, "up_to_date_reasons": { "type": "array", "description": "集計が最新でない場合の要因情報。up_to_date が true の場合は空配列になります。", "items": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "string", "description": "集計が最新でない要因のコード\n* `depreciation_creating` - 当期の固定資産の償却作成が実行中\n* `depreciation_create_error` - 当期の固定資産の償却作成がエラー終了", "example": "depreciation_creating", "enum": [ "depreciation_creating", "depreciation_create_error" ] }, "message": { "type": "string", "description": "集計が最新でない理由", "example": "当期の固定資産の償却作成が完了していないため、正しい集計結果でない可能性があります。しばらく時間をおいてからもう一度お試しください。" } } } } } } } }, "journalStatusResponse": { "type": "object", "required": [ "journals" ], "properties": { "journals": { "type": "object", "required": [ "company_id", "download_type", "encoding", "end_date", "id", "start_date", "status" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "受け付けID。仕訳帳のダウンロード要求(GET /api/1/journals)のレスポンスで返る id です。", "example": 1 }, "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID", "example": 1 }, "download_type": { "type": "string", "description": "ダウンロード形式\n* `generic` - 旧CSV形式\n* `generic_v2` - 新CSV形式(freee汎用形式)\n* `csv` - 弥生会計形式のCSV\n* `pdf` - PDF形式", "example": "csv", "enum": [ "generic", "generic_v2", "csv", "pdf" ] }, "encoding": { "type": "string", "description": "出力ファイルの文字コード。download_type が csv の場合は常に sjis、pdf の場合は null になります。", "example": "sjis", "nullable": true, "enum": [ "sjis", "utf-8" ] }, "status": { "type": "string", "description": "ダウンロードリクエストのステータス\n* `enqueued` - 実行待ち\n* `working` - 実行中\n* `uploaded` - 準備完了(仕訳帳のダウンロード(GET /api/1/journals/reports/{id}/download)でダウンロードできます)\n* `failed` - ファイルの作成に失敗(仕訳帳のダウンロード要求(GET /api/1/journals)から再度やり直してください)", "example": "enqueued", "enum": [ "enqueued", "working", "uploaded", "failed" ] }, "start_date": { "type": "string", "description": "取得開始日(yyyy-mm-dd)", "example": "2019-12-17" }, "end_date": { "type": "string", "description": "取得終了日(yyyy-mm-dd)", "example": "2019-12-17" }, "visible_tags": { "type": "array", "description": "補助科目やコメントとして出力する項目。ダウンロード要求時に visible_tags を指定した場合のみ返ります。all を指定した場合は展開された個別の項目が返ります。", "items": { "type": "string", "description": "出力する項目\n* `partner` - 取引先タグ\n* `item` - 品目タグ\n* `tag` - メモタグ\n* `section` - 部門タグ\n* `description` - 備考欄\n* `wallet_txn_description` - 明細の備考欄\n* `segment_1_tag` - セグメント1タグ\n* `segment_2_tag` - セグメント2タグ\n* `segment_3_tag` - セグメント3タグ\n* `all` - すべて", "example": "partner", "enum": [ "partner", "item", "tag", "section", "description", "wallet_txn_description", "all", "segment_1_tag", "segment_2_tag", "segment_3_tag" ] } }, "visible_ids": { "type": "array", "description": "追加出力するID項目。ダウンロード要求時に visible_ids を指定した場合のみ返ります。", "items": { "type": "string", "description": "追加出力するID項目\n* `deal_id` - 取引ID\n* `transfer_id` - 取引(振替)ID\n* `manual_journal_id` - 振替伝票ID", "example": "deal_id", "enum": [ "deal_id", "transfer_id", "manual_journal_id" ] } }, "download_url": { "type": "string", "description": "仕訳帳のダウンロード(GET /api/1/journals/reports/{id}/download)用URL。status が uploaded の場合のみ返ります。", "example": "https://api.freee.co.jp/api/1/journals/reports/1/download" } } } } }, "trialBsResponse": { "type": "object", "required": [ "trial_bs", "up_to_date" ], "properties": { "trial_bs": { "type": "object", "required": [ "balances", "company_id" ], "properties": { "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID", "example": 1 }, "fiscal_year": { "type": "integer", "format": "int64", "description": "会計年度(会計期間の開始日が属する年。例: 会計期間が 2019-04-01 開始なら 2019)。リクエストで指定した場合、または月・日の絞り込み条件が指定されていない場合にのみ含まれる。", "example": 2019 }, "start_month": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 12, "description": "発生月で絞込:開始会計月(1-12)。リクエストで指定した場合にのみ含まれる。", "example": 1 }, "end_month": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 12, "description": "発生月で絞込:終了会計月(1-12)。リクエストで指定した場合にのみ含まれる。", "example": 12 }, "start_date": { "type": "string", "description": "発生日で絞込:開始日(yyyy-mm-dd)。リクエストで指定した場合にのみ含まれる。", "example": "2019-01-01" }, "end_date": { "type": "string", "description": "発生日で絞込:終了日(yyyy-mm-dd)。リクエストで指定した場合にのみ含まれる。", "example": "2019-12-31" }, "account_item_display_type": { "type": "string", "description": "勘定科目の表示。リクエストで指定した場合にのみ含まれる。\n* `account_item` - 勘定科目単位で表示(デフォルト)\n* `group` - 決算書表示単位で表示\n", "enum": [ "account_item", "group" ], "example": "account_item" }, "breakdown_display_type": { "type": "string", "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", "enum": [ "partner", "item", "section", "account_item", "segment_1_tag", "segment_2_tag", "segment_3_tag" ], "example": "partner" }, "partner_id": { "type": "integer", "format": "int64", "minimum": 0, "description": "絞込に指定された取引先ID。リクエストで指定した場合にのみ含まれる。0 の場合は「取引先が未選択の取引を対象」を意味する(リクエスト側の 0 指定と同じ)。", "example": 1 }, "partner_code": { "type": "string", "description": "絞込に指定された取引先コード。リクエストで指定した場合にのみ含まれる。", "example": "code001" }, "item_id": { "type": "integer", "format": "int64", "minimum": 0, "description": "絞込に指定された品目ID。リクエストで指定した場合にのみ含まれる。0 の場合は「品目が未選択の取引を対象」を意味する。", "example": 1 }, "section_id": { "type": "integer", "format": "int64", "minimum": 0, "description": "絞込に指定された部門ID。リクエストで指定した場合にのみ含まれる。0 の場合は「部門が未選択の取引を対象」を意味する。", "example": 1 }, "adjustment": { "type": "string", "description": "決算整理仕訳の絞り込み条件。リクエストで指定した場合にのみ含まれる。\n* `only` - 決算整理仕訳のみを集計\n* `without` - 決算整理仕訳を除外して集計\n", "example": "only", "enum": [ "only", "without" ] }, "approval_flow_status": { "type": "string", "description": "承認ステータスの絞り込み条件。リクエストで指定した場合にのみ含まれる。\n* `without_in_progress` - 未承認を除く(デフォルト)\n* `all` - 全ての承認ステータスを含む\n", "example": "without_in_progress", "enum": [ "without_in_progress", "all" ] }, "created_at": { "type": "string", "description": "レスポンスを生成した日時(ISO 8601, JST)", "example": "2019-12-17T13:47:24+09:00" }, "balances": { "type": "array", "description": "残高一覧。`hierarchy_level` の階層構造で並ぶ。行は次の 3 種類が混在する。\n* 勘定科目行: `account_item_id` あり(例: 現金、売掛金)\n* 決算書表示名行: `account_item_id` なし・`account_group_name` あり(`account_item_display_type=group` 指定時のみ現れる)\n* 勘定科目カテゴリー行: `account_item_id` も `account_group_name` も無く、`account_category_name` あり(カテゴリー合計行は `total_line=true`)\n", "items": { "type": "object", "properties": { "account_item_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "勘定科目ID。勘定科目行の場合のみ含まれる(勘定科目カテゴリー行では含まれない)。", "example": 192 }, "account_item_name": { "type": "string", "description": "勘定科目名。勘定科目行の場合のみ含まれる。", "example": "現金" }, "account_group_name": { "type": "string", "description": "決算書表示名。`account_item_display_type=group` を指定した場合にのみ、決算書表示行に含まれる。", "example": "現金及び預金" }, "partners": { "type": "array", "description": "取引先ごとの内訳。`breakdown_display_type=partner` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "取引先ID。0 は取引先が未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 22 }, "name": { "type": "string", "description": "取引先名(未選択の合計行では「未選択」が入る)", "example": "freee" }, "opening_balance": { "type": "integer", "format": "int64", "description": "期首残高(円)", "example": 0 }, "debit_amount": { "type": "integer", "format": "int64", "description": "期間中の借方金額(円)", "example": 0 }, "credit_amount": { "type": "integer", "format": "int64", "description": "期間中の貸方金額(円)", "example": 2592 }, "closing_balance": { "type": "integer", "format": "int64", "description": "期末残高(円)", "example": -25920 }, "composition_ratio": { "type": "number", "description": "構成比(百分率、%)。BSの区分合計(資産の部合計、または負債及び純資産の部合計)に対する当該行の残高割合を 100 換算した値。相殺科目などで基準額を超える場合は 100 を超え得る。", "example": 85 } } } }, "items": { "type": "array", "description": "品目ごとの内訳。`breakdown_display_type=item` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "品目ID。0 は品目が未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 1 }, "name": { "type": "string", "description": "品目名(未選択の合計行では「未選択」が入る)", "example": "源泉所得税" }, "opening_balance": { "type": "integer", "format": "int64", "description": "期首残高(円)", "example": 0 }, "debit_amount": { "type": "integer", "format": "int64", "description": "期間中の借方金額(円)", "example": 0 }, "credit_amount": { "type": "integer", "format": "int64", "description": "期間中の貸方金額(円)", "example": 2592 }, "closing_balance": { "type": "integer", "format": "int64", "description": "期末残高(円)", "example": -25920 }, "composition_ratio": { "type": "number", "description": "構成比(百分率、%)。BSの区分合計(資産の部合計、または負債及び純資産の部合計)に対する当該行の残高割合を 100 換算した値。相殺科目などで基準額を超える場合は 100 を超え得る。", "example": 85 } } } }, "sections": { "type": "array", "description": "部門ごとの内訳。`breakdown_display_type=section` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "部門ID。0 は部門が未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 1 }, "name": { "type": "string", "description": "部門名(未選択の合計行では「未選択」が入る)", "example": "開発部門" }, "opening_balance": { "type": "integer", "format": "int64", "description": "期首残高(円)", "example": 0 }, "debit_amount": { "type": "integer", "format": "int64", "description": "期間中の借方金額(円)", "example": 0 }, "credit_amount": { "type": "integer", "format": "int64", "description": "期間中の貸方金額(円)", "example": 2592 }, "closing_balance": { "type": "integer", "format": "int64", "description": "期末残高(円)", "example": -25920 }, "composition_ratio": { "type": "number", "description": "構成比(百分率、%)。BSの区分合計(資産の部合計、または負債及び純資産の部合計)に対する当該行の残高割合を 100 換算した値。相殺科目などで基準額を超える場合は 100 を超え得る。", "example": 85 } } } }, "segment_1_tags": { "type": "array", "description": "セグメント1タグごとの内訳。`breakdown_display_type=segment_1_tag` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "セグメント1タグID。0 はセグメント1タグが未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 1 }, "name": { "type": "string", "description": "セグメント1タグ名(未選択の合計行では「未選択」が入る)", "example": "プロジェクトA" }, "opening_balance": { "type": "integer", "format": "int64", "description": "期首残高(円)", "example": 0 }, "debit_amount": { "type": "integer", "format": "int64", "description": "期間中の借方金額(円)", "example": 0 }, "credit_amount": { "type": "integer", "format": "int64", "description": "期間中の貸方金額(円)", "example": 2592 }, "closing_balance": { "type": "integer", "format": "int64", "description": "期末残高(円)", "example": -25920 }, "composition_ratio": { "type": "number", "description": "構成比(百分率、%)。BSの区分合計(資産の部合計、または負債及び純資産の部合計)に対する当該行の残高割合を 100 換算した値。相殺科目などで基準額を超える場合は 100 を超え得る。", "example": 85 } } } }, "segment_2_tags": { "type": "array", "description": "セグメント2タグごとの内訳。`breakdown_display_type=segment_2_tag` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "セグメント2タグID。0 はセグメント2タグが未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 1 }, "name": { "type": "string", "description": "セグメント2タグ名(未選択の合計行では「未選択」が入る)", "example": "プロジェクトA" }, "opening_balance": { "type": "integer", "format": "int64", "description": "期首残高(円)", "example": 0 }, "debit_amount": { "type": "integer", "format": "int64", "description": "期間中の借方金額(円)", "example": 0 }, "credit_amount": { "type": "integer", "format": "int64", "description": "期間中の貸方金額(円)", "example": 2592 }, "closing_balance": { "type": "integer", "format": "int64", "description": "期末残高(円)", "example": -25920 }, "composition_ratio": { "type": "number", "description": "構成比(百分率、%)。BSの区分合計(資産の部合計、または負債及び純資産の部合計)に対する当該行の残高割合を 100 換算した値。相殺科目などで基準額を超える場合は 100 を超え得る。", "example": 85 } } } }, "segment_3_tags": { "type": "array", "description": "セグメント3タグごとの内訳。`breakdown_display_type=segment_3_tag` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "セグメント3タグID。0 はセグメント3タグが未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 1 }, "name": { "type": "string", "description": "セグメント3タグ名(未選択の合計行では「未選択」が入る)", "example": "プロジェクトA" }, "opening_balance": { "type": "integer", "format": "int64", "description": "期首残高(円)", "example": 0 }, "debit_amount": { "type": "integer", "format": "int64", "description": "期間中の借方金額(円)", "example": 0 }, "credit_amount": { "type": "integer", "format": "int64", "description": "期間中の貸方金額(円)", "example": 2592 }, "closing_balance": { "type": "integer", "format": "int64", "description": "期末残高(円)", "example": -25920 }, "composition_ratio": { "type": "number", "description": "構成比(百分率、%)。BSの区分合計(資産の部合計、または負債及び純資産の部合計)に対する当該行の残高割合を 100 換算した値。相殺科目などで基準額を超える場合は 100 を超え得る。", "example": 85 } } } }, "account_category_name": { "type": "string", "description": "勘定科目カテゴリー名(例: 流動資産、固定負債など)", "example": "販売管理費" }, "total_line": { "type": "boolean", "description": "合計行かどうか。勘定科目カテゴリーの合計行(当該カテゴリーの小計を表す行)の場合のみ含まれ、`true` となる。", "example": true }, "hierarchy_level": { "type": "integer", "format": "int64", "description": "階層レベル(1が最上位。値が大きいほど深い階層)", "example": 3 }, "parent_account_category_name": { "type": "string", "description": "上位勘定科目カテゴリー名。勘定科目カテゴリー行かつ上位階層が存在する場合のみ含まれる。", "example": "流動資産" }, "opening_balance": { "type": "integer", "format": "int64", "description": "期首残高(円)", "example": 0 }, "debit_amount": { "type": "integer", "format": "int64", "description": "期間中の借方金額(円)", "example": 0 }, "credit_amount": { "type": "integer", "format": "int64", "description": "期間中の貸方金額(円)", "example": 2592 }, "closing_balance": { "type": "integer", "format": "int64", "description": "期末残高(円)", "example": -25920 }, "composition_ratio": { "type": "number", "description": "構成比(百分率、%)。BSの区分合計(資産の部合計、または負債及び純資産の部合計)に対する当該行の残高割合を 100 換算した値。相殺科目などで基準額を超える場合は 100 を超え得る。", "example": 85 } } } } } }, "up_to_date": { "type": "boolean", "description": "集計結果が最新かどうか。`false` の場合は残高の集計が完了していないため、時間を置いてから再取得してください。", "example": true }, "up_to_date_reasons": { "type": "array", "description": "集計が最新でない場合の要因情報。`up_to_date=false` のときのみ要因が含まれ、`up_to_date=true` のときは空配列となる。", "items": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "string", "description": "要因コード。現時点で返り得る値は以下。\n* `depreciation_creating` - 当期の固定資産の償却を作成中\n* `depreciation_create_error` - 当期の固定資産の償却作成でエラーが発生\n", "example": "depreciation_creating", "enum": [ "depreciation_creating", "depreciation_create_error" ] }, "message": { "type": "string", "description": "集計が最新でない理由", "example": "当期の固定資産の償却作成が完了していないため、正しい集計結果でない可能性があります。しばらく時間をおいてからもう一度お試しください。" } } } } } }, "trialBsTwoYearsResponse": { "type": "object", "required": [ "trial_bs_two_years", "up_to_date" ], "properties": { "trial_bs_two_years": { "type": "object", "required": [ "balances", "company_id" ], "properties": { "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID", "example": 1 }, "fiscal_year": { "type": "integer", "format": "int64", "description": "会計年度(会計期間の開始日が属する年。例: 会計期間が 2019-04-01 開始なら 2019)。リクエストで指定した場合、または月・日の絞り込み条件が指定されていない場合にのみ含まれる。", "example": 2019 }, "start_month": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 12, "description": "発生月で絞込:開始会計月(1-12)。リクエストで指定した場合にのみ含まれる。", "example": 1 }, "end_month": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 12, "description": "発生月で絞込:終了会計月(1-12)。リクエストで指定した場合にのみ含まれる。", "example": 12 }, "start_date": { "type": "string", "description": "発生日で絞込:開始日(yyyy-mm-dd)。リクエストで指定した場合にのみ含まれる。", "example": "2019-01-01" }, "end_date": { "type": "string", "description": "発生日で絞込:終了日(yyyy-mm-dd)。リクエストで指定した場合にのみ含まれる。", "example": "2019-12-31" }, "account_item_display_type": { "type": "string", "description": "勘定科目の表示。リクエストで指定した場合にのみ含まれる。\n* `account_item` - 勘定科目単位で表示(デフォルト)\n* `group` - 決算書表示単位で表示\n", "enum": [ "account_item", "group" ], "example": "account_item" }, "breakdown_display_type": { "type": "string", "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", "enum": [ "partner", "item", "section", "account_item", "segment_1_tag", "segment_2_tag", "segment_3_tag" ], "example": "partner" }, "partner_id": { "type": "integer", "format": "int64", "minimum": 0, "description": "絞込に指定された取引先ID。リクエストで指定した場合にのみ含まれる。0 の場合は「取引先が未選択の取引を対象」を意味する(リクエスト側の 0 指定と同じ)。", "example": 1 }, "partner_code": { "type": "string", "description": "絞込に指定された取引先コード。リクエストで指定した場合にのみ含まれる。", "example": "code001" }, "item_id": { "type": "integer", "format": "int64", "minimum": 0, "description": "絞込に指定された品目ID。リクエストで指定した場合にのみ含まれる。0 の場合は「品目が未選択の取引を対象」を意味する。", "example": 1 }, "section_id": { "type": "integer", "format": "int64", "minimum": 0, "description": "絞込に指定された部門ID。リクエストで指定した場合にのみ含まれる。0 の場合は「部門が未選択の取引を対象」を意味する。", "example": 1 }, "adjustment": { "type": "string", "description": "決算整理仕訳の絞り込み条件。リクエストで指定した場合にのみ含まれる。\n* `only` - 決算整理仕訳のみを集計\n* `without` - 決算整理仕訳を除外して集計\n", "example": "only", "enum": [ "only", "without" ] }, "approval_flow_status": { "type": "string", "description": "承認ステータスの絞り込み条件。リクエストで指定した場合にのみ含まれる。\n* `without_in_progress` - 未承認を除く(デフォルト)\n* `all` - 全ての承認ステータスを含む\n", "example": "without_in_progress", "enum": [ "without_in_progress", "all" ] }, "created_at": { "type": "string", "description": "レスポンスを生成した日時(ISO 8601, JST)", "example": "2019-12-17T13:47:24+09:00" }, "balances": { "type": "array", "description": "残高一覧。当年度期末残高と前年度期末残高、および前年比を返す。`hierarchy_level` の階層構造で並ぶ。行は次の 3 種類が混在する。\n* 勘定科目行: `account_item_id` あり(例: 現金、売掛金)\n* 決算書表示名行: `account_item_id` なし・`account_group_name` あり(`account_item_display_type=group` 指定時のみ現れる)\n* 勘定科目カテゴリー行: `account_item_id` も `account_group_name` も無く、`account_category_name` あり(カテゴリー合計行は `total_line=true`)\n", "items": { "type": "object", "properties": { "account_item_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "勘定科目ID。勘定科目行の場合のみ含まれる(勘定科目カテゴリー行では含まれない)。", "example": 192 }, "account_item_name": { "type": "string", "description": "勘定科目名。勘定科目行の場合のみ含まれる。", "example": "現金" }, "account_group_name": { "type": "string", "description": "決算書表示名。`account_item_display_type=group` を指定した場合にのみ、決算書表示行に含まれる。", "example": "現金及び預金" }, "partners": { "type": "array", "description": "取引先ごとの内訳。`breakdown_display_type=partner` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "取引先ID。0 は取引先が未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 22 }, "name": { "type": "string", "description": "取引先名(未選択の合計行では「未選択」が入る)", "example": "freee" }, "last_year_closing_balance": { "type": "integer", "format": "int64", "description": "前年度期末残高(円)", "example": 0 }, "closing_balance": { "type": "integer", "format": "int64", "description": "当年度期末残高(円)", "example": -25920 }, "year_on_year": { "type": "number", "description": "前年比(百分率、%。100 は前年と同額、200 は前年比 2 倍、50 は前年比 0.5 倍を意味する。前年度期末残高が 0 以下、または当年度期末残高が負数の場合は 0 が返る)", "example": 200 } } } }, "items": { "type": "array", "description": "品目ごとの内訳。`breakdown_display_type=item` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "品目ID。0 は品目が未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 1 }, "name": { "type": "string", "description": "品目名(未選択の合計行では「未選択」が入る)", "example": "源泉所得税" }, "last_year_closing_balance": { "type": "integer", "format": "int64", "description": "前年度期末残高(円)", "example": 0 }, "closing_balance": { "type": "integer", "format": "int64", "description": "当年度期末残高(円)", "example": -25920 }, "year_on_year": { "type": "number", "description": "前年比(百分率、%。100 は前年と同額、200 は前年比 2 倍、50 は前年比 0.5 倍を意味する。前年度期末残高が 0 以下、または当年度期末残高が負数の場合は 0 が返る)", "example": 200 } } } }, "sections": { "type": "array", "description": "部門ごとの内訳。`breakdown_display_type=section` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "部門ID。0 は部門が未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 1 }, "name": { "type": "string", "description": "部門名(未選択の合計行では「未選択」が入る)", "example": "開発部門" }, "last_year_closing_balance": { "type": "integer", "format": "int64", "description": "前年度期末残高(円)", "example": 0 }, "closing_balance": { "type": "integer", "format": "int64", "description": "当年度期末残高(円)", "example": -25920 }, "year_on_year": { "type": "number", "description": "前年比(百分率、%。100 は前年と同額、200 は前年比 2 倍、50 は前年比 0.5 倍を意味する。前年度期末残高が 0 以下、または当年度期末残高が負数の場合は 0 が返る)", "example": 200 } } } }, "segment_1_tags": { "type": "array", "description": "セグメント1タグごとの内訳。`breakdown_display_type=segment_1_tag` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "セグメント1タグID。0 はセグメント1タグが未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 1 }, "name": { "type": "string", "description": "セグメント1タグ名(未選択の合計行では「未選択」が入る)", "example": "プロジェクトA" }, "last_year_closing_balance": { "type": "integer", "format": "int64", "description": "前年度期末残高(円)", "example": 0 }, "closing_balance": { "type": "integer", "format": "int64", "description": "当年度期末残高(円)", "example": -25920 }, "year_on_year": { "type": "number", "description": "前年比(百分率、%。100 は前年と同額、200 は前年比 2 倍、50 は前年比 0.5 倍を意味する。前年度期末残高が 0 以下、または当年度期末残高が負数の場合は 0 が返る)", "example": 200 } } } }, "segment_2_tags": { "type": "array", "description": "セグメント2タグごとの内訳。`breakdown_display_type=segment_2_tag` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "セグメント2タグID。0 はセグメント2タグが未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 1 }, "name": { "type": "string", "description": "セグメント2タグ名(未選択の合計行では「未選択」が入る)", "example": "プロジェクトA" }, "last_year_closing_balance": { "type": "integer", "format": "int64", "description": "前年度期末残高(円)", "example": 0 }, "closing_balance": { "type": "integer", "format": "int64", "description": "当年度期末残高(円)", "example": -25920 }, "year_on_year": { "type": "number", "description": "前年比(百分率、%。100 は前年と同額、200 は前年比 2 倍、50 は前年比 0.5 倍を意味する。前年度期末残高が 0 以下、または当年度期末残高が負数の場合は 0 が返る)", "example": 200 } } } }, "segment_3_tags": { "type": "array", "description": "セグメント3タグごとの内訳。`breakdown_display_type=segment_3_tag` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "セグメント3タグID。0 はセグメント3タグが未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 1 }, "name": { "type": "string", "description": "セグメント3タグ名(未選択の合計行では「未選択」が入る)", "example": "プロジェクトA" }, "last_year_closing_balance": { "type": "integer", "format": "int64", "description": "前年度期末残高(円)", "example": 0 }, "closing_balance": { "type": "integer", "format": "int64", "description": "当年度期末残高(円)", "example": -25920 }, "year_on_year": { "type": "number", "description": "前年比(百分率、%。100 は前年と同額、200 は前年比 2 倍、50 は前年比 0.5 倍を意味する。前年度期末残高が 0 以下、または当年度期末残高が負数の場合は 0 が返る)", "example": 200 } } } }, "account_category_name": { "type": "string", "description": "勘定科目カテゴリー名(例: 流動資産、固定負債など)", "example": "販売管理費" }, "total_line": { "type": "boolean", "description": "合計行かどうか。勘定科目カテゴリーの合計行(当該カテゴリーの小計を表す行)の場合のみ含まれ、`true` となる。", "example": true }, "hierarchy_level": { "type": "integer", "format": "int64", "description": "階層レベル(1が最上位。値が大きいほど深い階層)", "example": 3 }, "parent_account_category_name": { "type": "string", "description": "上位勘定科目カテゴリー名。勘定科目カテゴリー行かつ上位階層が存在する場合のみ含まれる。", "example": "流動資産" }, "last_year_closing_balance": { "type": "integer", "format": "int64", "description": "前年度期末残高(円)", "example": 0 }, "closing_balance": { "type": "integer", "format": "int64", "description": "当年度期末残高(円)", "example": -25920 }, "year_on_year": { "type": "number", "description": "前年比(百分率、%。100 は前年と同額、200 は前年比 2 倍、50 は前年比 0.5 倍を意味する。前年度期末残高が 0 以下、または当年度期末残高が負数の場合は 0 が返る)", "example": 200 } } } } } }, "up_to_date": { "type": "boolean", "description": "集計結果が最新かどうか。`false` の場合は残高の集計が完了していないため、時間を置いてから再取得してください。", "example": true }, "up_to_date_reasons": { "type": "array", "description": "集計が最新でない場合の要因情報。`up_to_date=false` のときのみ要因が含まれ、`up_to_date=true` のときは空配列となる。", "items": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "string", "description": "要因コード。現時点で返り得る値は以下。\n* `depreciation_creating` - 当期の固定資産の償却を作成中\n* `depreciation_create_error` - 当期の固定資産の償却作成でエラーが発生\n", "example": "depreciation_creating", "enum": [ "depreciation_creating", "depreciation_create_error" ] }, "message": { "type": "string", "description": "集計が最新でない理由", "example": "当期の固定資産の償却作成が完了していないため、正しい集計結果でない可能性があります。しばらく時間をおいてからもう一度お試しください。" } } } } } }, "trialBsThreeYearsResponse": { "required": [ "trial_bs_three_years", "up_to_date" ], "type": "object", "properties": { "trial_bs_three_years": { "type": "object", "required": [ "balances", "company_id" ], "properties": { "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID", "example": 1 }, "fiscal_year": { "type": "integer", "format": "int64", "description": "会計年度(会計期間の開始日が属する年。例: 会計期間が 2019-04-01 開始なら 2019)。リクエストで指定した場合、または月・日の絞り込み条件が指定されていない場合にのみ含まれる。", "example": 2019 }, "start_month": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 12, "description": "発生月で絞込:開始会計月(1-12)。リクエストで指定した場合にのみ含まれる。", "example": 1 }, "end_month": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 12, "description": "発生月で絞込:終了会計月(1-12)。リクエストで指定した場合にのみ含まれる。", "example": 12 }, "start_date": { "type": "string", "description": "発生日で絞込:開始日(yyyy-mm-dd)。リクエストで指定した場合にのみ含まれる。", "example": "2019-01-01" }, "end_date": { "type": "string", "description": "発生日で絞込:終了日(yyyy-mm-dd)。リクエストで指定した場合にのみ含まれる。", "example": "2019-12-31" }, "account_item_display_type": { "type": "string", "description": "勘定科目の表示。リクエストで指定した場合にのみ含まれる。\n* `account_item` - 勘定科目単位で表示(デフォルト)\n* `group` - 決算書表示単位で表示\n", "enum": [ "account_item", "group" ], "example": "account_item" }, "breakdown_display_type": { "type": "string", "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", "enum": [ "partner", "item", "section", "account_item", "segment_1_tag", "segment_2_tag", "segment_3_tag" ], "example": "partner" }, "partner_id": { "type": "integer", "format": "int64", "minimum": 0, "description": "絞込に指定された取引先ID。リクエストで指定した場合にのみ含まれる。0 の場合は「取引先が未選択の取引を対象」を意味する(リクエスト側の 0 指定と同じ)。", "example": 1 }, "partner_code": { "type": "string", "description": "絞込に指定された取引先コード。リクエストで指定した場合にのみ含まれる。", "example": "code001" }, "item_id": { "type": "integer", "format": "int64", "minimum": 0, "description": "絞込に指定された品目ID。リクエストで指定した場合にのみ含まれる。0 の場合は「品目が未選択の取引を対象」を意味する。", "example": 1 }, "section_id": { "type": "integer", "format": "int64", "minimum": 0, "description": "絞込に指定された部門ID。リクエストで指定した場合にのみ含まれる。0 の場合は「部門が未選択の取引を対象」を意味する。", "example": 1 }, "adjustment": { "type": "string", "description": "決算整理仕訳の絞り込み条件。リクエストで指定した場合にのみ含まれる。\n* `only` - 決算整理仕訳のみを集計\n* `without` - 決算整理仕訳を除外して集計\n", "example": "only", "enum": [ "only", "without" ] }, "approval_flow_status": { "type": "string", "description": "承認ステータスの絞り込み条件。リクエストで指定した場合にのみ含まれる。\n* `without_in_progress` - 未承認を除く(デフォルト)\n* `all` - 全ての承認ステータスを含む\n", "example": "without_in_progress", "enum": [ "without_in_progress", "all" ] }, "created_at": { "type": "string", "description": "レスポンスを生成した日時(ISO 8601, JST)", "example": "2019-12-17T13:47:24+09:00" }, "balances": { "type": "array", "description": "残高一覧。当年度・前年度・前々年度の期末残高と前年比を返す。`hierarchy_level` の階層構造で並ぶ。行は次の 3 種類が混在する。\n* 勘定科目行: `account_item_id` あり(例: 現金、売掛金)\n* 決算書表示名行: `account_item_id` なし・`account_group_name` あり(`account_item_display_type=group` 指定時のみ現れる)\n* 勘定科目カテゴリー行: `account_item_id` も `account_group_name` も無く、`account_category_name` あり(カテゴリー合計行は `total_line=true`)\n", "items": { "type": "object", "properties": { "account_item_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "勘定科目ID。勘定科目行の場合のみ含まれる(勘定科目カテゴリー行では含まれない)。", "example": 192 }, "account_item_name": { "type": "string", "description": "勘定科目名。勘定科目行の場合のみ含まれる。", "example": "現金" }, "account_group_name": { "type": "string", "description": "決算書表示名。`account_item_display_type=group` を指定した場合にのみ、決算書表示行に含まれる。", "example": "現金及び預金" }, "partners": { "type": "array", "description": "取引先ごとの内訳。`breakdown_display_type=partner` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "取引先ID。0 は取引先が未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 22 }, "name": { "type": "string", "description": "取引先名(未選択の合計行では「未選択」が入る)", "example": "freee" }, "two_years_before_closing_balance": { "type": "integer", "format": "int64", "description": "前々年度期末残高(円)", "example": 0 }, "last_year_closing_balance": { "type": "integer", "format": "int64", "description": "前年度期末残高(円)", "example": 0 }, "closing_balance": { "type": "integer", "format": "int64", "description": "当年度期末残高(円)", "example": -25920 }, "year_on_year": { "type": "number", "description": "前年比(百分率、%。100 は前年と同額、200 は前年比 2 倍、50 は前年比 0.5 倍を意味する。前年度期末残高が 0 以下、または当年度期末残高が負数の場合は 0 が返る)", "example": 200 } } } }, "items": { "type": "array", "description": "品目ごとの内訳。`breakdown_display_type=item` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "品目ID。0 は品目が未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 1 }, "name": { "type": "string", "description": "品目名(未選択の合計行では「未選択」が入る)", "example": "源泉所得税" }, "two_years_before_closing_balance": { "type": "integer", "format": "int64", "description": "前々年度期末残高(円)", "example": 0 }, "last_year_closing_balance": { "type": "integer", "format": "int64", "description": "前年度期末残高(円)", "example": 0 }, "closing_balance": { "type": "integer", "format": "int64", "description": "当年度期末残高(円)", "example": -25920 }, "year_on_year": { "type": "number", "description": "前年比(百分率、%。100 は前年と同額、200 は前年比 2 倍、50 は前年比 0.5 倍を意味する。前年度期末残高が 0 以下、または当年度期末残高が負数の場合は 0 が返る)", "example": 200 } } } }, "sections": { "type": "array", "description": "部門ごとの内訳。`breakdown_display_type=section` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "部門ID。0 は部門が未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 1 }, "name": { "type": "string", "description": "部門名(未選択の合計行では「未選択」が入る)", "example": "開発部門" }, "two_years_before_closing_balance": { "type": "integer", "format": "int64", "description": "前々年度期末残高(円)", "example": 0 }, "last_year_closing_balance": { "type": "integer", "format": "int64", "description": "前年度期末残高(円)", "example": 0 }, "closing_balance": { "type": "integer", "format": "int64", "description": "当年度期末残高(円)", "example": -25920 }, "year_on_year": { "type": "number", "description": "前年比(百分率、%。100 は前年と同額、200 は前年比 2 倍、50 は前年比 0.5 倍を意味する。前年度期末残高が 0 以下、または当年度期末残高が負数の場合は 0 が返る)", "example": 200 } } } }, "segment_1_tags": { "type": "array", "description": "セグメント1タグごとの内訳。`breakdown_display_type=segment_1_tag` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "セグメント1タグID。0 はセグメント1タグが未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 1 }, "name": { "type": "string", "description": "セグメント1タグ名(未選択の合計行では「未選択」が入る)", "example": "プロジェクトA" }, "two_years_before_closing_balance": { "type": "integer", "format": "int64", "description": "前々年度期末残高(円)", "example": 0 }, "last_year_closing_balance": { "type": "integer", "format": "int64", "description": "前年度期末残高(円)", "example": 0 }, "closing_balance": { "type": "integer", "format": "int64", "description": "当年度期末残高(円)", "example": -25920 }, "year_on_year": { "type": "number", "description": "前年比(百分率、%。100 は前年と同額、200 は前年比 2 倍、50 は前年比 0.5 倍を意味する。前年度期末残高が 0 以下、または当年度期末残高が負数の場合は 0 が返る)", "example": 200 } } } }, "segment_2_tags": { "type": "array", "description": "セグメント2タグごとの内訳。`breakdown_display_type=segment_2_tag` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "セグメント2タグID。0 はセグメント2タグが未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 1 }, "name": { "type": "string", "description": "セグメント2タグ名(未選択の合計行では「未選択」が入る)", "example": "プロジェクトA" }, "two_years_before_closing_balance": { "type": "integer", "format": "int64", "description": "前々年度期末残高(円)", "example": 0 }, "last_year_closing_balance": { "type": "integer", "format": "int64", "description": "前年度期末残高(円)", "example": 0 }, "closing_balance": { "type": "integer", "format": "int64", "description": "当年度期末残高(円)", "example": -25920 }, "year_on_year": { "type": "number", "description": "前年比(百分率、%。100 は前年と同額、200 は前年比 2 倍、50 は前年比 0.5 倍を意味する。前年度期末残高が 0 以下、または当年度期末残高が負数の場合は 0 が返る)", "example": 200 } } } }, "segment_3_tags": { "type": "array", "description": "セグメント3タグごとの内訳。`breakdown_display_type=segment_3_tag` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "セグメント3タグID。0 はセグメント3タグが未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 1 }, "name": { "type": "string", "description": "セグメント3タグ名(未選択の合計行では「未選択」が入る)", "example": "プロジェクトA" }, "two_years_before_closing_balance": { "type": "integer", "format": "int64", "description": "前々年度期末残高(円)", "example": 0 }, "last_year_closing_balance": { "type": "integer", "format": "int64", "description": "前年度期末残高(円)", "example": 0 }, "closing_balance": { "type": "integer", "format": "int64", "description": "当年度期末残高(円)", "example": -25920 }, "year_on_year": { "type": "number", "description": "前年比(百分率、%。100 は前年と同額、200 は前年比 2 倍、50 は前年比 0.5 倍を意味する。前年度期末残高が 0 以下、または当年度期末残高が負数の場合は 0 が返る)", "example": 200 } } } }, "account_category_name": { "type": "string", "description": "勘定科目カテゴリー名(例: 流動資産、固定負債など)", "example": "販売管理費" }, "total_line": { "type": "boolean", "description": "合計行かどうか。勘定科目カテゴリーの合計行(当該カテゴリーの小計を表す行)の場合のみ含まれ、`true` となる。", "example": true }, "hierarchy_level": { "type": "integer", "format": "int64", "description": "階層レベル(1が最上位。値が大きいほど深い階層)", "example": 3 }, "parent_account_category_name": { "type": "string", "description": "上位勘定科目カテゴリー名。勘定科目カテゴリー行かつ上位階層が存在する場合のみ含まれる。", "example": "流動資産" }, "two_years_before_closing_balance": { "type": "integer", "format": "int64", "description": "前々年度期末残高(円)", "example": 0 }, "last_year_closing_balance": { "type": "integer", "format": "int64", "description": "前年度期末残高(円)", "example": 0 }, "closing_balance": { "type": "integer", "format": "int64", "description": "当年度期末残高(円)", "example": -25920 }, "year_on_year": { "type": "number", "description": "前年比(百分率、%。100 は前年と同額、200 は前年比 2 倍、50 は前年比 0.5 倍を意味する。前年度期末残高が 0 以下、または当年度期末残高が負数の場合は 0 が返る)", "example": 200 } } } } } }, "up_to_date": { "type": "boolean", "description": "集計結果が最新かどうか。`false` の場合は残高の集計が完了していないため、時間を置いてから再取得してください。", "example": true }, "up_to_date_reasons": { "type": "array", "description": "集計が最新でない場合の要因情報。`up_to_date=false` のときのみ要因が含まれ、`up_to_date=true` のときは空配列となる。", "items": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "string", "description": "要因コード。現時点で返り得る値は以下。\n* `depreciation_creating` - 当期の固定資産の償却を作成中\n* `depreciation_create_error` - 当期の固定資産の償却作成でエラーが発生\n", "example": "depreciation_creating", "enum": [ "depreciation_creating", "depreciation_create_error" ] }, "message": { "type": "string", "description": "集計が最新でない理由", "example": "当期の固定資産の償却作成が完了していないため、正しい集計結果でない可能性があります。しばらく時間をおいてからもう一度お試しください。" } } } } } }, "trialPlResponse": { "type": "object", "required": [ "trial_pl", "up_to_date" ], "properties": { "trial_pl": { "required": [ "balances", "company_id" ], "type": "object", "properties": { "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID", "example": 1 }, "fiscal_year": { "type": "integer", "format": "int64", "description": "会計年度(会計期間の開始日が属する年。例: 会計期間が 2019-04-01 開始なら 2019)。リクエストで指定した場合、または月・日の絞り込み条件が指定されていない場合にのみ含まれる。", "example": 2019 }, "start_month": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 12, "description": "発生月で絞込:開始会計月(1-12)。リクエストで指定した場合にのみ含まれる。", "example": 1 }, "end_month": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 12, "description": "発生月で絞込:終了会計月(1-12)。リクエストで指定した場合にのみ含まれる。", "example": 12 }, "start_date": { "type": "string", "description": "発生日で絞込:開始日(yyyy-mm-dd)。リクエストで指定した場合にのみ含まれる。", "example": "2019-01-01" }, "end_date": { "type": "string", "description": "発生日で絞込:終了日(yyyy-mm-dd)。リクエストで指定した場合にのみ含まれる。", "example": "2019-12-31" }, "account_item_display_type": { "type": "string", "description": "勘定科目の表示。リクエストで指定した場合にのみ含まれる。\n* `account_item` - 勘定科目単位で表示(デフォルト)\n* `group` - 決算書表示単位で表示\n", "enum": [ "account_item", "group" ], "example": "account_item" }, "breakdown_display_type": { "type": "string", "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", "enum": [ "partner", "item", "section", "account_item", "segment_1_tag", "segment_2_tag", "segment_3_tag" ], "example": "partner" }, "partner_id": { "type": "integer", "format": "int64", "minimum": 0, "description": "絞込に指定された取引先ID。リクエストで指定した場合にのみ含まれる。0 の場合は「取引先が未選択の取引を対象」を意味する(リクエスト側の 0 指定と同じ)。", "example": 1 }, "partner_code": { "type": "string", "description": "絞込に指定された取引先コード。リクエストで指定した場合にのみ含まれる。", "example": "code001" }, "item_id": { "type": "integer", "format": "int64", "minimum": 0, "description": "絞込に指定された品目ID。リクエストで指定した場合にのみ含まれる。0 の場合は「品目が未選択の取引を対象」を意味する。", "example": 1 }, "section_id": { "type": "integer", "format": "int64", "minimum": 0, "description": "絞込に指定された部門ID。リクエストで指定した場合にのみ含まれる。0 の場合は「部門が未選択の取引を対象」を意味する。", "example": 1 }, "adjustment": { "type": "string", "description": "決算整理仕訳の絞り込み条件。リクエストで指定した場合にのみ含まれる。\n* `only` - 決算整理仕訳のみを集計\n* `without` - 決算整理仕訳を除外して集計\n", "example": "only", "enum": [ "only", "without" ] }, "cost_allocation": { "type": "string", "description": "配賦仕訳の絞り込み条件。リクエストで指定した場合にのみ含まれる。\n* `only` - 配賦仕訳のみを集計\n* `without` - 配賦仕訳を除外して集計\n", "example": "only", "enum": [ "only", "without" ] }, "approval_flow_status": { "type": "string", "description": "承認ステータスの絞り込み条件。リクエストで指定した場合にのみ含まれる。\n* `without_in_progress` - 未承認を除く(デフォルト)\n* `all` - 全ての承認ステータスを含む\n", "example": "without_in_progress", "enum": [ "without_in_progress", "all" ] }, "created_at": { "type": "string", "description": "レスポンスを生成した日時(ISO 8601, JST)", "example": "2019-12-17T13:47:24+09:00" }, "balances": { "type": "array", "description": "残高一覧。`hierarchy_level` の階層構造で並ぶ。行は次の 3 種類が混在する。\n* 勘定科目行: `account_item_id` あり(例: 売上高、地代家賃)\n* 決算書表示名行: `account_item_id` なし・`account_group_name` あり(`account_item_display_type=group` 指定時のみ現れる)\n* 勘定科目カテゴリー行: `account_item_id` も `account_group_name` も無く、`account_category_name` あり(カテゴリー合計行は `total_line=true`)\n", "items": { "type": "object", "properties": { "account_item_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "勘定科目ID。勘定科目行の場合のみ含まれる(勘定科目カテゴリー行では含まれない)。", "example": 192 }, "account_item_name": { "type": "string", "description": "勘定科目名。勘定科目行の場合のみ含まれる。", "example": "売上高" }, "account_group_name": { "type": "string", "description": "決算書表示名。`account_item_display_type=group` を指定した場合にのみ、決算書表示行に含まれる。", "example": "売上高" }, "partners": { "type": "array", "description": "取引先ごとの内訳。`breakdown_display_type=partner` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "取引先ID。0 は取引先が未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 22 }, "name": { "type": "string", "description": "取引先名(未選択の合計行では「未選択」が入る)", "example": "freee" }, "opening_balance": { "type": "integer", "format": "int64", "description": "期首残高(円)", "example": 0 }, "debit_amount": { "type": "integer", "format": "int64", "description": "期間中の借方金額(円)", "example": 0 }, "credit_amount": { "type": "integer", "format": "int64", "description": "期間中の貸方金額(円)", "example": 2592 }, "closing_balance": { "type": "integer", "format": "int64", "description": "期末残高(円)", "example": 2592 }, "composition_ratio": { "type": "number", "description": "構成比(百分率、%)。PLの基準額(法人の場合は売上高の合計、個人の場合は収入金額の合計)に対する当該行の金額割合を 100 換算した値。基準額を超える行では 100 を超え得る。", "example": 85 } } } }, "items": { "type": "array", "description": "品目ごとの内訳。`breakdown_display_type=item` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "品目ID。0 は品目が未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 1 }, "name": { "type": "string", "description": "品目名(未選択の合計行では「未選択」が入る)", "example": "源泉所得税" }, "opening_balance": { "type": "integer", "format": "int64", "description": "期首残高(円)", "example": 0 }, "debit_amount": { "type": "integer", "format": "int64", "description": "期間中の借方金額(円)", "example": 0 }, "credit_amount": { "type": "integer", "format": "int64", "description": "期間中の貸方金額(円)", "example": 2592 }, "closing_balance": { "type": "integer", "format": "int64", "description": "期末残高(円)", "example": 2592 }, "composition_ratio": { "type": "number", "description": "構成比(百分率、%)。PLの基準額(法人の場合は売上高の合計、個人の場合は収入金額の合計)に対する当該行の金額割合を 100 換算した値。基準額を超える行では 100 を超え得る。", "example": 85 } } } }, "sections": { "type": "array", "description": "部門ごとの内訳。`breakdown_display_type=section` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "部門ID。0 は部門が未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 1 }, "name": { "type": "string", "description": "部門名(未選択の合計行では「未選択」が入る)", "example": "開発部門" }, "opening_balance": { "type": "integer", "format": "int64", "description": "期首残高(円)", "example": 0 }, "debit_amount": { "type": "integer", "format": "int64", "description": "期間中の借方金額(円)", "example": 0 }, "credit_amount": { "type": "integer", "format": "int64", "description": "期間中の貸方金額(円)", "example": 2592 }, "closing_balance": { "type": "integer", "format": "int64", "description": "期末残高(円)", "example": 2592 }, "composition_ratio": { "type": "number", "description": "構成比(百分率、%)。PLの基準額(法人の場合は売上高の合計、個人の場合は収入金額の合計)に対する当該行の金額割合を 100 換算した値。基準額を超える行では 100 を超え得る。", "example": 85 } } } }, "segment_1_tags": { "type": "array", "description": "セグメント1タグごとの内訳。`breakdown_display_type=segment_1_tag` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "セグメント1タグID。0 はセグメント1タグが未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 1 }, "name": { "type": "string", "description": "セグメント1タグ名(未選択の合計行では「未選択」が入る)", "example": "プロジェクトA" }, "opening_balance": { "type": "integer", "format": "int64", "description": "期首残高(円)", "example": 0 }, "debit_amount": { "type": "integer", "format": "int64", "description": "期間中の借方金額(円)", "example": 0 }, "credit_amount": { "type": "integer", "format": "int64", "description": "期間中の貸方金額(円)", "example": 2592 }, "closing_balance": { "type": "integer", "format": "int64", "description": "期末残高(円)", "example": 2592 }, "composition_ratio": { "type": "number", "description": "構成比(百分率、%)。PLの基準額(法人の場合は売上高の合計、個人の場合は収入金額の合計)に対する当該行の金額割合を 100 換算した値。基準額を超える行では 100 を超え得る。", "example": 85 } } } }, "segment_2_tags": { "type": "array", "description": "セグメント2タグごとの内訳。`breakdown_display_type=segment_2_tag` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "セグメント2タグID。0 はセグメント2タグが未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 1 }, "name": { "type": "string", "description": "セグメント2タグ名(未選択の合計行では「未選択」が入る)", "example": "プロジェクトA" }, "opening_balance": { "type": "integer", "format": "int64", "description": "期首残高(円)", "example": 0 }, "debit_amount": { "type": "integer", "format": "int64", "description": "期間中の借方金額(円)", "example": 0 }, "credit_amount": { "type": "integer", "format": "int64", "description": "期間中の貸方金額(円)", "example": 2592 }, "closing_balance": { "type": "integer", "format": "int64", "description": "期末残高(円)", "example": 2592 }, "composition_ratio": { "type": "number", "description": "構成比(百分率、%)。PLの基準額(法人の場合は売上高の合計、個人の場合は収入金額の合計)に対する当該行の金額割合を 100 換算した値。基準額を超える行では 100 を超え得る。", "example": 85 } } } }, "segment_3_tags": { "type": "array", "description": "セグメント3タグごとの内訳。`breakdown_display_type=segment_3_tag` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "セグメント3タグID。0 はセグメント3タグが未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 1 }, "name": { "type": "string", "description": "セグメント3タグ名(未選択の合計行では「未選択」が入る)", "example": "プロジェクトA" }, "opening_balance": { "type": "integer", "format": "int64", "description": "期首残高(円)", "example": 0 }, "debit_amount": { "type": "integer", "format": "int64", "description": "期間中の借方金額(円)", "example": 0 }, "credit_amount": { "type": "integer", "format": "int64", "description": "期間中の貸方金額(円)", "example": 2592 }, "closing_balance": { "type": "integer", "format": "int64", "description": "期末残高(円)", "example": 2592 }, "composition_ratio": { "type": "number", "description": "構成比(百分率、%)。PLの基準額(法人の場合は売上高の合計、個人の場合は収入金額の合計)に対する当該行の金額割合を 100 換算した値。基準額を超える行では 100 を超え得る。", "example": 85 } } } }, "account_category_name": { "type": "string", "description": "勘定科目カテゴリー名(例: 売上高、販売管理費など)", "example": "販売管理費" }, "total_line": { "type": "boolean", "description": "合計行かどうか。勘定科目カテゴリーの合計行(当該カテゴリーの小計を表す行)の場合のみ含まれ、`true` となる。", "example": true }, "hierarchy_level": { "type": "integer", "format": "int64", "description": "階層レベル(1が最上位。値が大きいほど深い階層)", "example": 3 }, "parent_account_category_name": { "type": "string", "description": "上位勘定科目カテゴリー名。勘定科目カテゴリー行かつ上位階層が存在する場合のみ含まれる。", "example": "営業損益" }, "opening_balance": { "type": "integer", "format": "int64", "description": "期首残高(円)", "example": 0 }, "debit_amount": { "type": "integer", "format": "int64", "description": "期間中の借方金額(円)", "example": 0 }, "credit_amount": { "type": "integer", "format": "int64", "description": "期間中の貸方金額(円)", "example": 2592 }, "closing_balance": { "type": "integer", "format": "int64", "description": "期末残高(円)", "example": 2592 }, "composition_ratio": { "type": "number", "description": "構成比(百分率、%)。PLの基準額(法人の場合は売上高の合計、個人の場合は収入金額の合計)に対する当該行の金額割合を 100 換算した値。基準額を超える行では 100 を超え得る。", "example": 85 } } } } } }, "up_to_date": { "type": "boolean", "description": "集計結果が最新かどうか。`false` の場合は残高の集計が完了していないため、時間を置いてから再取得してください。", "example": true }, "up_to_date_reasons": { "type": "array", "description": "集計が最新でない場合の要因情報。`up_to_date=false` のときのみ要因が含まれ、`up_to_date=true` のときは空配列となる。", "items": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "string", "description": "要因コード。現時点で返り得る値は以下。\n* `depreciation_creating` - 当期の固定資産の償却を作成中\n* `depreciation_create_error` - 当期の固定資産の償却作成でエラーが発生\n", "example": "depreciation_creating", "enum": [ "depreciation_creating", "depreciation_create_error" ] }, "message": { "type": "string", "description": "集計が最新でない理由", "example": "当期の固定資産の償却作成が完了していないため、正しい集計結果でない可能性があります。しばらく時間をおいてからもう一度お試しください。" } } } } } }, "trialPlTwoYearsResponse": { "type": "object", "required": [ "trial_pl_two_years", "up_to_date" ], "properties": { "trial_pl_two_years": { "type": "object", "required": [ "balances", "company_id" ], "properties": { "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID", "example": 1 }, "fiscal_year": { "type": "integer", "format": "int64", "description": "会計年度(会計期間の開始日が属する年。例: 会計期間が 2019-04-01 開始なら 2019)。リクエストで指定した場合、または月・日の絞り込み条件が指定されていない場合にのみ含まれる。", "example": 2019 }, "start_month": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 12, "description": "発生月で絞込:開始会計月(1-12)。リクエストで指定した場合にのみ含まれる。", "example": 1 }, "end_month": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 12, "description": "発生月で絞込:終了会計月(1-12)。リクエストで指定した場合にのみ含まれる。", "example": 12 }, "start_date": { "type": "string", "description": "発生日で絞込:開始日(yyyy-mm-dd)。リクエストで指定した場合にのみ含まれる。", "example": "2019-01-01" }, "end_date": { "type": "string", "description": "発生日で絞込:終了日(yyyy-mm-dd)。リクエストで指定した場合にのみ含まれる。", "example": "2019-12-31" }, "account_item_display_type": { "type": "string", "description": "勘定科目の表示。リクエストで指定した場合にのみ含まれる。\n* `account_item` - 勘定科目単位で表示(デフォルト)\n* `group` - 決算書表示単位で表示\n", "enum": [ "account_item", "group" ], "example": "account_item" }, "breakdown_display_type": { "type": "string", "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", "enum": [ "partner", "item", "section", "account_item", "segment_1_tag", "segment_2_tag", "segment_3_tag" ], "example": "partner" }, "partner_id": { "type": "integer", "format": "int64", "minimum": 0, "description": "絞込に指定された取引先ID。リクエストで指定した場合にのみ含まれる。0 の場合は「取引先が未選択の取引を対象」を意味する(リクエスト側の 0 指定と同じ)。", "example": 1 }, "partner_code": { "type": "string", "description": "絞込に指定された取引先コード。リクエストで指定した場合にのみ含まれる。", "example": "code001" }, "item_id": { "type": "integer", "format": "int64", "minimum": 0, "description": "絞込に指定された品目ID。リクエストで指定した場合にのみ含まれる。0 の場合は「品目が未選択の取引を対象」を意味する。", "example": 1 }, "section_id": { "type": "integer", "format": "int64", "minimum": 0, "description": "絞込に指定された部門ID。リクエストで指定した場合にのみ含まれる。0 の場合は「部門が未選択の取引を対象」を意味する。", "example": 1 }, "adjustment": { "type": "string", "description": "決算整理仕訳の絞り込み条件。リクエストで指定した場合にのみ含まれる。\n* `only` - 決算整理仕訳のみを集計\n* `without` - 決算整理仕訳を除外して集計\n", "example": "only", "enum": [ "only", "without" ] }, "cost_allocation": { "type": "string", "description": "配賦仕訳の絞り込み条件。リクエストで指定した場合にのみ含まれる。\n* `only` - 配賦仕訳のみを集計\n* `without` - 配賦仕訳を除外して集計\n", "example": "only", "enum": [ "only", "without" ] }, "approval_flow_status": { "type": "string", "description": "承認ステータスの絞り込み条件。リクエストで指定した場合にのみ含まれる。\n* `without_in_progress` - 未承認を除く(デフォルト)\n* `all` - 全ての承認ステータスを含む\n", "example": "without_in_progress", "enum": [ "without_in_progress", "all" ] }, "created_at": { "type": "string", "description": "レスポンスを生成した日時(ISO 8601, JST)", "example": "2019-12-17T13:47:24+09:00" }, "balances": { "type": "array", "description": "残高一覧。当年度期末残高と前年度期末残高、および前年比を返す。`hierarchy_level` の階層構造で並ぶ。行は次の 3 種類が混在する。\n* 勘定科目行: `account_item_id` あり(例: 売上高、地代家賃)\n* 決算書表示名行: `account_item_id` なし・`account_group_name` あり(`account_item_display_type=group` 指定時のみ現れる)\n* 勘定科目カテゴリー行: `account_item_id` も `account_group_name` も無く、`account_category_name` あり(カテゴリー合計行は `total_line=true`)\n", "items": { "type": "object", "properties": { "account_item_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "勘定科目ID。勘定科目行の場合のみ含まれる(勘定科目カテゴリー行では含まれない)。", "example": 192 }, "account_item_name": { "type": "string", "description": "勘定科目名。勘定科目行の場合のみ含まれる。", "example": "売上高" }, "account_group_name": { "type": "string", "description": "決算書表示名。`account_item_display_type=group` を指定した場合にのみ、決算書表示行に含まれる。", "example": "売上高" }, "partners": { "type": "array", "description": "取引先ごとの内訳。`breakdown_display_type=partner` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "取引先ID。0 は取引先が未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 22 }, "name": { "type": "string", "description": "取引先名(未選択の合計行では「未選択」が入る)", "example": "freee" }, "last_year_closing_balance": { "type": "integer", "format": "int64", "description": "前年度期末残高(円)", "example": 0 }, "closing_balance": { "type": "integer", "format": "int64", "description": "当年度期末残高(円)", "example": 2592 }, "year_on_year": { "type": "number", "description": "前年比(百分率、%。100 は前年と同額、200 は前年比 2 倍、50 は前年比 0.5 倍を意味する。前年度期末残高が 0 以下、または当年度期末残高が負数の場合は 0 が返る)", "example": 200 } } } }, "items": { "type": "array", "description": "品目ごとの内訳。`breakdown_display_type=item` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "品目ID。0 は品目が未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 1 }, "name": { "type": "string", "description": "品目名(未選択の合計行では「未選択」が入る)", "example": "源泉所得税" }, "last_year_closing_balance": { "type": "integer", "format": "int64", "description": "前年度期末残高(円)", "example": 0 }, "closing_balance": { "type": "integer", "format": "int64", "description": "当年度期末残高(円)", "example": 2592 }, "year_on_year": { "type": "number", "description": "前年比(百分率、%。100 は前年と同額、200 は前年比 2 倍、50 は前年比 0.5 倍を意味する。前年度期末残高が 0 以下、または当年度期末残高が負数の場合は 0 が返る)", "example": 200 } } } }, "sections": { "type": "array", "description": "部門ごとの内訳。`breakdown_display_type=section` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "部門ID。0 は部門が未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 1 }, "name": { "type": "string", "description": "部門名(未選択の合計行では「未選択」が入る)", "example": "開発部門" }, "last_year_closing_balance": { "type": "integer", "format": "int64", "description": "前年度期末残高(円)", "example": 0 }, "closing_balance": { "type": "integer", "format": "int64", "description": "当年度期末残高(円)", "example": 2592 }, "year_on_year": { "type": "number", "description": "前年比(百分率、%。100 は前年と同額、200 は前年比 2 倍、50 は前年比 0.5 倍を意味する。前年度期末残高が 0 以下、または当年度期末残高が負数の場合は 0 が返る)", "example": 200 } } } }, "segment_1_tags": { "type": "array", "description": "セグメント1タグごとの内訳。`breakdown_display_type=segment_1_tag` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "セグメント1タグID。0 はセグメント1タグが未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 1 }, "name": { "type": "string", "description": "セグメント1タグ名(未選択の合計行では「未選択」が入る)", "example": "プロジェクトA" }, "last_year_closing_balance": { "type": "integer", "format": "int64", "description": "前年度期末残高(円)", "example": 0 }, "closing_balance": { "type": "integer", "format": "int64", "description": "当年度期末残高(円)", "example": 2592 }, "year_on_year": { "type": "number", "description": "前年比(百分率、%。100 は前年と同額、200 は前年比 2 倍、50 は前年比 0.5 倍を意味する。前年度期末残高が 0 以下、または当年度期末残高が負数の場合は 0 が返る)", "example": 200 } } } }, "segment_2_tags": { "type": "array", "description": "セグメント2タグごとの内訳。`breakdown_display_type=segment_2_tag` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "セグメント2タグID。0 はセグメント2タグが未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 1 }, "name": { "type": "string", "description": "セグメント2タグ名(未選択の合計行では「未選択」が入る)", "example": "プロジェクトA" }, "last_year_closing_balance": { "type": "integer", "format": "int64", "description": "前年度期末残高(円)", "example": 0 }, "closing_balance": { "type": "integer", "format": "int64", "description": "当年度期末残高(円)", "example": 2592 }, "year_on_year": { "type": "number", "description": "前年比(百分率、%。100 は前年と同額、200 は前年比 2 倍、50 は前年比 0.5 倍を意味する。前年度期末残高が 0 以下、または当年度期末残高が負数の場合は 0 が返る)", "example": 200 } } } }, "segment_3_tags": { "type": "array", "description": "セグメント3タグごとの内訳。`breakdown_display_type=segment_3_tag` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "セグメント3タグID。0 はセグメント3タグが未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 1 }, "name": { "type": "string", "description": "セグメント3タグ名(未選択の合計行では「未選択」が入る)", "example": "プロジェクトA" }, "last_year_closing_balance": { "type": "integer", "format": "int64", "description": "前年度期末残高(円)", "example": 0 }, "closing_balance": { "type": "integer", "format": "int64", "description": "当年度期末残高(円)", "example": 2592 }, "year_on_year": { "type": "number", "description": "前年比(百分率、%。100 は前年と同額、200 は前年比 2 倍、50 は前年比 0.5 倍を意味する。前年度期末残高が 0 以下、または当年度期末残高が負数の場合は 0 が返る)", "example": 200 } } } }, "account_category_name": { "type": "string", "description": "勘定科目カテゴリー名(例: 売上高、販売管理費など)", "example": "販売管理費" }, "total_line": { "type": "boolean", "description": "合計行かどうか。勘定科目カテゴリーの合計行(当該カテゴリーの小計を表す行)の場合のみ含まれ、`true` となる。", "example": true }, "hierarchy_level": { "type": "integer", "format": "int64", "description": "階層レベル(1が最上位。値が大きいほど深い階層)", "example": 3 }, "parent_account_category_name": { "type": "string", "description": "上位勘定科目カテゴリー名。勘定科目カテゴリー行かつ上位階層が存在する場合のみ含まれる。", "example": "営業損益" }, "last_year_closing_balance": { "type": "integer", "format": "int64", "description": "前年度期末残高(円)", "example": 0 }, "closing_balance": { "type": "integer", "format": "int64", "description": "当年度期末残高(円)", "example": 2592 }, "year_on_year": { "type": "number", "description": "前年比(百分率、%。100 は前年と同額、200 は前年比 2 倍、50 は前年比 0.5 倍を意味する。前年度期末残高が 0 以下、または当年度期末残高が負数の場合は 0 が返る)", "example": 200 } } } } } }, "up_to_date": { "type": "boolean", "description": "集計結果が最新かどうか。`false` の場合は残高の集計が完了していないため、時間を置いてから再取得してください。", "example": true }, "up_to_date_reasons": { "type": "array", "description": "集計が最新でない場合の要因情報。`up_to_date=false` のときのみ要因が含まれ、`up_to_date=true` のときは空配列となる。", "items": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "string", "description": "要因コード。現時点で返り得る値は以下。\n* `depreciation_creating` - 当期の固定資産の償却を作成中\n* `depreciation_create_error` - 当期の固定資産の償却作成でエラーが発生\n", "example": "depreciation_creating", "enum": [ "depreciation_creating", "depreciation_create_error" ] }, "message": { "type": "string", "description": "集計が最新でない理由", "example": "当期の固定資産の償却作成が完了していないため、正しい集計結果でない可能性があります。しばらく時間をおいてからもう一度お試しください。" } } } } } }, "trialPlThreeYearsResponse": { "type": "object", "required": [ "trial_pl_three_years", "up_to_date" ], "properties": { "trial_pl_three_years": { "type": "object", "required": [ "balances", "company_id" ], "properties": { "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID", "example": 1 }, "fiscal_year": { "type": "integer", "format": "int64", "description": "会計年度(会計期間の開始日が属する年。例: 会計期間が 2019-04-01 開始なら 2019)。リクエストで指定した場合、または月・日の絞り込み条件が指定されていない場合にのみ含まれる。", "example": 2019 }, "start_month": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 12, "description": "発生月で絞込:開始会計月(1-12)。リクエストで指定した場合にのみ含まれる。", "example": 1 }, "end_month": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 12, "description": "発生月で絞込:終了会計月(1-12)。リクエストで指定した場合にのみ含まれる。", "example": 12 }, "start_date": { "type": "string", "description": "発生日で絞込:開始日(yyyy-mm-dd)。リクエストで指定した場合にのみ含まれる。", "example": "2019-01-01" }, "end_date": { "type": "string", "description": "発生日で絞込:終了日(yyyy-mm-dd)。リクエストで指定した場合にのみ含まれる。", "example": "2019-12-31" }, "account_item_display_type": { "type": "string", "description": "勘定科目の表示。リクエストで指定した場合にのみ含まれる。\n* `account_item` - 勘定科目単位で表示(デフォルト)\n* `group` - 決算書表示単位で表示\n", "enum": [ "account_item", "group" ], "example": "account_item" }, "breakdown_display_type": { "type": "string", "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", "enum": [ "partner", "item", "section", "account_item", "segment_1_tag", "segment_2_tag", "segment_3_tag" ], "example": "partner" }, "partner_id": { "type": "integer", "format": "int64", "minimum": 0, "description": "絞込に指定された取引先ID。リクエストで指定した場合にのみ含まれる。0 の場合は「取引先が未選択の取引を対象」を意味する(リクエスト側の 0 指定と同じ)。", "example": 1 }, "partner_code": { "type": "string", "description": "絞込に指定された取引先コード。リクエストで指定した場合にのみ含まれる。", "example": "code001" }, "item_id": { "type": "integer", "format": "int64", "minimum": 0, "description": "絞込に指定された品目ID。リクエストで指定した場合にのみ含まれる。0 の場合は「品目が未選択の取引を対象」を意味する。", "example": 1 }, "section_id": { "type": "integer", "format": "int64", "minimum": 0, "description": "絞込に指定された部門ID。リクエストで指定した場合にのみ含まれる。0 の場合は「部門が未選択の取引を対象」を意味する。", "example": 1 }, "adjustment": { "type": "string", "description": "決算整理仕訳の絞り込み条件。リクエストで指定した場合にのみ含まれる。\n* `only` - 決算整理仕訳のみを集計\n* `without` - 決算整理仕訳を除外して集計\n", "example": "only", "enum": [ "only", "without" ] }, "cost_allocation": { "type": "string", "description": "配賦仕訳の絞り込み条件。リクエストで指定した場合にのみ含まれる。\n* `only` - 配賦仕訳のみを集計\n* `without` - 配賦仕訳を除外して集計\n", "example": "only", "enum": [ "only", "without" ] }, "approval_flow_status": { "type": "string", "description": "承認ステータスの絞り込み条件。リクエストで指定した場合にのみ含まれる。\n* `without_in_progress` - 未承認を除く(デフォルト)\n* `all` - 全ての承認ステータスを含む\n", "example": "without_in_progress", "enum": [ "without_in_progress", "all" ] }, "created_at": { "type": "string", "description": "レスポンスを生成した日時(ISO 8601, JST)", "example": "2019-12-17T13:47:24+09:00" }, "balances": { "type": "array", "description": "残高一覧。当年度・前年度・前々年度の期末残高と前年比を返す。`hierarchy_level` の階層構造で並ぶ。行は次の 3 種類が混在する。\n* 勘定科目行: `account_item_id` あり(例: 売上高、地代家賃)\n* 決算書表示名行: `account_item_id` なし・`account_group_name` あり(`account_item_display_type=group` 指定時のみ現れる)\n* 勘定科目カテゴリー行: `account_item_id` も `account_group_name` も無く、`account_category_name` あり(カテゴリー合計行は `total_line=true`)\n", "items": { "type": "object", "properties": { "account_item_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "勘定科目ID。勘定科目行の場合のみ含まれる(勘定科目カテゴリー行では含まれない)。", "example": 192 }, "account_item_name": { "type": "string", "description": "勘定科目名。勘定科目行の場合のみ含まれる。", "example": "売上高" }, "account_group_name": { "type": "string", "description": "決算書表示名。`account_item_display_type=group` を指定した場合にのみ、決算書表示行に含まれる。", "example": "売上高" }, "partners": { "type": "array", "description": "取引先ごとの内訳。`breakdown_display_type=partner` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "取引先ID。0 は取引先が未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 22 }, "name": { "type": "string", "description": "取引先名(未選択の合計行では「未選択」が入る)", "example": "freee" }, "two_years_before_closing_balance": { "type": "integer", "format": "int64", "description": "前々年度期末残高(円)", "example": 0 }, "last_year_closing_balance": { "type": "integer", "format": "int64", "description": "前年度期末残高(円)", "example": 0 }, "closing_balance": { "type": "integer", "format": "int64", "description": "当年度期末残高(円)", "example": 2592 }, "year_on_year": { "type": "number", "description": "前年比(百分率、%。100 は前年と同額、200 は前年比 2 倍、50 は前年比 0.5 倍を意味する。前年度期末残高が 0 以下、または当年度期末残高が負数の場合は 0 が返る)", "example": 200 } } } }, "items": { "type": "array", "description": "品目ごとの内訳。`breakdown_display_type=item` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "品目ID。0 は品目が未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 1 }, "name": { "type": "string", "description": "品目名(未選択の合計行では「未選択」が入る)", "example": "源泉所得税" }, "two_years_before_closing_balance": { "type": "integer", "format": "int64", "description": "前々年度期末残高(円)", "example": 0 }, "last_year_closing_balance": { "type": "integer", "format": "int64", "description": "前年度期末残高(円)", "example": 0 }, "closing_balance": { "type": "integer", "format": "int64", "description": "当年度期末残高(円)", "example": 2592 }, "year_on_year": { "type": "number", "description": "前年比(百分率、%。100 は前年と同額、200 は前年比 2 倍、50 は前年比 0.5 倍を意味する。前年度期末残高が 0 以下、または当年度期末残高が負数の場合は 0 が返る)", "example": 200 } } } }, "sections": { "type": "array", "description": "部門ごとの内訳。`breakdown_display_type=section` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "部門ID。0 は部門が未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 1 }, "name": { "type": "string", "description": "部門名(未選択の合計行では「未選択」が入る)", "example": "開発部門" }, "two_years_before_closing_balance": { "type": "integer", "format": "int64", "description": "前々年度期末残高(円)", "example": 0 }, "last_year_closing_balance": { "type": "integer", "format": "int64", "description": "前年度期末残高(円)", "example": 0 }, "closing_balance": { "type": "integer", "format": "int64", "description": "当年度期末残高(円)", "example": 2592 }, "year_on_year": { "type": "number", "description": "前年比(百分率、%。100 は前年と同額、200 は前年比 2 倍、50 は前年比 0.5 倍を意味する。前年度期末残高が 0 以下、または当年度期末残高が負数の場合は 0 が返る)", "example": 200 } } } }, "segment_1_tags": { "type": "array", "description": "セグメント1タグごとの内訳。`breakdown_display_type=segment_1_tag` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "セグメント1タグID。0 はセグメント1タグが未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 1 }, "name": { "type": "string", "description": "セグメント1タグ名(未選択の合計行では「未選択」が入る)", "example": "プロジェクトA" }, "two_years_before_closing_balance": { "type": "integer", "format": "int64", "description": "前々年度期末残高(円)", "example": 0 }, "last_year_closing_balance": { "type": "integer", "format": "int64", "description": "前年度期末残高(円)", "example": 0 }, "closing_balance": { "type": "integer", "format": "int64", "description": "当年度期末残高(円)", "example": 2592 }, "year_on_year": { "type": "number", "description": "前年比(百分率、%。100 は前年と同額、200 は前年比 2 倍、50 は前年比 0.5 倍を意味する。前年度期末残高が 0 以下、または当年度期末残高が負数の場合は 0 が返る)", "example": 200 } } } }, "segment_2_tags": { "type": "array", "description": "セグメント2タグごとの内訳。`breakdown_display_type=segment_2_tag` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "セグメント2タグID。0 はセグメント2タグが未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 1 }, "name": { "type": "string", "description": "セグメント2タグ名(未選択の合計行では「未選択」が入る)", "example": "プロジェクトA" }, "two_years_before_closing_balance": { "type": "integer", "format": "int64", "description": "前々年度期末残高(円)", "example": 0 }, "last_year_closing_balance": { "type": "integer", "format": "int64", "description": "前年度期末残高(円)", "example": 0 }, "closing_balance": { "type": "integer", "format": "int64", "description": "当年度期末残高(円)", "example": 2592 }, "year_on_year": { "type": "number", "description": "前年比(百分率、%。100 は前年と同額、200 は前年比 2 倍、50 は前年比 0.5 倍を意味する。前年度期末残高が 0 以下、または当年度期末残高が負数の場合は 0 が返る)", "example": 200 } } } }, "segment_3_tags": { "type": "array", "description": "セグメント3タグごとの内訳。`breakdown_display_type=segment_3_tag` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "セグメント3タグID。0 はセグメント3タグが未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 1 }, "name": { "type": "string", "description": "セグメント3タグ名(未選択の合計行では「未選択」が入る)", "example": "プロジェクトA" }, "two_years_before_closing_balance": { "type": "integer", "format": "int64", "description": "前々年度期末残高(円)", "example": 0 }, "last_year_closing_balance": { "type": "integer", "format": "int64", "description": "前年度期末残高(円)", "example": 0 }, "closing_balance": { "type": "integer", "format": "int64", "description": "当年度期末残高(円)", "example": 2592 }, "year_on_year": { "type": "number", "description": "前年比(百分率、%。100 は前年と同額、200 は前年比 2 倍、50 は前年比 0.5 倍を意味する。前年度期末残高が 0 以下、または当年度期末残高が負数の場合は 0 が返る)", "example": 200 } } } }, "account_category_name": { "type": "string", "description": "勘定科目カテゴリー名(例: 売上高、販売管理費など)", "example": "販売管理費" }, "total_line": { "type": "boolean", "description": "合計行かどうか。勘定科目カテゴリーの合計行(当該カテゴリーの小計を表す行)の場合のみ含まれ、`true` となる。", "example": true }, "hierarchy_level": { "type": "integer", "format": "int64", "description": "階層レベル(1が最上位。値が大きいほど深い階層)", "example": 3 }, "parent_account_category_name": { "type": "string", "description": "上位勘定科目カテゴリー名。勘定科目カテゴリー行かつ上位階層が存在する場合のみ含まれる。", "example": "営業損益" }, "two_years_before_closing_balance": { "type": "integer", "format": "int64", "description": "前々年度期末残高(円)", "example": 0 }, "last_year_closing_balance": { "type": "integer", "format": "int64", "description": "前年度期末残高(円)", "example": 0 }, "closing_balance": { "type": "integer", "format": "int64", "description": "当年度期末残高(円)", "example": 2592 }, "year_on_year": { "type": "number", "description": "前年比(百分率、%。100 は前年と同額、200 は前年比 2 倍、50 は前年比 0.5 倍を意味する。前年度期末残高が 0 以下、または当年度期末残高が負数の場合は 0 が返る)", "example": 200 } } } } } }, "up_to_date": { "type": "boolean", "description": "集計結果が最新かどうか。`false` の場合は残高の集計が完了していないため、時間を置いてから再取得してください。", "example": true }, "up_to_date_reasons": { "type": "array", "description": "集計が最新でない場合の要因情報。`up_to_date=false` のときのみ要因が含まれ、`up_to_date=true` のときは空配列となる。", "items": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "string", "description": "要因コード。現時点で返り得る値は以下。\n* `depreciation_creating` - 当期の固定資産の償却を作成中\n* `depreciation_create_error` - 当期の固定資産の償却作成でエラーが発生\n", "example": "depreciation_creating", "enum": [ "depreciation_creating", "depreciation_create_error" ] }, "message": { "type": "string", "description": "集計が最新でない理由", "example": "当期の固定資産の償却作成が完了していないため、正しい集計結果でない可能性があります。しばらく時間をおいてからもう一度お試しください。" } } } } } }, "trialPlSectionsResponse": { "type": "object", "required": [ "trial_pl_sections", "up_to_date" ], "properties": { "trial_pl_sections": { "type": "object", "required": [ "balances", "company_id", "section_ids" ], "properties": { "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID", "example": 1 }, "section_ids": { "type": "string", "description": "比較対象に指定された部門IDの一覧(リクエストで指定したカンマ区切りの文字列がそのまま返る。0 は「部門が未選択の取引」を意味する)", "example": 123 }, "fiscal_year": { "type": "integer", "format": "int64", "description": "会計年度(会計期間の開始日が属する年。例: 会計期間が 2019-04-01 開始なら 2019)。リクエストで指定した場合、または月・日の絞り込み条件が指定されていない場合にのみ含まれる。", "example": 2019 }, "start_month": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 12, "description": "発生月で絞込:開始会計月(1-12)。リクエストで指定した場合にのみ含まれる。", "example": 1 }, "end_month": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 12, "description": "発生月で絞込:終了会計月(1-12)。リクエストで指定した場合にのみ含まれる。", "example": 12 }, "start_date": { "type": "string", "description": "発生日で絞込:開始日(yyyy-mm-dd)。リクエストで指定した場合にのみ含まれる。", "example": "2019-01-01" }, "end_date": { "type": "string", "description": "発生日で絞込:終了日(yyyy-mm-dd)。リクエストで指定した場合にのみ含まれる。", "example": "2019-12-31" }, "account_item_display_type": { "type": "string", "description": "勘定科目の表示。リクエストで指定した場合にのみ含まれる。\n* `account_item` - 勘定科目単位で表示(デフォルト)\n* `group` - 決算書表示単位で表示\n", "enum": [ "account_item", "group" ], "example": "account_item" }, "breakdown_display_type": { "type": "string", "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", "enum": [ "partner", "item", "account_item", "segment_1_tag", "segment_2_tag", "segment_3_tag" ], "example": "partner" }, "partner_id": { "type": "integer", "format": "int64", "minimum": 0, "description": "絞込に指定された取引先ID。リクエストで指定した場合にのみ含まれる。0 の場合は「取引先が未選択の取引を対象」を意味する(リクエスト側の 0 指定と同じ)。", "example": 1 }, "partner_code": { "type": "string", "description": "絞込に指定された取引先コード。リクエストで指定した場合にのみ含まれる。", "example": "code001" }, "item_id": { "type": "integer", "format": "int64", "minimum": 0, "description": "絞込に指定された品目ID。リクエストで指定した場合にのみ含まれる。0 の場合は「品目が未選択の取引を対象」を意味する。", "example": 1 }, "adjustment": { "type": "string", "description": "決算整理仕訳の絞り込み条件。リクエストで指定した場合にのみ含まれる。\n* `only` - 決算整理仕訳のみを集計\n* `without` - 決算整理仕訳を除外して集計\n", "example": "only", "enum": [ "only", "without" ] }, "cost_allocation": { "type": "string", "description": "配賦仕訳の絞り込み条件。リクエストで指定した場合にのみ含まれる。\n* `only` - 配賦仕訳のみを集計\n* `without` - 配賦仕訳を除外して集計\n", "example": "only", "enum": [ "only", "without" ] }, "approval_flow_status": { "type": "string", "description": "承認ステータスの絞り込み条件。リクエストで指定した場合にのみ含まれる。\n* `without_in_progress` - 未承認を除く(デフォルト)\n* `all` - 全ての承認ステータスを含む\n", "example": "without_in_progress", "enum": [ "without_in_progress", "all" ] }, "created_at": { "type": "string", "description": "レスポンスを生成した日時(ISO 8601, JST)", "example": "2019-12-17T13:47:24+09:00" }, "balances": { "type": "array", "description": "残高一覧。指定した部門ごとの期末残高を `sections` に並べて比較する。`hierarchy_level` の階層構造で並ぶ。行は次の 3 種類が混在する。\n* 勘定科目行: `account_item_id` あり(例: 売上高、地代家賃)\n* 決算書表示名行: `account_item_id` なし・`account_group_name` あり(`account_item_display_type=group` 指定時のみ現れる)\n* 勘定科目カテゴリー行: `account_item_id` も `account_group_name` も無く、`account_category_name` あり(カテゴリー合計行は `total_line=true`)\n", "items": { "type": "object", "properties": { "account_item_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "勘定科目ID。勘定科目行の場合のみ含まれる(勘定科目カテゴリー行では含まれない)。", "example": 192 }, "account_item_name": { "type": "string", "description": "勘定科目名。勘定科目行の場合のみ含まれる。", "example": "売上高" }, "account_group_name": { "type": "string", "description": "決算書表示名。`account_item_display_type=group` を指定した場合にのみ、決算書表示行に含まれる。", "example": "売上高" }, "sections": { "type": "array", "description": "比較対象に指定した部門ごとの期末残高。`breakdown_display_type` を指定した場合は、各部門要素の配下に内訳配列(`partners` / `items` / `segment_1_tags` / `segment_2_tags` / `segment_3_tags`)が含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "部門ID。0 は部門が未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 1 }, "name": { "type": "string", "description": "部門名(未選択の合計行では「未選択」が入る)", "example": "開発部門" }, "closing_balance": { "type": "integer", "format": "int64", "description": "当該部門の期末残高(円)", "example": 2592 }, "partners": { "type": "array", "description": "取引先ごとの内訳。`breakdown_display_type=partner` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "取引先ID。0 は取引先が未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 22 }, "name": { "type": "string", "description": "取引先名(未選択の合計行では「未選択」が入る)", "example": "freee" }, "closing_balance": { "type": "integer", "format": "int64", "description": "当該部門・取引先の期末残高(円)", "example": 2592 } } } }, "items": { "type": "array", "description": "品目ごとの内訳。`breakdown_display_type=item` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "品目ID。0 は品目が未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 1 }, "name": { "type": "string", "description": "品目名(未選択の合計行では「未選択」が入る)", "example": "源泉所得税" }, "closing_balance": { "type": "integer", "format": "int64", "description": "当該部門・品目の期末残高(円)", "example": 2592 } } } }, "segment_1_tags": { "type": "array", "description": "セグメント1タグごとの内訳。`breakdown_display_type=segment_1_tag` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "セグメント1タグID。0 はセグメント1タグが未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 1 }, "name": { "type": "string", "description": "セグメント1タグ名(未選択の合計行では「未選択」が入る)", "example": "プロジェクトA" }, "closing_balance": { "type": "integer", "format": "int64", "description": "当該部門・セグメント1タグの期末残高(円)", "example": 2592 } } } }, "segment_2_tags": { "type": "array", "description": "セグメント2タグごとの内訳。`breakdown_display_type=segment_2_tag` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "セグメント2タグID。0 はセグメント2タグが未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 1 }, "name": { "type": "string", "description": "セグメント2タグ名(未選択の合計行では「未選択」が入る)", "example": "プロジェクトA" }, "closing_balance": { "type": "integer", "format": "int64", "description": "当該部門・セグメント2タグの期末残高(円)", "example": 2592 } } } }, "segment_3_tags": { "type": "array", "description": "セグメント3タグごとの内訳。`breakdown_display_type=segment_3_tag` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "セグメント3タグID。0 はセグメント3タグが未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 1 }, "name": { "type": "string", "description": "セグメント3タグ名(未選択の合計行では「未選択」が入る)", "example": "プロジェクトA" }, "closing_balance": { "type": "integer", "format": "int64", "description": "当該部門・セグメント3タグの期末残高(円)", "example": 2592 } } } } } } }, "account_category_name": { "type": "string", "description": "勘定科目カテゴリー名(例: 売上高、販売管理費など)", "example": "販売管理費" }, "total_line": { "type": "boolean", "description": "合計行かどうか。勘定科目カテゴリーの合計行(当該カテゴリーの小計を表す行)の場合のみ含まれ、`true` となる。", "example": true }, "hierarchy_level": { "type": "integer", "format": "int64", "description": "階層レベル(1が最上位。値が大きいほど深い階層)", "example": 3 }, "parent_account_category_name": { "type": "string", "description": "上位勘定科目カテゴリー名。勘定科目カテゴリー行かつ上位階層が存在する場合のみ含まれる。", "example": "営業損益" }, "closing_balance": { "type": "integer", "format": "int64", "description": "期末残高(円)。比較対象に指定した部門の合計値。", "example": 2592 } } } } } }, "up_to_date": { "type": "boolean", "description": "集計結果が最新かどうか。`false` の場合は残高の集計が完了していないため、時間を置いてから再取得してください。", "example": true }, "up_to_date_reasons": { "type": "array", "description": "集計が最新でない場合の要因情報。`up_to_date=false` のときのみ要因が含まれ、`up_to_date=true` のときは空配列となる。", "items": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "string", "description": "要因コード。現時点で返り得る値は以下。\n* `depreciation_creating` - 当期の固定資産の償却を作成中\n* `depreciation_create_error` - 当期の固定資産の償却作成でエラーが発生\n", "example": "depreciation_creating", "enum": [ "depreciation_creating", "depreciation_create_error" ] }, "message": { "type": "string", "description": "集計が最新でない理由", "example": "当期の固定資産の償却作成が完了していないため、正しい集計結果でない可能性があります。しばらく時間をおいてからもう一度お試しください。" } } } } } }, "trialPlSegment_1TagsResponse": { "type": "object", "required": [ "trial_pl_segment_1_tags", "up_to_date" ], "properties": { "trial_pl_segment_1_tags": { "type": "object", "required": [ "balances", "company_id", "segment_1_tag_ids" ], "properties": { "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID", "example": 1 }, "segment_1_tag_ids": { "type": "string", "description": "比較対象に指定されたセグメント1タグIDの一覧(リクエストで指定したカンマ区切りの文字列がそのまま返る。0 は「セグメント1タグが未選択の取引」を意味する)", "example": 123 }, "fiscal_year": { "type": "integer", "format": "int64", "description": "会計年度(会計期間の開始日が属する年。例: 会計期間が 2019-04-01 開始なら 2019)。リクエストで指定した場合、または月・日の絞り込み条件が指定されていない場合にのみ含まれる。", "example": 2019 }, "start_month": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 12, "description": "発生月で絞込:開始会計月(1-12)。リクエストで指定した場合にのみ含まれる。", "example": 1 }, "end_month": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 12, "description": "発生月で絞込:終了会計月(1-12)。リクエストで指定した場合にのみ含まれる。", "example": 12 }, "start_date": { "type": "string", "description": "発生日で絞込:開始日(yyyy-mm-dd)。リクエストで指定した場合にのみ含まれる。", "example": "2019-01-01" }, "end_date": { "type": "string", "description": "発生日で絞込:終了日(yyyy-mm-dd)。リクエストで指定した場合にのみ含まれる。", "example": "2019-12-31" }, "account_item_display_type": { "type": "string", "description": "勘定科目の表示。リクエストで指定した場合にのみ含まれる。\n* `account_item` - 勘定科目単位で表示(デフォルト)\n* `group` - 決算書表示単位で表示\n", "enum": [ "account_item", "group" ], "example": "account_item" }, "breakdown_display_type": { "type": "string", "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", "enum": [ "partner", "item", "section", "account_item" ], "example": "partner" }, "partner_id": { "type": "integer", "format": "int64", "minimum": 0, "description": "絞込に指定された取引先ID。リクエストで指定した場合にのみ含まれる。0 の場合は「取引先が未選択の取引を対象」を意味する(リクエスト側の 0 指定と同じ)。", "example": 1 }, "partner_code": { "type": "string", "description": "絞込に指定された取引先コード。リクエストで指定した場合にのみ含まれる。", "example": "code001" }, "item_id": { "type": "integer", "format": "int64", "minimum": 0, "description": "絞込に指定された品目ID。リクエストで指定した場合にのみ含まれる。0 の場合は「品目が未選択の取引を対象」を意味する。", "example": 1 }, "section_id": { "type": "integer", "format": "int64", "minimum": 0, "description": "絞込に指定された部門ID。リクエストで指定した場合にのみ含まれる。0 の場合は「部門が未選択の取引を対象」を意味する。", "example": 1 }, "adjustment": { "type": "string", "description": "決算整理仕訳の絞り込み条件。リクエストで指定した場合にのみ含まれる。\n* `only` - 決算整理仕訳のみを集計\n* `without` - 決算整理仕訳を除外して集計\n", "example": "only", "enum": [ "only", "without" ] }, "cost_allocation": { "type": "string", "description": "配賦仕訳の絞り込み条件。リクエストで指定した場合にのみ含まれる。\n* `only` - 配賦仕訳のみを集計\n* `without` - 配賦仕訳を除外して集計\n", "example": "only", "enum": [ "only", "without" ] }, "approval_flow_status": { "type": "string", "description": "承認ステータスの絞り込み条件。リクエストで指定した場合にのみ含まれる。\n* `without_in_progress` - 未承認を除く(デフォルト)\n* `all` - 全ての承認ステータスを含む\n", "example": "without_in_progress", "enum": [ "without_in_progress", "all" ] }, "created_at": { "type": "string", "description": "レスポンスを生成した日時(ISO 8601, JST)", "example": "2019-12-17T13:47:24+09:00" }, "balances": { "type": "array", "description": "残高一覧。指定したセグメント1タグごとの期末残高を `segment_1_tags` に並べて比較する。`hierarchy_level` の階層構造で並ぶ。行は次の 3 種類が混在する。\n* 勘定科目行: `account_item_id` あり(例: 売上高、地代家賃)\n* 決算書表示名行: `account_item_id` なし・`account_group_name` あり(`account_item_display_type=group` 指定時のみ現れる)\n* 勘定科目カテゴリー行: `account_item_id` も `account_group_name` も無く、`account_category_name` あり(カテゴリー合計行は `total_line=true`)\n", "items": { "type": "object", "properties": { "account_item_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "勘定科目ID。勘定科目行の場合のみ含まれる(勘定科目カテゴリー行では含まれない)。", "example": 192 }, "account_item_name": { "type": "string", "description": "勘定科目名。勘定科目行の場合のみ含まれる。", "example": "売上高" }, "account_group_name": { "type": "string", "description": "決算書表示名。`account_item_display_type=group` を指定した場合にのみ、決算書表示行に含まれる。", "example": "売上高" }, "segment_1_tags": { "type": "array", "description": "比較対象に指定したセグメント1タグごとの期末残高。`breakdown_display_type` を指定した場合は、各セグメント1タグ要素の配下に内訳配列(`partners` / `items` / `sections`)が含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "セグメント1タグID。0 はセグメント1タグが未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 1 }, "name": { "type": "string", "description": "セグメント1タグ名(未選択の合計行では「未選択」が入る)", "example": "プロジェクトA" }, "closing_balance": { "type": "integer", "format": "int64", "description": "当該セグメント1タグの期末残高(円)", "example": 2592 }, "partners": { "type": "array", "description": "取引先ごとの内訳。`breakdown_display_type=partner` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "取引先ID。0 は取引先が未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 22 }, "name": { "type": "string", "description": "取引先名(未選択の合計行では「未選択」が入る)", "example": "freee" }, "closing_balance": { "type": "integer", "format": "int64", "description": "当該セグメント1タグ・取引先の期末残高(円)", "example": 2592 } } } }, "items": { "type": "array", "description": "品目ごとの内訳。`breakdown_display_type=item` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "品目ID。0 は品目が未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 1 }, "name": { "type": "string", "description": "品目名(未選択の合計行では「未選択」が入る)", "example": "源泉所得税" }, "closing_balance": { "type": "integer", "format": "int64", "description": "当該セグメント1タグ・品目の期末残高(円)", "example": 2592 } } } }, "sections": { "type": "array", "description": "部門ごとの内訳。`breakdown_display_type=section` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "部門ID。0 は部門が未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 1 }, "name": { "type": "string", "description": "部門名(未選択の合計行では「未選択」が入る)", "example": "開発部門" }, "closing_balance": { "type": "integer", "format": "int64", "description": "当該セグメント1タグ・部門の期末残高(円)", "example": 2592 } } } } } } }, "account_category_name": { "type": "string", "description": "勘定科目カテゴリー名(例: 売上高、販売管理費など)", "example": "販売管理費" }, "total_line": { "type": "boolean", "description": "合計行かどうか。勘定科目カテゴリーの合計行(当該カテゴリーの小計を表す行)の場合のみ含まれ、`true` となる。", "example": true }, "hierarchy_level": { "type": "integer", "format": "int64", "description": "階層レベル(1が最上位。値が大きいほど深い階層)", "example": 3 }, "parent_account_category_name": { "type": "string", "description": "上位勘定科目カテゴリー名。勘定科目カテゴリー行かつ上位階層が存在する場合のみ含まれる。", "example": "営業損益" }, "closing_balance": { "type": "integer", "format": "int64", "description": "期末残高(円)。比較対象に指定したセグメント1タグの合計値。", "example": 2592 } } } } } }, "up_to_date": { "type": "boolean", "description": "集計結果が最新かどうか。`false` の場合は残高の集計が完了していないため、時間を置いてから再取得してください。", "example": true }, "up_to_date_reasons": { "type": "array", "description": "集計が最新でない場合の要因情報。`up_to_date=false` のときのみ要因が含まれ、`up_to_date=true` のときは空配列となる。", "items": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "string", "description": "要因コード。現時点で返り得る値は以下。\n* `depreciation_creating` - 当期の固定資産の償却を作成中\n* `depreciation_create_error` - 当期の固定資産の償却作成でエラーが発生\n", "example": "depreciation_creating", "enum": [ "depreciation_creating", "depreciation_create_error" ] }, "message": { "type": "string", "description": "集計が最新でない理由", "example": "当期の固定資産の償却作成が完了していないため、正しい集計結果でない可能性があります。しばらく時間をおいてからもう一度お試しください。" } } } } } }, "trialPlSegment_2TagsResponse": { "type": "object", "required": [ "trial_pl_segment_2_tags", "up_to_date" ], "properties": { "trial_pl_segment_2_tags": { "type": "object", "required": [ "balances", "company_id", "segment_2_tag_ids" ], "properties": { "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID", "example": 1 }, "segment_2_tag_ids": { "type": "string", "description": "比較対象に指定されたセグメント2タグIDの一覧(リクエストで指定したカンマ区切りの文字列がそのまま返る。0 は「セグメント2タグが未選択の取引」を意味する)", "example": 123 }, "fiscal_year": { "type": "integer", "format": "int64", "description": "会計年度(会計期間の開始日が属する年。例: 会計期間が 2019-04-01 開始なら 2019)。リクエストで指定した場合、または月・日の絞り込み条件が指定されていない場合にのみ含まれる。", "example": 2019 }, "start_month": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 12, "description": "発生月で絞込:開始会計月(1-12)。リクエストで指定した場合にのみ含まれる。", "example": 1 }, "end_month": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 12, "description": "発生月で絞込:終了会計月(1-12)。リクエストで指定した場合にのみ含まれる。", "example": 12 }, "start_date": { "type": "string", "description": "発生日で絞込:開始日(yyyy-mm-dd)。リクエストで指定した場合にのみ含まれる。", "example": "2019-01-01" }, "end_date": { "type": "string", "description": "発生日で絞込:終了日(yyyy-mm-dd)。リクエストで指定した場合にのみ含まれる。", "example": "2019-12-31" }, "account_item_display_type": { "type": "string", "description": "勘定科目の表示。リクエストで指定した場合にのみ含まれる。\n* `account_item` - 勘定科目単位で表示(デフォルト)\n* `group` - 決算書表示単位で表示\n", "enum": [ "account_item", "group" ], "example": "account_item" }, "breakdown_display_type": { "type": "string", "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", "enum": [ "partner", "item", "section", "account_item" ], "example": "partner" }, "partner_id": { "type": "integer", "format": "int64", "minimum": 0, "description": "絞込に指定された取引先ID。リクエストで指定した場合にのみ含まれる。0 の場合は「取引先が未選択の取引を対象」を意味する(リクエスト側の 0 指定と同じ)。", "example": 1 }, "partner_code": { "type": "string", "description": "絞込に指定された取引先コード。リクエストで指定した場合にのみ含まれる。", "example": "code001" }, "item_id": { "type": "integer", "format": "int64", "minimum": 0, "description": "絞込に指定された品目ID。リクエストで指定した場合にのみ含まれる。0 の場合は「品目が未選択の取引を対象」を意味する。", "example": 1 }, "section_id": { "type": "integer", "format": "int64", "minimum": 0, "description": "絞込に指定された部門ID。リクエストで指定した場合にのみ含まれる。0 の場合は「部門が未選択の取引を対象」を意味する。", "example": 1 }, "adjustment": { "type": "string", "description": "決算整理仕訳の絞り込み条件。リクエストで指定した場合にのみ含まれる。\n* `only` - 決算整理仕訳のみを集計\n* `without` - 決算整理仕訳を除外して集計\n", "example": "only", "enum": [ "only", "without" ] }, "cost_allocation": { "type": "string", "description": "配賦仕訳の絞り込み条件。リクエストで指定した場合にのみ含まれる。\n* `only` - 配賦仕訳のみを集計\n* `without` - 配賦仕訳を除外して集計\n", "example": "only", "enum": [ "only", "without" ] }, "approval_flow_status": { "type": "string", "description": "承認ステータスの絞り込み条件。リクエストで指定した場合にのみ含まれる。\n* `without_in_progress` - 未承認を除く(デフォルト)\n* `all` - 全ての承認ステータスを含む\n", "example": "without_in_progress", "enum": [ "without_in_progress", "all" ] }, "created_at": { "type": "string", "description": "レスポンスを生成した日時(ISO 8601, JST)", "example": "2019-12-17T13:47:24+09:00" }, "balances": { "type": "array", "description": "残高一覧。指定したセグメント2タグごとの期末残高を `segment_2_tags` に並べて比較する。`hierarchy_level` の階層構造で並ぶ。行は次の 3 種類が混在する。\n* 勘定科目行: `account_item_id` あり(例: 売上高、地代家賃)\n* 決算書表示名行: `account_item_id` なし・`account_group_name` あり(`account_item_display_type=group` 指定時のみ現れる)\n* 勘定科目カテゴリー行: `account_item_id` も `account_group_name` も無く、`account_category_name` あり(カテゴリー合計行は `total_line=true`)\n", "items": { "type": "object", "properties": { "account_item_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "勘定科目ID。勘定科目行の場合のみ含まれる(勘定科目カテゴリー行では含まれない)。", "example": 192 }, "account_item_name": { "type": "string", "description": "勘定科目名。勘定科目行の場合のみ含まれる。", "example": "売上高" }, "account_group_name": { "type": "string", "description": "決算書表示名。`account_item_display_type=group` を指定した場合にのみ、決算書表示行に含まれる。", "example": "売上高" }, "segment_2_tags": { "type": "array", "description": "比較対象に指定したセグメント2タグごとの期末残高。`breakdown_display_type` を指定した場合は、各セグメント2タグ要素の配下に内訳配列(`partners` / `items` / `sections`)が含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "セグメント2タグID。0 はセグメント2タグが未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 1 }, "name": { "type": "string", "description": "セグメント2タグ名(未選択の合計行では「未選択」が入る)", "example": "プロジェクトA" }, "closing_balance": { "type": "integer", "format": "int64", "description": "当該セグメント2タグの期末残高(円)", "example": 2592 }, "partners": { "type": "array", "description": "取引先ごとの内訳。`breakdown_display_type=partner` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "取引先ID。0 は取引先が未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 22 }, "name": { "type": "string", "description": "取引先名(未選択の合計行では「未選択」が入る)", "example": "freee" }, "closing_balance": { "type": "integer", "format": "int64", "description": "当該セグメント2タグ・取引先の期末残高(円)", "example": 2592 } } } }, "items": { "type": "array", "description": "品目ごとの内訳。`breakdown_display_type=item` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "品目ID。0 は品目が未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 1 }, "name": { "type": "string", "description": "品目名(未選択の合計行では「未選択」が入る)", "example": "源泉所得税" }, "closing_balance": { "type": "integer", "format": "int64", "description": "当該セグメント2タグ・品目の期末残高(円)", "example": 2592 } } } }, "sections": { "type": "array", "description": "部門ごとの内訳。`breakdown_display_type=section` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "部門ID。0 は部門が未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 1 }, "name": { "type": "string", "description": "部門名(未選択の合計行では「未選択」が入る)", "example": "開発部門" }, "closing_balance": { "type": "integer", "format": "int64", "description": "当該セグメント2タグ・部門の期末残高(円)", "example": 2592 } } } } } } }, "account_category_name": { "type": "string", "description": "勘定科目カテゴリー名(例: 売上高、販売管理費など)", "example": "販売管理費" }, "total_line": { "type": "boolean", "description": "合計行かどうか。勘定科目カテゴリーの合計行(当該カテゴリーの小計を表す行)の場合のみ含まれ、`true` となる。", "example": true }, "hierarchy_level": { "type": "integer", "format": "int64", "description": "階層レベル(1が最上位。値が大きいほど深い階層)", "example": 3 }, "parent_account_category_name": { "type": "string", "description": "上位勘定科目カテゴリー名。勘定科目カテゴリー行かつ上位階層が存在する場合のみ含まれる。", "example": "営業損益" }, "closing_balance": { "type": "integer", "format": "int64", "description": "期末残高(円)。比較対象に指定したセグメント2タグの合計値。", "example": 2592 } } } } } }, "up_to_date": { "type": "boolean", "description": "集計結果が最新かどうか。`false` の場合は残高の集計が完了していないため、時間を置いてから再取得してください。", "example": true }, "up_to_date_reasons": { "type": "array", "description": "集計が最新でない場合の要因情報。`up_to_date=false` のときのみ要因が含まれ、`up_to_date=true` のときは空配列となる。", "items": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "string", "description": "要因コード。現時点で返り得る値は以下。\n* `depreciation_creating` - 当期の固定資産の償却を作成中\n* `depreciation_create_error` - 当期の固定資産の償却作成でエラーが発生\n", "example": "depreciation_creating", "enum": [ "depreciation_creating", "depreciation_create_error" ] }, "message": { "type": "string", "description": "集計が最新でない理由", "example": "当期の固定資産の償却作成が完了していないため、正しい集計結果でない可能性があります。しばらく時間をおいてからもう一度お試しください。" } } } } } }, "trialPlSegment_3TagsResponse": { "type": "object", "required": [ "trial_pl_segment_3_tags", "up_to_date" ], "properties": { "trial_pl_segment_3_tags": { "type": "object", "required": [ "balances", "company_id", "segment_3_tag_ids" ], "properties": { "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID", "example": 1 }, "segment_3_tag_ids": { "type": "string", "description": "比較対象に指定されたセグメント3タグIDの一覧(リクエストで指定したカンマ区切りの文字列がそのまま返る。0 は「セグメント3タグが未選択の取引」を意味する)", "example": 123 }, "fiscal_year": { "type": "integer", "format": "int64", "description": "会計年度(会計期間の開始日が属する年。例: 会計期間が 2019-04-01 開始なら 2019)。リクエストで指定した場合、または月・日の絞り込み条件が指定されていない場合にのみ含まれる。", "example": 2019 }, "start_month": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 12, "description": "発生月で絞込:開始会計月(1-12)。リクエストで指定した場合にのみ含まれる。", "example": 1 }, "end_month": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 12, "description": "発生月で絞込:終了会計月(1-12)。リクエストで指定した場合にのみ含まれる。", "example": 12 }, "start_date": { "type": "string", "description": "発生日で絞込:開始日(yyyy-mm-dd)。リクエストで指定した場合にのみ含まれる。", "example": "2019-01-01" }, "end_date": { "type": "string", "description": "発生日で絞込:終了日(yyyy-mm-dd)。リクエストで指定した場合にのみ含まれる。", "example": "2019-12-31" }, "account_item_display_type": { "type": "string", "description": "勘定科目の表示。リクエストで指定した場合にのみ含まれる。\n* `account_item` - 勘定科目単位で表示(デフォルト)\n* `group` - 決算書表示単位で表示\n", "enum": [ "account_item", "group" ], "example": "account_item" }, "breakdown_display_type": { "type": "string", "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", "enum": [ "partner", "item", "section", "account_item" ], "example": "partner" }, "partner_id": { "type": "integer", "format": "int64", "minimum": 0, "description": "絞込に指定された取引先ID。リクエストで指定した場合にのみ含まれる。0 の場合は「取引先が未選択の取引を対象」を意味する(リクエスト側の 0 指定と同じ)。", "example": 1 }, "partner_code": { "type": "string", "description": "絞込に指定された取引先コード。リクエストで指定した場合にのみ含まれる。", "example": "code001" }, "item_id": { "type": "integer", "format": "int64", "minimum": 0, "description": "絞込に指定された品目ID。リクエストで指定した場合にのみ含まれる。0 の場合は「品目が未選択の取引を対象」を意味する。", "example": 1 }, "section_id": { "type": "integer", "format": "int64", "minimum": 0, "description": "絞込に指定された部門ID。リクエストで指定した場合にのみ含まれる。0 の場合は「部門が未選択の取引を対象」を意味する。", "example": 1 }, "adjustment": { "type": "string", "description": "決算整理仕訳の絞り込み条件。リクエストで指定した場合にのみ含まれる。\n* `only` - 決算整理仕訳のみを集計\n* `without` - 決算整理仕訳を除外して集計\n", "example": "only", "enum": [ "only", "without" ] }, "cost_allocation": { "type": "string", "description": "配賦仕訳の絞り込み条件。リクエストで指定した場合にのみ含まれる。\n* `only` - 配賦仕訳のみを集計\n* `without` - 配賦仕訳を除外して集計\n", "example": "only", "enum": [ "only", "without" ] }, "approval_flow_status": { "type": "string", "description": "承認ステータスの絞り込み条件。リクエストで指定した場合にのみ含まれる。\n* `without_in_progress` - 未承認を除く(デフォルト)\n* `all` - 全ての承認ステータスを含む\n", "example": "without_in_progress", "enum": [ "without_in_progress", "all" ] }, "created_at": { "type": "string", "description": "レスポンスを生成した日時(ISO 8601, JST)", "example": "2019-12-17T13:47:24+09:00" }, "balances": { "type": "array", "description": "残高一覧。指定したセグメント3タグごとの期末残高を `segment_3_tags` に並べて比較する。`hierarchy_level` の階層構造で並ぶ。行は次の 3 種類が混在する。\n* 勘定科目行: `account_item_id` あり(例: 売上高、地代家賃)\n* 決算書表示名行: `account_item_id` なし・`account_group_name` あり(`account_item_display_type=group` 指定時のみ現れる)\n* 勘定科目カテゴリー行: `account_item_id` も `account_group_name` も無く、`account_category_name` あり(カテゴリー合計行は `total_line=true`)\n", "items": { "type": "object", "properties": { "account_item_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "勘定科目ID。勘定科目行の場合のみ含まれる(勘定科目カテゴリー行では含まれない)。", "example": 192 }, "account_item_name": { "type": "string", "description": "勘定科目名。勘定科目行の場合のみ含まれる。", "example": "売上高" }, "account_group_name": { "type": "string", "description": "決算書表示名。`account_item_display_type=group` を指定した場合にのみ、決算書表示行に含まれる。", "example": "売上高" }, "segment_3_tags": { "type": "array", "description": "比較対象に指定したセグメント3タグごとの期末残高。`breakdown_display_type` を指定した場合は、各セグメント3タグ要素の配下に内訳配列(`partners` / `items` / `sections`)が含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "セグメント3タグID。0 はセグメント3タグが未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 1 }, "name": { "type": "string", "description": "セグメント3タグ名(未選択の合計行では「未選択」が入る)", "example": "プロジェクトA" }, "closing_balance": { "type": "integer", "format": "int64", "description": "当該セグメント3タグの期末残高(円)", "example": 2592 }, "partners": { "type": "array", "description": "取引先ごとの内訳。`breakdown_display_type=partner` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "取引先ID。0 は取引先が未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 22 }, "name": { "type": "string", "description": "取引先名(未選択の合計行では「未選択」が入る)", "example": "freee" }, "closing_balance": { "type": "integer", "format": "int64", "description": "当該セグメント3タグ・取引先の期末残高(円)", "example": 2592 } } } }, "items": { "type": "array", "description": "品目ごとの内訳。`breakdown_display_type=item` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "品目ID。0 は品目が未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 1 }, "name": { "type": "string", "description": "品目名(未選択の合計行では「未選択」が入る)", "example": "源泉所得税" }, "closing_balance": { "type": "integer", "format": "int64", "description": "当該セグメント3タグ・品目の期末残高(円)", "example": 2592 } } } }, "sections": { "type": "array", "description": "部門ごとの内訳。`breakdown_display_type=section` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "部門ID。0 は部門が未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 1 }, "name": { "type": "string", "description": "部門名(未選択の合計行では「未選択」が入る)", "example": "開発部門" }, "closing_balance": { "type": "integer", "format": "int64", "description": "当該セグメント3タグ・部門の期末残高(円)", "example": 2592 } } } } } } }, "account_category_name": { "type": "string", "description": "勘定科目カテゴリー名(例: 売上高、販売管理費など)", "example": "販売管理費" }, "total_line": { "type": "boolean", "description": "合計行かどうか。勘定科目カテゴリーの合計行(当該カテゴリーの小計を表す行)の場合のみ含まれ、`true` となる。", "example": true }, "hierarchy_level": { "type": "integer", "format": "int64", "description": "階層レベル(1が最上位。値が大きいほど深い階層)", "example": 3 }, "parent_account_category_name": { "type": "string", "description": "上位勘定科目カテゴリー名。勘定科目カテゴリー行かつ上位階層が存在する場合のみ含まれる。", "example": "営業損益" }, "closing_balance": { "type": "integer", "format": "int64", "description": "期末残高(円)。比較対象に指定したセグメント3タグの合計値。", "example": 2592 } } } } } }, "up_to_date": { "type": "boolean", "description": "集計結果が最新かどうか。`false` の場合は残高の集計が完了していないため、時間を置いてから再取得してください。", "example": true }, "up_to_date_reasons": { "type": "array", "description": "集計が最新でない場合の要因情報。`up_to_date=false` のときのみ要因が含まれ、`up_to_date=true` のときは空配列となる。", "items": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "string", "description": "要因コード。現時点で返り得る値は以下。\n* `depreciation_creating` - 当期の固定資産の償却を作成中\n* `depreciation_create_error` - 当期の固定資産の償却作成でエラーが発生\n", "example": "depreciation_creating", "enum": [ "depreciation_creating", "depreciation_create_error" ] }, "message": { "type": "string", "description": "集計が最新でない理由", "example": "当期の固定資産の償却作成が完了していないため、正しい集計結果でない可能性があります。しばらく時間をおいてからもう一度お試しください。" } } } } } }, "trialCrResponse": { "type": "object", "required": [ "trial_cr", "up_to_date" ], "properties": { "trial_cr": { "required": [ "balances", "company_id" ], "type": "object", "properties": { "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID", "example": 1 }, "fiscal_year": { "type": "integer", "format": "int64", "description": "会計年度(会計期間の開始日が属する年。例: 会計期間が 2019-04-01 開始なら 2019)。リクエストで指定した場合、または月・日の絞り込み条件が指定されていない場合にのみ含まれる。", "example": 2019 }, "start_month": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 12, "description": "発生月で絞込:開始会計月(1-12)。リクエストで指定した場合にのみ含まれる。", "example": 1 }, "end_month": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 12, "description": "発生月で絞込:終了会計月(1-12)。リクエストで指定した場合にのみ含まれる。", "example": 12 }, "start_date": { "type": "string", "description": "発生日で絞込:開始日(yyyy-mm-dd)。リクエストで指定した場合にのみ含まれる。", "example": "2019-01-01" }, "end_date": { "type": "string", "description": "発生日で絞込:終了日(yyyy-mm-dd)。リクエストで指定した場合にのみ含まれる。", "example": "2019-12-31" }, "account_item_display_type": { "type": "string", "description": "勘定科目の表示。リクエストで指定した場合にのみ含まれる。\n* `account_item` - 勘定科目単位で表示(デフォルト)\n* `group` - 決算書表示単位で表示\n", "enum": [ "account_item", "group" ], "example": "account_item" }, "breakdown_display_type": { "type": "string", "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", "enum": [ "partner", "item", "section", "account_item", "segment_1_tag", "segment_2_tag", "segment_3_tag" ], "example": "partner" }, "partner_id": { "type": "integer", "format": "int64", "minimum": 0, "description": "絞込に指定された取引先ID。リクエストで指定した場合にのみ含まれる。0 の場合は「取引先が未選択の取引を対象」を意味する(リクエスト側の 0 指定と同じ)。", "example": 1 }, "partner_code": { "type": "string", "description": "絞込に指定された取引先コード。リクエストで指定した場合にのみ含まれる。", "example": "code001" }, "item_id": { "type": "integer", "format": "int64", "minimum": 0, "description": "絞込に指定された品目ID。リクエストで指定した場合にのみ含まれる。0 の場合は「品目が未選択の取引を対象」を意味する。", "example": 1 }, "section_id": { "type": "integer", "format": "int64", "minimum": 0, "description": "絞込に指定された部門ID。リクエストで指定した場合にのみ含まれる。0 の場合は「部門が未選択の取引を対象」を意味する。", "example": 1 }, "adjustment": { "type": "string", "description": "決算整理仕訳の絞り込み条件。リクエストで指定した場合にのみ含まれる。\n* `only` - 決算整理仕訳のみを集計\n* `without` - 決算整理仕訳を除外して集計\n", "example": "only", "enum": [ "only", "without" ] }, "cost_allocation": { "type": "string", "description": "配賦仕訳の絞り込み条件。リクエストで指定した場合にのみ含まれる。\n* `only` - 配賦仕訳のみを集計\n* `without` - 配賦仕訳を除外して集計\n", "example": "only", "enum": [ "only", "without" ] }, "approval_flow_status": { "type": "string", "description": "承認ステータスの絞り込み条件。リクエストで指定した場合にのみ含まれる。\n* `without_in_progress` - 未承認を除く(デフォルト)\n* `all` - 全ての承認ステータスを含む\n", "example": "without_in_progress", "enum": [ "without_in_progress", "all" ] }, "created_at": { "type": "string", "description": "レスポンスを生成した日時(ISO 8601, JST)", "example": "2019-12-17T13:47:24+09:00" }, "balances": { "type": "array", "description": "残高一覧。`hierarchy_level` の階層構造で並ぶ。行は次の 3 種類が混在する。\n* 勘定科目行: `account_item_id` あり(例: [製]期首材料棚卸高、[製]給料手当)\n* 決算書表示名行: `account_item_id` なし・`account_group_name` あり(`account_item_display_type=group` 指定時のみ現れる)\n* 勘定科目カテゴリー行: `account_item_id` も `account_group_name` も無く、`account_category_name` あり(カテゴリー合計行は `total_line=true`)\n", "items": { "type": "object", "properties": { "account_item_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "勘定科目ID。勘定科目行の場合のみ含まれる(勘定科目カテゴリー行では含まれない)。", "example": 192 }, "account_item_name": { "type": "string", "description": "勘定科目名。勘定科目行の場合のみ含まれる。", "example": "[製]期首材料棚卸高" }, "account_group_name": { "type": "string", "description": "決算書表示名。`account_item_display_type=group` を指定した場合にのみ、決算書表示行に含まれる。", "example": "期首材料棚卸高" }, "partners": { "type": "array", "description": "取引先ごとの内訳。`breakdown_display_type=partner` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "取引先ID。0 は取引先が未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 22 }, "name": { "type": "string", "description": "取引先名(未選択の合計行では「未選択」が入る)", "example": "freee" }, "opening_balance": { "type": "integer", "format": "int64", "description": "期首残高(円)", "example": 0 }, "debit_amount": { "type": "integer", "format": "int64", "description": "期間中の借方金額(円)", "example": 0 }, "credit_amount": { "type": "integer", "format": "int64", "description": "期間中の貸方金額(円)", "example": 2592 }, "closing_balance": { "type": "integer", "format": "int64", "description": "期末残高(円)", "example": 2592 }, "composition_ratio": { "type": "number", "description": "構成比(百分率、%)。製造原価報告書の基準額(勘定科目カテゴリー「製造原価」の金額。法人・個人共通)に対する当該行の金額割合を 100 換算した値。基準額を超える行では 100 を超え得る。", "example": 85 } } } }, "items": { "type": "array", "description": "品目ごとの内訳。`breakdown_display_type=item` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "品目ID。0 は品目が未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 1 }, "name": { "type": "string", "description": "品目名(未選択の合計行では「未選択」が入る)", "example": "源泉所得税" }, "opening_balance": { "type": "integer", "format": "int64", "description": "期首残高(円)", "example": 0 }, "debit_amount": { "type": "integer", "format": "int64", "description": "期間中の借方金額(円)", "example": 0 }, "credit_amount": { "type": "integer", "format": "int64", "description": "期間中の貸方金額(円)", "example": 2592 }, "closing_balance": { "type": "integer", "format": "int64", "description": "期末残高(円)", "example": 2592 }, "composition_ratio": { "type": "number", "description": "構成比(百分率、%)。製造原価報告書の基準額(勘定科目カテゴリー「製造原価」の金額。法人・個人共通)に対する当該行の金額割合を 100 換算した値。基準額を超える行では 100 を超え得る。", "example": 85 } } } }, "sections": { "type": "array", "description": "部門ごとの内訳。`breakdown_display_type=section` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "部門ID。0 は部門が未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 1 }, "name": { "type": "string", "description": "部門名(未選択の合計行では「未選択」が入る)", "example": "開発部門" }, "opening_balance": { "type": "integer", "format": "int64", "description": "期首残高(円)", "example": 0 }, "debit_amount": { "type": "integer", "format": "int64", "description": "期間中の借方金額(円)", "example": 0 }, "credit_amount": { "type": "integer", "format": "int64", "description": "期間中の貸方金額(円)", "example": 2592 }, "closing_balance": { "type": "integer", "format": "int64", "description": "期末残高(円)", "example": 2592 }, "composition_ratio": { "type": "number", "description": "構成比(百分率、%)。製造原価報告書の基準額(勘定科目カテゴリー「製造原価」の金額。法人・個人共通)に対する当該行の金額割合を 100 換算した値。基準額を超える行では 100 を超え得る。", "example": 85 } } } }, "segment_1_tags": { "type": "array", "description": "セグメント1タグごとの内訳。`breakdown_display_type=segment_1_tag` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "セグメント1タグID。0 はセグメント1タグが未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 1 }, "name": { "type": "string", "description": "セグメント1タグ名(未選択の合計行では「未選択」が入る)", "example": "プロジェクトA" }, "opening_balance": { "type": "integer", "format": "int64", "description": "期首残高(円)", "example": 0 }, "debit_amount": { "type": "integer", "format": "int64", "description": "期間中の借方金額(円)", "example": 0 }, "credit_amount": { "type": "integer", "format": "int64", "description": "期間中の貸方金額(円)", "example": 2592 }, "closing_balance": { "type": "integer", "format": "int64", "description": "期末残高(円)", "example": 2592 }, "composition_ratio": { "type": "number", "description": "構成比(百分率、%)。製造原価報告書の基準額(勘定科目カテゴリー「製造原価」の金額。法人・個人共通)に対する当該行の金額割合を 100 換算した値。基準額を超える行では 100 を超え得る。", "example": 85 } } } }, "segment_2_tags": { "type": "array", "description": "セグメント2タグごとの内訳。`breakdown_display_type=segment_2_tag` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "セグメント2タグID。0 はセグメント2タグが未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 1 }, "name": { "type": "string", "description": "セグメント2タグ名(未選択の合計行では「未選択」が入る)", "example": "プロジェクトA" }, "opening_balance": { "type": "integer", "format": "int64", "description": "期首残高(円)", "example": 0 }, "debit_amount": { "type": "integer", "format": "int64", "description": "期間中の借方金額(円)", "example": 0 }, "credit_amount": { "type": "integer", "format": "int64", "description": "期間中の貸方金額(円)", "example": 2592 }, "closing_balance": { "type": "integer", "format": "int64", "description": "期末残高(円)", "example": 2592 }, "composition_ratio": { "type": "number", "description": "構成比(百分率、%)。製造原価報告書の基準額(勘定科目カテゴリー「製造原価」の金額。法人・個人共通)に対する当該行の金額割合を 100 換算した値。基準額を超える行では 100 を超え得る。", "example": 85 } } } }, "segment_3_tags": { "type": "array", "description": "セグメント3タグごとの内訳。`breakdown_display_type=segment_3_tag` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "セグメント3タグID。0 はセグメント3タグが未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 1 }, "name": { "type": "string", "description": "セグメント3タグ名(未選択の合計行では「未選択」が入る)", "example": "プロジェクトA" }, "opening_balance": { "type": "integer", "format": "int64", "description": "期首残高(円)", "example": 0 }, "debit_amount": { "type": "integer", "format": "int64", "description": "期間中の借方金額(円)", "example": 0 }, "credit_amount": { "type": "integer", "format": "int64", "description": "期間中の貸方金額(円)", "example": 2592 }, "closing_balance": { "type": "integer", "format": "int64", "description": "期末残高(円)", "example": 2592 }, "composition_ratio": { "type": "number", "description": "構成比(百分率、%)。製造原価報告書の基準額(勘定科目カテゴリー「製造原価」の金額。法人・個人共通)に対する当該行の金額割合を 100 換算した値。基準額を超える行では 100 を超え得る。", "example": 85 } } } }, "account_category_name": { "type": "string", "description": "勘定科目カテゴリー名(例: 材料費、労務費、総製造費用 など)", "example": "材料費" }, "total_line": { "type": "boolean", "description": "合計行かどうか。勘定科目カテゴリーの合計行(当該カテゴリーの小計を表す行)の場合のみ含まれ、`true` となる。", "example": true }, "hierarchy_level": { "type": "integer", "format": "int64", "description": "階層レベル(1が最上位。値が大きいほど深い階層)", "example": 3 }, "parent_account_category_name": { "type": "string", "description": "上位勘定科目カテゴリー名。勘定科目カテゴリー行かつ上位階層が存在する場合のみ含まれる。", "example": "材料費" }, "opening_balance": { "type": "integer", "format": "int64", "description": "期首残高(円)", "example": 0 }, "debit_amount": { "type": "integer", "format": "int64", "description": "期間中の借方金額(円)", "example": 0 }, "credit_amount": { "type": "integer", "format": "int64", "description": "期間中の貸方金額(円)", "example": 2592 }, "closing_balance": { "type": "integer", "format": "int64", "description": "期末残高(円)", "example": 2592 }, "composition_ratio": { "type": "number", "description": "構成比(百分率、%)。製造原価報告書の基準額(勘定科目カテゴリー「製造原価」の金額。法人・個人共通)に対する当該行の金額割合を 100 換算した値。基準額を超える行では 100 を超え得る。", "example": 85 } } } } } }, "up_to_date": { "type": "boolean", "description": "集計結果が最新かどうか。`false` の場合は残高の集計が完了していないため、時間を置いてから再取得してください。", "example": true }, "up_to_date_reasons": { "type": "array", "description": "集計が最新でない場合の要因情報。`up_to_date=false` のときのみ要因が含まれ、`up_to_date=true` のときは空配列となる。", "items": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "string", "description": "要因コード。現時点で返り得る値は以下。\n* `depreciation_creating` - 当期の固定資産の償却を作成中\n* `depreciation_create_error` - 当期の固定資産の償却作成でエラーが発生\n", "example": "depreciation_creating", "enum": [ "depreciation_creating", "depreciation_create_error" ] }, "message": { "type": "string", "description": "集計が最新でない理由", "example": "当期の固定資産の償却作成が完了していないため、正しい集計結果でない可能性があります。しばらく時間をおいてからもう一度お試しください。" } } } } } }, "trialCrTwoYearsResponse": { "type": "object", "required": [ "trial_cr_two_years", "up_to_date" ], "properties": { "trial_cr_two_years": { "type": "object", "required": [ "balances", "company_id" ], "properties": { "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID", "example": 1 }, "fiscal_year": { "type": "integer", "format": "int64", "description": "会計年度(会計期間の開始日が属する年。例: 会計期間が 2019-04-01 開始なら 2019)。リクエストで指定した場合、または月・日の絞り込み条件が指定されていない場合にのみ含まれる。", "example": 2019 }, "start_month": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 12, "description": "発生月で絞込:開始会計月(1-12)。リクエストで指定した場合にのみ含まれる。", "example": 1 }, "end_month": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 12, "description": "発生月で絞込:終了会計月(1-12)。リクエストで指定した場合にのみ含まれる。", "example": 12 }, "start_date": { "type": "string", "description": "発生日で絞込:開始日(yyyy-mm-dd)。リクエストで指定した場合にのみ含まれる。", "example": "2019-01-01" }, "end_date": { "type": "string", "description": "発生日で絞込:終了日(yyyy-mm-dd)。リクエストで指定した場合にのみ含まれる。", "example": "2019-12-31" }, "account_item_display_type": { "type": "string", "description": "勘定科目の表示。リクエストで指定した場合にのみ含まれる。\n* `account_item` - 勘定科目単位で表示(デフォルト)\n* `group` - 決算書表示単位で表示\n", "enum": [ "account_item", "group" ], "example": "account_item" }, "breakdown_display_type": { "type": "string", "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", "enum": [ "partner", "item", "section", "account_item", "segment_1_tag", "segment_2_tag", "segment_3_tag" ], "example": "partner" }, "partner_id": { "type": "integer", "format": "int64", "minimum": 0, "description": "絞込に指定された取引先ID。リクエストで指定した場合にのみ含まれる。0 の場合は「取引先が未選択の取引を対象」を意味する(リクエスト側の 0 指定と同じ)。", "example": 1 }, "partner_code": { "type": "string", "description": "絞込に指定された取引先コード。リクエストで指定した場合にのみ含まれる。", "example": "code001" }, "item_id": { "type": "integer", "format": "int64", "minimum": 0, "description": "絞込に指定された品目ID。リクエストで指定した場合にのみ含まれる。0 の場合は「品目が未選択の取引を対象」を意味する。", "example": 1 }, "section_id": { "type": "integer", "format": "int64", "minimum": 0, "description": "絞込に指定された部門ID。リクエストで指定した場合にのみ含まれる。0 の場合は「部門が未選択の取引を対象」を意味する。", "example": 1 }, "adjustment": { "type": "string", "description": "決算整理仕訳の絞り込み条件。リクエストで指定した場合にのみ含まれる。\n* `only` - 決算整理仕訳のみを集計\n* `without` - 決算整理仕訳を除外して集計\n", "example": "only", "enum": [ "only", "without" ] }, "cost_allocation": { "type": "string", "description": "配賦仕訳の絞り込み条件。リクエストで指定した場合にのみ含まれる。\n* `only` - 配賦仕訳のみを集計\n* `without` - 配賦仕訳を除外して集計\n", "example": "only", "enum": [ "only", "without" ] }, "approval_flow_status": { "type": "string", "description": "承認ステータスの絞り込み条件。リクエストで指定した場合にのみ含まれる。\n* `without_in_progress` - 未承認を除く(デフォルト)\n* `all` - 全ての承認ステータスを含む\n", "example": "without_in_progress", "enum": [ "without_in_progress", "all" ] }, "created_at": { "type": "string", "description": "レスポンスを生成した日時(ISO 8601, JST)", "example": "2019-12-17T13:47:24+09:00" }, "balances": { "type": "array", "description": "残高一覧。当年度期末残高と前年度期末残高、および前年比を返す。`hierarchy_level` の階層構造で並ぶ。行は次の 3 種類が混在する。\n* 勘定科目行: `account_item_id` あり(例: [製]期首材料棚卸高、[製]給料手当)\n* 決算書表示名行: `account_item_id` なし・`account_group_name` あり(`account_item_display_type=group` 指定時のみ現れる)\n* 勘定科目カテゴリー行: `account_item_id` も `account_group_name` も無く、`account_category_name` あり(カテゴリー合計行は `total_line=true`)\n", "items": { "type": "object", "properties": { "account_item_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "勘定科目ID。勘定科目行の場合のみ含まれる(勘定科目カテゴリー行では含まれない)。", "example": 192 }, "account_item_name": { "type": "string", "description": "勘定科目名。勘定科目行の場合のみ含まれる。", "example": "[製]期首材料棚卸高" }, "account_group_name": { "type": "string", "description": "決算書表示名。`account_item_display_type=group` を指定した場合にのみ、決算書表示行に含まれる。", "example": "期首材料棚卸高" }, "partners": { "type": "array", "description": "取引先ごとの内訳。`breakdown_display_type=partner` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "取引先ID。0 は取引先が未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 22 }, "name": { "type": "string", "description": "取引先名(未選択の合計行では「未選択」が入る)", "example": "freee" }, "last_year_closing_balance": { "type": "integer", "format": "int64", "description": "前年度期末残高(円)", "example": 0 }, "closing_balance": { "type": "integer", "format": "int64", "description": "当年度期末残高(円)", "example": 2592 }, "year_on_year": { "type": "number", "description": "前年比(百分率、%。100 は前年と同額、200 は前年比 2 倍、50 は前年比 0.5 倍を意味する。前年度期末残高が 0 以下、または当年度期末残高が負数の場合は 0 が返る)", "example": 200 } } } }, "items": { "type": "array", "description": "品目ごとの内訳。`breakdown_display_type=item` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "品目ID。0 は品目が未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 1 }, "name": { "type": "string", "description": "品目名(未選択の合計行では「未選択」が入る)", "example": "源泉所得税" }, "last_year_closing_balance": { "type": "integer", "format": "int64", "description": "前年度期末残高(円)", "example": 0 }, "closing_balance": { "type": "integer", "format": "int64", "description": "当年度期末残高(円)", "example": 2592 }, "year_on_year": { "type": "number", "description": "前年比(百分率、%。100 は前年と同額、200 は前年比 2 倍、50 は前年比 0.5 倍を意味する。前年度期末残高が 0 以下、または当年度期末残高が負数の場合は 0 が返る)", "example": 200 } } } }, "sections": { "type": "array", "description": "部門ごとの内訳。`breakdown_display_type=section` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "部門ID。0 は部門が未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 1 }, "name": { "type": "string", "description": "部門名(未選択の合計行では「未選択」が入る)", "example": "開発部門" }, "last_year_closing_balance": { "type": "integer", "format": "int64", "description": "前年度期末残高(円)", "example": 0 }, "closing_balance": { "type": "integer", "format": "int64", "description": "当年度期末残高(円)", "example": 2592 }, "year_on_year": { "type": "number", "description": "前年比(百分率、%。100 は前年と同額、200 は前年比 2 倍、50 は前年比 0.5 倍を意味する。前年度期末残高が 0 以下、または当年度期末残高が負数の場合は 0 が返る)", "example": 200 } } } }, "segment_1_tags": { "type": "array", "description": "セグメント1タグごとの内訳。`breakdown_display_type=segment_1_tag` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "セグメント1タグID。0 はセグメント1タグが未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 1 }, "name": { "type": "string", "description": "セグメント1タグ名(未選択の合計行では「未選択」が入る)", "example": "プロジェクトA" }, "last_year_closing_balance": { "type": "integer", "format": "int64", "description": "前年度期末残高(円)", "example": 0 }, "closing_balance": { "type": "integer", "format": "int64", "description": "当年度期末残高(円)", "example": 2592 }, "year_on_year": { "type": "number", "description": "前年比(百分率、%。100 は前年と同額、200 は前年比 2 倍、50 は前年比 0.5 倍を意味する。前年度期末残高が 0 以下、または当年度期末残高が負数の場合は 0 が返る)", "example": 200 } } } }, "segment_2_tags": { "type": "array", "description": "セグメント2タグごとの内訳。`breakdown_display_type=segment_2_tag` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "セグメント2タグID。0 はセグメント2タグが未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 1 }, "name": { "type": "string", "description": "セグメント2タグ名(未選択の合計行では「未選択」が入る)", "example": "プロジェクトA" }, "last_year_closing_balance": { "type": "integer", "format": "int64", "description": "前年度期末残高(円)", "example": 0 }, "closing_balance": { "type": "integer", "format": "int64", "description": "当年度期末残高(円)", "example": 2592 }, "year_on_year": { "type": "number", "description": "前年比(百分率、%。100 は前年と同額、200 は前年比 2 倍、50 は前年比 0.5 倍を意味する。前年度期末残高が 0 以下、または当年度期末残高が負数の場合は 0 が返る)", "example": 200 } } } }, "segment_3_tags": { "type": "array", "description": "セグメント3タグごとの内訳。`breakdown_display_type=segment_3_tag` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "セグメント3タグID。0 はセグメント3タグが未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 1 }, "name": { "type": "string", "description": "セグメント3タグ名(未選択の合計行では「未選択」が入る)", "example": "プロジェクトA" }, "last_year_closing_balance": { "type": "integer", "format": "int64", "description": "前年度期末残高(円)", "example": 0 }, "closing_balance": { "type": "integer", "format": "int64", "description": "当年度期末残高(円)", "example": 2592 }, "year_on_year": { "type": "number", "description": "前年比(百分率、%。100 は前年と同額、200 は前年比 2 倍、50 は前年比 0.5 倍を意味する。前年度期末残高が 0 以下、または当年度期末残高が負数の場合は 0 が返る)", "example": 200 } } } }, "account_category_name": { "type": "string", "description": "勘定科目カテゴリー名(例: 材料費、労務費、総製造費用 など)", "example": "材料費" }, "total_line": { "type": "boolean", "description": "合計行かどうか。勘定科目カテゴリーの合計行(当該カテゴリーの小計を表す行)の場合のみ含まれ、`true` となる。", "example": true }, "hierarchy_level": { "type": "integer", "format": "int64", "description": "階層レベル(1が最上位。値が大きいほど深い階層)", "example": 3 }, "parent_account_category_name": { "type": "string", "description": "上位勘定科目カテゴリー名。勘定科目カテゴリー行かつ上位階層が存在する場合のみ含まれる。", "example": "材料費" }, "last_year_closing_balance": { "type": "integer", "format": "int64", "description": "前年度期末残高(円)", "example": 0 }, "closing_balance": { "type": "integer", "format": "int64", "description": "当年度期末残高(円)", "example": 2592 }, "year_on_year": { "type": "number", "description": "前年比(百分率、%。100 は前年と同額、200 は前年比 2 倍、50 は前年比 0.5 倍を意味する。前年度期末残高が 0 以下、または当年度期末残高が負数の場合は 0 が返る)", "example": 200 } } } } } }, "up_to_date": { "type": "boolean", "description": "集計結果が最新かどうか。`false` の場合は残高の集計が完了していないため、時間を置いてから再取得してください。", "example": true }, "up_to_date_reasons": { "type": "array", "description": "集計が最新でない場合の要因情報。`up_to_date=false` のときのみ要因が含まれ、`up_to_date=true` のときは空配列となる。", "items": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "string", "description": "要因コード。現時点で返り得る値は以下。\n* `depreciation_creating` - 当期の固定資産の償却を作成中\n* `depreciation_create_error` - 当期の固定資産の償却作成でエラーが発生\n", "example": "depreciation_creating", "enum": [ "depreciation_creating", "depreciation_create_error" ] }, "message": { "type": "string", "description": "集計が最新でない理由", "example": "当期の固定資産の償却作成が完了していないため、正しい集計結果でない可能性があります。しばらく時間をおいてからもう一度お試しください。" } } } } } }, "trialCrThreeYearsResponse": { "type": "object", "required": [ "trial_cr_three_years", "up_to_date" ], "properties": { "trial_cr_three_years": { "type": "object", "required": [ "balances", "company_id" ], "properties": { "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID", "example": 1 }, "fiscal_year": { "type": "integer", "format": "int64", "description": "会計年度(会計期間の開始日が属する年。例: 会計期間が 2019-04-01 開始なら 2019)。リクエストで指定した場合、または月・日の絞り込み条件が指定されていない場合にのみ含まれる。", "example": 2019 }, "start_month": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 12, "description": "発生月で絞込:開始会計月(1-12)。リクエストで指定した場合にのみ含まれる。", "example": 1 }, "end_month": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 12, "description": "発生月で絞込:終了会計月(1-12)。リクエストで指定した場合にのみ含まれる。", "example": 12 }, "start_date": { "type": "string", "description": "発生日で絞込:開始日(yyyy-mm-dd)。リクエストで指定した場合にのみ含まれる。", "example": "2019-01-01" }, "end_date": { "type": "string", "description": "発生日で絞込:終了日(yyyy-mm-dd)。リクエストで指定した場合にのみ含まれる。", "example": "2019-12-31" }, "account_item_display_type": { "type": "string", "description": "勘定科目の表示。リクエストで指定した場合にのみ含まれる。\n* `account_item` - 勘定科目単位で表示(デフォルト)\n* `group` - 決算書表示単位で表示\n", "enum": [ "account_item", "group" ], "example": "account_item" }, "breakdown_display_type": { "type": "string", "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", "enum": [ "partner", "item", "section", "account_item", "segment_1_tag", "segment_2_tag", "segment_3_tag" ], "example": "partner" }, "partner_id": { "type": "integer", "format": "int64", "minimum": 0, "description": "絞込に指定された取引先ID。リクエストで指定した場合にのみ含まれる。0 の場合は「取引先が未選択の取引を対象」を意味する(リクエスト側の 0 指定と同じ)。", "example": 1 }, "partner_code": { "type": "string", "description": "絞込に指定された取引先コード。リクエストで指定した場合にのみ含まれる。", "example": "code001" }, "item_id": { "type": "integer", "format": "int64", "minimum": 0, "description": "絞込に指定された品目ID。リクエストで指定した場合にのみ含まれる。0 の場合は「品目が未選択の取引を対象」を意味する。", "example": 1 }, "section_id": { "type": "integer", "format": "int64", "minimum": 0, "description": "絞込に指定された部門ID。リクエストで指定した場合にのみ含まれる。0 の場合は「部門が未選択の取引を対象」を意味する。", "example": 1 }, "adjustment": { "type": "string", "description": "決算整理仕訳の絞り込み条件。リクエストで指定した場合にのみ含まれる。\n* `only` - 決算整理仕訳のみを集計\n* `without` - 決算整理仕訳を除外して集計\n", "example": "only", "enum": [ "only", "without" ] }, "cost_allocation": { "type": "string", "description": "配賦仕訳の絞り込み条件。リクエストで指定した場合にのみ含まれる。\n* `only` - 配賦仕訳のみを集計\n* `without` - 配賦仕訳を除外して集計\n", "example": "only", "enum": [ "only", "without" ] }, "approval_flow_status": { "type": "string", "description": "承認ステータスの絞り込み条件。リクエストで指定した場合にのみ含まれる。\n* `without_in_progress` - 未承認を除く(デフォルト)\n* `all` - 全ての承認ステータスを含む\n", "example": "without_in_progress", "enum": [ "without_in_progress", "all" ] }, "created_at": { "type": "string", "description": "レスポンスを生成した日時(ISO 8601, JST)", "example": "2019-12-17T13:47:24+09:00" }, "balances": { "type": "array", "description": "残高一覧。当年度・前年度・前々年度の期末残高と前年比を返す。`hierarchy_level` の階層構造で並ぶ。行は次の 3 種類が混在する。\n* 勘定科目行: `account_item_id` あり(例: [製]期首材料棚卸高、[製]給料手当)\n* 決算書表示名行: `account_item_id` なし・`account_group_name` あり(`account_item_display_type=group` 指定時のみ現れる)\n* 勘定科目カテゴリー行: `account_item_id` も `account_group_name` も無く、`account_category_name` あり(カテゴリー合計行は `total_line=true`)\n", "items": { "type": "object", "properties": { "account_item_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "勘定科目ID。勘定科目行の場合のみ含まれる(勘定科目カテゴリー行では含まれない)。", "example": 192 }, "account_item_name": { "type": "string", "description": "勘定科目名。勘定科目行の場合のみ含まれる。", "example": "[製]期首材料棚卸高" }, "account_group_name": { "type": "string", "description": "決算書表示名。`account_item_display_type=group` を指定した場合にのみ、決算書表示行に含まれる。", "example": "期首材料棚卸高" }, "partners": { "type": "array", "description": "取引先ごとの内訳。`breakdown_display_type=partner` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "取引先ID。0 は取引先が未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 22 }, "name": { "type": "string", "description": "取引先名(未選択の合計行では「未選択」が入る)", "example": "freee" }, "two_years_before_closing_balance": { "type": "integer", "format": "int64", "description": "前々年度期末残高(円)", "example": 0 }, "last_year_closing_balance": { "type": "integer", "format": "int64", "description": "前年度期末残高(円)", "example": 0 }, "closing_balance": { "type": "integer", "format": "int64", "description": "当年度期末残高(円)", "example": 2592 }, "year_on_year": { "type": "number", "description": "前年比(百分率、%。100 は前年と同額、200 は前年比 2 倍、50 は前年比 0.5 倍を意味する。前年度期末残高が 0 以下、または当年度期末残高が負数の場合は 0 が返る)", "example": 200 } } } }, "items": { "type": "array", "description": "品目ごとの内訳。`breakdown_display_type=item` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "品目ID。0 は品目が未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 1 }, "name": { "type": "string", "description": "品目名(未選択の合計行では「未選択」が入る)", "example": "源泉所得税" }, "two_years_before_closing_balance": { "type": "integer", "format": "int64", "description": "前々年度期末残高(円)", "example": 0 }, "last_year_closing_balance": { "type": "integer", "format": "int64", "description": "前年度期末残高(円)", "example": 0 }, "closing_balance": { "type": "integer", "format": "int64", "description": "当年度期末残高(円)", "example": 2592 }, "year_on_year": { "type": "number", "description": "前年比(百分率、%。100 は前年と同額、200 は前年比 2 倍、50 は前年比 0.5 倍を意味する。前年度期末残高が 0 以下、または当年度期末残高が負数の場合は 0 が返る)", "example": 200 } } } }, "sections": { "type": "array", "description": "部門ごとの内訳。`breakdown_display_type=section` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "部門ID。0 は部門が未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 1 }, "name": { "type": "string", "description": "部門名(未選択の合計行では「未選択」が入る)", "example": "開発部門" }, "two_years_before_closing_balance": { "type": "integer", "format": "int64", "description": "前々年度期末残高(円)", "example": 0 }, "last_year_closing_balance": { "type": "integer", "format": "int64", "description": "前年度期末残高(円)", "example": 0 }, "closing_balance": { "type": "integer", "format": "int64", "description": "当年度期末残高(円)", "example": 2592 }, "year_on_year": { "type": "number", "description": "前年比(百分率、%。100 は前年と同額、200 は前年比 2 倍、50 は前年比 0.5 倍を意味する。前年度期末残高が 0 以下、または当年度期末残高が負数の場合は 0 が返る)", "example": 200 } } } }, "segment_1_tags": { "type": "array", "description": "セグメント1タグごとの内訳。`breakdown_display_type=segment_1_tag` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "セグメント1タグID。0 はセグメント1タグが未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 1 }, "name": { "type": "string", "description": "セグメント1タグ名(未選択の合計行では「未選択」が入る)", "example": "プロジェクトA" }, "two_years_before_closing_balance": { "type": "integer", "format": "int64", "description": "前々年度期末残高(円)", "example": 0 }, "last_year_closing_balance": { "type": "integer", "format": "int64", "description": "前年度期末残高(円)", "example": 0 }, "closing_balance": { "type": "integer", "format": "int64", "description": "当年度期末残高(円)", "example": 2592 }, "year_on_year": { "type": "number", "description": "前年比(百分率、%。100 は前年と同額、200 は前年比 2 倍、50 は前年比 0.5 倍を意味する。前年度期末残高が 0 以下、または当年度期末残高が負数の場合は 0 が返る)", "example": 200 } } } }, "segment_2_tags": { "type": "array", "description": "セグメント2タグごとの内訳。`breakdown_display_type=segment_2_tag` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "セグメント2タグID。0 はセグメント2タグが未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 1 }, "name": { "type": "string", "description": "セグメント2タグ名(未選択の合計行では「未選択」が入る)", "example": "プロジェクトA" }, "two_years_before_closing_balance": { "type": "integer", "format": "int64", "description": "前々年度期末残高(円)", "example": 0 }, "last_year_closing_balance": { "type": "integer", "format": "int64", "description": "前年度期末残高(円)", "example": 0 }, "closing_balance": { "type": "integer", "format": "int64", "description": "当年度期末残高(円)", "example": 2592 }, "year_on_year": { "type": "number", "description": "前年比(百分率、%。100 は前年と同額、200 は前年比 2 倍、50 は前年比 0.5 倍を意味する。前年度期末残高が 0 以下、または当年度期末残高が負数の場合は 0 が返る)", "example": 200 } } } }, "segment_3_tags": { "type": "array", "description": "セグメント3タグごとの内訳。`breakdown_display_type=segment_3_tag` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "セグメント3タグID。0 はセグメント3タグが未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 1 }, "name": { "type": "string", "description": "セグメント3タグ名(未選択の合計行では「未選択」が入る)", "example": "プロジェクトA" }, "two_years_before_closing_balance": { "type": "integer", "format": "int64", "description": "前々年度期末残高(円)", "example": 0 }, "last_year_closing_balance": { "type": "integer", "format": "int64", "description": "前年度期末残高(円)", "example": 0 }, "closing_balance": { "type": "integer", "format": "int64", "description": "当年度期末残高(円)", "example": 2592 }, "year_on_year": { "type": "number", "description": "前年比(百分率、%。100 は前年と同額、200 は前年比 2 倍、50 は前年比 0.5 倍を意味する。前年度期末残高が 0 以下、または当年度期末残高が負数の場合は 0 が返る)", "example": 200 } } } }, "account_category_name": { "type": "string", "description": "勘定科目カテゴリー名(例: 材料費、労務費、総製造費用 など)", "example": "材料費" }, "total_line": { "type": "boolean", "description": "合計行かどうか。勘定科目カテゴリーの合計行(当該カテゴリーの小計を表す行)の場合のみ含まれ、`true` となる。", "example": true }, "hierarchy_level": { "type": "integer", "format": "int64", "description": "階層レベル(1が最上位。値が大きいほど深い階層)", "example": 3 }, "parent_account_category_name": { "type": "string", "description": "上位勘定科目カテゴリー名。勘定科目カテゴリー行かつ上位階層が存在する場合のみ含まれる。", "example": "材料費" }, "two_years_before_closing_balance": { "type": "integer", "format": "int64", "description": "前々年度期末残高(円)", "example": 0 }, "last_year_closing_balance": { "type": "integer", "format": "int64", "description": "前年度期末残高(円)", "example": 0 }, "closing_balance": { "type": "integer", "format": "int64", "description": "当年度期末残高(円)", "example": 2592 }, "year_on_year": { "type": "number", "description": "前年比(百分率、%。100 は前年と同額、200 は前年比 2 倍、50 は前年比 0.5 倍を意味する。前年度期末残高が 0 以下、または当年度期末残高が負数の場合は 0 が返る)", "example": 200 } } } } } }, "up_to_date": { "type": "boolean", "description": "集計結果が最新かどうか。`false` の場合は残高の集計が完了していないため、時間を置いてから再取得してください。", "example": true }, "up_to_date_reasons": { "type": "array", "description": "集計が最新でない場合の要因情報。`up_to_date=false` のときのみ要因が含まれ、`up_to_date=true` のときは空配列となる。", "items": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "string", "description": "要因コード。現時点で返り得る値は以下。\n* `depreciation_creating` - 当期の固定資産の償却を作成中\n* `depreciation_create_error` - 当期の固定資産の償却作成でエラーが発生\n", "example": "depreciation_creating", "enum": [ "depreciation_creating", "depreciation_create_error" ] }, "message": { "type": "string", "description": "集計が最新でない理由", "example": "当期の固定資産の償却作成が完了していないため、正しい集計結果でない可能性があります。しばらく時間をおいてからもう一度お試しください。" } } } } } }, "trialCrSectionsResponse": { "type": "object", "required": [ "trial_cr_sections", "up_to_date" ], "properties": { "trial_cr_sections": { "type": "object", "required": [ "balances", "company_id", "section_ids" ], "properties": { "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID", "example": 1 }, "section_ids": { "type": "string", "description": "比較対象に指定された部門IDの一覧(リクエストで指定したカンマ区切りの文字列がそのまま返る。0 は「部門が未選択の取引」を意味する)", "example": 123 }, "fiscal_year": { "type": "integer", "format": "int64", "description": "会計年度(会計期間の開始日が属する年。例: 会計期間が 2019-04-01 開始なら 2019)。リクエストで指定した場合、または月・日の絞り込み条件が指定されていない場合にのみ含まれる。", "example": 2019 }, "start_month": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 12, "description": "発生月で絞込:開始会計月(1-12)。リクエストで指定した場合にのみ含まれる。", "example": 1 }, "end_month": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 12, "description": "発生月で絞込:終了会計月(1-12)。リクエストで指定した場合にのみ含まれる。", "example": 12 }, "start_date": { "type": "string", "description": "発生日で絞込:開始日(yyyy-mm-dd)。リクエストで指定した場合にのみ含まれる。", "example": "2019-01-01" }, "end_date": { "type": "string", "description": "発生日で絞込:終了日(yyyy-mm-dd)。リクエストで指定した場合にのみ含まれる。", "example": "2019-12-31" }, "account_item_display_type": { "type": "string", "description": "勘定科目の表示。リクエストで指定した場合にのみ含まれる。\n* `account_item` - 勘定科目単位で表示(デフォルト)\n* `group` - 決算書表示単位で表示\n", "enum": [ "account_item", "group" ], "example": "account_item" }, "breakdown_display_type": { "type": "string", "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", "enum": [ "partner", "item", "account_item", "segment_1_tag", "segment_2_tag", "segment_3_tag" ], "example": "partner" }, "partner_id": { "type": "integer", "format": "int64", "minimum": 0, "description": "絞込に指定された取引先ID。リクエストで指定した場合にのみ含まれる。0 の場合は「取引先が未選択の取引を対象」を意味する(リクエスト側の 0 指定と同じ)。", "example": 1 }, "partner_code": { "type": "string", "description": "絞込に指定された取引先コード。リクエストで指定した場合にのみ含まれる。", "example": "code001" }, "item_id": { "type": "integer", "format": "int64", "minimum": 0, "description": "絞込に指定された品目ID。リクエストで指定した場合にのみ含まれる。0 の場合は「品目が未選択の取引を対象」を意味する。", "example": 1 }, "adjustment": { "type": "string", "description": "決算整理仕訳の絞り込み条件。リクエストで指定した場合にのみ含まれる。\n* `only` - 決算整理仕訳のみを集計\n* `without` - 決算整理仕訳を除外して集計\n", "example": "only", "enum": [ "only", "without" ] }, "cost_allocation": { "type": "string", "description": "配賦仕訳の絞り込み条件。リクエストで指定した場合にのみ含まれる。\n* `only` - 配賦仕訳のみを集計\n* `without` - 配賦仕訳を除外して集計\n", "example": "only", "enum": [ "only", "without" ] }, "approval_flow_status": { "type": "string", "description": "承認ステータスの絞り込み条件。リクエストで指定した場合にのみ含まれる。\n* `without_in_progress` - 未承認を除く(デフォルト)\n* `all` - 全ての承認ステータスを含む\n", "example": "without_in_progress", "enum": [ "without_in_progress", "all" ] }, "created_at": { "type": "string", "description": "レスポンスを生成した日時(ISO 8601, JST)", "example": "2019-12-17T13:47:24+09:00" }, "balances": { "type": "array", "description": "残高一覧。指定した部門ごとの期末残高を `sections` に並べて比較する。`hierarchy_level` の階層構造で並ぶ。行は次の 3 種類が混在する。\n* 勘定科目行: `account_item_id` あり(例: [製]期首材料棚卸高、[製]給料手当)\n* 決算書表示名行: `account_item_id` なし・`account_group_name` あり(`account_item_display_type=group` 指定時のみ現れる)\n* 勘定科目カテゴリー行: `account_item_id` も `account_group_name` も無く、`account_category_name` あり(カテゴリー合計行は `total_line=true`)\n", "items": { "type": "object", "properties": { "account_item_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "勘定科目ID。勘定科目行の場合のみ含まれる(勘定科目カテゴリー行では含まれない)。", "example": 192 }, "account_item_name": { "type": "string", "description": "勘定科目名。勘定科目行の場合のみ含まれる。", "example": "[製]期首材料棚卸高" }, "account_group_name": { "type": "string", "description": "決算書表示名。`account_item_display_type=group` を指定した場合にのみ、決算書表示行に含まれる。", "example": "期首材料棚卸高" }, "sections": { "type": "array", "description": "比較対象に指定した部門ごとの期末残高。`breakdown_display_type` を指定した場合は、各部門要素の配下に内訳配列(`partners` / `items` / `segment_1_tags` / `segment_2_tags` / `segment_3_tags`)が含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "部門ID。0 は部門が未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 1 }, "name": { "type": "string", "description": "部門名(未選択の合計行では「未選択」が入る)", "example": "開発部門" }, "closing_balance": { "type": "integer", "format": "int64", "description": "当該部門の期末残高(円)", "example": 2592 }, "partners": { "type": "array", "description": "取引先ごとの内訳。`breakdown_display_type=partner` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "取引先ID。0 は取引先が未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 22 }, "name": { "type": "string", "description": "取引先名(未選択の合計行では「未選択」が入る)", "example": "freee" }, "closing_balance": { "type": "integer", "format": "int64", "description": "当該部門・取引先の期末残高(円)", "example": 2592 } } } }, "items": { "type": "array", "description": "品目ごとの内訳。`breakdown_display_type=item` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "品目ID。0 は品目が未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 1 }, "name": { "type": "string", "description": "品目名(未選択の合計行では「未選択」が入る)", "example": "源泉所得税" }, "closing_balance": { "type": "integer", "format": "int64", "description": "当該部門・品目の期末残高(円)", "example": 2592 } } } }, "segment_1_tags": { "type": "array", "description": "セグメント1タグごとの内訳。`breakdown_display_type=segment_1_tag` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "セグメント1タグID。0 はセグメント1タグが未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 1 }, "name": { "type": "string", "description": "セグメント1タグ名(未選択の合計行では「未選択」が入る)", "example": "プロジェクトA" }, "closing_balance": { "type": "integer", "format": "int64", "description": "当該部門・セグメント1タグの期末残高(円)", "example": 2592 } } } }, "segment_2_tags": { "type": "array", "description": "セグメント2タグごとの内訳。`breakdown_display_type=segment_2_tag` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "セグメント2タグID。0 はセグメント2タグが未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 1 }, "name": { "type": "string", "description": "セグメント2タグ名(未選択の合計行では「未選択」が入る)", "example": "プロジェクトA" }, "closing_balance": { "type": "integer", "format": "int64", "description": "当該部門・セグメント2タグの期末残高(円)", "example": 2592 } } } }, "segment_3_tags": { "type": "array", "description": "セグメント3タグごとの内訳。`breakdown_display_type=segment_3_tag` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "セグメント3タグID。0 はセグメント3タグが未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 1 }, "name": { "type": "string", "description": "セグメント3タグ名(未選択の合計行では「未選択」が入る)", "example": "プロジェクトA" }, "closing_balance": { "type": "integer", "format": "int64", "description": "当該部門・セグメント3タグの期末残高(円)", "example": 2592 } } } } } } }, "account_category_name": { "type": "string", "description": "勘定科目カテゴリー名(例: 材料費、労務費、総製造費用 など)", "example": "材料費" }, "total_line": { "type": "boolean", "description": "合計行かどうか。勘定科目カテゴリーの合計行(当該カテゴリーの小計を表す行)の場合のみ含まれ、`true` となる。", "example": true }, "hierarchy_level": { "type": "integer", "format": "int64", "description": "階層レベル(1が最上位。値が大きいほど深い階層)", "example": 3 }, "parent_account_category_name": { "type": "string", "description": "上位勘定科目カテゴリー名。勘定科目カテゴリー行かつ上位階層が存在する場合のみ含まれる。", "example": "材料費" }, "closing_balance": { "type": "integer", "format": "int64", "description": "期末残高(円)。比較対象に指定した部門の合計値。", "example": 2592 } } } } } }, "up_to_date": { "type": "boolean", "description": "集計結果が最新かどうか。`false` の場合は残高の集計が完了していないため、時間を置いてから再取得してください。", "example": true }, "up_to_date_reasons": { "type": "array", "description": "集計が最新でない場合の要因情報。`up_to_date=false` のときのみ要因が含まれ、`up_to_date=true` のときは空配列となる。", "items": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "string", "description": "要因コード。現時点で返り得る値は以下。\n* `depreciation_creating` - 当期の固定資産の償却を作成中\n* `depreciation_create_error` - 当期の固定資産の償却作成でエラーが発生\n", "example": "depreciation_creating", "enum": [ "depreciation_creating", "depreciation_create_error" ] }, "message": { "type": "string", "description": "集計が最新でない理由", "example": "当期の固定資産の償却作成が完了していないため、正しい集計結果でない可能性があります。しばらく時間をおいてからもう一度お試しください。" } } } } } }, "trialCrSegment_1TagsResponse": { "type": "object", "required": [ "trial_cr_segment_1_tags", "up_to_date" ], "properties": { "trial_cr_segment_1_tags": { "type": "object", "required": [ "balances", "company_id", "segment_1_tag_ids" ], "properties": { "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID", "example": 1 }, "segment_1_tag_ids": { "type": "string", "description": "比較対象に指定されたセグメント1タグIDの一覧(リクエストで指定したカンマ区切りの文字列がそのまま返る。0 は「セグメント1タグが未選択の取引」を意味する)", "example": 123 }, "fiscal_year": { "type": "integer", "format": "int64", "description": "会計年度(会計期間の開始日が属する年。例: 会計期間が 2019-04-01 開始なら 2019)。リクエストで指定した場合、または月・日の絞り込み条件が指定されていない場合にのみ含まれる。", "example": 2019 }, "start_month": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 12, "description": "発生月で絞込:開始会計月(1-12)。リクエストで指定した場合にのみ含まれる。", "example": 1 }, "end_month": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 12, "description": "発生月で絞込:終了会計月(1-12)。リクエストで指定した場合にのみ含まれる。", "example": 12 }, "start_date": { "type": "string", "description": "発生日で絞込:開始日(yyyy-mm-dd)。リクエストで指定した場合にのみ含まれる。", "example": "2019-01-01" }, "end_date": { "type": "string", "description": "発生日で絞込:終了日(yyyy-mm-dd)。リクエストで指定した場合にのみ含まれる。", "example": "2019-12-31" }, "account_item_display_type": { "type": "string", "description": "勘定科目の表示。リクエストで指定した場合にのみ含まれる。\n* `account_item` - 勘定科目単位で表示(デフォルト)\n* `group` - 決算書表示単位で表示\n", "enum": [ "account_item", "group" ], "example": "account_item" }, "breakdown_display_type": { "type": "string", "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", "enum": [ "partner", "item", "section", "account_item" ], "example": "partner" }, "partner_id": { "type": "integer", "format": "int64", "minimum": 0, "description": "絞込に指定された取引先ID。リクエストで指定した場合にのみ含まれる。0 の場合は「取引先が未選択の取引を対象」を意味する(リクエスト側の 0 指定と同じ)。", "example": 1 }, "partner_code": { "type": "string", "description": "絞込に指定された取引先コード。リクエストで指定した場合にのみ含まれる。", "example": "code001" }, "item_id": { "type": "integer", "format": "int64", "minimum": 0, "description": "絞込に指定された品目ID。リクエストで指定した場合にのみ含まれる。0 の場合は「品目が未選択の取引を対象」を意味する。", "example": 1 }, "section_id": { "type": "integer", "format": "int64", "minimum": 0, "description": "絞込に指定された部門ID。リクエストで指定した場合にのみ含まれる。0 の場合は「部門が未選択の取引を対象」を意味する。", "example": 1 }, "adjustment": { "type": "string", "description": "決算整理仕訳の絞り込み条件。リクエストで指定した場合にのみ含まれる。\n* `only` - 決算整理仕訳のみを集計\n* `without` - 決算整理仕訳を除外して集計\n", "example": "only", "enum": [ "only", "without" ] }, "cost_allocation": { "type": "string", "description": "配賦仕訳の絞り込み条件。リクエストで指定した場合にのみ含まれる。\n* `only` - 配賦仕訳のみを集計\n* `without` - 配賦仕訳を除外して集計\n", "example": "only", "enum": [ "only", "without" ] }, "approval_flow_status": { "type": "string", "description": "承認ステータスの絞り込み条件。リクエストで指定した場合にのみ含まれる。\n* `without_in_progress` - 未承認を除く(デフォルト)\n* `all` - 全ての承認ステータスを含む\n", "example": "without_in_progress", "enum": [ "without_in_progress", "all" ] }, "created_at": { "type": "string", "description": "レスポンスを生成した日時(ISO 8601, JST)", "example": "2019-12-17T13:47:24+09:00" }, "balances": { "type": "array", "description": "残高一覧。指定したセグメント1タグごとの期末残高を `segment_1_tags` に並べて比較する。`hierarchy_level` の階層構造で並ぶ。行は次の 3 種類が混在する。\n* 勘定科目行: `account_item_id` あり(例: [製]期首材料棚卸高、[製]給料手当)\n* 決算書表示名行: `account_item_id` なし・`account_group_name` あり(`account_item_display_type=group` 指定時のみ現れる)\n* 勘定科目カテゴリー行: `account_item_id` も `account_group_name` も無く、`account_category_name` あり(カテゴリー合計行は `total_line=true`)\n", "items": { "type": "object", "properties": { "account_item_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "勘定科目ID。勘定科目行の場合のみ含まれる(勘定科目カテゴリー行では含まれない)。", "example": 192 }, "account_item_name": { "type": "string", "description": "勘定科目名。勘定科目行の場合のみ含まれる。", "example": "[製]期首材料棚卸高" }, "account_group_name": { "type": "string", "description": "決算書表示名。`account_item_display_type=group` を指定した場合にのみ、決算書表示行に含まれる。", "example": "期首材料棚卸高" }, "segment_1_tags": { "type": "array", "description": "比較対象に指定したセグメント1タグごとの期末残高。`breakdown_display_type` を指定した場合は、各セグメント1タグ要素の配下に内訳配列(`partners` / `items` / `sections`)が含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "セグメント1タグID。0 はセグメント1タグが未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 1 }, "name": { "type": "string", "description": "セグメント1タグ名(未選択の合計行では「未選択」が入る)", "example": "プロジェクトA" }, "closing_balance": { "type": "integer", "format": "int64", "description": "当該セグメント1タグの期末残高(円)", "example": 2592 }, "partners": { "type": "array", "description": "取引先ごとの内訳。`breakdown_display_type=partner` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "取引先ID。0 は取引先が未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 22 }, "name": { "type": "string", "description": "取引先名(未選択の合計行では「未選択」が入る)", "example": "freee" }, "closing_balance": { "type": "integer", "format": "int64", "description": "当該セグメント1タグ・取引先の期末残高(円)", "example": 2592 } } } }, "items": { "type": "array", "description": "品目ごとの内訳。`breakdown_display_type=item` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "品目ID。0 は品目が未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 1 }, "name": { "type": "string", "description": "品目名(未選択の合計行では「未選択」が入る)", "example": "源泉所得税" }, "closing_balance": { "type": "integer", "format": "int64", "description": "当該セグメント1タグ・品目の期末残高(円)", "example": 2592 } } } }, "sections": { "type": "array", "description": "部門ごとの内訳。`breakdown_display_type=section` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "部門ID。0 は部門が未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 1 }, "name": { "type": "string", "description": "部門名(未選択の合計行では「未選択」が入る)", "example": "開発部門" }, "closing_balance": { "type": "integer", "format": "int64", "description": "当該セグメント1タグ・部門の期末残高(円)", "example": 2592 } } } } } } }, "account_category_name": { "type": "string", "description": "勘定科目カテゴリー名(例: 材料費、労務費、総製造費用 など)", "example": "材料費" }, "total_line": { "type": "boolean", "description": "合計行かどうか。勘定科目カテゴリーの合計行(当該カテゴリーの小計を表す行)の場合のみ含まれ、`true` となる。", "example": true }, "hierarchy_level": { "type": "integer", "format": "int64", "description": "階層レベル(1が最上位。値が大きいほど深い階層)", "example": 3 }, "parent_account_category_name": { "type": "string", "description": "上位勘定科目カテゴリー名。勘定科目カテゴリー行かつ上位階層が存在する場合のみ含まれる。", "example": "材料費" }, "closing_balance": { "type": "integer", "format": "int64", "description": "期末残高(円)。比較対象に指定したセグメント1タグの合計値。", "example": 2592 } } } } } }, "up_to_date": { "type": "boolean", "description": "集計結果が最新かどうか。`false` の場合は残高の集計が完了していないため、時間を置いてから再取得してください。", "example": true }, "up_to_date_reasons": { "type": "array", "description": "集計が最新でない場合の要因情報。`up_to_date=false` のときのみ要因が含まれ、`up_to_date=true` のときは空配列となる。", "items": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "string", "description": "要因コード。現時点で返り得る値は以下。\n* `depreciation_creating` - 当期の固定資産の償却を作成中\n* `depreciation_create_error` - 当期の固定資産の償却作成でエラーが発生\n", "example": "depreciation_creating", "enum": [ "depreciation_creating", "depreciation_create_error" ] }, "message": { "type": "string", "description": "集計が最新でない理由", "example": "当期の固定資産の償却作成が完了していないため、正しい集計結果でない可能性があります。しばらく時間をおいてからもう一度お試しください。" } } } } } }, "trialCrSegment_2TagsResponse": { "type": "object", "required": [ "trial_cr_segment_2_tags", "up_to_date" ], "properties": { "trial_cr_segment_2_tags": { "type": "object", "required": [ "balances", "company_id", "segment_2_tag_ids" ], "properties": { "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID", "example": 1 }, "segment_2_tag_ids": { "type": "string", "description": "比較対象に指定されたセグメント2タグIDの一覧(リクエストで指定したカンマ区切りの文字列がそのまま返る。0 は「セグメント2タグが未選択の取引」を意味する)", "example": 123 }, "fiscal_year": { "type": "integer", "format": "int64", "description": "会計年度(会計期間の開始日が属する年。例: 会計期間が 2019-04-01 開始なら 2019)。リクエストで指定した場合、または月・日の絞り込み条件が指定されていない場合にのみ含まれる。", "example": 2019 }, "start_month": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 12, "description": "発生月で絞込:開始会計月(1-12)。リクエストで指定した場合にのみ含まれる。", "example": 1 }, "end_month": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 12, "description": "発生月で絞込:終了会計月(1-12)。リクエストで指定した場合にのみ含まれる。", "example": 12 }, "start_date": { "type": "string", "description": "発生日で絞込:開始日(yyyy-mm-dd)。リクエストで指定した場合にのみ含まれる。", "example": "2019-01-01" }, "end_date": { "type": "string", "description": "発生日で絞込:終了日(yyyy-mm-dd)。リクエストで指定した場合にのみ含まれる。", "example": "2019-12-31" }, "account_item_display_type": { "type": "string", "description": "勘定科目の表示。リクエストで指定した場合にのみ含まれる。\n* `account_item` - 勘定科目単位で表示(デフォルト)\n* `group` - 決算書表示単位で表示\n", "enum": [ "account_item", "group" ], "example": "account_item" }, "breakdown_display_type": { "type": "string", "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", "enum": [ "partner", "item", "section", "account_item" ], "example": "partner" }, "partner_id": { "type": "integer", "format": "int64", "minimum": 0, "description": "絞込に指定された取引先ID。リクエストで指定した場合にのみ含まれる。0 の場合は「取引先が未選択の取引を対象」を意味する(リクエスト側の 0 指定と同じ)。", "example": 1 }, "partner_code": { "type": "string", "description": "絞込に指定された取引先コード。リクエストで指定した場合にのみ含まれる。", "example": "code001" }, "item_id": { "type": "integer", "format": "int64", "minimum": 0, "description": "絞込に指定された品目ID。リクエストで指定した場合にのみ含まれる。0 の場合は「品目が未選択の取引を対象」を意味する。", "example": 1 }, "section_id": { "type": "integer", "format": "int64", "minimum": 0, "description": "絞込に指定された部門ID。リクエストで指定した場合にのみ含まれる。0 の場合は「部門が未選択の取引を対象」を意味する。", "example": 1 }, "adjustment": { "type": "string", "description": "決算整理仕訳の絞り込み条件。リクエストで指定した場合にのみ含まれる。\n* `only` - 決算整理仕訳のみを集計\n* `without` - 決算整理仕訳を除外して集計\n", "example": "only", "enum": [ "only", "without" ] }, "cost_allocation": { "type": "string", "description": "配賦仕訳の絞り込み条件。リクエストで指定した場合にのみ含まれる。\n* `only` - 配賦仕訳のみを集計\n* `without` - 配賦仕訳を除外して集計\n", "example": "only", "enum": [ "only", "without" ] }, "approval_flow_status": { "type": "string", "description": "承認ステータスの絞り込み条件。リクエストで指定した場合にのみ含まれる。\n* `without_in_progress` - 未承認を除く(デフォルト)\n* `all` - 全ての承認ステータスを含む\n", "example": "without_in_progress", "enum": [ "without_in_progress", "all" ] }, "created_at": { "type": "string", "description": "レスポンスを生成した日時(ISO 8601, JST)", "example": "2019-12-17T13:47:24+09:00" }, "balances": { "type": "array", "description": "残高一覧。指定したセグメント2タグごとの期末残高を `segment_2_tags` に並べて比較する。`hierarchy_level` の階層構造で並ぶ。行は次の 3 種類が混在する。\n* 勘定科目行: `account_item_id` あり(例: [製]期首材料棚卸高、[製]給料手当)\n* 決算書表示名行: `account_item_id` なし・`account_group_name` あり(`account_item_display_type=group` 指定時のみ現れる)\n* 勘定科目カテゴリー行: `account_item_id` も `account_group_name` も無く、`account_category_name` あり(カテゴリー合計行は `total_line=true`)\n", "items": { "type": "object", "properties": { "account_item_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "勘定科目ID。勘定科目行の場合のみ含まれる(勘定科目カテゴリー行では含まれない)。", "example": 192 }, "account_item_name": { "type": "string", "description": "勘定科目名。勘定科目行の場合のみ含まれる。", "example": "[製]期首材料棚卸高" }, "account_group_name": { "type": "string", "description": "決算書表示名。`account_item_display_type=group` を指定した場合にのみ、決算書表示行に含まれる。", "example": "期首材料棚卸高" }, "segment_2_tags": { "type": "array", "description": "比較対象に指定したセグメント2タグごとの期末残高。`breakdown_display_type` を指定した場合は、各セグメント2タグ要素の配下に内訳配列(`partners` / `items` / `sections`)が含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "セグメント2タグID。0 はセグメント2タグが未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 1 }, "name": { "type": "string", "description": "セグメント2タグ名(未選択の合計行では「未選択」が入る)", "example": "プロジェクトA" }, "closing_balance": { "type": "integer", "format": "int64", "description": "当該セグメント2タグの期末残高(円)", "example": 2592 }, "partners": { "type": "array", "description": "取引先ごとの内訳。`breakdown_display_type=partner` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "取引先ID。0 は取引先が未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 22 }, "name": { "type": "string", "description": "取引先名(未選択の合計行では「未選択」が入る)", "example": "freee" }, "closing_balance": { "type": "integer", "format": "int64", "description": "当該セグメント2タグ・取引先の期末残高(円)", "example": 2592 } } } }, "items": { "type": "array", "description": "品目ごとの内訳。`breakdown_display_type=item` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "品目ID。0 は品目が未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 1 }, "name": { "type": "string", "description": "品目名(未選択の合計行では「未選択」が入る)", "example": "源泉所得税" }, "closing_balance": { "type": "integer", "format": "int64", "description": "当該セグメント2タグ・品目の期末残高(円)", "example": 2592 } } } }, "sections": { "type": "array", "description": "部門ごとの内訳。`breakdown_display_type=section` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "部門ID。0 は部門が未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 1 }, "name": { "type": "string", "description": "部門名(未選択の合計行では「未選択」が入る)", "example": "開発部門" }, "closing_balance": { "type": "integer", "format": "int64", "description": "当該セグメント2タグ・部門の期末残高(円)", "example": 2592 } } } } } } }, "account_category_name": { "type": "string", "description": "勘定科目カテゴリー名(例: 材料費、労務費、総製造費用 など)", "example": "材料費" }, "total_line": { "type": "boolean", "description": "合計行かどうか。勘定科目カテゴリーの合計行(当該カテゴリーの小計を表す行)の場合のみ含まれ、`true` となる。", "example": true }, "hierarchy_level": { "type": "integer", "format": "int64", "description": "階層レベル(1が最上位。値が大きいほど深い階層)", "example": 3 }, "parent_account_category_name": { "type": "string", "description": "上位勘定科目カテゴリー名。勘定科目カテゴリー行かつ上位階層が存在する場合のみ含まれる。", "example": "材料費" }, "closing_balance": { "type": "integer", "format": "int64", "description": "期末残高(円)。比較対象に指定したセグメント2タグの合計値。", "example": 2592 } } } } } }, "up_to_date": { "type": "boolean", "description": "集計結果が最新かどうか。`false` の場合は残高の集計が完了していないため、時間を置いてから再取得してください。", "example": true }, "up_to_date_reasons": { "type": "array", "description": "集計が最新でない場合の要因情報。`up_to_date=false` のときのみ要因が含まれ、`up_to_date=true` のときは空配列となる。", "items": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "string", "description": "要因コード。現時点で返り得る値は以下。\n* `depreciation_creating` - 当期の固定資産の償却を作成中\n* `depreciation_create_error` - 当期の固定資産の償却作成でエラーが発生\n", "example": "depreciation_creating", "enum": [ "depreciation_creating", "depreciation_create_error" ] }, "message": { "type": "string", "description": "集計が最新でない理由", "example": "当期の固定資産の償却作成が完了していないため、正しい集計結果でない可能性があります。しばらく時間をおいてからもう一度お試しください。" } } } } } }, "trialCrSegment_3TagsResponse": { "type": "object", "required": [ "trial_cr_segment_3_tags", "up_to_date" ], "properties": { "trial_cr_segment_3_tags": { "type": "object", "required": [ "balances", "company_id", "segment_3_tag_ids" ], "properties": { "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID", "example": 1 }, "segment_3_tag_ids": { "type": "string", "description": "比較対象に指定されたセグメント3タグIDの一覧(リクエストで指定したカンマ区切りの文字列がそのまま返る。0 は「セグメント3タグが未選択の取引」を意味する)", "example": 123 }, "fiscal_year": { "type": "integer", "format": "int64", "description": "会計年度(会計期間の開始日が属する年。例: 会計期間が 2019-04-01 開始なら 2019)。リクエストで指定した場合、または月・日の絞り込み条件が指定されていない場合にのみ含まれる。", "example": 2019 }, "start_month": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 12, "description": "発生月で絞込:開始会計月(1-12)。リクエストで指定した場合にのみ含まれる。", "example": 1 }, "end_month": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 12, "description": "発生月で絞込:終了会計月(1-12)。リクエストで指定した場合にのみ含まれる。", "example": 12 }, "start_date": { "type": "string", "description": "発生日で絞込:開始日(yyyy-mm-dd)。リクエストで指定した場合にのみ含まれる。", "example": "2019-01-01" }, "end_date": { "type": "string", "description": "発生日で絞込:終了日(yyyy-mm-dd)。リクエストで指定した場合にのみ含まれる。", "example": "2019-12-31" }, "account_item_display_type": { "type": "string", "description": "勘定科目の表示。リクエストで指定した場合にのみ含まれる。\n* `account_item` - 勘定科目単位で表示(デフォルト)\n* `group` - 決算書表示単位で表示\n", "enum": [ "account_item", "group" ], "example": "account_item" }, "breakdown_display_type": { "type": "string", "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", "enum": [ "partner", "item", "section", "account_item" ], "example": "partner" }, "partner_id": { "type": "integer", "format": "int64", "minimum": 0, "description": "絞込に指定された取引先ID。リクエストで指定した場合にのみ含まれる。0 の場合は「取引先が未選択の取引を対象」を意味する(リクエスト側の 0 指定と同じ)。", "example": 1 }, "partner_code": { "type": "string", "description": "絞込に指定された取引先コード。リクエストで指定した場合にのみ含まれる。", "example": "code001" }, "item_id": { "type": "integer", "format": "int64", "minimum": 0, "description": "絞込に指定された品目ID。リクエストで指定した場合にのみ含まれる。0 の場合は「品目が未選択の取引を対象」を意味する。", "example": 1 }, "section_id": { "type": "integer", "format": "int64", "minimum": 0, "description": "絞込に指定された部門ID。リクエストで指定した場合にのみ含まれる。0 の場合は「部門が未選択の取引を対象」を意味する。", "example": 1 }, "adjustment": { "type": "string", "description": "決算整理仕訳の絞り込み条件。リクエストで指定した場合にのみ含まれる。\n* `only` - 決算整理仕訳のみを集計\n* `without` - 決算整理仕訳を除外して集計\n", "example": "only", "enum": [ "only", "without" ] }, "cost_allocation": { "type": "string", "description": "配賦仕訳の絞り込み条件。リクエストで指定した場合にのみ含まれる。\n* `only` - 配賦仕訳のみを集計\n* `without` - 配賦仕訳を除外して集計\n", "example": "only", "enum": [ "only", "without" ] }, "approval_flow_status": { "type": "string", "description": "承認ステータスの絞り込み条件。リクエストで指定した場合にのみ含まれる。\n* `without_in_progress` - 未承認を除く(デフォルト)\n* `all` - 全ての承認ステータスを含む\n", "example": "without_in_progress", "enum": [ "without_in_progress", "all" ] }, "created_at": { "type": "string", "description": "レスポンスを生成した日時(ISO 8601, JST)", "example": "2019-12-17T13:47:24+09:00" }, "balances": { "type": "array", "description": "残高一覧。指定したセグメント3タグごとの期末残高を `segment_3_tags` に並べて比較する。`hierarchy_level` の階層構造で並ぶ。行は次の 3 種類が混在する。\n* 勘定科目行: `account_item_id` あり(例: [製]期首材料棚卸高、[製]給料手当)\n* 決算書表示名行: `account_item_id` なし・`account_group_name` あり(`account_item_display_type=group` 指定時のみ現れる)\n* 勘定科目カテゴリー行: `account_item_id` も `account_group_name` も無く、`account_category_name` あり(カテゴリー合計行は `total_line=true`)\n", "items": { "type": "object", "properties": { "account_item_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "勘定科目ID。勘定科目行の場合のみ含まれる(勘定科目カテゴリー行では含まれない)。", "example": 192 }, "account_item_name": { "type": "string", "description": "勘定科目名。勘定科目行の場合のみ含まれる。", "example": "[製]期首材料棚卸高" }, "account_group_name": { "type": "string", "description": "決算書表示名。`account_item_display_type=group` を指定した場合にのみ、決算書表示行に含まれる。", "example": "期首材料棚卸高" }, "segment_3_tags": { "type": "array", "description": "比較対象に指定したセグメント3タグごとの期末残高。`breakdown_display_type` を指定した場合は、各セグメント3タグ要素の配下に内訳配列(`partners` / `items` / `sections`)が含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "セグメント3タグID。0 はセグメント3タグが未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 1 }, "name": { "type": "string", "description": "セグメント3タグ名(未選択の合計行では「未選択」が入る)", "example": "プロジェクトA" }, "closing_balance": { "type": "integer", "format": "int64", "description": "当該セグメント3タグの期末残高(円)", "example": 2592 }, "partners": { "type": "array", "description": "取引先ごとの内訳。`breakdown_display_type=partner` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "取引先ID。0 は取引先が未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 22 }, "name": { "type": "string", "description": "取引先名(未選択の合計行では「未選択」が入る)", "example": "freee" }, "closing_balance": { "type": "integer", "format": "int64", "description": "当該セグメント3タグ・取引先の期末残高(円)", "example": 2592 } } } }, "items": { "type": "array", "description": "品目ごとの内訳。`breakdown_display_type=item` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "品目ID。0 は品目が未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 1 }, "name": { "type": "string", "description": "品目名(未選択の合計行では「未選択」が入る)", "example": "源泉所得税" }, "closing_balance": { "type": "integer", "format": "int64", "description": "当該セグメント3タグ・品目の期末残高(円)", "example": 2592 } } } }, "sections": { "type": "array", "description": "部門ごとの内訳。`breakdown_display_type=section` かつ `account_item_display_type=account_item`(または省略)を指定した場合にのみ含まれる。", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0, "description": "部門ID。0 は部門が未選択の取引の合計を示す(name には「未選択」が入る)。", "example": 1 }, "name": { "type": "string", "description": "部門名(未選択の合計行では「未選択」が入る)", "example": "開発部門" }, "closing_balance": { "type": "integer", "format": "int64", "description": "当該セグメント3タグ・部門の期末残高(円)", "example": 2592 } } } } } } }, "account_category_name": { "type": "string", "description": "勘定科目カテゴリー名(例: 材料費、労務費、総製造費用 など)", "example": "材料費" }, "total_line": { "type": "boolean", "description": "合計行かどうか。勘定科目カテゴリーの合計行(当該カテゴリーの小計を表す行)の場合のみ含まれ、`true` となる。", "example": true }, "hierarchy_level": { "type": "integer", "format": "int64", "description": "階層レベル(1が最上位。値が大きいほど深い階層)", "example": 3 }, "parent_account_category_name": { "type": "string", "description": "上位勘定科目カテゴリー名。勘定科目カテゴリー行かつ上位階層が存在する場合のみ含まれる。", "example": "材料費" }, "closing_balance": { "type": "integer", "format": "int64", "description": "期末残高(円)。比較対象に指定したセグメント3タグの合計値。", "example": 2592 } } } } } }, "up_to_date": { "type": "boolean", "description": "集計結果が最新かどうか。`false` の場合は残高の集計が完了していないため、時間を置いてから再取得してください。", "example": true }, "up_to_date_reasons": { "type": "array", "description": "集計が最新でない場合の要因情報。`up_to_date=false` のときのみ要因が含まれ、`up_to_date=true` のときは空配列となる。", "items": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "string", "description": "要因コード。現時点で返り得る値は以下。\n* `depreciation_creating` - 当期の固定資産の償却を作成中\n* `depreciation_create_error` - 当期の固定資産の償却作成でエラーが発生\n", "example": "depreciation_creating", "enum": [ "depreciation_creating", "depreciation_create_error" ] }, "message": { "type": "string", "description": "集計が最新でない理由", "example": "当期の固定資産の償却作成が完了していないため、正しい集計結果でない可能性があります。しばらく時間をおいてからもう一度お試しください。" } } } } } }, "sectionParams": { "type": "object", "required": [ "company_id", "name" ], "properties": { "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID。部門を作成・更新する対象の事業所を指定します。", "example": 1 }, "name": { "type": "string", "maxLength": 30, "description": "部門名 (30文字以内)。事業所内で重複できません。既に同名の部門が存在する場合は 400 エラーになります。", "example": "開発部門" }, "long_name": { "type": "string", "maxLength": 255, "description": "部門の正式名称 (255文字以内)。作成時に省略した場合は未設定(null)になります。更新時に省略した場合は現在の値を維持し、null を指定した場合は未設定に更新します。", "example": "開発本部", "nullable": true }, "shortcut1": { "type": "string", "maxLength": 20, "description": "ショートカット1 (20文字以内)。Web画面などで部門を検索する際のキーワードとして使用します。更新時に省略または null を指定した場合は未設定(null)に更新されます。", "example": "DEVELOPER", "nullable": true }, "shortcut2": { "type": "string", "maxLength": 20, "description": "ショートカット2 (20文字以内)。Web画面などで部門を検索する際のキーワードとして使用します。更新時に省略または null を指定した場合は未設定(null)に更新されます。", "example": "123", "nullable": true }, "code": { "type": "string", "maxLength": 20, "description": "部門コード (20文字以内、半角英数字・ハイフン・アンダースコアのみ)。事業所内で重複できません。事業所の設定で部門コードを使用する設定にしている場合のみ保存され、設定が無効の場合は指定しても無視されます。更新時に省略または null を指定した場合は未設定(null)に更新されます。", "example": "code001", "pattern": "^[0-9a-zA-Z_-]+$", "nullable": true }, "parent_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "親部門ID。部門階層を利用できるプランでのみ反映されます。更新時に省略した場合は現在の親子関係を維持し、null を指定した場合は親部門との関係を解除します。", "example": 101, "nullable": true } } }, "section": { "type": "object", "required": [ "company_id", "id", "name", "available", "long_name", "shortcut1", "shortcut2" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "部門ID。部門の取得・更新・削除APIのパスパラメータや、取引作成時の明細(details)の section_id に指定します。", "example": 101 }, "name": { "type": "string", "maxLength": 30, "description": "部門名 (30文字以内)。事業所内で重複しません。", "example": "開発部門" }, "available": { "type": "boolean", "description": "部門の使用設定(true: 使用する、false: 使用しない)。\n
\n", "example": true }, "long_name": { "type": "string", "maxLength": 255, "description": "部門の正式名称 (255文字以内)。未設定の場合は null が返ります。", "example": "開発部門", "nullable": true }, "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "部門が属する事業所ID", "example": 1 }, "shortcut1": { "type": "string", "maxLength": 20, "description": "ショートカット1 (20文字以内)。Web画面などで部門を検索する際のキーワードとして使用します。未設定の場合は null が返ります。", "example": "DEVELOPER", "nullable": true }, "shortcut2": { "type": "string", "maxLength": 20, "description": "ショートカット2 (20文字以内)。Web画面などで部門を検索する際のキーワードとして使用します。未設定の場合は null が返ります。", "example": "123", "nullable": true }, "code": { "type": "string", "maxLength": 20, "description": "部門コード (20文字以内)。事業所の設定で部門コードを使用する設定にしている場合のみレスポンスに含まれます(設定が無効の場合は code キー自体が返りません)。部門コードが未設定の場合は null が返ります。", "example": "code001", "pattern": "^[0-9a-zA-Z_-]+$", "nullable": true }, "indent_count": { "type": "integer", "format": "int64", "minimum": 0, "description": "部門階層の深さ。最上位の部門は 0 です。部門階層を利用できるプランの場合のみレスポンスに含まれます。", "example": 0 }, "parent_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "親部門ID。最上位の部門では null が返ります。部門階層を利用できるプランの場合のみレスポンスに含まれます。", "example": 100, "nullable": true }, "update_date": { "type": "string", "description": "部門の最終更新日 (yyyy-mm-dd, JST)。部門一覧の取得APIでのみレスポンスに含まれ、start_update_date / end_update_date による絞り込みの対象です。", "example": "2024-01-15" } } }, "sectionResponse": { "type": "object", "description": "部門の取得・作成・更新結果", "required": [ "section" ], "properties": { "section": { "$ref": "#/components/schemas/section" } } }, "dealCreateResponse": { "type": "object", "required": [ "deal" ], "properties": { "deal": { "type": "object", "required": [ "amount", "company_id", "id", "issue_date", "partner_id", "status" ], "properties": { "id": { "type": "integer", "format": "int64", "description": "取引ID", "minimum": 1, "example": 101 }, "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID", "example": 1 }, "issue_date": { "type": "string", "description": "発生日 (yyyy-mm-dd)", "example": "2019-12-17" }, "due_date": { "type": "string", "description": "支払期日 (yyyy-mm-dd)。支払期日が設定されていない場合はnullを返します。", "example": "2019-12-17", "nullable": true }, "amount": { "type": "integer", "format": "int64", "minimum": -9223372036854775808, "maximum": 9223372036854775807, "description": "金額(円・税込)", "example": 5250 }, "due_amount": { "type": "integer", "format": "int64", "description": "支払残額(円)。決済が完了している場合は0を返します。", "example": 0 }, "type": { "type": "string", "description": "収支区分 (収入: income, 支出: expense)", "example": "expense", "enum": [ "income", "expense" ] }, "partner_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "取引先ID。取引先が設定されていない場合はnullを返します。", "example": 201, "nullable": true }, "partner_code": { "type": "string", "description": "取引先コード。事業所の設定で取引先コードの利用が無効の場合、または取引先が設定されていない場合はnullを返します。", "example": "code001", "nullable": true }, "ref_number": { "type": "string", "description": "管理番号。設定されていない場合はnullを返します。", "example": "123-456", "nullable": true }, "status": { "type": "string", "description": "決済状況 (未決済: unsettled, 完了: settled)", "example": "settled", "enum": [ "unsettled", "settled" ] }, "deal_origin_name": { "type": "string", "description": "取引の登録元の表示名(例: 手動, freee請求書, 自動で経理, 経費精算)。登録元の機能・連携アプリによって値が異なります。", "example": "手動" }, "details": { "type": "array", "description": "取引の明細行", "items": { "type": "object", "required": [ "account_item_id", "amount", "entry_side", "id", "tax_code", "vat" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "取引行ID。取引の更新(PUT /api/1/deals/{id})で既存の明細行を指定する際に使用します。", "example": 11 }, "account_item_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "勘定科目ID", "example": 803 }, "account_item_code": { "type": "string", "description": "勘定科目コード。事業所の設定で勘定科目コードの利用が無効の場合はnullを返します。", "example": "code001", "nullable": true }, "tax_code": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647, "description": "税区分コード", "example": 2 }, "partner_id": { "type": "integer", "format": "int64", "description": "取引先ID。取引先が設定されていない場合はnullを返します。", "example": 201, "nullable": true }, "partner_code": { "type": "string", "description": "取引先コード。事業所の設定で取引先コードの利用が無効の場合、または取引先が設定されていない場合はnullを返します。", "example": "code001", "nullable": true }, "item_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "品目ID。品目が設定されていない場合はnullを返します。", "example": 501, "nullable": true }, "item_code": { "type": "string", "description": "品目コード。事業所の設定で品目コードの利用が無効の場合、または品目が設定されていない場合はnullを返します。", "example": "code001", "nullable": true }, "section_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "部門ID。部門が設定されていない場合はnullを返します。", "example": 1, "nullable": true }, "section_code": { "type": "string", "description": "部門コード。事業所の設定で部門コードの利用が無効の場合、または部門が設定されていない場合はnullを返します。", "example": "code001", "nullable": true }, "tag_ids": { "type": "array", "description": "メモタグID", "example": [ 1, 2, 3 ], "items": { "type": "integer", "format": "int64", "minimum": 1 } }, "segment_1_tag_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメント1タグID。セグメントタグが利用できないプランの場合、キー自体がレスポンスに含まれません。セグメント1タグが設定されていない場合はnullを返します。", "example": 1, "nullable": true }, "segment_1_tag_code": { "type": "string", "description": "セグメント1タグコード。セグメントタグが利用できないプランの場合、キー自体がレスポンスに含まれません。事業所の設定でセグメントタグコードの利用が無効の場合、またはセグメント1タグが設定されていない場合はnullを返します。", "example": "code001", "nullable": true }, "segment_2_tag_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメント2タグID。セグメントタグが利用できないプランの場合、キー自体がレスポンスに含まれません。セグメント2タグが設定されていない場合はnullを返します。", "example": 1, "nullable": true }, "segment_2_tag_code": { "type": "string", "description": "セグメント2タグコード。セグメントタグが利用できないプランの場合、キー自体がレスポンスに含まれません。事業所の設定でセグメントタグコードの利用が無効の場合、またはセグメント2タグが設定されていない場合はnullを返します。", "example": "code001", "nullable": true }, "segment_3_tag_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメント3タグID。セグメントタグが利用できないプランの場合、キー自体がレスポンスに含まれません。セグメント3タグが設定されていない場合はnullを返します。", "example": 1, "nullable": true }, "segment_3_tag_code": { "type": "string", "description": "セグメント3タグコード。セグメントタグが利用できないプランの場合、キー自体がレスポンスに含まれません。事業所の設定でセグメントタグコードの利用が無効の場合、またはセグメント3タグが設定されていない場合はnullを返します。", "example": "code001", "nullable": true }, "amount": { "type": "integer", "format": "int64", "minimum": -9223372036854775808, "maximum": 9223372036854775807, "description": "取引金額(円・税込)", "example": 5250 }, "vat": { "type": "integer", "format": "int64", "description": "消費税額(円)", "example": 250 }, "description": { "type": "string", "description": "備考", "example": "備考" }, "entry_side": { "type": "string", "description": "貸借(貸方: credit, 借方: debit)", "example": "debit", "enum": [ "credit", "debit" ] } } } }, "payments": { "type": "array", "description": "取引の支払行。支払行が存在しない場合、キー自体がレスポンスに含まれません。決済行単位の配列のため、1回の決済でも口座タグの組合せによって複数の要素に分かれることがあります。各行のタグは口座タグ設定に基づくサーバー決定値のため、detailsのタグと一致しないことがあります。+更新による決済行は含まれず、renewsに出力されます。", "items": { "type": "object", "required": [ "amount", "date", "id", "item_code", "item_id", "partner_code", "partner_id", "section_code", "section_id", "tag_ids" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "支払行ID。支払行の更新(PUT /api/1/deals/{id}/payments/{payment_id})・削除(DELETE /api/1/deals/{id}/payments/{payment_id})のpayment_idに指定します。支払行の更新後は決済行が再集計されるため、IDやタグが変わることがあります。", "example": 202 }, "date": { "type": "string", "description": "支払日 (yyyy-mm-dd)", "example": "2019-12-17" }, "from_walletable_type": { "type": "string", "description": "口座区分 (銀行口座: bank_account, クレジットカード: credit_card, 現金: wallet, プライベート資金: private_account_item)。後から決済した場合の支払手数料行はprivate_account_itemで出力されます。", "example": "bank_account", "enum": [ "bank_account", "credit_card", "wallet", "private_account_item" ] }, "from_walletable_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "口座ID(from_walletable_typeがprivate_account_itemの場合は勘定科目ID)", "example": 103 }, "amount": { "type": "integer", "format": "int64", "minimum": -9223372036854775808, "maximum": 9223372036854775807, "description": "支払金額(円)", "example": 5250 }, "partner_id": { "type": "integer", "format": "int64", "description": "取引先ID。取引先が設定されていない場合は0を返します。", "example": 201 }, "partner_code": { "type": "string", "description": "取引先コード。事業所の設定で取引先コードの利用が無効の場合、または取引先が設定されていない場合はnullを返します。", "example": "code001", "nullable": true }, "item_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "品目ID。品目が設定されていない場合はnullを返します。", "example": 501, "nullable": true }, "item_code": { "type": "string", "description": "品目コード。事業所の設定で品目コードの利用が無効の場合、または品目が設定されていない場合はnullを返します。", "example": "code001", "nullable": true }, "section_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "部門ID。部門が設定されていない場合はnullを返します。", "example": 1, "nullable": true }, "section_code": { "type": "string", "description": "部門コード。事業所の設定で部門コードの利用が無効の場合、または部門が設定されていない場合はnullを返します。", "example": "code001", "nullable": true }, "tag_ids": { "type": "array", "description": "メモタグID", "example": [ 1, 2, 3 ], "items": { "type": "integer", "format": "int64", "minimum": 1 } }, "segment_1_tag_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメント1タグID。セグメントタグが利用できないプランの場合、キー自体がレスポンスに含まれません。セグメント1タグが設定されていない場合はnullを返します。", "example": 1, "nullable": true }, "segment_1_tag_code": { "type": "string", "description": "セグメント1タグコード。セグメントタグが利用できないプランの場合、キー自体がレスポンスに含まれません。事業所の設定でセグメントタグコードの利用が無効の場合、またはセグメント1タグが設定されていない場合はnullを返します。", "example": "code001", "nullable": true }, "segment_2_tag_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメント2タグID。セグメントタグが利用できないプランの場合、キー自体がレスポンスに含まれません。セグメント2タグが設定されていない場合はnullを返します。", "example": 1, "nullable": true }, "segment_2_tag_code": { "type": "string", "description": "セグメント2タグコード。セグメントタグが利用できないプランの場合、キー自体がレスポンスに含まれません。事業所の設定でセグメントタグコードの利用が無効の場合、またはセグメント2タグが設定されていない場合はnullを返します。", "example": "code001", "nullable": true }, "segment_3_tag_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメント3タグID。セグメントタグが利用できないプランの場合、キー自体がレスポンスに含まれません。セグメント3タグが設定されていない場合はnullを返します。", "example": 1, "nullable": true }, "segment_3_tag_code": { "type": "string", "description": "セグメント3タグコード。セグメントタグが利用できないプランの場合、キー自体がレスポンスに含まれません。事業所の設定でセグメントタグコードの利用が無効の場合、またはセグメント3タグが設定されていない場合はnullを返します。", "example": "code001", "nullable": true } } } }, "receipts": { "type": "array", "description": "取引に添付されたファイルボックス(証憑ファイル)", "items": { "type": "object", "required": [ "created_at", "file_src", "id", "mime_type", "origin", "status", "user" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "ファイルボックス(証憑ファイル)ID", "example": 1 }, "status": { "type": "string", "description": "ステータス(confirmed: 確認済み, deleted: 削除済み, ignored: 無視)", "example": "confirmed", "enum": [ "confirmed", "deleted", "ignored" ] }, "description": { "type": "string", "description": "メモ", "example": "タクシー利用" }, "mime_type": { "type": "string", "description": "ファイルのMIMEタイプ(例:image/png, image/jpeg, application/pdf)", "example": "image/png" }, "issue_date": { "type": "string", "description": "発生日 (yyyy-mm-dd)。設定されていない場合はnullを返します。", "example": "2019-12-17", "nullable": true }, "origin": { "type": "string", "description": "アップロード元種別", "example": "public_api", "enum": [ "unknown", "web", "mobile_camera", "mobile_album", "scansnap", "scannable", "dropbox", "mail", "safety_contact_file", "public_api" ] }, "qualified_invoice": { "type": "string", "description": "適格請求書等(qualified: 該当する、not_qualified: 該当しない、unselected: 未選択、null: OCR解析結果が保存されておらず、ユーザーによる手動保存もされていない場合)", "enum": [ "qualified", "not_qualified", "unselected" ], "example": "qualified", "nullable": true }, "invoice_registration_number": { "type": "string", "maxLength": 14, "minLength": 14, "pattern": "^T[1-9][0-9]{12}$", "description": "インボイス制度適格請求書発行事業者登録番号(null: OCR解析結果が保存されておらず、ユーザーによる手動保存もされていない場合)\n- 先頭T数字13桁の固定14桁の文字列\n国税庁インボイス制度適格請求書発行事業者公表サイト\n", "example": "T1000000000001", "nullable": true }, "document_type": { "type": "string", "description": "書類の種類(receipt: 領収書、invoice: 請求書、other: その他、receipt_and_invoice: 領収書・請求書(旧区分)、contract: 契約書(旧区分)、null: OCR解析結果が保存されておらず、ユーザーによる手動保存もされていない場合)。receipt_and_invoiceとcontractは2023年6月に廃止された旧区分で、旧区分のまま保存されている既存ファイルでのみ返ります。", "enum": [ "receipt", "invoice", "other", "receipt_and_invoice", "contract" ], "example": "receipt", "nullable": true }, "created_at": { "type": "string", "description": "アップロード日時(ISO8601形式)", "example": "2019-12-17T18:30:24+09:00" }, "file_src": { "type": "string", "description": "ファイルのダウンロードURL(freeeにログインした状態でのみ閲覧可能です。)\n
\n
\nfile_srcは廃止予定の属性になります。
\nfile_srcに替わり、ファイルボックス(証憑ファイル)のダウンロード APIをご利用ください。
\nファイルボックス(証憑ファイル)のダウンロードAPIを利用することで、以下のようになります。\n", "example": "https://www.freee.co.jp/api/p/receipts/revisions/1234xxxxx/download", "deprecated": true }, "user": { "required": [ "email", "id" ], "type": "object", "description": "ファイルをアップロードしたユーザー", "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "ユーザーID", "example": 1 }, "email": { "type": "string", "description": "メールアドレス", "example": "contact@example.com" }, "display_name": { "type": "string", "description": "表示名", "example": "フリー太郎", "nullable": true } } }, "receipt_metadatum": { "type": "object", "description": "電子帳簿保存法の検索要件に対応するメタデータ(発行元・発行日・金額)。電子帳簿保存法対応ファイルボックスの対象ファイルでメタデータが存在する場合のみレスポンスに含まれます。", "properties": { "partner_name": { "type": "string", "maxLength": 255, "nullable": true, "description": "発行元", "example": "freeeパートナー" }, "issue_date": { "type": "string", "nullable": true, "description": "発行日 (yyyy-mm-dd)", "example": "2019-12-17" }, "amount": { "type": "integer", "format": "int64", "minimum": -9223372036854775808, "maximum": 9223372036854775807, "nullable": true, "description": "金額(円)", "example": 5250 } } } } } } } } } }, "deal": { "type": "object", "required": [ "amount", "company_id", "id", "issue_date", "partner_id", "status" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "取引ID", "example": 101 }, "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID", "example": 1 }, "issue_date": { "type": "string", "description": "発生日 (yyyy-mm-dd)", "example": "2019-12-17" }, "due_date": { "type": "string", "description": "支払期日 (yyyy-mm-dd)。支払期日が設定されていない場合はnullを返します。", "example": "2019-12-17", "nullable": true }, "amount": { "type": "integer", "format": "int64", "minimum": -9223372036854775808, "maximum": 9223372036854775807, "description": "金額(円・税込)", "example": 5250 }, "due_amount": { "type": "integer", "format": "int64", "description": "支払残額(円)。決済が完了している場合は0を返します。", "example": 0 }, "type": { "type": "string", "description": "収支区分 (収入: income, 支出: expense)", "example": "expense", "enum": [ "income", "expense" ] }, "partner_id": { "type": "integer", "format": "int64", "description": "取引先ID。取引先が設定されていない場合はnullを返します。", "example": 201, "nullable": true }, "partner_code": { "type": "string", "description": "取引先コード。事業所の設定で取引先コードの利用が無効の場合、または取引先が設定されていない場合はnullを返します。", "example": "code001", "nullable": true }, "ref_number": { "type": "string", "description": "管理番号。設定されていない場合はnullを返します。", "example": "123-456", "nullable": true }, "status": { "type": "string", "description": "決済状況 (未決済: unsettled, 完了: settled)", "example": "settled", "enum": [ "unsettled", "settled" ] }, "deal_origin_name": { "type": "string", "description": "取引の登録元の表示名(例: 手動, freee請求書, 自動で経理, 経費精算)。登録元の機能・連携アプリによって値が異なります。", "example": "手動" }, "details": { "type": "array", "description": "取引の明細行", "items": { "type": "object", "required": [ "account_item_id", "amount", "entry_side", "id", "tax_code", "vat" ], "properties": { "id": { "type": "integer", "format": "int64", "description": "取引行ID。取引の更新(PUT /api/1/deals/{id})で既存の明細行を指定する際に使用します。", "example": 11 }, "account_item_id": { "type": "integer", "format": "int64", "description": "勘定科目ID", "example": 803 }, "account_item_code": { "type": "string", "description": "勘定科目コード。事業所の設定で勘定科目コードの利用が無効の場合はnullを返します。一覧の取得(GET /api/1/deals)のレスポンスには含まれません。", "example": "code001", "nullable": true }, "tax_code": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647, "description": "税区分コード", "example": 2 }, "partner_id": { "type": "integer", "format": "int64", "description": "取引先ID。取引先が設定されていない場合はnullを返します。", "example": 201, "nullable": true }, "partner_code": { "type": "string", "description": "取引先コード。事業所の設定で取引先コードの利用が無効の場合、または取引先が設定されていない場合はnullを返します。", "example": "code001", "nullable": true }, "item_id": { "type": "integer", "format": "int64", "description": "品目ID。品目が設定されていない場合はnullを返します。", "example": 501, "nullable": true }, "item_code": { "type": "string", "description": "品目コード。事業所の設定で品目コードの利用が無効の場合、または品目が設定されていない場合はnullを返します。一覧の取得(GET /api/1/deals)のレスポンスには含まれません。", "example": "code001", "nullable": true }, "section_id": { "type": "integer", "format": "int64", "description": "部門ID。部門が設定されていない場合はnullを返します。", "example": 1, "nullable": true }, "section_code": { "type": "string", "description": "部門コード。事業所の設定で部門コードの利用が無効の場合、または部門が設定されていない場合はnullを返します。一覧の取得(GET /api/1/deals)のレスポンスには含まれません。", "example": "code001", "nullable": true }, "tag_ids": { "type": "array", "description": "メモタグID", "example": [ 1, 2, 3 ], "items": { "type": "integer", "format": "int64" } }, "segment_1_tag_id": { "type": "integer", "format": "int64", "description": "セグメント1タグID。セグメントタグが利用できないプランの場合、キー自体がレスポンスに含まれません。セグメント1タグが設定されていない場合はnullを返します。", "example": 1, "nullable": true }, "segment_1_tag_code": { "type": "string", "description": "セグメント1タグコード。セグメントタグが利用できないプランの場合、キー自体がレスポンスに含まれません。事業所の設定でセグメントタグコードの利用が無効の場合、またはセグメント1タグが設定されていない場合はnullを返します。一覧の取得(GET /api/1/deals)のレスポンスには含まれません。", "example": "code001", "nullable": true }, "segment_2_tag_id": { "type": "integer", "format": "int64", "description": "セグメント2タグID。セグメントタグが利用できないプランの場合、キー自体がレスポンスに含まれません。セグメント2タグが設定されていない場合はnullを返します。", "example": 1, "nullable": true }, "segment_2_tag_code": { "type": "string", "description": "セグメント2タグコード。セグメントタグが利用できないプランの場合、キー自体がレスポンスに含まれません。事業所の設定でセグメントタグコードの利用が無効の場合、またはセグメント2タグが設定されていない場合はnullを返します。一覧の取得(GET /api/1/deals)のレスポンスには含まれません。", "example": "code001", "nullable": true }, "segment_3_tag_id": { "type": "integer", "format": "int64", "description": "セグメント3タグID。セグメントタグが利用できないプランの場合、キー自体がレスポンスに含まれません。セグメント3タグが設定されていない場合はnullを返します。", "example": 1, "nullable": true }, "segment_3_tag_code": { "type": "string", "description": "セグメント3タグコード。セグメントタグが利用できないプランの場合、キー自体がレスポンスに含まれません。事業所の設定でセグメントタグコードの利用が無効の場合、またはセグメント3タグが設定されていない場合はnullを返します。一覧の取得(GET /api/1/deals)のレスポンスには含まれません。", "example": "code001", "nullable": true }, "amount": { "type": "integer", "format": "int64", "minimum": -9223372036854775808, "maximum": 9223372036854775807, "description": "取引金額(円・税込)", "example": 5250 }, "vat": { "type": "integer", "format": "int64", "description": "消費税額(円)", "example": 250 }, "description": { "type": "string", "description": "備考", "example": "備考" }, "entry_side": { "type": "string", "description": "貸借(貸方: credit, 借方: debit)", "example": "debit", "enum": [ "credit", "debit" ] } } } }, "accruals": { "type": "array", "description": "取引の債権債務行。一覧の取得(GET /api/1/deals)または取引の取得(GET /api/1/deals/{id})でクエリパラメータaccruals=withを指定し、かつ債権債務行が存在する場合のみレスポンスに含まれます。", "items": { "type": "object", "required": [ "account_item_id", "amount", "entry_side", "id", "tax_code", "vat" ], "properties": { "id": { "type": "integer", "format": "int64", "description": "債権債務行ID。+更新の作成(POST /api/1/deals/{id}/renews)のrenew_target_idに指定できます。", "example": 21 }, "account_item_id": { "type": "integer", "format": "int64", "description": "勘定科目ID", "example": 803 }, "tax_code": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647, "description": "税区分コード", "example": 2 }, "partner_id": { "type": "integer", "format": "int64", "description": "取引先ID。取引先が設定されていない場合はnullを返します。", "example": 201, "nullable": true }, "partner_code": { "type": "string", "description": "取引先コード。事業所の設定で取引先コードの利用が無効の場合、または取引先が設定されていない場合はnullを返します。", "example": "code001", "nullable": true }, "item_id": { "type": "integer", "format": "int64", "description": "品目ID。品目が設定されていない場合はnullを返します。", "example": 501, "nullable": true }, "section_id": { "type": "integer", "format": "int64", "description": "部門ID。部門が設定されていない場合はnullを返します。", "example": 1, "nullable": true }, "tag_ids": { "type": "array", "description": "メモタグID", "example": [ 1, 2, 3 ], "items": { "type": "integer", "format": "int64" } }, "amount": { "type": "integer", "format": "int64", "minimum": -9223372036854775808, "maximum": 9223372036854775807, "description": "金額(円・税込)", "example": 5250 }, "vat": { "type": "integer", "format": "int64", "description": "消費税額(円)", "example": 250 }, "description": { "type": "string", "description": "備考。設定されていない場合は空文字を返します。", "example": "備考" }, "entry_side": { "type": "string", "description": "貸借(貸方: credit, 借方: debit)", "example": "debit", "enum": [ "credit", "debit" ] }, "segment_1_tag_id": { "type": "integer", "format": "int64", "description": "セグメント1タグID。セグメントタグが利用できないプランの場合、キー自体がレスポンスに含まれません。セグメント1タグが設定されていない場合はnullを返します。", "example": 1, "nullable": true }, "segment_2_tag_id": { "type": "integer", "format": "int64", "description": "セグメント2タグID。セグメントタグが利用できないプランの場合、キー自体がレスポンスに含まれません。セグメント2タグが設定されていない場合はnullを返します。", "example": 1, "nullable": true }, "segment_3_tag_id": { "type": "integer", "format": "int64", "description": "セグメント3タグID。セグメントタグが利用できないプランの場合、キー自体がレスポンスに含まれません。セグメント3タグが設定されていない場合はnullを返します。", "example": 1, "nullable": true } } } }, "renews": { "type": "array", "description": "取引の+更新行。+更新行が存在しない場合、キー自体がレスポンスに含まれません。", "items": { "type": "object", "required": [ "details", "id", "renew_target_id", "renew_target_type", "update_date" ], "properties": { "id": { "type": "integer", "format": "int64", "description": "+更新行ID。+更新の更新(PUT /api/1/deals/{id}/renews/{renew_id})・削除(DELETE /api/1/deals/{id}/renews/{renew_id})のrenew_idに指定します。", "example": 11 }, "update_date": { "type": "string", "description": "更新日 (yyyy-mm-dd)", "example": "2019-12-17" }, "renew_target_id": { "type": "integer", "format": "int64", "description": "+更新の対象行ID", "example": 12 }, "renew_target_type": { "type": "string", "description": "+更新の対象行タイプ(detail: 取引の明細行, accrual: 債権債務行, renew: +更新の明細行)", "example": "detail", "enum": [ "detail", "accrual", "renew" ] }, "details": { "type": "array", "description": "+更新の明細行一覧(配列)", "items": { "required": [ "account_item_id", "amount", "entry_side", "id", "tag_ids", "tax_code", "vat" ], "type": "object", "properties": { "id": { "type": "integer", "format": "int64", "description": "+更新の明細行ID", "example": 1 }, "entry_side": { "type": "string", "description": "貸借(貸方: credit, 借方: debit)", "example": "debit", "enum": [ "credit", "debit" ] }, "account_item_id": { "type": "integer", "format": "int64", "description": "勘定科目ID", "example": 1 }, "tax_code": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647, "description": "税区分コード", "example": 1 }, "partner_id": { "type": "integer", "format": "int64", "description": "取引先ID", "example": 201, "nullable": true }, "partner_code": { "type": "string", "description": "取引先コード", "example": "code001", "nullable": true }, "item_id": { "type": "integer", "format": "int64", "description": "品目ID", "example": 1, "nullable": true }, "section_id": { "type": "integer", "format": "int64", "description": "部門ID", "example": 1, "nullable": true }, "tag_ids": { "type": "array", "description": "メモタグID", "example": [ 1, 2, 3 ], "items": { "type": "integer", "format": "int64" } }, "segment_1_tag_id": { "type": "integer", "format": "int64", "description": "セグメント1タグID。セグメントタグが利用できないプランの場合、キー自体がレスポンスに含まれません。セグメント1タグが設定されていない場合はnullを返します。", "example": 1, "nullable": true }, "segment_2_tag_id": { "type": "integer", "format": "int64", "description": "セグメント2タグID。セグメントタグが利用できないプランの場合、キー自体がレスポンスに含まれません。セグメント2タグが設定されていない場合はnullを返します。", "example": 1, "nullable": true }, "segment_3_tag_id": { "type": "integer", "format": "int64", "description": "セグメント3タグID。セグメントタグが利用できないプランの場合、キー自体がレスポンスに含まれません。セグメント3タグが設定されていない場合はnullを返します。", "example": 1, "nullable": true }, "amount": { "type": "integer", "format": "int64", "minimum": -9223372036854775808, "maximum": 9223372036854775807, "description": "金額(円・税込)", "example": 108000 }, "vat": { "type": "integer", "format": "int64", "description": "消費税額(円)", "example": 8000 }, "description": { "type": "string", "description": "備考", "example": "備考", "nullable": true } } } } } } }, "payments": { "type": "array", "description": "取引の支払行。支払行が存在しない場合、キー自体がレスポンスに含まれません。決済行単位の配列のため、1回の決済でも口座タグの組合せによって複数の要素に分かれることがあります。各行のタグは口座タグ設定に基づくサーバー決定値のため、detailsのタグと一致しないことがあります。+更新による決済行は含まれず、renewsに出力されます。", "items": { "type": "object", "required": [ "amount", "date", "id", "item_code", "item_id", "partner_code", "partner_id", "section_code", "section_id", "tag_ids" ], "properties": { "id": { "type": "integer", "format": "int64", "description": "支払行ID。支払行の更新(PUT /api/1/deals/{id}/payments/{payment_id})・削除(DELETE /api/1/deals/{id}/payments/{payment_id})のpayment_idに指定します。支払行の更新後は決済行が再集計されるため、IDやタグが変わることがあります。", "example": 202 }, "date": { "type": "string", "description": "支払日 (yyyy-mm-dd)", "example": "2019-12-17" }, "from_walletable_type": { "type": "string", "description": "口座区分 (銀行口座: bank_account, クレジットカード: credit_card, 現金: wallet, プライベート資金: private_account_item)。後から決済した場合の支払手数料行はprivate_account_itemで出力されます。", "example": "bank_account", "enum": [ "bank_account", "credit_card", "wallet", "private_account_item" ] }, "from_walletable_id": { "type": "integer", "format": "int64", "description": "口座ID(from_walletable_typeがprivate_account_itemの場合は勘定科目ID)", "example": 103 }, "amount": { "type": "integer", "format": "int64", "minimum": -9223372036854775808, "maximum": 9223372036854775807, "description": "支払金額(円)", "example": 5250 }, "partner_id": { "type": "integer", "format": "int64", "description": "取引先ID。取引先が設定されていない場合は0を返します。", "example": 201 }, "partner_code": { "type": "string", "description": "取引先コード。事業所の設定で取引先コードの利用が無効の場合、または取引先が設定されていない場合はnullを返します。", "example": "code001", "nullable": true }, "item_id": { "type": "integer", "format": "int64", "description": "品目ID。品目が設定されていない場合はnullを返します。", "example": 501, "nullable": true }, "item_code": { "type": "string", "description": "品目コード。事業所の設定で品目コードの利用が無効の場合、または品目が設定されていない場合はnullを返します。", "example": "code001", "nullable": true }, "section_id": { "type": "integer", "format": "int64", "description": "部門ID。部門が設定されていない場合はnullを返します。", "example": 1, "nullable": true }, "section_code": { "type": "string", "description": "部門コード。事業所の設定で部門コードの利用が無効の場合、または部門が設定されていない場合はnullを返します。", "example": "code001", "nullable": true }, "tag_ids": { "type": "array", "description": "メモタグID", "example": [ 1, 2, 3 ], "items": { "type": "integer", "format": "int64" } }, "segment_1_tag_id": { "type": "integer", "format": "int64", "description": "セグメント1タグID。セグメントタグが利用できないプランの場合、キー自体がレスポンスに含まれません。セグメント1タグが設定されていない場合はnullを返します。", "example": 1, "nullable": true }, "segment_1_tag_code": { "type": "string", "description": "セグメント1タグコード。セグメントタグが利用できないプランの場合、キー自体がレスポンスに含まれません。事業所の設定でセグメントタグコードの利用が無効の場合、またはセグメント1タグが設定されていない場合はnullを返します。", "example": "code001", "nullable": true }, "segment_2_tag_id": { "type": "integer", "format": "int64", "description": "セグメント2タグID。セグメントタグが利用できないプランの場合、キー自体がレスポンスに含まれません。セグメント2タグが設定されていない場合はnullを返します。", "example": 1, "nullable": true }, "segment_2_tag_code": { "type": "string", "description": "セグメント2タグコード。セグメントタグが利用できないプランの場合、キー自体がレスポンスに含まれません。事業所の設定でセグメントタグコードの利用が無効の場合、またはセグメント2タグが設定されていない場合はnullを返します。", "example": "code001", "nullable": true }, "segment_3_tag_id": { "type": "integer", "format": "int64", "description": "セグメント3タグID。セグメントタグが利用できないプランの場合、キー自体がレスポンスに含まれません。セグメント3タグが設定されていない場合はnullを返します。", "example": 1, "nullable": true }, "segment_3_tag_code": { "type": "string", "description": "セグメント3タグコード。セグメントタグが利用できないプランの場合、キー自体がレスポンスに含まれません。事業所の設定でセグメントタグコードの利用が無効の場合、またはセグメント3タグが設定されていない場合はnullを返します。", "example": "code001", "nullable": true } } } }, "receipts": { "type": "array", "description": "取引に添付されたファイルボックス(証憑ファイル)", "items": { "type": "object", "required": [ "created_at", "file_src", "id", "mime_type", "origin", "status", "user" ], "properties": { "id": { "type": "integer", "format": "int64", "description": "ファイルボックス(証憑ファイル)ID", "example": 1 }, "status": { "type": "string", "description": "ステータス(confirmed: 確認済み, deleted: 削除済み, ignored: 無視)", "example": "confirmed", "enum": [ "confirmed", "deleted", "ignored" ] }, "description": { "type": "string", "description": "メモ", "example": "タクシー利用" }, "mime_type": { "type": "string", "description": "ファイルのMIMEタイプ(例:image/png, image/jpeg, application/pdf)", "example": "image/png" }, "issue_date": { "type": "string", "description": "発生日 (yyyy-mm-dd)。設定されていない場合はnullを返します。", "example": "2019-12-17", "nullable": true }, "origin": { "type": "string", "description": "アップロード元種別", "example": "public_api", "enum": [ "unknown", "web", "mobile_camera", "mobile_album", "scansnap", "scannable", "dropbox", "mail", "safety_contact_file", "public_api" ] }, "qualified_invoice": { "type": "string", "description": "適格請求書等(qualified: 該当する、not_qualified: 該当しない、unselected: 未選択、null: OCR解析結果が保存されておらず、ユーザーによる手動保存もされていない場合)", "enum": [ "qualified", "not_qualified", "unselected" ], "example": "qualified", "nullable": true }, "invoice_registration_number": { "type": "string", "maxLength": 14, "minLength": 14, "pattern": "^T[1-9][0-9]{12}$", "description": "インボイス制度適格請求書発行事業者登録番号(null: OCR解析結果が保存されておらず、ユーザーによる手動保存もされていない場合)\n- 先頭T数字13桁の固定14桁の文字列\n国税庁インボイス制度適格請求書発行事業者公表サイト\n", "example": "T1000000000001", "nullable": true }, "document_type": { "type": "string", "description": "書類の種類(receipt: 領収書、invoice: 請求書、other: その他、receipt_and_invoice: 領収書・請求書(旧区分)、contract: 契約書(旧区分)、null: OCR解析結果が保存されておらず、ユーザーによる手動保存もされていない場合)。receipt_and_invoiceとcontractは2023年6月に廃止された旧区分で、旧区分のまま保存されている既存ファイルでのみ返ります。", "enum": [ "receipt", "invoice", "other", "receipt_and_invoice", "contract" ], "example": "receipt", "nullable": true }, "created_at": { "type": "string", "description": "アップロード日時(ISO8601形式)", "example": "2019-12-17T18:30:24+09:00" }, "file_src": { "type": "string", "description": "ファイルのダウンロードURL(freeeにログインした状態でのみ閲覧可能です。)\n
\n
\nfile_srcは廃止予定の属性になります。
\nfile_srcに替わり、ファイルボックス(証憑ファイル)のダウンロード APIをご利用ください。
\nファイルボックス(証憑ファイル)のダウンロードAPIを利用することで、以下のようになります。\n", "example": "https://www.freee.co.jp/api/p/receipts/revisions/1234xxxxx/download", "deprecated": true }, "user": { "required": [ "email", "id" ], "type": "object", "description": "ファイルをアップロードしたユーザー", "properties": { "id": { "type": "integer", "format": "int64", "description": "ユーザーID", "example": 1 }, "email": { "type": "string", "description": "メールアドレス", "example": "contact@example.com" }, "display_name": { "type": "string", "description": "表示名", "example": "フリー太郎", "nullable": true } } }, "receipt_metadatum": { "type": "object", "description": "電子帳簿保存法の検索要件に対応するメタデータ(発行元・発行日・金額)。電子帳簿保存法対応ファイルボックスの対象ファイルでメタデータが存在する場合のみレスポンスに含まれます。", "properties": { "partner_name": { "type": "string", "maxLength": 255, "nullable": true, "description": "発行元", "example": "freeeパートナー" }, "issue_date": { "type": "string", "nullable": true, "description": "発行日 (yyyy-mm-dd)", "example": "2019-12-17" }, "amount": { "type": "integer", "format": "int64", "minimum": -9223372036854775808, "maximum": 9223372036854775807, "nullable": true, "description": "金額(円)", "example": 5250 } } } } } } } }, "dealResponse": { "type": "object", "required": [ "deal" ], "properties": { "deal": { "$ref": "#/components/schemas/deal" } } }, "selectablesIndexResponse": { "type": "object", "description": "フォーム用選択項目情報。includes に account_item を指定しない場合は空のオブジェクトになります。", "properties": { "account_categories": { "type": "array", "description": "勘定科目を用途別に分類したカテゴリーの一覧", "items": { "required": [ "account_items", "balance", "desc", "org_code", "role", "title" ], "type": "object", "properties": { "balance": { "type": "string", "description": "収支区分(expense: 支出、income: 収入)", "example": "expense", "enum": [ "expense", "income" ] }, "org_code": { "type": "string", "description": "事業形態(personal: 個人事業主、corporate: 法人)", "example": "personal", "enum": [ "personal", "corporate" ] }, "role": { "type": "string", "description": "勘定科目カテゴリーを識別するコード", "example": "ex_food" }, "title": { "type": "string", "description": "フォームに表示する勘定科目カテゴリー名", "example": "飲食費" }, "desc": { "type": "string", "description": "勘定科目カテゴリーの用途。説明がない場合は空文字列になります。", "example": "飲食に使用した経費" }, "account_items": { "type": "array", "description": "勘定科目の一覧", "items": { "required": [ "default_tax", "desc", "help", "id", "name", "shortcut" ], "type": "object", "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "勘定科目ID", "example": 1 }, "name": { "type": "string", "description": "勘定科目名", "example": "交際費" }, "desc": { "type": "string", "description": "勘定科目の用途。説明がない場合は空文字列になります。", "example": "福利厚生以外の飲食費" }, "help": { "type": "string", "description": "勘定科目の詳細な用途。説明がない場合は空文字列になります。", "example": "" }, "shortcut": { "type": "string", "description": "勘定科目を検索するためのショートカット。設定されていない場合は null になります。", "example": "KOUSAI", "nullable": true }, "default_tax": { "type": "object", "description": "事業所で有効な税率ごとのデフォルト税区分。利用できない税率・控除割合のキーは返りません。", "properties": { "tax_rate_5": { "type": "object", "description": "税率5%に適用するデフォルト税区分。事業所で税率5%を利用しない場合は返りません。", "required": [ "code", "name" ], "properties": { "code": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647, "description": "税区分コード", "example": 1, "nullable": true }, "name": { "type": "string", "description": "税区分", "example": "課対仕入", "nullable": true } } }, "tax_rate_8": { "type": "object", "description": "税率8%に適用するデフォルト税区分。事業所で税率8%を利用しない場合は返りません。", "required": [ "code", "name" ], "properties": { "code": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647, "description": "税区分コード", "example": 1, "nullable": true }, "name": { "type": "string", "description": "税区分", "example": "課対仕入8%", "nullable": true } } }, "tax_rate_10": { "type": "object", "description": "税率10%に適用するデフォルト税区分。事業所で税率10%を利用しない場合は返りません。", "required": [ "code", "name" ], "properties": { "code": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647, "description": "税区分コード", "example": 1, "nullable": true }, "name": { "type": "string", "description": "税区分", "example": "課対仕入10%", "nullable": true } } }, "tax_rate_r8": { "type": "object", "description": "軽減税率8%に適用するデフォルト税区分。事業所で軽減税率8%を利用しない場合は返りません。", "required": [ "code", "name" ], "properties": { "code": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647, "description": "税区分コード", "example": 1, "nullable": true }, "name": { "type": "string", "description": "税区分", "example": "課対仕入8%(軽)", "nullable": true } } }, "tax_rate_5_exempt_80": { "type": "object", "description": "税率5%・仕入税額控除80%に適用するデフォルト税区分。該当する税区分がない場合は返りません。", "required": [ "code", "name" ], "properties": { "code": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647, "description": "税区分コード", "example": 1 }, "name": { "type": "string", "description": "税区分", "example": "課対仕入(控80)" } } }, "tax_rate_5_exempt_50": { "type": "object", "description": "税率5%・仕入税額控除50%に適用するデフォルト税区分。該当する税区分がない場合は返りません。", "required": [ "code", "name" ], "properties": { "code": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647, "description": "税区分コード", "example": 1 }, "name": { "type": "string", "description": "税区分", "example": "課対仕入(控50)" } } }, "tax_rate_8_exempt_80": { "type": "object", "description": "税率8%・仕入税額控除80%に適用するデフォルト税区分。該当する税区分がない場合は返りません。", "required": [ "code", "name" ], "properties": { "code": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647, "description": "税区分コード", "example": 1 }, "name": { "type": "string", "description": "税区分", "example": "課対仕入(控80)8%" } } }, "tax_rate_8_exempt_50": { "type": "object", "description": "税率8%・仕入税額控除50%に適用するデフォルト税区分。該当する税区分がない場合は返りません。", "required": [ "code", "name" ], "properties": { "code": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647, "description": "税区分コード", "example": 1 }, "name": { "type": "string", "description": "税区分", "example": "課対仕入(控50)8%" } } }, "tax_rate_10_exempt_80": { "type": "object", "description": "税率10%・仕入税額控除80%に適用するデフォルト税区分。該当する税区分がない場合は返りません。", "required": [ "code", "name" ], "properties": { "code": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647, "description": "税区分コード", "example": 1 }, "name": { "type": "string", "description": "税区分", "example": "課対仕入(控80)10%" } } }, "tax_rate_10_exempt_50": { "type": "object", "description": "税率10%・仕入税額控除50%に適用するデフォルト税区分。該当する税区分がない場合は返りません。", "required": [ "code", "name" ], "properties": { "code": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647, "description": "税区分コード", "example": 1 }, "name": { "type": "string", "description": "税区分", "example": "課対仕入(控50)10%" } } }, "tax_rate_r8_exempt_80": { "type": "object", "description": "軽減税率8%・仕入税額控除80%に適用するデフォルト税区分。該当する税区分がない場合は返りません。", "required": [ "code", "name" ], "properties": { "code": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647, "description": "税区分コード", "example": 1 }, "name": { "type": "string", "description": "税区分", "example": "課対仕入(控80)8%(軽)" } } }, "tax_rate_r8_exempt_50": { "type": "object", "description": "軽減税率8%・仕入税額控除50%に適用するデフォルト税区分。該当する税区分がない場合は返りません。", "required": [ "code", "name" ], "properties": { "code": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647, "description": "税区分コード", "example": 1 }, "name": { "type": "string", "description": "税区分", "example": "課対仕入(控50)8%(軽)" } } }, "tax_rate_5_exempt_70": { "type": "object", "description": "税率5%・仕入税額控除70%に適用するデフォルト税区分。該当する税区分がない場合は返りません。", "required": [ "code", "name" ], "properties": { "code": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647, "description": "税区分コード", "example": 1 }, "name": { "type": "string", "description": "税区分", "example": "課対仕入(控70)" } } }, "tax_rate_5_exempt_30": { "type": "object", "description": "税率5%・仕入税額控除30%に適用するデフォルト税区分。該当する税区分がない場合は返りません。", "required": [ "code", "name" ], "properties": { "code": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647, "description": "税区分コード", "example": 1 }, "name": { "type": "string", "description": "税区分", "example": "課対仕入(控30)" } } }, "tax_rate_8_exempt_70": { "type": "object", "description": "税率8%・仕入税額控除70%に適用するデフォルト税区分。該当する税区分がない場合は返りません。", "required": [ "code", "name" ], "properties": { "code": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647, "description": "税区分コード", "example": 1 }, "name": { "type": "string", "description": "税区分", "example": "課対仕入(控70)8%" } } }, "tax_rate_8_exempt_30": { "type": "object", "description": "税率8%・仕入税額控除30%に適用するデフォルト税区分。該当する税区分がない場合は返りません。", "required": [ "code", "name" ], "properties": { "code": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647, "description": "税区分コード", "example": 1 }, "name": { "type": "string", "description": "税区分", "example": "課対仕入(控30)8%" } } }, "tax_rate_10_exempt_70": { "type": "object", "description": "税率10%・仕入税額控除70%に適用するデフォルト税区分。該当する税区分がない場合は返りません。", "required": [ "code", "name" ], "properties": { "code": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647, "description": "税区分コード", "example": 1 }, "name": { "type": "string", "description": "税区分", "example": "課対仕入(控70)10%" } } }, "tax_rate_10_exempt_30": { "type": "object", "description": "税率10%・仕入税額控除30%に適用するデフォルト税区分。該当する税区分がない場合は返りません。", "required": [ "code", "name" ], "properties": { "code": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647, "description": "税区分コード", "example": 1 }, "name": { "type": "string", "description": "税区分", "example": "課対仕入(控30)10%" } } }, "tax_rate_r8_exempt_70": { "type": "object", "description": "軽減税率8%・仕入税額控除70%に適用するデフォルト税区分。該当する税区分がない場合は返りません。", "required": [ "code", "name" ], "properties": { "code": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647, "description": "税区分コード", "example": 1 }, "name": { "type": "string", "description": "税区分", "example": "課対仕入(控70)8%(軽)" } } }, "tax_rate_r8_exempt_30": { "type": "object", "description": "軽減税率8%・仕入税額控除30%に適用するデフォルト税区分。該当する税区分がない場合は返りません。", "required": [ "code", "name" ], "properties": { "code": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647, "description": "税区分コード", "example": 1 }, "name": { "type": "string", "description": "税区分", "example": "課対仕入(控30)8%(軽)" } } } } } } } } } } }, "account_groups": { "type": "array", "description": "勘定科目を決算書上で集約するための決算書表示名(小カテゴリー)の一覧", "items": { "required": [ "account_category_id", "account_structure_id", "company_id", "created_at", "detail_type", "id", "index", "name", "updated_at" ], "type": "object", "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "決算書表示名(小カテゴリー)を識別するID", "example": 1 }, "name": { "type": "string", "description": "決算書に表示する小カテゴリー名", "example": "預託金" }, "account_structure_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "決算書表示名が属する勘定科目体系のID", "example": 1 }, "account_category_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "決算書表示名が属する勘定科目カテゴリーのID", "example": 1 }, "company_id": { "type": "integer", "format": "int64", "description": "事業所ID", "example": 1 }, "detail_type": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 4, "description": "補助項目種別(現状は常に `0`(補助項目なし)が返ります)", "example": 0, "enum": [ 0, 1, 2, 3, 4 ] }, "index": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647, "description": "決算書表示名の並び順。小さい値ほど先に表示されます。", "example": 1 }, "created_at": { "type": "string", "format": "date-time", "nullable": true, "description": "作成日時(ISO 8601)。記録されていない場合は null になります。", "example": "2019-12-17T13:47:24+09:00" }, "updated_at": { "type": "string", "format": "date-time", "nullable": true, "description": "更新日時(ISO 8601)。記録されていない場合は null になります。", "example": "2019-12-17T13:47:24+09:00" } } } } } }, "item": { "required": [ "company_id", "id", "name", "update_date", "available", "shortcut1", "shortcut2" ], "type": "object", "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "品目ID。品目の取得・更新・削除APIのパスパラメータや、取引作成時の明細(details)の item_id に指定します。", "example": 101 }, "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID", "example": 1 }, "name": { "type": "string", "maxLength": 30, "description": "品目名 (30文字以内)。事業所内で重複しません。", "example": "タクシー代" }, "update_date": { "type": "string", "description": "品目の最終更新日 (yyyy-mm-dd, JST)。品目一覧の取得APIの start_update_date / end_update_date による絞り込みの対象です。", "example": "2019-12-17" }, "available": { "type": "boolean", "description": "品目の使用設定(true: 使用する、false: 使用しない)\n
\n", "example": true }, "shortcut1": { "type": "string", "description": "ショートカット1 (20文字以内)。Web画面などで品目を検索する際のキーワードとして使用します。未設定の場合は null が返ります。", "example": "TAXI", "nullable": true }, "shortcut2": { "type": "string", "description": "ショートカット2 (20文字以内)。Web画面などで品目を検索する際のキーワードとして使用します。未設定の場合は null が返ります。", "example": "201", "nullable": true }, "code": { "type": "string", "maxLength": 20, "description": "品目コード (20文字以内)。事業所の設定で品目コードを使用する設定にしている場合のみレスポンスに含まれます(設定が無効の場合は code キー自体が返りません)。品目コードが未設定の品目では null が返ります。", "example": "code001", "pattern": "^[0-9a-zA-Z_-]+$", "nullable": true } } }, "itemResponse": { "required": [ "item" ], "type": "object", "properties": { "item": { "$ref": "#/components/schemas/item" } } }, "manual_journal": { "type": "object", "required": [ "adjustment", "company_id", "details", "id", "issue_date", "receipt_ids", "ref_number" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "振替伝票ID", "example": 1 }, "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID", "example": 1 }, "issue_date": { "type": "string", "description": "振替伝票の発生日(yyyy-mm-dd)", "example": "2019-12-17" }, "adjustment": { "type": "boolean", "description": "決算整理仕訳フラグ(true: 決算整理仕訳、false: 日常仕訳)", "example": false }, "txn_number": { "type": "string", "description": "仕訳番号。事業所の仕訳番号形式が無効の場合はnullです。作成時のレスポンスには含まれません。", "example": "2CX05", "nullable": true }, "ref_number": { "type": "string", "description": "利用者が振替伝票を管理するための管理番号。未設定の場合はnullです。", "example": "123-456", "nullable": true }, "details": { "type": "array", "description": "振替伝票の貸借行一覧", "items": { "type": "object", "required": [ "account_item_id", "amount", "description", "entry_side", "id", "item_id", "item_name", "partner_id", "partner_code", "partner_long_name", "partner_name", "section_id", "section_name", "tag_ids", "tag_names", "tax_code", "vat" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "貸借行ID", "example": 1 }, "entry_side": { "type": "string", "description": "貸借区分(credit: 貸方、debit: 借方)", "example": "credit", "enum": [ "credit", "debit" ] }, "account_item_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "勘定科目ID", "example": 1 }, "tax_code": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647, "description": "貸借行に適用されている税区分コード", "example": 1 }, "partner_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "取引先ID。取引先が未選択の場合はnullです。", "example": 1, "nullable": true }, "partner_name": { "type": "string", "description": "取引先名。取引先が未選択の場合はnullです。", "example": "freee", "nullable": true }, "partner_code": { "type": "string", "description": "取引先コード。事業所の取引先コード利用設定が無効、または取引先が未選択の場合はnullです。", "example": "code001", "nullable": true }, "partner_long_name": { "type": "string", "maxLength": 255, "description": "取引先の正式名称(255文字以内)。取引先が未選択、または正式名称が未設定の場合はnullです。", "example": "freee株式会社", "nullable": true }, "item_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "品目ID。品目が未選択の場合はnullです。", "example": 1, "nullable": true }, "item_name": { "type": "string", "description": "品目名。品目が未選択の場合はnullです。", "example": "freee会計", "nullable": true }, "section_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "部門ID。部門が未選択の場合はnullです。", "example": 1, "nullable": true }, "section_name": { "type": "string", "description": "部門名。部門が未選択の場合はnullです。", "example": "開発部", "nullable": true }, "tag_ids": { "type": "array", "description": "貸借行に付与されているメモタグIDの一覧。未設定の場合は空配列です。", "items": { "type": "integer", "format": "int64", "minimum": 1, "description": "メモタグID", "example": 1 } }, "tag_names": { "type": "array", "description": "貸借行に付与されているメモタグ名の一覧。未設定の場合は空配列です。", "items": { "type": "string", "description": "メモタグ", "example": "メモタグ" } }, "segment_1_tag_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメント1タグID。契約プランでセグメント1が利用できる場合のみ含まれ、未選択の場合はnullです。", "example": 1, "nullable": true }, "segment_1_tag_name": { "type": "string", "description": "セグメント1タグ名。契約プランでセグメント1が利用できる場合のみ含まれ、未選択の場合はnullです。", "example": "セグメント1", "nullable": true }, "segment_2_tag_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメント2タグID。契約プランでセグメント2が利用できる場合のみ含まれ、未選択の場合はnullです。", "example": 1, "nullable": true }, "segment_2_tag_name": { "type": "string", "description": "セグメント2タグ名。契約プランでセグメント2が利用できる場合のみ含まれ、未選択の場合はnullです。", "example": "セグメント2", "nullable": true }, "segment_3_tag_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメント3タグID。契約プランでセグメント3が利用できる場合のみ含まれ、未選択の場合はnullです。", "example": 1, "nullable": true }, "segment_3_tag_name": { "type": "string", "description": "セグメント3タグ名。契約プランでセグメント3が利用できる場合のみ含まれ、未選択の場合はnullです。", "example": "セグメント3", "nullable": true }, "account_item_code": { "type": "string", "nullable": true, "description": "勘定科目コード。事業所の勘定科目コード利用設定が有効な場合のみ含まれ、コードが未設定の場合はnullです。", "example": "code001" }, "item_code": { "type": "string", "nullable": true, "description": "品目コード。事業所の品目コード利用設定が有効な場合のみ含まれ、品目が未選択またはコードが未設定の場合はnullです。", "example": "code001" }, "section_code": { "type": "string", "nullable": true, "description": "部門コード。事業所の部門コード利用設定が有効な場合のみ含まれ、部門が未選択またはコードが未設定の場合はnullです。", "example": "code001" }, "segment_1_tag_code": { "type": "string", "nullable": true, "description": "セグメント1タグコード。セグメント1と事業所のセグメントタグコード利用設定が有効な場合のみ含まれ、未選択の場合はnullです。", "example": "code001" }, "segment_2_tag_code": { "type": "string", "nullable": true, "description": "セグメント2タグコード。セグメント2と事業所のセグメントタグコード利用設定が有効な場合のみ含まれ、未選択の場合はnullです。", "example": "code001" }, "segment_3_tag_code": { "type": "string", "nullable": true, "description": "セグメント3タグコード。セグメント3と事業所のセグメントタグコード利用設定が有効な場合のみ含まれ、未選択の場合はnullです。", "example": "code001" }, "amount": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 2147483647, "description": "取引金額(税込・円)", "example": 108000 }, "vat": { "type": "integer", "format": "int64", "description": "消費税額(円)", "example": 8000 }, "description": { "type": "string", "description": "備考", "example": "備考" } } } }, "receipt_ids": { "type": "array", "description": "振替伝票に添付されているファイルボックス(証憑ファイル)IDの一覧。未添付の場合は空配列です。", "example": [ 1, 2, 3 ], "items": { "type": "integer", "format": "int64", "minimum": 1 } } } }, "manualJournalResponse": { "type": "object", "required": [ "manual_journal" ], "properties": { "manual_journal": { "$ref": "#/components/schemas/manual_journal" } } }, "tagParams": { "required": [ "company_id", "name" ], "type": "object", "properties": { "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID。メモタグを作成・更新する対象の事業所を指定します。", "example": 1 }, "name": { "type": "string", "maxLength": 30, "description": "メモタグ名 (30文字以内)。事業所内で重複できません。既に同名のメモタグが存在する場合は 400 エラーになります。", "example": "プロジェクトA" }, "shortcut1": { "type": "string", "maxLength": 20, "description": "ショートカット1 (20文字以内)。Web画面などでメモタグを検索する際のキーワードとして使用します。更新時に省略した場合は未設定(null)に更新されます。", "example": "PROJECTA" }, "shortcut2": { "type": "string", "maxLength": 20, "description": "ショートカット2 (20文字以内)。Web画面などでメモタグを検索する際のキーワードとして使用します。更新時に省略した場合は未設定(null)に更新されます。", "example": "101" } } }, "tag": { "type": "object", "required": [ "company_id", "id", "name", "update_date", "shortcut1", "shortcut2" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "メモタグID。メモタグの取得・更新・削除 API のパスパラメータや、取引作成時の明細に指定します。", "example": 101 }, "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "メモタグが属する事業所のID", "example": 1 }, "name": { "type": "string", "maxLength": 30, "description": "メモタグ名 (30文字以内)。事業所内で重複しません。", "example": "プロジェクトA" }, "update_date": { "type": "string", "format": "date", "description": "メモタグの最終更新日 (yyyy-mm-dd, JST)。メモタグ一覧の取得 API の start_update_date / end_update_date による絞り込みの対象です。", "example": "2019-12-17" }, "shortcut1": { "type": "string", "maxLength": 255, "description": "ショートカット1。Web画面などでメモタグを検索する際のキーワードとして使用します。未設定の場合は null が返ります。", "example": "PROJECTA", "nullable": true }, "shortcut2": { "type": "string", "maxLength": 255, "description": "ショートカット2。Web画面などでメモタグを検索する際のキーワードとして使用します。未設定の場合は null が返ります。", "example": "101", "nullable": true } } }, "tagResponse": { "type": "object", "required": [ "tag" ], "properties": { "tag": { "$ref": "#/components/schemas/tag" } } }, "companyIndexResponse": { "type": "object", "required": [ "companies" ], "properties": { "companies": { "type": "array", "description": "アクセストークンのユーザーが所属する事業所の一覧", "items": { "type": "object", "required": [ "company_number", "display_name", "id", "name", "name_kana", "role" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID。他のAPIで事業所を指定するパラメータ(company_id)にはこの値を使用する", "example": 1 }, "name": { "type": "string", "description": "事業所の正式名称 (100文字以内)。未設定の場合は null", "example": "freee事務所", "nullable": true }, "name_kana": { "type": "string", "description": "事業所の正式名称フリガナ (100文字以内)。未設定の場合は null", "example": "フリージムショ", "nullable": true }, "display_name": { "type": "string", "description": "事業所の表示名。freee上の画面表示に使用される名称", "example": "freee事務所", "nullable": true }, "company_number": { "type": "string", "description": "事業所番号(ハイフン無し・半角英数字10桁)", "example": "97e576421b" }, "role": { "type": "string", "description": "アクセストークンのユーザーがこの事業所で持つ権限\n\n* admin - 管理者\n* simple_accounting - 一般(経理)\n* read_only - 取引登録のみ\n* self_only - 閲覧のみ\n* workflow - 申請・承認", "example": "admin", "enum": [ "admin", "simple_accounting", "self_only", "read_only", "workflow" ] } } } } } }, "companyResponse": { "type": "object", "required": [ "company" ], "properties": { "company": { "type": "object", "required": [ "amount_fraction", "company_number", "contact_name", "corporate_number", "default_wallet_account_id", "display_name", "fax", "fiscal_years", "head_count", "id", "industry_class", "industry_code", "invoice_layout", "minus_format", "name", "name_kana", "org_code", "phone1", "phone2", "prefecture_code", "private_settlement", "role", "street_name1", "street_name2", "tax_at_source_calc_type", "txn_number_format", "use_partner_code", "workflow_setting", "zipcode" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID。他のAPIで事業所を指定するパラメータ(company_id)にはこの値を使用する", "example": 1 }, "name": { "type": "string", "maxLength": 100, "description": "事業所の正式名称 (100文字以内)。未設定の場合は null", "example": "freee事務所", "nullable": true }, "name_kana": { "type": "string", "maxLength": 100, "description": "事業所の正式名称フリガナ (100文字以内)。未設定の場合は null", "example": "フリージムショ", "nullable": true }, "display_name": { "type": "string", "description": "事業所の表示名。freee上の画面表示に使用される名称", "example": "freee事務所", "nullable": true }, "tax_at_source_calc_type": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 1, "description": "源泉徴収税計算(0: 消費税を含める、1: 消費税を含めない)", "example": 0 }, "contact_name": { "type": "string", "maxLength": 50, "description": "担当者名 (50文字以内)。未設定の場合は null", "example": "user1", "nullable": true }, "head_count": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 99, "description": "従業員数(0: 経営者のみ、1: 2〜5人、2: 6〜10人、3: 11〜20人、4: 21〜30人、5: 31〜40人、6: 41〜100人、7: 100人以上、13: 21〜50人、14: 51〜100人、15: 101〜300人、16: 501〜1000人、17: 1001人以上、18: 301〜500人)。未設定の場合は null", "example": 1, "nullable": true }, "corporate_number": { "type": "string", "description": "法人番号 (半角数字13桁、法人のみ)。未設定の場合および個人事業主の場合は空文字", "example": "1234567890123" }, "txn_number_format": { "type": "string", "description": "仕訳番号形式(not_used: 使用しない、digits: 数字(例:5091824)、alnum: 英数字(例:59J0P))", "example": "not_used", "enum": [ "not_used", "digits", "alnum" ] }, "default_wallet_account_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "デフォルトの決済口座が紐づく勘定科目ID。未設定の場合は null", "example": 1, "nullable": true }, "private_settlement": { "type": "boolean", "description": "プライベート資金/役員資金(false: 使用しない、true: 使用する)", "example": true }, "minus_format": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 1, "description": "マイナスの表示方法(0: -、 1: △)", "example": 0 }, "org_code": { "type": "integer", "minimum": 1, "maximum": 2, "description": "事業所種別コード(1: 法人、 2: 個人事業主)", "example": 1 }, "company_number": { "type": "string", "description": "事業所番号(ハイフン無し・半角英数字10桁)", "example": "97e576421b" }, "role": { "type": "string", "description": "アクセストークンのユーザーがこの事業所で持つ権限\n\n* admin - 管理者\n* simple_accounting - 一般(経理)\n* read_only - 取引登録のみ\n* self_only - 閲覧のみ\n* workflow - 申請・承認", "example": "admin", "enum": [ "admin", "simple_accounting", "self_only", "read_only", "workflow" ] }, "phone1": { "type": "string", "description": "電話番号1。未設定の場合は null", "example": "03-1234-xxxx", "nullable": true }, "phone2": { "type": "string", "description": "電話番号2。未設定の場合は null", "example": "090-1234-xxxx", "nullable": true }, "fax": { "type": "string", "description": "FAX番号。未設定の場合は null", "example": "03-1234-xxxx", "nullable": true }, "zipcode": { "type": "string", "description": "郵便番号。未設定の場合は null", "example": "000-0000", "nullable": true }, "prefecture_code": { "type": "integer", "format": "int64", "minimum": -1, "maximum": 46, "description": "都道府県コード(-1: 設定しない、0: 北海道、1:青森、2:岩手、3:宮城、4:秋田、5:山形、6:福島、7:茨城、8:栃木、9:群馬、10:埼玉、11:千葉、12:東京、13:神奈川、14:新潟、15:富山、16:石川、17:福井、18:山梨、19:長野、20:岐阜、21:静岡、22:愛知、23:三重、24:滋賀、25:京都、26:大阪、27:兵庫、28:奈良、29:和歌山、30:鳥取、31:島根、32:岡山、33:広島、34:山口、35:徳島、36:香川、37:愛媛、38:高知、39:福岡、40:佐賀、41:長崎、42:熊本、43:大分、44:宮崎、45:鹿児島、46:沖縄", "example": 4, "nullable": true }, "street_name1": { "type": "string", "description": "市区町村・番地。未設定の場合は null", "example": "XX区YY1−1−1", "nullable": true }, "street_name2": { "type": "string", "description": "建物名・部屋番号など。未設定の場合は null", "example": "ビル1F", "nullable": true }, "invoice_layout": { "type": "string", "description": "請求書レイアウト\n* `default_classic` - レイアウト1/クラシック (デフォルト)\n\n* `standard_classic` - レイアウト2/クラシック\n\n* `envelope_classic` - 封筒1/クラシック\n\n* `carried_forward_standard_classic` - レイアウト3(繰越金額欄あり)/クラシック\n\n* `carried_forward_envelope_classic` - 封筒2(繰越金額欄あり)/クラシック\n\n* `default_modern` - レイアウト1/モダン\n\n* `standard_modern` - レイアウト2/モダン\n\n* `envelope_modern` - 封筒/モダン", "example": "default_classic", "enum": [ "default_classic", "standard_classic", "envelope_classic", "carried_forward_standard_classic", "carried_forward_envelope_classic", "default_modern", "standard_modern", "envelope_modern" ] }, "amount_fraction": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2, "description": "金額端数処理方法(0: 切り捨て、1: 切り上げ、2: 四捨五入)", "example": 0 }, "use_partner_code": { "type": "boolean", "description": "取引先コードの利用設定(true: 有効、 false: 無効)", "example": true }, "industry_class": { "type": "string", "nullable": true, "description": "種別(agriculture_forestry_fisheries_ore: 農林水産業/鉱業,construction: 建設,manufacturing_processing: 製造/加工,it: IT,transportation_logistics: 運輸/物流,retail_wholesale: 小売/卸売,finance_insurance: 金融/保険,real_estate_rental: 不動産/レンタル,profession: 士業/学術/専門技術サービス,design_production: デザイン/制作,food: 飲食,leisure_entertainment: レジャー/娯楽,lifestyle: 生活関連サービス,education: 教育/学習支援,medical_welfare: 医療/福祉,other_services: その他サービス,other_association: NPO、一般社団法人等,other: その他, \"\": 未選択)", "example": "agriculture_forestry_fisheries_ore", "enum": [ "agriculture_forestry_fisheries_ore", "construction", "manufacturing_processing", "it", "transportation_logistics", "retail_wholesale", "finance_insurance", "real_estate_rental", "profession", "design_production", "food", "leisure_entertainment", "lifestyle", "education", "medical_welfare", "other_services", "other_association", "other", "" ] }, "industry_code": { "type": "string", "nullable": true, "description": "### 業種 法人
\n - '': 未選択\n - agriculture: 農業\n - forestry: 林業\n - fishing_industry: 漁業、水産養殖業\n - mining: 鉱業、採石業、砂利採取業\n - civil_contractors: 土木工事業\n - pavement: 舗装工事業\n - carpenter: とび、大工、左官等の建設工事業\n - renovation: リフォーム工事業\n - electrical_plumbing: 電気、管工事等の設備工事業\n - grocery: 食料品の製造加工業\n - machinery_manufacturing: 機械器具の製造加工業\n - printing: 印刷業\n - other_manufacturing: その他の製造加工業\n - software_development: 受託:ソフトウェア、アプリ開発業\n - system_development: 受託:システム開発業\n - survey_analysis: 受託:調査、分析等の情報処理業\n - server_management: 受託:サーバー運営管理\n - website_production: 受託:ウェブサイト制作\n - online_service_management: オンラインサービス運営業\n - online_advertising_agency: オンライン広告代理店業\n - online_advertising_planning_production: オンライン広告企画・制作業\n - online_media_management: オンラインメディア運営業\n - portal_site_management: ポータルサイト運営業\n - other_it_services: その他、IT サービス業\n - transport_delivery: 輸送業、配送業\n - delivery: バイク便等の配達業\n - other_transportation_logistics: その他の運輸業、物流業\n - other_wholesale: 卸売業:その他\n - clothing_wholesale_fiber: 卸売業:衣類卸売/繊維\n - food_wholesale: 卸売業:飲食料品\n - entrusted_development_wholesale: 卸売業:機械器具\n - online_shop: 小売業:無店舗 オンラインショップ\n - fashion_grocery_store: 小売業:店舗あり ファッション、雑貨\n - food_store: 小売業:店舗あり 生鮮食品、飲食料品\n - entrusted_store: 小売業:店舗あり 機械、器具\n - other_store: 小売業:店舗あり その他\n - financial_instruments_exchange: 金融業:金融商品取引\n - commodity_futures_investment_advisor: 金融業:商品先物取引、商品投資顧問\n - other_financial: 金融業:その他\n - brokerage_insurance: 保険業:仲介、代理\n - other_insurance: 保険業:その他\n - real_estate_developer: 不動産業:ディベロッパー\n - real_estate_brokerage: 不動産業:売買、仲介\n - rent_coin_parking_management: 不動産業:賃貸、コインパーキング、管理\n - rental_office_co_working_space: 不動産業:レンタルオフィス、コワーキングスペース\n - rental_lease: レンタル業、リース業\n - cpa_tax_accountant: 士業:公認会計士事務所、税理士事務所\n - law_office: 士業:法律事務所\n - judicial_and_administrative_scrivener: 士業:司法書士事務所/行政書士事務所\n - labor_consultant: 士業:社会保険労務士事務所\n - other_profession: 士業:その他\n - business_consultant: 経営コンサルタント\n - academic_research_development: 学術・開発研究機関\n - advertising_agency: 広告代理店\n - advertising_planning_production: 広告企画/制作\n - design_development: ソフトウェア、アプリ開発業(受託)\n - apparel_industry_design: 服飾デザイン業、工業デザイン業\n - website_design: ウェブサイト制作(受託)\n - advertising_planning_design: 広告企画/制作業\n - other_design: その他、デザイン/制作\n - restaurants_coffee_shops: レストラン、喫茶店等の飲食店業\n - sale_of_lunch: 弁当の販売業\n - bread_confectionery_manufacture_sale: パン、菓子等の製造販売業\n - delivery_catering_mobile_catering: デリバリー業、ケータリング業、移動販売業\n - hotel_inn: 宿泊業:ホテル、旅館\n - homestay: 宿泊業:民泊\n - travel_agency: 旅行代理店業\n - leisure_sports_facility_management: レジャー、スポーツ等の施設運営業\n - show_event_management: ショー、イベント等の興行、イベント運営業\n - barber: ビューティ、ヘルスケア業:床屋、理容室\n - beauty_salon: ビューティ、ヘルスケア業:美容室\n - spa_sand_bath_sauna: ビューティ、ヘルスケア業:スパ、砂風呂、サウナ等\n - este_ail_salon: ビューティ、ヘルスケア業:その他、エステサロン、ネイルサロン等\n - bridal_planning_introduce_wedding: 冠婚葬祭業:ブライダルプランニング、結婚式場紹介等\n - memorial_ceremony_funeral: 冠婚葬祭業:メモリアルセレモニー、葬儀等\n - moving: 引っ越し業\n - courier_industry: 宅配業\n - house_maid_cleaning_agency: 家事代行サービス業:無店舗 ハウスメイド、掃除代行等\n - re_tailoring_clothes: 家事代行サービス業:店舗あり 衣類修理、衣類仕立て直し等\n - training_institute_management: 研修所等の施設運営業\n - tutoring_school: 学習塾、進学塾等の教育・学習支援業\n - music_calligraphy_abacus_classroom: 音楽教室、書道教室、そろばん教室等の教育・学習支援業\n - english_school: 英会話スクール等の語学学習支援業\n - tennis_yoga_judo_school: テニススクール、ヨガ教室、柔道場等のスポーツ指導、支援業\n - culture_school: その他、カルチャースクール等の教育・学習支援業\n - seminar_planning_management: セミナー等の企画、運営業\n - hospital_clinic: 医療業:病院、一般診療所、クリニック等\n - dental_clinic: 医療業:歯科診療所\n - other_medical_services: 医療業:その他、医療サービス等\n - nursery: 福祉業:保育所等、児童向け施設型サービス\n - nursing_home: 福祉業:老人ホーム等、老人向け施設型サービス\n - rehabilitation_support_services: 福祉業:療育支援サービス等、障害者等向け施設型サービス\n - other_welfare: 福祉業:その他、施設型福祉サービス\n - visit_welfare_service: 福祉業:訪問型福祉サービス\n - recruitment_temporary_staffing: 人材紹介業、人材派遣業\n - life_related_recruitment_temporary_staffing: 生活関連サービスの人材紹介業、人材派遣業\n - car_maintenance_car_repair: 自動車整備業、自動車修理業\n - machinery_equipment_maintenance_repair: 機械機器類の整備業、修理業\n - cleaning_maintenance_building_management: 清掃業、メンテナンス業、建物管理業\n - security: 警備業\n - other_services: その他のサービス業\n - npo: 'NPO'\n - general_incorporated_association: '一般社団法人'\n - general_incorporated_foundation: '一般財団法人'\n - other_association: 'その他組織'\n
\n
\n### 業種 個人
\n - '': 未選択\n - manufacturing: 製造業\n - education: 教育\n - medical: 医療/福祉\n - ict: ソフトウェア・情報サービス業\n - food: 飲食業\n - construction: 建設業\n - transportation: 運送業\n - trading: 卸売業\n - retail: 小売業\n - finance: 金融/保険業\n - real_estate: 不動産業\n - agriculture: 農業\n - travel: 旅行・宿泊業\n - accountant: 専門業(税理士・会計士)\n - lawer: その他専門業(法律など)\n - consultant: サービス業(コンサルティング)\n - recruit: サービス業(人材)\n - publication: サービス業(出版)\n - design: サービス業(デザイン)\n - barber: サービス業(理容・美容)\n - others: その他サービス業\n - company_employee: 会社員\n - others_side_business: その他(副業や株取引のみなど)\n - others_deduction: その他(医療費などの控除のみ)\n - default: 未定", "enum": [ "", "agriculture", "forestry", "fishing_industry", "mining", "civil_contractors", "pavement", "carpenter", "renovation", "electrical_plumbing", "grocery", "machinery_manufacturing", "printing", "other_manufacturing", "software_development", "system_development", "survey_analysis", "server_management", "website_production", "online_service_management", "online_advertising_agency", "online_advertising_planning_production", "online_media_management", "portal_site_management", "other_it_services", "transport_delivery", "delivery", "other_transportation_logistics", "other_wholesale", "clothing_wholesale_fiber", "food_wholesale", "entrusted_development_wholesale", "online_shop", "fashion_grocery_store", "food_store", "entrusted_store", "other_store", "financial_instruments_exchange", "commodity_futures_investment_advisor", "other_financial", "brokerage_insurance", "other_insurance", "real_estate_developer", "real_estate_brokerage", "rent_coin_parking_management", "rental_office_co_working_space", "rental_lease", "cpa_tax_accountant", "law_office", "judicial_and_administrative_scrivener", "labor_consultant", "other_profession", "business_consultant", "academic_research_development", "advertising_agency", "advertising_planning_production", "design_development", "apparel_industry_design", "website_design", "advertising_planning_design", "other_design", "restaurants_coffee_shops", "sale_of_lunch", "bread_confectionery_manufacture_sale", "delivery_catering_mobile_catering", "hotel_inn", "homestay", "travel_agency", "leisure_sports_facility_management", "show_event_management", "barber", "beauty_salon", "spa_sand_bath_sauna", "este_ail_salon", "bridal_planning_introduce_wedding", "memorial_ceremony_funeral", "moving", "courier_industry", "house_maid_cleaning_agency", "re_tailoring_clothes", "training_institute_management", "tutoring_school", "music_calligraphy_abacus_classroom", "english_school", "tennis_yoga_judo_school", "culture_school", "seminar_planning_management", "hospital_clinic", "dental_clinic", "other_medical_services", "nursery", "nursing_home", "rehabilitation_support_services", "other_welfare", "visit_welfare_service", "recruitment_temporary_staffing", "life_related_recruitment_temporary_staffing", "car_maintenance_car_repair", "machinery_equipment_maintenance_repair", "cleaning_maintenance_building_management", "security", "other_services", "npo", "general_incorporated_association", "general_incorporated_foundation", "other_association", "manufacturing", "education", "medical", "ict", "food", "construction", "transportation", "trading", "retail", "finance", "real_estate", "travel", "accountant", "lawer", "consultant", "recruit", "publication", "design", "others", "company_employee", "others_side_business", "others_deduction", "default" ] }, "workflow_setting": { "type": "string", "description": "仕訳承認フロー(enable: 有効、 disable: 無効)", "example": "disable", "enum": [ "enable", "disable" ] }, "fiscal_years": { "type": "array", "description": "会計年度の一覧(現在および過去の有効な会計年度)", "items": { "$ref": "#/components/schemas/fiscal_years" } }, "account_items": { "type": "array", "description": "勘定科目の一覧。クエリパラメータ account_items または details に true を指定した場合のみ返る", "items": { "type": "object", "required": [ "id", "name", "categories" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "勘定科目ID", "example": 1 }, "name": { "type": "string", "description": "勘定科目名 (30文字以内)", "example": "ソフトウェア" }, "shortcut": { "type": "string", "maxLength": 20, "description": "ショートカット1 (20文字以内)", "example": "SOFUTO", "nullable": true }, "categories": { "type": "array", "items": { "type": "string", "description": "勘定科目カテゴリー", "example": "資産" } } } } }, "tax_codes": { "type": "array", "description": "税区分コードの一覧。クエリパラメータ taxes または details に true を指定した場合のみ返る", "items": { "type": "object", "required": [ "code", "name", "name_ja" ], "properties": { "code": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 2147483647, "description": "税区分コード", "example": 21 }, "name": { "type": "string", "description": "税区分名", "example": "sales_with_tax" }, "name_ja": { "type": "string", "description": "税区分名(日本語表示用)", "example": "課税売上" } } } }, "items": { "type": "array", "description": "品目の一覧。クエリパラメータ items または details に true を指定した場合のみ返る", "items": { "type": "object", "required": [ "id", "name" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "品目ID", "example": 101 }, "name": { "type": "string", "maxLength": 30, "description": "品目名 (30文字以内)", "example": "タクシー代" }, "shortcut1": { "type": "string", "description": "ショートカット1 (20文字以内)", "example": "TAXI", "nullable": true }, "shortcut2": { "type": "string", "description": "ショートカット2 (20文字以内)", "example": 201, "nullable": true } } } }, "partners": { "type": "array", "description": "取引先の一覧。クエリパラメータ partners または details に true を指定した場合のみ返る", "items": { "type": "object", "required": [ "id", "name" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "取引先ID", "example": 1 }, "code": { "type": "string", "description": "取引先コード。取引先コードの利用設定(use_partner_code)が有効な事業所でのみ返る。未設定の場合は null", "example": "code001", "nullable": true }, "name": { "type": "string", "description": "取引先名", "example": "ABC商店" }, "shortcut1": { "type": "string", "maxLength": 255, "description": "ショートカット1 (255文字以内)", "example": "ABC", "nullable": true }, "shortcut2": { "type": "string", "maxLength": 255, "description": "ショートカット2 (255文字以内)", "example": "501", "nullable": true } } } }, "sections": { "type": "array", "description": "部門の一覧。クエリパラメータ sections または details に true を指定した場合のみ返る", "items": { "type": "object", "required": [ "id", "name" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "部門ID", "example": 1 }, "name": { "type": "string", "maxLength": 30, "description": "部門名 (30文字以内)", "example": "開発部門" }, "shortcut1": { "type": "string", "maxLength": 20, "description": "ショートカット1 (20文字以内)", "example": "DEVELOPER", "nullable": true }, "shortcut2": { "type": "string", "maxLength": 20, "description": "ショートカット2 (20文字以内)", "example": "123", "nullable": true }, "indent_count": { "type": "integer", "format": "int64", "minimum": 0, "description": "部門階層\n
\n※ indent_count が 0 のときは第一階層の親部門です。\n
\n※ 部門階層機能が利用できるプラン(法人: ベーシックプラン以上、個人: プレミアムプラン)の場合のみ返ります。\n", "example": 0 }, "parent_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "親部門ID\n
\n※ parent_id が null のときは第一階層の親部門です。\n
\n※ 部門階層機能が利用できるプラン(法人: ベーシックプラン以上、個人: プレミアムプラン)の場合のみ返ります。\n", "example": 1, "nullable": true } } } }, "tags": { "type": "array", "description": "メモタグの一覧。クエリパラメータ tags または details に true を指定した場合のみ返る", "items": { "type": "object", "required": [ "id", "name" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "タグID", "example": 1 }, "name": { "type": "string", "maxLength": 30, "description": "名前(30文字以内)", "example": "メモタグ" }, "shortcut1": { "type": "string", "maxLength": 255, "description": "ショートカット1 (255文字以内)", "example": "MEMOTAG", "nullable": true }, "shortcut2": { "type": "string", "maxLength": 255, "description": "ショートカット2 (255文字以内)", "example": "123", "nullable": true } } } }, "walletables": { "type": "array", "description": "口座の一覧(操作ユーザーが利用可能な口座のみ)。クエリパラメータ walletables または details に true を指定した場合のみ返る", "items": { "type": "object", "required": [ "id", "name", "type" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "口座ID", "example": 1 }, "name": { "type": "string", "maxLength": 255, "description": "口座名 (255文字以内)", "example": "freee銀行" }, "type": { "type": "string", "description": "口座区分\n\n* bank_account - 銀行口座\n* credit_card - クレジットカード\n* wallet - 現金", "example": "bank_account", "enum": [ "bank_account", "credit_card", "wallet" ] } } } } } } } }, "unauthorizedError": { "type": "object", "properties": { "message": { "type": "string" }, "messages": { "type": "string" } } }, "forbiddenError": { "type": "object", "properties": { "message": { "type": "string" }, "messages": { "type": "string" } } }, "badRequestError": { "type": "object", "properties": { "status_code": { "type": "integer", "example": 400 }, "errors": { "type": "array", "items": { "required": [ "messages", "type" ], "type": "object", "properties": { "messages": { "type": "array", "items": { "type": "string", "example": "不正なリクエストです。" } }, "type": { "type": "string", "example": "validation", "enum": [ "status", "validation", "error" ] } } } } } }, "badRequestNotFoundError": { "type": "object", "properties": { "status_code": { "type": "integer", "example": 404 }, "errors": { "type": "array", "items": { "required": [ "messages", "type" ], "type": "object", "properties": { "messages": { "type": "array", "items": { "type": "string", "example": "リソースが見つかりません。" } }, "type": { "type": "string", "example": "validation", "enum": [ "status", "validation", "error" ] } } } } } }, "conflictError": { "type": "object", "properties": { "status_code": { "type": "integer", "example": 409 }, "errors": { "type": "array", "items": { "required": [ "messages", "type" ], "type": "object", "properties": { "messages": { "type": "array", "items": { "type": "string", "example": "リクエストが競合しました。" } }, "type": { "type": "string", "example": "validation", "enum": [ "status", "validation", "error" ] } } } } } }, "tooManyRequestsError": { "type": "object", "required": [ "status_code", "meta" ], "properties": { "status_code": { "type": "integer", "example": 429 }, "meta": { "required": [ "limit", "remaining", "reset" ], "type": "object", "properties": { "limit": { "type": "integer", "description": "設定されている上限値", "example": 100 }, "period": { "type": "integer", "description": "使用回数をカウントする期間 (秒)", "example": 5 }, "remaining": { "type": "integer", "description": "上限に達するまでの使用可能回数", "example": 0 }, "reset": { "type": "string", "description": "(上限値に達した場合)使用回数がリセットされる時刻", "example": "2019-12-17T18:30:24+09:00" } } } } }, "internalServerError": { "type": "object", "properties": { "status_code": { "type": "integer", "example": 500 }, "errors": { "type": "array", "items": { "required": [ "messages", "type" ], "type": "object", "properties": { "messages": { "type": "array", "items": { "type": "string", "example": "エラーが発生しました。" } }, "type": { "type": "string", "example": "status", "enum": [ "status", "validation", "error" ] } } } } } }, "serviceUnavailableError": { "type": "object", "required": [ "status_code", "errors" ], "properties": { "status_code": { "type": "integer", "example": 503 }, "errors": { "type": "array", "items": { "required": [ "messages", "type" ], "type": "object", "properties": { "messages": { "type": "array", "items": { "type": "string", "example": "このAPIは現在ご利用いただけません。" } }, "type": { "type": "string", "example": "error", "enum": [ "status", "error" ] } } } } } }, "partnersResponse": { "required": [ "partners" ], "type": "object", "description": "取引先一覧のレスポンス。GET /api/1/partners で返される、取引先の配列を包むオブジェクト。", "properties": { "partners": { "type": "array", "description": "取引先の配列。offset / limit / keyword / start_update_date / end_update_date の条件で絞り込まれた結果が id 昇順で返ります。件数がない場合は空配列。", "items": { "type": "object", "required": [ "code", "company_id", "id", "name", "update_date", "available" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "取引先ID。事業所内でユニークな取引先の識別子。取引・請求書などで参照するためのキーになります。", "example": 1 }, "code": { "type": "string", "description": "取引先コード。事業所設定で「取引先コードの利用」が有効な場合のみ実際の値が返り、無効な場合は null が返ります。取引先マスタを外部システムのコードと突合する用途で利用します。", "example": "code001", "nullable": true }, "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID。取引先が属する事業所の識別子。", "example": 1 }, "name": { "type": "string", "description": "取引先名。事業所内で重複しない一意の名称。取引・請求書などで表示・検索に使われます。", "example": "ABC商店" }, "update_date": { "type": "string", "description": "更新日 (yyyy-mm-dd, JST)。取引先情報が最後に更新された日付。start_update_date / end_update_date による絞り込みキーになります。", "example": "2024-12-17" }, "available": { "type": "boolean", "description": "使用可能フラグ。取引先が入力候補として表示可能かを示します。\n" }, "shortcut1": { "type": "string", "maxLength": 255, "description": "ショートカット1 (255 文字以内)。取引先検索用の任意キーワード。Web 画面のショートカット入力で利用されます。", "example": "ABC", "nullable": true }, "shortcut2": { "type": "string", "maxLength": 255, "description": "ショートカット2 (255 文字以内)。shortcut1 に加えて指定できる補助的な検索キーワード。", "example": "501", "nullable": true }, "org_code": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 2, "description": "事業所種別。\n\n", "example": 1, "nullable": true }, "country_code": { "type": "string", "description": "地域。\n\n", "example": "JP" }, "long_name": { "type": "string", "maxLength": 255, "description": "正式名称(255 文字以内)。取引先の正式な法人・屋号名称。請求書などの帳票に印字される名称。", "example": "株式会社ABC商店", "nullable": true }, "name_kana": { "type": "string", "maxLength": 255, "description": "カナ名称(255 文字以内)。取引先名の全角カナ表記。Web 画面のカナ検索で利用されます。", "example": "エービーシーショウテン", "nullable": true }, "default_title": { "type": "string", "description": "敬称。請求書などで取引先名の後ろに付与される敬称。御中、様、(空白) の 3 つから選択します。", "example": "御中", "nullable": true }, "phone": { "type": "string", "description": "電話番号。取引先の連絡先電話番号。フォーマットの制約はありません。", "example": "03-1234-5678", "nullable": true }, "contact_name": { "type": "string", "description": "担当者 氏名。取引先窓口の担当者名。", "example": "freee太郎", "nullable": true }, "email": { "type": "string", "description": "担当者 メールアドレス。取引先窓口の担当者メールアドレス。", "example": "contact@example.com", "nullable": true }, "payer_walletable_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "振込元口座ID(一括振込ファイル用)。この取引先への振込元として設定されている口座 ID。未設定の場合は null。法人スタータープラン(および旧法人プロフェッショナルプラン)未満の事業所ではキー自体が返却されません。", "example": 1, "nullable": true }, "transfer_fee_handling_side": { "type": "string", "description": "振込手数料負担(一括振込ファイル用)。振込手数料をどちらが負担するかを示します。法人スタータープラン(および旧法人プロフェッショナルプラン)未満の事業所ではキー自体が返却されません。\n\n", "example": "payer", "enum": [ "payer", "payee" ] }, "qualified_invoice_issuer": { "type": "boolean", "description": "インボイス制度適格請求書発行事業者フラグ。\n\n国税庁インボイス制度適格請求書発行事業者公表サイト\n", "example": false }, "invoice_registration_number": { "type": "string", "description": "インボイス制度適格請求書発行事業者登録番号。先頭 T + 数字 13 桁の固定 14 文字。未登録の場合は null。\n国税庁インボイス制度適格請求書発行事業者公表サイト\n", "example": "T1000000000001", "nullable": true }, "address_attributes": { "type": "object", "description": "住所情報。取引先に住所が登録されていない場合はキー自体が返却されません。", "properties": { "zipcode": { "type": "string", "description": "郵便番号(ハイフン含む可)。", "example": "000-0000", "nullable": true }, "prefecture_code": { "type": "integer", "format": "int64", "minimum": -1, "maximum": 46, "description": "都道府県コード(-1: 設定しない、0:北海道、1:青森、2:岩手、3:宮城、4:秋田、5:山形、6:福島、7:茨城、8:栃木、9:群馬、10:埼玉、11:千葉、12:東京、13:神奈川、14:新潟、15:富山、16:石川、17:福井、18:山梨、19:長野、20:岐阜、21:静岡、22:愛知、23:三重、24:滋賀、25:京都、26:大阪、27:兵庫、28:奈良、29:和歌山、30:鳥取、31:島根、32:岡山、33:広島、34:山口、35:徳島、36:香川、37:愛媛、38:高知、39:福岡、40:佐賀、41:長崎、42:熊本、43:大分、44:宮崎、45:鹿児島、46:沖縄)", "example": 4, "nullable": true }, "street_name1": { "type": "string", "description": "市区町村・番地。", "example": "千代田区丸の内1-1-1", "nullable": true }, "street_name2": { "type": "string", "description": "建物名・部屋番号など。", "example": "freeeビル 10F", "nullable": true } } }, "partner_doc_setting_attributes": { "type": "object", "description": "請求書送付設定。設定されていない場合はキー自体が返却されません。", "properties": { "sending_method": { "type": "string", "description": "請求書送付方法。null の場合は未設定。\n\n", "example": "posting", "enum": [ "email", "posting", "email_and_posting", "pdf_delivery", "pdf_delivery_and_posting" ], "nullable": true } } }, "partner_bank_account_attributes": { "type": "object", "description": "銀行口座情報(この取引先の受取口座)。口座が登録されていない場合はキー自体が返却されません。", "properties": { "bank_name": { "type": "string", "description": "銀行名。", "example": "freee銀行", "nullable": true }, "bank_name_kana": { "type": "string", "description": "銀行名(カナ)。", "example": "フリーギンコウ", "nullable": true }, "bank_code": { "type": "string", "description": "銀行コード(4 桁の統一金融機関コード)。", "example": "0001", "nullable": true }, "branch_name": { "type": "string", "description": "支店名。", "example": "銀座支店", "nullable": true }, "branch_kana": { "type": "string", "description": "支店名(カナ)。", "example": "ギンザシテン", "nullable": true }, "branch_code": { "type": "string", "description": "支店番号(3 桁)。", "example": "999", "nullable": true }, "account_type": { "type": "string", "description": "口座種別。\n\n", "example": "ordinary", "enum": [ "ordinary", "checking", "earmarked", "savings", "other" ], "nullable": true }, "account_number": { "type": "string", "description": "口座番号。", "example": "1010101", "nullable": true }, "account_name": { "type": "string", "description": "受取人名(カナ)。全銀フォーマットで送信する際に使用されます。", "example": "フリータロウ", "nullable": true }, "long_account_name": { "type": "string", "description": "受取人名。振込先の受取人名。", "example": "freee太郎", "nullable": true } } } } } } } }, "partnerResponse": { "required": [ "partner" ], "type": "object", "description": "単一の取引先を包むレスポンス。取得・作成・更新 API で共通に返されます。", "properties": { "partner": { "type": "object", "required": [ "code", "company_id", "id", "name", "update_date", "available" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "取引先ID。事業所内でユニークな取引先の識別子。取引・請求書などで参照するためのキーになります。", "example": 1 }, "code": { "type": "string", "description": "取引先コード。事業所設定で「取引先コードの利用」が有効な場合のみ実際の値が返り、無効な場合は null が返ります。取引先マスタを外部システムのコードと突合する用途で利用します。", "example": "code001", "nullable": true }, "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID。取引先が属する事業所の識別子。", "example": 1 }, "name": { "type": "string", "description": "取引先名。事業所内で重複しない一意の名称。取引・請求書などで表示・検索に使われます。", "example": "ABC商店" }, "update_date": { "type": "string", "description": "更新日 (yyyy-mm-dd, JST)。取引先情報が最後に更新された日付。start_update_date / end_update_date による絞り込みキーになります。", "example": "2024-12-17" }, "available": { "type": "boolean", "description": "使用可能フラグ。取引先が入力候補として表示可能かを示します。\n" }, "shortcut1": { "type": "string", "maxLength": 255, "description": "ショートカット1 (255 文字以内)。取引先検索用の任意キーワード。Web 画面のショートカット入力で利用されます。", "example": "ABC", "nullable": true }, "shortcut2": { "type": "string", "maxLength": 255, "description": "ショートカット2 (255 文字以内)。shortcut1 に加えて指定できる補助的な検索キーワード。", "example": "501", "nullable": true }, "org_code": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 2, "description": "事業所種別。\n\n", "example": 1, "nullable": true }, "country_code": { "type": "string", "description": "地域。\n\n", "example": "JP" }, "long_name": { "type": "string", "maxLength": 255, "description": "正式名称(255 文字以内)。取引先の正式な法人・屋号名称。請求書などの帳票に印字される名称。", "example": "株式会社ABC商店", "nullable": true }, "name_kana": { "type": "string", "maxLength": 255, "description": "カナ名称(255 文字以内)。取引先名の全角カナ表記。Web 画面のカナ検索で利用されます。", "example": "エービーシーショウテン", "nullable": true }, "default_title": { "type": "string", "description": "敬称。請求書などで取引先名の後ろに付与される敬称。御中、様、(空白) の 3 つから選択します。", "example": "御中", "nullable": true }, "phone": { "type": "string", "description": "電話番号。取引先の連絡先電話番号。フォーマットの制約はありません。", "example": "03-1234-5678", "nullable": true }, "contact_name": { "type": "string", "description": "担当者 氏名。取引先窓口の担当者名。", "example": "freee太郎", "nullable": true }, "email": { "type": "string", "description": "担当者 メールアドレス。取引先窓口の担当者メールアドレス。", "example": "contact@example.com", "nullable": true }, "payer_walletable_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "振込元口座ID(一括振込ファイル用)。この取引先への振込元として設定されている口座 ID。未設定の場合は null。法人スタータープラン(および旧法人プロフェッショナルプラン)未満の事業所ではキー自体が返却されません。", "example": 1, "nullable": true }, "transfer_fee_handling_side": { "type": "string", "description": "振込手数料負担(一括振込ファイル用)。振込手数料をどちらが負担するかを示します。法人スタータープラン(および旧法人プロフェッショナルプラン)未満の事業所ではキー自体が返却されません。\n\n", "example": "payer", "enum": [ "payer", "payee" ] }, "qualified_invoice_issuer": { "type": "boolean", "description": "インボイス制度適格請求書発行事業者フラグ。\n\n国税庁インボイス制度適格請求書発行事業者公表サイト\n", "example": false }, "invoice_registration_number": { "type": "string", "description": "インボイス制度適格請求書発行事業者登録番号。先頭 T + 数字 13 桁の固定 14 文字。未登録の場合は null。\n国税庁インボイス制度適格請求書発行事業者公表サイト\n", "example": "T1000000000001", "nullable": true }, "address_attributes": { "type": "object", "description": "住所情報。取引先に住所が登録されていない場合はキー自体が返却されません。", "properties": { "zipcode": { "type": "string", "description": "郵便番号(ハイフン含む可)。", "example": "000-0000", "nullable": true }, "prefecture_code": { "type": "integer", "format": "int64", "minimum": -1, "maximum": 46, "description": "都道府県コード(-1: 設定しない、0:北海道、1:青森、2:岩手、3:宮城、4:秋田、5:山形、6:福島、7:茨城、8:栃木、9:群馬、10:埼玉、11:千葉、12:東京、13:神奈川、14:新潟、15:富山、16:石川、17:福井、18:山梨、19:長野、20:岐阜、21:静岡、22:愛知、23:三重、24:滋賀、25:京都、26:大阪、27:兵庫、28:奈良、29:和歌山、30:鳥取、31:島根、32:岡山、33:広島、34:山口、35:徳島、36:香川、37:愛媛、38:高知、39:福岡、40:佐賀、41:長崎、42:熊本、43:大分、44:宮崎、45:鹿児島、46:沖縄)", "example": 4, "nullable": true }, "street_name1": { "type": "string", "description": "市区町村・番地。", "example": "千代田区丸の内1-1-1", "nullable": true }, "street_name2": { "type": "string", "description": "建物名・部屋番号など。", "example": "freeeビル 10F", "nullable": true } } }, "partner_doc_setting_attributes": { "type": "object", "description": "請求書送付設定。設定されていない場合はキー自体が返却されません。", "properties": { "sending_method": { "type": "string", "description": "請求書送付方法。null の場合は未設定。\n\n", "example": "posting", "enum": [ "email", "posting", "email_and_posting", "pdf_delivery", "pdf_delivery_and_posting" ], "nullable": true } } }, "partner_bank_account_attributes": { "type": "object", "description": "銀行口座情報(この取引先の受取口座)。口座が登録されていない場合はキー自体が返却されません。", "properties": { "bank_name": { "type": "string", "description": "銀行名。", "example": "freee銀行", "nullable": true }, "bank_name_kana": { "type": "string", "description": "銀行名(カナ)。", "example": "フリーギンコウ", "nullable": true }, "bank_code": { "type": "string", "description": "銀行コード(4 桁の統一金融機関コード)。", "example": "0001", "nullable": true }, "branch_name": { "type": "string", "description": "支店名。", "example": "銀座支店", "nullable": true }, "branch_kana": { "type": "string", "description": "支店名(カナ)。", "example": "ギンザシテン", "nullable": true }, "branch_code": { "type": "string", "description": "支店番号(3 桁)。", "example": "999", "nullable": true }, "account_type": { "type": "string", "description": "口座種別。\n\n", "example": "ordinary", "enum": [ "ordinary", "checking", "earmarked", "savings", "other" ], "nullable": true }, "account_number": { "type": "string", "description": "口座番号。", "example": "1010101", "nullable": true }, "account_name": { "type": "string", "description": "受取人名(カナ)。全銀フォーマットで送信する際に使用されます。", "example": "フリータロウ", "nullable": true }, "long_account_name": { "type": "string", "description": "受取人名。振込先の受取人名。", "example": "freee太郎", "nullable": true } } }, "payment_term_attributes": { "type": "object", "description": "支払期日設定。取引先への支払日を締め日基準で計算するための設定。法人スタータープラン(および旧法人プロフェッショナルプラン)未満、または期日設定が登録されていない場合はキー自体が返却されません。", "properties": { "cutoff_day": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 32, "description": "締め日。1〜31 の日付を指定します。29, 30, 31 日の末日を指定する場合は 32 を使います。", "example": 15, "nullable": true }, "additional_months": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 6, "description": "支払月。締め日から数えて何ヶ月後に支払うか。当月を指定する場合は 0。", "example": 1, "nullable": true }, "fixed_day": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 32, "description": "支払日。1〜31 の日付を指定します。29, 30, 31 日の末日を指定する場合は 32 を使います。", "example": 32, "nullable": true } } }, "invoice_payment_term_attributes": { "type": "object", "description": "請求の入金期日設定。取引先からの入金日を締め日基準で計算するための設定。法人スタータープラン(および旧法人プロフェッショナルプラン)未満、または期日設定が登録されていない場合はキー自体が返却されません。", "properties": { "cutoff_day": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 32, "description": "締め日。1〜31 の日付を指定します。29, 30, 31 日の末日を指定する場合は 32 を使います。", "example": 15, "nullable": true }, "additional_months": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 6, "description": "入金月。締め日から数えて何ヶ月後に入金されるか。当月を指定する場合は 0。", "example": 1, "nullable": true }, "fixed_day": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 32, "description": "入金日。1〜31 の日付を指定します。29, 30, 31 日の末日を指定する場合は 32 を使います。", "example": 32, "nullable": true } } } } } } }, "tax": { "type": "object", "required": [ "code", "name", "name_ja" ], "properties": { "code": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 2147483647, "description": "税区分コード。取引の作成(POST /api/1/deals)や振替伝票の作成(POST /api/1/manual_journals)などで税区分を指定する際に tax_code として利用します。", "example": 21 }, "name": { "type": "string", "description": "税区分名(システム識別名)", "example": "sales_with_tax" }, "name_ja": { "type": "string", "description": "税区分名(日本語表示用)。freee会計の画面上で表示される名称です。", "example": "課税売上" } } }, "taxResponse": { "type": "object", "required": [ "tax" ], "properties": { "tax": { "$ref": "#/components/schemas/tax" } } }, "walletable": { "type": "object", "required": [ "bank_id", "id", "name", "type", "update_date" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "口座ID。取引の作成(POST /api/1/deals)や口座振替(POST /api/1/transfers)などで from_walletable_type / to_walletable_type と併せて指定します。", "example": 1 }, "name": { "type": "string", "maxLength": 255, "description": "口座名(255文字以内)", "example": "freee銀行" }, "bank_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "連携サービスID。銀行やクレジットカード等のサービス種別を表します。/api/1/banks(連携サービス一覧の取得)で取得できます。type が wallet で連携サービスに紐づかない口座(現金など)の場合は null になります。", "example": 3, "nullable": true }, "type": { "type": "string", "description": "口座種別。\n* `bank_account` - 銀行口座\n* `credit_card` - クレジットカード\n* `wallet` - その他の決済口座(現金・電子マネー・売掛/買掛など)", "example": "bank_account", "enum": [ "bank_account", "credit_card", "wallet" ] }, "last_synced_at": { "type": "string", "description": "最終同期成功日時(ISO 8601 形式)。リクエスト時に with_last_synced_at=true を指定した場合のみ返却されます。同期成功実績がない場合や、同期に対応しない口座の場合は null になります。", "example": "2019-01-01T00:00:00+09:00", "nullable": true }, "sync_status": { "type": "string", "description": "口座の同期ステータス。リクエスト時に with_sync_status=true を指定した場合のみ返却されます。\n* `success` - 同期成功\n* `disabled` - 同期設定なし\n* `syncing` - 同期中\n* `token_refresh_error` - トークンリフレッシュエラー\n* `unsupported` - 同期非対応\n* `other_error` - その他のエラー(詳細はfreee会計画面上でご確認ください)", "example": "success", "enum": [ "success", "disabled", "syncing", "token_refresh_error", "unsupported", "other_error" ] }, "last_balance": { "type": "integer", "format": "int64", "description": "同期残高(円)。連携サービスから同期した残高です。リクエスト時に with_balance=true を指定した場合のみ返却されます。", "example": 1565583 }, "walletable_balance": { "type": "integer", "format": "int64", "description": "登録残高(円)。freee会計上の取引から計算される、借方を正とする残高です。リクエスト時に with_balance=true を指定した場合のみ返却されます。", "example": 1340261 }, "update_date": { "type": "string", "description": "口座設定の最終更新日(yyyy-mm-dd、JST)", "example": "2020-06-15" } } }, "walletableCreateResponse": { "type": "object", "required": [ "walletable" ], "properties": { "walletable": { "type": "object", "description": "作成された口座", "required": [ "bank_id", "id", "name", "type" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "口座ID", "example": 1 }, "name": { "type": "string", "maxLength": 255, "description": "口座名(255文字以内)", "example": "〇〇銀行" }, "bank_id": { "type": "integer", "format": "int64", "minimum": 1, "nullable": true, "description": "連携サービスID。type が wallet で bank_id を省略して作成した場合は null になります。", "example": 1 }, "type": { "type": "string", "description": "口座種別。\n* `bank_account` - 銀行口座\n* `credit_card` - クレジットカード\n* `wallet` - その他の決済口座(現金・電子マネー・売掛/買掛など)", "example": "bank_account", "enum": [ "bank_account", "credit_card", "wallet" ] } } } } }, "wallet_txn": { "type": "object", "required": [ "amount", "balance", "company_id", "date", "description", "due_amount", "entry_side", "id", "status", "walletable_id", "walletable_type", "rule_matched" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "明細ID", "example": 1 }, "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID", "example": 1 }, "date": { "type": "string", "description": "取引日 (yyyy-mm-dd)", "example": "2019-12-17" }, "amount": { "type": "integer", "format": "int64", "minimum": -9223372036854775808, "maximum": 9223372036854775807, "description": "取引金額(単位: 円)。入金・出金の区別は entry_side で表されます。", "example": 5000 }, "due_amount": { "type": "integer", "format": "int64", "description": "取引登録待ち金額(単位: 円)。明細に対してまだ取引が登録されていない金額を表します。取引が未登録(status が 1)の場合は取引金額と同額になり、取引登録が完了する(status が 2 になる)と 0 になります。", "example": 0 }, "balance": { "type": "integer", "format": "int64", "description": "残高(単位: 円)。銀行口座等の残高が入ります。Webで残高未設定で登録した場合や、口座明細の作成APIで balance を指定せずに登録した場合などは null になります。", "example": 10000, "nullable": true }, "entry_side": { "type": "string", "description": "入金・出金の区分\n* `income` - 入金\n* `expense` - 出金", "example": "income", "enum": [ "income", "expense" ] }, "walletable_type": { "type": "string", "description": "口座区分\n* `bank_account` - 銀行口座\n* `credit_card` - クレジットカード\n* `wallet` - 現金・その他の決済口座", "example": "bank_account", "enum": [ "bank_account", "credit_card", "wallet" ] }, "walletable_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "口座ID(walletable_type で示される口座のID)。口座の詳細は口座一覧の取得API(GET /api/1/walletables)で確認できます。", "example": 1 }, "description": { "type": "string", "description": "取引内容(銀行やクレジットカードの明細に記載された摘要等)。未設定の場合は空文字列になります。", "example": "振込 カ)ABC" }, "status": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 6, "description": "明細のステータス\n* `1` - 消込待ち(明細に対する取引が未登録の状態)\n* `2` - 消込済み(明細に対する取引の登録が完了した状態)\n* `3` - 無視(取引を登録せず明細を無視した状態)\n* `4` - 消込中(明細の一部の金額のみ取引登録された状態)\n* `6` - 対象外(取引登録の対象外の明細)", "example": 1 }, "rule_matched": { "type": "boolean", "description": "登録時に自動登録ルールの設定が適用され、登録処理が実行された場合、\ntrueになります。〜を推測する、〜の消込をするの条件の場合は一致してもfalseになります。\n", "example": true } } }, "walletTxnResponse": { "type": "object", "required": [ "wallet_txn" ], "properties": { "wallet_txn": { "$ref": "#/components/schemas/wallet_txn" } } }, "transfer": { "type": "object", "required": [ "amount", "company_id", "date", "description", "from_item_code", "from_item_id", "from_partner_code", "from_partner_id", "from_section_code", "from_section_id", "from_tag_ids", "from_walletable_id", "from_walletable_type", "id", "to_walletable_id", "to_walletable_type", "to_walletables" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "取引(振替)ID", "example": 1 }, "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID", "example": 1 }, "amount": { "type": "integer", "format": "int64", "minimum": -9223372036854775808, "maximum": 9223372036854775807, "deprecated": true, "description": "振替金額(円)。振替先が複数ある場合は全行の合計金額を返します。支払手数料が設定されている場合は、支払手数料分を加算した金額を返します。将来廃止予定。振替先の複数指定に対応していないため、to_walletablesの各行amountを利用してください。", "example": 5000 }, "date": { "type": "string", "description": "振替日 (yyyy-mm-dd)", "example": "2019-12-17" }, "from_walletable_type": { "type": "string", "description": "振替元口座の口座区分\n* `bank_account` - 銀行口座\n* `credit_card` - クレジットカード\n* `wallet` - その他の決済口座(現金・電子マネー・売掛/買掛など)", "example": "credit_card", "enum": [ "bank_account", "wallet", "credit_card" ], "nullable": true }, "from_walletable_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "振替元口座ID。口座一覧の取得(GET /api/1/walletables)で取得できるIDです。", "example": 101 }, "from_partner_id": { "type": "integer", "format": "int64", "description": "振替元口座行の取引先ID。取引先が設定されていない場合は0を返します。", "example": 201 }, "from_partner_code": { "type": "string", "description": "振替元口座行の取引先コード。事業所の設定で取引先コードの利用が無効の場合、または取引先が設定されていない場合はnullを返します。", "example": "code001", "nullable": true }, "from_section_id": { "type": "integer", "format": "int64", "description": "振替元口座行の部門ID。部門が設定されていない場合はnullを返します。", "example": 1, "nullable": true }, "from_section_code": { "type": "string", "description": "振替元口座行の部門コード。事業所の設定で部門コードの利用が無効の場合、または部門が設定されていない場合はnullを返します。", "example": "code001", "nullable": true }, "from_item_id": { "type": "integer", "format": "int64", "description": "振替元口座行の品目ID。品目が設定されていない場合はnullを返します。", "example": 501, "nullable": true }, "from_item_code": { "type": "string", "description": "振替元口座行の品目コード。事業所の設定で品目コードの利用が無効の場合、または品目が設定されていない場合はnullを返します。", "example": "code001", "nullable": true }, "from_tag_ids": { "type": "array", "description": "振替元口座行のメモタグID", "example": [ 1, 2, 3 ], "items": { "type": "integer", "format": "int64" } }, "from_segment_1_tag_id": { "type": "integer", "format": "int64", "description": "振替元口座行のセグメント1タグID。セグメントタグが利用できないプランの場合、キー自体がレスポンスに含まれません。セグメント1タグが設定されていない場合はnullを返します。", "example": 1, "nullable": true }, "from_segment_1_tag_code": { "type": "string", "description": "振替元口座行のセグメント1タグコード。セグメントタグが利用できないプランの場合、キー自体がレスポンスに含まれません。事業所の設定でセグメントタグコードの利用が無効の場合、またはセグメント1タグが設定されていない場合はnullを返します。", "example": "code001", "nullable": true }, "from_segment_2_tag_id": { "type": "integer", "format": "int64", "description": "振替元口座行のセグメント2タグID。セグメントタグが利用できないプランの場合、キー自体がレスポンスに含まれません。セグメント2タグが設定されていない場合はnullを返します。", "example": 1, "nullable": true }, "from_segment_2_tag_code": { "type": "string", "description": "振替元口座行のセグメント2タグコード。セグメントタグが利用できないプランの場合、キー自体がレスポンスに含まれません。事業所の設定でセグメントタグコードの利用が無効の場合、またはセグメント2タグが設定されていない場合はnullを返します。", "example": "code001", "nullable": true }, "from_segment_3_tag_id": { "type": "integer", "format": "int64", "description": "振替元口座行のセグメント3タグID。セグメントタグが利用できないプランの場合、キー自体がレスポンスに含まれません。セグメント3タグが設定されていない場合はnullを返します。", "example": 1, "nullable": true }, "from_segment_3_tag_code": { "type": "string", "description": "振替元口座行のセグメント3タグコード。セグメントタグが利用できないプランの場合、キー自体がレスポンスに含まれません。事業所の設定でセグメントタグコードの利用が無効の場合、またはセグメント3タグが設定されていない場合はnullを返します。", "example": "code001", "nullable": true }, "to_walletable_type": { "type": "string", "deprecated": true, "description": "振替先口座の口座区分。振替先が複数ある場合は金額が最大の行の値を返します。将来廃止予定。振替先の複数指定に対応していないため、to_walletablesを利用してください。\n* `bank_account` - 銀行口座\n* `credit_card` - クレジットカード\n* `wallet` - その他の決済口座(現金・電子マネー・売掛/買掛など)", "example": "bank_account", "enum": [ "bank_account", "wallet", "credit_card" ], "nullable": true }, "to_walletable_id": { "type": "integer", "format": "int64", "minimum": 1, "deprecated": true, "description": "振替先口座ID。振替先が複数ある場合は金額が最大の行の値を返します。将来廃止予定。振替先の複数指定に対応していないため、to_walletablesを利用してください。", "example": 201 }, "description": { "type": "string", "deprecated": true, "description": "備考。振替先が複数ある場合は各行の備考を「, 」(カンマと半角スペース)で結合した文字列を返します。備考が未設定の場合はnullを返します。将来廃止予定。振替先の複数指定に対応していないため、to_walletablesの各行descriptionを利用してください。", "example": "備考", "nullable": true }, "to_walletables": { "type": "array", "description": "振替先口座行(複数)。各行に振替先口座・金額・備考を持つ。", "items": { "type": "object", "required": [ "type", "id", "amount", "description", "partner_id", "partner_code", "section_id", "section_code", "item_id", "item_code", "tag_ids" ], "properties": { "type": { "type": "string", "description": "振替先口座の口座区分\n* `bank_account` - 銀行口座\n* `credit_card` - クレジットカード\n* `wallet` - その他の決済口座(現金・電子マネー・売掛/買掛など)", "example": "bank_account", "enum": [ "bank_account", "wallet", "credit_card" ] }, "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "振替先口座ID。口座一覧の取得(GET /api/1/walletables)で取得できるIDです。", "example": 201 }, "amount": { "type": "integer", "format": "int64", "minimum": -9223372036854775808, "maximum": 9223372036854775807, "description": "振替先口座への振替金額(円)", "example": 5000 }, "description": { "type": "string", "description": "備考。振替先の複数指定に対応する以前に作成された取引(振替)では、行の備考が未設定の場合に取引(振替)全体の備考を返します。備考が未設定の場合はnullを返します。", "example": "備考", "nullable": true }, "partner_id": { "type": "integer", "format": "int64", "description": "振替先口座行の取引先ID。取引先が設定されていない場合は0を返します。", "example": 201 }, "partner_code": { "type": "string", "description": "振替先口座行の取引先コード。事業所の設定で取引先コードの利用が無効の場合、または取引先が設定されていない場合はnullを返します。", "example": "code001", "nullable": true }, "section_id": { "type": "integer", "format": "int64", "description": "振替先口座行の部門ID。部門が設定されていない場合はnullを返します。", "example": 1, "nullable": true }, "section_code": { "type": "string", "description": "振替先口座行の部門コード。事業所の設定で部門コードの利用が無効の場合、または部門が設定されていない場合はnullを返します。", "example": "code001", "nullable": true }, "item_id": { "type": "integer", "format": "int64", "description": "振替先口座行の品目ID。品目が設定されていない場合はnullを返します。", "example": 501, "nullable": true }, "item_code": { "type": "string", "description": "振替先口座行の品目コード。事業所の設定で品目コードの利用が無効の場合、または品目が設定されていない場合はnullを返します。", "example": "code001", "nullable": true }, "tag_ids": { "type": "array", "description": "振替先口座行のメモタグID", "example": [ 1, 2, 3 ], "items": { "type": "integer", "format": "int64" } }, "segment_1_tag_id": { "type": "integer", "format": "int64", "description": "振替先口座行のセグメント1タグID。セグメントタグが利用できないプランの場合、キー自体がレスポンスに含まれません。セグメント1タグが設定されていない場合はnullを返します。", "example": 1, "nullable": true }, "segment_1_tag_code": { "type": "string", "description": "振替先口座行のセグメント1タグコード。セグメントタグが利用できないプランの場合、キー自体がレスポンスに含まれません。事業所の設定でセグメントタグコードの利用が無効の場合、またはセグメント1タグが設定されていない場合はnullを返します。", "example": "code001", "nullable": true }, "segment_2_tag_id": { "type": "integer", "format": "int64", "description": "振替先口座行のセグメント2タグID。セグメントタグが利用できないプランの場合、キー自体がレスポンスに含まれません。セグメント2タグが設定されていない場合はnullを返します。", "example": 1, "nullable": true }, "segment_2_tag_code": { "type": "string", "description": "振替先口座行のセグメント2タグコード。セグメントタグが利用できないプランの場合、キー自体がレスポンスに含まれません。事業所の設定でセグメントタグコードの利用が無効の場合、またはセグメント2タグが設定されていない場合はnullを返します。", "example": "code001", "nullable": true }, "segment_3_tag_id": { "type": "integer", "format": "int64", "description": "振替先口座行のセグメント3タグID。セグメントタグが利用できないプランの場合、キー自体がレスポンスに含まれません。セグメント3タグが設定されていない場合はnullを返します。", "example": 1, "nullable": true }, "segment_3_tag_code": { "type": "string", "description": "振替先口座行のセグメント3タグコード。セグメントタグが利用できないプランの場合、キー自体がレスポンスに含まれません。事業所の設定でセグメントタグコードの利用が無効の場合、またはセグメント3タグが設定されていない場合はnullを返します。", "example": "code001", "nullable": true } } } } } }, "transferResponse": { "type": "object", "required": [ "transfer" ], "properties": { "transfer": { "$ref": "#/components/schemas/transfer" } } }, "userParams": { "type": "object", "properties": { "display_name": { "type": "string", "maxLength": 20, "description": "表示名 (20文字以内)。キーを省略した場合は更新されません。空文字を指定すると未設定になります。", "example": "山田太郎" }, "first_name": { "type": "string", "maxLength": 20, "description": "氏名(名) (20文字以内)。キーを省略した場合は更新されません。空文字を指定すると未設定になります。", "example": "太郎" }, "last_name": { "type": "string", "maxLength": 20, "description": "氏名(姓) (20文字以内)。キーを省略した場合は更新されません。空文字を指定すると未設定になります。", "example": "山田" }, "first_name_kana": { "type": "string", "maxLength": 20, "description": "氏名(カナ・名) (20文字以内)。キーを省略した場合は更新されません。空文字を指定すると未設定になります。", "example": "タロウ" }, "last_name_kana": { "type": "string", "maxLength": 20, "description": "氏名(カナ・姓) (20文字以内)。キーを省略した場合は更新されません。空文字を指定すると未設定になります。", "example": "ヤマダ" } } }, "user": { "type": "object", "required": [ "email", "id", "display_name", "first_name", "last_name", "first_name_kana", "last_name_kana" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "ユーザーID", "example": 1 }, "email": { "type": "string", "description": "メールアドレス", "example": "user@example.com" }, "display_name": { "type": "string", "description": "表示名。未設定の場合はnullになります。", "example": "山田太郎", "nullable": true }, "first_name": { "type": "string", "description": "氏名(名)。未設定の場合はnullになります。", "example": "太郎", "nullable": true }, "last_name": { "type": "string", "description": "氏名(姓)。未設定の場合はnullになります。", "example": "山田", "nullable": true }, "first_name_kana": { "type": "string", "description": "氏名(カナ・名)。未設定の場合はnullになります。", "example": "タロウ", "nullable": true }, "last_name_kana": { "type": "string", "description": "氏名(カナ・姓)。未設定の場合はnullになります。", "example": "ヤマダ", "nullable": true } } }, "userResponse": { "type": "object", "required": [ "user" ], "properties": { "user": { "$ref": "#/components/schemas/user" } } }, "meResponse": { "type": "object", "required": [ "user" ], "properties": { "user": { "type": "object", "required": [ "email", "id", "display_name", "first_name", "last_name", "first_name_kana", "last_name_kana" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "ユーザーID", "example": 1 }, "email": { "type": "string", "description": "メールアドレス", "example": "user@example.com" }, "display_name": { "type": "string", "description": "表示名。未設定の場合はnullになります。", "example": "フリー太郎", "nullable": true }, "first_name": { "type": "string", "description": "氏名(名)。未設定の場合はnullになります。", "example": "太郎", "nullable": true }, "last_name": { "type": "string", "description": "氏名(姓)。未設定の場合はnullになります。", "example": "フリー", "nullable": true }, "first_name_kana": { "type": "string", "description": "氏名(カナ・名)。未設定の場合はnullになります。", "example": "タロウ", "nullable": true }, "last_name_kana": { "type": "string", "description": "氏名(カナ・姓)。未設定の場合はnullになります。", "example": "フリー", "nullable": true }, "companies": { "type": "array", "description": "ユーザーが所属する事業所の一覧。リクエストでcompanies=trueを指定した場合のみ返ります。", "items": { "type": "object", "required": [ "display_name", "id", "role", "use_custom_role" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID", "example": 1 }, "display_name": { "type": "string", "description": "事業所の表示名", "example": "freee株式会社" }, "role": { "type": "string", "description": "ユーザーの権限\n\nカスタム権限を使用している場合は、複製元となったプリセット権限の値が返ります。カスタム権限かどうかはuse_custom_roleで判定できます。", "example": "admin", "enum": [ "admin", "simple_accounting", "self_only", "read_only", "workflow", "product_linkage" ] }, "use_custom_role": { "type": "boolean", "description": "カスタム権限(true: 使用する、false: 使用しない)", "example": false }, "advisor_id": { "type": "integer", "format": "int64", "minimum": 1, "nullable": true, "description": "アドバイザープロファイルID。リクエストでcompanies=trueとadvisor=trueを両方指定した場合のみ返ります。アドバイザー事業所でない場合はnullになります。", "example": 1234 } } } } } } } }, "userCapability": { "type": "object", "properties": { "read": { "type": "boolean", "description": "閲覧", "example": true }, "create": { "type": "boolean", "description": "作成", "example": true }, "update": { "type": "boolean", "description": "更新", "example": true }, "destroy": { "type": "boolean", "description": "削除", "example": true } } }, "userCapabilityJustConfirm": { "type": "object", "properties": { "confirm": { "type": "boolean", "description": "操作", "example": true } } }, "userCapabilityJustCreate": { "type": "object", "properties": { "create": { "type": "boolean", "description": "作成", "example": true } } }, "userCapabilityJustCreateRead": { "type": "object", "properties": { "create": { "type": "boolean", "description": "作成", "example": true }, "read": { "type": "boolean", "description": "閲覧", "example": true } } }, "userCapabilityJustRead": { "type": "object", "properties": { "read": { "type": "boolean", "description": "閲覧", "example": true } } }, "userCapabilityJustReadUpdate": { "type": "object", "properties": { "read": { "type": "boolean", "description": "閲覧", "example": true }, "update": { "type": "boolean", "description": "更新", "example": true } } }, "userCapabilityJustReadUpdateDestroy": { "type": "object", "properties": { "read": { "type": "boolean", "description": "閲覧", "example": true }, "update": { "type": "boolean", "description": "更新", "example": true }, "destroy": { "type": "boolean", "description": "削除", "example": true } } }, "userCapabilityJustReadWrite": { "type": "object", "properties": { "read": { "type": "boolean", "description": "閲覧", "example": true }, "write": { "type": "boolean", "description": "操作", "example": true } } }, "userCapabilityJustUpdate": { "type": "object", "properties": { "update": { "type": "boolean", "description": "更新", "example": true } } }, "userCapabilityJustWrite": { "type": "object", "properties": { "write": { "type": "boolean", "description": "操作", "example": true } } }, "userCapabilityWithSelfOnly": { "type": "object", "properties": { "read": { "type": "boolean", "description": "閲覧", "example": true }, "create": { "type": "boolean", "description": "作成", "example": true }, "update": { "type": "boolean", "description": "更新", "example": true }, "destroy": { "type": "boolean", "description": "削除", "example": true }, "allowed_target": { "type": "string", "description": "「自分のみ」がonになっている場合はself_only、offになっている場合はallになります。", "enum": [ "self_only", "all" ] } } }, "userCapabilityWithConfirm": { "type": "object", "properties": { "confirm": { "type": "boolean", "description": "「自動で経理」の操作", "example": true }, "read": { "type": "boolean", "description": "「取得した明細」の閲覧", "example": true }, "create": { "type": "boolean", "description": "「取得した明細」の作成", "example": true }, "update": { "type": "boolean", "description": "「取得した明細」の更新", "example": true }, "destroy": { "type": "boolean", "description": "「取得した明細」の削除", "example": true } } }, "userCapabilityWithSync": { "type": "object", "properties": { "read": { "type": "boolean", "description": "「口座」の閲覧", "example": true }, "create": { "type": "boolean", "description": "「口座」の作成", "example": true }, "update": { "type": "boolean", "description": "「口座」の更新", "example": true }, "destroy": { "type": "boolean", "description": "「口座」の削除", "example": true }, "sync": { "type": "boolean", "description": "「口座の同期」の実行(廃止予定)", "example": true, "deprecated": true } } }, "userCapabilityWithWrite": { "type": "object", "properties": { "read": { "type": "boolean", "description": "閲覧", "example": true }, "create": { "type": "boolean", "description": "作成", "example": true }, "update": { "type": "boolean", "description": "更新", "example": true }, "destroy": { "type": "boolean", "description": "削除", "example": true }, "write": { "type": "boolean", "description": "操作", "example": true } } }, "receipt": { "type": "object", "required": [ "created_at", "id", "mime_type", "origin", "status", "user" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "ファイルボックス(証憑ファイル)ID", "example": 1 }, "status": { "type": "string", "description": "ステータス(confirmed:確認済み, deleted:削除済み, ignored:無視)", "example": "confirmed", "enum": [ "confirmed", "deleted", "ignored" ] }, "description": { "type": "string", "description": "メモ。未設定の場合は空文字を返します。", "example": "タクシー利用" }, "mime_type": { "type": "string", "description": "ファイルのMIMEタイプ(例:image/png, image/jpeg, application/pdf)。ダウンロードAPIのレスポンスのContent-Typeもこの値になります。", "example": "image/png" }, "origin": { "type": "string", "description": "アップロード元種別", "example": "public_api", "enum": [ "unknown", "web", "mobile_camera", "mobile_album", "scansnap", "scannable", "dropbox", "mail", "safety_contact_file", "public_api" ] }, "created_at": { "type": "string", "description": "アップロード日時(ISO8601形式)", "example": "2019-12-17T18:30:24+09:00" }, "user": { "type": "object", "description": "ファイルをアップロードしたユーザー", "required": [ "email", "id" ], "properties": { "id": { "type": "integer", "format": "int64", "description": "ユーザーID", "example": 1 }, "email": { "type": "string", "description": "メールアドレス", "example": "contact@example.com" }, "display_name": { "type": "string", "description": "表示名", "example": "フリー太郎", "nullable": true } } }, "receipt_metadatum": { "type": "object", "nullable": true, "description": "電子帳簿保存法の検索要件に対応するメタデータ(発行元・発行日・金額)", "properties": { "partner_name": { "type": "string", "maxLength": 255, "nullable": true, "description": "発行元", "example": "freeeパートナー" }, "issue_date": { "type": "string", "nullable": true, "description": "発行日 (yyyy-mm-dd)", "example": "2019-12-17" }, "amount": { "type": "integer", "format": "int64", "minimum": -9223372036854775808, "maximum": 9223372036854775807, "nullable": true, "description": "金額(円)", "example": 5250 } } }, "qualified_invoice": { "type": "string", "description": "適格請求書等(qualified: 該当する、not_qualified: 該当しない、unselected: 未選択、null: OCR解析結果が保存されておらず、ユーザーによる手動保存もされていない場合)", "enum": [ "qualified", "not_qualified", "unselected" ], "example": "qualified", "nullable": true }, "invoice_registration_number": { "type": "string", "maxLength": 14, "minLength": 14, "pattern": "^T[1-9][0-9]{12}$", "description": "インボイス制度適格請求書発行事業者登録番号(null: OCR解析結果が保存されておらず、ユーザーによる手動保存もされていない場合)\n- 先頭T数字13桁の固定14桁の文字列\n国税庁インボイス制度適格請求書発行事業者公表サイト\n", "example": "T1000000000001", "nullable": true }, "document_type": { "type": "string", "description": "書類の種類(receipt: 領収書、invoice: 請求書、other: その他、null: OCR解析結果が保存されておらず、ユーザーによる手動保存もされていない場合)", "enum": [ "receipt", "invoice", "other" ], "example": "receipt", "nullable": true } } }, "receiptResponse": { "type": "object", "required": [ "receipt" ], "properties": { "receipt": { "$ref": "#/components/schemas/receipt" } } }, "fiscal_years": { "required": [ "depreciation_record_method", "end_date", "id", "indirect_write_off_method", "is_closed", "month_end_date", "return_code", "sales_tax_business_code", "start_date", "tax_account_method", "tax_fraction", "tax_method", "temp_month_end_date", "use_industry_template" ], "type": "object", "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "会計年度ID", "example": 1 }, "use_industry_template": { "type": "boolean", "description": "製造業向け機能(true: 使用する、false: 使用しない)", "example": false }, "indirect_write_off_method": { "type": "boolean", "description": "固定資産の控除法(true: 間接控除法、false: 直接控除法)", "example": true }, "start_date": { "type": "string", "description": "期首日 (yyyy-mm-dd)", "example": "2019-12-17" }, "end_date": { "type": "string", "description": "期末日 (yyyy-mm-dd)", "example": "2019-12-17" }, "depreciation_record_method": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 1, "description": "月次償却(0: しない、1: する)", "example": 0 }, "tax_method": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 4, "description": "課税区分(0: 免税、1: 簡易課税、2: 本則課税(個別対応方式)、3: 本則課税(一括比例配分方式)、4: 本則課税(全額控除))", "example": 0 }, "sales_tax_business_code": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 5, "description": "簡易課税用事業区分(0: 第一種:卸売業、1: 第二種:小売業、2: 第三種:農林水産業、工業、建設業、製造業など、3: 第四種:飲食店業など、4: 第五種:金融・保険業、運輸通信業、サービス業など、5: 第六種:不動産業など", "example": 0 }, "tax_fraction": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2, "description": "消費税端数処理方法(0: 切り捨て、1: 切り上げ、2: 四捨五入)", "example": 0 }, "tax_account_method": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2, "description": "消費税経理処理方法(0: 税込経理、1: 旧税抜経理、2: 税抜経理)", "example": 0 }, "return_code": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 3, "description": "不動産所得使用区分(0: 一般、3: 一般/不動産) ※個人事業主のみ設定可能", "example": 0 }, "is_closed": { "type": "boolean", "description": "年度締め済みか(true: 年度締め済み、false: 未締め)", "example": false }, "month_end_date": { "type": "string", "description": "本締め日 (yyyy-mm-dd)。締めが未設定の場合は null", "example": "2020-03-20", "nullable": true }, "temp_month_end_date": { "type": "string", "description": "仮締め日 (yyyy-mm-dd)。仮締めが未設定の場合は null", "example": "2020-03-25", "nullable": true } } }, "expenseApplicationsIndexResponse": { "type": "object", "required": [ "expense_applications" ], "properties": { "expense_applications": { "type": "array", "items": { "type": "object", "required": [ "applicant_id", "application_number", "company_id", "id", "issue_date", "status", "title", "deal_id", "deal_status" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "経費申請ID", "example": 1 }, "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID", "example": 1 }, "title": { "type": "string", "description": "申請タイトル", "example": "大阪出張" }, "issue_date": { "type": "string", "description": "申請日 (yyyy-mm-dd)", "example": "2019-12-17" }, "description": { "type": "string", "description": "備考", "example": "◯◯連携先ID: cx12345" }, "total_amount": { "type": "integer", "format": "int64", "description": "合計金額", "example": 30000 }, "status": { "type": "string", "description": "申請ステータス(draft:下書き, in_progress:申請中, approved:承認済, rejected:却下, feedback:差戻し)", "example": "draft", "enum": [ "draft", "in_progress", "approved", "rejected", "feedback" ] }, "section_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "部門ID", "example": 101, "nullable": true }, "tag_ids": { "type": "array", "description": "メモタグID", "items": { "type": "integer", "format": "int64", "minimum": 1, "example": 202 } }, "purchase_lines": { "type": "array", "description": "経費申請の申請行一覧(配列)", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "経費申請の申請行ID", "example": 1 }, "transaction_date": { "type": "string", "description": "発生日 (yyyy-mm-dd)", "example": "2019-12-17", "nullable": true }, "receipt_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "ファイルボックス(証憑ファイル)ID", "example": 606, "nullable": true }, "sub_receipt_ids": { "type": "array", "description": "補足資料(配列)\n receipt_id(証憑ファイル)を指定してください。", "items": { "type": "integer", "format": "int64", "minimum": 1, "example": 606 } }, "expense_application_lines": { "type": "array", "description": "明細行一覧(配列)", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "明細行ID", "example": 1 }, "description": { "type": "string", "description": "内容", "example": "交通費:新幹線往復(東京〜大阪)", "nullable": true }, "amount": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647, "description": "金額", "example": 30000 }, "expense_application_line_template_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "経費科目ID", "example": 505, "nullable": true } } } } } } }, "deal_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "取引ID (申請ステータス:statusがapprovedで、取引が存在する時のみdeal_idが表示されます)", "example": 1, "nullable": true }, "deal_status": { "type": "string", "description": "取引ステータス (申請ステータス:statusがapprovedで、取引が存在する時のみdeal_statusが表示されます settled:精算済み, unsettled:清算待ち)", "example": "settled", "enum": [ "settled", "unsettled" ], "nullable": true }, "applicant_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "申請者のユーザーID", "example": 1 }, "proxy_applicant_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "代理申請者のユーザーID。\n他のユーザーが申請者に代わって申請した場合に、その代理申請者のユーザーIDが入る。\n代理申請ではない場合は null。", "example": 2, "nullable": true }, "application_number": { "type": "string", "description": "申請No.", "example": "2" }, "current_step_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "現在承認ステップID", "example": 1, "nullable": true }, "current_round": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647, "description": "現在のround。差し戻し等により申請がstepの最初からやり直しになるとroundの値が増えます。", "example": 1 }, "segment_1_tag_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメント1タグID", "example": 1, "nullable": true }, "segment_2_tag_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメント2タグID", "example": 2, "nullable": true }, "segment_3_tag_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメント3タグID", "example": 3, "nullable": true } } } } } }, "expenseApplicationResponse": { "type": "object", "required": [ "expense_application" ], "properties": { "expense_application": { "type": "object", "required": [ "applicant_id", "application_number", "approvers", "company_id", "id", "issue_date", "status", "title", "deal_id", "deal_status", "approval_flow_route_id", "comments", "approval_flow_logs", "current_step_id", "current_round" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "経費申請ID", "example": 1 }, "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID", "example": 1 }, "title": { "type": "string", "description": "申請タイトル", "example": "大阪出張" }, "issue_date": { "type": "string", "description": "申請日 (yyyy-mm-dd)", "example": "2019-12-17" }, "description": { "type": "string", "description": "備考", "example": "◯◯連携先ID: cx12345", "nullable": true }, "total_amount": { "type": "integer", "format": "int64", "description": "合計金額", "example": 30000 }, "status": { "type": "string", "description": "申請ステータス(draft:下書き, in_progress:申請中, approved:承認済, rejected:却下, feedback:差戻し)", "example": "draft", "enum": [ "draft", "in_progress", "approved", "rejected", "feedback" ] }, "section_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "部門ID", "example": 101, "nullable": true }, "tag_ids": { "type": "array", "description": "メモタグID", "items": { "type": "integer", "format": "int64", "minimum": 1, "example": 202 } }, "purchase_lines": { "type": "array", "description": "経費申請の申請行一覧(配列)", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "経費申請の申請行ID", "example": 1 }, "transaction_date": { "type": "string", "description": "発生日(yyyy-mm-dd)", "example": "2019-12-17", "nullable": true }, "receipt_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "ファイルボックス(証憑ファイル)ID", "example": 606, "nullable": true }, "sub_receipt_ids": { "type": "array", "description": "補足資料(配列)\n receipt_id(証憑ファイル)を指定してください。", "items": { "type": "integer", "format": "int64", "minimum": 1, "example": 606 } }, "expense_application_lines": { "type": "array", "description": "明細行一覧(配列)", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "明細行ID", "example": 1 }, "description": { "type": "string", "description": "内容", "example": "交通費:新幹線往復(東京〜大阪)", "nullable": true }, "amount": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647, "description": "金額", "example": 30000 }, "expense_application_line_template_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "経費科目ID", "example": 505, "nullable": true } } } } } } }, "deal_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "取引ID (申請ステータス:statusがapprovedで、取引が存在する時のみdeal_idが表示されます)", "example": 1, "nullable": true }, "deal_status": { "type": "string", "description": "取引ステータス (申請ステータス:statusがapprovedで、取引が存在する時のみdeal_statusが表示されます settled:精算済み, unsettled:清算待ち)", "example": "settled", "enum": [ "settled", "unsettled" ], "nullable": true }, "applicant_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "申請者のユーザーID", "example": 1 }, "proxy_applicant_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "代理申請者のユーザーID。\n他のユーザーが申請者に代わって申請した場合に、その代理申請者のユーザーIDが入る。\n代理申請ではない場合は null。", "example": 2, "nullable": true }, "approvers": { "type": "array", "description": "承認者(配列)\n 承認ステップのresource_typeがunspecified (指定なし)の場合はapproversはレスポンスに含まれません。\n しかし、resource_typeがunspecifiedの承認ステップにおいて誰かが承認・却下・差し戻しのいずれかのアクションを取った後は、\n approversはレスポンスに含まれるようになります。\n その場合approversにはアクションを行ったステップのIDとアクションを行ったユーザーのIDが含まれます。", "items": { "type": "object", "required": [ "step_id", "user_id", "status", "is_force_action", "resource_type" ], "properties": { "step_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "承認ステップID", "example": 1 }, "user_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "承認者のユーザーID\n下記の場合はnullになります。\n", "example": 1, "nullable": true }, "status": { "type": "string", "description": "承認者の承認状態\n* `initial` - 初期状態\n* `approved` - 承認済\n* `rejected` - 却下\n* `feedback` - 差戻し", "example": "initial", "enum": [ "initial", "approved", "rejected", "feedback" ] }, "is_force_action": { "type": "boolean", "description": "特権承認済みかどうか", "example": true }, "resource_type": { "type": "string", "description": "承認ステップの承認方法\n* `predefined_user` - メンバー指定 (1人)\n* `selected_user` - 申請時にメンバー指定\n* `unspecified` - 指定なし\n* `and_resource` - メンバー指定 (複数、全員の承認)\n* `or_resource` - メンバー指定 (複数、1人の承認)\n* `and_position` - 役職指定 (複数、全員の承認)\n* `or_position` - 役職指定 (複数、1人の承認)\n* `switchable` - 経路分岐", "enum": [ "predefined_user", "selected_user", "unspecified", "and_resource", "or_resource", "and_position", "or_position", "switchable" ], "example": "predefined_user" } } } }, "application_number": { "type": "string", "description": "申請No.", "example": "2" }, "approval_flow_route_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "申請経路ID", "example": 1 }, "comments": { "type": "array", "description": "経費申請のコメント一覧(配列)", "items": { "type": "object", "required": [ "comment", "user_id", "posted_at" ], "properties": { "comment": { "type": "string", "description": "コメント内容", "example": "訂正をお願いします。" }, "user_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "ユーザーID", "example": 1 }, "posted_at": { "type": "string", "description": "コメント日時(ISO8601形式)", "example": "2019-12-17T18:30:24+09:00" } } } }, "approval_flow_logs": { "type": "array", "description": "経費申請の承認履歴(配列)", "items": { "type": "object", "required": [ "action", "user_id", "updated_at" ], "properties": { "action": { "type": "string", "description": "操作(apply: 申請, approve: 承認, force_approve: 特権承認, cancel: 取消, reject: 却下, feedback: 差戻し)", "enum": [ "apply", "approve", "force_approve", "cancel", "reject", "feedback" ], "example": "approve" }, "user_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "ユーザーID", "example": 1 }, "updated_at": { "type": "string", "description": "更新日時(ISO8601形式)", "example": "2019-12-17T18:30:24+09:00" } } } }, "current_step_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "現在承認ステップID", "example": 1, "nullable": true }, "current_round": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647, "description": "現在のround。差し戻し等により申請がstepの最初からやり直しになるとroundの値が増えます。", "example": 1 }, "parent_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "親申請ID。\n各種申請または購買申請が使用可能なプランの事業所でのみレスポンスに含まれる(キー自体が存在しない場合がある)。\n関連付けが解除されている場合や親申請が未設定の場合は null。", "example": 2, "nullable": true }, "parent_type": { "type": "string", "description": "親申請の種別。parent_id とペアで返却される。\n* `ApprovalRequest` - 各種申請\n* `PurchaseRequest` - 購買申請\n\n各種申請または購買申請が使用可能なプランの事業所でのみレスポンスに含まれる(キー自体が存在しない場合がある)。\n関連付けが解除されている場合や親申請が未設定の場合は null。", "example": "ApprovalRequest", "enum": [ "ApprovalRequest", "PurchaseRequest" ], "nullable": true }, "segment_1_tag_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメント1タグID", "example": 1, "nullable": true }, "segment_2_tag_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメント2タグID", "example": 2, "nullable": true }, "segment_3_tag_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメント3タグID", "example": 3, "nullable": true } } } } }, "expense_application_line_template": { "type": "object", "required": [ "account_item_name", "id", "name", "tax_name", "source_line_template_id", "account_item_id", "tax_code", "description", "line_description", "required_receipt" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "経費科目ID", "example": 1 }, "source_line_template_id": { "type": "integer", "format": "int64", "minimum": 0, "description": "経費科目の元となるテンプレートを識別するID。経費科目の設定(名前や勘定科目など)を変更しても変わらない固定値", "example": 1 }, "name": { "type": "string", "description": "経費科目名", "example": "交通費" }, "account_item_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "経費科目に紐づく勘定科目のID", "example": 1 }, "account_item_name": { "type": "string", "description": "経費科目に紐づく勘定科目の名前", "example": "旅費交通費" }, "tax_code": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647, "description": "経費科目に紐づく税区分コード", "example": 1 }, "tax_name": { "type": "string", "description": "経費科目に紐づく税区分の名前", "example": "課対仕入" }, "description": { "type": "string", "nullable": true, "description": "経費科目の説明。未設定の場合はnull", "example": "電車、バス、飛行機などの交通費" }, "line_description": { "type": "string", "nullable": true, "description": "内容の補足。経費申請の作成時に内容欄へ何を入力すべきかを申請者に案内する文言。未設定の場合はnull", "example": "移動区間" }, "required_receipt": { "type": "boolean", "description": "添付ファイルの必須/任意(true: 経費申請の作成時に領収書などのファイル添付が必須, false: ファイル添付は任意)", "example": true } } }, "expenseApplicationLineTemplateResponse": { "type": "object", "required": [ "expense_application_line_template" ], "properties": { "expense_application_line_template": { "$ref": "#/components/schemas/expense_application_line_template" } } }, "paymentRequestResponse": { "type": "object", "required": [ "payment_request" ], "properties": { "payment_request": { "type": "object", "required": [ "id", "company_id", "title", "application_date", "description", "total_amount", "status", "payment_request_lines", "deal_id", "deal_status", "applicant_id", "approvers", "application_number", "approval_flow_route_id", "comments", "approval_flow_logs", "current_step_id", "current_round", "document_code", "receipt_ids", "issue_date", "payment_date", "payment_method", "partner_id", "partner_name", "bank_name", "bank_name_kana", "bank_code", "branch_name", "branch_kana", "branch_code", "account_type", "account_number", "account_name" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "支払依頼ID", "example": 1 }, "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID", "example": 1 }, "title": { "type": "string", "description": "申請タイトル", "example": "仕入代金支払い" }, "application_date": { "type": "string", "description": "申請日 (yyyy-mm-dd)", "example": "2019-12-17" }, "description": { "type": "string", "description": "備考。未入力の場合は空文字列になります。", "example": "◯◯連携先ID: cx12345" }, "total_amount": { "type": "integer", "format": "int64", "description": "合計金額(円、税込)\n通常取引行 (deal_line) の合計金額から控除・マイナス行 (negative_line) と源泉所得税行 (withholding_tax) の合計金額を差し引いた値です。", "example": 30000 }, "status": { "type": "string", "description": "申請ステータス\n* `draft` - 下書き\n* `in_progress` - 申請中\n* `approved` - 承認済\n* `rejected` - 却下\n* `feedback` - 差戻し", "example": "draft", "enum": [ "draft", "in_progress", "approved", "rejected", "feedback" ] }, "payment_request_lines": { "type": "array", "description": "支払依頼の項目行一覧(配列)", "items": { "type": "object", "required": [ "id", "line_type", "description", "amount", "account_item_id", "tax_code", "item_id", "section_id", "tag_ids" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "支払依頼の項目行ID", "example": 1 }, "line_type": { "type": "string", "description": "行の種類\n* `deal_line` - 支払依頼の通常取引行\n* `negative_line` - 支払依頼の控除・マイナス行\n* `withholding_tax` - 源泉所得税行", "example": "deal_line", "enum": [ "deal_line", "negative_line", "withholding_tax" ] }, "description": { "type": "string", "description": "内容", "example": "原稿料" }, "amount": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 99999999999, "description": "金額", "example": 30000 }, "account_item_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "勘定科目ID", "example": 1, "nullable": true }, "tax_code": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647, "description": "税区分コード", "example": 1, "nullable": true }, "item_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "品目ID", "example": 1, "nullable": true }, "section_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "部門ID", "example": 1, "nullable": true }, "tag_ids": { "type": "array", "description": "メモタグID", "example": [ 1, 2, 3 ], "items": { "type": "integer", "format": "int64", "minimum": 1 } }, "segment_1_tag_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメント1タグID", "example": 1, "nullable": true }, "segment_2_tag_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメント2タグID", "example": 1, "nullable": true }, "segment_3_tag_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメント3タグID", "example": 1, "nullable": true } } } }, "deal_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "取引ID\n申請ステータス (status) が `approved` (承認済) で、支払依頼から作成された取引が存在する場合のみ値が入ります。\nそれ以外の場合は null になります。", "example": 1, "nullable": true }, "deal_status": { "type": "string", "description": "取引ステータス\n* `settled` - 支払済み\n* `unsettled` - 支払待ち\n\n申請ステータス (status) が `approved` (承認済) で、支払依頼から作成された取引が存在する場合のみ値が入ります。\nそれ以外の場合は null になります。", "example": "settled", "enum": [ "settled", "unsettled" ], "nullable": true }, "applicant_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "申請者のユーザーID(`/api/1/users` のレスポンス id と同じ値)", "example": 1 }, "approvers": { "type": "array", "description": "承認者(配列)\n 承認ステップのresource_typeがunspecified (指定なし)の場合はapproversはレスポンスに含まれません。\n しかし、resource_typeがunspecifiedの承認ステップにおいて誰かが承認・却下・差し戻しのいずれかのアクションを取った後は、\n approversはレスポンスに含まれるようになります。\n その場合approversにはアクションを行ったステップのIDとアクションを行ったユーザーのIDが含まれます。", "items": { "type": "object", "required": [ "step_id", "user_id", "status", "is_force_action", "resource_type" ], "properties": { "step_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "承認ステップID", "example": 1 }, "user_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "承認者のユーザーID\n下記の場合はnullになります。\n", "example": 1, "nullable": true }, "status": { "type": "string", "description": "承認者の承認状態\n* `initial` - 初期状態\n* `approved` - 承認済\n* `rejected` - 却下\n* `feedback` - 差戻し", "example": "initial", "enum": [ "initial", "approved", "rejected", "feedback" ] }, "is_force_action": { "type": "boolean", "description": "特権承認済みかどうか(true の場合、特権承認によって承認されたことを示します)", "example": true }, "resource_type": { "type": "string", "description": "承認ステップの承認方法\n* `predefined_user` - メンバー指定 (1人)\n* `selected_user` - 申請時にメンバー指定\n* `unspecified` - 指定なし\n* `and_resource` - メンバー指定 (複数、全員の承認)\n* `or_resource` - メンバー指定 (複数、1人の承認)\n* `and_position` - 役職指定 (複数、全員の承認)\n* `or_position` - 役職指定 (複数、1人の承認)", "enum": [ "predefined_user", "selected_user", "unspecified", "and_resource", "or_resource", "and_position", "or_position" ], "example": "predefined_user" } } } }, "application_number": { "type": "string", "description": "申請No.(事業所内で申請単位に自動採番される番号)", "example": "2" }, "approval_flow_route_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "申請経路ID(`/api/1/approval_flow_routes` のレスポンス id と同じ値)", "example": 1 }, "comments": { "type": "array", "description": "支払依頼のコメント一覧(配列)。コメントが登録された順に並びます。", "items": { "type": "object", "required": [ "comment", "user_id", "posted_at" ], "properties": { "comment": { "type": "string", "description": "コメント内容", "example": "訂正をお願いします。" }, "user_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "ユーザーID", "example": 1 }, "posted_at": { "type": "string", "description": "コメント日時(ISO8601形式)", "example": "2019-12-17T18:30:24+09:00" } } } }, "approval_flow_logs": { "type": "array", "description": "支払依頼の承認履歴(配列)。承認操作が行われた順に並びます。", "items": { "type": "object", "required": [ "action", "user_id", "updated_at" ], "properties": { "action": { "type": "string", "description": "操作\n* `apply` - 申請\n* `approve` - 承認\n* `force_approve` - 特権承認\n* `cancel` - 取消\n* `reject` - 却下\n* `feedback` - 差戻し", "enum": [ "apply", "approve", "force_approve", "cancel", "reject", "feedback" ], "example": "approve" }, "user_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "ユーザーID", "example": 1 }, "updated_at": { "type": "string", "description": "更新日時(ISO8601形式)", "example": "2019-12-17T18:30:24+09:00" } } } }, "current_step_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "現在の承認ステップID(承認操作 API `POST /api/1/payment_requests/{id}/actions` の target_step_id に指定します)\n下書き・差戻し状態の場合は null になります。", "example": 1, "nullable": true }, "current_round": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647, "description": "現在の round(承認操作 API `POST /api/1/payment_requests/{id}/actions` の target_round に指定します)\n差戻し等により申請が step の最初からやり直しになると round の値が増えます。", "example": 1 }, "document_code": { "type": "string", "description": "請求書番号。未設定の場合は空文字列になります。", "example": "2" }, "receipt_ids": { "type": "array", "description": "ファイルボックス(証憑ファイル)ID の配列\n添付されているファイルボックスの ID を返します。添付が無い場合は空配列になります。", "example": [ 1, 2, 3 ], "items": { "type": "integer", "format": "int64", "minimum": 1 } }, "issue_date": { "type": "string", "description": "発生日 (yyyy-mm-dd)", "example": "2019-12-17" }, "payment_date": { "type": "string", "description": "支払期限 (yyyy-mm-dd)。指定されていない場合は null になります。", "example": "2019-12-17", "nullable": true }, "payment_method": { "type": "string", "description": "支払方法\n* `none` - 指定なし\n* `domestic_bank_transfer` - 国内振込\n* `abroad_bank_transfer` - 国外振込\n* `account_transfer` - 口座振替\n* `credit_card` - クレジットカード", "example": "none", "enum": [ "none", "domestic_bank_transfer", "abroad_bank_transfer", "account_transfer", "credit_card" ] }, "partner_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "取引先ID(取引先が指定されていない支払依頼の場合は null になります)", "example": 201, "nullable": true }, "partner_code": { "type": "string", "description": "取引先コード\n取引先コードが設定されていない場合、および事業所が取引先コードを利用していない場合は null になります。", "example": "code001", "nullable": true }, "partner_name": { "type": "string", "description": "取引先名(取引先が指定されていない支払依頼の場合は null になります)", "example": "freee", "nullable": true }, "bank_name": { "type": "string", "description": "銀行名。支払先の取引先が指定されている場合は取引先の振込先口座から引用されます。未設定の場合は空文字列になります。", "example": "freee銀行" }, "bank_name_kana": { "type": "string", "description": "銀行名(カナ)。支払先の取引先が指定されている場合は取引先の振込先口座から引用されます。未設定の場合は空文字列になります。", "example": "フリーギンコウ" }, "bank_code": { "type": "string", "description": "銀行コード。支払先の取引先が指定されている場合は取引先の振込先口座から引用されます。未設定の場合は空文字列になります。", "example": "0001" }, "branch_name": { "type": "string", "description": "支店名。支払先の取引先が指定されている場合は取引先の振込先口座から引用されます。未設定の場合は空文字列になります。", "example": "銀座支店" }, "branch_kana": { "type": "string", "description": "支店名(カナ)。支払先の取引先が指定されている場合は取引先の振込先口座から引用されます。未設定の場合は空文字列になります。", "example": "ギンザシテン" }, "branch_code": { "type": "string", "description": "支店番号。支払先の取引先が指定されている場合は取引先の振込先口座から引用されます。未設定の場合は空文字列になります。", "example": "101" }, "account_type": { "type": "string", "description": "口座種別\n* `ordinary` - 普通\n* `checking` - 当座\n* `earmarked` - 納税準備預金\n* `savings` - 貯蓄\n* `other` - その他", "example": "ordinary", "enum": [ "ordinary", "checking", "earmarked", "savings", "other" ] }, "account_number": { "type": "string", "description": "口座番号。支払先の取引先が指定されている場合は取引先の振込先口座から引用されます。未設定の場合は空文字列になります。", "example": "1010101" }, "account_name": { "type": "string", "description": "受取人名(カナ)。支払先の取引先が指定されている場合は取引先の振込先口座から引用されます。未設定の場合は空文字列になります。", "example": "フリータロウ" }, "qualified_invoice_status": { "type": "string", "description": "適格請求書発行事業者の区分\n* `qualified` - 該当する\n* `not_qualified` - 該当しない\n* `unspecified` - 未選択\n\n支払依頼をインボイス要件をみたす申請として扱うかどうかを表します。", "enum": [ "qualified", "not_qualified", "unspecified" ], "example": "qualified" } } } } }, "paymentRequestsIndexResponse": { "type": "object", "required": [ "payment_requests" ], "properties": { "payment_requests": { "type": "array", "description": "支払依頼の一覧。詳細フィールド(description / payment_request_lines / approval_flow_route_id / comments / approval_flow_logs / receipt_ids / 振込先口座情報)は含まれません。詳細は `/api/1/payment_requests/{id}` で取得してください。", "items": { "type": "object", "required": [ "id", "company_id", "title", "application_date", "total_amount", "status", "applicant_id", "approvers", "application_number", "current_step_id", "current_round", "document_code", "issue_date", "payment_date", "payment_method", "partner_id", "partner_code", "partner_name" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "支払依頼ID", "example": 1 }, "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID", "example": 1 }, "title": { "type": "string", "description": "申請タイトル", "example": "仕入代金支払い" }, "application_date": { "type": "string", "description": "申請日 (yyyy-mm-dd)", "example": "2019-12-17" }, "total_amount": { "type": "integer", "format": "int64", "description": "合計金額(円、税込)\n通常取引行 (deal_line) の合計金額から控除・マイナス行 (negative_line) と源泉所得税行 (withholding_tax) の合計金額を差し引いた値です。", "example": 30000 }, "status": { "type": "string", "description": "申請ステータス\n* `draft` - 下書き\n* `in_progress` - 申請中\n* `approved` - 承認済\n* `rejected` - 却下\n* `feedback` - 差戻し", "example": "draft", "enum": [ "draft", "in_progress", "approved", "rejected", "feedback" ] }, "deal_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "取引ID\n申請ステータス (status) が `approved` (承認済) で、支払依頼から作成された取引が存在する場合のみ値が入ります。\nそれ以外の場合は null になります。", "example": 1, "nullable": true }, "deal_status": { "type": "string", "description": "取引ステータス\n* `settled` - 支払済み\n* `unsettled` - 支払待ち\n\n申請ステータス (status) が `approved` (承認済) で、支払依頼から作成された取引が存在する場合のみ値が入ります。\nそれ以外の場合は null になります。", "example": "settled", "enum": [ "settled", "unsettled" ], "nullable": true }, "applicant_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "申請者のユーザーID(`/api/1/users` のレスポンス id と同じ値)", "example": 1 }, "approvers": { "type": "array", "description": "承認者(配列)\n 承認ステップのresource_typeがunspecified (指定なし)の場合はapproversはレスポンスに含まれません。\n しかし、resource_typeがunspecifiedの承認ステップにおいて誰かが承認・却下・差し戻しのいずれかのアクションを取った後は、\n approversはレスポンスに含まれるようになります。\n その場合approversにはアクションを行ったステップのIDとアクションを行ったユーザーのIDが含まれます。", "items": { "type": "object", "required": [ "step_id", "user_id", "status", "is_force_action", "resource_type" ], "properties": { "step_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "承認ステップID", "example": 1 }, "user_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "承認者のユーザーID\n下記の場合はnullになります。\n", "example": 1, "nullable": true }, "status": { "type": "string", "description": "承認者の承認状態\n* `initial` - 初期状態\n* `approved` - 承認済\n* `rejected` - 却下\n* `feedback` - 差戻し", "example": "initial", "enum": [ "initial", "approved", "rejected", "feedback" ] }, "is_force_action": { "type": "boolean", "description": "特権承認済みかどうか(true の場合、特権承認によって承認されたことを示します)", "example": true }, "resource_type": { "type": "string", "description": "承認ステップの承認方法\n* `predefined_user` - メンバー指定 (1人)\n* `selected_user` - 申請時にメンバー指定\n* `unspecified` - 指定なし\n* `and_resource` - メンバー指定 (複数、全員の承認)\n* `or_resource` - メンバー指定 (複数、1人の承認)\n* `and_position` - 役職指定 (複数、全員の承認)\n* `or_position` - 役職指定 (複数、1人の承認)", "enum": [ "predefined_user", "selected_user", "unspecified", "and_resource", "or_resource", "and_position", "or_position" ], "example": "predefined_user" } } } }, "application_number": { "type": "string", "description": "申請No.(事業所内で申請単位に自動採番される番号)", "example": "2" }, "current_step_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "現在の承認ステップID(承認操作 API `POST /api/1/payment_requests/{id}/actions` の target_step_id に指定します)\n下書き・差戻し状態の場合は null になります。", "example": 1, "nullable": true }, "current_round": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647, "description": "現在の round(承認操作 API `POST /api/1/payment_requests/{id}/actions` の target_round に指定します)\n差戻し等により申請が step の最初からやり直しになると round の値が増えます。", "example": 1 }, "document_code": { "type": "string", "description": "請求書番号。未設定の場合は空文字列になります。", "example": "2" }, "issue_date": { "type": "string", "description": "発生日 (yyyy-mm-dd)", "example": "2019-12-17" }, "payment_date": { "type": "string", "description": "支払期限 (yyyy-mm-dd)。指定されていない場合は null になります。", "example": "2019-12-17", "nullable": true }, "payment_method": { "type": "string", "description": "支払方法\n* `none` - 指定なし\n* `domestic_bank_transfer` - 国内振込\n* `abroad_bank_transfer` - 国外振込\n* `account_transfer` - 口座振替\n* `credit_card` - クレジットカード", "example": "none", "enum": [ "none", "domestic_bank_transfer", "abroad_bank_transfer", "account_transfer", "credit_card" ] }, "partner_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "取引先ID(取引先が指定されていない支払依頼の場合は null になります)", "example": 201, "nullable": true }, "partner_code": { "type": "string", "description": "取引先コード\n取引先コードが設定されていない場合、および事業所が取引先コードを利用していない場合は null になります。", "example": "code001", "nullable": true }, "partner_name": { "type": "string", "description": "取引先名(取引先が指定されていない支払依頼の場合は null になります)", "example": "freee", "nullable": true }, "qualified_invoice_status": { "type": "string", "description": "適格請求書発行事業者の区分\n* `qualified` - 該当する\n* `not_qualified` - 該当しない\n* `unspecified` - 未選択\n\n支払依頼をインボイス要件をみたす申請として扱うかどうかを表します。", "enum": [ "qualified", "not_qualified", "unspecified" ], "example": "qualified" }, "input_mode": { "type": "string", "description": "内税/外税の区分\n* `inclusive` - 内税\n* `exclusive` - 外税\n\n外税の支払依頼は他のエンドポイント(`GET /api/1/payment_requests/{id}` / `PUT` / `DELETE`)で利用できないため、Web 画面からご確認ください。", "enum": [ "inclusive", "exclusive" ], "example": "inclusive" } } } } } }, "paymentRequestActionCreateParams": { "type": "object", "required": [ "company_id", "approval_action", "target_step_id", "target_round" ], "properties": { "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID", "example": 1 }, "approval_action": { "type": "string", "description": "承認操作\n* `approve` - 承認する\n* `force_approve` - 特権承認する\n* `cancel` - 申請を取り消す\n* `reject` - 却下する\n* `feedback` - 申請者へ差し戻す\n* `force_feedback` - 承認済み・却下済みを取り消す\n\n承認操作は申請ステータスが `in_progress` (申請中) / `approved` (承認済) / `rejected` (却下) のもののみが対象です。", "example": "approve", "enum": [ "approve", "force_approve", "cancel", "reject", "feedback", "force_feedback" ] }, "target_step_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "対象承認ステップID。支払依頼の取得API (`GET /api/1/payment_requests/{id}`) のレスポンス current_step_id を送信してください。", "example": 1 }, "target_round": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647, "description": "対象 round。支払依頼の取得API (`GET /api/1/payment_requests/{id}`) のレスポンス current_round を送信してください。\n差し戻し等により申請が step の最初からやり直しになると round の値が増えます。", "example": 1 }, "next_approver_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "次ステップの承認者のユーザーID\n次の承認ステップが「申請時にメンバー指定」(resource_type: `selected_user`) の場合に、承認させるユーザーを指定してください。\n該当しない場合は null を指定するか省略できます。", "example": 1, "nullable": true }, "next_group_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "次ステップの承認部門ID
\n次の承認ステップが部門選択型の場合に、承認させる部門を指定してください。\n", "example": 1, "nullable": true } } }, "approvalRequestCreateParams": { "type": "object", "required": [ "company_id", "approval_flow_route_id", "form_id", "request_items", "draft" ], "properties": { "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID", "example": 1 }, "application_date": { "type": "string", "description": "申請日 (yyyy-mm-dd)
\n指定しない場合は当日の日付が登録されます。\n", "example": "2019-12-17" }, "approval_flow_route_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "申請経路ID", "example": 1 }, "form_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "申請フォームID", "example": 1 }, "approver_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "承認者のユーザーID", "example": 1 }, "applicant_group_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "申請者の所属部門ID
\n「部門役職」の承認ステップを含む申請経路で、申請者がどの所属部門として申請するかを指定します。
\n\n", "example": 1, "nullable": true }, "approval_flow_group_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "申請経路の承認部門ID
\n1段階目の承認ステップが部門選択型の場合に、承認させる部門を指定してください。\n", "example": 1, "nullable": true }, "draft": { "type": "boolean", "description": "各種申請のステータス
\nfalseを指定した時は申請中(in_progress)で各種申請を作成します。
\ntrueを指定した時は下書き(draft)で各種申請を作成します。\n", "example": true }, "parent_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "親申請ID(既存各種申請IDのみ指定可能です。)", "example": 2 }, "request_items": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "項目ID", "example": 1 }, "type": { "type": "string", "description": "項目タイプ(title: 申請タイトル, single_line: 自由記述形式 1行, multi_line: 自由記述形式 複数行, select: プルダウン, checkbox: 複数選択, date: 日付, amount: 金額, receipt: 添付ファイル, section: 部門ID, partner: 取引先ID)", "enum": [ "title", "single_line", "multi_line", "select", "checkbox", "date", "amount", "receipt", "section", "partner" ] }, "value": { "type": "string", "description": "項目の値", "example": "申請理由" } } } } } }, "approvalRequestUpdateParams": { "type": "object", "required": [ "company_id", "approval_flow_route_id", "request_items", "draft" ], "properties": { "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID", "example": 1 }, "application_date": { "type": "string", "description": "申請日 (yyyy-mm-dd)
\n指定しない場合は当日の日付が登録されます。\n", "example": "2019-12-17" }, "approval_flow_route_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "申請経路ID", "example": 1 }, "approver_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "承認者のユーザーID", "example": 1 }, "applicant_group_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "申請者の所属部門ID
\n「部門役職」の承認ステップを含む申請経路で、申請者がどの所属部門として申請するかを指定します。
\n\n", "example": 1, "nullable": true }, "approval_flow_group_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "申請経路の承認部門ID
\n1段階目の承認ステップが部門選択型の場合に、承認させる部門を指定してください。\n", "example": 1, "nullable": true }, "draft": { "type": "boolean", "description": "各種申請のステータス
\nfalseを指定した時は申請中(in_progress)で各種申請を更新します。
\ntrueを指定した時は下書き(draft)で各種申請を更新します。\n", "example": true }, "request_items": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "項目ID", "example": 1 }, "type": { "type": "string", "description": "項目タイプ(title: 申請タイトル, single_line: 自由記述形式 1行, multi_line: 自由記述形式 複数行, select: プルダウン, checkbox: 複数選択, date: 日付, amount: 金額, receipt: 添付ファイル, section: 部門ID, partner: 取引先ID)", "enum": [ "title", "single_line", "multi_line", "select", "checkbox", "date", "amount", "receipt", "section", "partner" ] }, "value": { "type": "string", "description": "項目の値", "example": "申請理由" } } } } } }, "approvalRequestActionCreateParams": { "type": "object", "required": [ "company_id", "approval_action", "target_step_id", "target_round" ], "properties": { "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID", "example": 1 }, "approval_action": { "type": "string", "description": "操作(approve: 承認する、force_approve: 特権承認する、cancel: 申請を取り消す、reject: 却下する、feedback: 申請者へ差し戻す、force_feedback: 承認済み・却下済みを取り消す)", "example": "approve", "enum": [ "approve", "force_approve", "cancel", "reject", "feedback", "force_feedback" ] }, "target_step_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "対象承認ステップID 各種申請の取得APIレスポンス.current_step_idを送信してください。", "example": 1 }, "target_round": { "type": "integer", "minimum": 0, "maximum": 2147483647, "description": "対象round。差し戻し等により申請がstepの最初からやり直しになるとroundの値が増えます。各種申請の取得APIレスポンス.current_roundを送信してください。", "example": 1 }, "next_approver_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "次ステップの承認者のユーザーID", "example": 1, "nullable": true }, "next_group_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "次ステップの承認部門ID
\n次の承認ステップが部門選択型の場合に、承認させる部門を指定してください。\n", "example": 1, "nullable": true } } }, "renewCreateParams": { "type": "object", "required": [ "company_id", "details", "renew_target_id", "update_date" ], "properties": { "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID", "example": 1 }, "update_date": { "type": "string", "description": "更新日 (yyyy-mm-dd)", "example": "2019-12-17" }, "renew_target_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "+更新対象行ID (details(取引の明細行), accruals(債権債務行), renewsのdetails(+更新の明細行)のIDを指定) ", "example": 1 }, "details": { "type": "array", "description": "+更新の明細行", "items": { "type": "object", "required": [ "account_item_id", "amount", "tax_code" ], "properties": { "account_item_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "勘定科目ID", "example": 1 }, "tax_code": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647, "description": "税区分コード", "example": 1 }, "amount": { "type": "integer", "format": "int64", "minimum": -9223372036854775808, "maximum": 9223372036854775807, "description": "取引金額(円・税込で指定してください)
\nマイナスの値を指定した場合、控除・マイナス行として登録されます。
\n上記以外の値を指定した場合、通常行として登録されます。\n", "example": 1080 }, "vat": { "type": "integer", "format": "int64", "minimum": -9223372036854775808, "maximum": 9223372036854775807, "description": "消費税額(円。指定しない場合は自動で計算されます)", "example": 80 }, "item_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "品目ID", "example": 1 }, "section_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "部門ID", "example": 1 }, "partner_id": { "type": "integer", "format": "int64", "minimum": 0, "nullable": true, "description": "取引先ID", "example": 1 }, "tag_ids": { "type": "array", "description": "メモタグID", "example": [ 1, 2, 3 ], "items": { "type": "integer", "format": "int64", "minimum": 1 } }, "segment_1_tag_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメント1タグID", "example": 1 }, "segment_2_tag_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメント2タグID", "example": 1 }, "segment_3_tag_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメント3タグID", "example": 1 }, "description": { "type": "string", "description": "備考", "example": "備考" } } } } } }, "renewUpdateParams": { "type": "object", "required": [ "company_id", "details", "update_date" ], "properties": { "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID", "example": 1 }, "update_date": { "type": "string", "description": "更新日 (yyyy-mm-dd)", "example": "2019-12-17" }, "details": { "type": "array", "description": "+更新の明細行", "items": { "type": "object", "required": [ "account_item_id", "amount", "tax_code" ], "properties": { "account_item_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "勘定科目ID", "example": 1 }, "tax_code": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647, "description": "税区分コード", "example": 1 }, "amount": { "type": "integer", "format": "int64", "minimum": -9223372036854775808, "maximum": 9223372036854775807, "description": "取引金額(円・税込で指定してください)
\nマイナスの値を指定した場合、控除・マイナス行として登録されます。
\n上記以外の値を指定した場合、通常行として登録されます。\n", "example": 1080 }, "vat": { "type": "integer", "format": "int64", "minimum": -9223372036854775808, "maximum": 9223372036854775807, "description": "消費税額(円。指定しない場合は自動で計算されます)", "example": 80 }, "item_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "品目ID", "example": 1 }, "section_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "部門ID", "example": 1 }, "partner_id": { "type": "integer", "format": "int64", "minimum": 0, "nullable": true, "description": "取引先ID", "example": 1 }, "tag_ids": { "type": "array", "description": "メモタグID", "example": [ 1, 2, 3 ], "items": { "type": "integer", "format": "int64", "minimum": 1 } }, "segment_1_tag_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメント1タグID", "example": 1 }, "segment_2_tag_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメント2タグID", "example": 1 }, "segment_3_tag_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメント3タグID", "example": 1 }, "description": { "type": "string", "description": "備考", "example": "備考" } } } } } }, "expenseApplicationLineTemplateParams": { "type": "object", "required": [ "company_id", "name", "account_item_id", "tax_code" ], "properties": { "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID", "example": 1 }, "name": { "type": "string", "maxLength": 1000, "description": "経費科目名 (1000文字以内)", "example": "交通費" }, "account_item_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "経費科目に紐付ける勘定科目のID。指定した事業所に存在する勘定科目のIDのみ指定可能です(存在しない場合は400エラー)。勘定科目IDは /account_items のAPIから取得可能です。", "example": 1 }, "item_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "経費科目に紐付ける品目のID。指定した事業所に存在する品目のIDのみ指定可能です(存在しない場合は400エラー)。勘定科目と品目の紐付けが設定されている事業所では、指定した勘定科目に紐付く品目のみ指定可能です。品目IDは /items のAPIから取得可能です。なお、レスポンスに品目IDは含まれません。", "example": 1 }, "tax_code": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647, "description": "経費科目に紐付ける税区分コード(税区分のdisplay_categoryがtax_5: 5%表示の税区分, tax_r8: 軽減税率8%表示の税区分に該当するtax_codeのみ利用可能です。それ以外のtax_codeを指定した場合は400エラーになります。税区分のdisplay_categoryは /taxes/companies/{company_id}のAPIから取得可能です。)", "example": 1 }, "description": { "type": "string", "maxLength": 1000, "description": "経費科目の説明 (1000文字以内)", "example": "電車、バス、飛行機などの交通費" }, "line_description": { "type": "string", "maxLength": 1000, "description": "内容の補足 (1000文字以内)。経費申請の作成時に内容欄へ何を入力すべきかを申請者に案内する文言", "example": "移動区間" }, "required_receipt": { "type": "boolean", "example": true, "description": "添付ファイルの必須/任意
\nfalseを指定した時は申請時の領収書の添付を任意とします。
\ntrueを指定した時は申請時の領収書の添付を必須とします。
\n未指定の時は申請時の領収書の添付を任意とします。" } } }, "expense_application_currency": { "type": "object", "required": [ "id", "name", "code", "description", "search_status", "updated_at" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "外貨ID", "example": 123 }, "name": { "type": "string", "description": "外貨名 (30文字以内)", "example": "米ドル" }, "code": { "type": "string", "description": "通貨コード (半角英大文字3文字)", "example": "USD" }, "description": { "type": "string", "nullable": true, "description": "備考", "example": "海外出張で頻用" }, "search_status": { "type": "string", "enum": [ "usable", "unusable" ], "description": "利用状態 (usable: 利用可能, unusable: 利用不可)", "example": "usable" }, "updated_at": { "type": "string", "description": "更新日時 (ISO8601形式)", "example": "2024-05-10T14:23:11+09:00" } }, "additionalProperties": false }, "expenseApplicationCurrencyParams": { "type": "object", "required": [ "company_id", "name", "code", "search_status" ], "properties": { "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID", "example": 1 }, "name": { "type": "string", "maxLength": 30, "description": "外貨名 (30文字以内、前後の空白を除去した上で事業所内で重複不可)", "example": "ベトナム・ドン" }, "code": { "type": "string", "pattern": "^[A-Z]{3}$", "description": "通貨コード (半角英大文字3文字)", "example": "VND" }, "search_status": { "type": "string", "enum": [ "usable", "unusable" ], "description": "利用状態 (usable: 利用可能, unusable: 利用不可)", "example": "usable" }, "description": { "type": "string", "nullable": true, "description": "備考", "example": "ハノイ支社経費用" } }, "additionalProperties": false }, "expenseApplicationCurrenciesIndexResponse": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "description": "外貨一覧", "items": { "$ref": "#/components/schemas/expense_application_currency" } } }, "additionalProperties": false }, "expense_application_form": { "type": "object", "required": [ "section_setting", "tag_setting", "line_template_setting", "segment_1_tag_setting", "segment_2_tag_setting", "segment_3_tag_setting", "description_setting", "commuter_pass_deduction", "default_flow_route_src_id", "observer_addition", "receipt_partner_name_setting", "default_title", "use_currency", "auto_calculation_amount_fraction", "allow_modify_parent_application_by_applicant", "allow_modify_parent_application_by_approver", "allow_modify_parent_application_by_admin", "require_parent_purchase_request", "allow_modify_on_approval" ], "properties": { "section_setting": { "type": "string", "enum": [ "optional", "required" ], "description": "部門の入力設定 (optional: 任意入力, required: 必須入力)", "example": "optional" }, "tag_setting": { "type": "string", "enum": [ "optional", "required", "disable" ], "description": "メモタグの入力設定 (optional: 任意入力, required: 必須入力, disable: 非表示)", "example": "optional" }, "line_template_setting": { "type": "string", "enum": [ "optional", "required", "disable" ], "description": "経費科目の入力設定 (optional: 任意入力, required: 必須入力, disable: 非表示)。経費科目は `/api/1/expense_application_line_templates` で取得できます。", "example": "optional" }, "segment_1_tag_setting": { "type": "string", "enum": [ "optional", "required", "disable" ], "description": "セグメント1タグの入力設定 (optional: 任意入力, required: 必須入力, disable: 非表示)", "example": "optional" }, "segment_2_tag_setting": { "type": "string", "enum": [ "optional", "required", "disable" ], "description": "セグメント2タグの入力設定 (optional: 任意入力, required: 必須入力, disable: 非表示)", "example": "optional" }, "segment_3_tag_setting": { "type": "string", "enum": [ "optional", "required", "disable" ], "description": "セグメント3タグの入力設定 (optional: 任意入力, required: 必須入力, disable: 非表示)", "example": "optional" }, "description_setting": { "type": "string", "enum": [ "optional", "required" ], "description": "備考の入力設定 (optional: 任意入力, required: 必須入力)", "example": "optional" }, "commuter_pass_deduction": { "type": "string", "enum": [ "disable", "enable" ], "description": "定期券区間控除の利用設定 (disable: 利用しない, enable: 利用する)", "example": "disable" }, "default_flow_route_src_id": { "type": "integer", "format": "int64", "nullable": true, "minimum": 1, "description": "デフォルトで選択する申請経路のID (未設定の場合は null)。申請経路一覧の取得API (`/api/1/approval_flow_routes`) のレスポンス id と同じ値です。", "example": 101 }, "observer_addition": { "type": "string", "enum": [ "disable", "enable" ], "description": "承認者以外の閲覧者追加の利用設定 (disable: 利用しない, enable: 利用する)", "example": "disable" }, "receipt_partner_name_setting": { "type": "string", "enum": [ "optional", "required", "disable" ], "description": "支払先の入力設定 (optional: 任意入力, required: 必須入力, disable: 非表示)", "example": "disable" }, "default_title": { "type": "string", "maxLength": 255, "description": "申請タイトルの初期値 (255文字以内)", "example": "交通費精算" }, "use_currency": { "type": "boolean", "description": "外貨の利用設定", "example": true }, "auto_calculation_amount_fraction": { "type": "string", "enum": [ "omit", "round_up", "round" ], "description": "金額の自動計算結果の端数処理 (omit: 切り捨て, round_up: 切り上げ, round: 四捨五入)", "example": "round_up" }, "allow_modify_parent_application_by_applicant": { "type": "boolean", "description": "申請者による親申請の変更を許可するか", "example": true }, "allow_modify_parent_application_by_approver": { "type": "boolean", "description": "承認者による親申請の変更を許可するか", "example": false }, "allow_modify_parent_application_by_admin": { "type": "boolean", "description": "管理者による親申請の変更を許可するか", "example": false }, "require_parent_purchase_request": { "type": "boolean", "description": "親となる購買申請を必須にするか", "example": false }, "allow_modify_on_approval": { "type": "boolean", "description": "承認中の申請の変更を許可するか", "example": false } }, "additionalProperties": false }, "expenseApplicationFormParams": { "type": "object", "required": [ "company_id", "section_setting", "tag_setting", "line_template_setting", "segment_1_tag_setting", "segment_2_tag_setting", "segment_3_tag_setting", "description_setting", "commuter_pass_deduction", "default_flow_route_src_id", "observer_addition", "receipt_partner_name_setting", "default_title", "use_currency", "auto_calculation_amount_fraction", "allow_modify_parent_application_by_applicant", "allow_modify_parent_application_by_approver", "allow_modify_parent_application_by_admin", "require_parent_purchase_request", "allow_modify_on_approval" ], "properties": { "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID", "example": 1 }, "section_setting": { "type": "string", "enum": [ "optional", "required" ], "description": "部門の入力設定 (optional: 任意入力, required: 必須入力)", "example": "optional" }, "tag_setting": { "type": "string", "enum": [ "optional", "required", "disable" ], "description": "メモタグの入力設定 (optional: 任意入力, required: 必須入力, disable: 非表示)", "example": "optional" }, "line_template_setting": { "type": "string", "enum": [ "optional", "required", "disable" ], "description": "経費科目の入力設定 (optional: 任意入力, required: 必須入力, disable: 非表示)。経費科目は `/api/1/expense_application_line_templates` で取得できます。", "example": "optional" }, "segment_1_tag_setting": { "type": "string", "enum": [ "optional", "required", "disable" ], "description": "セグメント1タグの入力設定 (optional: 任意入力, required: 必須入力, disable: 非表示)", "example": "optional" }, "segment_2_tag_setting": { "type": "string", "enum": [ "optional", "required", "disable" ], "description": "セグメント2タグの入力設定 (optional: 任意入力, required: 必須入力, disable: 非表示)", "example": "optional" }, "segment_3_tag_setting": { "type": "string", "enum": [ "optional", "required", "disable" ], "description": "セグメント3タグの入力設定 (optional: 任意入力, required: 必須入力, disable: 非表示)", "example": "optional" }, "description_setting": { "type": "string", "enum": [ "optional", "required" ], "description": "備考の入力設定 (optional: 任意入力, required: 必須入力)", "example": "optional" }, "commuter_pass_deduction": { "type": "string", "enum": [ "disable", "enable" ], "description": "定期券区間控除の利用設定 (disable: 利用しない, enable: 利用する)", "example": "disable" }, "default_flow_route_src_id": { "type": "integer", "format": "int64", "nullable": true, "minimum": 1, "description": "デフォルトで選択する申請経路のID (未設定の場合は null)。申請経路一覧の取得API (`/api/1/approval_flow_routes`) のレスポンス id と同じ値です。", "example": 101 }, "observer_addition": { "type": "string", "enum": [ "disable", "enable" ], "description": "承認者以外の閲覧者追加の利用設定 (disable: 利用しない, enable: 利用する)", "example": "disable" }, "receipt_partner_name_setting": { "type": "string", "enum": [ "optional", "required", "disable" ], "description": "支払先の入力設定 (optional: 任意入力, required: 必須入力, disable: 非表示)", "example": "disable" }, "default_title": { "type": "string", "maxLength": 255, "description": "申請タイトルの初期値 (255文字以内)", "example": "交通費精算" }, "use_currency": { "type": "boolean", "description": "外貨の利用設定", "example": true }, "auto_calculation_amount_fraction": { "type": "string", "enum": [ "omit", "round_up", "round" ], "description": "金額の自動計算結果の端数処理 (omit: 切り捨て, round_up: 切り上げ, round: 四捨五入)", "example": "round_up" }, "allow_modify_parent_application_by_applicant": { "type": "boolean", "description": "申請者による親申請の変更を許可するか", "example": true }, "allow_modify_parent_application_by_approver": { "type": "boolean", "description": "承認者による親申請の変更を許可するか", "example": false }, "allow_modify_parent_application_by_admin": { "type": "boolean", "description": "管理者による親申請の変更を許可するか", "example": false }, "require_parent_purchase_request": { "type": "boolean", "description": "親となる購買申請を必須にするか", "example": false }, "allow_modify_on_approval": { "type": "boolean", "description": "承認中の申請の変更を許可するか", "example": false } }, "additionalProperties": false }, "approvalRequestsIndexResponse": { "type": "object", "required": [ "approval_requests" ], "properties": { "approval_requests": { "type": "array", "items": { "type": "object", "required": [ "applicant_id", "application_date", "application_number", "company_id", "id", "request_items", "status", "title", "form_id", "current_step_id", "current_round", "deal_id", "manual_journal_id", "deal_status" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "各種申請ID", "example": 1 }, "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID", "example": 1 }, "application_date": { "type": "string", "description": "申請日 (yyyy-mm-dd)", "example": "2019-12-17" }, "title": { "type": "string", "description": "申請タイトル", "example": "大阪出張" }, "applicant_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "申請者のユーザーID", "example": 1 }, "application_number": { "type": "string", "description": "申請No.", "example": "2" }, "status": { "type": "string", "description": "申請ステータス(draft:下書き, in_progress:申請中, approved:承認済, rejected:却下, feedback:差戻し)", "example": "draft", "enum": [ "draft", "in_progress", "approved", "rejected", "feedback" ] }, "request_items": { "type": "array", "description": "各種申請の項目一覧(配列)", "items": { "type": "object", "required": [ "id", "type", "value" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "項目ID", "example": 1 }, "type": { "type": "string", "description": "項目タイプ(title: 申請タイトル, single_line: 自由記述形式 1行, multi_line: 自由記述形式 複数行, select: プルダウン, checkbox: 複数選択, date: 日付, amount: 金額, receipt: 添付ファイル, section: 部門ID, partner: 取引先ID, ninja_sign_document: 契約書(freeeサイン連携))", "enum": [ "title", "single_line", "multi_line", "select", "checkbox", "date", "amount", "receipt", "section", "partner", "ninja_sign_document" ], "example": "single_line" }, "value": { "type": "string", "description": "項目の値", "example": "取引先への営業のため" } } } }, "form_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "申請フォームID", "example": 1 }, "current_step_id": { "type": "integer", "format": "int64", "description": "現在承認ステップID", "example": 1, "nullable": true }, "current_round": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647, "description": "現在のround。差し戻し等により申請がstepの最初からやり直しになるとroundの値が増えます。", "example": 1 }, "deal_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "取引ID (申請ステータス:statusがapprovedで、取引が存在する時のみdeal_idが表示されます)", "example": 1, "nullable": true }, "manual_journal_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "振替伝票のID (申請ステータス:statusがapprovedで、関連する振替伝票が存在する時のみmanual_journal_idが表示されます)\n\n承認された各種申請から支払依頼等を作成する\n", "example": 1, "nullable": true }, "deal_status": { "type": "string", "description": "取引ステータス (申請ステータス:statusがapprovedで、取引が存在する時のみdeal_statusが表示されます settled:決済済み, unsettled:未決済)", "example": "settled", "enum": [ "settled", "unsettled" ], "nullable": true } } } } } }, "approvalRequestResponse": { "type": "object", "required": [ "approval_request" ], "properties": { "approval_request": { "type": "object", "required": [ "applicant_id", "application_date", "application_number", "approvers", "company_id", "id", "request_items", "status", "title", "form_id", "approval_flow_route_id", "comments", "approval_flow_logs", "current_step_id", "current_round", "approval_request_form", "deal_id", "manual_journal_id", "deal_status" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "各種申請ID", "example": 1 }, "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID", "example": 1 }, "application_date": { "type": "string", "description": "申請日 (yyyy-mm-dd)", "example": "2019-12-17" }, "title": { "type": "string", "description": "申請タイトル", "example": "大阪出張" }, "applicant_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "申請者のユーザーID", "example": 1 }, "approvers": { "type": "array", "description": "承認者(配列)\n 承認ステップのresource_typeがunspecified (指定なし)の場合はapproversはレスポンスに含まれません。\n しかし、resource_typeがunspecifiedの承認ステップにおいて誰かが承認・却下・差し戻しのいずれかのアクションを取った後は、\n approversはレスポンスに含まれるようになります。\n その場合approversにはアクションを行ったステップのIDとアクションを行ったユーザーのIDが含まれます。", "items": { "type": "object", "required": [ "step_id", "user_id", "status", "is_force_action", "resource_type" ], "properties": { "step_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "承認ステップID", "example": 1 }, "user_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "承認者のユーザーID\n下記の場合はnullになります。\n", "example": 1, "nullable": true }, "status": { "type": "string", "description": "承認者の承認状態\n* `initial` - 初期状態\n* `approved` - 承認済\n* `rejected` - 却下\n* `feedback` - 差戻し", "example": "initial", "enum": [ "initial", "approved", "rejected", "feedback" ] }, "is_force_action": { "type": "boolean", "description": "特権承認済みかどうか", "example": true }, "resource_type": { "type": "string", "description": "承認ステップの承認方法\n* ` predefined_user` - メンバー指定 (1人),\n* ` selected_user` - 申請時にメンバー指定\n* ` unspecified` - 指定なし\n* ` and_resource` - メンバー指定 (複数、全員の承認),\n* ` or_resource` - メンバー指定 (複数、1人の承認)\n* ` and_position` - 役職指定 (複数、全員の承認)\n* ` or_position` - 役職指定 (複数、1人の承認)", "enum": [ "predefined_user", "selected_user", "unspecified", "and_resource", "or_resource", "and_position", "or_position" ], "example": "predefined_user" } } } }, "application_number": { "type": "string", "description": "申請No.", "example": "2" }, "status": { "type": "string", "description": "申請ステータス(draft:下書き, in_progress:申請中, approved:承認済, rejected:却下, feedback:差戻し)", "example": "draft", "enum": [ "draft", "in_progress", "approved", "rejected", "feedback" ] }, "request_items": { "type": "array", "description": "各種申請の項目一覧(配列)", "items": { "type": "object", "required": [ "id", "type", "value" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "項目ID", "example": 1 }, "type": { "type": "string", "description": "項目タイプ(title: 申請タイトル, single_line: 自由記述形式 1行, multi_line: 自由記述形式 複数行, select: プルダウン, checkbox: 複数選択, date: 日付, amount: 金額, receipt: 添付ファイル, section: 部門ID, partner: 取引先ID, ninja_sign_document: 契約書(freeeサイン連携))", "enum": [ "title", "single_line", "multi_line", "select", "checkbox", "date", "amount", "receipt", "section", "partner", "ninja_sign_document" ], "example": "single_line" }, "value": { "type": "string", "description": "項目の値", "example": "取引先への営業のため" } } } }, "form_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "申請フォームID", "example": 1 }, "approval_flow_route_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "申請経路ID", "example": 1 }, "comments": { "type": "array", "description": "各種申請のコメント一覧(配列)", "items": { "type": "object", "required": [ "comment", "user_id", "posted_at" ], "properties": { "comment": { "type": "string", "description": "コメント内容", "example": "訂正をお願いします。" }, "user_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "ユーザーID", "example": 1 }, "posted_at": { "type": "string", "description": "コメント日時(ISO8601形式)", "example": "2019-12-17T18:30:24+09:00" } } } }, "approval_flow_logs": { "type": "array", "description": "各種申請の承認履歴(配列)", "items": { "type": "object", "required": [ "action", "user_id", "updated_at" ], "properties": { "action": { "type": "string", "description": "操作(apply: 申請, approve: 承認, force_approve: 特権承認, cancel: 取消, reject: 却下, feedback: 差戻し)", "enum": [ "apply", "approve", "force_approve", "cancel", "reject", "feedback" ], "example": "approve" }, "user_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "ユーザーID", "example": 1 }, "updated_at": { "type": "string", "description": "更新日時(ISO8601形式)", "example": "2019-12-17T18:30:24+09:00" } } } }, "current_step_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "現在承認ステップID", "example": 1, "nullable": true }, "current_round": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647, "description": "現在のround。差し戻し等により申請がstepの最初からやり直しになるとroundの値が増えます。", "example": 1 }, "approval_request_form": { "type": "object", "required": [ "parts" ], "properties": { "parts": { "type": "array", "description": "申請フォームの項目", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "項目ID", "example": 1 }, "order": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647, "description": "順序", "example": 1 }, "type": { "type": "string", "description": "項目種別 (title: 申請タイトル, single_line: 自由記述形式 1行, multi_line: 自由記述形式 複数行, select: プルダウン, checkbox: 複数選択, date: 日付, amount: 金額, receipt: 添付ファイル, section: 部門ID, partner: 取引先ID, ninja_sign_document: 契約書(freeeサイン連携))", "example": "single_line", "enum": [ "title", "single_line", "multi_line", "select", "checkbox", "date", "amount", "receipt", "section", "partner", "ninja_sign_document" ] }, "label": { "type": "string", "description": "項目名", "example": "項目名" }, "annotation": { "type": "string", "description": "追加説明", "example": "追加説明", "nullable": true }, "required": { "type": "boolean", "description": "必須かどうか", "example": true, "nullable": true }, "values": { "type": "array", "description": "選択項目", "items": { "type": "object", "required": [ "name", "order" ], "properties": { "name": { "type": "string", "description": "選択項目名", "example": "選択項目名" }, "order": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 2147483647, "description": "順序", "example": 1 } } }, "nullable": true }, "max_amount": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647, "description": "上限金額", "example": 100000, "nullable": true }, "min_amount": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647, "description": "下限金額", "example": 1000, "nullable": true } } } } } }, "deal_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "取引ID (申請ステータス:statusがapprovedで、取引が存在する時のみdeal_idが表示されます)", "example": 1, "nullable": true }, "manual_journal_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "振替伝票のID (申請ステータス:statusがapprovedで、関連する振替伝票が存在する時のみmanual_journal_idが表示されます)\n\n承認された各種申請から支払依頼等を作成する\n", "example": 1, "nullable": true }, "deal_status": { "type": "string", "description": "取引ステータス (申請ステータス:statusがapprovedで、取引が存在する時のみdeal_statusが表示されます settled:決済済み, unsettled:未決済)", "example": "settled", "enum": [ "settled", "unsettled" ], "nullable": true } } } } }, "approvalRequestFormIndexResponse": { "type": "object", "required": [ "approval_request_forms" ], "properties": { "approval_request_forms": { "type": "array", "items": { "type": "object", "required": [ "id", "company_id", "name", "description", "status", "created_date", "form_order", "route_setting_count" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "申請フォームID", "example": 1 }, "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID", "example": 1 }, "name": { "type": "string", "description": "申請フォームの名前", "example": "申請フォームの名前" }, "description": { "type": "string", "description": "申請フォームの説明", "example": "申請フォームの説明" }, "status": { "type": "string", "description": "ステータス(draft: 申請で使用しない、active: 申請で使用する)", "example": "active", "enum": [ "draft", "active" ] }, "created_date": { "type": "string", "description": "作成日時", "example": "2019-12-17T13:47:24+09:00" }, "form_order": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 1000, "description": "表示順(申請者が選択する申請フォームの表示順を設定できます。小さい数ほど上位に表示されます。(0を除く整数のみ。マイナス不可)未入力の場合、表示順が後ろになります。同じ数字が入力された場合、登録順で表示されます。)", "example": 1, "nullable": true }, "route_setting_count": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647, "description": "適用された経路数(ユーザーが利用できない経路を除く)", "example": 1 } } } } } }, "approvalRequestFormResponse": { "type": "object", "required": [ "approval_request_form" ], "properties": { "approval_request_form": { "type": "object", "required": [ "id", "company_id", "name", "description", "status", "created_date", "form_order", "route_setting_count" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "申請フォームID", "example": 1 }, "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID", "example": 1 }, "name": { "type": "string", "description": "申請フォームの名前", "example": "申請フォームの名前" }, "description": { "type": "string", "description": "申請フォームの説明", "example": "申請フォームの説明" }, "status": { "type": "string", "description": "ステータス(draft: 申請で使用しない、active: 申請で使用する)", "example": "active", "enum": [ "draft", "active" ] }, "created_date": { "type": "string", "description": "作成日時", "example": "2019-12-17T13:47:24+09:00" }, "form_order": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 1000, "description": "表示順(申請者が選択する申請フォームの表示順を設定できます。小さい数ほど上位に表示されます。(0を除く整数のみ。マイナス不可)未入力の場合、表示順が後ろになります。同じ数字が入力された場合、登録順で表示されます。)", "example": 1, "nullable": true }, "parts": { "type": "array", "description": "申請フォームの項目", "items": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "項目ID", "example": 1 }, "order": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 2147483647, "description": "順序", "example": 1 }, "type": { "type": "string", "description": "項目種別 (title: 申請タイトル, single_line: 自由記述形式 1行, multi_line: 自由記述形式 複数行, select: プルダウン, checkbox: 複数選択, date: 日付, amount: 金額, receipt: 添付ファイル, section: 部門ID, partner: 取引先ID, ninja_sign_document: 契約書(freeeサイン連携))", "example": "single_line", "enum": [ "title", "single_line", "multi_line", "select", "checkbox", "date", "amount", "receipt", "section", "partner", "ninja_sign_document" ] }, "label": { "type": "string", "description": "項目名", "example": "項目名" }, "annotation": { "type": "string", "description": "追加説明", "example": "追加説明", "nullable": true }, "required": { "type": "boolean", "description": "必須かどうか", "example": true, "nullable": true }, "values": { "type": "array", "description": "選択項目", "items": { "type": "object", "required": [ "name", "order" ], "properties": { "name": { "type": "string", "description": "選択項目名", "example": "選択項目名" }, "order": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 2147483647, "description": "順序", "example": 1 } } }, "nullable": true }, "max_amount": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647, "description": "上限金額", "example": 100000, "nullable": true }, "min_amount": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647, "description": "下限金額", "example": 1000, "nullable": true } } } }, "route_setting_count": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647, "description": "適用された経路数(ユーザーが利用できない経路を除く)", "example": 1 } } } } }, "purchaseRequestsIndexResponse": { "type": "object", "required": [ "purchase_requests" ], "properties": { "purchase_requests": { "type": "array", "items": { "type": "object", "required": [ "id", "company_id", "application_date", "title", "applicant_id", "application_number", "status", "form_id", "amount", "budget_amount" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "購買申請ID", "example": 1 }, "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID", "example": 1 }, "application_date": { "type": "string", "description": "申請日 (yyyy-mm-dd)", "example": "2019-12-17" }, "title": { "type": "string", "description": "申請タイトル", "example": "大阪出張" }, "applicant_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "申請者のユーザーID", "example": 1 }, "application_number": { "type": "string", "description": "申請No.", "example": "2" }, "status": { "type": "string", "description": "申請ステータス(draft:下書き, in_progress:申請中, approved:承認済, rejected:却下, feedback:差戻し)", "example": "draft", "enum": [ "draft", "in_progress", "approved", "rejected", "feedback" ] }, "form_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "申請フォームID", "example": 1 }, "amount": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647, "description": "金額(非推奨。budget_amount を使用してください)", "example": 1000, "deprecated": true }, "budget_amount": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647, "description": "金額", "example": 1000 }, "applicant": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "申請者のユーザーID", "example": 1 }, "user_name": { "type": "string", "description": "申請者のユーザー名" } } } } } }, "total_count": { "type": "integer", "format": "int64", "minimum": 0, "description": "検索結果の総件数", "example": 1 } } }, "purchaseRequestDetailResponse": { "type": "object", "required": [ "purchase_request" ], "properties": { "purchase_request": { "type": "object", "required": [ "id", "user_id", "title", "application_date", "purchase_request_code", "status", "approvable", "purchase_request_lines", "purchase_request_custom_values", "approval_flow_approvers" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "購買申請ID", "example": 1 }, "user_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "申請者のユーザーID", "example": 1 }, "title": { "type": "string", "description": "申請タイトル", "example": "大阪出張" }, "application_date": { "type": "string", "description": "申請日 (yyyy-mm-dd)", "example": "2019-12-17" }, "occurrence_start_date": { "type": "string", "nullable": true, "description": "発生開始日 (yyyy-mm-dd)", "example": "2019-12-17" }, "occurrence_end_date": { "type": "string", "nullable": true, "description": "発生終了日 (yyyy-mm-dd)", "example": "2019-12-20" }, "purchase_request_code": { "type": "string", "description": "申請No.", "example": "2" }, "description": { "type": "string", "nullable": true, "description": "申請の説明", "example": "出張に伴う備品購入" }, "budget_amount": { "type": "integer", "format": "int64", "nullable": true, "description": "金額", "example": 1000 }, "current_step_id": { "type": "integer", "format": "int64", "nullable": true, "description": "現在の承認ステップID", "example": 1 }, "status": { "type": "string", "description": "申請ステータス(draft:下書き, in_progress:申請中, approved:承認済, rejected:却下, feedback:差戻し)", "example": "draft", "enum": [ "draft", "in_progress", "approved", "rejected", "feedback" ] }, "approvable": { "type": "boolean", "description": "現在のユーザーが承認操作可能か", "example": false }, "default_route_src_id": { "type": "integer", "format": "int64", "nullable": true, "description": "デフォルト申請経路のsrc ID", "example": 1 }, "from_resubmission_purchase_request_id": { "type": "integer", "format": "int64", "nullable": true, "description": "再決裁元の購買申請ID", "example": 1 }, "to_resubmission_purchase_request_id": { "type": "integer", "format": "int64", "nullable": true, "description": "再決裁先の購買申請ID", "example": 1 }, "purchase_request_lines": { "type": "array", "description": "購買申請明細行", "items": { "type": "object", "required": [ "id", "purchase_request_id", "line_order" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "明細行ID", "example": 1 }, "purchase_request_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "購買申請ID", "example": 1 }, "line_order": { "type": "integer", "format": "int64", "description": "行番号", "example": 0 }, "amount": { "type": "integer", "format": "int64", "nullable": true, "description": "金額", "example": 1000 }, "selected_payment_methods": { "type": "array", "nullable": true, "description": "選択された支払方法", "items": { "type": "string" } }, "content": { "type": "string", "nullable": true, "description": "内容", "example": "備品購入" }, "scheduled_purchase_date": { "type": "string", "nullable": true, "description": "購入予定日 (yyyy-mm-dd)", "example": "2019-12-17" }, "scheduled_purchase_end_date": { "type": "string", "nullable": true, "description": "購入予定終了日 (yyyy-mm-dd)", "example": "2019-12-20" }, "section": { "type": "object", "nullable": true, "description": "部門タグ", "properties": { "id": { "type": "integer", "format": "int64", "example": 1 }, "name": { "type": "string", "example": "開発部" }, "category_name": { "type": "string", "example": "section" } } }, "partner": { "type": "object", "nullable": true, "description": "取引先タグ", "properties": { "id": { "type": "integer", "format": "int64", "example": 1 }, "name": { "type": "string", "example": "freee" }, "category_name": { "type": "string", "example": "partner" } } }, "item": { "type": "object", "nullable": true, "description": "品目タグ", "properties": { "id": { "type": "integer", "format": "int64", "example": 1 }, "name": { "type": "string", "example": "消耗品" }, "category_name": { "type": "string", "example": "item" } } }, "segment_1_tag": { "type": "object", "nullable": true, "description": "セグメント1タグ", "properties": { "id": { "type": "integer", "format": "int64", "example": 1 }, "name": { "type": "string", "example": "セグメント1" }, "category_name": { "type": "string", "example": "segment_1" } } }, "segment_2_tag": { "type": "object", "nullable": true, "description": "セグメント2タグ", "properties": { "id": { "type": "integer", "format": "int64", "example": 1 }, "name": { "type": "string", "example": "セグメント2" }, "category_name": { "type": "string", "example": "segment_2" } } }, "segment_3_tag": { "type": "object", "nullable": true, "description": "セグメント3タグ", "properties": { "id": { "type": "integer", "format": "int64", "example": 1 }, "name": { "type": "string", "example": "セグメント3" }, "category_name": { "type": "string", "example": "segment_3" } } }, "tags": { "type": "array", "description": "メモタグ", "items": { "type": "object", "properties": { "id": { "type": "integer", "format": "int64", "example": 1 }, "name": { "type": "string", "example": "タグ" }, "category_name": { "type": "string", "example": "default" } } } } } } }, "purchase_request_custom_values": { "type": "array", "description": "カスタム項目の値", "items": { "type": "object", "required": [ "id", "purchase_request_id", "custom_form_id", "custom_form_part_id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "カスタム項目値ID", "example": 1 }, "purchase_request_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "購買申請ID", "example": 1 }, "custom_form_id": { "type": "integer", "format": "int64", "description": "カスタムフォームID", "example": 1 }, "custom_form_part_id": { "type": "integer", "format": "int64", "description": "カスタムフォーム項目ID", "example": 1 }, "json_value": { "nullable": true, "description": "カスタム項目の値(項目種別により形式が異なる)" } } } }, "approval_flow_approvers": { "type": "array", "description": "承認フローの承認者", "items": { "type": "object", "properties": { "step_id": { "type": "integer", "format": "int64", "nullable": true, "description": "承認ステップID", "example": 1 }, "user_id": { "type": "integer", "format": "int64", "description": "承認者のユーザーID", "example": 1 }, "is_force_action": { "type": "boolean", "description": "強制承認かどうか", "example": false }, "status": { "type": "string", "description": "承認者の承認ステータス", "example": "approved" } } } } } } } }, "purchaseRequestFormIndexResponse": { "type": "object", "required": [ "purchase_request_forms", "total_count" ], "properties": { "total_count": { "type": "integer", "format": "int64", "minimum": 0, "description": "検索条件に合致する申請フォームの総数(limit / offset による絞り込みの影響を受けません)", "example": 1 }, "purchase_request_forms": { "type": "array", "items": { "type": "object", "required": [ "id", "name", "description", "status", "form_order", "route_setting_count" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "申請フォームID", "example": 1 }, "name": { "type": "string", "description": "申請フォームの名前", "example": "申請フォームの名前" }, "description": { "type": "string", "description": "申請フォームの説明", "example": "申請フォームの説明" }, "status": { "type": "string", "description": "ステータス(draft: 申請で使用しない、active: 申請で使用する、deleted: 削除済み)", "example": "active", "enum": [ "draft", "active", "deleted" ] }, "form_order": { "type": "integer", "format": "int64", "minimum": 1, "maximum": 1000, "description": "表示順(申請者が選択する申請フォームの表示順を設定できます。小さい数ほど上位に表示されます。(0を除く整数のみ。マイナス不可)未入力の場合、表示順が後ろになります。同じ数字が入力された場合、登録順で表示されます。)", "example": 1, "nullable": true } } } } } }, "purchaseRequestFormDetailResponse": { "type": "object", "required": [ "type", "purchase_request_setting", "custom_form", "flow_routes" ], "properties": { "type": { "type": "string", "description": "フォーム種別", "example": "PurchaseRequest" }, "purchase_request_setting": { "type": "object", "description": "申請フォームの設定", "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "申請フォームID", "nullable": true }, "status": { "type": "string", "description": "ステータス(draft: 申請で使用しない、active: 申請で使用する)", "example": "active" }, "form_order": { "type": "integer", "format": "int64", "description": "表示順", "nullable": true }, "default_flow_route_src_id": { "type": "integer", "format": "int64", "description": "デフォルトの承認経路ID", "nullable": true }, "default_title": { "type": "string", "description": "デフォルトのタイトル", "nullable": true }, "default_content": { "type": "string", "description": "デフォルトの内容", "nullable": true }, "name": { "type": "string", "description": "申請フォームの名前" }, "title_annotation": { "type": "string", "description": "タイトルの注釈", "nullable": true }, "description": { "type": "string", "description": "申請フォームの説明", "nullable": true }, "description_setting": { "type": "string", "description": "説明の入力設定" }, "content_setting": { "type": "string", "description": "内容の入力設定" }, "payment_method_setting": { "type": "string", "description": "支払方法の入力設定" }, "receipt_setting": { "type": "string", "description": "証憑の入力設定" }, "section_setting": { "type": "string", "description": "部門の入力設定" }, "section_annotation": { "type": "string", "description": "部門の注釈", "nullable": true }, "partner_setting": { "type": "string", "description": "取引先の入力設定" }, "partner_annotation": { "type": "string", "description": "取引先の注釈", "nullable": true }, "item_setting": { "type": "string", "description": "品目の入力設定" }, "item_annotation": { "type": "string", "description": "品目の注釈", "nullable": true }, "tag_setting": { "type": "string", "description": "メモタグの入力設定" }, "tag_annotation": { "type": "string", "description": "メモタグの注釈", "nullable": true }, "segment_1_tag_setting": { "type": "string", "description": "セグメント1の入力設定" }, "segment_1_tag_annotation": { "type": "string", "description": "セグメント1の注釈", "nullable": true }, "segment_2_tag_setting": { "type": "string", "description": "セグメント2の入力設定" }, "segment_2_tag_annotation": { "type": "string", "description": "セグメント2の注釈", "nullable": true }, "segment_3_tag_setting": { "type": "string", "description": "セグメント3の入力設定" }, "segment_3_tag_annotation": { "type": "string", "description": "セグメント3の注釈", "nullable": true }, "scheduled_purchase_date_setting": { "type": "string", "description": "購入予定日の入力設定" }, "observer_addition": { "type": "string", "description": "観察者の追加設定" }, "content_display_name": { "type": "string", "description": "内容の表示名" }, "content_annotation": { "type": "string", "description": "内容の注釈", "nullable": true }, "scheduled_purchase_date_display_name": { "type": "string", "description": "購入予定日の表示名" }, "scheduled_purchase_date_annotation": { "type": "string", "description": "購入予定日の注釈", "nullable": true }, "enable_scheduled_purchase_date_range": { "type": "boolean", "description": "購入予定日を期間で入力できるか" }, "specified_payment_methods": { "type": "array", "description": "指定された支払方法", "nullable": true, "items": { "type": "string" } }, "payment_method_display_name": { "type": "string", "description": "支払方法の表示名" }, "payment_method_annotation": { "type": "string", "description": "支払方法の注釈", "nullable": true }, "receipt_display_name": { "type": "string", "description": "証憑の表示名" }, "receipt_annotation": { "type": "string", "description": "証憑の注釈", "nullable": true }, "description_annotation": { "type": "string", "description": "説明の注釈", "nullable": true }, "amount_display_name": { "type": "string", "description": "金額の表示名" }, "amount_annotation": { "type": "string", "description": "金額の注釈", "nullable": true }, "occurrence_date_setting": { "type": "string", "description": "発生日の入力設定" }, "occurrence_date_display_name": { "type": "string", "description": "発生日の表示名" }, "occurrence_date_annotation": { "type": "string", "description": "発生日の注釈", "nullable": true }, "enable_occurrence_date_range": { "type": "boolean", "description": "発生日を期間で入力できるか" }, "receipt_fields": { "type": "array", "description": "証憑フィールドの設定", "nullable": true, "items": { "type": "object", "properties": { "id": { "type": "integer", "format": "int64", "nullable": true }, "display_name": { "type": "string" }, "annotation": { "type": "string", "nullable": true }, "line_order": { "type": "integer" }, "setting": { "type": "string", "description": "optional または required" } } } }, "tax_exclusive_setting": { "type": "string", "description": "税抜経理の設定" }, "freee_card_issue_setting": { "type": "string", "description": "freeeカード発行の設定" }, "default_observers": { "type": "array", "description": "デフォルトの観察者", "items": { "type": "object", "properties": { "user_id": { "type": "integer", "format": "int64", "nullable": true }, "user_name": { "type": "string" }, "user_deleted": { "type": "boolean" } } } }, "virtual_card_issuance_setting": { "type": "object", "description": "バーチャルカード発行設定", "nullable": true, "properties": { "card_name_annotation": { "type": "string", "nullable": true }, "amount_limit_setting": { "type": "string" }, "amount_limit_type_options": { "type": "string", "nullable": true }, "monthly_amount_limit": { "type": "integer", "format": "int64", "nullable": true }, "total_amount_limit": { "type": "integer", "format": "int64", "nullable": true }, "total_amount_limit_annotation": { "type": "string", "nullable": true }, "ends_at_setting": { "type": "string" }, "ends_at_annotation": { "type": "string", "nullable": true }, "memo_setting": { "type": "string" }, "memo_annotation": { "type": "string", "nullable": true }, "notification_setting": { "type": "string" }, "notification_threshold_amount": { "type": "integer", "format": "int64", "nullable": true }, "use_usage_report": { "type": "boolean" } } } } }, "custom_form": { "type": "object", "description": "カスタムフォーム(フォーム項目の定義)", "nullable": true, "properties": { "id": { "type": "integer", "format": "int64", "nullable": true }, "parts": { "type": "array", "description": "カスタムフォームの項目", "items": { "type": "object", "properties": { "id": { "type": "integer", "format": "int64", "nullable": true }, "display_name": { "type": "string" }, "setting": { "type": "string", "description": "optional または required" }, "type_name": { "type": "string", "description": "single_line_string, multi_line_string, number, single_date, date_range, pulldown, checkbox, radio_button のいずれか" }, "default_value": { "type": "object", "description": "項目の初期値(type_name により構造が異なる)", "nullable": true }, "unit": { "type": "string", "nullable": true }, "annotation": { "type": "string", "nullable": true }, "line_order": { "type": "integer" }, "selectable_value": { "type": "array", "description": "選択肢(pulldown/checkbox/radio_button のとき)", "nullable": true, "items": { "type": "string" } } } } } } }, "flow_routes": { "type": "array", "description": "利用可能な承認経路(詳細は `/api/1/approval_flow_routes` を参照。同 API のレスポンス id は本レスポンスの src_id に対応)", "items": { "type": "object", "properties": { "id": { "type": "integer", "format": "int64", "description": "承認経路ID(購買申請作成時の approval_flow_route_id に指定する値)" }, "src_id": { "type": "integer", "format": "int64", "description": "承認経路の元ID(`/api/1/approval_flow_routes` のレスポンス id と同じ値)" }, "name": { "type": "string", "description": "承認経路名" } } } } } }, "purchaseRequestActionCreateParams": { "type": "object", "required": [ "company_id", "do_action" ], "properties": { "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID", "example": 1 }, "do_action": { "type": "string", "description": "操作(apply: 申請する、approve: 承認する、reject: 却下する、feedback: 申請者へ差し戻す)", "example": "approve", "enum": [ "apply", "approve", "reject", "feedback" ] }, "next_approver_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "次の承認ステップの承認者のユーザーID", "example": 1, "nullable": true }, "next_group_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "次の承認ステップの承認グループID", "example": 1, "nullable": true } } }, "purchaseRequestCreateParams": { "type": "object", "required": [ "company_id", "status", "purchase_request_form_id" ], "properties": { "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID", "example": 1 }, "purchase_request_form_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "購買申請の申請フォームID", "example": 1 }, "status": { "type": "string", "description": "申請ステータス
\ndraft を指定した時は下書きで購買申請を作成します。
\nin_progress を指定した時は申請中で購買申請を作成します。\n", "example": "draft", "enum": [ "draft", "in_progress" ] }, "applicant_group_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "申請者グループID", "example": 1, "nullable": true }, "title": { "type": "string", "description": "申請タイトル", "example": "大阪出張", "nullable": true }, "description": { "type": "string", "description": "申請の説明", "example": "出張に伴う備品購入", "nullable": true }, "occurrence_start_date": { "type": "string", "description": "発生開始日 (yyyy-mm-dd)", "example": "2019-12-17", "nullable": true }, "occurrence_end_date": { "type": "string", "description": "発生終了日 (yyyy-mm-dd)", "example": "2019-12-20", "nullable": true }, "approval_flow_route_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "申請経路ID(申請フォーム詳細の取得APIのレスポンスの flow_routes の id を指定してください。申請経路一覧の取得API /api/1/approval_flow_routes のレスポンスの id とは異なる値です)", "example": 1, "nullable": true }, "approval_flow_approver_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "申請経路の承認者ユーザーID", "example": 1, "nullable": true }, "approval_flow_group_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "申請経路の承認グループID", "example": 1, "nullable": true }, "observer_user_ids": { "type": "array", "description": "閲覧者のユーザーID", "items": { "type": "integer", "format": "int64", "minimum": 1, "example": 1 } }, "parent_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "親申請ID", "example": 1, "nullable": true }, "parent_type": { "type": "string", "description": "親申請の種別", "example": "PurchaseRequest", "nullable": true }, "resubmission_from_purchase_request_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "再決裁元の購買申請ID", "example": 1, "nullable": true }, "purchase_request_lines": { "type": "array", "description": "購買申請の項目行一覧(配列)", "items": { "type": "object", "required": [ "amount" ], "properties": { "line_order": { "type": "integer", "format": "int64", "minimum": 0, "description": "行番号", "example": 0 }, "amount": { "type": "integer", "format": "int64", "description": "金額", "example": 1000 }, "content": { "type": "string", "description": "内容", "example": "備品購入" }, "selected_payment_methods": { "type": "array", "description": "選択された支払方法", "items": { "type": "string", "example": "cash" } }, "receipt_ids": { "type": "array", "description": "ファイルボックス(証憑ファイル)ID(配列)", "items": { "type": "integer", "format": "int64", "minimum": 1, "example": 1 } }, "receipt_field_values": { "type": "array", "description": "ファイル添付項目の値一覧(配列)", "items": { "type": "object", "required": [ "field_id" ], "properties": { "field_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "ファイル添付項目ID", "example": 1 }, "receipt_ids": { "type": "array", "description": "ファイルボックス(証憑ファイル)ID(配列)", "items": { "type": "integer", "format": "int64", "minimum": 1, "example": 1 } } } } }, "section_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "部門ID", "example": 1, "nullable": true }, "partner_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "取引先ID", "example": 1, "nullable": true }, "item_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "品目ID", "example": 1, "nullable": true }, "tag_ids": { "type": "array", "description": "メモタグID(配列)", "items": { "type": "integer", "format": "int64", "minimum": 1, "example": 1 } }, "segment_1_tag_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメント1タグID", "example": 1, "nullable": true }, "segment_2_tag_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメント2タグID", "example": 1, "nullable": true }, "segment_3_tag_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメント3タグID", "example": 1, "nullable": true }, "scheduled_purchase_date": { "type": "string", "description": "購入予定日 (yyyy-mm-dd)", "example": "2019-12-17", "nullable": true }, "scheduled_purchase_end_date": { "type": "string", "description": "購入予定終了日 (yyyy-mm-dd)", "example": "2019-12-20", "nullable": true } } } }, "purchase_request_custom_values": { "type": "array", "description": "カスタム項目の値一覧(配列)", "items": { "type": "object", "required": [ "custom_form_part_id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "カスタム項目値ID", "example": 1 }, "custom_form_part_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "カスタムフォーム項目ID", "example": 1 }, "json_value": { "type": "object", "description": "カスタム項目の値(項目種別により形式が異なる)", "properties": { "single_line_string": { "type": "string", "description": "1行テキスト", "nullable": true }, "multi_line_string": { "type": "string", "description": "複数行テキスト", "nullable": true }, "single_date": { "type": "string", "description": "日付 (yyyy-mm-dd)", "example": "2019-12-17", "nullable": true }, "date_range": { "type": "object", "nullable": true, "description": "日付期間", "properties": { "start_date": { "type": "string", "description": "開始日 (yyyy-mm-dd)", "example": "2019-12-17", "nullable": true }, "end_date": { "type": "string", "description": "終了日 (yyyy-mm-dd)", "example": "2019-12-20", "nullable": true } } }, "number": { "type": "number", "description": "数値", "nullable": true }, "pulldown": { "type": "string", "description": "プルダウン値", "nullable": true }, "checkbox": { "type": "array", "description": "チェックボックス値(配列)", "items": { "type": "string" } }, "radio_button": { "type": "string", "description": "ラジオボタン値", "nullable": true } } } } } } } }, "purchaseRequestUpdateParams": { "type": "object", "required": [ "company_id", "status", "purchase_request_form_id" ], "properties": { "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID", "example": 1 }, "purchase_request_form_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "購買申請の申請フォームID", "example": 1 }, "status": { "type": "string", "description": "申請ステータス
\ndraft を指定した時は下書きで購買申請を更新します。
\nin_progress を指定した時は申請中で購買申請を更新します。\n", "example": "draft", "enum": [ "draft", "in_progress" ] }, "applicant_group_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "申請者グループID", "example": 1, "nullable": true }, "title": { "type": "string", "description": "申請タイトル", "example": "大阪出張" }, "description": { "type": "string", "description": "申請の説明", "example": "出張に伴う備品購入", "nullable": true }, "occurrence_start_date": { "type": "string", "description": "発生開始日 (yyyy-mm-dd)", "example": "2019-12-17", "nullable": true }, "occurrence_end_date": { "type": "string", "description": "発生終了日 (yyyy-mm-dd)", "example": "2019-12-20", "nullable": true }, "approval_flow_route_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "申請経路ID(申請フォーム詳細の取得APIのレスポンスの flow_routes の id を指定してください。申請経路一覧の取得API /api/1/approval_flow_routes のレスポンスの id とは異なる値です)", "example": 1, "nullable": true }, "approval_flow_approver_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "申請経路の承認者ユーザーID", "example": 1, "nullable": true }, "approval_flow_group_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "申請経路の承認グループID", "example": 1, "nullable": true }, "purchase_request_lines": { "type": "array", "description": "購買申請の項目行一覧(配列)", "items": { "type": "object", "required": [ "amount" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "購買申請の項目行ID(新規行の場合は指定しない)", "example": 1 }, "line_order": { "type": "integer", "format": "int64", "minimum": 0, "description": "行番号", "example": 0 }, "amount": { "type": "integer", "format": "int64", "description": "金額", "example": 1000 }, "content": { "type": "string", "description": "内容", "example": "備品購入" }, "selected_payment_methods": { "type": "array", "description": "選択された支払方法", "items": { "type": "string", "example": "cash" } }, "receipt_ids": { "type": "array", "description": "ファイルボックス(証憑ファイル)ID(配列)", "items": { "type": "integer", "format": "int64", "minimum": 1, "example": 1 } }, "receipt_field_values": { "type": "array", "description": "ファイル添付項目の値一覧(配列)", "items": { "type": "object", "required": [ "field_id" ], "properties": { "field_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "ファイル添付項目ID", "example": 1 }, "receipt_ids": { "type": "array", "description": "ファイルボックス(証憑ファイル)ID(配列)", "items": { "type": "integer", "format": "int64", "minimum": 1, "example": 1 } } } } }, "section_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "部門ID", "example": 1, "nullable": true }, "partner_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "取引先ID", "example": 1, "nullable": true }, "item_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "品目ID", "example": 1, "nullable": true }, "tag_ids": { "type": "array", "description": "メモタグID(配列)", "items": { "type": "integer", "format": "int64", "minimum": 1, "example": 1 } }, "segment_1_tag_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメント1タグID", "example": 1, "nullable": true }, "segment_2_tag_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメント2タグID", "example": 1, "nullable": true }, "segment_3_tag_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメント3タグID", "example": 1, "nullable": true }, "scheduled_purchase_date": { "type": "string", "description": "購入予定日 (yyyy-mm-dd)", "example": "2019-12-17", "nullable": true }, "scheduled_purchase_end_date": { "type": "string", "description": "購入予定終了日 (yyyy-mm-dd)", "example": "2019-12-20", "nullable": true } } } }, "purchase_request_custom_values": { "type": "array", "description": "カスタム項目の値一覧(配列)", "items": { "type": "object", "required": [ "custom_form_part_id" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "カスタム項目値ID", "example": 1 }, "custom_form_part_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "カスタムフォーム項目ID", "example": 1 }, "json_value": { "type": "object", "description": "カスタム項目の値(項目種別により形式が異なる)", "properties": { "single_line_string": { "type": "string", "description": "1行テキスト", "nullable": true }, "multi_line_string": { "type": "string", "description": "複数行テキスト", "nullable": true }, "single_date": { "type": "string", "description": "日付 (yyyy-mm-dd)", "example": "2019-12-17", "nullable": true }, "date_range": { "type": "object", "nullable": true, "description": "日付期間", "properties": { "start_date": { "type": "string", "description": "開始日 (yyyy-mm-dd)", "example": "2019-12-17", "nullable": true }, "end_date": { "type": "string", "description": "終了日 (yyyy-mm-dd)", "example": "2019-12-20", "nullable": true } } }, "number": { "type": "number", "description": "数値", "nullable": true }, "pulldown": { "type": "string", "description": "プルダウン値", "nullable": true }, "checkbox": { "type": "array", "description": "チェックボックス値(配列)", "items": { "type": "string" } }, "radio_button": { "type": "string", "description": "ラジオボタン値", "nullable": true } } } } } } } }, "approvalFlowRoutesIndexResponse": { "type": "object", "required": [ "approval_flow_routes" ], "properties": { "approval_flow_routes": { "type": "array", "description": "申請経路の一覧", "items": { "type": "object", "required": [ "id", "name", "description", "user_id", "definition_system", "first_step_id", "usages", "request_form_ids", "default_route" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "申請経路ID", "example": 1 }, "name": { "type": "string", "description": "申請経路名", "example": "申請経路" }, "description": { "type": "string", "description": "申請経路の説明(未設定の場合は空文字列になります)", "example": "申請経路の説明" }, "user_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "申請経路を作成したユーザーのユーザーID(削除済みのユーザーでもIDは返ります。作成ユーザーが記録されていない場合は null になります)", "example": 1, "nullable": true }, "definition_system": { "type": "boolean", "description": "システムにより自動作成された申請経路かどうか(true の場合、freee が自動作成した申請経路であることを示します)", "example": true }, "first_step_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "最初の承認ステップのID", "example": 1 }, "usages": { "type": "array", "description": "申請種別(申請経路を使用できる申請種別を示します。例えば、ApprovalRequest の場合は、各種申請で使用できる申請経路です。)\n* `TxnApproval` - 仕訳承認\n* `ExpenseApplication` - 経費精算\n* `PaymentRequest` - 支払依頼\n* `ApprovalRequest` - 各種申請\n* `DocApproval` - 請求書等 (見積書・納品書・請求書・発注書)\n* `PurchaseRequest` - 購買申請", "items": { "type": "string", "enum": [ "TxnApproval", "ExpenseApplication", "PaymentRequest", "ApprovalRequest", "DocApproval", "PurchaseRequest" ], "example": "TxnApproval" } }, "request_form_ids": { "type": "array", "description": "申請経路で利用できる申請フォームID配列(無効化・削除された申請フォームは含まれません)", "items": { "type": "integer", "format": "int64", "minimum": 1, "description": "申請フォームID", "example": 1 } }, "default_route": { "type": "boolean", "description": "基本経路として設定されているかどうか

\nリクエストパラメータusageに下記のいずれかが指定され、かつ、基本経路の場合はtrueになります。\n* `TxnApproval` - 仕訳承認\n* `ExpenseApplication` - 経費精算\n* `PaymentRequest` - 支払依頼\n* `ApprovalRequest`(リクエストパラメータrequest_form_idを同時に指定) - 各種申請\n* `DocApproval` - 請求書等 (見積書・納品書・請求書・発注書)\n\n申請フォームの基本経路設定\n", "example": true } } } } } }, "approvalFlowRouteResponse": { "type": "object", "required": [ "approval_flow_route" ], "properties": { "approval_flow_route": { "type": "object", "required": [ "id", "name", "description", "user_id", "definition_system", "first_step_id", "usages", "request_form_ids", "steps" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "申請経路ID", "example": 1 }, "name": { "type": "string", "description": "申請経路名", "example": "申請経路" }, "description": { "type": "string", "description": "申請経路の説明(未設定の場合は空文字列になります)", "example": "申請経路の説明" }, "user_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "申請経路を作成したユーザーのユーザーID(削除済みのユーザーでもIDは返ります。作成ユーザーが記録されていない場合は null になります)", "example": 1, "nullable": true }, "definition_system": { "type": "boolean", "description": "システムにより自動作成された申請経路かどうか(true の場合、freee が自動作成した申請経路であることを示します)", "example": true }, "first_step_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "最初の承認ステップのID(steps に含まれる先頭の承認ステップのIDと一致します)", "example": 1 }, "usages": { "type": "array", "description": "申請種別(申請経路を使用できる申請種別を示します。例えば、ApprovalRequest の場合は、各種申請で使用できる申請経路です。)\n* `TxnApproval` - 仕訳承認\n* `ExpenseApplication` - 経費精算\n* `PaymentRequest` - 支払依頼\n* `ApprovalRequest` - 各種申請\n* `DocApproval` - 請求書等 (見積書・納品書・請求書・発注書)\n* `PurchaseRequest` - 購買申請", "items": { "type": "string", "enum": [ "TxnApproval", "ExpenseApplication", "PaymentRequest", "ApprovalRequest", "DocApproval", "PurchaseRequest" ], "example": "TxnApproval" } }, "request_form_ids": { "type": "array", "description": "申請経路で利用できる申請フォームID配列(無効化・削除された申請フォームは含まれません)", "items": { "type": "integer", "format": "int64", "minimum": 1, "description": "申請フォームID", "example": 1 } }, "steps": { "type": "array", "description": "承認ステップ(配列)。承認順に並びます。", "items": { "type": "object", "required": [ "id", "next_step_id", "resource_type", "users_ids" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "承認ステップID", "example": 1 }, "next_step_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "次の承認ステップID(最後の承認ステップの場合は null になります)", "nullable": true, "example": 2 }, "resource_type": { "type": "string", "description": "承認方法\n* `predefined_user` - メンバー指定 (1人)\n* `selected_user` - 申請時にメンバー指定\n* `unspecified` - 指定なし\n* `and_resource` - メンバー指定 (複数、全員の承認)\n* `or_resource` - メンバー指定 (複数、1人の承認)\n* `and_position` - 役職指定 (複数、全員の承認)\n* `or_position` - 役職指定 (複数、1人の承認)\n* `switchable` - 条件分岐(金額・役職などの評価値で承認ステップが分岐する)", "enum": [ "predefined_user", "selected_user", "unspecified", "and_resource", "or_resource", "and_position", "or_position", "switchable" ], "example": "predefined_user" }, "users_ids": { "type": "array", "description": "承認者のユーザーID (配列)。resource_type が predefined_user / and_resource / or_resource の場合に承認者のユーザーIDが入ります。申請経路上で承認者となるメンバーが確定しない resource_type(selected_user / unspecified / and_position / or_position / switchable)の場合は空の配列になります。", "items": { "type": "integer", "format": "int64", "minimum": 1, "description": "承認者のユーザーID", "example": 3 } }, "approver_determination_type": { "type": "string", "nullable": true, "description": "承認者の決定方法。役職指定(申請者の所属部門)の承認ステップの場合のみ設定され、それ以外はnullになります。\n* `applicant_group` - 申請者の所属部門に追従して承認者を決定する", "enum": [ "applicant_group" ], "example": "applicant_group" }, "group": { "type": "object", "nullable": true, "description": "承認ステップの部門。役職指定(申請時に部門指定)または部門および役職指定の承認ステップで部門が指定されている場合のみ設定され、それ以外はnullになります。", "required": [ "id", "name" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "部門ID", "example": 1 }, "name": { "type": "string", "description": "部門名。削除済みの部門の場合は「削除済み部門」になります。", "example": "営業部" } } }, "position_types": { "type": "array", "description": "承認ステップの役職 (配列)。承認ステップのresource_typeがand_position、or_positionの場合に設定され、それ以外は空の配列になります。", "items": { "type": "object", "required": [ "id", "name" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "役職ID", "example": 1 }, "name": { "type": "string", "description": "役職名。削除済みの役職の場合は「削除済み役職」になります。", "example": "部長" } } } }, "switching_rules": { "type": "array", "description": "分岐ルール (配列)。承認ステップのresource_typeがswitchableの場合に設定され、それ以外は空の配列になります。先頭から順に評価され、conditionsをすべて満たした最初のルールのnext_step_idへ分岐します。どのルールも満たさない場合は分岐せず、次の承認ステップ(next_step_id)に進みます。", "items": { "type": "object", "required": [ "next_step_id", "conditions" ], "properties": { "next_step_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "条件を満たした場合に分岐する承認ステップID", "example": 3 }, "conditions": { "type": "array", "description": "分岐条件 (配列)。すべての条件を満たした場合に分岐します。", "items": { "type": "object", "required": [ "operator", "values" ], "properties": { "switch_evaluation_key": { "type": "string", "nullable": true, "description": "判定対象\n* `total_amount_jpy` - 申請金額 (円)\n* `applicant_position_type` - 申請者の役職 (valuesには役職IDが入ります。役職なしの場合はno_position)\n* `no_approver_present` - 承認者が不在かどうか", "enum": [ "total_amount_jpy", "applicant_position_type", "no_approver_present" ], "example": "total_amount_jpy" }, "operator": { "type": "string", "description": "判定対象とvaluesを比較する演算子\n* `greater_than_or_equal` - valuesの値以上\n* `less_than_or_equal` - valuesの値以下\n* `contains` - valuesの値のいずれかに一致する\n* `not_contains` - valuesの値のいずれにも一致しない\n* `of` - valuesの値と一致する", "enum": [ "greater_than_or_equal", "less_than_or_equal", "contains", "not_contains", "of" ], "example": "greater_than_or_equal" }, "values": { "type": "array", "description": "判定値 (配列)", "items": { "type": "string", "description": "判定値", "example": "100000" } } } } } } } } } } } } } } }, "segment_tag": { "type": "object", "required": [ "description", "id", "name", "shortcut1", "shortcut2", "update_date" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメントタグID。更新・削除APIのパスパラメータや、取引・振替伝票の明細に指定します。", "example": 101 }, "name": { "type": "string", "maxLength": 100, "description": "セグメントタグ名 (100文字以内)。事業所内の同じセグメント区分で重複しません。", "example": "プロジェクトA" }, "description": { "type": "string", "description": "備考 (30文字以内)。未設定の場合は null が返ります。", "maxLength": 30, "example": "新規事業の収支管理用", "nullable": true }, "shortcut1": { "type": "string", "maxLength": 20, "description": "ショートカット1 (20文字以内)。Web画面などでセグメントタグを検索する際のキーワードとして使用します。未設定の場合は null が返ります。", "example": "PROJECT", "nullable": true }, "shortcut2": { "type": "string", "maxLength": 20, "description": "ショートカット2 (20文字以内)。Web画面などでセグメントタグを検索する際のキーワードとして使用します。未設定の場合は null が返ります。", "example": "123", "nullable": true }, "code": { "type": "string", "maxLength": 20, "description": "セグメントタグコード (20文字以内)。事業所の設定でセグメントタグコードを使用する設定にしている場合のみレスポンスに含まれます。コードが未設定の場合は null が返ります。", "example": "code001", "pattern": "^[0-9a-zA-Z_-]+$", "nullable": true }, "update_date": { "type": "string", "format": "date", "description": "セグメントタグの最終更新日 (yyyy-mm-dd, JST)。一覧取得APIの start_update_date / end_update_date による絞り込みの対象です。", "example": "2026-07-15" } } }, "segmentTagResponse": { "type": "object", "required": [ "segment_tag" ], "properties": { "segment_tag": { "description": "作成または更新されたセグメントタグ", "$ref": "#/components/schemas/segment_tag" } } }, "segmentTagParams": { "type": "object", "required": [ "company_id", "name" ], "properties": { "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメントタグを作成・更新する対象の事業所ID", "example": 1 }, "name": { "maxLength": 100, "type": "string", "description": "セグメントタグ名 (100文字以内)。事業所内の同じセグメント区分で重複できません。", "example": "プロジェクトA" }, "description": { "maxLength": 30, "type": "string", "nullable": true, "description": "備考 (30文字以内)。省略した場合は未設定(null)になります。", "example": "新規事業の収支管理用" }, "shortcut1": { "type": "string", "maxLength": 20, "nullable": true, "description": "ショートカット1 (20文字以内)。Web画面などでセグメントタグを検索する際のキーワードとして使用します。省略した場合は未設定(null)になります。", "example": "PROJECT" }, "shortcut2": { "type": "string", "maxLength": 20, "nullable": true, "description": "ショートカット2 (20文字以内)。Web画面などでセグメントタグを検索する際のキーワードとして使用します。省略した場合は未設定(null)になります。", "example": "123" }, "code": { "type": "string", "maxLength": 20, "nullable": true, "description": "セグメントタグコード (20文字以内、半角英数字・ハイフン・アンダースコアのみ)。事業所内の同じセグメント区分で重複できません。事業所の設定でセグメントタグコードを使用する設定にしている場合のみ保存され、設定が無効の場合は指定しても保存されません。省略した場合は未設定(null)になります。", "example": "code001", "pattern": "^[0-9a-zA-Z_-]+$" } } }, "invoiceIndexResponse": { "type": "object", "required": [ "invoices" ], "properties": { "invoices": { "type": "array", "items": { "type": "object", "required": [ "booking_date", "company_address1", "company_address2", "company_contact_info", "company_id", "company_name", "company_prefecture_code", "company_prefecture_name", "company_zipcode", "deal_id", "description", "due_date", "id", "invoice_contents", "invoice_layout", "invoice_number", "invoice_status", "issue_date", "mail_sent_at", "message", "notes", "partner_address1", "partner_address2", "partner_code", "partner_contact_info", "partner_display_name", "partner_id", "partner_name", "partner_prefecture_code", "partner_prefecture_name", "partner_title", "partner_zipcode", "payment_bank_info", "payment_date", "payment_status", "payment_type", "posting_status", "sub_total", "tax_entry_method", "title", "total_amount", "total_amount_per_vat_rate", "total_vat", "web_confirmed_at", "web_downloaded_at", "web_published_at" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "請求書ID", "example": 101 }, "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID", "example": 1 }, "issue_date": { "type": "string", "description": "請求日 (yyyy-mm-dd)", "example": "2019-12-17" }, "partner_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "取引先ID", "example": 201, "nullable": true }, "partner_code": { "type": "string", "description": "取引先コード(事業所で取引先コードの利用設定が有効な場合のみ値が入ります)", "example": "code001", "nullable": true }, "invoice_number": { "type": "string", "description": "請求書番号", "example": "A001" }, "title": { "type": "string", "description": "タイトル", "example": "請求書", "nullable": true }, "due_date": { "type": "string", "description": "期日 (yyyy-mm-dd)", "example": "2019-12-17", "nullable": true }, "total_amount": { "type": "integer", "format": "int64", "description": "合計金額", "example": 108000 }, "total_vat": { "type": "integer", "format": "int64", "description": "消費税", "example": 8000 }, "sub_total": { "type": "integer", "format": "int64", "description": "小計", "example": 100000 }, "booking_date": { "type": "string", "description": "売上計上日", "example": "2019-12-17", "nullable": true }, "description": { "type": "string", "description": "概要", "example": "8月分請求書", "nullable": true }, "invoice_status": { "type": "string", "description": "請求書ステータス (draft: 下書き, applying: 申請中, remanded: 差し戻し, rejected: 却下, approved: 承認済み, submitted: 送付済み, unsubmitted: 請求書の承認フローが無効の場合のみ、unsubmitted(送付待ち)の値をとります)", "enum": [ "draft", "applying", "remanded", "rejected", "approved", "submitted", "unsubmitted" ] }, "payment_status": { "type": "string", "description": "入金ステータス (unsettled: 入金待ち, settled: 入金済み)", "enum": [ "", "unsettled", "settled" ] }, "payment_date": { "type": "string", "description": "入金日 (yyyy-mm-dd)。入金ステータス(payment_status)が settled の場合のみ日付が入ります", "example": "2019-12-17", "nullable": true }, "web_published_at": { "type": "string", "description": "Web共有日時(最新)", "example": "2019-12-17T19:00:00+09:00", "nullable": true }, "web_downloaded_at": { "type": "string", "description": "Web共有ダウンロード日時(最新)", "example": "2019-12-17T19:00:00+09:00", "nullable": true }, "web_confirmed_at": { "type": "string", "description": "Web共有取引先確認日時(最新)", "example": "2019-12-17T19:00:00+09:00", "nullable": true }, "mail_sent_at": { "type": "string", "description": "メール送信日時(最新)", "example": "2019-12-17T19:00:00+09:00", "nullable": true }, "posting_status": { "type": "string", "description": "郵送ステータス(unrequested: リクエスト前, preview_registered: プレビュー登録, preview_failed: プレビュー登録失敗, ordered: 注文中, order_failed: 注文失敗, printing: 印刷中, canceled: キャンセル, posted: 投函済み)", "example": "unrequested", "enum": [ "", "unrequested", "preview_registered", "preview_failed", "ordered", "order_failed", "printing", "canceled", "posted" ] }, "partner_name": { "type": "string", "description": "取引先名", "example": "freeeパートナー", "nullable": true }, "partner_display_name": { "type": "string", "description": "請求書に表示する取引先名", "example": "株式会社freeeパートナー", "nullable": true }, "partner_title": { "type": "string", "description": "敬称(御中、様、(空白)の3つから選択)", "example": "御中", "nullable": true }, "partner_zipcode": { "type": "string", "description": "郵便番号", "example": "000-0000", "nullable": true }, "partner_prefecture_code": { "type": "integer", "format": "int64", "minimum": -1, "maximum": 46, "description": "都道府県コード(-1: 設定しない、0:北海道、1:青森、2:岩手、3:宮城、4:秋田、5:山形、6:福島、7:茨城、8:栃木、9:群馬、10:埼玉、11:千葉、12:東京、13:神奈川、14:新潟、15:富山、16:石川、17:福井、18:山梨、19:長野、20:岐阜、21:静岡、22:愛知、23:三重、24:滋賀、25:京都、26:大阪、27:兵庫、28:奈良、29:和歌山、30:鳥取、31:島根、32:岡山、33:広島、34:山口、35:徳島、36:香川、37:愛媛、38:高知、39:福岡、40:佐賀、41:長崎、42:熊本、43:大分、44:宮崎、45:鹿児島、46:沖縄", "example": 4, "nullable": true }, "partner_prefecture_name": { "type": "string", "description": "都道府県", "example": "秋田県", "nullable": true }, "partner_address1": { "type": "string", "description": "市区町村・番地", "example": "湯沢市", "nullable": true }, "partner_address2": { "type": "string", "description": "建物名・部屋番号など", "example": "Aビル", "nullable": true }, "partner_contact_info": { "type": "string", "description": "取引先担当者名", "example": "営業担当", "nullable": true }, "company_name": { "type": "string", "description": "事業所名", "example": "freee株式会社" }, "company_zipcode": { "type": "string", "description": "郵便番号", "example": "000-0000", "nullable": true }, "company_prefecture_code": { "type": "integer", "format": "int64", "minimum": -1, "maximum": 46, "description": "都道府県コード(-1: 設定しない、0:北海道、1:青森、2:岩手、3:宮城、4:秋田、5:山形、6:福島、7:茨城、8:栃木、9:群馬、10:埼玉、11:千葉、12:東京、13:神奈川、14:新潟、15:富山、16:石川、17:福井、18:山梨、19:長野、20:岐阜、21:静岡、22:愛知、23:三重、24:滋賀、25:京都、26:大阪、27:兵庫、28:奈良、29:和歌山、30:鳥取、31:島根、32:岡山、33:広島、34:山口、35:徳島、36:香川、37:愛媛、38:高知、39:福岡、40:佐賀、41:長崎、42:熊本、43:大分、44:宮崎、45:鹿児島、46:沖縄", "example": 12, "nullable": true }, "company_prefecture_name": { "type": "string", "description": "都道府県", "example": "東京都", "nullable": true }, "company_address1": { "type": "string", "description": "市区町村・番地", "example": "XX区XX1−1−1", "nullable": true }, "company_address2": { "type": "string", "description": "建物名・部屋番号など", "example": "ビル1F", "nullable": true }, "company_contact_info": { "type": "string", "description": "事業所担当者名", "example": "法人営業担当", "nullable": true }, "payment_type": { "type": "string", "description": "支払方法 (振込: transfer, 引き落とし: direct_debit)", "example": "transfer", "enum": [ "", "transfer", "direct_debit" ] }, "payment_bank_info": { "type": "string", "description": "支払口座", "example": "XX銀行YY支店1111111", "nullable": true }, "message": { "type": "string", "description": "メッセージ", "example": "下記の通りご請求申し上げます。", "nullable": true }, "notes": { "type": "string", "description": "備考", "example": "毎度ありがとうございます", "nullable": true }, "invoice_layout": { "type": "string", "description": "請求書レイアウト\n* `default_classic` - レイアウト1/クラシック (デフォルト)\n\n* `standard_classic` - レイアウト2/クラシック\n\n* `envelope_classic` - 封筒1/クラシック\n\n* `carried_forward_standard_classic` - レイアウト3(繰越金額欄あり)/クラシック\n\n* `carried_forward_envelope_classic` - 封筒2(繰越金額欄あり)/クラシック\n\n* `default_modern` - レイアウト1/モダン\n\n* `standard_modern` - レイアウト2/モダン\n\n* `envelope_modern` - 封筒/モダン", "example": "default_classic", "enum": [ "default_classic", "standard_classic", "envelope_classic", "carried_forward_standard_classic", "carried_forward_envelope_classic", "default_modern", "standard_modern", "envelope_modern" ] }, "tax_entry_method": { "type": "string", "description": "請求書の消費税計算方法(inclusive: 内税, exclusive: 外税)", "example": "exclusive", "enum": [ "", "inclusive", "exclusive" ] }, "deal_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "取引ID (invoice_statusがsubmitted, unsubmittedの時IDが表示されます)", "nullable": true, "example": 1 }, "invoice_contents": { "type": "array", "description": "請求内容", "items": { "type": "object", "required": [ "account_item_id", "account_item_name", "amount", "description", "id", "item_id", "item_name", "order", "qty", "reduced_vat", "section_id", "section_name", "tag_ids", "tag_names", "tax_code", "type", "unit", "unit_price", "vat" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "請求内容ID", "example": 1 }, "order": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647, "description": "順序", "example": 1, "nullable": true }, "type": { "type": "string", "description": "行の種類", "example": "normal", "enum": [ "normal", "discount", "text" ] }, "qty": { "type": "number", "description": "数量", "example": 1 }, "unit": { "type": "string", "description": "単位", "example": "個", "nullable": true }, "unit_price": { "type": "number", "description": "単価", "example": 1 }, "amount": { "type": "integer", "format": "int64", "minimum": -9223372036854775808, "maximum": 9223372036854775807, "description": "内税/外税の判別とamountの税込み、税抜きについて\n\n", "example": 108000 }, "vat": { "type": "integer", "format": "int64", "description": "消費税額", "example": 8000 }, "reduced_vat": { "type": "boolean", "description": "軽減税率税区分(true: 対象、false: 対象外)", "example": true }, "description": { "type": "string", "description": "備考", "example": "備考", "nullable": true }, "account_item_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "勘定科目ID", "example": 1, "nullable": true }, "account_item_name": { "type": "string", "description": "勘定科目名", "example": "売上", "nullable": true }, "tax_code": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647, "description": "税区分コード", "example": 1, "nullable": true }, "item_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "品目ID", "example": 1, "nullable": true }, "item_name": { "type": "string", "description": "品目", "example": "freee会計", "nullable": true }, "section_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "部門ID", "example": 1, "nullable": true }, "section_name": { "type": "string", "description": "部門", "example": "開発部", "nullable": true }, "tag_ids": { "type": "array", "items": { "type": "integer", "format": "int64", "minimum": 1, "description": "メモタグID", "example": 1 } }, "tag_names": { "type": "array", "items": { "type": "string", "description": "メモタグ", "example": "メモタグ" } }, "segment_1_tag_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメント1タグID", "example": 1, "nullable": true }, "segment_1_tag_name": { "type": "string", "description": "セグメント1タグ名", "example": "セグメント1", "nullable": true }, "segment_2_tag_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメント2タグID", "example": 1, "nullable": true }, "segment_2_tag_name": { "type": "string", "description": "セグメント2タグ名", "example": "セグメント2", "nullable": true }, "segment_3_tag_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメント3タグID", "example": 1, "nullable": true }, "segment_3_tag_name": { "type": "string", "description": "セグメント3タグ名", "example": "セグメント3", "nullable": true } } } }, "total_amount_per_vat_rate": { "type": "object", "required": [ "reduced_vat_8", "vat_10", "vat_5", "vat_8" ], "properties": { "vat_5": { "type": "integer", "format": "int64", "maximum": 9223372036854775807, "description": "税率5%の税込み金額合計", "example": 0 }, "vat_8": { "type": "integer", "format": "int64", "maximum": 9223372036854775807, "description": "税率8%の税込み金額合計", "example": 108000 }, "reduced_vat_8": { "type": "integer", "format": "int64", "maximum": 9223372036854775807, "description": "軽減税率8%の税込み金額合計", "example": 0 }, "vat_10": { "type": "integer", "format": "int64", "maximum": 9223372036854775807, "description": "税率10%の税込み金額合計", "example": 0 } } } } } } } }, "invoiceResponse": { "type": "object", "required": [ "invoice" ], "properties": { "invoice": { "type": "object", "required": [ "booking_date", "company_address1", "company_address2", "company_contact_info", "company_id", "company_name", "company_prefecture_code", "company_prefecture_name", "company_zipcode", "deal_id", "description", "due_date", "id", "invoice_contents", "invoice_layout", "invoice_number", "invoice_status", "issue_date", "mail_sent_at", "message", "notes", "partner_address1", "partner_address2", "partner_code", "partner_contact_info", "partner_display_name", "partner_id", "partner_name", "partner_prefecture_code", "partner_prefecture_name", "partner_title", "partner_zipcode", "payment_bank_info", "payment_date", "payment_status", "payment_type", "posting_status", "related_quotation_ids", "sub_total", "tax_entry_method", "title", "total_amount", "total_amount_per_vat_rate", "total_vat", "web_confirmed_at", "web_downloaded_at", "web_published_at" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "請求書ID", "example": 101 }, "company_id": { "type": "integer", "format": "int64", "description": "事業所ID", "example": 1 }, "issue_date": { "type": "string", "description": "請求日 (yyyy-mm-dd)", "example": "2019-12-17" }, "partner_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "取引先ID", "example": 201, "nullable": true }, "partner_code": { "type": "string", "description": "取引先コード(事業所で取引先コードの利用設定が有効な場合のみ値が入ります)", "example": "code001", "nullable": true }, "invoice_number": { "type": "string", "description": "請求書番号", "example": "A001" }, "title": { "type": "string", "description": "タイトル", "example": "請求書", "nullable": true }, "due_date": { "type": "string", "description": "期日 (yyyy-mm-dd)", "example": "2019-12-17", "nullable": true }, "total_amount": { "type": "integer", "format": "int64", "description": "合計金額", "example": 108000 }, "total_vat": { "type": "integer", "format": "int64", "description": "消費税", "example": 8000 }, "sub_total": { "type": "integer", "format": "int64", "description": "小計", "example": 100000 }, "booking_date": { "type": "string", "description": "売上計上日", "example": "2019-12-17", "nullable": true }, "description": { "type": "string", "description": "概要", "example": "8月分請求書", "nullable": true }, "invoice_status": { "type": "string", "description": "請求書ステータス (draft: 下書き, applying: 申請中, remanded: 差し戻し, rejected: 却下, approved: 承認済み, submitted: 送付済み, unsubmitted: 請求書の承認フローが無効の場合のみ、unsubmitted(送付待ち)の値をとります)", "enum": [ "draft", "applying", "remanded", "rejected", "approved", "submitted", "unsubmitted" ] }, "payment_status": { "type": "string", "description": "入金ステータス (unsettled: 入金待ち, settled: 入金済み)", "enum": [ "", "unsettled", "settled" ] }, "payment_date": { "type": "string", "description": "入金日 (yyyy-mm-dd)。入金ステータス(payment_status)が settled の場合のみ日付が入ります", "example": "2019-12-17", "nullable": true }, "web_published_at": { "type": "string", "description": "Web共有日時(最新)", "example": "2019-12-17T19:00:00+09:00", "nullable": true }, "web_downloaded_at": { "type": "string", "description": "Web共有ダウンロード日時(最新)", "example": "2019-12-17T19:00:00+09:00", "nullable": true }, "web_confirmed_at": { "type": "string", "description": "Web共有取引先確認日時(最新)", "example": "2019-12-17T19:00:00+09:00", "nullable": true }, "mail_sent_at": { "type": "string", "description": "メール送信日時(最新)", "example": "2019-12-17T19:00:00+09:00", "nullable": true }, "posting_status": { "type": "string", "description": "郵送ステータス(unrequested: リクエスト前, preview_registered: プレビュー登録, preview_failed: プレビュー登録失敗, ordered: 注文中, order_failed: 注文失敗, printing: 印刷中, canceled: キャンセル, posted: 投函済み)", "example": "unrequested", "enum": [ "", "unrequested", "preview_registered", "preview_failed", "ordered", "order_failed", "printing", "canceled", "posted" ] }, "partner_name": { "type": "string", "description": "取引先名", "example": "freeeパートナー", "nullable": true }, "partner_display_name": { "type": "string", "description": "請求書に表示する取引先名", "example": "株式会社freeeパートナー", "nullable": true }, "partner_title": { "type": "string", "description": "敬称(御中、様、(空白)の3つから選択)", "example": "御中", "nullable": true }, "partner_zipcode": { "type": "string", "description": "郵便番号", "example": "000-0000", "nullable": true }, "partner_prefecture_code": { "type": "integer", "format": "int64", "minimum": -1, "maximum": 46, "description": "都道府県コード(-1: 設定しない、0:北海道、1:青森、2:岩手、3:宮城、4:秋田、5:山形、6:福島、7:茨城、8:栃木、9:群馬、10:埼玉、11:千葉、12:東京、13:神奈川、14:新潟、15:富山、16:石川、17:福井、18:山梨、19:長野、20:岐阜、21:静岡、22:愛知、23:三重、24:滋賀、25:京都、26:大阪、27:兵庫、28:奈良、29:和歌山、30:鳥取、31:島根、32:岡山、33:広島、34:山口、35:徳島、36:香川、37:愛媛、38:高知、39:福岡、40:佐賀、41:長崎、42:熊本、43:大分、44:宮崎、45:鹿児島、46:沖縄", "example": 4, "nullable": true }, "partner_prefecture_name": { "type": "string", "description": "都道府県", "example": "秋田県", "nullable": true }, "partner_address1": { "type": "string", "description": "市区町村・番地", "example": "湯沢市", "nullable": true }, "partner_address2": { "type": "string", "description": "建物名・部屋番号など", "example": "Aビル", "nullable": true }, "partner_contact_info": { "type": "string", "description": "取引先担当者名", "example": "営業担当", "nullable": true }, "company_name": { "type": "string", "description": "事業所名", "example": "freee株式会社" }, "company_zipcode": { "type": "string", "description": "郵便番号", "example": "000-0000", "nullable": true }, "company_prefecture_code": { "type": "integer", "format": "int64", "minimum": -1, "maximum": 46, "description": "都道府県コード(-1: 設定しない、0:北海道、1:青森、2:岩手、3:宮城、4:秋田、5:山形、6:福島、7:茨城、8:栃木、9:群馬、10:埼玉、11:千葉、12:東京、13:神奈川、14:新潟、15:富山、16:石川、17:福井、18:山梨、19:長野、20:岐阜、21:静岡、22:愛知、23:三重、24:滋賀、25:京都、26:大阪、27:兵庫、28:奈良、29:和歌山、30:鳥取、31:島根、32:岡山、33:広島、34:山口、35:徳島、36:香川、37:愛媛、38:高知、39:福岡、40:佐賀、41:長崎、42:熊本、43:大分、44:宮崎、45:鹿児島、46:沖縄", "example": 12, "nullable": true }, "company_prefecture_name": { "type": "string", "description": "都道府県", "example": "東京都", "nullable": true }, "company_address1": { "type": "string", "description": "市区町村・番地", "example": "XX区XX1−1−1", "nullable": true }, "company_address2": { "type": "string", "description": "建物名・部屋番号など", "example": "ビル1F", "nullable": true }, "company_contact_info": { "type": "string", "description": "事業所担当者名", "example": "法人営業担当", "nullable": true }, "payment_type": { "type": "string", "description": "支払方法 (振込: transfer, 引き落とし: direct_debit)", "example": "transfer", "enum": [ "", "transfer", "direct_debit" ] }, "payment_bank_info": { "type": "string", "description": "支払口座", "example": "XX銀行YY支店1111111", "nullable": true }, "message": { "type": "string", "description": "メッセージ", "example": "下記の通りご請求申し上げます。", "nullable": true }, "notes": { "type": "string", "description": "備考", "example": "毎度ありがとうございます", "nullable": true }, "invoice_layout": { "type": "string", "description": "請求書レイアウト\n* `default_classic` - レイアウト1/クラシック (デフォルト)\n\n* `standard_classic` - レイアウト2/クラシック\n\n* `envelope_classic` - 封筒1/クラシック\n\n* `carried_forward_standard_classic` - レイアウト3(繰越金額欄あり)/クラシック\n\n* `carried_forward_envelope_classic` - 封筒2(繰越金額欄あり)/クラシック\n\n* `default_modern` - レイアウト1/モダン\n\n* `standard_modern` - レイアウト2/モダン\n\n* `envelope_modern` - 封筒/モダン", "example": "default_classic", "enum": [ "default_classic", "standard_classic", "envelope_classic", "carried_forward_standard_classic", "carried_forward_envelope_classic", "default_modern", "standard_modern", "envelope_modern" ] }, "tax_entry_method": { "type": "string", "description": "請求書の消費税計算方法(inclusive: 内税, exclusive: 外税)", "example": "exclusive", "enum": [ "", "inclusive", "exclusive" ] }, "deal_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "取引ID (invoice_statusがsubmitted, unsubmittedの時IDが表示されます)", "nullable": true, "example": 1 }, "invoice_contents": { "type": "array", "description": "請求内容", "items": { "type": "object", "required": [ "account_item_id", "account_item_name", "amount", "description", "id", "item_id", "item_name", "order", "qty", "reduced_vat", "section_id", "section_name", "tag_ids", "tag_names", "tax_code", "type", "unit", "unit_price", "vat" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "請求内容ID", "example": 1 }, "order": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647, "description": "順序", "example": 1, "nullable": true }, "type": { "type": "string", "description": "行の種類", "example": "normal", "enum": [ "normal", "discount", "text" ] }, "qty": { "type": "number", "description": "数量", "example": 1 }, "unit": { "type": "string", "description": "単位", "example": "個", "nullable": true }, "unit_price": { "type": "number", "description": "単価", "example": 1 }, "amount": { "type": "integer", "format": "int64", "minimum": -9223372036854775808, "maximum": 9223372036854775807, "description": "内税/外税の判別とamountの税込み、税抜きについて\n\n", "example": 108000 }, "vat": { "type": "integer", "format": "int64", "description": "消費税額", "example": 8000 }, "reduced_vat": { "type": "boolean", "description": "軽減税率税区分(true: 対象、false: 対象外)", "example": true }, "description": { "type": "string", "description": "備考", "example": "備考", "nullable": true }, "account_item_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "勘定科目ID", "example": 1, "nullable": true }, "account_item_name": { "type": "string", "description": "勘定科目名", "example": "売上", "nullable": true }, "tax_code": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647, "description": "税区分コード", "example": 1, "nullable": true }, "item_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "品目ID", "example": 1, "nullable": true }, "item_name": { "type": "string", "description": "品目", "example": "freee会計", "nullable": true }, "section_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "部門ID", "example": 1, "nullable": true }, "section_name": { "type": "string", "description": "部門", "example": "開発部", "nullable": true }, "tag_ids": { "type": "array", "items": { "type": "integer", "format": "int64", "minimum": 1, "description": "メモタグID", "example": 1 } }, "tag_names": { "type": "array", "items": { "type": "string", "description": "メモタグ", "example": "メモタグ" } }, "segment_1_tag_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメント1タグID", "example": 1, "nullable": true }, "segment_1_tag_name": { "type": "string", "description": "セグメント1タグ名", "example": "セグメント1", "nullable": true }, "segment_2_tag_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメント2タグID", "example": 1, "nullable": true }, "segment_2_tag_name": { "type": "string", "description": "セグメント2タグ名", "example": "セグメント2", "nullable": true }, "segment_3_tag_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメント3タグID", "example": 1, "nullable": true }, "segment_3_tag_name": { "type": "string", "description": "セグメント3タグ名", "example": "セグメント3", "nullable": true } } } }, "total_amount_per_vat_rate": { "type": "object", "required": [ "reduced_vat_8", "vat_10", "vat_5", "vat_8" ], "properties": { "vat_5": { "type": "integer", "format": "int64", "maximum": 9223372036854775807, "description": "税率5%の税込み金額合計", "example": 0 }, "vat_8": { "type": "integer", "format": "int64", "maximum": 9223372036854775807, "description": "税率8%の税込み金額合計", "example": 108000 }, "reduced_vat_8": { "type": "integer", "format": "int64", "maximum": 9223372036854775807, "description": "軽減税率8%の税込み金額合計", "example": 0 }, "vat_10": { "type": "integer", "format": "int64", "maximum": 9223372036854775807, "description": "税率10%の税込み金額合計", "example": 0 } } }, "related_quotation_ids": { "type": "array", "description": "関連する見積書ID(配列)
\n下記で作成したものが該当します。\n\n見積書・納品書を納品書・請求書に変換する
\n複数の見積書・納品書から合算請求書を作成する
\n", "items": { "type": "integer", "format": "int64", "minimum": 1, "description": "関連する見積書ID", "example": 3 } } } } } }, "invoiceCreateParams": { "type": "object", "required": [ "company_id", "partner_display_name", "partner_title" ], "properties": { "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID", "example": 1 }, "issue_date": { "type": "string", "description": "請求日 (yyyy-mm-dd)", "example": "2019-12-17" }, "partner_id": { "type": "integer", "format": "int64", "minimum": 1, "nullable": true, "description": "取引先ID", "example": 201 }, "partner_code": { "type": "string", "nullable": true, "description": "取引先コード", "example": "code001" }, "invoice_number": { "type": "string", "description": "請求書番号 (デフォルト: 自動採番されます)", "example": "A001" }, "title": { "type": "string", "description": "タイトル (デフォルト: 請求書)", "example": "請求書" }, "due_date": { "type": "string", "description": "期日 (yyyy-mm-dd)", "example": "2019-12-17" }, "booking_date": { "type": "string", "description": "売上計上日", "example": "2019-12-17" }, "description": { "type": "string", "description": "概要", "example": "8月分請求書" }, "invoice_status": { "type": "string", "description": "請求書ステータス
\n\nissue, unsubmitted, submitted は請求書承認ワークフローを利用している場合は指定できません。\n", "enum": [ "draft", "issue", "unsubmitted", "submitted" ] }, "partner_display_name": { "type": "string", "description": "請求書に表示する取引先名", "example": "株式会社freeeパートナー" }, "partner_title": { "type": "string", "description": "敬称(御中、様、(空白)の3つから選択)", "example": "御中", "nullable": true }, "partner_contact_info": { "type": "string", "description": "取引先担当者名", "example": "営業担当", "nullable": true }, "partner_zipcode": { "type": "string", "description": "取引先郵便番号 (デフォルトはpartner_idもしくはpartner_codeで指定された取引先設定情報が補完されます)", "example": "012-0009", "nullable": true }, "partner_prefecture_code": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 46, "description": "取引先都道府県コード(0:北海道、1:青森、2:岩手、3:宮城、4:秋田、5:山形、6:福島、7:茨城、8:栃木、9:群馬、10:埼玉、11:千葉、12:東京、13:神奈川、14:新潟、15:富山、16:石川、17:福井、18:山梨、19:長野、20:岐阜、21:静岡、22:愛知、23:三重、24:滋賀、25:京都、26:大阪、27:兵庫、28:奈良、29:和歌山、30:鳥取、31:島根、32:岡山、33:広島、34:山口、35:徳島、36:香川、37:愛媛、38:高知、39:福岡、40:佐賀、41:長崎、42:熊本、43:大分、44:宮崎、45:鹿児島、46:沖縄) (デフォルトはpartner_idもしくはpartner_codeで指定された取引先設定情報が補完されます)", "example": 4, "nullable": true }, "partner_address1": { "type": "string", "description": "取引先市区町村・番地 (デフォルトはpartner_idもしくはpartner_codeで指定された取引先設定情報が補完されます)", "example": "湯沢市", "nullable": true }, "partner_address2": { "type": "string", "description": "取引先建物名・部屋番号など (デフォルトはpartner_idもしくはpartner_codeで指定された取引先設定情報が補完されます)", "example": "Aビル", "nullable": true }, "company_name": { "type": "string", "description": "事業所名 (デフォルトは事業所設定情報が補完されます)", "example": "freee株式会社" }, "company_zipcode": { "type": "string", "description": "郵便番号 (デフォルトは事業所設定情報が補完されます)", "example": "000-0000" }, "company_prefecture_code": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 46, "description": "都道府県コード(0:北海道、1:青森、2:岩手、3:宮城、4:秋田、5:山形、6:福島、7:茨城、8:栃木、9:群馬、10:埼玉、11:千葉、12:東京、13:神奈川、14:新潟、15:富山、16:石川、17:福井、18:山梨、19:長野、20:岐阜、21:静岡、22:愛知、23:三重、24:滋賀、25:京都、26:大阪、27:兵庫、28:奈良、29:和歌山、30:鳥取、31:島根、32:岡山、33:広島、34:山口、35:徳島、36:香川、37:愛媛、38:高知、39:福岡、40:佐賀、41:長崎、42:熊本、43:大分、44:宮崎、45:鹿児島、46:沖縄) (デフォルトは事業所設定情報が補完されます)", "example": 12 }, "company_address1": { "type": "string", "description": "市区町村・番地 (デフォルトは事業所設定情報が補完されます)", "example": "XX区YY1−1−1" }, "company_address2": { "type": "string", "description": "建物名・部屋番号など (デフォルトは事業所設定情報が補完されます)", "example": "ビル 1F" }, "company_contact_info": { "type": "string", "description": "事業所担当者名 (デフォルトは請求書テンプレート情報が補完されます)", "example": "法人営業担当" }, "payment_type": { "type": "string", "description": "支払方法 (振込: transfer, 引き落とし: direct_debit)", "example": "transfer", "enum": [ "transfer", "direct_debit" ] }, "payment_bank_info": { "type": "string", "description": "支払口座", "example": "XX銀行YY支店 1111111" }, "use_virtual_transfer_account": { "type": "string", "description": "振込専用口座の利用(利用しない: not_use(デフォルト), 利用する: use)", "example": "use", "enum": [ "not_use", "use" ] }, "message": { "type": "string", "description": "メッセージ (デフォルト: 下記の通りご請求申し上げます。)", "example": "下記の通りご請求申し上げます。" }, "notes": { "type": "string", "description": "備考", "example": "毎度ありがとうございます" }, "invoice_layout": { "type": "string", "description": "請求書レイアウト\n* `default_classic` - レイアウト1/クラシック (デフォルト)\n\n* `standard_classic` - レイアウト2/クラシック\n\n* `envelope_classic` - 封筒1/クラシック\n\n* `carried_forward_standard_classic` - レイアウト3(繰越金額欄あり)/クラシック\n\n* `carried_forward_envelope_classic` - 封筒2(繰越金額欄あり)/クラシック\n\n* `default_modern` - レイアウト1/モダン\n\n* `standard_modern` - レイアウト2/モダン\n\n* `envelope_modern` - 封筒/モダン", "example": "default_classic", "enum": [ "default_classic", "standard_classic", "envelope_classic", "carried_forward_standard_classic", "carried_forward_envelope_classic", "default_modern", "standard_modern", "envelope_modern" ] }, "tax_entry_method": { "type": "string", "description": "請求書の消費税計算方法(inclusive: 内税表示, exclusive: 外税表示 (デフォルト))", "example": "exclusive", "enum": [ "inclusive", "exclusive" ] }, "invoice_contents": { "type": "array", "description": "請求内容", "items": { "required": [ "order", "type" ], "type": "object", "properties": { "order": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647, "description": "順序", "example": 0 }, "type": { "type": "string", "description": "行の種類\n", "example": "normal", "enum": [ "normal", "discount", "text" ] }, "qty": { "type": "number", "minimum": 0, "maximum": 99999999, "description": "数量", "example": 1 }, "unit": { "type": "string", "description": "単位", "example": "個" }, "unit_price": { "type": "number", "minimum": -999999999999, "maximum": 999999999999, "description": "単価 (tax_entry_method: inclusiveの場合は税込価格、tax_entry_method: exclusiveの場合は税抜価格となります)", "example": 1 }, "vat": { "type": "integer", "format": "int64", "nullable": true, "description": "消費税額", "example": 8000 }, "description": { "type": "string", "description": "備考", "example": "備考" }, "account_item_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "勘定科目ID", "example": 1 }, "tax_code": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647, "description": "税区分コード", "example": 1 }, "item_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "品目ID", "example": 1 }, "section_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "部門ID", "example": 1 }, "tag_ids": { "type": "array", "items": { "type": "integer", "format": "int64", "minimum": 1, "description": "メモタグID", "example": 1 } }, "segment_1_tag_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメント1タグID", "example": 1 }, "segment_2_tag_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメント2タグID", "example": 1 }, "segment_3_tag_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメント3タグID", "example": 1 } } } } } }, "invoiceUpdateParams": { "type": "object", "required": [ "company_id", "partner_display_name", "partner_title" ], "properties": { "company_id": { "type": "integer", "format": "int64", "description": "事業所ID", "minimum": 1, "example": 1 }, "issue_date": { "type": "string", "description": "請求日 (yyyy-mm-dd)", "example": "2019-12-17" }, "partner_id": { "type": "integer", "format": "int64", "minimum": 1, "nullable": true, "description": "取引先ID", "example": 201 }, "partner_code": { "type": "string", "nullable": true, "description": "取引先コード", "example": "code001" }, "invoice_number": { "type": "string", "description": "請求書番号 (デフォルト: 自動採番されます)", "example": "A001" }, "title": { "type": "string", "description": "タイトル (デフォルト: 請求書)", "example": "請求書" }, "due_date": { "type": "string", "description": "期日 (yyyy-mm-dd)", "example": "2019-12-17" }, "booking_date": { "type": "string", "description": "売上計上日", "example": "2019-12-17" }, "description": { "type": "string", "description": "概要", "example": "8月分請求書" }, "invoice_status": { "type": "string", "description": "請求書ステータス
\n\nissue, unsubmitted は請求書承認ワークフローを利用している場合は、承認済みの請求書にのみ指定できます。
\nsubmitted は請求書承認ワークフローを利用している場合は、送付待ちの請求書にのみ指定できます。\n", "enum": [ "draft", "issue", "unsubmitted", "submitted" ] }, "partner_display_name": { "type": "string", "description": "請求書に表示する取引先名", "example": "株式会社freeeパートナー" }, "partner_title": { "type": "string", "description": "敬称(御中、様、(空白)の3つから選択)", "example": "御中", "nullable": true }, "partner_contact_info": { "type": "string", "description": "取引先担当者名", "example": "営業担当", "nullable": true }, "partner_zipcode": { "type": "string", "description": "取引先郵便番号 (デフォルトはpartner_idもしくはpartner_codeで指定された取引先設定情報が補完されます)", "example": "012-0009", "nullable": true }, "partner_prefecture_code": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 46, "description": "取引先都道府県コード(0:北海道、1:青森、2:岩手、3:宮城、4:秋田、5:山形、6:福島、7:茨城、8:栃木、9:群馬、10:埼玉、11:千葉、12:東京、13:神奈川、14:新潟、15:富山、16:石川、17:福井、18:山梨、19:長野、20:岐阜、21:静岡、22:愛知、23:三重、24:滋賀、25:京都、26:大阪、27:兵庫、28:奈良、29:和歌山、30:鳥取、31:島根、32:岡山、33:広島、34:山口、35:徳島、36:香川、37:愛媛、38:高知、39:福岡、40:佐賀、41:長崎、42:熊本、43:大分、44:宮崎、45:鹿児島、46:沖縄) (デフォルトはpartner_idもしくはpartner_codeで指定された取引先設定情報が補完されます)", "example": 4, "nullable": true }, "partner_address1": { "type": "string", "description": "取引先市区町村・番地 (デフォルトはpartner_idもしくはpartner_codeで指定された取引先設定情報が補完されます)", "example": "湯沢市", "nullable": true }, "partner_address2": { "type": "string", "description": "取引先建物名・部屋番号など (デフォルトはpartner_idもしくはpartner_codeで指定された取引先設定情報が補完されます)", "example": "Aビル", "nullable": true }, "company_name": { "type": "string", "description": "事業所名 (デフォルトは事業所設定情報が補完されます)", "example": "freee株式会社" }, "company_zipcode": { "type": "string", "description": "郵便番号 (デフォルトは事業所設定情報が補完されます)", "example": "000-0000" }, "company_prefecture_code": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 46, "description": "都道府県コード(0:北海道、1:青森、2:岩手、3:宮城、4:秋田、5:山形、6:福島、7:茨城、8:栃木、9:群馬、10:埼玉、11:千葉、12:東京、13:神奈川、14:新潟、15:富山、16:石川、17:福井、18:山梨、19:長野、20:岐阜、21:静岡、22:愛知、23:三重、24:滋賀、25:京都、26:大阪、27:兵庫、28:奈良、29:和歌山、30:鳥取、31:島根、32:岡山、33:広島、34:山口、35:徳島、36:香川、37:愛媛、38:高知、39:福岡、40:佐賀、41:長崎、42:熊本、43:大分、44:宮崎、45:鹿児島、46:沖縄) (デフォルトは事業所設定情報が補完されます)", "example": 12 }, "company_address1": { "type": "string", "description": "市区町村・番地 (デフォルトは事業所設定情報が補完されます)", "example": "XX区YY1−1−1" }, "company_address2": { "type": "string", "description": "建物名・部屋番号など (デフォルトは事業所設定情報が補完されます)", "example": "ビル 1F" }, "company_contact_info": { "type": "string", "description": "事業所担当者名 (デフォルトは請求書テンプレート情報が補完されます)", "example": "法人営業担当" }, "payment_type": { "type": "string", "description": "支払方法 (振込: transfer, 引き落とし: direct_debit)", "example": "transfer", "enum": [ "transfer", "direct_debit" ] }, "payment_bank_info": { "type": "string", "description": "支払口座", "example": "XX銀行YY支店 1111111" }, "use_virtual_transfer_account": { "type": "string", "description": "振込専用口座の利用(利用しない: not_use(デフォルト), 利用する: use)", "example": "use", "enum": [ "not_use", "use" ] }, "message": { "type": "string", "description": "メッセージ (デフォルト: 下記の通りご請求申し上げます。)", "example": "下記の通りご請求申し上げます。" }, "notes": { "type": "string", "description": "備考", "example": "毎度ありがとうございます" }, "invoice_layout": { "type": "string", "description": "請求書レイアウト\n* `default_classic` - レイアウト1/クラシック (デフォルト)\n\n* `standard_classic` - レイアウト2/クラシック\n\n* `envelope_classic` - 封筒1/クラシック\n\n* `carried_forward_standard_classic` - レイアウト3(繰越金額欄あり)/クラシック\n\n* `carried_forward_envelope_classic` - 封筒2(繰越金額欄あり)/クラシック\n\n* `default_modern` - レイアウト1/モダン\n\n* `standard_modern` - レイアウト2/モダン\n\n* `envelope_modern` - 封筒/モダン", "example": "default_classic", "enum": [ "default_classic", "standard_classic", "envelope_classic", "carried_forward_standard_classic", "carried_forward_envelope_classic", "default_modern", "standard_modern", "envelope_modern" ] }, "tax_entry_method": { "type": "string", "description": "請求書の消費税計算方法(inclusive: 内税表示, exclusive: 外税表示 (デフォルト))", "example": "exclusive", "enum": [ "inclusive", "exclusive" ] }, "invoice_contents": { "type": "array", "description": "請求内容", "items": { "type": "object", "required": [ "order", "type" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "請求内容ID", "example": 1 }, "order": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647, "description": "順序", "example": 0 }, "type": { "type": "string", "description": "行の種類\n", "example": "normal", "enum": [ "normal", "discount", "text" ] }, "qty": { "type": "number", "minimum": 0, "maximum": 99999999, "description": "数量", "example": 1 }, "unit": { "type": "string", "description": "単位", "example": "個" }, "unit_price": { "type": "number", "minimum": -999999999999, "maximum": 999999999999, "description": "単価 (tax_entry_method: inclusiveの場合は税込価格、tax_entry_method: exclusiveの場合は税抜価格となります)", "example": 1 }, "vat": { "type": "integer", "format": "int64", "nullable": true, "description": "消費税額", "example": 8000 }, "description": { "type": "string", "description": "備考", "example": "備考" }, "account_item_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "勘定科目ID", "example": 1 }, "tax_code": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647, "description": "税区分コード", "example": 1 }, "item_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "品目ID", "example": 1 }, "section_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "部門ID", "example": 1 }, "tag_ids": { "type": "array", "items": { "type": "integer", "format": "int64", "minimum": 1, "description": "メモタグID", "example": 1 } }, "segment_1_tag_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメント1タグID", "example": 1 }, "segment_2_tag_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメント2タグID", "example": 1 }, "segment_3_tag_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメント3タグID", "example": 1 } } } } } }, "quotationIndexResponse": { "type": "object", "required": [ "quotations" ], "properties": { "quotations": { "type": "array", "items": { "type": "object", "required": [ "company_address1", "company_address2", "company_contact_info", "company_id", "company_name", "company_prefecture_code", "company_prefecture_name", "company_zipcode", "description", "id", "quotation_contents", "quotation_layout", "quotation_number", "quotation_status", "issue_date", "mail_sent_at", "message", "notes", "partner_address1", "partner_address2", "partner_code", "partner_contact_info", "partner_display_name", "partner_id", "partner_name", "partner_prefecture_code", "partner_prefecture_name", "partner_title", "partner_zipcode", "sub_total", "tax_entry_method", "title", "total_amount", "total_amount_per_vat_rate", "total_vat", "web_confirmed_at", "web_downloaded_at", "web_published_at" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "見積書ID", "example": 101 }, "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID", "example": 1 }, "issue_date": { "type": "string", "description": "見積日 (yyyy-mm-dd)", "example": "2019-12-17" }, "partner_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "取引先ID", "example": 201, "nullable": true }, "partner_code": { "type": "string", "description": "取引先コード(事業所で取引先コードの利用設定が有効な場合のみ値が入ります)", "example": "code001", "nullable": true }, "quotation_number": { "type": "string", "description": "見積書番号", "example": "A001" }, "title": { "type": "string", "description": "タイトル", "example": "見積書", "nullable": true }, "total_amount": { "type": "integer", "format": "int64", "description": "合計金額", "example": 108000 }, "total_vat": { "type": "integer", "format": "int64", "description": "消費税", "example": 8000 }, "sub_total": { "type": "integer", "format": "int64", "description": "小計", "example": 100000 }, "description": { "type": "string", "description": "概要", "example": "8月分見積書", "nullable": true }, "quotation_status": { "type": "string", "description": "見積書ステータス (unsubmitted: 送付待ち, submitted: 送付済み)", "enum": [ "unsubmitted", "submitted" ] }, "web_published_at": { "type": "string", "description": "Web共有日時(最新)", "example": "2019-12-17T19:00:00+09:00", "nullable": true }, "web_downloaded_at": { "type": "string", "description": "Web共有ダウンロード日時(最新)", "example": "2019-12-17T19:00:00+09:00", "nullable": true }, "web_confirmed_at": { "type": "string", "description": "Web共有取引先確認日時(最新)", "example": "2019-12-17T19:00:00+09:00", "nullable": true }, "mail_sent_at": { "type": "string", "description": "メール送信日時(最新)", "example": "2019-12-17T19:00:00+09:00", "nullable": true }, "partner_name": { "type": "string", "description": "取引先名", "example": "freeeパートナー", "nullable": true }, "partner_display_name": { "type": "string", "description": "見積書に表示する取引先名", "example": "株式会社freeeパートナー", "nullable": true }, "partner_title": { "type": "string", "description": "敬称(御中、様、(空白)の3つから選択)", "example": "御中", "nullable": true }, "partner_zipcode": { "type": "string", "description": "郵便番号", "example": "000-0000", "nullable": true }, "partner_prefecture_code": { "type": "integer", "format": "int64", "minimum": -1, "maximum": 46, "description": "都道府県コード(-1: 設定しない、0:北海道、1:青森、2:岩手、3:宮城、4:秋田、5:山形、6:福島、7:茨城、8:栃木、9:群馬、10:埼玉、11:千葉、12:東京、13:神奈川、14:新潟、15:富山、16:石川、17:福井、18:山梨、19:長野、20:岐阜、21:静岡、22:愛知、23:三重、24:滋賀、25:京都、26:大阪、27:兵庫、28:奈良、29:和歌山、30:鳥取、31:島根、32:岡山、33:広島、34:山口、35:徳島、36:香川、37:愛媛、38:高知、39:福岡、40:佐賀、41:長崎、42:熊本、43:大分、44:宮崎、45:鹿児島、46:沖縄", "example": 4, "nullable": true }, "partner_prefecture_name": { "type": "string", "description": "都道府県", "example": "秋田県", "nullable": true }, "partner_address1": { "type": "string", "description": "市区町村・番地", "example": "湯沢市", "nullable": true }, "partner_address2": { "type": "string", "description": "建物名・部屋番号など", "example": "Aビル", "nullable": true }, "partner_contact_info": { "type": "string", "description": "取引先担当者名", "example": "営業担当", "nullable": true }, "company_name": { "type": "string", "description": "事業所名", "example": "freee株式会社" }, "company_zipcode": { "type": "string", "description": "郵便番号", "example": "000-0000", "nullable": true }, "company_prefecture_code": { "type": "integer", "format": "int64", "minimum": -1, "maximum": 46, "description": "都道府県コード(-1: 設定しない、0:北海道、1:青森、2:岩手、3:宮城、4:秋田、5:山形、6:福島、7:茨城、8:栃木、9:群馬、10:埼玉、11:千葉、12:東京、13:神奈川、14:新潟、15:富山、16:石川、17:福井、18:山梨、19:長野、20:岐阜、21:静岡、22:愛知、23:三重、24:滋賀、25:京都、26:大阪、27:兵庫、28:奈良、29:和歌山、30:鳥取、31:島根、32:岡山、33:広島、34:山口、35:徳島、36:香川、37:愛媛、38:高知、39:福岡、40:佐賀、41:長崎、42:熊本、43:大分、44:宮崎、45:鹿児島、46:沖縄", "example": 12, "nullable": true }, "company_prefecture_name": { "type": "string", "description": "都道府県", "example": "東京都", "nullable": true }, "company_address1": { "type": "string", "description": "市区町村・番地", "example": "XX区XX1−1−1", "nullable": true }, "company_address2": { "type": "string", "description": "建物名・部屋番号など", "example": "ビル1F", "nullable": true }, "company_contact_info": { "type": "string", "description": "事業所担当者名", "example": "法人営業担当", "nullable": true }, "message": { "type": "string", "description": "メッセージ", "example": "下記の通り御見積もり申し上げます。", "nullable": true }, "notes": { "type": "string", "description": "備考", "example": "毎度お世話になっております。", "nullable": true }, "quotation_layout": { "type": "string", "description": "見積書レイアウト\n* `default_classic` - レイアウト1/クラシック (デフォルト)\n\n* `standard_classic` - レイアウト2/クラシック\n\n* `envelope_classic` - 封筒1/クラシック\n\n* `default_modern` - レイアウト1/モダン\n\n* `standard_modern` - レイアウト2/モダン\n\n* `envelope_modern` - 封筒/モダン", "example": "default_classic", "enum": [ "default_classic", "standard_classic", "envelope_classic", "default_modern", "standard_modern", "envelope_modern" ] }, "tax_entry_method": { "type": "string", "description": "見積書の消費税計算方法(inclusive: 内税, exclusive: 外税)", "example": "exclusive", "enum": [ "", "inclusive", "exclusive" ] }, "quotation_contents": { "type": "array", "description": "見積内容", "items": { "type": "object", "required": [ "account_item_id", "account_item_name", "amount", "description", "id", "item_id", "item_name", "order", "qty", "reduced_vat", "section_id", "section_name", "tag_ids", "tag_names", "tax_code", "type", "unit", "unit_price", "vat" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "見積内容ID", "example": 1 }, "order": { "type": "integer", "format": "int64", "description": "順序", "example": 1 }, "type": { "type": "string", "description": "行の種類", "example": "normal", "enum": [ "normal", "discount", "text" ] }, "qty": { "type": "number", "description": "数量", "example": 1 }, "unit": { "type": "string", "description": "単位", "example": "個", "nullable": true }, "unit_price": { "type": "number", "description": "単価", "example": 1 }, "amount": { "type": "integer", "format": "int64", "description": "内税/外税の判別とamountの税込み、税抜きについて\n\n", "example": 108000 }, "vat": { "type": "integer", "format": "int64", "description": "消費税額", "example": 8000 }, "reduced_vat": { "type": "boolean", "description": "軽減税率税区分(true: 対象、false: 対象外)", "example": true }, "description": { "type": "string", "description": "備考", "example": "備考", "nullable": true }, "account_item_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "勘定科目ID", "example": 1, "nullable": true }, "account_item_name": { "type": "string", "description": "勘定科目名", "example": "売上", "nullable": true }, "tax_code": { "type": "integer", "format": "int64", "description": "税区分コード", "example": 1, "nullable": true }, "item_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "品目ID", "example": 1, "nullable": true }, "item_name": { "type": "string", "description": "品目", "example": "freee会計", "nullable": true }, "section_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "部門ID", "example": 1, "nullable": true }, "section_name": { "type": "string", "description": "部門", "example": "開発部", "nullable": true }, "tag_ids": { "type": "array", "items": { "type": "integer", "format": "int64", "minimum": 1, "description": "メモタグID", "example": 1 } }, "tag_names": { "type": "array", "items": { "type": "string", "description": "メモタグ", "example": "メモタグ" } }, "segment_1_tag_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメント1タグID", "example": 1, "nullable": true }, "segment_1_tag_name": { "type": "string", "description": "セグメント1タグ名", "example": "セグメント1", "nullable": true }, "segment_2_tag_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメント2タグID", "example": 1, "nullable": true }, "segment_2_tag_name": { "type": "string", "description": "セグメント2タグ名", "example": "セグメント2", "nullable": true }, "segment_3_tag_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメント3タグID", "example": 1, "nullable": true }, "segment_3_tag_name": { "type": "string", "description": "セグメント3タグ名", "example": "セグメント3", "nullable": true } } } }, "total_amount_per_vat_rate": { "type": "object", "required": [ "reduced_vat_8", "vat_10", "vat_5", "vat_8" ], "properties": { "vat_5": { "type": "integer", "format": "int64", "maximum": 9223372036854775807, "description": "税率5%の税込み金額合計", "example": 0 }, "vat_8": { "type": "integer", "format": "int64", "maximum": 9223372036854775807, "description": "税率8%の税込み金額合計", "example": 108000 }, "reduced_vat_8": { "type": "integer", "format": "int64", "maximum": 9223372036854775807, "description": "軽減税率8%の税込み金額合計", "example": 0 }, "vat_10": { "type": "integer", "format": "int64", "maximum": 9223372036854775807, "description": "税率10%の税込み金額合計", "example": 0 } } } } } } } }, "quotationResponse": { "type": "object", "required": [ "quotation" ], "properties": { "quotation": { "type": "object", "required": [ "company_address1", "company_address2", "company_contact_info", "company_id", "company_name", "company_prefecture_code", "company_prefecture_name", "company_zipcode", "description", "id", "quotation_contents", "quotation_layout", "quotation_number", "quotation_status", "issue_date", "mail_sent_at", "message", "notes", "partner_address1", "partner_address2", "partner_code", "partner_contact_info", "partner_display_name", "partner_id", "partner_name", "partner_prefecture_code", "partner_prefecture_name", "partner_title", "partner_zipcode", "related_invoice_id", "related_quotation_ids", "sub_total", "tax_entry_method", "title", "total_amount", "total_amount_per_vat_rate", "total_vat", "web_confirmed_at", "web_downloaded_at", "web_published_at" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "見積書ID", "example": 101 }, "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID", "example": 1 }, "issue_date": { "type": "string", "description": "見積日 (yyyy-mm-dd)", "example": "2019-12-17" }, "partner_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "取引先ID", "example": 201, "nullable": true }, "partner_code": { "type": "string", "description": "取引先コード(事業所で取引先コードの利用設定が有効な場合のみ値が入ります)", "example": "code001", "nullable": true }, "quotation_number": { "type": "string", "description": "見積書番号", "example": "A001" }, "title": { "type": "string", "description": "タイトル", "example": "見積書", "nullable": true }, "total_amount": { "type": "integer", "format": "int64", "description": "合計金額", "example": 108000 }, "total_vat": { "type": "integer", "format": "int64", "description": "消費税", "example": 8000 }, "sub_total": { "type": "integer", "format": "int64", "description": "小計", "example": 100000 }, "description": { "type": "string", "description": "概要", "example": "8月分見積書", "nullable": true }, "quotation_status": { "type": "string", "description": "見積書ステータス (unsubmitted: 送付待ち, submitted: 送付済み)", "enum": [ "unsubmitted", "submitted" ] }, "web_published_at": { "type": "string", "description": "Web共有日時(最新)", "example": "2019-12-17T19:00:00+09:00", "nullable": true }, "web_downloaded_at": { "type": "string", "description": "Web共有ダウンロード日時(最新)", "example": "2019-12-17T19:00:00+09:00", "nullable": true }, "web_confirmed_at": { "type": "string", "description": "Web共有取引先確認日時(最新)", "example": "2019-12-17T19:00:00+09:00", "nullable": true }, "mail_sent_at": { "type": "string", "description": "メール送信日時(最新)", "example": "2019-12-17T19:00:00+09:00", "nullable": true }, "partner_name": { "type": "string", "description": "取引先名", "example": "freeeパートナー", "nullable": true }, "partner_display_name": { "type": "string", "description": "見積書に表示する取引先名", "example": "株式会社freeeパートナー", "nullable": true }, "partner_title": { "type": "string", "description": "敬称(御中、様、(空白)の3つから選択)", "example": "御中", "nullable": true }, "partner_zipcode": { "type": "string", "description": "郵便番号", "example": "000-0000", "nullable": true }, "partner_prefecture_code": { "type": "integer", "format": "int64", "minimum": -1, "maximum": 46, "description": "都道府県コード(-1: 設定しない、0:北海道、1:青森、2:岩手、3:宮城、4:秋田、5:山形、6:福島、7:茨城、8:栃木、9:群馬、10:埼玉、11:千葉、12:東京、13:神奈川、14:新潟、15:富山、16:石川、17:福井、18:山梨、19:長野、20:岐阜、21:静岡、22:愛知、23:三重、24:滋賀、25:京都、26:大阪、27:兵庫、28:奈良、29:和歌山、30:鳥取、31:島根、32:岡山、33:広島、34:山口、35:徳島、36:香川、37:愛媛、38:高知、39:福岡、40:佐賀、41:長崎、42:熊本、43:大分、44:宮崎、45:鹿児島、46:沖縄", "example": 4, "nullable": true }, "partner_prefecture_name": { "type": "string", "description": "都道府県", "example": "秋田県", "nullable": true }, "partner_address1": { "type": "string", "description": "市区町村・番地", "example": "湯沢市", "nullable": true }, "partner_address2": { "type": "string", "description": "建物名・部屋番号など", "example": "Aビル", "nullable": true }, "partner_contact_info": { "type": "string", "description": "取引先担当者名", "example": "営業担当", "nullable": true }, "company_name": { "type": "string", "description": "事業所名", "example": "freee株式会社" }, "company_zipcode": { "type": "string", "description": "郵便番号", "example": "000-0000", "nullable": true }, "company_prefecture_code": { "type": "integer", "format": "int64", "minimum": -1, "maximum": 46, "description": "都道府県コード(-1: 設定しない、0:北海道、1:青森、2:岩手、3:宮城、4:秋田、5:山形、6:福島、7:茨城、8:栃木、9:群馬、10:埼玉、11:千葉、12:東京、13:神奈川、14:新潟、15:富山、16:石川、17:福井、18:山梨、19:長野、20:岐阜、21:静岡、22:愛知、23:三重、24:滋賀、25:京都、26:大阪、27:兵庫、28:奈良、29:和歌山、30:鳥取、31:島根、32:岡山、33:広島、34:山口、35:徳島、36:香川、37:愛媛、38:高知、39:福岡、40:佐賀、41:長崎、42:熊本、43:大分、44:宮崎、45:鹿児島、46:沖縄", "example": 12, "nullable": true }, "company_prefecture_name": { "type": "string", "description": "都道府県", "example": "東京都", "nullable": true }, "company_address1": { "type": "string", "description": "市区町村・番地", "example": "XX区XX1−1−1", "nullable": true }, "company_address2": { "type": "string", "description": "建物名・部屋番号など", "example": "ビル1F", "nullable": true }, "company_contact_info": { "type": "string", "description": "事業所担当者名", "example": "法人営業担当", "nullable": true }, "message": { "type": "string", "description": "メッセージ", "example": "下記の通り御見積もり申し上げます。", "nullable": true }, "notes": { "type": "string", "description": "備考", "example": "毎度お世話になっております。", "nullable": true }, "quotation_layout": { "type": "string", "description": "見積書レイアウト\n* `default_classic` - レイアウト1/クラシック (デフォルト)\n\n* `standard_classic` - レイアウト2/クラシック\n\n* `envelope_classic` - 封筒1/クラシック\n\n* `default_modern` - レイアウト1/モダン\n\n* `standard_modern` - レイアウト2/モダン\n\n* `envelope_modern` - 封筒/モダン", "example": "default_classic", "enum": [ "default_classic", "standard_classic", "envelope_classic", "default_modern", "standard_modern", "envelope_modern" ] }, "tax_entry_method": { "type": "string", "description": "見積書の消費税計算方法(inclusive: 内税, exclusive: 外税)", "example": "exclusive", "enum": [ "", "inclusive", "exclusive" ] }, "quotation_contents": { "type": "array", "description": "見積内容", "items": { "type": "object", "required": [ "account_item_id", "account_item_name", "amount", "description", "id", "item_id", "item_name", "order", "qty", "reduced_vat", "section_id", "section_name", "tag_ids", "tag_names", "tax_code", "type", "unit", "unit_price", "vat" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "見積内容ID", "example": 1 }, "order": { "type": "integer", "format": "int64", "description": "順序", "example": 1 }, "type": { "type": "string", "description": "行の種類", "example": "normal", "enum": [ "normal", "discount", "text" ] }, "qty": { "type": "number", "description": "数量", "example": 1 }, "unit": { "type": "string", "description": "単位", "example": "個", "nullable": true }, "unit_price": { "type": "number", "description": "単価", "example": 1 }, "amount": { "type": "integer", "format": "int64", "description": "内税/外税の判別とamountの税込み、税抜きについて\n\n", "example": 108000 }, "vat": { "type": "integer", "format": "int64", "description": "消費税額", "example": 8000 }, "reduced_vat": { "type": "boolean", "description": "軽減税率税区分(true: 対象、false: 対象外)", "example": true }, "description": { "type": "string", "description": "備考", "example": "備考", "nullable": true }, "account_item_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "勘定科目ID", "example": 1, "nullable": true }, "account_item_name": { "type": "string", "description": "勘定科目名", "example": "売上", "nullable": true }, "tax_code": { "type": "integer", "format": "int64", "description": "税区分コード", "example": 1, "nullable": true }, "item_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "品目ID", "example": 1, "nullable": true }, "item_name": { "type": "string", "description": "品目", "example": "freee会計", "nullable": true }, "section_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "部門ID", "example": 1, "nullable": true }, "section_name": { "type": "string", "description": "部門", "example": "開発部", "nullable": true }, "tag_ids": { "type": "array", "items": { "type": "integer", "format": "int64", "minimum": 1, "description": "メモタグID", "example": 1 } }, "tag_names": { "type": "array", "items": { "type": "string", "description": "メモタグ", "example": "メモタグ" } }, "segment_1_tag_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメント1タグID", "example": 1, "nullable": true }, "segment_1_tag_name": { "type": "string", "description": "セグメント1タグ名", "example": "セグメント1", "nullable": true }, "segment_2_tag_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメント2タグID", "example": 1, "nullable": true }, "segment_2_tag_name": { "type": "string", "description": "セグメント2タグ名", "example": "セグメント2", "nullable": true }, "segment_3_tag_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメント3タグID", "example": 1, "nullable": true }, "segment_3_tag_name": { "type": "string", "description": "セグメント3タグ名", "example": "セグメント3", "nullable": true } } } }, "total_amount_per_vat_rate": { "type": "object", "required": [ "reduced_vat_8", "vat_10", "vat_5", "vat_8" ], "properties": { "vat_5": { "type": "integer", "format": "int64", "maximum": 9223372036854775807, "description": "税率5%の税込み金額合計", "example": 0 }, "vat_8": { "type": "integer", "format": "int64", "maximum": 9223372036854775807, "description": "税率8%の税込み金額合計", "example": 108000 }, "reduced_vat_8": { "type": "integer", "format": "int64", "maximum": 9223372036854775807, "description": "軽減税率8%の税込み金額合計", "example": 0 }, "vat_10": { "type": "integer", "format": "int64", "maximum": 9223372036854775807, "description": "税率10%の税込み金額合計", "example": 0 } } }, "related_invoice_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "関連する請求書ID
\n下記で作成したものが該当します。\n\n見積書・納品書を納品書・請求書に変換する
\n複数の見積書・納品書から合算請求書を作成する
\n", "example": 1, "nullable": true }, "related_quotation_ids": { "type": "array", "description": "関連する見積書ID(配列)
\n下記で作成したものが該当します。\n\n見積書・納品書を納品書・請求書に変換する
\n複数の見積書・納品書から合算請求書を作成する
\n", "example": [ 1 ], "items": { "type": "integer", "format": "int64", "minimum": 1, "description": "関連する見積書ID", "example": 3 } } } } } }, "quotationCreateParams": { "type": "object", "required": [ "company_id", "partner_display_name", "partner_title" ], "properties": { "company_id": { "type": "integer", "format": "int64", "description": "事業所ID", "example": 1 }, "issue_date": { "type": "string", "description": "見積日 (yyyy-mm-dd)", "example": "2019-12-17" }, "partner_id": { "type": "integer", "format": "int64", "nullable": true, "description": "取引先ID", "example": 201 }, "partner_code": { "type": "string", "nullable": true, "description": "取引先コード", "example": "code001" }, "quotation_number": { "type": "string", "description": "見積書番号 (デフォルト: 自動採番されます)", "example": "A001" }, "title": { "type": "string", "description": "タイトル (デフォルト: 見積書)", "example": "見積書" }, "description": { "type": "string", "description": "概要", "example": "8月分見積書" }, "quotation_status": { "type": "string", "description": "見積書ステータス (unsubmitted: 送付待ち, submitted: 送付済み) (請求書承認ワークフローを利用している場合、unsubmitted を指定すると、下書きの見積書が作成されます)", "enum": [ "unsubmitted", "submitted" ] }, "partner_display_name": { "type": "string", "description": "見積書に表示する取引先名", "example": "freeeパートナー株式会社" }, "partner_title": { "type": "string", "description": "敬称(御中、様、(空白)の3つから選択)", "example": "御中" }, "partner_contact_info": { "type": "string", "description": "取引先担当者名", "example": "営業担当", "nullable": true }, "partner_zipcode": { "type": "string", "description": "取引先郵便番号 (デフォルトはpartner_idもしくはpartner_codeで指定された取引先設定情報が補完されます)", "example": "012-0009", "nullable": true }, "partner_prefecture_code": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 46, "description": "取引先都道府県コード(0:北海道、1:青森、2:岩手、3:宮城、4:秋田、5:山形、6:福島、7:茨城、8:栃木、9:群馬、10:埼玉、11:千葉、12:東京、13:神奈川、14:新潟、15:富山、16:石川、17:福井、18:山梨、19:長野、20:岐阜、21:静岡、22:愛知、23:三重、24:滋賀、25:京都、26:大阪、27:兵庫、28:奈良、29:和歌山、30:鳥取、31:島根、32:岡山、33:広島、34:山口、35:徳島、36:香川、37:愛媛、38:高知、39:福岡、40:佐賀、41:長崎、42:熊本、43:大分、44:宮崎、45:鹿児島、46:沖縄) (デフォルトはpartner_idもしくはpartner_codeで指定された取引先設定情報が補完されます)", "example": 4, "nullable": true }, "partner_address1": { "type": "string", "description": "取引先市区町村・番地 (デフォルトはpartner_idもしくはpartner_codeで指定された取引先設定情報が補完されます)", "example": "湯沢市", "nullable": true }, "partner_address2": { "type": "string", "description": "取引先建物名・部屋番号など (デフォルトはpartner_idもしくはpartner_codeで指定された取引先設定情報が補完されます)", "example": "Aビル", "nullable": true }, "company_name": { "type": "string", "description": "事業所名 (デフォルトは事業所設定情報が補完されます)", "example": "freee株式会社" }, "company_zipcode": { "type": "string", "description": "郵便番号 (デフォルトは事業所設定情報が補完されます)", "example": "000-0000" }, "company_prefecture_code": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 46, "description": "都道府県コード(0:北海道、1:青森、2:岩手、3:宮城、4:秋田、5:山形、6:福島、7:茨城、8:栃木、9:群馬、10:埼玉、11:千葉、12:東京、13:神奈川、14:新潟、15:富山、16:石川、17:福井、18:山梨、19:長野、20:岐阜、21:静岡、22:愛知、23:三重、24:滋賀、25:京都、26:大阪、27:兵庫、28:奈良、29:和歌山、30:鳥取、31:島根、32:岡山、33:広島、34:山口、35:徳島、36:香川、37:愛媛、38:高知、39:福岡、40:佐賀、41:長崎、42:熊本、43:大分、44:宮崎、45:鹿児島、46:沖縄) (デフォルトは事業所設定情報が補完されます)", "example": 12 }, "company_address1": { "type": "string", "description": "市区町村・番地 (デフォルトは事業所設定情報が補完されます)", "example": "XX区YY1−1−1" }, "company_address2": { "type": "string", "description": "建物名・部屋番号など (デフォルトは事業所設定情報が補完されます)", "example": "ビル1F" }, "company_contact_info": { "type": "string", "description": "事業所担当者名 (デフォルトは見積書テンプレート情報が補完されます)", "example": "法人営業担当" }, "message": { "type": "string", "description": "メッセージ (デフォルト: 下記の通り御見積申し上げます。)", "example": "下記の通り御見積申し上げます。" }, "notes": { "type": "string", "description": "備考", "example": "毎度ありがとうございます" }, "quotation_layout": { "type": "string", "description": "見積書レイアウト\n* `default_classic` - レイアウト1/クラシック (デフォルト)\n\n* `standard_classic` - レイアウト2/クラシック\n\n* `envelope_classic` - 封筒1/クラシック\n\n* `default_modern` - レイアウト1/モダン\n\n* `standard_modern` - レイアウト2/モダン\n\n* `envelope_modern` - 封筒/モダン", "example": "default_classic", "enum": [ "default_classic", "standard_classic", "envelope_classic", "default_modern", "standard_modern", "envelope_modern" ] }, "tax_entry_method": { "type": "string", "description": "見積書の消費税計算方法(inclusive: 内税表示, exclusive: 外税表示 (デフォルト))", "example": "exclusive", "enum": [ "inclusive", "exclusive" ] }, "quotation_contents": { "type": "array", "description": "見積内容", "items": { "type": "object", "required": [ "order", "type" ], "properties": { "order": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647, "description": "順序", "example": 0 }, "type": { "type": "string", "description": "行の種類\n", "example": "normal", "enum": [ "normal", "discount", "text" ] }, "qty": { "type": "number", "minimum": 0, "maximum": 99999999, "description": "数量", "example": 1 }, "unit": { "type": "string", "description": "単位", "example": "個" }, "unit_price": { "type": "number", "minimum": -999999999999, "maximum": 999999999999, "description": "単価 (tax_entry_method: inclusiveの場合は税込価格、tax_entry_method: exclusiveの場合は税抜価格となります)", "example": 1 }, "vat": { "type": "integer", "format": "int64", "nullable": true, "description": "消費税額", "example": 8000 }, "description": { "type": "string", "description": "備考", "example": "備考" }, "account_item_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "勘定科目ID", "example": 1 }, "tax_code": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647, "description": "税区分コード", "example": 1 }, "item_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "品目ID", "example": 1 }, "section_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "部門ID", "example": 1 }, "tag_ids": { "type": "array", "items": { "type": "integer", "format": "int64", "minimum": 1, "description": "メモタグID", "example": 1 } }, "segment_1_tag_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメント1タグID", "example": 1 }, "segment_2_tag_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメント2タグID", "example": 1 }, "segment_3_tag_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメント3タグID", "example": 1 } } } } } }, "quotationUpdateParams": { "type": "object", "required": [ "company_id", "partner_display_name", "partner_title" ], "properties": { "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID", "example": 1 }, "issue_date": { "type": "string", "description": "見積日 (yyyy-mm-dd)", "example": "2019-12-17" }, "partner_id": { "type": "integer", "format": "int64", "minimum": 1, "nullable": true, "description": "取引先ID", "example": 201 }, "partner_code": { "type": "string", "nullable": true, "description": "取引先コード", "example": "code001" }, "quotation_number": { "type": "string", "description": "見積書番号 (デフォルト: 自動採番されます)", "example": "A001" }, "title": { "type": "string", "description": "タイトル (デフォルト: 見積書)", "example": "見積書" }, "description": { "type": "string", "description": "概要", "example": "8月分見積書" }, "quotation_status": { "type": "string", "description": "見積書ステータス (unsubmitted: 送付待ち, submitted: 送付済み) (請求書承認ワークフローを利用している場合、unsubmitted を指定すると、下書きの見積書が作成されます)", "enum": [ "unsubmitted", "submitted" ] }, "partner_display_name": { "type": "string", "description": "見積書に表示する取引先名", "example": "freeeパートナー株式会社" }, "partner_title": { "type": "string", "description": "敬称(御中、様、(空白)の3つから選択)", "example": "御中" }, "partner_contact_info": { "type": "string", "description": "取引先担当者名", "example": "営業担当", "nullable": true }, "partner_zipcode": { "type": "string", "description": "取引先郵便番号 (デフォルトはpartner_idもしくはpartner_codeで指定された取引先設定情報が補完されます)", "example": "012-0009", "nullable": true }, "partner_prefecture_code": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 46, "description": "取引先都道府県コード(0:北海道、1:青森、2:岩手、3:宮城、4:秋田、5:山形、6:福島、7:茨城、8:栃木、9:群馬、10:埼玉、11:千葉、12:東京、13:神奈川、14:新潟、15:富山、16:石川、17:福井、18:山梨、19:長野、20:岐阜、21:静岡、22:愛知、23:三重、24:滋賀、25:京都、26:大阪、27:兵庫、28:奈良、29:和歌山、30:鳥取、31:島根、32:岡山、33:広島、34:山口、35:徳島、36:香川、37:愛媛、38:高知、39:福岡、40:佐賀、41:長崎、42:熊本、43:大分、44:宮崎、45:鹿児島、46:沖縄) (デフォルトはpartner_idもしくはpartner_codeで指定された取引先設定情報が補完されます)", "example": 4, "nullable": true }, "partner_address1": { "type": "string", "description": "取引先市区町村・番地 (デフォルトはpartner_idもしくはpartner_codeで指定された取引先設定情報が補完されます)", "example": "湯沢市", "nullable": true }, "partner_address2": { "type": "string", "description": "取引先建物名・部屋番号など (デフォルトはpartner_idもしくはpartner_codeで指定された取引先設定情報が補完されます)", "example": "Aビル", "nullable": true }, "company_name": { "type": "string", "description": "事業所名 (デフォルトは事業所設定情報が補完されます)", "example": "freee株式会社" }, "company_zipcode": { "type": "string", "description": "郵便番号 (デフォルトは事業所設定情報が補完されます)", "example": "000-0000" }, "company_prefecture_code": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 46, "description": "都道府県コード(0:北海道、1:青森、2:岩手、3:宮城、4:秋田、5:山形、6:福島、7:茨城、8:栃木、9:群馬、10:埼玉、11:千葉、12:東京、13:神奈川、14:新潟、15:富山、16:石川、17:福井、18:山梨、19:長野、20:岐阜、21:静岡、22:愛知、23:三重、24:滋賀、25:京都、26:大阪、27:兵庫、28:奈良、29:和歌山、30:鳥取、31:島根、32:岡山、33:広島、34:山口、35:徳島、36:香川、37:愛媛、38:高知、39:福岡、40:佐賀、41:長崎、42:熊本、43:大分、44:宮崎、45:鹿児島、46:沖縄) (デフォルトは事業所設定情報が補完されます)", "example": 12 }, "company_address1": { "type": "string", "description": "市区町村・番地 (デフォルトは事業所設定情報が補完されます)", "example": "XX区YY1−1−1" }, "company_address2": { "type": "string", "description": "建物名・部屋番号など (デフォルトは事業所設定情報が補完されます)", "example": "ビル1F" }, "company_contact_info": { "type": "string", "description": "事業所担当者名 (デフォルトは見積書テンプレート情報が補完されます)", "example": "法人営業担当" }, "message": { "type": "string", "description": "メッセージ (デフォルト: 下記の通り御見積申し上げます。)", "example": "下記の通り御見積申し上げます。" }, "notes": { "type": "string", "description": "備考", "example": "毎度ありがとうございます" }, "quotation_layout": { "type": "string", "description": "見積書レイアウト\n* `default_classic` - レイアウト1/クラシック (デフォルト)\n\n* `standard_classic` - レイアウト2/クラシック\n\n* `envelope_classic` - 封筒1/クラシック\n\n* `default_modern` - レイアウト1/モダン\n\n* `standard_modern` - レイアウト2/モダン\n\n* `envelope_modern` - 封筒/モダン", "example": "default_classic", "enum": [ "default_classic", "standard_classic", "envelope_classic", "default_modern", "standard_modern", "envelope_modern" ] }, "tax_entry_method": { "type": "string", "description": "見積書の消費税計算方法(inclusive: 内税表示, exclusive: 外税表示 (デフォルト))", "example": "exclusive", "enum": [ "inclusive", "exclusive" ] }, "quotation_contents": { "type": "array", "description": "見積内容", "items": { "type": "object", "required": [ "order", "type" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "見積内容ID", "example": 1 }, "order": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647, "description": "順序", "example": 0 }, "type": { "type": "string", "description": "行の種類\n", "example": "normal", "enum": [ "normal", "discount", "text" ] }, "qty": { "type": "number", "minimum": 0, "maximum": 99999999, "description": "数量", "example": 1 }, "unit": { "type": "string", "description": "単位", "example": "個" }, "unit_price": { "type": "number", "minimum": -999999999999, "maximum": 999999999999, "description": "単価 (tax_entry_method: inclusiveの場合は税込価格、tax_entry_method: exclusiveの場合は税抜価格となります)", "example": 1 }, "vat": { "type": "integer", "format": "int64", "nullable": true, "description": "消費税額", "example": 8000 }, "description": { "type": "string", "description": "備考", "example": "備考" }, "account_item_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "勘定科目ID", "example": 1 }, "tax_code": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 2147483647, "description": "税区分コード", "example": 1 }, "item_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "品目ID", "example": 1 }, "section_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "部門ID", "example": 1 }, "tag_ids": { "type": "array", "items": { "type": "integer", "format": "int64", "minimum": 1, "description": "メモタグID", "example": 1 } }, "segment_1_tag_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメント1タグID", "example": 1 }, "segment_2_tag_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメント2タグID", "example": 1 }, "segment_3_tag_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "セグメント3タグID", "example": 1 } } } } } }, "fixedAssetResponse": { "type": "object", "required": [ "fixed_assets", "fiscal_year", "up_to_date", "up_to_date_reasons" ], "properties": { "fixed_assets": { "type": "array", "description": "固定資産の一覧(固定資産IDの昇順)。指定した会計期間に償却データが存在する固定資産のみが含まれます", "items": { "type": "object", "required": [ "company_id", "id", "name", "management_number", "account_item_id", "section_id", "item_id", "depreciation_method", "depreciation_account_item_id", "prefecture_code", "city_name", "depreciation_amount", "acquisition_cost", "opening_balance", "undepreciated_balance", "opening_accumulated_depreciation", "closing_accumulated_depreciation", "life_years", "acquisition_date", "created_at", "depreciation_status", "retire_date" ], "properties": { "company_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "事業所ID", "example": 1 }, "id": { "type": "integer", "format": "int64", "minimum": 1, "description": "固定資産ID", "example": 1 }, "name": { "type": "string", "description": "固定資産名", "example": "pc" }, "management_number": { "type": "string", "nullable": true, "description": "管理番号。事業所内で固定資産を識別するためにユーザーが任意に付与する番号です(未設定の場合はnull)", "example": "pc-0001" }, "account_item_id": { "type": "integer", "format": "int64", "minimum": 1, "description": "勘定科目ID。固定資産の取得を計上している勘定科目です", "example": 22 }, "section_id": { "type": "integer", "format": "int64", "minimum": 1, "nullable": true, "description": "部門ID(未設定の場合はnull)", "example": 1 }, "item_id": { "type": "integer", "format": "int64", "minimum": 1, "nullable": true, "description": "品目ID(未設定の場合はnull)", "example": 1 }, "depreciation_method": { "type": "string", "description": "償却方法 (少額償却: small_sum_method, 一括償却: lump_sum_method, 定額法: straight_line_method, 定率法: multiple_method, 旧定率法: old_multiple_method, 旧定額法: old_straight_line_method, 償却なし: non_depreciate_method, 任意償却: voluntary_method, 即時償却: immediate_method, 均等償却: equal_method)", "enum": [ "small_sum_method", "lump_sum_method", "straight_line_method", "multiple_method", "old_multiple_method", "old_straight_line_method", "non_depreciate_method", "voluntary_method", "immediate_method", "equal_method" ], "example": "straight_line_method" }, "depreciation_account_item_id": { "type": "integer", "format": "int64", "minimum": 0, "description": "減価償却費の計上に使う勘定科目ID(未設定の場合は0)", "example": 99 }, "prefecture_code": { "type": "integer", "format": "int64", "minimum": 0, "maximum": 46, "description": "償却資産税の申告先の都道府県コード(未設定の場合はnull)。0:北海道、1:青森、2:岩手、3:宮城、4:秋田、5:山形、6:福島、7:茨城、8:栃木、9:群馬、10:埼玉、11:千葉、12:東京、13:神奈川、14:新潟、15:富山、16:石川、17:福井、18:山梨、19:長野、20:岐阜、21:静岡、22:愛知、23:三重、24:滋賀、25:京都、26:大阪、27:兵庫、28:奈良、29:和歌山、30:鳥取、31:島根、32:岡山、33:広島、34:山口、35:徳島、36:香川、37:愛媛、38:高知、39:福岡、40:佐賀、41:長崎、42:熊本、43:大分、44:宮崎、45:鹿児島、46:沖縄", "example": 4, "nullable": true }, "city_name": { "type": "string", "nullable": true, "description": "償却資産税の申告先市区町村(未設定の場合はnull)", "example": "港区" }, "depreciation_amount": { "type": "integer", "format": "int64", "description": "本年分の償却費合計(円)。普通償却額と特別償却費の合計です", "example": 18533 }, "acquisition_cost": { "type": "integer", "format": "int64", "description": "取得価額(円)", "example": 150000 }, "opening_balance": { "type": "integer", "format": "int64", "description": "期首残高(円)。取得日が指定した会計期間に含まれる場合は0になります", "example": 92000 }, "undepreciated_balance": { "type": "integer", "format": "int64", "nullable": true, "description": "未償却残高(円)。土地など償却しない固定資産の場合はnullになります", "example": 46000 }, "opening_accumulated_depreciation": { "type": "integer", "format": "int64", "description": "期首減価償却累計額(円)", "example": 100000 }, "closing_accumulated_depreciation": { "type": "integer", "format": "int64", "description": "期末減価償却累計額(円)", "example": 46000 }, "life_years": { "type": "integer", "format": "int64", "nullable": true, "description": "耐用年数(年)(未設定の場合はnull)", "example": 5 }, "acquisition_date": { "type": "string", "description": "取得日 (yyyy-mm-dd)", "format": "date", "example": "2021-07-13" }, "created_at": { "type": "string", "description": "固定資産をfreeeに登録した日時(ISO8601形式)", "example": "2021-07-15T18:30:24+09:00" }, "depreciation_status": { "type": "string", "description": "固定資産の状態 (売却済: sold, 除却済: retired, 償却済: depreciated, 償却中: depreciation, 償却なし: non_depreciation)", "enum": [ "sold", "retired", "depreciated", "depreciation", "non_depreciation" ], "example": "depreciation" }, "retire_date": { "type": "string", "format": "date", "nullable": true, "description": "除却日、もしくは売却日 (yyyy-mm-dd)。除却・売却されていない場合はnull", "example": "2022-03-24" } } } }, "fiscal_year": { "type": "object", "description": "target_dateで指定した日付が含まれる会計期間。fixed_assetsの償却費や残高はこの会計期間で集計されています", "required": [ "start_date", "end_date" ], "properties": { "start_date": { "type": "string", "description": "会計期間の開始日 (yyyy-mm-dd)", "example": "2022-01-01" }, "end_date": { "type": "string", "description": "会計期間の終了日 (yyyy-mm-dd)", "example": "2022-12-31" } } }, "up_to_date": { "type": "boolean", "description": "集計結果が最新かどうか。falseの場合は残高の集計が完了していないため、時間を空けて再度取得してください", "example": true }, "up_to_date_reasons": { "type": "array", "description": "集計が最新でない場合(up_to_dateがfalseの場合)の要因情報。最新の場合は空配列になります", "items": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "string", "description": "要因コード (償却の作成処理が実行中: depreciation_creating, 償却の作成処理がエラー終了: depreciation_create_error)", "example": "depreciation_creating", "enum": [ "depreciation_creating", "depreciation_create_error" ] }, "message": { "type": "string", "description": "集計が最新でない理由の説明", "example": "当期の固定資産の償却作成が完了していないため、正しい集計結果でない可能性があります。" } } } } } }, "generalLedgersResponse": { "type": "object", "required": [ "general_ledgers" ], "properties": { "general_ledgers": { "type": "array", "items": { "type": "object", "properties": { "account_item_id": { "type": "integer", "format": "int64", "description": "勘定科目ID", "example": 1 }, "account_item_name": { "type": "string", "description": "勘定科目名", "example": "売掛金" }, "total_amount": { "type": "integer", "format": "int64", "description": "発生額累計", "example": 100 }, "final_balance": { "type": "integer", "format": "int64", "description": "残高", "example": 100 }, "debit_amount": { "type": "integer", "format": "int64", "description": "借方発生額累計", "example": 100 }, "credit_amount": { "type": "integer", "format": "int64", "description": "貸方発生額累計", "example": 100 } } } } } }, "accountGroupCreateParams": { "type": "object", "required": [ "company_id", "name", "account_category_id" ], "properties": { "company_id": { "type": "integer", "description": "事業所ID", "format": "int64", "example": 1 }, "name": { "type": "string", "maxLength": 20, "description": "決算書表示名 (20文字以内)。同一年度内で一意である必要があります。末尾に半角スペースは指定できません。", "example": "新しい決算書表示名" }, "account_category_id": { "type": "integer", "description": "勘定科目カテゴリーID。決算書表示名を配下に作成できる勘定科目カテゴリーのみ指定できます。指定可能な値はSelectablesフォーム用選択項目情報エンドポイント(account_groups.account_category_id)で取得可能です。指定できないIDの場合は400エラーになります。", "format": "int64", "example": 1 }, "index": { "type": "integer", "description": "表示順 (同一勘定科目カテゴリー内の挿入位置、0始まり)。指定した位置に挿入され、同一勘定科目カテゴリー内の他の決算書表示名の表示順は自動で振り直されます。未指定の場合や既存の決算書表示名の数を超える値を指定した場合は末尾に追加されます。", "format": "int64", "example": 1 } } }, "accountGroupCreateResponse": { "type": "object", "required": [ "account_group" ], "properties": { "account_group": { "type": "object", "description": "作成された決算書表示名(小カテゴリー)", "required": [ "company_id", "id", "name", "account_structure_id", "account_category_id", "index" ], "properties": { "company_id": { "type": "integer", "description": "事業所ID", "example": 1, "format": "int64" }, "id": { "type": "integer", "description": "決算書表示名(小カテゴリー)ID", "example": 1, "format": "int64" }, "name": { "type": "string", "description": "決算書表示名", "example": "新しい決算書表示名" }, "account_structure_id": { "type": "integer", "description": "年度ID", "example": 1, "format": "int64" }, "account_category_id": { "type": "integer", "description": "勘定科目カテゴリーID", "example": 1, "format": "int64" }, "index": { "type": "integer", "description": "表示順 (同一勘定科目カテゴリー内、0始まり)", "example": 1, "format": "int64" } } } } } }, "securitySchemes": { "oauth2": { "type": "oauth2", "flows": { "authorizationCode": { "authorizationUrl": "https://accounts.secure.freee.co.jp/public_api/authorize", "tokenUrl": "https://accounts.secure.freee.co.jp/public_api/token", "scopes": { "write": "データの書き込み", "read": "データの読み取り" } } } } } } }