API共通結果コード (RstVal)
GIIPプラットフォームのAPI共通レスポンスフィールドである
RstVal と RstMsg の標準定義について案内します。
📋 概要
すべてのGIIP APIは、実行結果を追跡するためにレスポンスデータの最上位階層に
RstVal(整数型コード)と RstMsg(説明メッセージ)を含みます。これらの値は、データベースの tDefRst (Result Definition) テーブルに定義された標準に従います。
ユーザーから言及される tRstVal は、実際のシステムの tDefRst テーブル内の drRstVal カラムを指します。開発およびAPI連携時には、以下の定義を参照して例外処理を実装してください。
📡 主要結果コード (Major Codes)
| RstVal | RstMsg | 意味 | 備考 |
|---|---|---|---|
| 200 | Process has done successfully | 成功 | 標準の成功レスポンス |
| 400 | No data found | 不正なリクエスト | 必須パラメータの不足、または空のデータ |
| 401 | Unauthorized | 認証失敗 | Access Key/Secret Keyの誤り、またはセッション期限切れ |
| 403 | Forbidden | 権限なし | リソースへのアクセス権限不足 |
| 404 | No data found | 未検出 | 指定されたリソースが存在しない |
| 500 | System error | システムエラー | サーバー内部ロジックまたはDBエラー |
🔍 詳細結果コード一覧 (tDefRst)
システム内部で使用される詳細な結果コードの一覧です。ポイント、会員登録、外部連携など、各ドメインに特化したメッセージが含まれています。
| drRstVal | drRstMsg | カテゴリ |
|---|---|---|
| 100 | Starting Stored Procedure... | システム |
| 102 | Data is not match | バリデーション |
| 201 | Created successfully | 生成 |
| 204 | No content available | データ |
| 211 | It is clean email. go next... | 会員登録 |
| 212 | Already registered user. | 会員登録 |
| 220 | Charge process has done successfully | 決済/ポイント |
| 221 | Point process has done successfully | ポイント |
| 230 | Buying process has done successfully | 購入 |
| 250 | Prayed successfully | その他 |
| 300 | Permission error | 権限 |
| 301 | Not enough point | ポイント |
| 302 | Already data exists. | 重複 |
| 312 | Pre-registered but not have User data. | 登録状態 |
| 313 | Input status is lower than dbStatus. | 整合性 |
| 320 | It cannot be processed point processing | ポイント |
| 330 | You have NFT Token already. | 資産 |
| 332 | Already sold out. | 購入 |
| 333 | Event item limit reached. | イベント |
| 390 | Already registered this wallet. | 認証/ウォレット |
| 405 | Method not allowed | サーバー/HTTP |
| 409 | Conflict: Resource already exists | 競合 |
| 410 | Gone: Resource no longer available | 期限切れ/削除済み |
| 420 | You don't have enough point | ポイント |
| 421 | Not same point and point history. | 整合性 |
| 502 | Bad Gateway: Upstream error | ネットワーク |
💡 開発者向けヒント
- 成功の判定:
がRstVal
の場合のみ、ビジネスロジックを続行することをお勧めします。200 - エラーハンドリング:
番台のコードはクライアント側でのリクエスト修正が必要であることを、400
番台のコードはシステム管理者の確認が必要であることを示します。500 - メッセージの活用:
は開発者のデバッグ用です。エンドユーザー向けには、各ロケールに合わせた独自のメッセージ処理を実装することをお勧めします。RstMsg
関連ドキュメント: