Appearance
Backend API Spec: API-022
API Name: 【入出金明細CSV出力】API API Method: GET API Endpoint: /api/remuneration/transactions/export
Version: 1.3
変更履歴
| Version | Date | Author | Changes |
|---|---|---|---|
| 1.0 | 2026/02/11 | Rikkei | 初版作成 |
| 1.1 | 2026/08/07 | Claude Code | A009 に年月フィルタ(id:72)を追加したことに伴い、Request Parameters に target_month を追加(all で全期間)。#458 |
| 1.2 | 2026/08/07 | Claude Code | A009 の年月フィルタを範囲指定へ変更したことに伴い、target_month を month_from / month_to に置き換え。#458 |
| 1.3 | 2026/09/16 | Claude | #1318: 403 の Description からロールの条件を落とし「権限エラー」に揃えた。画面のアクセス権限は認可の前段(F002 8.1)が判定する |
Processes (業務フロー)
| ID | Main Event ID | Main Event Name | Event No | Event Name | Detail |
|---|---|---|---|---|---|
| 1 | A009 | 報酬管理画面 | 1 | フィルタ条件適用 | 画面で設定されているフィルタ条件(search, month_from, month_to, transaction_type, case_status)を適用し、対象データを抽出する。 条件はAPI-020(入出金明細一覧取得)と同一ロジックを使用する |
| 2 | A009 | 報酬管理画面 | 2 | CSV生成 | 抽出データをCSV形式に変換する。 出力カラム:日付, 種別, 金額, 取引内容, 口座, 顧客名, 案件ID, ステータス, 請求額, 入金済, 残額, 進捗率 文字コード:UTF-8(BOM付き) 改行コード:CRLF |
| 3 | A009 | 報酬管理画面 | 3 | ファイル返却 | Content-Disposition: attachment; filename="入出金明細_{YYYYMMDD}.csv" Content-Type: text/csv; charset=UTF-8 |
HTTP Status Codes
| ID | Status Code | Description |
|---|---|---|
| 1 | 200 | CSV出力に成功。CSVファイルをレスポンスボディとして返却 |
| 2 | 400 | リクエストパラメータエラー |
| 3 | 401 | 認証エラー |
| 4 | 403 | 権限エラー |
| 5 | 500 | サーバーエラー |
API Request Parameters
| ID | Logical Name | Physical Name | Data Type | Required | Validation | Notes |
|---|---|---|---|---|---|---|
| 1 | 検索キーワード | search | string | 最大256文字 | 顧客名、取引内容、案件IDで部分一致検索 | |
| 2 | 開始年月 | month_from | string | YYYY/MM形式、デフォルト: 当月 | 出力対象期間の開始年月。未指定時は下限なし。A009 id:72 の選択値を引き継ぐ | |
| 3 | 終了年月 | month_to | string | YYYY/MM形式、デフォルト: 当月 | 出力対象期間の終了年月。未指定時は上限なし。A009 id:74 の選択値を引き継ぐ | |
| 4 | 取引種別フィルタ | transaction_type | string | all / income / expense、デフォルト: all | all: 全て、income: 収入のみ、expense: 支出のみ | |
| 5 | 案件ステータスフィルタ | case_status | string | all / 受任処理中 / 裁判中 / 申立等準備 / クローズ(終結)、デフォルト: all | 案件のステータスでフィルタリング |
API Response Items
CSVファイル(バイナリ)として返却。
CSVカラム定義:
| ID | Logical Name | Physical Name | Data Type | Table Name | Column Name | Notes | Parent ID |
|---|---|---|---|---|---|---|---|
| 1 | 日付 | transaction_date | string | t_deposit_history | deposit_date | YYYY/MM/DD形式 | - |
| 2 | 種別 | transaction_type | string | t_deposit_history | transaction_type | 「収入」または「支出」 | - |
| 3 | 金額 | amount | int | t_deposit_history | deposit_amount | - | |
| 4 | 取引内容 | description | string | t_deposit_history | description | - | |
| 5 | 口座 | bank_name | string | t_deposit_history | bank_name | - | |
| 6 | 顧客名 | client_name | string | t_contract_client | client_name_kanji | 未マッチング時は空欄 | - |
| 7 | 案件ID | contract_id | int | t_deposit_history | contract_id | 未マッチング時は空欄 | - |
| 8 | ステータス | case_status | string | t_contract | status | ステータス名称。未マッチング時は空欄 | - |
| 9 | 請求額 | total_billed | int | t_contract_payment_plan | total_amount | 未マッチング時は空欄 | - |
| 10 | 入金済 | total_paid | int | - | - | 入金済額合計。未マッチング時は空欄 | - |
| 11 | 残額 | remaining | int | - | - | 請求額 - 入金済。未マッチング時は空欄 | - |
| 12 | 進捗率 | progress_rate | string | - | - | 「XX%」形式。完納の場合「完納」。未マッチング時は空欄 | - |
External API Requests
該当なし