Appearance
Backend API Spec: API-032
API Name: 【テンプレート再検証ステータス更新】API API Method: PUT API Endpoint: /api/petitions/template-verifications/
Processes (業務フロー)
| ID | Main Event ID | Main Event Name | Event No | Event Name | Detail |
|---|---|---|---|---|---|
| 1 | ME-001 | テンプレート再検証ステータス更新 | 1 | 認証チェック【P001】 | セッションからユーザー情報を取得する。 |
| 2 | ME-001 | テンプレート再検証ステータス更新 | 2 | 対象レコード取得【P002】 | verification_id を元に t_petition_template_verification のレコードを取得する。 存在しない場合は404を返却する。 |
| 3 | ME-001 | テンプレート再検証ステータス更新 | 3 | 検証結果更新【P003】 | 座標一致(coord_match)・内容一致(content_match)の検証結果を更新する。 検証担当(verifier_user_id/verifier_name)・最終検証日(last_verified_at)を記録する。 |
| 4 | ME-001 | テンプレート再検証ステータス更新 | 4 | 総合状態判定【P004】 | 座標一致・内容一致の双方が ok の場合、STATUS を verified に更新する。 いずれかが verifying / ng の場合は対応する状態に更新する。 |
| 5 | ME-001 | テンプレート再検証ステータス更新 | 5 | レスポンス生成【P005】 | 更新後のレコードを返却する。 |
HTTP Status Codes
| ID | Status Code | Description |
|---|---|---|
| 1 | 200 | 更新成功 |
| 2 | 400 | リクエストパラメータエラー(不正な状態値等) |
| 3 | 401 | 認証エラー(未ログインまたはセッション切れ) |
| 4 | 403 | 権限エラー |
| 5 | 404 | 該当検証レコードが存在しない |
| 6 | 500 | サーバーエラー |
API Request Parameters
| ID | Logical Name | Physical Name | Data Type | Required | Validation | Notes |
|---|---|---|---|---|---|---|
| 1 | 検証ID | verification_id | int | ○ | 1以上の整数 | URLパスパラメータ。t_petition_template_verification.id |
| 2 | 座標一致 | coord_match | string | × | unverified / verifying / ok / ng | t_petition_template_verification.coord_match |
| 3 | 内容一致 | content_match | string | × | unverified / verifying / ok / ng | t_petition_template_verification.content_match |
| 4 | 担当者ID | verifier_id | int | × | t_system_user.id | 検証担当者 |
| 5 | 担当者名 | verifier_name | string | × | 最大32文字 | 表示用担当者名(真船/濱道等) |
| 6 | 備考 | note | string | × | 最大256文字 | 不一致箇所・対応事項 |
API Response Items
| ID | Logical Name | Physical Name | Data Type | Table Name | Column Name | Notes | Parent ID |
|---|---|---|---|---|---|---|---|
| 1 | 検証ID | verification_id | int | t_petition_template_verification | id | - | - |
| 2 | 書式名 | format_name | string | t_petition_template_verification | format_name | - | - |
| 3 | 座標一致 | coord_match | string | t_petition_template_verification | coord_match | - | - |
| 4 | 内容一致 | content_match | string | t_petition_template_verification | content_match | - | - |
| 5 | 状態 | status | string | t_petition_template_verification | status | 双方okでverified | - |
| 6 | 担当者名 | verifier_name | string | t_petition_template_verification | verifier_name | - | - |
| 7 | 最終検証日 | last_verified_at | string | t_petition_template_verification | last_verified_at | YYYY/MM/DD | - |
補足事項
- #342(FB0624):申立書作成画面の「テンプレート再検証ステータス一覧(グループ作業)」の状態更新先。
- #326(出力検証)の座標一致・内容一致チェック結果を本APIで t_petition_template_verification へ記録する。
- 一覧取得はAPI-028のレスポンスに含めるか、または別途一覧取得APIを設ける(書式×裁判所単位)。